# Line bundle cohomology with cohomCalg

We employ the cohomCalg algorithm [BJRR10*1] 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 [BJRR10], [BJRR10*1] (see also [RR10], [Jow11] and [BJRR12]).

**Examples**

```
julia> dP3 = del_pezzo_surface(NormalToricVariety, 3)
Normal toric variety
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 [BJRR10], [BJRR10*1] (see also [RR10], [Jow11] and [BJRR12]).

**Examples**

```
julia> dP3 = del_pezzo_surface(NormalToricVariety, 3)
Normal toric variety
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 [BJRR10*1], 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 [Bie18]. 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 toric variety
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 indices [0]
Toric vanishing set for cohomology indices [1]
Toric vanishing set for cohomology indices [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 toric variety
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology indices [0]
Toric vanishing set for cohomology indices [1]
Toric vanishing set for cohomology indices [2]
julia> toric_variety(vs[3])
Normal, 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 toric variety
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology indices [0]
Toric vanishing set for cohomology indices [1]
Toric vanishing set for cohomology indices [2]
julia> polyhedra(vs[3])
1-element Vector{Polyhedron{QQFieldElem}}:
Polyhedron in ambient dimension 2
```

`cohomology_indices`

— Method`cohomology_indices(tvs::ToricVanishingSet)`

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

.

**Examples**

```
julia> dP1 = del_pezzo_surface(NormalToricVariety, 1)
Normal toric variety
julia> vs = vanishing_sets(dP1)
3-element Vector{ToricVanishingSet}:
Toric vanishing set for cohomology indices [0]
Toric vanishing set for cohomology indices [1]
Toric vanishing set for cohomology indices [2]
julia> cohomology_indices(vs[3])
1-element Vector{Int64}:
2
```