#11826: coercing to the residue field of p-adic extensions
----------------------+-----------------------------------------------------
Reporter: ekin | Owner: roed
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.2
Component: padics | Keywords: coercion, residue fields
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
----------------------+-----------------------------------------------------
Given an extension l of Qp where the residue field of l is not Fp, it
doesn't coerce an element of the integer ring of l to an element in the
residue field, as shown below:
{{{
sage: l.<w> = F.extension(x^2-7); b = l.integer_ring()
sage: k = b.residue_field(); k;
Finite Field in w0 of size 5^2
sage: c = b(11); c
1 + 2*5 + O(5^20)
sage: k(c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_18.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
-*-\\n" +
_support_.preparse_worksheet_cell(base64.b64decode("bC48dz4gPSBGLmV4dGVuc2lvbih4XjItNyk7IGIgPSBsLmludGVnZXJfcmluZygpOyBjID0gYigxMSk7ICBrID0gYi5yZXNpZHVlX2ZpZWxkKCk7IGs7IGM7CmsoYyk="),globals())+"\\n");
execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmptDx0vL/___code___.py", line 4, in <module>
exec compile(u'k(c)
File "", line 1, in <module>
File "parent.pyx", line 915, in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:6668)
File "coerce_maps.pyx", line 82, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3119)
File "coerce_maps.pyx", line 77, in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:3022)
File "/sagenb/flask/sage-4.6.2/local/lib/python2.6/site-
packages/sage/rings/finite_rings/finite_field_givaro.py", line 326, in
_element_constructor_
return self._cache.element_from_data(e)
File "element_givaro.pyx", line 367, in
sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
(sage/rings/finite_rings/element_givaro.cpp:5808)
File "element_givaro.pyx", line 475, in
sage.rings.finite_rings.element_givaro.Cache_givaro.element_from_data
(sage/rings/finite_rings/element_givaro.cpp:5520)
TypeError: unable to coerce
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11826>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.