The GAP code
vecs:=[[1,0,0],[1,1,1],[0,1,1]]; V:=VectorSpace(Rationals,vecs); GeneratorsOfVectorSpace(V); B:=Basis(V); dim:=Length(B);constructs the vector space over
The command GF returns a field for any
prime power
. GAP assigns a fixed
primitive element to each field
:
Z(p^k). This is a root of a Conway
polynomial, which is the primitive polynomial
over
defining
.
The command AlgebraicExtension constructs an extension field.
gap> x:=Indeterminate(Rationals,"x");; gap> p:=x^4+3*x^2+1;; gap> e:=AlgebraicExtension(Rationals,p); <field in characteristic 0> gap> a:=RootOfDefiningPolynomial(e); (a) gap> a^5; (-1*a-3*a^3)
gap> x:=Indeterminate(GF(5),"x");; gap> p:=x^4+x^2+2;; gap> IsIrreducible(p); true gap> F:=AlgebraicExtension(GF(5),p); <field of size 625> gap> a:=RootOfDefiningPolynomial(F); (a)
Compute
.