You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: src/sage/rings/number_field/number_field_morphisms.pyx
+33-3
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ fields (generally `\RR` or `\CC`).
24
24
from sage.structure.element cimport Element
25
25
from sage.categories.morphism cimport Morphism
26
26
from sage.categories.map cimport Map
27
+
from sage.categories.pushout import pushout
27
28
28
29
from sage.rings.real_mpfr import RealField, mpfr_prec_min
29
30
from sage.rings.complex_field import ComplexField
@@ -107,8 +108,7 @@ cdef class NumberFieldEmbedding(Morphism):
107
108
cdef class EmbeddedNumberFieldMorphism(NumberFieldEmbedding):
108
109
r"""
109
110
This allows one to go from one number field in another consistently,
110
-
assuming they both have specified embeddings into an ambient field
111
-
(by default it looks for an embedding into `\CC`).
111
+
assuming they both have specified embeddings into an ambient field.
112
112
113
113
EXAMPLES::
114
114
@@ -161,13 +161,43 @@ cdef class EmbeddedNumberFieldMorphism(NumberFieldEmbedding):
161
161
Traceback (most recent call last):
162
162
...
163
163
TypeError: unsupported operand parent(s) for '+': 'Number Field in a with defining polynomial x^3 + 2' and 'Number Field in a with defining polynomial x^3 + 2'
164
+
165
+
The following was fixed to raise a ``TypeError`` in :trac:`15331`::
166
+
167
+
sage: L.<i> = NumberField(x^2 + 1)
168
+
sage: K = NumberField(L(i/2+3).minpoly(), names=('i0',), embedding=L(i/2+3))
169
+
sage: EmbeddedNumberFieldMorphism(K, L)
170
+
Traceback (most recent call last):
171
+
...
172
+
TypeError: No embedding available for Number Field in i with defining polynomial x^2 + 1
0 commit comments