Ticket #4218 (assigned defect)

Opened 2 months ago

Last modified 2 months ago

Extensions of Finite Fields don't work well

Reported by: justin Assigned to: AlexGhitza (accepted)
Priority: major Milestone: sage-3.2.1
Component: algebra Keywords:
Cc:

Description

The following sage snippets show (some of) the problems. First, we set the stage:

sage: F1.<a> = GF(2^7)
sage: P1.<x>=PolynomialRing(F1)
sage: f=x^2+x+F1(1)
sage: F2=F1.extension(f,'u')
sage: F2
Univariate Quotient Polynomial Ring in u over Finite Field in a of size 2^7 with modulus u^2 + u + 1
sage: a in F2
True

First problem:

sage: for i in xrange(100):
   ....:         r = F2.random_element()
   ....:     if r != F2(0) and r != F2(1):
   ....:             print "Yoicks! r=%s"%r
   ....: 
sage: 

No output means that 100 random elements of F2 are either 0 or 1, which seems somehow incorrect.

The next oddity is

sage: F1.order()
128
sage: F2.order()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/SandBox/Justin/sb/sage-3.1.1/<ipython console> in <module>()

/SandBox/Justin/sb/sage-3.1.1/ring.pyx in sage.rings.ring.Ring.order (sage/rings/ring.c:4108)()

NotImplementedError: 

Shouldn't .order() work for extensions as well as those directly defined?

Change History

10/01/2008 08:41:14 PM changed by mabshoff

  • milestone set to sage-3.2.

Justin,

please remember to assign a milestone to tickets you open :)

Cheers,

Michael

10/04/2008 03:21:55 AM changed by AlexGhitza

  • owner changed from tbd to AlexGhitza.

10/04/2008 03:22:05 AM changed by AlexGhitza

  • status changed from new to assigned.