On Feb 3, 2010, at 1:22 AM, David Roe wrote:

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:

Sadly, residue fields for p-adic rings currently suck. My hope is that they'll be better in the not-so-distant future: one of the projects I'm currently taking a break from to work on my thesis is making finite fields better. I'll e-mail Martin about this and hopefully get this back on track.

In the mean time, you can do the following (sorry for the clunkiness):

sage: b = F.random_element()
sage: sum([z^i*R.base_ring()(ZZ(b.polynomial()[i])) for i in range (b.polynomial().degree()+1)])

Heh, ok.

I'll file a ticket for this.


Also, is it possible to change the name of the generator of the
residue field?

Yep.
R.<a> = Zq(5^3, res_name='abar')
This, along with a bunch of other printing options I suspect nobody uses, are documented in Zq??

ok.

Please, keep sending these bugs and feature requests for p-adic extensions. I don't think the code has gotten much use, and I'd like to see actual use cases.

I plan to bash it pretty hard over the next few weeks (unless I give up and switch to Magma ;-))

I already filed #8162 yesterday.

david

--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to