Re: [sage-devel] Re: GAP to sage conversions

2010-01-12 Thread John Cremona
2010/1/12 javier vengor...@gmail.com: On Jan 12, 12:47 am, William Stein wst...@gmail.com wrote: Isn't the case of non-prime fields also already in Sage?  It was in my example. The __call__ function for a non-prime field yes, was already defined. What wasn't was the conversion of a gap

Re: [sage-devel] Re: GAP to sage conversions

2010-01-11 Thread John Cremona
I haven't time right now to go through the different finite field types in Sage, but not that Conway polynomials are not known (as far as I know) for all combinations of characteristic and degree, so they give a good solution for some (common) cases but not all. Many of us would dearly like to be

[sage-devel] Re: GAP to sage conversions

2010-01-11 Thread Dima Pasechnik
John, On Jan 11, 10:24 pm, javier vengor...@gmail.com wrote: Hi Dima, On Jan 11, 4:14 am, Dima Pasechnik dimp...@gmail.com wrote: I reckon this must be due to Sage representing the finite field of order p^n as quotient rings F_p[x]/(f(x)), with f an irreducible polynomial of degree n.

[sage-devel] Re: GAP to sage conversions

2010-01-11 Thread Dima Pasechnik
On Jan 11, 11:04 pm, Dima Pasechnik dimp...@gmail.com wrote: John, oops, I meant Javier On Jan 11, 10:24 pm, javier vengor...@gmail.com wrote: Hi Dima, On Jan 11, 4:14 am, Dima Pasechnik dimp...@gmail.com wrote: I reckon this must be due to Sage representing the finite field of

[sage-devel] Re: GAP to sage conversions

2010-01-11 Thread javier
Dima, On Jan 11, 3:04 pm, Dima Pasechnik dimp...@gmail.com wrote: no, from GAP's point of view, Z(2^4)^5 is an element of GF(4). And thus b is such an element, too... then from the gap-to-sage point of view nothing else can be done. A coercion between finite fields is needed before this method

Re: [sage-devel] Re: GAP to sage conversions

2010-01-11 Thread William Stein
On Mon, Jan 11, 2010 at 4:16 PM, javier vengor...@gmail.com wrote: Dima, On Jan 11, 3:04 pm, Dima Pasechnik dimp...@gmail.com wrote: no, from GAP's point of view, Z(2^4)^5 is an element of GF(4). And thus b is such an element, too... then from the gap-to-sage point of view nothing else can

[sage-devel] Re: GAP to sage conversions

2010-01-11 Thread javier
Hi William, On Jan 12, 12:24 am, William Stein wst...@gmail.com wrote: Dumb question.  There is code in Sage already to convert from GAP's GF(p) (or GF(q)) to Sage's: you are completely right. Since at the beginning I tried to do something like sage: a = gap(Z(7)) sage: a.sage() and that

Re: [sage-devel] Re: GAP to sage conversions

2010-01-11 Thread William Stein
On Mon, Jan 11, 2010 at 4:46 PM, javier vengor...@gmail.com wrote: Hi William, On Jan 12, 12:24 am, William Stein wst...@gmail.com wrote: Dumb question.  There is code in Sage already to convert from GAP's GF(p) (or GF(q)) to Sage's: you are completely right. Since at the beginning I tried

[sage-devel] Re: GAP to sage conversions

2010-01-11 Thread javier
On Jan 12, 12:47 am, William Stein wst...@gmail.com wrote: Isn't the case of non-prime fields also already in Sage?  It was in my example. The __call__ function for a non-prime field yes, was already defined. What wasn't was the conversion of a gap non-prime field into a sage prime field.

[sage-devel] Re: GAP to sage conversions

2010-01-10 Thread javier
Hi Simon, On Jan 10, 7:57 pm, Simon King simon.k...@nuigalway.ie wrote: Is it possible to chose take the same name that GAP uses? In GAP the generator of (the multiplicative group of) say GF(16) is called Z(2^4), so I guess the answer is no, we cannot use GAP name. We can go for something like

[sage-devel] Re: GAP to sage conversions

2010-01-10 Thread Dima Pasechnik
On Jan 11, 7:19 am, javier vengor...@gmail.com wrote: [...] I have been trying some code to convert elements of gap finite fields into the corresponding elements of sage finite fields. The sort of straightforward manner fails because of this behavior: sage: a = gap(Z(2^4)) sage: a^5