Le 30/12/2014 13:31, Jean-Pierre Flori a écrit :
Anyhow, the above looks ugly. How about
sage: F.<z5> = GF(3, 5)
and the following should also lead to the same thing:
sage: F.<z5> = GF(3^5)
We already have that, or am I missing something?
We have only the second one. I haven't checked exactly what happens with
the first, but the result is as follows:
sage: F.<z5> = GF(3, 5)
sage: F
Finite Field of size 3
Note also that some kind of mechanism exists for finite fields defined
by Conway polynomials. One needs to give a prefix, and then the variable
name becomes 'z'+str(n) for GF(p^n,conway=True,prefix='z'). One could
argue that we should make 'z' (or something else) the default prefix
these finite fields, though we have the same problem as mentioned above
of z5 denoting the variable for GF(2^5, ...) and GF(3^5, ...).
Also, even if it may be a bit orthogonal to the present discussion, it
may be a good idea to homogenize the interface, allowing the
"prefix=..." construction even without conway, and allowing the
"name=..." when conway=True.
Bruno
Dima
>
> Peter
>
>
> Op dinsdag 30 december 2014 12:35:30 UTC+1 schreef Dima Pasechnik:
>>
>> On 2014-12-30, Nathann Cohen <nathan...@gmail.com
<javascript:>> wrote:
>> > I wondered about this syntax. You can build a finite field
from a
>> > prime number with GF(p), but if what you have is a prime
power you
>> > should write GF(q,'x') instead.
>> >
>> > I very often need to create a lot of finite fields, but I
could not
>> > care less about this 'x' and so I type this even though I do
not need
>> > it. Would it make sense to you if we made this argument
optional ? It
>> > would be 'x' by default, or anything else that you would prefer.
>>
>> I don't see how this would play out nicely if you, say, define
>> GF(27) and then define GF(9).
>> Would the latter definition invalidate the former?
>>
>> In GAP this is solved by having a special indexed variable
Z(p^k), for
>> p a prime and k a natural number. Then after defining GF(27) and
>> then defining GF(9)
>> you can still refer to the elements of the former as a*Z(27)^i,
>> for a and i integers.
>>
>> If something similar can be done in Sage, OK.
>> Otherwise, -1.
>>
>> Dima
>>
>>
>
--
You received this message because you are subscribed to the Google
Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-devel+unsubscr...@googlegroups.com
<mailto:sage-devel+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-devel@googlegroups.com
<mailto:sage-devel@googlegroups.com>.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.