Heft vector of local rings and Cox rings causes strange betti tables
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Why is the heft vector the default choice for the weight vector of a betti display?
I first noticed a long time ago that betti tables of resolutions over local rings look strange:
```m2
i1 : needsPackage "LocalRings";
i2 : S = kk[x,y]; betti res ideal"x2,xy,y2"
0 1 2
o3 = total: 1 3 2
0: 1 . .
1: . 3 2
o3 : BettiTally
i4 : R = S_(ideal"x,y"); betti res ideal"x2,xy,y2"
0 1 2
o5 = total: 1 3 2
-2: . . 2
-1: . 3 .
0: 1 . .
o5 : BettiTally
```
Peeking into the Betti tables reveals the bug: (note the total degree of the twists in the local case are all 0)
```m2
i6 : peek o3, peek o5
o6 = (BettiTally{(0, {0}, 0) => 1}, BettiTally{(0, {0}, 0) => 1})
(1, {2}, 2) => 3 (1, {2}, 0) => 3
(2, {3}, 3) => 2 (2, {3}, 0) => 2
```
I think it's because of this:
```m2
i8 : heft R === null
o8 = true
```
And in particular, setting the weight vector manually fixes the display:
```m2
i5 : betti(res ideal"x2,xy,y2", Weights => {1,1})
0 1 2
o5 = total: 1 3 2
0: 1 . .
1: . 3 2
o5 : BettiTally
```
Then I noticed it again with betti tables of resolutions of modules over the Cox ring of a Hirzebruch surface:
```m2
i1 : needsPackage "NormalToricVarieties";
i2 : X = hirzebruchSurface 2; S = ring X;
i4 : betti res ideal(x_3^2,x_1^2)
0 1 2
o4 = total: 1 2 1
0: 1 . .
1: . 1 .
2: . . .
3: . . .
4: . . .
5: . 1 .
6: . . 1
o4 : BettiTally
i5 : peek oo
o5 = BettiTally{(0, { 0, 0}, 0) => 1}
(1, {-4, 2}, 2) => 1
(1, { 0, 2}, 6) => 1
(2, {-4, 4}, 8) => 1
```
This betti table doesn't make much sense, but the betti tally makes even less sense. The reason for this output is that the heft vector is not {1,1}:
```m2
i24 : degrees S
o24 = {{1, 0}, {-2, 1}, {1, 0}, {0, 1}}
o24 : List
i25 : heft S
o25 = {1, 3}
o25 : List
```
I suppose this heft vector makes sense when you just have a graded ring with those degrees, but for a toric variety where we can find the effective cone and compute the Hilbert basis, I'm not sure if heft vector should be needed. In this case I think using {1,1} as weight vector makes more sense:
```m2
i7 : betti(res ideal(x_3^2,x_1^2), Weights => {1,1})
0 1 2
o7 = total: 1 2 1
-3: . 1 .
-2: . . 1
-1: . . .
0: 1 . .
1: . 1 .
o7 : BettiTally
```
@ggsmith @mikestillman what do you think?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the betti display code and the handling of the Weights option, heft, and degree data. Reproduce the LocalRings and NormalToricVarieties examples from the issue, then compare the displayed tables with their BettiTally entries. Done means the default behavior is defined and the affected examples produce consistent, meaningful output with regression coverage.
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
- 25/100