PutStandardForm( M )
PutStandardForm( M, idleft )
PutStandardForm puts a matrix M in standard form, and returns the
permutation needed to do so. idleft is a boolean that sets the position
of the identity matrix in M. If idleft is set to true, the identity
matrix is put in the left side of M. Otherwise, it is put at the right
side. The default for idleft is true.
The function BaseMat also returns a similar standard form, but does not
apply column permutations. The rows of the matrix still span the same
vector space after BaseMat, but after calling PutStandardForm, this
is not necessarily true.
gap> M := Z(2)*[[1,0,0,1],[0,0,1,1]];; PrintArray(M);
[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0 ],
[ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ] ]
gap> PutStandardForm(M); # identity at the left side
(2,3)
gap> PrintArray(M);
[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0 ],
[ 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0 ] ]
gap> PutStandardForm(M, false); # identity at the right side
(1,4,3)
gap> PrintArray(M);
[ [ 0*Z(2), Z(2)^0, Z(2)^0, 0*Z(2) ],
[ 0*Z(2), Z(2)^0, 0*Z(2), Z(2)^0 ] ]
GAP 3.4.4