On Mon, May 4, 2009 at 1:07 PM, gtg <yih0siang0l...@gmail.com> wrote:
>
> Hi I'm new to sage. Can you tell me how to construct finite fields
> using quotient of poly ring? For instance suppose I want to construct
> GF(5^2) using a GF(5) poly ring mod out by x^2 + x + 1 how do I do
> that? I can construct the quotient like this:
>
> p = 5
> F = GF(p)
> R.<x> = F['x']
> f = x * x + x + 1
> S = R.quotient(f, 'a')
>
> How do I force S to a field so that I can use it with elliptic curves?
> I know that I can simply do GF(5^2) but I want to be able to specify
> the modulus explicitly.

Use the modulus option to GF:

sage: p = 5
sage: F = GF(p)
sage: R.<x> = F['x']
sage: S.<a> = GF(p^2,modulus=x^2+x+1)
sage: S
Finite Field in a of size 5^2
sage: a^2 + a + 1
0

sage: GF?   # get more help!

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to