This manual describes the toric package for working with toric varieties in GAP. Toric varieties can be dealt with more easily than general varieties since often times questions about a toric variety can be reformulated in terms of combinatorial geometry. Some coding theory commands related to toric varieties are contained in the error-correcting codes GUAVA package (for example, the command ToricCode
). We refer to the GUAVA manual [FJT+09] and the expository paper [JV02] for more details.
The toric package also contains several commands unrelated to toric varieties (mostly for list manipulations). These will not be described in this documention but they are briefly documented in the lib/util.gd
file.
toric is implemented in the GAP language, and runs on any system supporting GAP4.3 and above. The toric package is loaded with the command
gap> LoadPackage( "toric" );
Please send bug reports, suggestions and other comments about toric to support@gap-system.org.
Rather than sketch the theory of toric varieties, we refer to [JV02] and [Ful93] for details. However, we briefly describe some terminology and notation.
Let F denote a field and R=F[x1,...,xn] be a ring in n variables. A binomial equation in R is one of the form
xk11...xknn=xℓ11...xℓnn,
where ki≥0, ℓj≥0 are integers. A binomial variety is a subvariety of affine n-space AnF defined by a finite set of binomial equations (such a variety need not be normal). A typical ``toric variety'' is binomial, though they will be introduced via an a priori independent construction. The basic idea of the construction is to replace each such binomial equation as above by a relation in a semigroup contained in a lattice and replace R by the ``group algebra'' of this semigroup. By the way, a toric variety is always normal (see for example, [Ful93], page 29).
Let Q denote the field of rational numbers and Z denote the set of integers. Let n>1 denote an integer.
Let V=Qn having basis f1=(1,0,...,0), ..., fn=(0,...,0,1). Let L0=Zn⊂V be the standard lattice in V. We identify V and L0⊗ZQ. We use ⟨ , ⟩ to denote the (standard) inner product on V. Let
L∗0=Hom(L0,Z)={v∈V | ⟨v,w⟩∈Z, ∀w∈L0}
denote the dual lattice, so (fixing the standard basis e∗1,...,e∗n dual to the f1,...,fn) L∗0 may be identified with Zn.
A cone in V is a set σ of the form
σ={a1v1+...+amvm | ai≥0}⊂V,
where v1,...,vm∈V is a given collection of vectors, called (semigroup) generators of σ. A rational cone is one where v1,...,vm∈L0. A strongly convex cone is one which contains no lines through the origin.
By abuse of terminology, from now on a cone of L0 is a strongly convex rational cone.
A face of a cone σ is either σ itself or a subset of the form H∩σ, where H is a codimension one subspace of V which intersects the cone non-trivially and such that the cone is contained in exactly one of the two half-spaces determined by H. A ray (or edge) of a cone is a one-dimensional face. Typically, cones are represented in toric by the list of vectors defining their rays. The dimension of a cone is the dimension of the vector space it spans. The toric package can test if a given vector is in a given cone (see InsideCone
).
If σ is a cone then the dual cone is defined by
σ∗={w∈L∗0⊗Q | ⟨v,w⟩≥0, ∀v∈σ}.
The toric package can test if a vector is in the dual of a given cone (see InDualCone
).
Associate to the dual cone σ∗ is the semigroup
Sσ=σ∗∩L∗0={w∈L∗0 | ⟨v,w⟩≥0, ∀v∈σ}.
Though L∗0 has $n$ generators as a lattice, typically Sσ will have more than n generators as a semigroup. The toric package can compute a minimal list of semigroup generators of Sσ (see DualSemigroupGenerators
).
A fan is a collection of cones which ``fit together'' well. A fan in L0 is a set Δ={σ} of rational strongly convex cones in V=L0⊗Q such that
if σ∈Δ and τ⊂σ is a face of σ then τ∈Δ,
if σ1,σ2∈Δ then the intersection σ1∩σ2 is a face of both σ1 and σ2 (and hence belongs to Δ).
In particular, the face of a cone in a fan is a cone is the fan.
If V is the (set-theoretic) union of the cones in Δ then we call the fan complete. We shall assume that all fans are finite. A fan is determined by its list of maximal cones.
Notation: A fan Δ is represented in toric as a set of maximal cones. For example, if Δ is the fan with maximal cones σ1=Q+⋅f1+Q+⋅(−f1+f2), σ2=Q+⋅(−f1+f2)+Q+⋅(−f1−f2), σ3=Q+⋅(−f1−f2)+Q+⋅f1, then Δ is represented by [[[1,0],[−1,1]],[[−1,1],[−1,−1]],[[−1,−1],[1,0]]].
The toric package can compute all cones in a fan of a given dimension (see ConesOfFan
). Moreover, toric can compute the set of all normal vectors to the faces (i.e., hyperplanes) of a cone (see Faces
).
The star of a cone σ in a fan Δ is the set Δσ of cones in Δ containing σ as a face. The toric package can compute stars (see ToricStar
).
Let
Rσ=F[Sσ]
denote the ``group algebra'' of this semigroup. It is a finitely generated commutative F-algebra. It is in fact integrally closed ([Ful93], page 29). We may interprete Rσ as a subring of R=F[x1,...,xn] as follows: First, identify each e∗i with the variable xi. If Sσ is generated as a semigroup by vectors of the form ℓ1e∗1+...+ℓne∗n, where ℓi is an integer, then its image in R is generated by monomials of the form xℓ11…xℓnn. The toric package can compute these generating monomials (see EmbeddingAffineToricVariety
). See Lemma 2.14 in [JV02] for more details. This embedding can also be used to resolve singularities - see section 5 of [JV02] for more details.
Let
Uσ=Spec Rσ.
This defines an affine toric variety (associated to σ). It is known that the coordinate ring Rσ of the affine toric variety Uσ has the form Rσ=F[x1,...,xn]/J, where J is an ideal. The toric package can compute generators of this ideal by using the DualSemigroupGenerators
and the EmbeddingAffineToricVariety
commands.
Roughly speaking, the toric variety X(Δ) associated to the fan Δ is given by a collection of affine pieces $U_{\sigma_1},U_{\sigma_2},\dots,U_{\sigma_d}$ which ``glue'' together (where Δ={σi}). The affine pieces are given by the zero sets of polynomial equations in some affine spaces and the gluings are given by maps ϕi,j:Uσi→Uσj which are defined by ratios of polynomials on open subsets of the $U_{\sigma_i}$. The toric package does not compute these gluings or work directly with these (non-affine) varieties X(Δ).
A cone σ⊂V is said to be nonsingular if it is generated by part of a basis for the lattice L0. A fan Δ of cones is said to be nonsingular if all its cones are nonsingular. It is known that Uσ is nonsingular if and only if σ is nonsingular (Proposition 2.1 in [Ful93]).
Example: In three dimensions, consider the cones σϵ1,ϵ2,ϵ3,i,j generated by (ϵ1⋅1,ϵ2⋅1,ϵ3⋅1) and the standard basis vectors fi,fj, where ϵi=±1 and 1≤i≠j≤3. There are 8 cones per octant, for a total of 64 cones. Let Δ denote the fan in V=Q3 determined by these maximal cones. The toric variety X(Δ) is nonsingular.
Although the toric package does not work directly with the toric varieties X(Δ), it can compute objects associated with it. For example, it can compute the Euler characteristic (see EulerCharacteristic
), Betti numbers (see BettiNumberToric
), and the number of GF(q)-rational points (see CardinalityOfToricVariety
) of X(Δ), provided Δ is nonsingular.
For an algebraic variety X the group of Weil divisors on X is the abelian group Div(X) generated (additively) by the irreducible subvarieties of X of codimension 1. For a toric variety X(Δ) with dense open torus T, a Weil divisor D is T-invariant if D=T⋅D. The group of T-invariant Weil divisors is denoted TDiv(X). This is finitely generated by an explicitly given finite set of divisors {D1,...,Dr} which correspond naturally to certain cones in Δ (see [Ful93] for details). In particular, we may represent such a divisor D in TDiv(X) by an k-tuple (d1,...,dk) of integers.
Let Δ denote a fan in V=Qn with rays (or edges) τi, 1≤i≤k, and let vi denote the first lattice point on τi. Associated to the T-invariant Weil divisor D=d1D1+...+dkDk, is the polytope
PD={x=(x1,...,xn) | ⟨x,vi⟩≥−di, ∀1≤i≤k}.
The toric package can compute PD (see DivisorPolytope
), as well as the set of all lattice points contained in this polytope (see DivisorPolytopeLatticePoints
). Also associated to the T-invariant Weil divisor D=d1D1+...+dkDk, is the Riemann-Roch space, L(D). This is a space of functions on X(Δ) whose zeros and poles are ``controlled'' by D (for a more precise definition, see [Ful93]). The toric package can compute a basis for L(D) (see RiemannRochBasis
), provided Δ is complete and nonsingular.
generated by GAPDoc2HTML