# HH^ZZ CoherentSheaf -- cohomology of a coherent sheaf on a projective variety

## Synopsis

• Function: cohomology
• Usage:
HH^i F
cohomology(i,F)
• Inputs:
• i, an integer
• F, , on a projective variety X
• Optional inputs:
• Degree (missing documentation) => ..., default value 0,
• Outputs:
• , the i-th cohomology group of F as a vector space over the coefficient field of X

## Description

The command computes the i-th cohomology group of F as a vector space over the coefficient field of X. For i>0 this is currently done via local duality, while for i=0 it is computed as a limmit of Homs. Eventually there will exist an alternative option for computing sheaf cohomology via the Bernstein-Gelfand-Gelfand correspondence

As examples we compute the Picard numbers, Hodge numbers and dimension of the infinitesimal deformation spaces of various quintic hypersurfaces in projective fourspace (or their Calabi-Yau small resolutions)

We will make computations for quintics V in the family given by $$x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-5\lambda x_0x_1x_2x_3x_4=0$$ for various values of $\lambda$. If $\lambda$ is general (that is, $\lambda$ not a 5-th root of unity, 0 or $\infty$), then the quintic $V$ is smooth, so is a Calabi-Yau threefold, and in that case the Hodge numbers are as follows.

$$h^{1,1}(V)=1, h^{2,1}(V) = h^{1,2}(V) = 101,$$

so the Picard group of V has rank 1 (generated by the hyperplane section) and the moduli space of V (which is unobstructed) has dimension 101:

 i1 : Quintic = Proj(QQ[x_0..x_4]/ideal(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-101*x_0*x_1*x_2*x_3*x_4)) o1 = Quintic o1 : ProjectiveVariety i2 : singularLocus(Quintic) /QQ[x ..x ]\ | 0 4 | o2 = Proj|----------| \ 1 / o2 : ProjectiveVariety i3 : omegaQuintic = cotangentSheaf(Quintic); i4 : h11 = rank HH^1(omegaQuintic) -- ker (72) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (72) returned CacheFunction: -*a cache function*- -- ker (72) called with Matrix: 0 -- 1 -- ker (72) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^1,0)) === ((QQ[x_0..x_4])^1)) -- ker (73) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (73) returned CacheFunction: -*a cache function*- -- ker (73) called with Matrix: 0 -- 6 -- ker (73) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}},0)) === ((QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}})) o4 = 1 i5 : h12 = rank HH^2(omegaQuintic) -- ker (74) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (74) returned CacheFunction: -*a cache function*- -- ker (74) called with Matrix: 0 -- 1 -- ker (74) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^1,0)) === ((QQ[x_0..x_4])^1)) -- ker (75) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (75) returned CacheFunction: -*a cache function*- -- ker (75) called with Matrix: 0 -- 6 -- ker (75) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}},0)) === ((QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}})) -- ker (76) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (76) returned CacheFunction: -*a cache function*- -- ker (76) called with Matrix: 0 -- 15 -- ker (76) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {1}, {1}, {1}, {1}, {1}},0)) === ((QQ[x_0..x_4])^{{-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {1}, {1}, {1}, {1}, {1}})) o5 = 101

By Hodge duality this is $h^{2,1}$. Directly $h^{2,1}$ could be computed as

 i6 : h21 = rank HH^1(cotangentSheaf(2,Quintic)) -- ker (77) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (77) returned CacheFunction: -*a cache function*- -- ker (77) called with Matrix: 0 -- 60 -- ker (77) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}},0)) === ((QQ[x_0..x_4])^{{3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {3}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}, {6}})) -- ker (78) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (78) returned CacheFunction: -*a cache function*- -- ker (78) called with Matrix: 0 -- 151 -- ker (78) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {10}},0)) === ((QQ[x_0..x_4])^{{2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {2}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {5}, {10}})) -- ker (79) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (79) returned CacheFunction: -*a cache function*- -- ker (79) called with Matrix: 0 -- 205 -- ker (79) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {6}, {6}, {6}, {6}, {6}},0)) === ((QQ[x_0..x_4])^{{1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {1}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {4}, {6}, {6}, {6}, {6}, {6}})) o6 = 101

The Hodge numbers of a (smooth) projective variety can also be computed directly using the hh command:

 i7 : hh^(2,1)(Quintic) -- ker (80) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (80) returned CacheFunction: -*a cache function*- -- ker (80) called with Matrix: 0 -- 1 -- ker (80) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^1,0)) === ((QQ[x_0..x_4])^1)) -- ker (81) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (81) returned CacheFunction: -*a cache function*- -- ker (81) called with Matrix: 0 -- 6 -- ker (81) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}},0)) === ((QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}})) -- ker (82) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (82) returned CacheFunction: -*a cache function*- -- ker (82) called with Matrix: 0 -- 15 -- ker (82) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {1}, {1}, {1}, {1}, {1}},0)) === ((QQ[x_0..x_4])^{{-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {-2}, {1}, {1}, {1}, {1}, {1}})) o7 = 101 i8 : hh^(1,1)(Quintic) -- ker (83) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (83) returned CacheFunction: -*a cache function*- -- ker (83) called with Matrix: 0 -- 1 -- ker (83) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^1,0)) === ((QQ[x_0..x_4])^1)) -- ker (84) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (84) returned CacheFunction: -*a cache function*- -- ker (84) called with Matrix: 0 -- 6 -- ker (84) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}},0)) === ((QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {5}})) o8 = 1

