# Normal Toric Varieties

## Introduction

We introduce two main types of normal toric varieties, distinguishing between the affine and non-affine case:

Warning

The lattice is always assumed to be the standard lattice $\mathbb{Z}^n$. Transformations for non-standard lattices will have to be done by the user.

## Constructors

### Affine Toric Varieties

AffineNormalToricVarietyMethod
AffineNormalToricVariety(C::Cone)

Construct the affine normal toric variety $U_{C}$ corresponding to a polyhedral cone C.

Examples

Set C to be the positive orthant in two dimensions.

julia> C = positive_hull([1 0; 0 1])
A polyhedral cone in ambient dimension 2

julia> antv = AffineNormalToricVariety(C)
A normal, affine toric variety
source
NormalToricVarietyMethod
NormalToricVariety(C::Cone)

Construct the (affine) normal toric variety $X_{\Sigma}$ corresponding to a polyhedral fan $\Sigma = C$ consisting only of the cone C.

Examples

Set C to be the positive orthant in two dimensions.

julia> C = positive_hull([1 0; 0 1])
A polyhedral cone in ambient dimension 2

julia> ntv = NormalToricVariety(C)
A normal, affine toric variety
source
AffineNormalToricVarietyMethod
AffineNormalToricVariety(v::NormalToricVariety)

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 = NormalToricVariety(positive_hull([1 0; 0 1]))
A normal, affine toric variety

julia> affineVariety = AffineNormalToricVariety(v)
A normal, affine toric variety
source

### Normal Toric Varieties

NormalToricVarietyMethod
NormalToricVariety(rays::Vector{Vector{Int64}}, max_cones::Vector{Vector{Int64}})

Construct a normal toric variety $X$ by providing the rays and maximal cones as vector of vectors. By default, this method assumes that the input is not non-redundant (e.g. that a ray was entered twice by accident). 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.

Examples

julia> ray_generators = [[1,0], [0, 1], [-1, 5], [0, -1]]
4-element Vector{Vector{Int64}}:
[1, 0]
[0, 1]
[-1, 5]
[0, -1]

julia> max_cones = [[1, 2], [2, 3], [3, 4], [4, 1]]
4-element Vector{Vector{Int64}}:
[1, 2]
[2, 3]
[3, 4]
[4, 1]

julia> NormalToricVariety(ray_generators, max_cones)
A normal toric variety

julia> NormalToricVariety(ray_generators, max_cones, non_redundant = true)
A normal toric variety
source
NormalToricVarietyMethod
NormalToricVariety(PF::PolyhedralFan)

Construct the normal toric variety $X_{PF}$ corresponding to a polyhedral fan PF.

Examples

Take PF to be the normal fan of the square.

julia> square = cube(2)
A polyhedron in ambient dimension 2

julia> nf = normal_fan(square)
A polyhedral fan in ambient dimension 2

julia> ntv = NormalToricVariety(nf)
A normal toric variety
source
NormalToricVarietyMethod
NormalToricVariety(P::Polyhedron)

Construct the normal toric variety $X_{\Sigma_P}$ corresponding to the normal fan $\Sigma_P$ of the given polyhedron P.

Note that this only coincides with the projective variety associated to P from the affine relations of the lattice points in P, if P is very ample.

Examples

Set P to be a square.

julia> square = cube(2)
A polyhedron in ambient dimension 2

julia> ntv = NormalToricVariety(square)
A normal toric variety
source

### Famous Toric Vareties

affine_spaceMethod
affine_space(::Type{NormalToricVariety}, d::Int)

Constructs the (toric) affine space of dimension d.

Examples

julia> affine_space(NormalToricVariety, 2)
A normal, affine, 2-dimensional toric variety
source
del_pezzo_surfaceMethod
del_pezzo_surface(b::Int)

Constructs the del Pezzo surface with b blowups for b at most 3.

Examples

julia> del_pezzo_surface(3)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
source
hirzebruch_surfaceMethod
hirzebruch_surface(r::Int)

Constructs the r-th Hirzebruch surface.

Examples

julia> hirzebruch_surface(5)
A normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
source
projective_spaceMethod
projective_space(::Type{NormalToricVariety}, d::Int)

Construct the projective space of dimension d.

Examples

julia> projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
source
weighted_projective_spaceMethod
weighted_projective_space(::Type{NormalToricVariety}, w::Vector{T}) where {T <: IntegerUnion}

Construct the weighted projective space corresponding to the weights w.

Examples

julia> weighted_projective_space(NormalToricVariety, [2,3,1])
A normal, non-affine, simplicial, projective, 2-dimensional toric variety without torusfactor
source

### Further Constructions

blowup_on_ith_minimal_torus_orbitMethod
blowup_on_ith_minimal_torus_orbit(v::AbstractNormalToricVariety, n::Int, coordinate_name::String)

Return the blowup of the normal toric variety v on its i-th minimal torus orbit.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> bP2 = blowup_on_ith_minimal_torus_orbit(P2, 1, "e")
A normal toric variety

julia> cox_ring(bP2)
Multivariate Polynomial Ring in x2, x3, x1, e over Rational Field graded by
x2 -> [1 0]
x3 -> [0 1]
x1 -> [1 0]
e -> [-1 1]
source
*Method
Base.:*(v::AbstractNormalToricVariety, w::AbstractNormalToricVariety)

Return the Cartesian/direct product of two normal toric varieties v and w.

Examples

julia> P2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> P2 * P2
A normal toric variety
source
NormalToricVarietiesFromStarTriangulationsMethod
NormalToricVarietiesFromStarTriangulations(P::Polyhedron)

Returns 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([0 0 0; 0 0 1; 1 0 1; 1 1 1; 0 1 1])
A polyhedron in ambient dimension 3

julia> (v1, v2) = NormalToricVarietiesFromStarTriangulations(P::Polyhedron)
2-element Vector{NormalToricVariety}:
A normal toric variety
A normal toric variety

julia> stanley_reisner_ideal(v1)
ideal(x2*x4)

julia> stanley_reisner_ideal(v2)
ideal(x1*x3)
source
NormalToricVarietyFromGLSMMethod
NormalToricVarietyFromGLSM(charges::fmpz_mat)

Witten's Generalized-Sigma models (GLSM) Edward Witten (1988) 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 Huijun Fan, Tyler Jarvis, Yongbin Ruan (2017), which describes this as GIT construction David A. Cox, John B. Little, Henry K. Schenck (2011).

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.

Examples

julia> charges = [[1, 1, 1]]
1-element Vector{Vector{Int64}}:
[1, 1, 1]

julia> NormalToricVarietyFromGLSM(charges)
1-element Vector{NormalToricVariety}:
A normal toric variety

For convenience, we also support:

• NormalToricVarietyFromGLSM(charges::Vector{Vector{Int}})
• NormalToricVarietyFromGLSM(charges::Vector{Vector{fmpz}})
source

## Properties of Toric Varieties

has_torusfactorMethod
has_torusfactor(v::AbstractNormalToricVariety)

Checks if the normal toric variety v has a torus factor.

Examples

