Something seems to be broken in extensions of p-adics. Here are two
examples:

sage: R.<z> = Zq(9)
sage: R.residue_system()

TypeError: cannot convert x to a p-adic element

and

sage: el=R.random_element()
sage: el.slice(el.valuation(),el.valuation()+1)

TypeError:
'sage.rings.padics.padic_ZZ_pX_CA_element.pAdicZZpXCAElement' object
cannot be interpreted as an index

Otherwise I saw there is a parameter res_name to be passed to
constructor:

sage: R.<z> = Zq(9,res_name=x)

but then x is not really bound to anything.

sage: x*3
3*x

Sorry, can't be of much help. Even this trick didn't work

sage: R2.<z> = Zq(9,1)
sage: R(z)
NotImplementedError: Conversion from different p-adic extensions not
yet supported

Rado

On Feb 2, 9:04 pm, dmharvey <[email protected]> wrote:
> Hi,
>
> After I create the residue field of a p-adic ring, how do I cast
> elements of the field back into the ring? Any lift is fine. The
> obvious thing doesn't work:
>
> sage: R.<z> = Zq(9)
> sage: F = R.residue_class_field()
> sage: F
> Finite Field in z0 of size 3^2
> sage: a = F.gen()
> sage: R(a)
> ---------------------------------------------------------------------------
> TypeError
>
> ....
>
> Also, is it possible to change the name of the generator of the
> residue field?
>
> david

-- 
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-support
URL: http://www.sagemath.org

Reply via email to