Using the Hodge number we compute the topological Euler characteristic of V:

 i9 : euler(Quintic) -- ker (85) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (85) returned CacheFunction: -*a cache function*- -- ker (85) called with Matrix: 0 -- ker (85) returned Module: 0 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^0,0)) === ((QQ[x_0..x_4])^0)) -- ker (86) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (86) returned CacheFunction: -*a cache function*- -- ker (86) called with Matrix: 0 -- ker (86) returned Module: 0 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^0,0)) === ((QQ[x_0..x_4])^0)) -- ker (87) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (87) returned CacheFunction: -*a cache function*- -- ker (87) called with Matrix: 0 -- 1 -- ker (87) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^1,0)) === ((QQ[x_0..x_4])^1)) -- ker (88) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (88) returned CacheFunction: -*a cache function*- -- ker (88) called with Matrix: 0 -- 1 -- ker (88) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-5}},0)) === ((QQ[x_0..x_4])^{{-5}})) o9 = -200

When $\lambda$ is a 5th root of unity the quintic V is singular. It has 125 ordinary double points (nodes), namely the orbit of the point $(1:\lambda:\lambda:\lambda:\lambda)$ under a natural action of $\ZZ/5^3$. Then $V$ has a projective small resolution $W$ which is a Calabi-Yau threefold (since the action of $\ZZ/5^3$ is transitive on the sets of nodes of $V$, or for instance, just by blowing up one of the $(1,5)$ polarized abelian surfaces $V$ contains). Perhaps the most interesting such 3-fold is the one for the value $\lambda=1$, which is defined over $\QQ$ and is modular (see Schoen's work). To compute the Hodge numbers of the small resolution $W$ of $V$ we proceed as follows:

 i10 : SchoensQuintic = Proj(QQ[x_0..x_4]/ideal(x_0^5+x_1^5+x_2^5+x_3^5+x_4^5-5*x_0*x_1*x_2*x_3*x_4)) o10 = SchoensQuintic o10 : ProjectiveVariety i11 : Z = singularLocus(SchoensQuintic) o11 = Z o11 : ProjectiveVariety i12 : degree Z o12 = 125 i13 : II'Z = sheaf module ideal Z o13 = image | x_3^4-x_0x_1x_2x_4 x_0x_1x_2x_3-x_4^4 x_2^4-x_0x_1x_3x_4 x_1^4-x_0x_2x_3x_4 x_0^4-x_1x_2x_3x_4 x_2^3x_3^3-x_0^2x_1^2x_4^2 x_1^3x_3^3-x_0^2x_2^2x_4^2 x_0^3x_3^3-x_1^2x_2^2x_4^2 x_1^2x_2^2x_3^2-x_0^3x_4^3 x_0^2x_2^2x_3^2-x_1^3x_4^3 x_0^2x_1^2x_3^2-x_2^3x_4^3 x_1^3x_2^3-x_0^2x_3^2x_4^2 x_0^3x_2^3-x_1^2x_3^2x_4^2 x_0^2x_1^2x_2^2-x_3^3x_4^3 x_0^3x_1^3-x_2^2x_3^2x_4^2 | 1 o13 : coherent sheaf on Proj(QQ[x ..x ]), subsheaf of OO 0 4 Proj(QQ[x ..x ]) 0 4

The defect of W (that is, $h^{1,1}(W)-1$) can be computed from the cohomology of the ideal sheaf of the singular locus Z of V twisted by 5 (see Werner's thesis):

 i14 : defect = rank HH^1(II'Z(5)) -- ker (89) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (89) returned CacheFunction: -*a cache function*- -- ker (89) called with Matrix: 0 -- 24 -- ker (89) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^24,0)) === ((QQ[x_0..x_4])^24)) -- ker (90) called with OptionTable: OptionTable{SubringLimit => infinity} -- ker (90) returned CacheFunction: -*a cache function*- -- ker (90) called with Matrix: 0 -- 60 -- ker (90) returned Module: (QQ[x ..x ]) -- 0 4 assert( ker(map((QQ[x_0..x_4])^0,(QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}},0)) === ((QQ[x_0..x_4])^{{-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}})) o14 = 24 i15 : h11 = defect + 1 o15 = 25

The number $h^{2,1}(W)$ (the dimension of the moduli space of W) can be computed (Clemens-Griffiths, Werner) as $dim H^0(I_Z(5))/JacobianIdeal(V)_5$.

 i16 : quinticsJac = numgens source basis(5,ideal Z) o16 = 25 i17 : h21 = rank HH^0(II'Z(5)) - quinticsJac o17 = 0

In other words W is rigid. It has the following topological Euler characteristic.

 i18 : chiW = euler(Quintic)+2*degree(Z) o18 = 50