# Cohomology tables in Macaulay2

Last year I created a little online tool to compute sheaf cohomology of twists of the structure sheaf on a complete intersection. It was a fun exercise in implementing power series computations and a result from SGA7 in JavaScript, but it unfortunately only applies to:

- complete intersections
- twists of the structure sheaf

Lately I have been toying a little with Macaulay2, and computations of this sort are very easy in this language, and can be done in far greater generality for arbitrary projective varieties and arbitrary coherent sheaves. As long as you can define the objects you are good to go, because of `cohomologyTable`. As you can use Macaulay2 online you might as well do it this way, instead of using the limited functionality in my implementation.

As an example you can run the following code (the online interface requires you to put your cursor on the first line and then repeatedly click evaluate):

The output for the K3 surface is

Observe the (weird) indexing: for the K3 surface we have $\mathrm{h}^1(X,\mathrm{T}_X)=20$, which sits in position (1,1) and not (1,0) as I would expect. The reason for this can be found in the manual:

This function takes as input a coherent sheaf

`F`

, two integers`l`

and`h`

, and prints the dimension`dim HH^j F(i-j)`

for`h>=i>=l`

.