-
-
Notifications
You must be signed in to change notification settings - Fork 657
Commit 95d798c

Release Manager
gh-37132: Fix corners cases of free resolutions
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
as seen in
```sage
sage: P2.<x,y,z> = ProjectiveSpace(QQ, 2)
sage: S = P2.coordinate_ring()
sage: I = S.ideal(0)
sage: C = I.graded_free_resolution(); C
S(0) <-- 0
sage: C[1]
Ambient free module of rank 0 over the integral domain Multivariate
Polynomial Ring in x, y, z over Rational Field
sage: C[0]
------------------------------------------------------------------------
---
IndexError Traceback (most recent call
last)
Cell In[5], line 1
----> 1 C[Integer(0)]
File ~/GitHub/sage/src/sage/homology/free_resolution.py:426, in
FiniteFreeResolution.__getitem__(self, i)
424 F = FreeModule(self._base_ring, 0)
425 elif i == self._length:
--> 426 F = FreeModule(self._base_ring, self._maps[i - 1].ncols())
427 else:
428 F = FreeModule(self._base_ring, self._maps[i].nrows())
IndexError: list index out of range
sage: C.differential(1)
------------------------------------------------------------------------
---
IndexError Traceback (most recent call
last)
Cell In[6], line 1
----> 1 C.differential(Integer(1))
File ~/GitHub/sage/src/sage/homology/free_resolution.py:489, in
FiniteFreeResolution.differential(self, i)
487 elif i == self._length + 1:
488 s = FreeModule(self._base_ring, 0)
--> 489 t = FreeModule(self._base_ring, self._maps[i - 2].ncols())
490 m = s.hom(0, t)
491 elif i > self._length + 1:
IndexError: list index out of range
```
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
### 📝 Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
### ⌛ Dependencies
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: #37132
Reported by: Kwankyu Lee
Reviewer(s): Travis Scrimshaw
File tree
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changedFilter options
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changed
0 commit comments