4 Toric varieties X(∆) This chapter concerns toric commands which deal with certain objects associated to the (non-affine) toric varieties X(∆). 4.1 Riemann-Roch spaces Let ∆ denote a complete nonsingular fan. 4.1-1 DivisorPolytope DivisorPolytope( D, Rays )  function Input: Rays is the list of smallest integer vectors in the rays for the fan ∆ which determine the Weil divisors of X(∆). D is the list of coefficients for the a Weil divisor. Output: the linear expressions in the affine coordinates of the space of the cone which must be positive for a point to be in the desired polytope.  Example  gap> DivisorPolytope([6,6,0],[[2,-1],[-1,2],[-1,-1]]); [ 2*x_1-x_2+6, -x_1+2*x_2+6, -x_1-x_2 ]  See also Example 6.13 in [JV02]. 4.1-2 DivisorPolytopeLatticePoints DivisorPolytopeLatticePoints( D, Delta, Rays )  function Input: Delta is the fan Rays is the ordered list of rays for Delta D is the list of coefficients for a Weil divisor. Output: the list of points in P_D ∩ L_0^* which parameterize the elements in the Riemann-Roch space L(D), where P_D is the polytope associated to the divisor D (see DivisorPolytope).  Example  gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];; gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];; gap> P_Div:=DivisorPolytopeLatticePoints(Div,Delta0,Rays); [ [ -6, -6 ], [ -5, -5 ], [ -5, -4 ], [ -4, -5 ], [ -4, -4 ], [ -4, -3 ],  [ -4, -2 ], [ -3, -4 ], [ -3, -3 ], [ -3, -2 ], [ -3, -1 ], [ -3, 0 ],  [ -2, -4 ], [ -2, -3 ], [ -2, -2 ], [ -2, -1 ], [ -2, 0 ], [ -2, 1 ],  [ -2, 2 ], [ -1, -3 ], [ -1, -2 ], [ -1, -1 ], [ -1, 0 ], [ -1, 1 ],  [ 0, -3 ], [ 0, -2 ], [ 0, -1 ], [ 0, 0 ], [ 1, -2 ], [ 1, -1 ], [ 2, -2 ] ]  4.1-3 RiemannRochBasis RiemannRochBasis( D, Delta, Rays )  function Input: Delta is a complete and nonsingular fan D is the list of coefficients for the Weil divisor Rays is a list of rays for the fan used to describe the Weil divisors. Output: A basis (a list of monomials) for the Riemann-Roch space of the divisor represented by D. For details on how the Weil divisors can be expressed in terms of the rays of the fan, please see section 3.3 in [Ful93]. This procedure does not check if the fan is complete and nonsingular.  Example  gap> Div:=[6,6,0];; Rays:=[[2,-1],[-1,2],[-1,-1]];; gap> Delta0:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];; gap> RiemannRochBasis(Div,Delta0,Rays); [ 1/(x_1^6*x_2^6), 1/(x_1^5*x_2^5), 1/(x_1^5*x_2^4), 1/(x_1^4*x_2^5),  1/(x_1^4*x_2^4), 1/(x_1^4*x_2^3), 1/(x_1^4*x_2^2), 1/(x_1^3*x_2^4),  1/(x_1^3*x_2^3), 1/(x_1^3*x_2^2), 1/(x_1^3*x_2), 1/x_1^3, 1/(x_1^2*x_2^4),  1/(x_1^2*x_2^3), 1/(x_1^2*x_2^2), 1/(x_1^2*x_2), 1/x_1^2, x_2/x_1^2,  x_2^2/x_1^2, 1/(x_1*x_2^3), 1/(x_1*x_2^2), 1/(x_1*x_2), 1/x_1, x_2/x_1,  1/x_2^3, 1/x_2^2, 1/x_2, 1, x_1/x_2^2, x_1/x_2, x_1^2/x_2^2 ]  4.2 Topological invariants Throughout this section, X(∆) must be non-singular. 4.2-1 EulerCharacteristic EulerCharacteristic( Delta )  function Input: Delta is a nonsingular fan of cones, represented by its list of maximal cones. Output: the Euler characteristic of the toric variety X(∆), where ∆ is a fan determined by Delta.  Example  gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];; gap> EulerCharacteristic(Cones); 3  Note: X(∆) must be non-singular here. 4.2-2 BettiNumberToric BettiNumberToric( Delta, k )  function Input: Delta represents a nonsingular fan ∆ (represented by maximal cones), k is an integer. Output: the k-th Betti number of the toric variety X(∆). The BettiNumberToric procedure does not check if Delta is nonsingular. It is possible that this procedure outputs nonsense when Delta is not represented by maximal cones or is nonsingular.  Example  gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];; gap> BettiNumberToric(Cones,1); 0 gap> BettiNumberToric(Cones,2); 1 gap> Cones:=[[[2,-1],[-1,1]],[[-1,1],[-1,0]],[[-1,0],[2,-1]]];; gap> BettiNumberToric(Cones,1); 0 gap> BettiNumberToric(Cones,2); 1  Not to be confused with the Betti number of a polycyclically presented torsion free group, already available in GAP. 4.3 Points over a finite field 4.3-1 CardinalityOfToricVariety CardinalityOfToricVariety( Cones, q )  function Input: Cones is the list of maximal cones of a fan ∆, q is a prime power. Output: The size of the set of GF(q)-rational points of the toric variety X(∆). Note: X(∆) must be non-singular here.  Example  gap> Cones:=[[[2,-1],[-1,2]],[[-1,2],[-1,-1]],[[-1,-1],[2,-1]]];; gap> CardinalityOfToricVariety(Cones,3); 13 gap> CardinalityOfToricVariety(Cones,4); 21 gap> CardinalityOfToricVariety(Cones,5); 31 gap> CardinalityOfToricVariety(Cones,7); 57