On Sat, 25 Apr 2015, Volker Braun wrote:
G = GL(3,Zmod(4)); G.random_element()
So Matrix.random() may (at least in some situations) just use this.
A question: Where is the documentation and/or source code for this? I
would like to know how GAP does it.
http://www.gap-system.org/Manuals/doc/ref/chap24.html#X79CC5F568252D341
OK, found. It is on <gap>/lib/matrix.gi and basically is just
for r in 1..n:
repeat
rows[r]=Random(...)
until NullspaceMat(...) = []
And for Zmod(16) it is very slow compared to just generate-and-test
-method.
* * *
When playing with this I noticed that there is no .rank() for matrices
over Zmod(n) (where n is not a prime). Is there good known algorithm for
it?
--
Jori Mäntysalo