LinearTruncations
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
The function `isLinearComplex` in the package `LinearTruncations` isn't quite correct:
Here is the code I see:
```m2
isLinearComplex ChainComplex := F -> (
if F == 0 then return true;
t := degreeLength ring F;
range := toList(min F..max F-1);
if #(unique degrees F_(range_0)) != 1 then return false;
dF := apply(range, i -> (degrees(F_i))/sum);
mindF := dF_(min F)_0;
all(range, i -> max(dF_i) === mindF+i-range_0)
)
```
Problems:
- dF starts at 0, not at min F.
- range doesn't include the last module `F_(max F)` in the list, so if the degrees there are not making it a linear complex, it will not be detected.
- t is set, but doesn't appear to be being used.
An example:
```m2
needsPackage "LinearTruncations"
R = QQ[a..d]
M = matrix{{a,b,c},{b,c,d}}
C = res(coker M, LengthLimit => 2)
betti C
assert not isLinearComplex C -- fails. If there were a trailing zero, it would have worked...!
```
I noticed these while seeing about migrating this to the new Complexes package (which is delicate, as TateOnProducts is the hardest package to migrate!).
If you want, I can fix this, so it will work with the new Complexes package as well.
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 in the LinearTruncations package at the isLinearComplex function and reproduce the reported example with QQ[a..d], M, and res. Check the degree range and dF calculations against the stated endpoint cases, then rerun assert not isLinearComplex C; done means the example is detected as non-linear without relying on a trailing zero.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100