#14982: Coercion from base ring fails for some polynomial rings over number
fields
with embeddings
----------------------------+-----------------------------
Reporter: mmezzarobba | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.12
Component: coercion | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Dependencies: | Stopgaps:
----------------------------+-----------------------------
{{{
sage: K.<a> = NumberField(x^2+1/2, embedding=CC(0,1))
sage: L = NumberField(x^2+2, 'b', embedding=1/a)
sage: R = PolynomialRing(L, 'x')
sage: R.coerce_map_from(R.base_ring())
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-8-fb89bb074d92> in <module>()
----> 1 R.coerce_map_from(R.base_ring())
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.coerce_map_from
(sage/structure/parent.c:14807)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.coerce_map_from
(sage/structure/parent.c:14563)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.discover_coerce_map_from
(sage/structure/parent.c:14932)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.coerce_map_from
(sage/structure/parent.c:14563)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent.so in
sage.structure.parent.Parent.discover_coerce_map_from
(sage/structure/parent.c:14985)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/structure/parent_old.so in
sage.structure.parent_old.Parent._coerce_map_from_
(sage/structure/parent_old.c:6658)()
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/rings/polynomial/polynomial_ring.pyc in
_coerce_map_from_(self, P)
560 connecting = base_ring.coerce_map_from(P)
561 if connecting is not None:
--> 562 return self.coerce_map_from(base_ring) *
connecting
563 except TypeError:
564 pass
/home/marc/co/sage/local/lib/python2.7/site-
packages/sage/categories/map.so in sage.categories.map.Map.__mul__
(sage/categories/map.c:4796)()
AttributeError: 'NoneType' object has no attribute 'domain'
}}}
Note that apparently P is K (not L) in the call to `_coerce_map_from_` at
the end of the backtrace.
--
Ticket URL: <http://trac.sagemath.org/ticket/14982>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.