# cohomCalg -- compute cohomology vectors using the CohomCalg software

## Synopsis

• Usage:
cvecs = cohomCalg(X, L)
cvecs = cohomCalg D
• Inputs:
• X, ,
• L, a list, of toric divisors, or degrees, or a single degree, or a toric divisor
• D, , a single toric divisor
• Optional inputs:
• Silent (missing documentation) => , default value null, but if null, then the default value from the configuration file is overridden by this value. If true, then all output from CohomCalg is suppressed.
• Outputs:
• cvecs, a list, The list of cohomology vectors of the toric divisors in L (or a single list, if the input was a single degree or toric divisor)
• Consequences:
• The answers are stashed into the mutable hashtable X.cache#CohomCalg, and are not recomputed if possible.

## Description

Given a toric divisor D, or its degree d, its cohomology vector is the list $\{h^0(X, OO_X(d)), h^1(X, OO_X(d)), \ldots, h^{dim X}(X, OO_X(d)) \}$.

Here is an example.

 i1 : needsPackage "ReflexivePolytopesDB" o1 = ReflexivePolytopesDB o1 : Package i2 : topes = kreuzerSkarke(5, Limit => 20); using offline data file: ks5-n50.txt i3 : A = matrix topes_15 o3 = | 1 1 0 1 -1 -2 1 | | 0 2 0 0 -4 0 6 | | 0 0 1 0 2 -1 -4 | | 0 0 0 2 -2 0 0 | 4 7 o3 : Matrix ZZ <--- ZZ i4 : P = convexHull A o4 = P o4 : Polyhedron i5 : X = normalToricVariety P o5 = X o5 : NormalToricVariety i6 : D = 3 * X_0 - 5 * X_4 o6 = 3*X - 5*X 0 4 o6 : ToricDivisor on X i7 : cohomCalg(D, Silent => true) o7 = {0, 0, 0, 194, 0} o7 : List

We compare this to the results from NormalToricVarieties.

 i8 : cohomCalg(X, D) o8 = {0, 0, 0, 194, 0} o8 : List i9 : for i from 0 to dim X list rank HH^i(X, OO D) o9 = {0, 0, 0, 194, 0} o9 : List i10 : peek cohomCalg X o10 = MutableHashTable{{-22, 3, 17} => {{0, 0, 0, 194, 0}, {{3, ----------------------------------------------------------------------- 1x1*x2*x4*x5}, {3, 1x1*x2*x3*x4*x5}, {3, 1x1*x2*x4*x5*x6}}}}