#### D.13.1.1 polymakePolytope

Procedure from library `polymake.lib` (see polymake_lib).

Usage:
  polymakePolytope(points); polytope intmat

Assume:
  each row of points gives the coordinates of a lattice point of a polytope with their affine coordinates as given by the output of secondaryPolytope

Purpose:
  the procedure calls polymake to compute the vertices of the polytope as well as its dimension and information on its facets

Return:
  list, L with four entries
  L[1] : an integer matrix whose rows are the coordinates of vertices of the polytope
  L[2] : the dimension of the polytope
  L[3] : a list whose ith entry explains to which vertices the ith vertex of the Newton polytope is connected
  -- i.e. L[3][i] is an integer vector and an entry k in there means that the vertex L[1][i] is connected to the vertex L[1][k]
  L[4] : an matrix of type bigintmat whose rows mulitplied by (1,var(1),...,var(nvar)) give a linear system of equations describing the affine hull of the polytope,
  i.e. the smallest affine space containing the polytope

Note:
  - for its computations the procedure calls the program polymake by Ewgenij Gawrilow, TU Berlin and Michael Joswig, TU Darmstadt; it therefore is necessary that this program is installed in order to use this procedure;
  see http://www.math.tu-berlin.de/polymake/
  - note that in the vertex edge graph we have changed the polymake convention which starts indexing its vertices by zero while we start with one !

Example:

    LIB "polymake.lib";
    // the lattice points of the unit square in the plane
    list points=intvec(0,0),intvec(0,1),intvec(1,0),intvec(1,1);
    // the secondary polytope of this lattice point configuration is computed
    intmat secpoly=secondaryPolytope(points)[1];
    list np=polymakePolytope(secpoly);
    // the vertices of the secondary polytope are:
    np[1];
    // its dimension is
    np[2];
    // np[3] contains information how the vertices are connected to each other,
    // e.g. the first vertex (number 0) is connected to the second one
    np[3][1];
    // the affine hull has the equation
    ring r=0,x(1..4),dp;
    matrix M[5][1]=1,x(1),x(2),x(3),x(4);
    intmat(np[4])*M;

User manual for Singular version 4-0-3, 2016, generated by texi2html.