Question: bug in RowEchelonTransform?

Hello,

I am having problems using RowEchelonTransform from the LinearAlgebra[Modular] package. According to the documentation, it returns a triple

Q,rp,d:=LinearAlgebra[Modular][RowEchelonTransform](p, M, false, false, false, false):

where Q and rp are vectors of length r=rank(M). In more detail, rp=[c1,...,cr] lists the (linearly independent) pivot columns, and Q is a list of transpositions that can be used to construct the pivot rows (denoted by the matrix P in the documentation).

Anyway, these details are not so important. My problem is that Q is not always a list of length r. The example

p:=29:
M:=LinearAlgebra[Modular][Mod](p, [[-1,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,-1,-1,-1,-1],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,-1,-1,1,1,1,1],[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,0,0,0,1],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,-1],[0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0],[0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0]], integer[]):
Q,rp,d:=LinearAlgebra[Modular][RowEchelonTransform](p, M, false, false, false, false):

is a 16x39 matrix M of full rank r=16. I get the output

Q=[1, 9, 5, 5, 13, 10, 10, 11, 10, 14, 15, 12, 15, 16, 16]
rp=[1, 2, 3, 4, 5, 8, 9, 10, 11, 15, 16, 18, 19, 22, 29, 34]

where rp has 16 elements as expected, but Q has only 15 elements.

Hence there is either a bug in RowEchelonTransform, or the documentation of its output is inaccurate.

I reported this to technical support (the Software Change Request Form on MaplePrimes sadly does not work and shows an error when I tried to submit the filled form).

In the meantime, does anyone know a workaround for this?

With thanks,

Erik

Please Wait...