[GAP Forum] representation of Finite Field's element
Burkhard Höfling
b.hoefling at tu-bs.de
Tue May 26 15:04:34 BST 2009
On 26.05.2009, at 03:50, xiaolei zhang wrote:
> hello.
>
> GAP us a primitive element to generate a finite field, this is good
> for
> computation. But I want to use gap in teaching, so I need some other
> representation of element.
>
> say, F2={0,1}, F2[x]/(x^2+x+1) ={0, 1, 1+x, x}
>
> In GAP, can I use the root of x^2+x+1 to represent the element of GF
> (4)?
I guess that 'AlgebraicExtension' might do what you want.
gap> x := X(GF(2), "x");
x
gap> f := x^2 + x + 1;
x^2+x+Z(2)^0
gap> F := AlgebraicExtension (GF(2), f);
<field of size 4>
gap> Elements (F);
[ !0*Z(2), a, !Z(2)^0, a+Z(2)^0 ]
Note that !0*Z(2) is the zero element, and !Z(2)^0 is one.
Cheers,
Burkhard.
More information about the Forum
mailing list