Cohomology Classes

Constructors

General constructors

Cohomology classes are elements of the cohomology ring, which is a quotient ring for normal toric varieties that are simplicial and complete. All of the following methods accept an optional argument completeness_check (default: true).

By default, completeness is checked to ensure mathematical correctness. However, these checks can be computationally expensive—especially for large toric varieties, where operations in the quotient ring (such as Gröbner basis computations) are already costly. To speed up computations, you may disable this step by passing completeness_check = false.

Caveat: Disabling the completeness check skips verification that the underlying toric variety is complete. Use this option only if completeness is already known or guaranteed, and faster computations are preferred.

cohomology_classMethod
cohomology_class(v::NormalToricVarietyType, p::MPolyQuoRingElem)

Construct the toric cohomology class on the toric variety v corresponding to the polynomial p. The polynomial p must lie in the cohomology ring of v.

Simplicial and complete toric varieties

This function assumes that the toric variety is both simplicial and complete. Since completeness checks can be slow, you may skip them by passing the optional keyword argument completeness_check = false.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
Normal toric variety

julia> c = cohomology_class(P2, gens(cohomology_ring(P2))[1])
Cohomology class on a normal toric variety given by x1
source
cohomology_classMethod
cohomology_class(d::ToricDivisor)

Construct the toric cohomology class corresponding to the toric divisor d.

Simplicial and complete toric varieties

This function assumes that the underlying toric variety is both simplicial and complete. Since completeness checks can be slow, you may skip them by passing the optional keyword argument completeness_check = false.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(P2, [1, 2, 3])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3
source
cohomology_classMethod
cohomology_class(d::ToricDivisorClass)

Construct the toric cohomology class corresponding to the toric divisor class c.

Simplicial and complete toric varieties

This function assumes that the underlying toric variety is both simplicial and complete. Since completeness checks can be slow, you may skip them by passing the optional keyword argument completeness_check = false.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
Normal toric variety

julia> tdc = toric_divisor_class(P2, [2])
Divisor class on a normal toric variety

julia> cohomology_class(tdc)
Cohomology class on a normal toric variety given by 2*x1
source
cohomology_classMethod
cohomology_class(l::ToricLineBundle)

Construct the toric cohomology class corresponding to the toric line bundle l.

Simplicial and complete toric varieties

This function assumes that the underlying toric variety is both simplicial and complete. Since completeness checks can be slow, you may skip them by passing the optional keyword argument completeness_check = false.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
Normal toric variety

julia> l = toric_line_bundle(P2, [2])
Toric line bundle on a normal toric variety

julia> polynomial(cohomology_class(l))
2*x1
source

Addition, subtraction and scalar multiplication

Cohomology classes can be added and subtracted via the usual + and - operators. Moreover, multiplication by scalars from the left is supported for scalars which are integers or of type ZZRingElem or QQFieldElem.

Wedge product

The wedge product of cohomology classes is implemented via *, using internally the multiplication of the corresponding polynomial (equivalence classes) in the Cox ring.

A cohomology class can be wedged n-times with itself via ^n, where n can be an integer or of type ZZRingElem.

Properties

One can check if a cohomology class is trivial via is_trivial.

Equality of cohomology classes can be tested via ==.

Attributes

toric_varietyMethod
toric_variety(c::CohomologyClass)

Return the normal toric variety of the cohomology class c.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> toric_variety(cc)
Normal, simplicial, complete toric variety
source
simplify!Method
simplify!(c::CohomologyClass)

Simplify the defining polynomial of the cohomology class c.

Since the polynomial resides in a quotient ring, simplification can be computationally expensive. Use this method with care.

Note that polynomial(c::CohomologyClass) does not call simplify!; it simply returns the currently stored representation.

In contrast, for convenience, coefficients(c::CohomologyClass) and exponents(c::CohomologyClass) automatically simplify and then return the coefficients or exponents of the simplified polynomial.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> polynomial(cc)
x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> simplify!(cc);

julia> polynomial(cc)
6*x3 + e1 + 7*e2
source
coefficientsMethod
coefficients(c::CohomologyClass)

Return the coefficients of the cohomology class c.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> simplify!(cc)
6*x3 + e1 + 7*e2

julia> coefficients(cc)
3-element Vector{QQFieldElem}:
 6
 1
 7
source
exponentsMethod
exponents(c::CohomologyClass)

