55
55
from sage .rings .rational_field import is_RationalField , QQ
56
56
from sage .rings .infinity import infinity
57
57
from sage .rings .number_field .number_field_base import NumberField
58
+ from sage .rings .qqbar import AA
58
59
from sage .rings .polynomial .polynomial_ring_constructor import PolynomialRing
59
60
from sage .rings .power_series_ring import PowerSeriesRing
60
61
from sage .structure .category_object import normalize_names
@@ -1235,7 +1236,7 @@ def is_totally_definite(self):
1235
1236
# Since we need the list of real embeddings of the number field (instead
1236
1237
# of just the number of them), we avoid a call of the `is_totally_real()`-
1237
1238
# method by directly comparing the embedding list's length to the degree
1238
- E = F .real_embeddings ( )
1239
+ E = F .embeddings ( AA )
1239
1240
return len (E ) == F .degree () and all (F .hilbert_symbol (self ._a , self ._b , e ) == - 1
1240
1241
for e in E )
1241
1242
@@ -1260,7 +1261,11 @@ def ramified_places(self, inf=True):
1260
1261
1261
1262
Additionally, if ``inf`` is set to ``True``, then the Archimedean
1262
1263
(AKA infinite) places at which the quaternion algebra ramifies are
1263
- also returned, given by real embeddings of the base field.
1264
+ also returned, given as
1265
+
1266
+ - the embeddings of `\QQ` into `\RR` if the base field is `\QQ`, or
1267
+
1268
+ - the embeddings of the base number field into the Algebraic Real Field.
1264
1269
1265
1270
.. NOTE::
1266
1271
@@ -1296,12 +1301,12 @@ def ramified_places(self, inf=True):
1296
1301
([],
1297
1302
[Ring morphism:
1298
1303
From: Number Field in a with defining polynomial x^2 - 3 with a = 1.732050807568878?
1299
- To: Real Field with 53 bits of precision
1300
- Defn: a |--> -1.73205080756888 ,
1304
+ To: Algebraic Real Field
1305
+ Defn: a |--> -1.732050807568878? ,
1301
1306
Ring morphism:
1302
1307
From: Number Field in a with defining polynomial x^2 - 3 with a = 1.732050807568878?
1303
- To: Real Field with 53 bits of precision
1304
- Defn: a |--> 1.73205080756888 ])
1308
+ To: Algebraic Real Field
1309
+ Defn: a |--> 1.732050807568878? ])
1305
1310
1306
1311
Extending the base field can also get rid of ramification at infinite
1307
1312
places while still leaving some ramification at finite places::
@@ -1318,8 +1323,8 @@ def ramified_places(self, inf=True):
1318
1323
([Fractional ideal (2)],
1319
1324
[Ring morphism:
1320
1325
From: Number Field in a with defining polynomial x^2 - x - 1
1321
- To: Real Field with 53 bits of precision
1322
- Defn: a |--> -0.618033988749895])
1326
+ To: Algebraic Real Field
1327
+ Defn: a |--> -0.618033988749895? ])
1323
1328
1324
1329
The method does not make sense over an arbitrary base ring::
1325
1330
@@ -1370,7 +1375,7 @@ def ramified_places(self, inf=True):
1370
1375
return ram_fin
1371
1376
1372
1377
# At this point the infinite ramified places also need to be computed
1373
- return ram_fin , [e for e in F .real_embeddings ( ) if F .hilbert_symbol (a , b , e ) == - 1 ]
1378
+ return ram_fin , [e for e in F .embeddings ( AA ) if F .hilbert_symbol (a , b , e ) == - 1 ]
1374
1379
1375
1380
@cached_method
1376
1381
def ramified_primes (self ):
0 commit comments