M2
M2 copied to clipboard
promote/lift for mutable matrices returns zero matrices
It turns out that the code was never written, and is apparently not on a test path. Here is an example of one that fails:
kk = ZZ/101
M = mutableMatrix(ZZ, 2, 2)
M_(1,1) = 4
assert(M != 0)
assert(matrix promote(M, kk) == promote(matrix M, kk)) -- false
-- the following should not be 0!
assert(promote(M,ZZ,kk) != 0)
-- lift has the same problem
M1 = mutableMatrix(kk, 2, 2)
M1_(1,1) = 4
assert(M1 != 0)
assert(matrix lift(M1, ZZ) == lift(matrix M1, ZZ)) -- false
-- the following should not be 0!
assert(lift(M1,kk,ZZ) != 0)
For now, I'll make it an error to call these functions, so it won't give the wrong answer.
OK, I made these functions give errors. I'm moving this to 2.0