Bug in pruning map over ZZ with torsion
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Still haven't looked into the root cause, but I think this is a bug:
```m2
N = prune coker matrix{{2, -1}, {-1, 2}, {-1, -1}}
-- cokernel | 3 |
-- | 0 |
f = inverse N.cache.pruningMap
-- | 1 2 0 |
-- | 1 1 1 |
g = map(target f, source f, matrix f)
-- | 1 -1 0 |
-- | 1 1 1 |
f == g -- false
```
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:
```m2
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
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pruning and torsion examples in the issue, then inspect the behavior of `inverse N.cache.pruningMap` and `map(target f, source f, matrix f)`. Done means the reported morphism comparison and the related matrix comparison behave consistently, with the nonsensical ring error explained or corrected.
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
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100