# toricDivisor(Polyhedron) -- make the toric divisor associated to a polyhedron

## Synopsis

• Function: toricDivisor
• Usage:
toricDivisor P
• Inputs:
• P, , whose vertices are lattice points
• Optional inputs:
• CoefficientRing => a ring, default value QQ, that determines the coefficient ring of the total coordinate ring of the underlying normal toric variety
• Variable => , default value x, that specifies the base symbol for the indexed variables in the total coordinate ring of the underlying normal toric variety
• WeilToClass => , default value null, that specifies the map from the group of torus-invariant Weil divisors to the class group of the underlying normal toric variety
• Outputs:
• , corresponding to the given convex lattice polytope on the normal toric variety defined by the inner normal fan

## Description

A convex lattice polytope corresponds to a pair: the normal toric variety determined by its normal fan and toric divisor. The coefficient of the $i$-th irreducible torus-invariant divisor is determined by the supporting hyperplane to the polytope whose normal vector is the minimal lattice point on the $i$-th ray.

Our example demonstrates how different triangles correspond to toric divisors on the projective plane.

 i1 : P1 = convexHull matrix{{0,1,0},{0,0,1}}; i2 : D1 = toricDivisor P1 o2 = D 2 o2 : ToricDivisor on normalToricVariety ({{1, 0}, {0, 1}, {-1, -1}}, {{0, 1}, {0, 2}, {1, 2}}) i3 : X = variety D1; i4 : D1 o4 = X 2 o4 : ToricDivisor on X i5 : P2 = convexHull matrix{{-1,0,-1},{0,0,1}}; i6 : D2 = toricDivisor P2 o6 = D 0 o6 : ToricDivisor on normalToricVariety ({{1, 0}, {0, 1}, {-1, -1}}, {{0, 1}, {0, 2}, {1, 2}}) i7 : P3 = convexHull matrix{{0,1,0},{-1,-1,0}}; i8 : D3 = toricDivisor P3 o8 = D 1 o8 : ToricDivisor on normalToricVariety ({{1, 0}, {0, 1}, {-1, -1}}, {{0, 1}, {0, 2}, {1, 2}}) i9 : P4 = convexHull matrix{{-1,2,-1},{-1,-1,2}}; i10 : D4 = toricDivisor(P4, CoefficientRing => ZZ/2) o10 = D + D + D 0 1 2 o10 : ToricDivisor on normalToricVariety ({{1, 0}, {0, 1}, {-1, -1}}, {{0, 1}, {0, 2}, {1, 2}}) i11 : ring variety D4 ZZ o11 = --[x ..x ] 2 0 2 o11 : PolynomialRing

This method function creates both the toric divisor and the underlying normal toric variety.