Equality == of normal toric varieties checks equality of the corresponding polyhedral fans as sets of cones. This computes the rays of both of the toric varieties, which can be expensive if they are not already computed, meaning if "RAYS" in Polymake.list_properties(Oscar.pm_object(polyhedral_fan(X))) is false for one of the varieties. Triple-equality === always checks equality of memory locations in OSCAR.
For internal design, we make a strict distinction between normal toric varieties and affine toric varieties. Given an affine, normal toric variety v, this method turns it into an affine toric variety.
Examples
julia> v = normal_toric_variety(positive_hull([10; 01]))
Normal toric variety
julia> affineVariety = affine_normal_toric_variety(v)
Normal toric variety
Construct a normal toric variety X by providing the rays and maximal cones as vector of vectors. By default, this method allows redundancies in the input, e.g. duplicate rays and non-maximal cones. If the user is certain that no redundancy exists in the entered information, one can pass non_redundant = true as third argument. This will bypass these consistency checks. In addition, this will ensure that the order of the rays is not altered by the constructor.
The constructors of del_pezzo_surface, hirzebruch_surface, projective_space and weighted_projective_spacealways make a default/standard choice for the grading of the Cox ring.
It is possible to associate toric varieties to star triangulations of the lattice points of polyhedrons. Specifically, we can associate to any full star triangulation of the lattice points of the polyhedron in question a toric variety. For this task, we provide the following constructors.
Return a toric variety that was obtained from a fine regular star triangulation of the lattice points of the polyhedron P. This is particularly useful when the lattice points of the polyhedron in question admit many triangulations.
Examples
julia> P = convex_hull([000; 001; 101; 111; 011])
Polyhedron in ambient dimension 3
julia> v = normal_toric_variety_from_star_triangulation(P)
Normal toric variety
Return the list of toric varieties obtained from fine regular star triangulations of the polyhedron P. With this we can compute the two phases of the famous conifold transition.
Examples
julia> P = convex_hull([000; 001; 101; 111; 011])
Polyhedron in ambient dimension 3
julia> (v1, v2) = normal_toric_varieties_from_star_triangulations(P)
2-element Vector{NormalToricVariety}:
Normal toric variety
Normal toric variety
julia> stanley_reisner_ideal(v1)
Ideal generated by
x1*x4
julia> stanley_reisner_ideal(v2)
Ideal generated by
x2*x3
An application of this functionality exists in the physics. Witten's Generalized-Sigma models (GLSM) [Wit88] originally sparked interest in the physics community in toric varieties. On a mathematical level, this establishes a construction of toric varieties for which a Z^n grading of the Cox ring is provided. See for example [FJR17], which describes this as GIT construction [CLS11].
Explicitly, given the grading of the Cox ring, the map from the group of torus invariant Weil divisors to the class group is known. Under the assumption that the variety in question has no torus factor, we can then identify the map from the lattice to the group of torus invariant Weil divisors as the kernel of the map from the torus invariant Weil divisor to the class group. The latter is a map between free Abelian groups, i.e. is provided by an integer valued matrix. The rows of this matrix are nothing but the ray generators of the fan of the toric variety. It then remains to triangulate these rays, hence in general for a GLSM the toric variety is only unique up to fine regular star triangulations. We provide the following two constructors:
Return the Cartesian/direct product of two normal toric varieties v and w.
By default, we prepend an "x" to all homogeneous coordinate names of the first factor v and a "y" to all homogeneous coordinate names of the second factor w. This default can be overwritten by invoking set_coordinate_names after creating the variety (cf. set_coordinate_names(v::NormalToricVarietyType, coordinate_names::Vector{String})).
Important: Recall that the coordinate names can only be changed as long as the toric variety in question is not finalized (cf. is_finalized(v::NormalToricVarietyType)).
Crucially, the order of the homogeneous coordinates is not shuffled. To be more specific, assume that v has n1 and w has n2 homogeneous coordinates. Then v * w has n1+n2 homogeneous coordinates. The first n1 of these coordinates are those of v and appear in the very same order as they do for v. The remaining n2 homogeneous coordinates are those of w and appear in the very same order as they do for w.
Examples
julia> P2 = projective_space(NormalToricVariety, 2)
Normal toric variety
julia> v1 = P2 * P2
Normal toric variety
julia> cox_ring(v1)
Multivariate polynomial ring in 6 variables over QQ graded by
xx1 -> [1 0]
xx2 -> [1 0]
xx3 -> [1 0]
yx1 -> [0 1]
yx2 -> [0 1]
yx3 -> [0 1]
julia> v2 = P2 * P2
Normal toric variety
julia> set_coordinate_names(v2, ["x1", "x2", "x3", "y1", "y2", "y3"])
julia> cox_ring(v2)
Multivariate polynomial ring in 6 variables over QQ graded by
x1 -> [1 0]
x2 -> [1 0]
x3 -> [1 0]
y1 -> [0 1]
y2 -> [0 1]
y3 -> [0 1]
Return the embedding of the group of Cartier divisors into the group of torus-invariant Weil divisors of an abstract normal toric variety v.
Examples
julia> p2 = projective_space(NormalToricVariety, 2)
Normal toric variety
julia> map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(p2)
Map
from Z^3
to Z^3
Return the map from the Cartier divisors to the Picard group of an abstract normal toric variety v.
Examples
julia> p2 = projective_space(NormalToricVariety, 2)
Normal toric variety
julia> map_from_torusinvariant_cartier_divisor_group_to_picard_group(p2)
Map
from Z^3
to Z
Return the list of all torus invariant prime divisors in a normal toric variety v.
Examples
julia> p2 = projective_space(NormalToricVariety, 2);
julia> torusinvariant_prime_divisors(p2)
3-element Vector{ToricDivisor}:
Torus-invariant, prime divisor on a normal toric variety
Torus-invariant, prime divisor on a normal toric variety
Torus-invariant, prime divisor on a normal toric variety
Return the Gorenstein index of a Q-Gorenstein normal toric variety v. This is the smallest positive integer l such that −lK is Cartier, where K is a canonical divisor on v. See exercise 8.3.10 and 8.3.11 in [CLS11] for more details.
Return the index of the Picard group in the class group of a simplicial normal toric variety v. Here, the Picard group embeds as the group of Cartier divisor classes into the class group via map_from_picard_group_to_class_group. See [HHS11] for more details.
Compute the i-th Betti number of the normal toric variety v. Specifically, this method returns the dimension of the i-th simplicial homology group (with rational coefficients) of v. The employed algorithm is derived from theorem 12.3.12 in [CLS11]. Note that this theorem requires that the normal toric variety v is both complete and simplicial.
We support the following rings and ideals for toric varieties:
Cox ring (also termed the "total coordinate ring" in [CLS11]),
coordinate ring of torus,
cohomology_ring,
Chow ring,
irrelevant ideal,
Stanley-Reisner ideal,
ideal of linear relations,
toric ideal.
Of course, for any of these coordinate names and the coefficient ring have to be chosen. The coefficient ring is fixed to Q. Therefore, the method coefficient_ring(v::NormalToricVarietyType) always return the field of rational numbers. For the coordinate names, we provide the following setter functions:
Allows to set the names of the homogeneous coordinates as long as the toric variety in question is not yet finalized (cf. is_finalized(v::NormalToricVarietyType)).
In order to efficiently construct algebraic cycles (elements of the Cox ring), cohomology classes (elements of the cohomology ring), or in order to compare ideals, it is imperative to fix choices of the coordinate names. The default value for coordinate names is [x1, x2, ... ]. The choice of coordinate names is fixed, once one of the above-mentioned rings is computed via one the following methods:
Compute the Cox ring of the normal toric variety v. Note that [CLS11] refers to this ring as the "total coordinate ring". For uniformity with schemes, we also support the function coordinate_ring to refer to the Cox ring.
Examples
julia> p2 = projective_space(NormalToricVariety, 2);
julia> set_coordinate_names(p2, ["y1", "y2", "y3"])
julia> cox_ring(p2)
Multivariate polynomial ring in 3 variables over QQ graded by
y1 -> [1]
y2 -> [1]
y3 -> [1]
julia> cox_ring(p2) == coordinate_ring(p2)
true
Return the toric ideal defining the affine normal toric variety.
Examples
Take the cone over the square at height one. The resulting toric variety has one defining equation. In projective space this corresponds to P1×P1. Note that this cone is self-dual, the toric ideal comes from the dual cone.
julia> C = positive_hull([100; 110; 101; 111])
Polyhedral cone in ambient dimension 3
julia> antv = affine_normal_toric_variety(C)
Normal toric variety
julia> toric_ideal(antv)
Ideal generated by
-x1*x2 + x3*x4
Check if the Cox ring, the coordinate ring of the torus, the cohomology_ring, the Chow ring, the Stanley-Reisner ideal, the irrelevant ideal, the ideal of linear relations or the toric ideal has been cached. If any of these has been cached, then this function returns true and otherwise false.
After the variety finalized, one can enforce to obtain the above ideals in different rings. Also, one can opt to compute the above rings with a different choice of coordinate names and different coefficient ring. To this end, one provides a custom ring (which reflects the desired choice of coordinate names and coefficient ring) as first argument. However, note that the cached ideals and rings are not altered.
Compute the Cox ring of the normal toric variety v, in this case by adding the Cox grading to the given ring R. Note that [CLS11] refers to this ring as the "total coordinate ring".
Examples
julia> p2 = projective_space(NormalToricVariety, 2);
julia> R, _ = polynomial_ring(QQ, 3);
julia> cox_ring(R, p2)
Multivariate polynomial ring in 3 variables over QQ graded by
x1 -> [1]
x2 -> [1]
x3 -> [1]
Return the toric ideal defining the affine normal toric variety as an ideal in R.
Examples
Take the cone over the square at height one. The resulting toric variety has one defining equation. In projective space this corresponds to P1×P1. Note that this cone is self-dual, the toric ideal comes from the dual cone.
julia> C = positive_hull([100; 110; 101; 111])
Polyhedral cone in ambient dimension 3
julia> antv = affine_normal_toric_variety(C)
Normal toric variety
julia> R, _ = polynomial_ring(QQ, 4);
julia> toric_ideal(R, antv)
Ideal generated by
-x1*x2 + x3*x4
This function converts the rows of a matrix to binomials. Each row r is written as r=u−v with u,v≥0 by splitting into positive and negative entries. Then the row r corresponds to xu−xv. The resulting ideal is returned.
Return the toric ideal generated from the linear relations between the points pts. This is the ideal generated by the set of binomials {xu−xv∣u,v∈Z≥0n(pts)T⋅(u−v)=0}
Examples
julia> C = positive_hull([-25; 10]);
julia> H = hilbert_basis(C);
julia> toric_ideal(H)
Ideal generated by
x2*x3 - x4^2
-x1*x3 + x2^2*x4
-x1*x4 + x2^3
-x1*x3^2 + x2*x4^3
-x1*x3^3 + x4^5