This is LatticePolytopes.info, produced by Macaulay2, version 1.25.11

LatticePolytopes -- for computations with lattice polytopes
***********************************************************

Description
===========

A lattice polytope is a bounded object of the type Polyhedron (Polyhedra).
This package is focused on functions that are specific
for lattice polytopes rather than general polyhedra. Examples of such methods
are isCayley, , cayley, and randZPoly.
Moreover the package contains known classifications of smooth
2-polytopes with up to 12 lattice points and smooth 3-polytopes with up to 16
lattice points. These classifications are accessible via the functions
listSmooth2D, and listSmooth3D,

LatticePolytopes uses the Polyhedra, package by René
Birkner (see http://page.mi.fu-berlin.de/rbirkner/ ) and the
NormalToricVarieties, package by Gregory Smith (see
http://www.mast.queensu.ca/~ggsmith/ )

The following is an example illustrating the main functions provided in the
package.
  * Working with lattice polytopes

For an introduction to polytopes, we recommend Günter M. Ziegler's (see
http://www.math.tu-berlin.de/~ziegler/ ) Lectures on Polytopes, Graduate Texts
in Mathematics 152, Springer-Verlag, New York, 1995.

Authors
=======

  * Anders Lundman (see http://www.math.kth.se/~alundman )
    <alundman@math.kth.se>
  * Gustav Sædén Ståhl (see http://www.math.kth.se/~gss ) <gss@math.kth.se>

Version
=======

This documentation describes version 1.0 of LatticePolytopes, released May 4,
2015.

Citation
========

If you have used this package in your research, please cite it as follows:

+----------------------------------------------------------------------------+
|@misc{LatticePolytopesSource,                                               |
|  title = {{LatticePolytopes: A \emph{Macaulay2} package. Version~1.0}},    |
|  author = {Anders Lundman and Gustav S{\ae}d{\'e}n St{\aa}hl},             |
|  howpublished = {A \emph{Macaulay2} package available at                   |
|    \url{https://github.com/Macaulay2/M2/tree/stable/M2/Macaulay2/packages}}|
|}                                                                           |
|                                                                            |
+----------------------------------------------------------------------------+

Exports
=======

  * Functions and commands
      * adjointPolytope -- computes the adjoint of a
        polytope
      * ambientHalfspaces -- gives the defining
        halfspaces of a polytope
      * areIsomorphic -- checks if two smooth polytopes
        are isomorphic
      * cayley -- constructs the Cayley sum of polytopes
      * codegree -- computes the codegree of a polytope
      * degreeOfJetSeparation -- computes the
        degree of jetSeparation at a given point
      * epsilonBounds -- computes bounds for the Seshadri
        constant a general point
      * gaussFiber -- computes the general fiber of the
        Gauss map
      * gaussImage -- computes the image the Gauss map
      * gausskFiber -- computes the general fiber of the
        Gauss map of order k
      * gausskImage -- computes the image of the Gauss map
        of order k
      * isCayley -- checks if a polytope is Cayley
      * isJetSpanned -- checks if the polarized toric
        variety associated to a set of lattice points is k-jet spanned at a
        given point.
      * iskCayleykEdges -- Checks if a polytope is
        Cayley of type [P_0*P_1]^k and has every edge of length k
      * jetMatrix -- construct the matrix of k-jets evaluated
        at a given point.
      * listSmooth2D -- gives the list of all smooth
        2-polytopes with up to 12 lattice points
      * listSmooth3D -- gives the list of all smooth
        3-polytopes with up to 16 lattice points
      * randQPoly -- gives a random rational polytope
      * randZPoly -- gives a random lattice polytope
      * toricBlowUp -- calculates the stellar subdivision
        of a polytope at a given face.
      * toricDiv -- constructs the toric Weil divisor
        associated to a polytope
      * torusEmbedding -- gives the toric embedding
        corresponding to a set of lattice points
  * Methods
      * "adjointPolytope(Matrix,ZZ)" -- see adjointPolytope,
        -- computes the adjoint of a polytope
      * "adjointPolytope(Polyhedron,ZZ)" -- see adjointPolytope,
        -- computes the adjoint of a polytope
      * "ambientHalfspaces(Polyhedron)" -- see ambientHalfspaces,
        -- gives the defining halfspaces of a polytope
      * "areIsomorphic(Matrix,Matrix)" -- see areIsomorphic,
        -- checks if two smooth polytopes are isomorphic
      * "areIsomorphic(Polyhedron,Polyhedron)" -- see areIsomorphic,
        -- checks if two smooth polytopes are isomorphic
      * "cayley(List)" -- see cayley, -- constructs the Cayley
        sum of polytopes
      * "cayley(List,ZZ)" -- see cayley, -- constructs the Cayley
        sum of polytopes
      * "cayley(Matrix,Matrix)" -- see cayley, -- constructs the
        Cayley sum of polytopes
      * "cayley(Matrix,Matrix,Matrix)" -- see cayley, --
        constructs the Cayley sum of polytopes
      * "cayley(Matrix,Matrix,Matrix,ZZ)" -- see cayley, --
        constructs the Cayley sum of polytopes
      * "cayley(Matrix,Matrix,ZZ)" -- see cayley, -- constructs
        the Cayley sum of polytopes
      * "cayley(Polyhedron,Polyhedron)" -- see cayley, --
        constructs the Cayley sum of polytopes
      * "cayley(Polyhedron,Polyhedron,Polyhedron)" -- see cayley,
        -- constructs the Cayley sum of polytopes
      * "cayley(Polyhedron,Polyhedron,Polyhedron,ZZ)" -- see cayley,
        -- constructs the Cayley sum of polytopes
      * "cayley(Polyhedron,Polyhedron,ZZ)" -- see cayley, --
        constructs the Cayley sum of polytopes
      * "codegree(Matrix)" -- see codegree, -- computes the
        codegree of a polytope
      * "codegree(Polyhedron)" -- see codegree, -- computes the
        codegree of a polytope
      * "degreeOfJetSeparation(List,Matrix)" -- see
        degreeOfJetSeparation, -- computes the degree of
        jetSeparation at a given point
      * "degreeOfJetSeparation(Matrix,Matrix)" -- see
        degreeOfJetSeparation, -- computes the degree of
        jetSeparation at a given point
      * "epsilonBounds(Polyhedron,ZZ)" -- see epsilonBounds,
        -- computes bounds for the Seshadri constant a general
        point
      * "gaussFiber(List)" -- see gaussFiber, -- computes the
        general fiber of the Gauss map
      * "gaussFiber(Matrix)" -- see gaussFiber, -- computes
        the general fiber of the Gauss map
      * "gaussImage(List)" -- see gaussImage, -- computes the
        image the Gauss map
      * "gaussImage(Matrix)" -- see gaussImage, -- computes
        the image the Gauss map
      * "gausskFiber(List,ZZ)" -- see gausskFiber, --
        computes the general fiber of the Gauss map of order k
      * "gausskFiber(Matrix,ZZ)" -- see gausskFiber, --
        computes the general fiber of the Gauss map of order k
      * "gausskImage(List,ZZ)" -- see gausskImage, --
        computes the image of the Gauss map of order k
      * "gausskImage(Matrix,ZZ)" -- see gausskImage, --
        computes the image of the Gauss map of order k
      * "isCayley(Matrix)" -- see isCayley, -- checks if a
        polytope is Cayley
      * "isCayley(Polyhedron)" -- see isCayley, -- checks if a
        polytope is Cayley
      * "isJetSpanned(List,ZZ,Matrix)" -- see isJetSpanned,
        -- checks if the polarized toric variety associated to a set of lattice
        points is k-jet spanned at a given point.
      * "isJetSpanned(Matrix,ZZ,Matrix)" -- see isJetSpanned,
        -- checks if the polarized toric variety associated to a
        set of lattice points is k-jet spanned at a given point.
      * "iskCayleykEdges(Polyhedron)" -- see iskCayleykEdges,
        -- Checks if a polytope is Cayley of type [P_0*P_1]^k
        and has every edge of length k
      * "jetMatrix(List,ZZ)" -- see jetMatrix, -- construct
        the matrix of k-jets evaluated at a given point.
      * "jetMatrix(List,ZZ,Matrix)" -- see jetMatrix, --
        construct the matrix of k-jets evaluated at a given point.
      * "jetMatrix(Matrix,ZZ)" -- see jetMatrix, -- construct
        the matrix of k-jets evaluated at a given point.
      * "jetMatrix(Matrix,ZZ,Matrix)" -- see jetMatrix, --
        construct the matrix of k-jets evaluated at a given point.
      * "randQPoly(ZZ,ZZ)" -- see randQPoly, -- gives a random
        rational polytope
      * "randZPoly(ZZ,ZZ)" -- see randZPoly, -- gives a random
        lattice polytope
      * "randZPoly(ZZ,ZZ,ZZ)" -- see randZPoly, -- gives a
        random lattice polytope
      * "toricBlowUp(Matrix,Matrix)" -- see toricBlowUp, --
        calculates the stellar subdivision of a polytope at a given face.
      * "toricBlowUp(Matrix,Matrix,ZZ)" -- see toricBlowUp,
        -- calculates the stellar subdivision of a polytope at a given face.
      * "toricBlowUp(Polyhedron,Polyhedron)" -- see toricBlowUp,
        -- calculates the stellar subdivision of a polytope at a
        given face.
      * "toricBlowUp(Polyhedron,Polyhedron,ZZ)" -- see toricBlowUp,
        -- calculates the stellar subdivision of a polytope at a
        given face.
      * "toricDiv(Matrix)" -- see toricDiv, -- constructs the
        toric Weil divisor associated to a polytope
      * "toricDiv(Polyhedron)" -- see toricDiv, -- constructs
        the toric Weil divisor associated to a polytope
      * "torusEmbedding(List)" -- see torusEmbedding, --
        gives the toric embedding corresponding to a set of lattice points
      * "torusEmbedding(Matrix)" -- see torusEmbedding,
        -- gives the toric embedding corresponding to a set of lattice points
  * Symbols
      * smoothTest (missing documentation)

For the programmer
==================

The object LatticePolytopes, is a package (Macaulay2Doc),
defined in LatticePolytopes.m2.

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:731:0.

adjointPolytope -- computes the adjoint of a polytope
*****************************************************

  * Usage:
        adjointPolytope(X,k)
  * Inputs:
      * X, a convex polyhedron (Polyhedra),  or a a
        matrix (Macaulay2Doc), where the columns are the vertice points
      * k, an integer (Macaulay2Doc),  an integer.
  * Outputs:
      * a convex polyhedron (Polyhedra), The adjoint Polytope
        of X corresponding to the line bundle kK+L, see the article Polyhedral
        adjunction theory (see http://msp.org/ant/2013/7-10/p02.xhtml ) by
        Sandra Di Rocco, Christian Haase, Benjamin Nill and Andreas Paffenholz.

Description
===========

adjointPolytope is a function that compute the k:th adjoint of a polytope
+-----------------------------------------------------------------------------+
|i1 : adjointPolytope(hypercube(2),1)                                         |
|Warning: This method is deprecated and will be removed in version 1.11 of    |
|                                                                             |
|o1 = Polyhedron{...1...}                                                     |
|                                                                             |
|o1 : Polyhedron                                                              |
|-----------------------------------------------------------------------------|
|Polyhedra. Please consider using polyhedronFromHData instead.                |
+-----------------------------------------------------------------------------+

Ways to use adjointPolytope:
============================

  * "adjointPolytope(Matrix,ZZ)"
  * "adjointPolytope(Polyhedron,ZZ)"

For the programmer
==================

The object adjointPolytope, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1198:0.

ambientHalfspaces -- gives the defining halfspaces of a polytope
****************************************************************

  * Usage:
        (A,b) = ambientHalfspaces(P)
  * Inputs:
      * P, a convex polyhedron (Polyhedra),
  * Outputs:
      * a sequence (Macaulay2Doc), (A,b) where A is a a
        matrix (Macaulay2Doc), and b is a column vector of class a
        matrix (Macaulay2Doc), where each row corresponds to a
        halfspace.

Description
===========

ambientHalfspaces is a function. It provides the halfspace description of a
polytope in the ambient space. The function halfspaces instead gives the
halfspace description in the affine span of the polytope.
+------------------------------------------------------+
|i1 : halfspaces(convexHull matrix{{0,1},{0,0}})       |
|                                                      |
|o1 = (| -1 0 |, | 0 |)                                |
|      | 1  0 |  | 1 |                                 |
|                                                      |
|o1 : Sequence                                         |
+------------------------------------------------------+
|i2 : ambientHalfspaces(convexHull matrix{{0,1},{0,0}})|
|                                                      |
|o2 = (| -1 0  |, | 0 |)                               |
|      | 1  0  |  | 1 |                                |
|      | 0  1  |  | 0 |                                |
|      | 0  -1 |  | 0 |                                |
|                                                      |
|o2 : Sequence                                         |
+------------------------------------------------------+

Ways to use ambientHalfspaces:
==============================

  * "ambientHalfspaces(Polyhedron)"

For the programmer
==================

The object ambientHalfspaces, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1178:0.

areIsomorphic -- checks if two smooth polytopes are isomorphic
**************************************************************

  * Usage:
        areIsomorphic(P,Q),
        areIsomorphic(M,N)
  * Inputs:
      * P, a convex polyhedron (Polyhedra),
      * Q, a convex polyhedron (Polyhedra),
      * M, a matrix (Macaulay2Doc),
      * N, a matrix (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * smoothTest (missing documentation) => ..., default value true,
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

Checks if two smooth polytopes P and Q are isomorphic, i.e. checks if there
exist a unitary matrix A with integer entries and a vector v such that Q=A*P+v.
Currently the function only works on smooth polytopes.

+---------------------------------+
|i1 : P=convexHull(matrix{{0,1}});|
+---------------------------------+
|i2 : Q=convexHull(matrix{{0,2}});|
+---------------------------------+
|i3 : areIsomorphic(P,Q)          |
|                                 |
|o3 = false                       |
+---------------------------------+

As a standard, areIsomorphic will check if the polytopes are smooth first. This
takes some time, so if one is sure that they are smooth then it is possible to
suppress this test.

+-----------------------------------------------------------------------------+
|i4 : M = transpose matrix{{0,0,0},{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,|
|                                                                             |
|o4 = | 0 1 0 0 1 1 0 1 |                                                     |
|     | 0 0 1 0 1 0 1 1 |                                                     |
|     | 0 0 0 1 0 1 1 1 |                                                     |
|                                                                             |
|              3       8                                                      |
|o4 : Matrix ZZ  <-- ZZ                                                       |
|-----------------------------------------------------------------------------|
|1,1},{1,1,1}}                                                                |
+-----------------------------------------------------------------------------+
|i5 : P = convexHull(M);                                                      |
+-----------------------------------------------------------------------------+
|i6 : time areIsomorphic(P,P);                                                |
| -- used 0.695583s (cpu); 0.60373s (thread); 0s (gc)                         |
+-----------------------------------------------------------------------------+
|i7 : time areIsomorphic(P,P,smoothTest=>false);                              |
| -- used 0.485007s (cpu); 0.420226s (thread); 0s (gc)                        |
+-----------------------------------------------------------------------------+

Ways to use areIsomorphic:
==========================

  * "areIsomorphic(Matrix,Matrix)"
  * "areIsomorphic(Polyhedron,Polyhedron)"

For the programmer
==================

The object areIsomorphic, is a method function with options (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:888:0.

cayley -- constructs the Cayley sum of polytopes
************************************************

  * Usage:
        cayley(P1,P2),
        cayley(P1,P2,k),
        cayley(P1,P2,P3),
        cayley(P1,P2,P3,k),
        cayley(L),
        cayley(L,k),
        cayley(M1,M2),
        cayley(M1,M2,k),
        cayley(M1,M2,M3),
        cayley(M1,M2,M3,k)
  * Inputs:
      * P1, a convex polyhedron (Polyhedra),
      * P2, a convex polyhedron (Polyhedra),
      * P3, a convex polyhedron (Polyhedra),
      * M1, a matrix (Macaulay2Doc),
      * M2, a matrix (Macaulay2Doc),
      * M3, a matrix (Macaulay2Doc),
      * k, an integer (Macaulay2Doc),
      * L, a list (Macaulay2Doc),
  * Outputs:
      * a convex polyhedron (Polyhedra),

Description
===========

Given polytopes P and Q the function computes the cayley sum of P and Q.

+---------------------------------+
|i1 : P=convexHull(matrix{{0,1}});|
+---------------------------------+
|i2 : Q=convexHull(matrix{{0,2}});|
+---------------------------------+
|i3 : C=cayley(P,Q)               |
|                                 |
|o3 = C                           |
|                                 |
|o3 : Polyhedron                  |
+---------------------------------+
|i4 : vertices C                  |
|                                 |
|o4 = | 0 1 0 2 |                 |
|     | 0 0 1 1 |                 |
|                                 |
|              2       4          |
|o4 : Matrix QQ  <-- QQ           |
+---------------------------------+

One can also construct the Cayley polytope of order k by specifying the
positive integer k.

+-----------------------+
|i5 : C=cayley(P,Q,3)   |
|                       |
|o5 = C                 |
|                       |
|o5 : Polyhedron        |
+-----------------------+
|i6 : vertices C        |
|                       |
|o6 = | 0 1 0 2 |       |
|     | 0 0 3 3 |       |
|                       |
|              2       4|
|o6 : Matrix QQ  <-- QQ |
+-----------------------+

You can also compute the Cayley sum of several polytopes of any order, by
placing the polytopes in a list.

+----------------------------+
|i7 : C=cayley({P,Q,Q,P,P},2)|
|                            |
|o7 = C                      |
|                            |
|o7 : Polyhedron             |
+----------------------------+
|i8 : vertices C             |
|                            |
|o8 = | 0 1 0 2 0 2 0 1 0 1 ||
|     | 0 0 2 2 0 0 0 0 0 0 ||
|     | 0 0 0 0 2 2 0 0 0 0 ||
|     | 0 0 0 0 0 0 2 2 0 0 ||
|     | 0 0 0 0 0 0 0 0 2 2 ||
|                            |
|              5       10    |
|o8 : Matrix QQ  <-- QQ      |
+----------------------------+

See also
========

  * isCayley -- checks if a polytope is Cayley

Ways to use cayley:
===================

  * "cayley(List)"
  * "cayley(List,ZZ)"
  * "cayley(Matrix,Matrix)"
  * "cayley(Matrix,Matrix,Matrix)"
  * "cayley(Matrix,Matrix,Matrix,ZZ)"
  * "cayley(Matrix,Matrix,ZZ)"
  * "cayley(Polyhedron,Polyhedron)"
  * "cayley(Polyhedron,Polyhedron,Polyhedron)"
  * "cayley(Polyhedron,Polyhedron,Polyhedron,ZZ)"
  * "cayley(Polyhedron,Polyhedron,ZZ)"

For the programmer
==================

The object cayley, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:850:0.

codegree -- computes the codegree of a polytope
***********************************************

  * Usage:
        codegree(X)
  * Inputs:
      * X, a matrix (Macaulay2Doc), of vertices or a convex polyhedron (Polyhedra).
  * Outputs:
      * an integer (Macaulay2Doc), the codegree of X

Description
===========

codegree is a function that returns the codegree of a polytope.
+---------------------------+
|i1 : codegree(hypercube(4))|
|                           |
|o1 = 1                     |
+---------------------------+

Ways to use codegree:
=====================

  * "codegree(Matrix)"
  * "codegree(Polyhedron)"

For the programmer
==================

The object codegree, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1158:0.

degreeOfJetSeparation -- computes the degree of jetSeparation at a given point
******************************************************************************

  * Usage:
        degreeOfJetSeparation(A,pt)
  * Inputs:
      * A, a matrix (Macaulay2Doc),  or  a list (Macaulay2Doc),
        where the columns are lattice points
      * pt, a matrix (Macaulay2Doc), a point as a column vector
  * Outputs:
      * k, an integer (Macaulay2Doc), the maximal such that the
        embedding specified by A is k-jet spanned at pt

Description
===========

degreeOfJetSeparation is a function. Given the set of lattice points of a
convex polyhedron (Polyhedra), and a point a matrix (Macaulay2Doc),
it computes the maximal k such that the associated line
bundle is k-jet spanned at the point
+--------------------------------------+
|i1 : P=convexHull(matrix{{0,2}});     |
+--------------------------------------+
|i2 : Q=convexHull(matrix{{0,4}});     |
+--------------------------------------+
|i3 : A=latticePoints(cayley({P,Q},2));|
+--------------------------------------+
|i4 : pt=matrix{{1},{1}};              |
|                                      |
|              2       1               |
|o4 : Matrix ZZ  <-- ZZ                |
+--------------------------------------+
|i5 : degreeOfJetSeparation(A,pt)      |
|                                      |
|o5 = 2                                |
+--------------------------------------+

See also
========

  * isJetSpanned -- checks if the polarized toric variety
    associated to a set of lattice points is k-jet spanned at a given point.

Ways to use degreeOfJetSeparation:
==================================

  * "degreeOfJetSeparation(List,Matrix)"
  * "degreeOfJetSeparation(Matrix,Matrix)"

For the programmer
==================

The object degreeOfJetSeparation, is a
method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1319:0.

epsilonBounds -- computes bounds for the Seshadri constant a general point
**************************************************************************

  * Usage:
        epsilonBounds(P)
  * Inputs:
      * P, a convex polyhedron (Polyhedra), of dimension 2
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * L, a list (Macaulay2Doc), Containing bounds a and b such
        that a<=epsilon(X_P,L_P;1_P)<=b

Description
===========

epsilonBounds is a function. It computes bounds for the Seshadri constant at a
general point by applying a set of projections. The integer n determines which
projections are considered.
+---------------------------------------------+
|i1 : P=convexHull(matrix{{0,2}});            |
+---------------------------------------------+
|i2 : Q=convexHull(matrix{{0,4}});            |
+---------------------------------------------+
|i3 : R=cayley({P,Q},2);                      |
+---------------------------------------------+
|i4 : S=convexHull(matrix{{0,1,-1},{1,0,-1}});|
+---------------------------------------------+
|i5 : epsilonBounds(R,10)                     |
|                                             |
|o5 = {2, 2}                                  |
|                                             |
|o5 : List                                    |
+---------------------------------------------+
|i6 : epsilonBounds(S,10)                     |
|                                             |
|      3                                      |
|o6 = {-, 2}                                  |
|      2                                      |
|                                             |
|o6 : List                                    |
+---------------------------------------------+

See also
========

  * isJetSpanned -- checks if the polarized toric variety
    associated to a set of lattice points is k-jet spanned at a given point.

Ways to use epsilonBounds:
==========================

  * "epsilonBounds(Polyhedron,ZZ)"

For the programmer
==================

The object epsilonBounds, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1345:0.

gaussFiber -- computes the general fiber of the Gauss map
*********************************************************

  * Usage:
        gaussFiber(A)
  * Inputs:
      * A, a matrix (Macaulay2Doc),  or a list (Macaulay2Doc),
        where the columns are lattice points
  * Outputs:
      * a list (Macaulay2Doc), of monomials giving the torus
        embedding of an irreducible component of the general fiber of the Gauss
        map of the toric variety X_A

Description
===========

gaussFiber is a function. It computes an irreducible component of the general
fiber of the Gauss map as described in the paper Gauss Maps of Toric Varieties
(see http://arxiv.org/abs/1403.0793 )
+------------------------------------+
|i1 : P=convexHull(matrix{{0,1}});   |
+------------------------------------+
|i2 : Q=convexHull(matrix{{0}});     |
+------------------------------------+
|i3 : A=latticePoints(cayley({P,Q}));|
+------------------------------------+
|i4 : B=latticePoints(cayley({P,P}));|
+------------------------------------+
|i5 : gaussFiber(A)                  |
|                                    |
|o5 = {1, x , x }                    |
|          1   0                     |
|                                    |
|o5 : List                           |
+------------------------------------+
|i6 : gaussFiber(B)                  |
|                                    |
|o6 = {1}                            |
|                                    |
|o6 : List                           |
+------------------------------------+

See also
========

  * gausskFiber -- computes the general fiber of the Gauss
    map of order k
  * gaussImage -- computes the image the Gauss map
  * gausskImage -- computes the image of the Gauss map of
    order k

Ways to use gaussFiber:
=======================

  * "gaussFiber(List)"
  * "gaussFiber(Matrix)"

For the programmer
==================

The object gaussFiber, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1222:0.

gaussImage -- computes the image the Gauss map
**********************************************

  * Usage:
        gaussImage(A)
  * Inputs:
      * A, a matrix (Macaulay2Doc),  or a list (Macaulay2Doc),
        where the columns are lattice points
  * Outputs:
      * a list (Macaulay2Doc), of monomials giving the torus
        embedding via the Plücker embedding of the image of the Gauss map of
        the toric variety X_A

Description
===========

gaussImage is a function. It computes the image of the Gauss map embedded via
the Plücker embedding as described in the paper Gauss Maps of Toric Varieties
(see http://arxiv.org/abs/1403.0793 )
+------------------------------------+
|i1 : P=convexHull(matrix{{0,1}});   |
+------------------------------------+
|i2 : Q=convexHull(matrix{{0}});     |
+------------------------------------+
|i3 : A=latticePoints(cayley({P,Q}));|
+------------------------------------+
|i4 : B=latticePoints(cayley({P,P}));|
+------------------------------------+
|i5 : gaussImage(A)                  |
|                                    |
|o5 = {x x }                         |
|       0 1                          |
|                                    |
|o5 : List                           |
+------------------------------------+
|i6 : gaussImage(B)                  |
|                                    |
|               2   2     2 2        |
|o6 = {x x , x x , x x , x x }       |
|       0 1   0 1   0 1   0 1        |
|                                    |
|o6 : List                           |
+------------------------------------+

See also
========

  * gaussFiber -- computes the general fiber of the Gauss
    map
  * gausskFiber -- computes the general fiber of the Gauss
    map of order k
  * gausskImage -- computes the image of the Gauss map of
    order k

Ways to use gaussImage:
=======================

  * "gaussImage(List)"
  * "gaussImage(Matrix)"

For the programmer
==================

The object gaussImage, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1271:0.

gausskFiber -- computes the general fiber of the Gauss map of order k
*********************************************************************

  * Usage:
        gausskFiber(A,k)
  * Inputs:
      * A, a matrix (Macaulay2Doc),  or a a list (Macaulay2Doc),
        where the columns are lattice points
      * k, an integer (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), of monomials giving the torus
        embedding of an irreducible component of the general fiber of the Gauss
        map of order k for the generically k-jet spanned toric variety X_A

Description
===========

gausskFiber is a function. It computes an irreducible component of the general
fiber of the Gauss map order k as described in the paper A note on higher order
Gauss maps (see http://arxiv.org/abs/1410.4811 )
+----------------------------------------+
|i1 : P=hypercube(2,1);                  |
+----------------------------------------+
|i2 : Q=convexHull(matrix{{0}});         |
+----------------------------------------+
|i3 : A=latticePoints(P);                |
+----------------------------------------+
|i4 : B=latticePoints(cayley({Q,Q,Q},2));|
+----------------------------------------+
|i5 : gausskFiber(A,2)                   |
|                                        |
|o5 = {1}                                |
|                                        |
|o5 : List                               |
+----------------------------------------+
|i6 : gausskFiber(B,2)                   |
|                                        |
|              2             2           |
|o6 = {1, x , x , x , x x , x }          |
|          1   1   0   0 1   0           |
|                                        |
|o6 : List                               |
+----------------------------------------+

See also
========

  * gaussFiber -- computes the general fiber of the Gauss
    map
  * gaussImage -- computes the image the Gauss map
  * gausskImage -- computes the image of the Gauss map of
    order k

Ways to use gausskFiber:
========================

  * "gausskFiber(List,ZZ)"
  * "gausskFiber(Matrix,ZZ)"

For the programmer
==================

The object gausskFiber, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1247:0.

gausskImage -- computes the image of the Gauss map of order k
*************************************************************

  * Usage:
        gausskImage(A,k)
  * Inputs:
      * A, a matrix (Macaulay2Doc),  or a a list (Macaulay2Doc),
        where the columns are lattice points
      * k, an integer (Macaulay2Doc),
  * Outputs:
      * a list (Macaulay2Doc), of monomials giving the torus
        embedding via the Plücker embedding of the image of the Gauss map of
        order k for generically k-jet spanned the toric variety X_A

Description
===========

gausskImage is a function. It computes the image of the Gauss map of order k
embedded via the Plücker embedding as described in the paper A note on higher
order Gauss maps (see http://arxiv.org/abs/1410.4811 )
+-----------------------------------------------------------------------------+
|i1 : P=hypercube(2,1);                                                       |
+-----------------------------------------------------------------------------+
|i2 : Q=convexHull(matrix{{0}});                                              |
+-----------------------------------------------------------------------------+
|i3 : A=latticePoints(P);                                                     |
+-----------------------------------------------------------------------------+
|i4 : B=latticePoints(cayley({Q,Q,Q},2));                                     |
+-----------------------------------------------------------------------------+
|i5 : gausskImage(A,2)                                                        |
|                                                                             |
|       -2 -2   -2 -1   -2   -1 -2   -1 -1   -1   -2     -1     -2   -1       |
|o5 = {x  x  , x  x  , x  , x  x  , x  x  , x  , x  x , x  x , x  , x  , 1,   |
|       0  1    0  1    0    0  1    0  1    0    0  1   0  1   1    1        |
|     ------------------------------------------------------------------------|
|            -2     -1       -2 2   -1 2   2           2   2 -2   2 -1   2    |
|     x , x x  , x x  , x , x  x , x  x , x , x x , x x , x x  , x x  , x ,   |
|      1   0 1    0 1    0   0  1   0  1   1   0 1   0 1   0 1    0 1    0    |
|     ------------------------------------------------------------------------|
|      2     2 2                                                              |
|     x x , x x }                                                             |
|      0 1   0 1                                                              |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+
|i6 : gausskImage(B,2)                                                        |
|                                                                             |
|       4 4                                                                   |
|o6 = {x x }                                                                  |
|       0 1                                                                   |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

See also
========

  * gaussImage -- computes the image the Gauss map
  * gaussFiber -- computes the general fiber of the Gauss
    map
  * gausskFiber -- computes the general fiber of the Gauss
    map of order k

Ways to use gausskImage:
========================

  * "gausskImage(List,ZZ)"
  * "gausskImage(Matrix,ZZ)"

For the programmer
==================

The object gausskImage, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1295:0.

isCayley -- checks if a polytope is Cayley
******************************************

  * Usage:
        isCayley M,
        isCayley P
  * Inputs:
      * M, a matrix (Macaulay2Doc),
      * P, a convex polyhedron (Polyhedra),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

A lattice polytope is Cayley if its vertices are contained in two parallel
hyperplanes. The function isCayley checks this condition for a given polytope
P.

+-------------------+
|i1 : P=hypercube 3;|
+-------------------+
|i2 : isCayley(P)   |
|                   |
|o2 = true          |
+-------------------+

One can also input a matrix M to the function isCayley. In this case the
function checks if the convex hull och the columns of M is a Cayley polytope.

+-------------------------------------+
|i3 : isCayley matrix{{0,2,0},{0,0,2}}|
|                                     |
|o3 = true                            |
+-------------------------------------+

See also
========

  * cayley -- constructs the Cayley sum of polytopes

Ways to use isCayley:
=====================

  * "isCayley(Matrix)"
  * "isCayley(Polyhedron)"

For the programmer
==================

The object isCayley, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:785:0.

isJetSpanned -- checks if the polarized toric variety associated to a set of lattice points is k-jet spanned at a given point.
******************************************************************************************************************************

  * Usage:
        isJetSpanned(A,k,pt)
  * Inputs:
      * A, a matrix (Macaulay2Doc),
      * k, an integer (Macaulay2Doc),
      * pt, a matrix (Macaulay2Doc),
  * Outputs:
      * a Boolean value (Macaulay2Doc),

Description
===========

The function checks if the polarized toric variety associated to the set of
lattice points A is k-jet spanned at the point pt.

+---------------------------------------------------------+
|i1 : A=latticePoints(convexHull(matrix{{0,0,2},{0,2,0}}))|
|                                                         |
|o1 = {0, | 0 |, | 0 |, | 1 |, | 1 |, | 2 |}              |
|         | 1 |  | 2 |  | 0 |  | 1 |  | 0 |               |
|                                                         |
|o1 : List                                                |
+---------------------------------------------------------+
|i2 : pt=matrix{{1},{1}}                                  |
|                                                         |
|o2 = | 1 |                                               |
|     | 1 |                                               |
|                                                         |
|              2       1                                  |
|o2 : Matrix ZZ  <-- ZZ                                   |
+---------------------------------------------------------+
|i3 : isJetSpanned(A,2,pt)                                |
|                                                         |
|o3 = true                                                |
+---------------------------------------------------------+

See also
========

  * jetMatrix -- construct the matrix of k-jets evaluated at
    a given point.

Ways to use isJetSpanned:
=========================

  * "isJetSpanned(List,ZZ,Matrix)"
  * "isJetSpanned(Matrix,ZZ,Matrix)"

For the programmer
==================

The object isJetSpanned, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1064:0.

iskCayleykEdges -- Checks if a polytope is Cayley of type [P_0*P_1]^k and has every edge of length k
****************************************************************************************************

  * Usage:
        iskCayleykEdges(P)
  * Inputs:
      * P, a convex polyhedron (Polyhedra),
  * Outputs:
      * L, a sequence (Macaulay2Doc), (P_0,P_1,k) such that
        conditions are satisfied. Or declare that conditions are not satisfied.

Description
===========

iskCayleykEdges is a function. It checks if at given polytope is of type
[P_0*P_1]^k with every edge of length k
+----------------------------------+
|i1 : P=convexHull(matrix{{0,2}}); |
+----------------------------------+
|i2 : Q1=convexHull(matrix{{0,4}});|
+----------------------------------+
|i3 : Q2=convexHull(matrix{{0,3}});|
+----------------------------------+
|i4 : R1=cayley({P,Q1},2);         |
+----------------------------------+
|i5 : R2=cayley({P,Q2},2);         |
+----------------------------------+
|i6 : (P0,P1,k)=iskCayleykEdges(R1)|
|                                  |
|o6 = (P0, P1, 2)                  |
|                                  |
|o6 : Sequence                     |
+----------------------------------+
|i7 : vertices(P0)                 |
|                                  |
|o7 = | 0 2 |                      |
|     | 0 0 |                      |
|                                  |
|              2       2           |
|o7 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i8 : vertices(P1)                 |
|                                  |
|o8 = | 0 4 |                      |
|     | 2 2 |                      |
|                                  |
|              2       2           |
|o8 : Matrix QQ  <-- QQ            |
+----------------------------------+
|i9 : iskCayleykEdges(R2)          |
|Conditions not met                |
+----------------------------------+

See also
========

  * isCayley -- checks if a polytope is Cayley

Ways to use iskCayleykEdges:
============================

  * "iskCayleykEdges(Polyhedron)"

For the programmer
==================

The object iskCayleykEdges, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1372:0.

jetMatrix -- construct the matrix of k-jets evaluated at a given point.
***********************************************************************

  * Usage:
        jetMatrix(A,k,pt)
  * Inputs:
      * A, a matrix (Macaulay2Doc),
      * k, an integer (Macaulay2Doc),
      * pt, a matrix (Macaulay2Doc),
  * Outputs:
      * a matrix (Macaulay2Doc),

Description
===========

The function constructs the matrix of k-jets evaluated at the point pt for the
polarized toric variety associated to the set of lattice points A.

+---------------------------------------------------------+
|i1 : A=latticePoints(convexHull(matrix{{0,0,2},{0,2,0}}))|
|                                                         |
|o1 = {0, | 0 |, | 0 |, | 1 |, | 1 |, | 2 |}              |
|         | 1 |  | 2 |  | 0 |  | 1 |  | 0 |               |
|                                                         |
|o1 : List                                                |
+---------------------------------------------------------+
|i2 : pt=matrix{{1},{1}}                                  |
|                                                         |
|o2 = | 1 |                                               |
|     | 1 |                                               |
|                                                         |
|              2       1                                  |
|o2 : Matrix ZZ  <-- ZZ                                   |
+---------------------------------------------------------+
|i3 : jetMatrix(A,2,pt)                                   |
|                                                         |
|o3 = | 1 1 1 1 1 1 |                                     |
|     | 0 0 0 1 1 2 |                                     |
|     | 0 0 0 0 0 2 |                                     |
|     | 0 0 0 0 1 0 |                                     |
|     | 0 1 2 0 1 0 |                                     |
|     | 0 0 2 0 0 0 |                                     |
|                                                         |
|              6       6                                  |
|o3 : Matrix ZZ  <-- ZZ                                   |
+---------------------------------------------------------+

If no point is provided the matrix of k-jets is provided as a matrix over a
polynomial ring.

+---------------------------------------------------------+
|i4 : A=latticePoints(convexHull(matrix{{0,0,2},{0,2,0}}))|
|                                                         |
|o4 = {0, | 0 |, | 0 |, | 1 |, | 1 |, | 2 |}              |
|         | 1 |  | 2 |  | 0 |  | 1 |  | 0 |               |
|                                                         |
|o4 : List                                                |
+---------------------------------------------------------+
|i5 : jetMatrix(A,2)                                      |
|                                                         |
|o5 = | 1 x_1 x_1^2 x_0 x_0x_1 x_0^2 |                    |
|     | 0 0   0     1   x_1    2x_0  |                    |
|     | 0 0   0     0   0      2     |                    |
|     | 0 0   0     0   1      0     |                    |
|     | 0 1   2x_1  0   x_0    0     |                    |
|     | 0 0   2     0   0      0     |                    |
|                                                         |
|                        6                 6              |
|o5 : Matrix (ZZ[x ..x ])  <-- (ZZ[x ..x ])               |
|                 0   1             0   1                 |
+---------------------------------------------------------+

See also
========

  * isJetSpanned -- checks if the polarized toric variety
    associated to a set of lattice points is k-jet spanned at a given point.

Ways to use jetMatrix:
======================

  * "jetMatrix(List,ZZ)"
  * "jetMatrix(List,ZZ,Matrix)"
  * "jetMatrix(Matrix,ZZ)"
  * "jetMatrix(Matrix,ZZ,Matrix)"

For the programmer
==================

The object jetMatrix, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1101:0.

listSmooth2D -- gives the list of all smooth 2-polytopes with up to 12 lattice points
*************************************************************************************

  * Usage:
        listSmooth2D()
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Provides the list of all smooth 2-polytopes with up to 12 lattice points based
on the classification by  Benjamin Lorenz.

+----------------------+
|i1 : L=listSmooth2D();|
+----------------------+

One can then check how many of these are Cayley.

+----------------------------+
|i2 : tally apply(L,isCayley)|
|                            |
|o2 = Tally{false => 8}      |
|           true => 33       |
|                            |
|o2 : Tally                  |
+----------------------------+

See also
========

  * listSmooth3D -- gives the list of all smooth
    3-polytopes with up to 16 lattice points
  * isCayley -- checks if a polytope is Cayley

For the programmer
==================

The object listSmooth2D, is a function closure (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:950:0.

listSmooth3D -- gives the list of all smooth 3-polytopes with up to 16 lattice points
*************************************************************************************

  * Usage:
        listSmooth3D()
  * Outputs:
      * a list (Macaulay2Doc),

Description
===========

Provides the list of all smooth 3-polytopes with up to 16 lattice points based
on the classification by Anders Lundman.

+----------------------+
|i1 : L=listSmooth3D();|
+----------------------+

A. Lundman claims that 99 of the listed polytopes are Cayley. This can readily
be tested.

+----------------------------+
|i2 : #L                     |
|                            |
|o2 = 103                    |
+----------------------------+
|i3 : tally apply(L,isCayley)|
|                            |
|o3 = Tally{false => 4}      |
|           true => 99       |
|                            |
|o3 : Tally                  |
+----------------------------+

See also
========

  * listSmooth2D -- gives the list of all smooth
    2-polytopes with up to 12 lattice points
  * isCayley -- checks if a polytope is Cayley

For the programmer
==================

The object listSmooth3D, is a function closure (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:978:0.

randQPoly -- gives a random rational polytope
*********************************************

  * Usage:
        randQPoly(v,n)
  * Inputs:
      * v, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
  * Outputs:
      * a convex polyhedron (Polyhedra),

Description
===========

Given integers v and n this function returns a random rational polytope with v
vertices in ambient dimension n, such that the vertices lie close to the unit
n-sphere.

+-----------------------------------------------------------------------------+
|i1 : P=randQPoly(5,3)                                                        |
|                                                                             |
|o1 = P                                                                       |
|                                                                             |
|o1 : Polyhedron                                                              |
+-----------------------------------------------------------------------------+
|i2 : vertices P                                                              |
|                                                                             |
|o2 = | -25635085/29623471                  -52716571/58307795                |
|     | -135404657/603997032                38472626/340858829                |
|     | -8074150053793509/18014398509481984 -74703605/181263738               |
|     ------------------------------------------------------------------------|
|     -145722081/549303688 -186849956/201457317 -176083960/237806033 |        |
|     -77014985/96080674   87302468/521543421   23501683/40146693    |        |
|     -41861883/78125000   98791658/295540837   64221107/194481586   |        |
|                                                                             |
|              3       5                                                      |
|o2 : Matrix QQ  <-- QQ                                                       |
+-----------------------------------------------------------------------------+

See also
========

  * randZPoly -- gives a random lattice polytope

Ways to use randQPoly:
======================

  * "randQPoly(ZZ,ZZ)"

For the programmer
==================

The object randQPoly, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1004:0.

randZPoly -- gives a random lattice polytope
********************************************

  * Usage:
        randZPoly(v,n)
        randZPoly(v,n,e)
  * Inputs:
      * v, an integer (Macaulay2Doc),
      * n, an integer (Macaulay2Doc),
      * e, an integer (Macaulay2Doc),
  * Outputs:
      * a convex polyhedron (Polyhedra),

Description
===========

Given integers v and n this function returns a random lattice polytope with v
vertices in ambient dimension n contained in [-1000,1000]^n.

+---------------------------------+
|i1 : P=randZPoly(5,3)            |
|                                 |
|o1 = P                           |
|                                 |
|o1 : Polyhedron                  |
+---------------------------------+
|i2 : vertices P                  |
|                                 |
|o2 = | -265 -865 -904 -740 -927 ||
|     | -802 -224 113  585  167  ||
|     | -536 -448 -412 330  334  ||
|                                 |
|              3       5          |
|o2 : Matrix QQ  <-- QQ           |
+---------------------------------+

You can also specify an integer e. This has the effect of changing the
randomisation procedure so that a random polytope in [-10^e,10^e]^n is
returned.

+-------------------------------------------+
|i3 : P=randZPoly(5,3,5)                    |
|                                           |
|o3 = P                                     |
|                                           |
|o3 : Polyhedron                            |
+-------------------------------------------+
|i4 : vertices P                            |
|                                           |
|o4 = | 3297   61657  62920  -64604 -92414 ||
|     | -49728 -20276 -40785 45628  14550  ||
|     | -86696 -76074 -66164 -61192 35327  ||
|                                           |
|              3       5                    |
|o4 : Matrix QQ  <-- QQ                     |
+-------------------------------------------+

See also
========

  * randQPoly -- gives a random rational polytope

Ways to use randZPoly:
======================

  * "randZPoly(ZZ,ZZ)"
  * "randZPoly(ZZ,ZZ,ZZ)"

For the programmer
==================

The object randZPoly, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1038:0.

smoothTest
**********

Functions with optional argument named smoothTest:
==================================================

  * areIsomorphic(...,smoothTest=>...) (missing documentation)

For the programmer
==================

The object smoothTest (missing documentation) is a symbol (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in currentString:1:394.

toricBlowUp -- calculates the stellar subdivision of a polytope at a given face.
********************************************************************************

  * Usage:
        toricBlowUp(P,Q),
        toricBlowUp(P,Q,k),
        toricBlowUp(M,N),
        toricBlowUp(M,N,k)
  * Inputs:
      * P, a convex polyhedron (Polyhedra),
      * Q, a convex polyhedron (Polyhedra),
      * M, a matrix (Macaulay2Doc),
      * N, a matrix (Macaulay2Doc),
      * k, an integer (Macaulay2Doc),
  * Outputs:
      * a convex polyhedron (Polyhedra),

Description
===========

Calculates the stellar subdivision of height k of a polytope P at the face Q.
This corresponds to constructing the embedding given by the global sections of
L-kE for the blow-up at the torus invariant subvariety associated to Q. Here L
is the ample line bundle on the toric variety corresponding to P and E is the
exceptional divisor.

+----------------------------------------------+
|i1 : P=cayley(matrix{{0,2,0}},matrix{{0,0,2}})|
|                                              |
|o1 = P                                        |
|                                              |
|o1 : Polyhedron                               |
+----------------------------------------------+
|i2 : vertices oo                              |
|                                              |
|o2 = | 0 2 0 2 |                              |
|     | 0 0 1 1 |                              |
|                                              |
|              2       4                       |
|o2 : Matrix QQ  <-- QQ                        |
+----------------------------------------------+
|i3 : Q=convexHull(matrix{(vertices P)_0})     |
|                                              |
|o3 = Q                                        |
|                                              |
|o3 : Polyhedron                               |
+----------------------------------------------+
|i4 : toricBlowUp(P,Q,1)                       |
|                                              |
|o4 = Polyhedron{...1...}                      |
|                                              |
|o4 : Polyhedron                               |
+----------------------------------------------+
|i5 : vertices oo                              |
|                                              |
|o5 = | 1 2 0 2 |                              |
|     | 0 0 1 1 |                              |
|                                              |
|              2       4                       |
|o5 : Matrix QQ  <-- QQ                        |
+----------------------------------------------+

Ways to use toricBlowUp:
========================

  * "toricBlowUp(Matrix,Matrix)"
  * "toricBlowUp(Matrix,Matrix,ZZ)"
  * "toricBlowUp(Polyhedron,Polyhedron)"
  * "toricBlowUp(Polyhedron,Polyhedron,ZZ)"

For the programmer
==================

The object toricBlowUp, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:923:0.

toricDiv -- constructs the toric Weil divisor associated to a polytope
**********************************************************************

  * Usage:
        toricDiv(X)
  * Inputs:
      * X, a matrix (Macaulay2Doc), of vertices or a convex polyhedron (Polyhedra).
  * Outputs:
      * a toric divisor (NormalToricVarieties),

Description
===========

toricDiv is a function. It returns a toric divisor (NormalToricVarieties),
corresponding to a polytope P on the toric
variety associated to the normal fan of P.
+-----------------------------------------------------------------------------+
|i1 : toricDiv(hypercube(2))                                                  |
|                                                                             |
|o1 = D  + D  + D  + D                                                        |
|      0    1    2    3                                                       |
|                                                                             |
|o1 : ToricDivisor on normalToricVariety ({{-1, 0}, {1, 0}, {0, -1}, {0, 1}}, |
|-----------------------------------------------------------------------------|
|{{0, 2}, {0, 3}, {1, 2}, {1, 3}})                                            |
+-----------------------------------------------------------------------------+

Ways to use toricDiv:
=====================

  * "toricDiv(Matrix)"
  * "toricDiv(Polyhedron)"

For the programmer
==================

The object toricDiv, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1139:0.

torusEmbedding -- gives the toric embedding corresponding to a set of lattice points
************************************************************************************

  * Usage:
        torusEmbedding(X)
  * Inputs:
      * X, a matrix (Macaulay2Doc), in which the columns are the
        lattice points or a list (Macaulay2Doc), of column vectors
  * Outputs:
      * a list (Macaulay2Doc), a list of monomials giving the
        embedding

Description
===========

torusEmbedding is a function. It takes a set of lattice points as input and
returns a list of monomials giving the corresponding torus embedding.
+--------------------------------------------+
|i1 : torusEmbedding(matrix{{0,1,2},{0,3,4}})|
|                                            |
|            3   2 4                         |
|o1 = {1, x x , x x }                        |
|          0 1   0 1                         |
|                                            |
|o1 : List                                   |
+--------------------------------------------+

Ways to use torusEmbedding:
===========================

  * "torusEmbedding(List)"
  * "torusEmbedding(Matrix)"

For the programmer
==================

The object torusEmbedding, is a method function (Macaulay2Doc).

-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:1120:0.

Working with lattice polytopes
******************************

Given a polytope (see Polyhedron (Polyhedra)) which is the
convexHull (Polyhedra), of a given set of points we might ask if the
polytope is a Cayley polytope
+------------------------------------------------+
|i1 : V = matrix {{0,2,-2,0},{0,1,1,1},{1,2,3,4}}|
|                                                |
|o1 = | 0 2 -2 0 |                               |
|     | 0 1 1  1 |                               |
|     | 1 2 3  4 |                               |
|                                                |
|              3       4                         |
|o1 : Matrix ZZ  <-- ZZ                          |
+------------------------------------------------+
|i2 : P = convexHull V                           |
|                                                |
|o2 = P                                          |
|                                                |
|o2 : Polyhedron                                 |
+------------------------------------------------+
|i3 : isCayley P                                 |
|                                                |
|o3 = true                                       |
+------------------------------------------------+

We can also construct Cayley polytopes by taking the Cayley sum of several
polytopes.
+----------------------------------------------------------+
|i4 : P2 = convexHull matrix{{0,1,2,3},{0,5,5,5},{1,2,3,2}}|
|                                                          |
|o4 = P2                                                   |
|                                                          |
|o4 : Polyhedron                                           |
+----------------------------------------------------------+
|i5 : cayley(P,P2,2)                                       |
|                                                          |
|o5 = Polyhedron{...1...}                                  |
|                                                          |
|o5 : Polyhedron                                           |
+----------------------------------------------------------+
|i6 : vertices oo                                          |
|                                                          |
|o6 = | 0 2 -2 0 0 1 3 2 |                                 |
|     | 0 1 1  1 0 5 5 5 |                                 |
|     | 1 2 3  4 1 2 2 3 |                                 |
|     | 0 0 0  0 2 2 2 2 |                                 |
|                                                          |
|              4       8                                   |
|o6 : Matrix QQ  <-- QQ                                    |
+----------------------------------------------------------+
-------------------------------------------------------------------------------

The source of this document is in LatticePolytopes.m2:752:0.