Nilpotent matrix corresponding to a partition via gap

91 Views Asked by At

is there a command/quick way in GAP, that gives me the corresponding nilpotent Matrix in jordan normalform(as an element of the matrix algebra MatAlgebra(GF(a),b)) when I enter a Partition and a field? So ([2],GF(3)) should enter the matrix [[0*Z(3),Z(3)^0],[0*Z(3),0*Z(3)]].

1

There are 1 best solutions below

0
On BEST ANSWER

With the specification of a partition and fixed eigenvalue 0 it is in the end less work to write a specialized function than to try to paste it together from existing bits:

MareMat:=function(part,f)
local m,o,c,j;
  m:=NullMat(Sum(part),Sum(part),f);
  o:=1;
  for c in part do
    for j in [1..c-1] do
      m[o][o+1]:=One(f);
      o:=o+1;
    od;
    o:=o+1;
  od;
  return m;
end;

The function simply takes a zero matrix and adds appropriate 1's off the diagonal. The variable $o$ is a counter through the rows of the matrix.