M2 icon indicating copy to clipboard operation
M2 copied to clipboard

promote/lift for mutable matrices returns zero matrices

Open mikestillman opened this issue 9 years ago • 2 comments

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)

mikestillman avatar Jun 21 '16 13:06 mikestillman

For now, I'll make it an error to call these functions, so it won't give the wrong answer.

mikestillman avatar Jun 21 '16 13:06 mikestillman

OK, I made these functions give errors. I'm moving this to 2.0

mikestillman avatar Jun 23 '16 14:06 mikestillman