Macaulay2 » Documentation
Packages » NormalToricVarieties :: normalToricVariety(Polyhedron)
next | previous | forward | backward | up | index | toc

# normalToricVariety(Polyhedron) -- make a normal toric variety from a 'Polyhedra' polyhedron

- Function: normalToricVariety
- Usage:
    `normalToricVariety P`
- Inputs:
  - P, a convex polyhedron, whose vertices are lattice points
- Optional inputs:
  - CoefficientRing => a ring, default value QQ, that determines the coefficient ring of the total coordinate ring
  - MinimalGenerators => a Boolean value, default value false, unused
  - Variable => a symbol, default value x, that specifies the base name for the indexed variables in the total coordinate ring
  - WeilToClass => a matrix, default value null, that specifies the map from the group of torus-invariant Weil divisors to the class group
- Outputs:
  - a normal toric variety, determined by the lattice polytope

## Description

This method makes a NormalToricVariety from a Polyhedron as implemented in the Polyhedra package. In particular, the associated fan is inner normal fan to the polyhedron.

    i1 : P = convexHull (id_(ZZ^3) | -id_(ZZ^3));

    i2 : fVector P

    o2 = {6, 12, 8, 1}

    o2 : List

    i3 : vertices P

    o3 = | -1 1 0  0 0  0 |
         | 0  0 -1 1 0  0 |
         | 0  0 0  0 -1 1 |

                  3       6
    o3 : Matrix QQ  <-- QQ

    i4 : X = normalToricVariety P;

    i5 : rays X

    o5 = {{-1, -1, -1}, {1, -1, -1}, {-1, 1, -1}, {1, 1, -1}, {-1, -1, 1}, {1,
         ------------------------------------------------------------------------
         -1, 1}, {-1, 1, 1}, {1, 1, 1}}

    o5 : List

    i6 : max X

    o6 = {{0, 1, 2, 3}, {0, 1, 4, 5}, {0, 2, 4, 6}, {1, 3, 5, 7}, {2, 3, 6, 7},
         ------------------------------------------------------------------------
         {4, 5, 6, 7}}

    o6 : List

    i7 : picardGroup X

           1
    o7 = ZZ

    o7 : ZZ-module, free

When the polyhedron is not full-dimensional, restricting to the smallest linear subspace that contains the polyhedron guarantees that normal fan is strongly convex.

    i8 : P = convexHull transpose matrix unique permutations {1,1,0,0};

    i9 : assert not isFullDimensional P

    i10 : fVector P

    o10 = {6, 12, 8, 1}

    o10 : List

    i11 : X = normalToricVariety P;

    i12 : assert (dim P === dim X)

    i13 : rays X

    o13 = {{-1, 0, 0}, {1, 0, 0}, {0, -1, 0}, {0, 1, 0}, {0, 0, -1}, {-1, -1,
          -----------------------------------------------------------------------
          -1}, {0, 0, 1}, {1, 1, 1}}

    o13 : List

    i14 : max X

    o14 = {{0, 2, 5, 6}, {0, 3, 4, 5}, {0, 3, 6, 7}, {1, 2, 4, 5}, {1, 2, 6, 7},
          -----------------------------------------------------------------------
          {1, 3, 4, 7}}

    o14 : List

    i15 : assert (8 === #rays X)

    i16 : assert (6 === #max X)

    i17 : picardGroup X

            1
    o17 = ZZ

    o17 : ZZ-module, free

The recommended method for creating a NormalToricVariety from a polytope is normalToricVariety(Matrix). In fact, this package avoids using objects from the Polyhedra whenever possible. Here is a trivial example, namely projective 2-space, illustrating the increase in time resulting from the use of a Polyhedra polyhedron.

    i18 : vertMatrix = matrix {{0,1,0},{0,0,1}}

    o18 = | 0 1 0 |
          | 0 0 1 |

                   2       3
    o18 : Matrix ZZ  <-- ZZ

    i19 : X1 = time normalToricVariety convexHull (vertMatrix);
     -- used 0.0231457s (cpu); 0.0231456s (thread); 0s (gc)

    i20 : X2 = time normalToricVariety vertMatrix;
     -- used 0.00255334s (cpu); 0.00255443s (thread); 0s (gc)

    i21 : assert (set rays X2 === set rays X1 and max X1 === max X2)

## See also

- making normal toric varieties -- information about the basic constructors
- normalToricVariety(Matrix) -- make a normal toric variety from a polytope

## Ways to use this method:

- normalToricVariety(Polyhedron) -- make a normal toric variety from a 'Polyhedra' polyhedron

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/NormalToricVarieties/ToricVarietiesDocumentation.m2:1306:0.