Return the exponents of the cohomology class c.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> simplify!(cc)
6*x3 + e1 + 7*e2

julia> exponents(cc)
3-element Vector{Vector{Int64}}:
 [0, 0, 1, 0, 0]
 [0, 0, 0, 1, 0]
 [0, 0, 0, 0, 1]
source
polynomialMethod
polynomial(c::CohomologyClass)

Return the polynomial in the cohomology ring of the normal toric variety toric_variety(c) which corresponds to c.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> simplify!(cc)
6*x3 + e1 + 7*e2

julia> polynomial(cc)
6*x3 + e1 + 7*e2
source
polynomialMethod
polynomial(c::CohomologyClass, ring::MPolyQuoRing)

Return the polynomial in ring corresponding to the cohomology class c.

Examples

julia> dP2 = del_pezzo_surface(NormalToricVariety, 2)
Normal toric variety

julia> d = toric_divisor(dP2, [1, 2, 3, 4, 5])
Torus-invariant, non-prime divisor on a normal toric variety

julia> cc = cohomology_class(d)
Cohomology class on a normal toric variety given by x1 + 2*x2 + 3*x3 + 4*e1 + 5*e2

julia> simplify!(cc)
6*x3 + e1 + 7*e2

julia> R, _ = polynomial_ring(QQ, 5)
(Multivariate polynomial ring in 5 variables over QQ, QQMPolyRingElem[x1, x2, x3, x4, x5])

julia> (x1, x2, x3, x4, x5) = gens(R)
5-element Vector{QQMPolyRingElem}:
 x1
 x2
 x3
 x4
 x5

julia> sr_and_linear_relation_ideal = ideal([x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5])
Ideal generated by
  x1*x3
  x1*x5
  x2*x4
  x2*x5
  x3*x4
  x1 + x2 - x5
  x2 + x3 - x4 - x5

julia> R_quo = quo(R, sr_and_linear_relation_ideal)[1]
Quotient
  of multivariate polynomial ring in 5 variables x1, x2, x3, x4, x5
    over rational field
  by ideal (x1*x3, x1*x5, x2*x4, x2*x5, x3*x4, x1 + x2 - x5, x2 + x3 - x4 - x5)

julia> polynomial(R_quo, cc)
6*x3 + x4 + 7*x5
source

Methods

integrateMethod
integrate(c::CohomologyClass)

Integrate the cohomology class c over the normal toric variety toric_variety(c).

Simplicial and complete toric varieties

This function assumes that the underlying toric variety is both simplicial and complete. Completeness checks may be slow; to skip them, use the optional keyword argument completeness_check = false.

Examples

julia> dP3 = del_pezzo_surface(NormalToricVariety, 3)
Normal toric variety

julia> (x1, x2, x3, e1, e2, e3) = gens(cohomology_ring(dP3))
6-element Vector{MPolyQuoRingElem{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}}:
 x1
 x2
 x3
 e1
 e2
 e3

julia> c = cohomology_class(dP3, e3*e3 + e3)
Cohomology class on a normal toric variety given by e3^2 + e3

julia> integrate(c)
-1

julia> F3 = hirzebruch_surface(NormalToricVariety, 3)
Normal toric variety

julia> (x1, x2, x3, x4) = gens(cohomology_ring(F3))
4-element Vector{MPolyQuoRingElem{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}}:
 t1
 x1
 t2
 x2

julia> c = cohomology_class(F3, x1*x2 + x3*x4)
Cohomology class on a normal toric variety given by 2//3*x2^2

julia> integrate(c)
2

