Just one point out of many, but there is a better way to
do GF(2) rank.
If you convert each row of the matrix first to GF(2) and then into
a vector it will become much smaller. Furthermore the kernel
has fast vector arithmetic.
Thus mat2 := List(mat, function(row) local row2; row2 := row*Z(2); IsVector(row2); return row2; end);
will convert into GF(2) space-efficiently.