# toricDivisor(NormalToricVariety) -- make the canonical divisor

## Synopsis

• Function: toricDivisor
• Usage:
toricDivisor X
• Inputs:
• Optional inputs:
• CoefficientRing => ..., default value QQ, make the toric divisor associated to a polyhedron
• Variable => ..., default value x, make the toric divisor associated to a polyhedron
• WeilToClass => ..., default value null, make the toric divisor associated to a polyhedron
• Outputs:
• , specifically minus the sum of all the irreducible torus-invariant divisors

## Description

On a smooth normal toric variety, the canonical divisor equals minus the sum of all the torus-invariant irreducible divisors. For a singular toric variety, this divisor may not be Cartier or even $\QQ$-Cartier. Nevertheless, the associated coherent sheaf, whose local sections are rational functions with at least simple zeros along the irreducible divisors, is the dualizing sheaf.

The first example illustrates the canonical divisor on projective space.

 i1 : PP3 = toricProjectiveSpace 3; i2 : assert(isSmooth PP3 and isProjective PP3) i3 : K = toricDivisor PP3 o3 = - PP3 - PP3 - PP3 - PP3 0 1 2 3 o3 : ToricDivisor on PP3 i4 : assert(all(entries K, i -> i === -1) and isWellDefined K) i5 : omega = OO K 1 o5 = OO (-4) PP3 o5 : coherent sheaf on PP3 i6 : assert(HH^3(PP3, OO_PP3(-7) ** omega) === HH^0(PP3, OO_PP3(7)))

The second example illustrates that duality also holds on complete singular nonprojective toric varieties.

 i7 : X = normalToricVariety({{1,0,0},{0,1,0},{0,0,1},{0,-1,-1},{-1,0,-1},{-2,-1,0}},{{0,1,2},{0,1,3},{1,3,4},{1,2,4},{2,4,5},{0,2,5},{0,3,5},{3,4,5}}); i8 : assert(isComplete X and not isProjective X and not isSmooth X) i9 : KX = toricDivisor X o9 = - X - X - X - X - X - X 0 1 2 3 4 5 o9 : ToricDivisor on X i10 : assert(all(entries KX, i -> i === -1) and isWellDefined KX) i11 : isCartier KX o11 = false i12 : omegaX = OO KX 1 o12 = OO (-3, -3, -4) X o12 : coherent sheaf on X i13 : assert( HH^0(X, OO_X(1,2,5)) === HH^3(X, OO_X(-1,-2,-5) ** omegaX) )