M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Bug in multigraded Ext computation

Open mahrud opened this issue 3 years ago • 5 comments

needsPackage "NormalToricVarieties"
X = toricProjectiveSpace 1 ** toricProjectiveSpace 2
HH^1(X, OO_X(-2,2))     -- QQ^6
Ext^1(OO_X, OO_X(-2,2)) -- 0

The two vector spaces should be equal (Hartshorne III 6.3), and I believe QQ^6 is the correct one.

mahrud avatar Feb 14 '22 20:02 mahrud

I am unable to reproduce this error:

i4 : Ext^1(OO_X, OO_X(-2,2))
stdio:4:4:(3): error: expected sheaves on a projective variety

Moreover, the NormalToricVarietes package does not appear to overload (Ext, CoherentSheaf, CoherentSheaf). Have you altered your local version is some way? Why does it work on your machine?

The algorithm implement in "varieties.m2" (implicitly?) assumes that the sheaves are represented by ZZ-graded modules over a standard graded polynomial ring. I did once work out the relevant generalizations on a smooth projective toric variety, but never implemented it.

ggsmith avatar Feb 15 '22 00:02 ggsmith

I should have been clear that the bug is in M2, not NormalToricVarieties, so the issue assignment is incorrect. Also you're right that I've made some local modifications.

Here is the bug without NormalToricVarieties and without my modifications:

S = kk[x_0,x_1,y_0,y_1, Degrees => {2:{1,0}, 2:{0,1}}]
X = Proj S
L = sheaf_X S^{{-2,2}}
Ext^1(OO_X, L) -- 0

HH^1 L gives a strange error, but I know where that comes from.

i24 : HH^1 L
stdio:26:3:(3): error: expected each multidegree to be of length 2

mahrud avatar Feb 15 '22 01:02 mahrud

The algorithm in varieties.m2 for Ext does not cover this situation, so I guess the question is where should one generate the appropriate error message. At least as originally implemented, the Proj method also fails to handle this situation. I believe that it implicitly assumes that the grading group is just the integers. It may also assume that the ring is a standard-graded polynomial ring. In short, applying Proj to non-standard graded polynomials is very likely to lead to incorrect output.

ggsmith avatar Feb 15 '22 01:02 ggsmith

I spent some time cleaning up and generalizing the code in varieties.m2 a while back, so I'll keep this in mind. ~I presume the code in ext.m2 also needs to be fixed?~

i1 : S = QQ[x_0,x_1,y_0,y_1, Degrees => {2:{1,0}, 2:{0,1}}];

i2 : Ext^1(S^1, S^{{-2,2}})

o2 = 0

o2 : S-module

~I'm less certain about what is the correct answer here and should think about it more, but I'm assuming it should be the same, right? I'm a bit confused now, but I'll look into it more.~

mahrud avatar Feb 15 '22 02:02 mahrud

Why do you think that the ext.m2 also needs to be fixed? Your example is correct because S^1 is a projective module (so the Ext-module vanishes). The Complexes package will expand the functionality of Ext.

ggsmith avatar Feb 15 '22 14:02 ggsmith