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

All of the constructors below accept as their last argument an optional boolean. This boolean set_attributes controls whether the constructors sets attributes for the constructed variety. The benefit of such setters is increased performance. However, as per usual, a shortcut comes at a price. In the case at hand, it might lead to possible inconsistencies, despite our best efforts to prevent this from happening.

The default is set_attributes = true, that is our constructors set attributes upon construction. If not desired, it can be switched off by passing set_attributes = false as last argument. Note however, that the constructors of del_pezzo_surface, hirzebruch_surface, projective_space and weighted_projective_space always make a default/standard choice for the grading of the Cox ring.

Affine Toric Varieties

affine_normal_toric_varietyMethod
affine_normal_toric_variety(C::Cone; set_attributes::Bool = true)

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])
Polyhedral cone in ambient dimension 2

julia> antv = affine_normal_toric_variety(C)
Normal, affine toric variety
source
normal_toric_varietyMethod
normal_toric_variety(C::Cone; set_attributes::Bool = true)

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])
Polyhedral cone in ambient dimension 2

julia> ntv = normal_toric_variety(C)
Normal, affine toric variety
source
affine_normal_toric_varietyMethod
affine_normal_toric_variety(v::NormalToricVariety; set_attributes::Bool = true)

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([1 0; 0 1]))
Normal, affine toric variety

julia> affineVariety = affine_normal_toric_variety(v)
Normal, affine toric variety
source

Normal Toric Varieties

normal_toric_varietyMethod
normal_toric_variety(rays::Vector{Vector{Int64}}, max_cones::Vector{Vector{Int64}}; non_redundant::Bool = false, set_attributes::Bool = true)

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> normal_toric_variety(ray_generators, max_cones)
Normal toric variety

julia> normal_toric_variety(ray_generators, max_cones; non_redundant = true)
Normal toric variety
source
normal_toric_varietyMethod
normal_toric_variety(PF::PolyhedralFan; set_attributes::Bool = true)

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)
Polyhedron in ambient dimension 2

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

julia> ntv = normal_toric_variety(nf)
Normal toric variety
source
normal_toric_varietyMethod
NormalToricVariety(P::Polyhedron; set_attributes::Bool = true)

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)
Polyhedron in ambient dimension 2

julia> ntv = normal_toric_variety(square)
Normal toric variety
source

Famous Toric Vareties

affine_spaceMethod
affine_space(::Type{NormalToricVariety}, d::Int; set_attributes::Bool = true)

Constructs the (toric) affine space of dimension d.

Examples

julia> affine_space(NormalToricVariety, 2)
Normal, affine, 2-dimensional toric variety
source
del_pezzo_surfaceMethod
del_pezzo_surface(::Type{NormalToricVariety}, b::Int; set_attributes::Bool = true)

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

Examples

julia> del_pezzo_surface(NormalToricVariety, 3)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor
source
hirzebruch_surfaceMethod
hirzebruch_surface(::Type{NormalToricVariety}, r::Int; set_attributes::Bool = true)

Constructs the r-th Hirzebruch surface.

Examples

julia> hirzebruch_surface(NormalToricVariety, 5)
Normal, non-affine, smooth, projective, gorenstein, non-fano, 2-dimensional toric variety without torusfactor
source
projective_spaceMethod
projective_space(::Type{NormalToricVariety}, d::Int; set_attributes::Bool = true)

Construct the projective space of dimension d.

Examples

julia> projective_space(NormalToricVariety, 2)
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}; set_attributes::Bool = true) where {T <: IntegerUnion}

Construct the weighted projective space corresponding to the weights w.

Examples

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

Further Constructions

blow_upMethod

blowup(v::AbstractNormalToricVariety, I::MPolyIdeal; coordinatename::String = "e", set_attributes::Bool = true)

Blowup the toric variety by subdividing the cone in the list of all cones of the fan of v which corresponds to the provided ideal I. Note that this cone need not be maximal.

By default, we pick "e" as the name of the homogeneous coordinate for the exceptional divisor. As third optional argument on can supply a custom variable name.

Examples

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

julia> (x1,x2,x3,x4) = gens(cox_ring(P3))
4-element Vector{MPolyDecRingElem{QQFieldElem, QQMPolyRingElem}}:
 x1
 x2
 x3
 x4

julia> I = ideal([x2,x3])
ideal(x2, x3)

julia> bP3 = blow_up(P3, I)
Normal toric variety

julia> cox_ring(bP3)
Multivariate polynomial ring in 5 variables over QQ graded by
  x1 -> [1 0]
  x2 -> [0 1]
  x3 -> [0 1]
  x4 -> [1 0]
  e -> [1 -1]
source
blow_upMethod

blowup(v::AbstractNormalToricVariety, n::Int; coordinatename::String = "e", set_attributes::Bool = true)

Blowup the toric variety by subdividing the n-th cone in the list of all cones of the fan of v. This cone need not be maximal.

By default, we pick "e" as the name of the homogeneous coordinate for the exceptional divisor. As third optional argument on can supply a custom variable name.

Examples

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

julia> cones(P3)
14×4 IncidenceMatrix
[1, 2, 3]
[2, 3, 4]
[1, 3, 4]
[1, 2, 4]
[2, 3]
[1, 3]
[1, 2]
[3, 4]
[2, 4]
[1, 4]
[2]
[3]
[1]
[4]

julia> bP3 = blow_up(P3, 5)
Normal toric variety

julia> cox_ring(bP3)
Multivariate polynomial ring in 5 variables over QQ graded by
  x1 -> [1 0]
  x2 -> [0 1]
  x3 -> [0 1]
  x4 -> [1 0]
  e -> [1 -1]
source
*Method
Base.:*(v::AbstractNormalToricVariety, w::AbstractNormalToricVariety; set_attributes::Bool = true)

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::AbstractNormalToricVariety, 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::AbstractNormalToricVariety)).

Crucially, the order of the homogeneous coordinates is not shuffled. To be more specific, assume that v has $n_1$ and w has $n_2$ homogeneous coordinates. Then v * w has $n_1 + n_2$ homogeneous coordinates. The first $n_1$ of these coordinates are those of v and appear in the very same order as they do for v. The remaining $n_2$ 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, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

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]
source
normal_toric_varieties_from_star_triangulationsMethod
normal_toric_varieties_from_star_triangulations(P::Polyhedron; set_attributes::Bool = true)

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])
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(x2*x4)

julia> stanley_reisner_ideal(v2)
ideal(x1*x3)
source
normal_toric_varieties_from_glsmMethod
normal_toric_varieties_from_glsm(charges::ZZMatrix; set_attributes::Bool = true)

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> normal_toric_varieties_from_glsm(charges)
1-element Vector{NormalToricVariety}:
 Normal toric variety

For convenience, we also support:

  • normaltoricvarietiesfromglsm(charges::Vector{Vector{Int}})
  • normaltoricvarietiesfromglsm(charges::Vector{Vector{ZZRingElem}})
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(NormalToricVariety, 5)
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)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> affine_open_covering(p2)
3-element Vector{AffineNormalToricVariety}:
 Normal, affine toric variety
 Normal, affine toric variety
 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)
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)
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)
Map with following data
Domain:
=======
Abelian group with structure: Z^3
Codomain:
=========
Abelian group with structure: 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)
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)
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}:
 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
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)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

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

Return the cone of the affine normal toric variety v.

Examples

julia> cone(affine_normal_toric_variety(Oscar.positive_hull([1 1; -1 1])))
Polyhedral cone in ambient dimension 2
source
dual_coneMethod
dual_cone(v::AffineNormalToricVariety)

Return the dual cone of the affine normal toric variety v.

Examples

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

julia> antv = affine_normal_toric_variety(C)
Normal, affine toric variety

julia> dual_cone(antv)
Polyhedral cone in ambient dimension 2

julia> polarize(cone(antv)) == dual_cone(antv)
true
source
hilbert_basisMethod
hilbert_basis(v::AffineNormalToricVariety)

For an affine toric variety $v$, this returns the Hilbert basis of the cone dual to the cone of $v$.

Examples

julia> C = positive_hull([-1 1; 1 1])
Polyhedral cone in ambient dimension 2

julia> antv = affine_normal_toric_variety(C)
Normal, affine toric variety

julia> hilbert_basis(antv)
[-1   1]
[ 1   1]
[ 0   1]
source
mori_coneMethod
mori_cone(v::NormalToricVariety)

Return the mori cone of the normal toric variety v.

Examples

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

julia> mori = mori_cone(p2)
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)
Normal, non-affine, smooth, projective, gorenstein, fano, 2-dimensional toric variety without torusfactor

julia> nef = nef_cone(p2)
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 = affine_normal_toric_variety(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 = affine_normal_toric_variety(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 = affine_normal_toric_variety(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)
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 as long as the toric variety in question is not yet finalized (cf. is_finalized(v::AbstractNormalToricVariety)).

Examples

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

julia> antv = affine_normal_toric_variety(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(NormalToricVariety, 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)

Return 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 = affine_normal_toric_variety(C);

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

Return 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 3 variables over QQ 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])
Polyhedral cone in ambient dimension 3

julia> antv = affine_normal_toric_variety(C)
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 4 variables over QQ
  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(NormalToricVariety, 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, _ = 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]
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, _ = polynomial_ring(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, _ = polynomial_ring(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, _ = polynomial_ring(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])
Polyhedral cone in ambient dimension 3

julia> antv = affine_normal_toric_variety(C)
Normal, affine toric variety

julia> R, _ = polynomial_ring(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{ZZRingElem})

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{ZZRingElem})

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

Examples

julia> p2 = projective_space(NormalToricVariety, 2);

julia> R, _ = polynomial_ring(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, ZZMatrix})

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::ZZMatrix)

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