The matrices are not the same over the integers, but as morphisms of Z-modules they are identical. In particular, I think one would expect f == map(target f, source f, matrix f) to always be true.
The closest I got to directly defining such matrices is something like this, which returns a non-sense error:
i1 : debug Core;
i2 : R = ZZ/3;
i3 : m = map(R, raw matrix{{2}})
o3 = | 2 |
1 1
o3 : Matrix R <--- R
i4 : n = matrix(R, {{2}})
o4 = | -1 |
1 1
o4 : Matrix R <--- R
i5 : m == n
stdio:5:3:(3): error: expected same ring
i6 : ring m === ring n
o6 = true
Still haven't looked into the root cause, but I think this is a bug:
The matrices are not the same over the integers, but as morphisms of Z-modules they are identical. In particular, I think one would expect
f == map(target f, source f, matrix f)
to always be true.The closest I got to directly defining such matrices is something like this, which returns a non-sense error: