# ToricDivisor -- the class of all torus-invariant Weil divisors

## Description

A torus-invariant Weil divisor on a normal toric variety is an integral linear combination of the irreducible torus-invariant divisors. The irreducible torus-invariant divisors correspond to the rays. In this package, the rays are ordered and indexed by the nonnegative integers.

The first examples illustrates some torus-invariant Weil divisors on projective $2$-space.

 i1 : PP2 = toricProjectiveSpace 2; i2 : D1 = toricDivisor ({2,-7,3}, PP2) o2 = 2*PP2 - 7*PP2 + 3*PP2 0 1 2 o2 : ToricDivisor on PP2 i3 : D2 = 2*PP2_0 + 4*PP2_2 o3 = 2*PP2 + 4*PP2 0 2 o3 : ToricDivisor on PP2 i4 : D1+D2 o4 = 4*PP2 - 7*PP2 + 7*PP2 0 1 2 o4 : ToricDivisor on PP2 i5 : D1-D2 o5 = - 7*PP2 - PP2 1 2 o5 : ToricDivisor on PP2 i6 : K = toricDivisor PP2 o6 = - PP2 - PP2 - PP2 0 1 2 o6 : ToricDivisor on PP2

One can easily extract individual coefficients or the list of coefficients.

 i7 : D1#0 o7 = 2 i8 : D1#1 o8 = -7 i9 : D1#2 o9 = 3 i10 : entries D1 o10 = {2, -7, 3} o10 : List i11 : entries K o11 = {-1, -1, -1} o11 : List