RingMap MutableMatrix is broken
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Here's an experiment on 1.21:
```m2
i1 : C = toField(QQ[i]/(i^2+1))
o1 = C
o1 : PolynomialRing
i2 : R = C[x]
o2 = R
o2 : PolynomialRing
```
So far so good. The first curious thing is the presentation of this map. What is `{-1, i}` doing here?
```m2
i3 : f = map(R, R, {i^2})
o3 = map (R, R, {-1, i})
o3 : RingMap R <--- R
i4 : f x
o4 = -1
o4 : R
i5 : f matrix{{x}}
o5 = | -1 |
1 1
o5 : Matrix R <--- R
```
And now we get to the bug:
```m2
i6 : f mutableMatrix{{x}}
o6 = 0
o6 : MutableMatrix
```
`flattenRing R` returns itself, so there's not much to do there.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Macaulay2 session in the issue, focusing on the difference between applying the map to matrix{{x}} and mutableMatrix{{x}}. Trace the MutableMatrix mapping path and compare it with the ordinary matrix result; done means f mutableMatrix{{x}} preserves the mapped entry instead of returning 0, while the existing scalar and matrix behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100