Opened 11 years ago

Closed 11 years ago

# coercing to the residue field of p-adic extensions

Reported by: Owned by: Ekin Ozman David Roe major sage-duplicate/invalid/wontfix padics coercion, residue fields Alyson Deines David Roe N/A

### Description

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

### 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.8 → sage-duplicate/invalid/wontfix

### comment:4 Changed 11 years ago by David Roe

Status: new → needs_review

### comment:5 Changed 11 years ago by David Roe

Status: needs_review → positive_review

### comment:6 Changed 11 years ago by Jeroen Demeyer

Resolution: → duplicate → David Roe positive_review → closed
Note: See TracTickets for help on using tickets.