Opened 11 years ago

Closed 11 years ago

#11826 closed defect (duplicate)

coercing to the residue field of p-adic extensions

Reported by: Ekin Ozman Owned by: David Roe
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: padics Keywords: coercion, residue fields
Cc: Alyson Deines Merged in:
Authors: Reviewers: David Roe
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


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 "", line 10, in <module>
    exec compile(u'open("","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("bC48dz4gPSBGLmV4dGVuc2lvbih4XjItNyk7IGIgPSBsLmludGVnZXJfcmluZygpOyBjID0gYigxMSk7ICBrID0gYi5yZXNpZHVlX2ZpZWxkKCk7IGs7IGM7CmsoYyk="),globals())+"\\n"); execfile(os.path.abspath(""))
  File "", line 1, in <module>
  File "/tmp/tmptDx0vL/", 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/", 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

Change History (6)

comment:1 Changed 11 years ago by Kiran Kedlaya

Is this related to (or even a duplicate of) #8240?

comment:2 Changed 11 years ago by David Roe

Yeah, this is a duplicate. It's still a feature that we should have though: it's already on my p-adics todo list.

comment:3 Changed 11 years ago by David Roe

Milestone: sage-4.8sage-duplicate/invalid/wontfix

comment:4 Changed 11 years ago by David Roe

Status: newneeds_review

comment:5 Changed 11 years ago by David Roe

Status: needs_reviewpositive_review

comment:6 Changed 11 years ago by Jeroen Demeyer

Resolution: duplicate
Reviewers: David Roe
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.