Hello,

I'm having trouble extending a finite field. Any help would be appreciated.

F16 = GF(16, 'g')
F16_x.<x> = PolynomialRing(F16, 'x')
HH = GF(F16^7, modulus=x^7 + x + 1, name='h')

I basically try to extend 2^4 to 2^4*7 with a degree 7 irreducible.
I get the following.

best,
evrim.


sage: HH = FiniteField(F16^7, modulus=x^7 + x + g^15, name='h')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/all_cmdline.pyc in 
<module>()
----> 1 HH = FiniteField(F16**Integer(7), modulus=x**Integer(7) + x + 
g**Integer(15), name='h')

/usr/lib/sagemath/src/sage/structure/factory.pyx in 
sage.structure.factory.UniqueFactory.__call__ 
(build/cythonized/sage/structure/factory.c:1207)()
    362             False
    363         """
--> 364         key, kwds = self.create_key_and_extra_args(*args, **kwds)
    365         version = self.get_version(sage_version)
    366         return self.get_object(version, key, kwds)

/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/rings/finite_rings/constructor.pyc
 
in create_key_and_extra_args(self, order, name, modulus, names, impl, 
proof, check_irreducible, **kwds)
    426             proof = arithmetic()
    427         with WithProof('arithmetic', proof):
--> 428             order = Integer(order)
    429             if order <= 1:
    430                 raise ValueError("the order of a finite field must 
be at least 2")

/usr/lib/sagemath/src/sage/rings/integer.pyx in 
sage.rings.integer.Integer.__init__ 
(build/cythonized/sage/rings/integer.c:6020)()
    688                     return
    689 
--> 690                 raise TypeError, "unable to coerce %s to an 
integer" % type(x)
    691 
    692     def __reduce__(self):

TypeError: unable to coerce <class 
'sage.modules.free_module.FreeModule_ambient_field_with_category'> to an 
integer

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to