If *F* is a coherent sheaf on a smooth toric variety *X* then multigraded commutative algebra can be used to compute the cohomology groups *H ^{i}(X, F)*.

Indeed if *B* is the irrelevant ideal of *X* then the cohomology group *H ^{i}(X, F)* can be relized as the degree zero piece of the multigraded module

Given the fan of *X* and *F* a sufficiently large power of *l* can be determined effectively. We refer to sections 2 and 3 of the paper "Cohomology on Toric Varieties and Local Cohomology with Monomial Supports" for more details.

In this example, we consider the case that *X = ℙ ^{1} ×ℙ^{1}* and

We first make the multi-graded coordinate ring of *ℙ ^{1} ×ℙ^{1}*, the irrelevant ideal, and a sufficentily high Frobenus power of the irrelevant ideal needed for our calculations. Also the complex

i1 : R = ZZ/101[a_0..b_1, Degrees=>{2:{1,0},2:{0,1}}]; -- PP^1 x PP^1 |

i2 : B = intersect(ideal(a_0,a_1),ideal(b_0,b_1)) ; -- irrelevant ideal o2 : Ideal of R |

i3 : B = B_*/(x -> x^5)//ideal ; -- Sufficentily high Frobenius power o3 : Ideal of R |

i4 : G = res image gens B ; |

We next make the ideal, denoted by *I* below, of a general divisor of type *(3,3)* on *ℙ ^{1} ×ℙ^{1}*. Also the chain complex

i5 : I = ideal random(R^1, R^{{-3,-3}}) ; -- ideal of C o5 : Ideal of R |

i6 : F = res comodule I 1 1 o6 = R <-- R <-- 0 0 1 2 o6 : ChainComplex |

To use hypercohomology to compute the cohomology groups of the line bundle *O _{C}(1,0)* on

i7 : K = Hom(G , filteredComplex (F ** R^{{1,0}})) ; -- Twist F by a line of ruling and make filtered complex whose ss abuts to HH OO_C(1,0) |

i8 : E = prune spectralSequence K ; --the spectral sequence degenerates on the second page |

i9 : E^1 +-----------------------------------------------+---------------------------------------------+ | 1 | 1 | o9 = |R |R | | | | |{0, 0} |{1, 0} | +-----------------------------------------------+---------------------------------------------+ |cokernel {-11, 0} | a_1^5 a_0^5 0 0 | |cokernel {-8, 3} | a_1^5 a_0^5 0 0 | | | {-1, -10} | 0 0 b_1^5 b_0^5 | | {2, -7} | 0 0 b_1^5 b_0^5 | | | | | |{0, -1} |{1, -1} | +-----------------------------------------------+---------------------------------------------+ |cokernel {-11, -10} | b_1^5 b_0^5 a_1^5 a_0^5 ||cokernel {-8, -7} | b_1^5 b_0^5 a_1^5 a_0^5 || | | | |{0, -2} |{1, -2} | +-----------------------------------------------+---------------------------------------------+ o9 : SpectralSequencePage |

i10 : E^2 ; -- output is a mess |

The cohomology groups we want are obtained as follows.

i11 : basis({0,0}, E^2_{0,0}) -- == HH^0 OO_C(1,0) o11 = {-1, 0} | a_0 a_1 | o11 : Matrix |

i12 : basis({0,0}, E^2_{1,-2}) -- == HH^1 OO_C(1,0) o12 = {-8, -1} | 0 0 | {-8, -1} | 0 0 | {-8, -1} | 0 0 | {-7, -2} | 0 0 | {-7, -2} | 0 0 | {-7, -2} | 0 0 | {-6, -3} | 0 0 | {-6, -3} | 0 0 | {-6, -3} | 0 0 | {-6, -3} | 0 0 | {-5, -4} | 0 0 | {-5, -4} | 0 0 | {-5, -4} | 0 0 | {-4, -5} | 0 0 | {-4, -5} | 0 0 | {-6, -3} | 0 0 | {-6, -3} | 0 0 | {-6, -3} | 0 0 | {-5, -4} | 0 0 | {-5, -4} | 0 0 | {-5, -4} | 0 0 | {-5, -4} | 0 0 | {-4, -5} | 0 0 | {-4, -5} | 0 0 | {-4, -5} | 0 0 | {-4, -5} | 0 0 | {-4, -5} | 0 0 | {-3, -6} | 0 0 | {-3, -6} | 0 0 | {-3, -6} | 0 0 | {-2, -7} | 0 0 | {-2, -7} | 0 0 | {-2, -7} | a_1^2b_0^4b_1^3 a_1^2b_0^3b_1^4 | o12 : Matrix |