[GAP Forum] subspace spanned by random subset (of finite field over subfield)
Max Horn
max at quendi.de
Tue Apr 10 20:08:26 BST 2012
Dear
Am 10.04.2012 um 12:11 schrieb fvanhove at cage.ugent.be:
> Dear members of the GAP forum,
>
> I would like to consider a big Galois field as a vector space over its prime subfield.
> Hence I started with:
>
> gf:=GF(3^6);
> w:=PrimitiveElement(gf);
> W:=AsVectorSpace(PrimeField(gf),gf);
>
> Now I would for instance like to compute the dimension of the subspace (over GF(3)) spanned by {w,w^5,w^6}.
> (Note that I am actually not expecting that that subset is linearly independent)
>
> But if I understand
> http://www.gap-system.org/Manuals/doc/htm/ref/CHAP059.htm#SECT001
> correctly, then the only way to construct subspaces is by expressing vectors in terms of coordinates using some basis.
>
> Is this correct?
Actually, no, that's not correct. To stick with your example, the following code works
gap> gf:=GF(3^6);
GF(3^6)
gap> w:=PrimitiveElement(gf);
Z(3^6)
gap> W:=AsVectorSpace(PrimeField(gf),gf);
GF(3^6)
gap> Dimension(Subspace(W, [w,w^5,w^6]));
3
So, the three "vectors" are linearly independent. You can also ask for "coordinates", if you prefer, though. E.g. the standard basis GAP will use for this vector space is 1=w^0 up to w^5:
gap> AsList(Basis(W));
[ Z(3)^0, Z(3^6), Z(3^6)^2, Z(3^6)^3, Z(3^6)^4, Z(3^6)^5 ]
Decomposing w^5 with respect to this basis:
gap> Coefficients(Basis(W), w^6);
[ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ]
We verify this:
gap> w^0 + w - w^2 + w^4 = w^6;
true
Hope that helps,
Max
>
> Thanks in advance,
> Kind regards,
> Frédéric
>
>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>
More information about the Forum
mailing list