H=cohomologyMatrix(M,low,high)
H=cohomologyMatrix(T,low,high)
If M is a bigraded module over a bigraded polynomial ring representing a sheaf F on P^{n_1} x P^{n_2}, the script returns a block of the cohomology table, represented as a table of "cohomology polynomials" in $\mathbb Z[h,k]$ of the form $$\sum_{i=0}^{n} \, dim H^i(\mathcal F(c_1,c_2)) * h^i$$ in each position \{c_1,c_2\} for $a_1 \le c_1 \le b_1$ and $a_2 \le c_2 \le b_2$. In case M corresponds to an object in the derived category D^b(P^{n_1}x P^{n_2}), then hypercohomology polynomials are returned, with the convention that k stands for k=h^{ 1}.
The polynomial for \{b_1,b_2\} sits in the northeast corner, the one corresponding to (a_1,a_2) in the southwest corner.
In the case of a product of more (or fewer) projective spaces, or if a hash table output is desired, use cohomologyHashTable or eulerPolynomialTable instead.
The script computes a sufficient part of the Tate resolution for F, and then calls itself in the version for a Tate resolution. More generally, If T is part of a Tate resolution of F the function returns a matrix of cohomology polynomials corresponding to T.
If T is not a large enough part of the Tate resolution, such as W below, then the function collects only the contribution of T to the cohomology table of the Tate resolution, according to the formula in Corollary 0.2 of Tate Resolutions on Products of Projective Spaces.




As a second example, consider the structure sheaf $\mathcal O_E$ of a nonsingular cubic contained in (point)xP^2. The corresponding graded module is



and the "1+h" in the Northeast (= upper right) corner signifies that that $h^0(\mathcal O_E) = h^1(\mathcal O_E) = 1.$
The object cohomologyMatrix is a method function.