M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Promotion of mutable matrices

Open pzinn opened this issue 4 years ago • 2 comments

Promotion of mutable matrices doesn't work: (so mutablemat.m2:83-89 and enginering.m2:135-139 don't actually work)

i1 : m=mutableMatrix {{1}}

o1 = | 1 |

o1 : MutableMatrix

i2 : promote(m,QQ)
stdio:3:1:(3): error: no method found for applying promote to:
     argument 1 :  | 1 | (of class MutableMatrix)
     argument 2 :  ZZ
     argument 3 :  QQ

i3 : R=QQ[x]

o3 = R

o3 : PolynomialRing

i4 : promote(m,R)
stdio:3:1:(3): error: 'raw' received a raw object

i5 : m=mutableMatrix {{x}}

o5 = | x |

o5 : MutableMatrix

i6 : S=R[t]

o6 = S

o6 : PolynomialRing

i7 : promote(m,S)
stdio:6:1:(3): error: MutableMatrix promote not implemented yet

pzinn avatar Jul 20 '21 02:07 pzinn

Same with lift: https://github.com/Macaulay2/M2/issues/567

mahrud avatar Jan 09 '23 06:01 mahrud

... as a consequence, this fails:

mutableMatrix{{1}}*mutableMatrix{{1/1}}
error: mutable matrix/ring type for (mutable) matrix multiplication required to be the same

pzinn avatar Aug 18 '23 04:08 pzinn