@@ -1263,7 +1263,7 @@ def is_totally_definite(self):
12631263 ValueError: base field must be rational numbers or a number field
12641264 """
12651265 F = self .base_ring ()
1266- if is_RationalField ( F ):
1266+ if isinstance ( F , RationalField ):
12671267 return self .is_definite ()
12681268
12691269 if F not in NumberFields ():
@@ -1382,7 +1382,7 @@ def ramified_places(self, inf=True):
13821382
13831383 # For efficiency (and to not convert QQ into a number field manually),
13841384 # we handle the case F = QQ first
1385- if is_RationalField ( F ):
1385+ if isinstance ( F , RationalField ):
13861386 ram_fin = sorted ([p for p in set ([2 ]).union (
13871387 prime_divisors (a .numerator ()), prime_divisors (a .denominator ()),
13881388 prime_divisors (b .numerator ()), prime_divisors (b .denominator ()))
@@ -1510,7 +1510,7 @@ def discriminant(self):
15101510 ValueError: base field must be rational numbers or a number field
15111511 """
15121512 F = self .base_ring ()
1513- if is_RationalField ( F ):
1513+ if isinstance ( F , RationalField ):
15141514 return ZZ .prod (self .ramified_places (inf = False ))
15151515
15161516 return F .ideal (F .prod (self .ramified_places (inf = False )))
@@ -1555,7 +1555,7 @@ def is_isomorphic(self, A) -> bool:
15551555 if F is not A .base_ring ():
15561556 raise ValueError ("both quaternion algebras must be defined over the same ring" )
15571557
1558- if is_RationalField ( F ):
1558+ if isinstance ( F , RationalField ):
15591559 return self .ramified_places (inf = False ) == A .ramified_places (inf = False )
15601560
15611561 try :
0 commit comments