# ring(NormalToricVariety) -- make the total coordinate ring (a.k.a. Cox ring)

## Synopsis

• Usage:
ring X
• Function: ring
• Inputs:
• Outputs:
• , the total coordinate ring

## Description

The total coordinate ring (a.k.a. the Cox ring) of a normal toric variety is a polynomial ring in which the variables correspond to the rays in the fan. The map from the group of torus-invarient Weil divisors to the class group endows this ring with a grading by the class group.

The total coordinate ring for projective space is the standard graded polynomial ring.

 `i1 : PP3 = projectiveSpace 3;` `i2 : S = ring PP3;` ```i3 : isPolynomialRing S o3 = true``` ```i4 : gens S o4 = {x , x , x , x } 0 1 2 3 o4 : List``` ```i5 : degrees S o5 = {{1}, {1}, {1}, {1}} o5 : List``` ```i6 : numgens S == #rays PP3 o6 = true``` ```i7 : coefficientRing S o7 = QQ o7 : Ring```
For a product of projective spaces, the total coordinate ring has a bigrading.
 `i8 : X = projectiveSpace(2) ** projectiveSpace(3);` ```i9 : gens ring X o9 = {x , x , x , x , x , x , x } 0 1 2 3 4 5 6 o9 : List``` ```i10 : degrees ring X o10 = {{1, 0}, {1, 0}, {1, 0}, {0, 1}, {0, 1}, {0, 1}, {0, 1}} o10 : List```
A Hirzebruch surface also has a 2-grading.
 `i11 : FF3 = hirzebruchSurface 3;` ```i12 : gens ring FF3 o12 = {x , x , x , x } 0 1 2 3 o12 : List``` ```i13 : degrees ring FF3 o13 = {{1, 0}, {-3, 1}, {1, 0}, {0, 1}} o13 : List```

## Caveat

The total coordinate ring is not yet implemented when the toric variety is degenerate or the class group has torsion.