The Anticanonical Bundle $-K_X$

Source: Question by Chris Dare, answered by Devlin Mallory. The following is only edited for clarify.

What is an efficient way to compute the anticanonical bundle $-K_X$?

I want to compute the anticanonical bundle $H = -K_X$ of a $(2, 3)$-complete intersection in $\PP^5$.

My setup is as follows:

S = QQ[x_0..x_5]
I = ideal(random(2, S), random(3, S))
X = Proj(S/I)

We can check that this is a complete intersection using the TorAlgebra package:

loadPackage "TorAlgebra"
isCI I -- true

After ensuring this is indeed non-singular (see here), this (basically every time) yields a smooth prime Fano threefold of degree 6. In particular, $\operatorname{Pic} X$ should be generated by the anticanonical bundle $H$, so I would like to explicitly compute this $H$ to do some homological computations (e.g. what is $\operatorname{RHom}(\mathcal O, \mathcal O(H))$?). I first compute:

i8 : omega = cotangentSheaf(3, X);
                                         455
o8 : coherent sheaf on X, quotient of OO    (-6)
                                          X

This seems like a pretty huge rank to actually compute things over, so it doesnt come as much a surprise that when i try:

i9 : H = dual omega

My Mac runs for hours without producing any result. Is there a more efficient approach than what I’m doing?

Solution #1

The Divisor package does a great job of this:

loadPackage("Divisor")
KX = canonicalDivisor(S/I, IsGraded => true)
H = sheaf OO(-KX)

You can then compute the various cohomologies you want to.

Solution #2

In your case, you know already from the adjunction formula that the anticanonical bundle will be the hyperplane section, so you can also do the following:

use R/I
H = dual sheaf module ideal(x_0)

(You can use any linear form in place of x_0.)

In general, for a non-complete-intersection, where adjunction doesn’t tell you what the anticanonical is immediately, the Divisor package approach above will work as long as the computation doesn’t time out.