# Line bundle cohomology with cohomCalg

We employ the cohomCalg algorithm Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010) to compute the dimension of line bundle cohomologies as well as vanishing sets.

## Dimensions of line bundle cohomology

`all_cohomologies`

— Method`all_cohomologies(l::ToricLineBundle)`

Computes the dimension of all sheaf cohomologies of the toric line bundle `l`

by use of the cohomCalg algorithm Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010), Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010) (see also Helmut Roschy, Thorsten Rahn (2010), Shin-Yao Jow (2011) and Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2012)).

**Examples**

```
julia> dP3 = del_pezzo_surface(NormalToricVariety, 3)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> all_cohomologies(toric_line_bundle(dP3, [1, 2, 3, 4]))
3-element Vector{ZZRingElem}:
0
16
0
```

`cohomology`

— Method`cohomology(l::ToricLineBundle, i::Int)`

Computes the dimension of the i-th sheaf cohomology of the toric line bundle `l`

by use of the cohomCalg algorithm Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010), Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010) (see also Helmut Roschy, Thorsten Rahn (2010), Shin-Yao Jow (2011) and Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2012)).

**Examples**

```
julia> dP3 = del_pezzo_surface(NormalToricVariety, 3)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> cohomology(toric_line_bundle(dP3, [4, 1, 1, 1]), 0)
12
```

## Toric vanishing sets

Vanishing sets describe subsets of the Picard group of toric varieties. Their computations is based on Ralph Blumenhagen, Benjamin Jurke, Thorsten Rahn, Helmut Roschy (2010), i.e. this functionality is only available if the toric variety in question is either smooth and complete or alternatively, simplicial and projective. This approach to identify vanishing sets on toric varieties was originally introduced in Martin Bies (2018). As described there, on a technical level, a vanishing set is the complement of a finite family of polyhedra.

For a toric variety, all vanishing sets are computed as follows:

`vanishing_sets`

— Method`vanishing_sets(variety::NormalToricVarietyType)`

Compute the vanishing sets of an abstract toric variety `v`

by use of the cohomCalg algorithm.

The return value is a vector of vanishing sets. This vector has length one larger than the dimension of the variety in question. The first vanishing set in this vector describes all line bundles for which the zero-th sheaf cohomology vanishes. More generally, if a line bundle is contained in the `n`

-th vanishing set, then its `n-1`

-th sheaf cohomology vanishes. The following method checks if a line bundle is contained in a vanishing set:

`contains`

— Method`contains(tvs::ToricVanishingSet, l::ToricLineBundle)`

Checks if the toric line bundle `l`

is contained in the toric vanishing set `tvs`

.

**Examples**

```
julia> dP1 = del_pezzo_surface(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> l = toric_line_bundle(dP1, [3, 2])
Toric line bundle on a normal toric variety
julia> all_cohomologies(l)
3-element Vector{ZZRingElem}:
7
0
0
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology index 0
Toric vanishing set for cohomology index 1
Toric vanishing set for cohomology index 2
julia> contains(vs[1], l)
false
julia> contains(vs[2], l)
true
julia> contains(vs[3], l)
true
```

A vanishing set can in principle cover the entire Picard group. This can be checked with `isfull`

. This methods returns `true`

if the vanishing set is the entire Picard group and `false`

otherwise. Beyond this, we support the following attributes for vanishing sets:

`toric_variety`

— Method`toric_variety(tvs::ToricVanishingSet)`

Return the toric variety of the vanishing set `tvs`

.

**Examples**

```
julia> dP1 = del_pezzo_surface(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology index 0
Toric vanishing set for cohomology index 1
Toric vanishing set for cohomology index 2
julia> toric_variety(vs[3])
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
```

`polyhedra`

— Method`polyhedra(tvs::ToricVanishingSet)`

Return the vector of the polyhedra whose complement defines the vanishing set `tvs`

.

**Examples**

```
julia> dP1 = del_pezzo_surface(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology index 0
Toric vanishing set for cohomology index 1
Toric vanishing set for cohomology index 2
julia> polyhedra(vs[3])
1-element Vector{Polyhedron{QQFieldElem}}:
Polyhedron in ambient dimension 2
```

`cohomology_index`

— Method`cohomology_index(tvs::ToricVanishingSet)`

Return the cohomology index of the toric vanishing set `tvs`

.

**Examples**

```
julia> dP1 = del_pezzo_surface(NormalToricVariety, 1)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology index 0
Toric vanishing set for cohomology index 1
Toric vanishing set for cohomology index 2
julia> cohomology_index(vs[3])
2
```