The following example constructs the Fano variety 2-36 (cf. https://www.fanography.info/2-36) and verifies that the triple self-intersection number of its anticanonical bundle is 62.

Examples

julia> e1 = [1,0,0];

julia> e2 = [0,1,0];

julia> e3 = [0,0,1];

julia> m = 2;

julia> ray_generators = [e1, -e1, e2, e3, - e2 - e3 - m * e1];

julia> max_cones = incidence_matrix([[1,3,4], [1,3,5], [1,4,5], [2,3,4], [2,3,5], [2,4,5]]);

julia> X = normal_toric_variety(max_cones, ray_generators; non_redundant = true)
Normal toric variety

julia> cox_ring(X)
Multivariate polynomial ring in 5 variables over QQ graded by
  x1 -> [1 0]
  x2 -> [1 2]
  x3 -> [0 -1]
  x4 -> [0 -1]
  x5 -> [0 -1]

julia> cohomology_ring(X)
Quotient
  of multivariate polynomial ring in 5 variables over QQ graded by
    x1 -> [1]
    x2 -> [1]
    x3 -> [1]
    x4 -> [1]
    x5 -> [1]
  by ideal (x1 - x2 - 2*x5, x3 - x5, x4 - x5, x1*x2, x3*x4*x5)

julia> integrate(cohomology_class(anticanonical_divisor(X))^3)
62

julia> integrate(cohomology_class(anticanonical_divisor_class(X))^3)
62
source

Special attributes of toric varieties

cohomology_ringMethod
cohomology_ring(v::NormalToricVarietyType)
Simplicial and complete toric varieties

This function assumes that the toric variety is both simplicial and complete. Completeness checks may be slow; to skip them, use the optional keyword argument completeness_check = false.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> ngens(cohomology_ring(p2))
3
source
volume_formMethod
volume_form(v::NormalToricVariety)

Construct the volume form of the normal toric toric variety v.

Examples

julia> polynomial(volume_form(projective_space(NormalToricVariety, 2)))
x3^2

julia> polynomial(volume_form(del_pezzo_surface(NormalToricVariety, 3)))
-e3^2

julia> polynomial(volume_form(hirzebruch_surface(NormalToricVariety, 5)))
1//5*x2^2
source
intersection_formMethod
intersection_form(v::NormalToricVariety)

Compute the intersection numbers among the cohomology classes associated to the torusinvariant prime divisors of the normal toric toric variety v.

Examples

julia> F3 = hirzebruch_surface(NormalToricVariety, 3)
Normal toric variety

julia> length(intersection_form(F3))
10
source
chern_classMethod
chern_class(v::NormalToricVariety)

Compute the k-th Chern class of the tangent bundle of a normal toric variety. The algorithm is based on Proposition 13.1.2 in [CLS11].

Smooth and complete toric varieties

This function assumes that the toric variety is both smooth and complete. Completeness checks may be slow; to skip them, use the optional keyword argument completeness_check = false.

Examples

julia> F3 = hirzebruch_surface(NormalToricVariety, 3)
Normal toric variety

julia> chern_class(F3, 0)
Cohomology class on a normal toric variety given by 1

julia> chern_class(F3, 1, completeness_check = false)
Cohomology class on a normal toric variety given by t1 + x1 + t2 + x2

julia> integrate(chern_class(F3, 2), completeness_check = false)
4
source
chern_classesMethod
chern_classes(v::NormalToricVariety)

Compute all Chern classes of the tangent bundle of a normal toric variety. The algorithm is based on Proposition 13.1.2 in [CLS11].

Smooth and complete toric varieties

This function assumes that the toric variety is both smooth and complete. Completeness checks may be slow; to skip them, use the optional keyword argument completeness_check = false.

Examples

julia> F3 = hirzebruch_surface(NormalToricVariety, 3)
Normal toric variety

julia> cs = chern_classes(F3);

julia> cs[0]
Cohomology class on a normal toric variety given by 1

julia> cs[1]
Cohomology class on a normal toric variety given by t1 + x1 + t2 + x2

julia> integrate(cs[2])
4
source
basis_of_h4Method
basis_of_h4(v::NormalToricVariety)

Compute a monomial basis of the cohomology group $H^4(X, \mathbb{Q})$. The algorithm, based on Theorem 12.4.1 in [CLS11], truncates the cohomology ring to degree 2.

Simplicial and complete toric varieties

This function assumes that the toric variety is both simplicial and complete. Completeness checks may be slow; to skip them, use the optional keyword argument completeness_check = false.

Examples

julia> Y1 = hirzebruch_surface(NormalToricVariety, 2)
Normal toric variety

julia> Y2 = hirzebruch_surface(NormalToricVariety, 2)
Normal toric variety

julia> Y = Y1 * Y2
Normal toric variety

julia> h4_basis = basis_of_h4(Y)
6-element Vector{CohomologyClass}:
 Cohomology class on a normal toric variety given by yx2^2
 Cohomology class on a normal toric variety given by xx2*yx2
 Cohomology class on a normal toric variety given by xx2*yt2
 Cohomology class on a normal toric variety given by xx2^2
 Cohomology class on a normal toric variety given by xt2*yx2
 Cohomology class on a normal toric variety given by xt2*yt2

julia> betti_number(Y, 4) == length(h4_basis)
true
source