Dimension( V )
Dimension computes the dimension of the given vector space V over its
field.
The dimension of a vector space V is defined to be the length of a minimal generating set of V, which is called a base of V (see Base).
The implementation of Dimension strictly follows its above definition,
so that this function will always determine a base of V.
gap> f := GF( 3^4 );
GF(3^4)
gap> f.base;
[ Z(3)^0, Z(3^4), Z(3^4)^2, Z(3^4)^3 ]
gap> V := VectorSpace( f.base, GF( 3 ) );
VectorSpace( [ Z(3)^0, Z(3^4), Z(3^4)^2, Z(3^4)^3 ], GF(3) )
gap> Dimension( V );
4
GAP 3.4.4