julia> has_torusfactor(projective_space(NormalToricVariety, 2))
false
source
is_affineMethod
is_affine(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is affine.

Examples

julia> is_affine(projective_space(NormalToricVariety, 2))
false
source
is_completeMethod
is_complete(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is complete.

Examples

julia> is_complete(projective_space(NormalToricVariety, 2))
true
source
is_fanoMethod
is_fano(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is fano.

Examples

julia> is_fano(projective_space(NormalToricVariety, 2))
true
source
is_gorensteinMethod
is_gorenstein(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is Gorenstein.

Examples

julia> is_gorenstein(projective_space(NormalToricVariety, 2))
true
source
is_simplicialMethod
is_simplicial(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is simplicial. Hence, this function works just as is_orbifold. It is implemented for user convenience.

Examples

julia> is_simplicial(projective_space(NormalToricVariety, 2))
true
source
is_smoothMethod
is_smooth(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is smooth.

Examples

julia> is_smooth(projective_space(NormalToricVariety, 2))
true
source
is_normalMethod
is_normal(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is normal. (This function is somewhat tautological at this point.)

Examples

julia> is_normal(projective_space(NormalToricVariety, 2))
true
source
is_orbifoldMethod
is_orbifold(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is an orbifold.

Examples

julia> is_orbifold(projective_space(NormalToricVariety, 2))
true
source
is_projectiveMethod
is_projective(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is projective, i.e. if the fan of v is the the normal fan of a polytope.

Examples

julia> is_projective(projective_space(NormalToricVariety, 2))
true
source
is_projective_spaceMethod
is_projective_space(v::AbstractNormalToricVariety)

Decides if the normal toric varieties v is a projective space.

Examples

julia> F5 = hirzebruch_surface(5)
A normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor

julia> is_projective_space(F5)
false

julia> is_projective_space(projective_space(NormalToricVariety, 2))
true
source
is_q_gorensteinMethod
is_q_gorenstein(v::AbstractNormalToricVariety)

Checks if the normal toric variety v is Q-Gorenstein.

Examples

julia> is_q_gorenstein(projective_space(NormalToricVariety, 2))
true
source

## Operations for Toric Varieties

### Affine Open Covering

affine_open_coveringMethod
affine_open_covering(v::AbstractNormalToricVariety)

Compute an affine open cover of the normal toric variety v, i.e. returns a list of affine toric varieties.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> affine_open_covering(p2)
3-element Vector{AffineNormalToricVariety}:
A normal, affine toric variety
A normal, affine toric variety
A normal, affine toric variety
source

### Characters, Weil Divisors, Cartier Divisors, Class Group and Picard Group

torusinvariant_cartier_divisor_groupMethod
torusinvariant_cartier_divisor_group(v::AbstractNormalToricVariety)

Return the Cartier divisor group of an abstract normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> torusinvariant_cartier_divisor_group(p2)
GrpAb: Z^3
source
character_latticeMethod
character_lattice(v::AbstractNormalToricVariety)

Return the character lattice of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> character_lattice(p2)
GrpAb: Z^2
source
class_groupMethod
class_group(v::AbstractNormalToricVariety)

Return the class group of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> class_group(p2)
GrpAb: Z
source
map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_groupMethod
map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)

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)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> map_from_torusinvariant_cartier_divisor_group_to_torusinvariant_weil_divisor_group(p2)
Identity map with

Domain:
=======
GrpAb: Z^3
source
map_from_torusinvariant_cartier_divisor_group_to_picard_groupMethod
map_from_torusinvariant_cartier_divisor_group_to_picard_group(v::AbstractNormalToricVariety)

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)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> map_from_torusinvariant_cartier_divisor_group_to_picard_group(p2)
Map with following data
Domain:
=======
Abelian group with structure: Z^3
Codomain:
=========
Abelian group with structure: Z
source
map_from_character_lattice_to_torusinvariant_weil_divisor_groupMethod
map_from_character_lattice_to_torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)

Return the map from the character lattice to the group of principal divisors of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> map_from_character_lattice_to_torusinvariant_weil_divisor_group(p2)
Map with following data
Domain:
=======
Abelian group with structure: Z^2
Codomain:
=========
Abelian group with structure: Z^3
source
map_from_torusinvariant_weil_divisor_group_to_class_groupMethod
map_from_torusinvariant_weil_divisor_group_to_class_group(v::AbstractNormalToricVariety)

Return the map from the group of Weil divisors to the class of group of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> map_from_torusinvariant_weil_divisor_group_to_class_group(p2)
Map with following data
Domain:
=======
Abelian group with structure: Z^3
Codomain:
=========
Abelian group with structure: Z
source
picard_groupMethod
picard_group(v::AbstractNormalToricVariety)

Return the Picard group of an abstract normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> picard_group(p2)
GrpAb: Z
source
torusinvariant_weil_divisor_groupMethod
torusinvariant_weil_divisor_group(v::AbstractNormalToricVariety)

Return the torusinvariant divisor group of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> torusinvariant_weil_divisor_group(p2)
GrpAb: Z^3
source
torusinvariant_prime_divisorsMethod
torusinvariant_prime_divisors(v::AbstractNormalToricVariety)

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}:
A torus-invariant, prime divisor on a normal toric variety
A torus-invariant, prime divisor on a normal toric variety
A torus-invariant, prime divisor on a normal toric variety
source

### Cones and Fans

fanMethod
fan(v::AbstractNormalToricVariety)

Return the fan of an abstract normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> fan(p2)
A polyhedral fan in ambient dimension 2
source
coneMethod
cone(v::AffineNormalToricVariety)

Return the cone of the affine normal toric variety v.

Examples

julia> cone(AffineNormalToricVariety(Oscar.positive_hull([1 1; -1 1])))
A polyhedral cone in ambient dimension 2
source
mori_coneMethod
mori_cone(v::NormalToricVariety)

Return the mori cone of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> mori = mori_cone(p2)
A polyhedral cone in ambient dimension 1

julia> dim(mori)
1
source
nef_coneMethod
nef_cone(v::NormalToricVariety)

Return the nef cone of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2)
A normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> nef = nef_cone(p2)
A polyhedral cone in ambient dimension 1

julia> dim(nef)
1
source

### Dimensions

dimMethod
dim(v::AbstractNormalToricVariety)

Return the dimension of the normal toric variety v.

Examples

julia> C = Oscar.positive_hull([1 0]);

julia> antv = AffineNormalToricVariety(C);

julia> dim(antv)
1
source
dim_of_torusfactorMethod
dim_of_torusfactor(v::AbstractNormalToricVariety)

Return the dimension of the torus factor of the normal toric variety v.

Examples

julia> C = Oscar.positive_hull([1 0]);

julia> antv = AffineNormalToricVariety(C);

julia> dim_of_torusfactor(antv)
1
source
euler_characteristicMethod
euler_characteristic(v::AbstractNormalToricVariety)

Return the Euler characteristic of the normal toric variety v.

Examples

julia> C = Oscar.positive_hull([1 0]);

julia> antv = AffineNormalToricVariety(C);

julia> euler_characteristic(antv)
1
source
betti_numberMethod
betti_number(v::AbstractNormalToricVariety, i::Int)

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 David A. Cox, John B. Little, Henry K. Schenck (2011). Note that this theorem requires that the normal toric variety v is both complete and simplicial.

Examples

julia> P3 = projective_space(NormalToricVariety, 3)
A normal, non-affine, smooth, projective, gorenstein, fano, 3-dimensional toric variety without torusfactor

julia> betti_number(P3,0)
1

julia> betti_number(P3, 1)
0
source

### Rings and ideals

We support the following rings and ideals for toric varieties:

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::AbstractNormalToricVariety) always return the field of rational numbers. For the coordinate names, we provide the following setter functions:

set_coordinate_namesMethod
set_coordinate_names(v::AbstractNormalToricVariety, coordinate_names::Vector{String})

Allows to set the names of the homogeneous coordinates.

Examples

julia> C = Oscar.positive_hull([1 0]);

julia> antv = AffineNormalToricVariety(C);

julia> set_coordinate_names(antv, ["u"])

julia> coordinate_names(antv)
1-element Vector{String}:
"u"
source
set_coordinate_names_of_torusMethod
set_coordinate_names_of_torus(v::AbstractNormalToricVariety, coordinate_names::Vector{String})

Allows to set the names of the coordinates of the torus.

Examples

julia> F3 = hirzebruch_surface(3);

julia> set_coordinate_names_of_torus(F3, ["u", "v"])

julia> coordinate_names_of_torus(F3)
2-element Vector{String}:
"u"
"v"
source

The following methods allow to etract the chosen coordinates:

coordinate_namesMethod
coordinate_names(v::AbstractNormalToricVariety)

This method returns the names of the homogeneous coordinates of the normal toric variety v. The default is x1, ..., xn.

Examples

julia> C = Oscar.positive_hull([1 0]);

julia> antv = AffineNormalToricVariety(C);

julia> coordinate_names(antv)
1-element Vector{String}:
"x1"
source
coordinate_names_of_torusMethod
coordinate_names_of_torus(v::AbstractNormalToricVariety)

This method returns the names of the coordinates of the torus of the normal toric variety v. The default is x1, ..., xn.

source

In order to efficiently construct algebraic cycles (elements of the Chox 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:

cox_ringMethod
cox_ring(v::AbstractNormalToricVariety)

Computes the Cox ring of the normal toric variety v. Note that David A. Cox, John B. Little, Henry K. Schenck (2011) refers to this ring as the "total coordinate ring".

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> set_coordinate_names(p2, ["y1", "y2", "y3"])

julia> cox_ring(p2)
Multivariate Polynomial Ring in y1, y2, y3 over Rational Field graded by
y1 -> [1]
y2 -> [1]
y3 -> [1]
source
irrelevant_idealMethod
irrelevant_ideal(v::AbstractNormalToricVariety)

Return the irrelevant ideal of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> length(gens(irrelevant_ideal(p2)))
3
source
ideal_of_linear_relationsMethod
ideal_of_linear_relations(v::AbstractNormalToricVariety)

Return the ideal of linear relations of the simplicial and complete toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> ngens(ideal_of_linear_relations(p2))
2
source
stanley_reisner_idealMethod
stanley_reisner_ideal(v::AbstractNormalToricVariety)

Return the Stanley-Reisner ideal of a normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> ngens(stanley_reisner_ideal(p2))
1
source
toric_idealMethod
toric_ideal(antv::AffineNormalToricVariety)

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 $\mathbb{P}^1\times\mathbb{P}^1$. Note that this cone is self-dual, the toric ideal comes from the dual cone.

julia> C = positive_hull([1 0 0; 1 1 0; 1 0 1; 1 1 1])
A polyhedral cone in ambient dimension 3

julia> antv = AffineNormalToricVariety(C)
A normal, affine toric variety

julia> toric_ideal(antv)
ideal(-x1*x2 + x3*x4)
source
coordinate_ring_of_torusMethod
coordinate_ring_of_torus(v::AbstractNormalToricVariety)

Computes the coordinate ring of the torus of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> set_coordinate_names_of_torus(p2, ["y1", "y2"])

julia> coordinate_ring_of_torus(p2)
Quotient of Multivariate Polynomial Ring in y1, y2, y1_, y2_ over Rational Field by ideal(y1*y1_ - 1, y2*y2_ - 1)
source

One can check the status as follows:

is_finalizedMethod
is_finalized(v::AbstractNormalToricVariety)

Checks 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.

Examples

julia> is_finalized(del_pezzo_surface(3))
false
source

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, onc 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.

cox_ringMethod
cox_ring(R::MPolyRing, v::AbstractNormalToricVariety)

Computes the Cox ring of the normal toric variety v, in this case by adding the Cox grading to the given ring R. Note that David A. Cox, John B. Little, Henry K. Schenck (2011) refers to this ring as the "total coordinate ring".

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = PolynomialRing(QQ, 3);

julia> cox_ring(R, p2)
Multivariate Polynomial Ring in x1, x2, x3 over Rational Field graded by
x1 -> [1]
x2 -> [1]
x3 -> [1]
source
irrelevant_idealMethod
irrelevant_ideal(R::MPolyRing, v::AbstractNormalToricVariety)

Return the irrelevant ideal of a normal toric variety v as an ideal in R.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = PolynomialRing(QQ, 3);

julia> length(gens(irrelevant_ideal(R, p2)))
3
source
ideal_of_linear_relationsMethod
ideal_of_linear_relations(R::MPolyRing, v::AbstractNormalToricVariety)

Return the ideal of linear relations of the simplicial and complete toric variety v in the ring R.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = PolynomialRing(QQ, 3);

julia> ngens(ideal_of_linear_relations(R, p2))
2
source
stanley_reisner_idealMethod
stanley_reisner_ideal(R::MPolyRing, v::AbstractNormalToricVariety)

Return the Stanley-Reisner ideal of a normal toric variety v as an ideal of R.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = PolynomialRing(QQ, 3);

julia> ngens(stanley_reisner_ideal(R, p2))
1
source
toric_idealMethod
toric_ideal(R::MPolyRing, antv::AffineNormalToricVariety)

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 $\mathbb{P}^1\times\mathbb{P}^1$. Note that this cone is self-dual, the toric ideal comes from the dual cone.

julia> C = positive_hull([1 0 0; 1 1 0; 1 0 1; 1 1 1])
A polyhedral cone in ambient dimension 3

julia> antv = AffineNormalToricVariety(C)
A normal, affine toric variety

julia> R, _ = PolynomialRing(QQ, 4);

julia> toric_ideal(R, antv)
ideal(-x1*x2 + x3*x4)
source
coordinate_ring_of_torusMethod
coordinate_ring_of_torus(R::MPolyRing, v::AbstractNormalToricVariety)

Computes the coordinate ring of the torus of the normal toric variety v in the given polynomial ring R.

source

Along the same lines, characters can be turned into rational functions:

character_to_rational_functionMethod
character_to_rational_function(v::AbstractNormalToricVariety, character::Vector{fmpz})

Computes the rational function corresponding to a character of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> character_to_rational_function(p2, [-1, 2])
x2^2*x1_
source
character_to_rational_functionMethod
character_to_rational_function(R::MPolyRing, v::AbstractNormalToricVariety, character::Vector{fmpz})

Computes the rational function corresponding to a character of the normal toric variety v.

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = PolynomialRing(QQ, 4);

julia> character_to_rational_function(R, p2, [-1, 2])
x2^2*x3
source

## Auxiliary Methods

binomial_exponents_to_idealMethod
binomial_exponents_to_ideal(binoms::Union{AbstractMatrix, fmpz_mat})

This function converts the rows of a matrix to binomials. Each row $r$ is written as $r=u-v$ with $u, v\ge 0$ by splitting into positive and negative entries. Then the row $r$ corresponds to $x^u-x^v$. The resulting ideal is returned.

Examples

julia> A = [-1 -1 0 2; 2 3 -2 -1]
2×4 Matrix{Int64}:
-1  -1   0   2
2   3  -2  -1

julia> binomial_exponents_to_ideal(A)
ideal(-x1*x2 + x4^2, x1^2*x2^3 - x3^2*x4)
source
toric_idealMethod
toric_ideal(pts::fmpz_mat)

Return the toric ideal generated from the linear relations between the points pts. This is the ideal generated by the set of binomials $\{x^u-x^v\ |\ u, v\in\mathbb{Z}^n_{\ge 0}\ (pts)^T\cdot(u-v) = 0\}$

Examples

julia> C = positive_hull([-2 5; 1 0]);

julia> H = hilbert_basis(C);

julia> toric_ideal(H)
ideal(x2*x3 - x4^2, -x1*x3 + x2^2*x4, -x1*x4 + x2^3, -x1*x3^2 + x2*x4^3, -x1*x3^3 + x4^5)
source