Miscellaneous

CohomologyDimension(S, r, n) : ShfCoh, RngIntElt, RngIntElt -> RngIntElt
Given a sheaf S and integers r and n, this function returns the dimension over the base field of the r-th cohomology group of the n-th Serre twist of S, Hr(X, S(n).

This just calls the equivalent function for the maximal module of S or its defining module, if the maximal module has not yet been computed. Note that, in practice, it may often be much faster to use the maximal module so it may be desirable to call SaturateSheaf before doing any cohomology computations.

DimensionOfGlobalSections(S) : ShfCoh -> RngIntElt
This returns the same dimension as CohomologyDimension(S,0,0) -- the dimension of the space of global sections of S -- but it is computed in a different way that is usually faster. It uses some straightforward linear algebra to compute the dimension of the zero-th graded part of the maximal module of S given as a presentation module.
IntersectionPairing(S, T) : ShfCoh, ShfCoh -> RngIntElt
If S and T are invertible sheaves on a nonsingular surface X, representing divisor classes D and E, this function returns the surface intersection number D.E.

Only minimal checks are made on the validity of the input data. The computation is a standard one using the Hilbert polynomials of S, T and their tensor product.

ZeroSubscheme(S, s) : ShfCoh, ModMPolElt -> Sch
The sheaf S should be a locally free sheaf on a scheme X (local freeness is not checked). The element s should be a homogeneous element of the defining, maximal or global section modules of S. Then s represents a global section of the twisted sheaf S(d) if s is homogeneous of degree d. The intrinsic returns the vanishing subscheme of s: the largest subscheme of X on which s restricts to a zero section. If S is invertible of the form (L)(D), for example, s represents an effective divisor Ds in the linear system |D + dH| (if it is non-zero) and the vanishing subscheme is Ds as a subscheme of X. Locally, for a Zariski-open set U over which there is an isomorphism S(d)U isomorphic to OXnU, s|U corresponds to an n-tuple of functions (f1, ..., fn) on U and the vanishing subscheme restricted to U is the closed subscheme of U defined by the ideal < f1, ..., fn >.
V2.28, 13 July 2023