LengthLimit in Complexes
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
I thought there was already an issue about this, but couldn't find it.
First problem:
```m2
needsPackage "Complexes"
R = QQ[x,y]/(x-y)
freeResolution R^1
-- error:
FreeResolutions.m2:147:17:(3):[16]: error: need to provide LengthLimit for free resolutions over quotients of polynomial rings
```
Which is bad because the input was free!
---
Second problem: let's say we already _know_ that a module (or in my case really a complex of non-free modules) has finite projective dimension, just don't know what the number is (could be 5, could be 5 million). A reasonable idea would be to pass `infinity` and wait until M2 finds the projective dimension for you:
```m2
freeResolution(coker vars R, LengthLimit => infinity)
-- error
FreeResolutions.m2:147:17:(3):[16]: error: need to provide LengthLimit for free resolutions over quotients of polynomial rings
```
Which is both bad because the error is incorrect, that option _is_ provided, and because it makes it impossible to compute projective dimension using the Complexes package.
---
More generally, a compiler shouldn't refuse to compile a program if it can't determine whether it will halt! Which is to say, in the case when the module does not have finite projective dimension, passing `LengthLimit => infinity` should **run, but never finish**. This is equivalent to something like:
```m2
m = presentation M
complex( {m} | while m != 0 list m = syz m )
```
which, should indeed be equivalent to `while true do ()` if the resolution is infinite, and that is the intended outcome, not a bug.
cc: @ggsmith @mikestillman
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at FreeResolutions.m2:147:17 and inspect how freeResolution handles LengthLimit for quotients of polynomial rings, especially the infinity value. Reproduce both Complexes examples, then compare the behavior with the presentation/complex/syz loop described in the issue. Done means finite free inputs no longer require an unnecessary limit and infinity is accepted for potentially unbounded resolutions.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100