I don't like the behavior illustrated below. Briefly, my problem is that
GF(p).gen() gives a generator for the additive group of GF(5), while
GF(p^n).gen() gives a generator for for multiplicative group of GF(p^n)
(n > 1).

I would file this 'complaint' directly as a trac bug report, but the
documentation is somewhat clear that this is what is _supposed_ to
happen - i.e., it says

sage: F.gen?
Type:           builtin_function_or_method
Base Class:     <type 'builtin_function_or_method'>
String Form:    <built-in method gen of
sage.rings.finite_field_givaro.FiniteField_givaro object at 0x9c22324>
Namespace:      Interactive
Docstring:
    
            Return a generator of self. All elements x of self are
            expressed as log_{self.gen()}(p) internally. If self is
            a prime field this method returns 1.
    
[...]

I also know that there is multiplicative_generator() method which always
does the right thing, but I still don't like this inconsistency.

Anyway, perhaps I'll turn my 'complaint' into a trac ticket, but I won't
bother if others don't consider this to be a bug.

-bober

p.s. The complaint illustrated:

sage: F = GF(25,name='x')
sage: x = F.gen()
sage: x # x generates the multiplicative group
x
sage: [x^i for i in range(25)]

[1,
 x,
 x + 3,
 4*x + 3,
 2*x + 2,
 4*x + 1,
 2,
 2*x,
 2*x + 1,
 3*x + 1,
 4*x + 4,
 3*x + 2,
 4,
 4*x,
 4*x + 2,
 x + 2,
 3*x + 3,
 x + 4,
 3,
 3*x,
 3*x + 4,
 2*x + 4,
 x + 1,
 2*x + 3,
 1]
sage: K = GF(5, name='y')
sage: y # y generates the additive group
1
sage: y * y
1




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to