On 26 April 2015 at 07:12, Jori Mäntysalo <jori.mantys...@uta.fi> wrote: > 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?
Is there a good definition of the rank of matrix over a ring which is not an integral domain? What is the rank of the 1x1 matrix (2) over Z/4Z, for example? John > > -- > Jori Mäntysalo -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.