Available versions of this document: latest release, release 3.5, nightly master
Reference documentation for older polymake versions: release 3.4, release 3.3, release 3.2
BigObject Polytope<Scalar>
from application polytope
Not necessarily bounded convex polyhedron, i.e., the feasible region of a linear program. Nonetheless, the name “Polytope” is used for two reasons: Firstly, as far as the combinatorics is concerned we always deal with polytopes; see the description of VERTICES_IN_FACETS
for details. Note that a pointed polyhedron is projectively equivalent to a polytope. The second reason is historical. We use homogeneous coordinates, which is why Polytope is derived from Cone
.
 Type Parameters:
Scalar
: inherited fromScalar
 derived from:
 Specializations:
Polytope::Lattice
: A polytope all of whose vertex coordinates are integral.Polytope<Float>
: A pointed polyhedron with float coordinates realized in R^{d}. It mainly exists for visualization. Convex hull and related algorithms use floatingpoint arithmetics. Due to numerical errors inherent to this kind of computations, the resulting combinatorial description can be arbitrarily far away from the truth, or even not correspond to any valid polytope. You have been warned. None of the standard construction clients produces objects of this type. If you want to get one, create it with the explicit constructor orconvert_to
.Polytope<Rational>
: A rational polyhedron realized in Q^dSymmetry
: These specializations capture information of the object that is concerned with the action of permutation groups. Example:
To construct a polytope as the convex hull of three points in the plane use
> $p=new Polytope(POINTS=>[[1,0,0],[1,1,0],[1,0,1]]); > print $p>N_FACETS 3
Note that homogeneous coordinates are used throughout.
 Example:
Many standard constructions are available directly. For instance, to get a regular 120cell (which is 4dimensional) use:
> $c=regular_120_cell(); > print $c>VOLUME; 1575+705r5
This is the exact volume 1575+705*\sqrt{5}. polymake has limited support for polytopes with nonrational coordinates.
Properties
Input property
These properties are for input only. They allow redundant information.

EQUATIONS
Equations that hold for all points of the polyhedron. A vector (A_{0}, A_{1}, …, A_{d}) describes the hyperplane of all points (1, x_{1}, …, x_{d}) such that A_{0} + A_{1} x_{1} + … + A_{d} x_{d} = 0. All vectors in this section must be nonzero. Input section only. Ask for
AFFINE_HULL
if you want to see an irredundant description of the affine span. Type:
Matrix<Scalar,NonSymmetric>

INEQUALITIES
Inequalities that describe halfspaces such that the polyhedron is their intersection. Redundancies are allowed. Dual to
POINTS
. A vector (A_{0}, A_{1}, …, A_{d}) defines the (closed affine) halfspace of points (1, x_{1}, …, x_{d}) such that A_{0} + A_{1} x_{1} + … + A_{d} x_{d} >= 0. Input section only. Ask forFACETS
andAFFINE_HULL
if you want to compute an Hrepresentation from a Vrepresentation. Type:
Matrix<Scalar,NonSymmetric>

POINTS
Points such that the polyhedron is their convex hull. Redundancies are allowed. The vector (x_{0}, x_{1}, … x_{d}) represents a point in dspace given in homogeneous coordinates. Affine points are identified by x_{0} > 0. Points with x_{0} = 0 can be interpreted as rays. polymake automatically normalizes each coordinate vector, dividing them by the first nonzero element. The clients and rule subroutines can always assume that x_{0} is either 0 or 1. All vectors in this section must be nonzero. Dual to
INEQUALITIES
. Input section only. Ask forVERTICES
if you want to compute a Vrepresentation from an Hrepresentation. Alias for propertyINPUT_RAYS
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
Given some (homogeneous) points in 3space we first construct a matrix containing them. Assume we don't know wether these are all vertices of their convex hull or not. To safely produce a polytope from these points, we set the input to the matrix representing them. In the following the points under consideration are the vertices of the 3simplex together with their barycenter, which will be no vertex:
> $M = new Matrix([[1,0,0,0],[1,1,0,0],[1,0,1,0],[1,0,0,1],[1,1/4,1/4,1/4]]); > $p = new Polytope(POINTS=>$M); > print $p>VERTICES; 1 0 0 0 1 1 0 0 1 0 1 0 1 0 0 1
Combinatorics
These properties capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.

BALANCE
Maximal dimension in which all facets are balanced.
 Type:
 Example:
The following full dimensional polytope given by 10 specific vertices on the 8dimensional sphere is 3neighborly. Hence the dual polytope is 3balanced, where we first center and then polarize it.
> $p = rand_sphere(8,10,seed=>8866463); > $q = polarize(center($p)); > print $q>BALANCE; 3

BALANCED
Dual to
NEIGHBORLY
. Type:
 Example:
Since cyclic polytopes generated by vertices on the moment curve are neighborly, their dual polytopes are balanced. The following checks this for the 4dimensional case by centering the cyclic polytope and then polarizing it:
> $p = cyclic(4,6); > $q = polarize(center($p)); > print $q>BALANCED; true

CD_INDEX_COEFFICIENTS
Coefficients of the cdindex.
 Type:

COCUBICAL
Dual to
CUBICAL
. Type:
 Example:
Since the crosspolytope is dual to a cube of same dimension, it is cocubical. The following checks this for the 3dimensional case:
> print cross(3)>COCUBICAL; true

COCUBICALITY
Dual to
CUBICALITY
. Type:
 Example:
After stacking a facet of the 3dimensional cube, its cubicality is lowered to 2. Hence its dual polytope has cocubicality 2 as well. The following produces such a stacked cube and asks for its cocubicality after polarization:
> $p = stack(cube(3),5); > print polarize($p)>COCUBICALITY; 2

COMPLEXITY
Parameter describing the shape of the facelattice of a 4polytope.
 Type:

CUBICAL
True if all facets are cubes.
 Type:
 Example:
A kdimensional cube has k1dimensional cubes as facets and is therefore cubical. The following checks if this holds for the 3dimensional case:
> print cube(3)>CUBICAL; true
 Example:
This checks if a zonotope generated by 4 random points on the 3dimensional sphere is cubical, which is always the case.
> print zonotope(rand_sphere(3,4)>VERTICES)>CUBICAL; true

CUBICALITY
Maximal dimension in which all facets are cubes.
 Type:
 Example:
We will modify the 3dimensional cube in two different ways. While stacking some facets (in this case facets 4 and 5) preserves the cubicality up to dimension 2, truncating an arbitrary vertex reduces the cubicality to 1.
> print stack(cube(3),[4,5])>CUBICALITY; 2
> print truncation(cube(3),5)>CUBICALITY; 1

CUBICAL_H_VECTOR
Cubical hvector. Defined for cubical polytopes.
 Type:

DUAL_BOUNDED_H_VECTOR
hvector of the bounded subcomplex, defined for not necessarily bounded polyhedra which are simple (as polyhedra, i.e.,
VERTEX_DEGREES
on theFAR_FACE
do not matter). Coincides with the reverse hvector of the dual simplicial ball. Note that this vector will usually start with a number of zero entries. Type:

DUAL_GRAPH
 Type:
 Properties of DUAL_GRAPH:

DIHEDRAL_ANGLES
Dihedral angles (in radians) between the two facets corresponding to each edge of the dual graph, i.e. the ridges of the polytope.
 Type:


DUAL_H_VECTOR
dual hvector, defined via recursion on the face lattice of a polytope. Coincides for simple polytopes with the combinatorial definition of the hvector via abstract objective functions.
 Type:

EDGE_ORIENTABLE
True if there exists an edgeorientation (see
EDGE_ORIENTATION
for a definition). The polytope is required to be 2cubical. Type:
 Example:
The following checks a 3dimensional cube for edge orientability:
> $p = cube(3); > print $p>EDGE_ORIENTABLE; true
 Example:
A 3dimensinal cube with one stacked facet is still 2cubical. Therefore we can check for edge orientability:
> $p = stack(cube(3),5); > print $p>EDGE_ORIENTABLE; true

EDGE_ORIENTATION
List of all edges with orientation, such that for each 2face the opposite edges point in the same direction. Each line is of the form (u v), which indicates that the edge {u,v} is oriented from u to v. The polytope is required to be 2cubical.
 Type:
 Example:
The following prints a list of oriented edges of a 2dimensional cube such that opposing edges have the same orientation:
> $p = cube(2); > print $p>EDGE_ORIENTATION; 0 2 1 3 0 1 2 3

EXCESS_VERTEX_DEGREE
Measures the deviation of the cone from being simple in terms of the
GRAPH
. Alias for propertyEXCESS_RAY_DEGREE
. Type:
 Example:
The excess vertex degree of an egyptian pyramid is one.
> print pyramid(cube(2))>EXCESS_VERTEX_DEGREE; 1

F2_VECTOR
f_{ik} is the number of incident pairs of ifaces and kfaces; the main diagonal contains the
F_VECTOR
. Type:
 Example:
The following prints the f2vector of a 3dimensional cube:
> print cube(3)>F2_VECTOR; 8 24 24 24 12 24 24 24 6

FACETS_THRU_VERTICES
transposed
VERTICES_IN_FACETS
Notice that this is a temporary property; it will not be stored in any file. Alias for propertyFACETS_THRU_RAYS
. Type:

FACE_SIMPLICITY
Maximal dimension in which all faces are simple polytopes. This checks the 3dimensional cube for face simplicity. Since the cube is dual to the crosspolytope of equal dimension and it is simplicial, the result is 3. > print cube(3)→SIMPLICITY;  3
 Type:

FATNESS
Parameter describing the shape of the facelattice of a 4polytope.
 Type:

FOLDABLE_MAX_SIGNATURE_UPPER_BOUND
An upper bound for the maximal signature of a foldable triangulation of a polytope The signature is the absolute difference of the normalized volumes of black minus white maximal simplices, where only odd normalized volumes are taken into account.
 Type:

F_VECTOR
f_{k} is the number of kfaces.
 Type:
 Example:
This prints the fvector of a 3dimensional cube. The first entry represents the vertices.
> print cube(3)>F_VECTOR; 8 12 6
 Example:
This prints the fvector of the 3dimensional crosspolytope. Since the cube and the cross polytope of equal dimension are dual, their fvectors are the same up to reversion.
> print cross(3)>F_VECTOR; 6 12 8
 Example:
After truncating the first standard basis vector of the 3dimensional crosspolytope the fvector changes. Only segments of the incident edges of the cut off vertex remain and the intersection of these with the new hyperplane generate four new vertices. These also constitute four new edges and a new facet.
> print truncation(cross(3),4)>F_VECTOR; 9 16 9

GRAPH
 Type:
 Properties of GRAPH:

EDGE_DIRECTIONS
Difference of the vertices for each edge (only defined up to signs).
 Type:
EdgeMap<Undirected,Vector<Scalar>>

SQUARED_EDGE_LENGTHS
Squared Euclidean length of each edge
 Type:
EdgeMap<Undirected,Scalar>

LATTICE_ACCUMULATED_EDGE_LENGTHS
a map associating to each edge length of the polytope the number of edges with this length the lattice edge length of an edge is one less than the number of lattice points on that edge
 Type:

LATTICE_EDGE_LENGTHS
the lattice lengths of the edges of the polytope i.e. for each edge one less than the number of lattice points on that edge
 Type:


G_VECTOR
(Toric) gvector, defined via the (generalized) hvector as g_{i} = h_{i}  h_{i1}.
 Type:

HASSE_DIAGRAM
 Type:

H_VECTOR
hvector, defined via recursion on the face lattice of a polytope. Coincides for simplicial polytopes with the combinatorial definition of the hvector via shellings
 Type:

MINIMAL_NON_FACES
Minimal nonfaces of a
SIMPLICIAL
polytope. Type:

MOEBIUS_STRIP_EDGES
Ordered list of edges of a Moebius strip with parallel interior edges. Consists of k lines of the form (v_{i} w_{i}), for i=1, …, k. The Moebius strip in question is given by the quadrangles (v_{i}, w_{i}, w_{i+1},v_{i+1}), for i=1, …, k1, and the quadrangle (v_{1}, w_{1}, v_{k}, w_{k}). Validity can be verified with the client
validate_moebius_strip
. The polytope is required to be 2cubical. Type:

MOEBIUS_STRIP_QUADS
Unordered list of quads which forms a Moebius strip with parallel interior edges. Each line lists the vertices of a quadrangle in cyclic order. Validity can be verified with the client
validate_moebius_strip_quads
. The polytope is required to be 2cubical. Type:

NEIGHBORLINESS
Maximal dimension in which all facets are neighborly.
 Type:
 Example:
This determines that the full dimensional polytope given by 10 specific vertices on the 8dimensional sphere is 3neighborly, i.e. all 3dimensional faces are tetrahedra. Hence the polytope is not neighborly.
> print rand_sphere(8,10,seed=>8866463)>NEIGHBORLINESS; 3

NEIGHBORLY
True if the polytope is neighborly.
 Type:
 Example:
This checks the 4dimensional cyclic polytope with 6 points on the moment curve for neighborliness, i.e. if it is ⌊dim/2⌋ neighborly:
> print cyclic(4,6)>NEIGHBORLY; true

N_VERTEX_FACET_INC
Number of pairs of incident vertices and facets. Alias for property
N_RAY_FACET_INC
. Type:

N_VERTICES

SELF_DUAL
True if the polytope is selfdual.
 Type:
 Example:
The following checks if the centered square with side length 2 is self dual:
> print cube(2)>SELF_DUAL; true
 Example:
The elongated square pyramid (Johnson solid 8) is dual to itself, since the apex of the square pyramid attachted to the cube and the opposing square of the cube swap roles. The following checks this property and prints the result:
> print johnson_solid(8)>SELF_DUAL; true

SIMPLE
True if the polytope is simple. Dual to
SIMPLICIAL
. Type:
 Example:
This determines if a 3dimensional cube is simple or not:
> print cube(3)>SIMPLE; true

SIMPLEXITY_LOWER_BOUND
A lower bound for the minimal number of simplices in a triangulation
 Type:

SIMPLICIAL
True if the polytope is simplicial.
 Type:
 Example:
A polytope with random vertices uniformly distributed on the unit sphere is simplicial. The following checks this property and prints the result for 8 points in dimension 3:
> print rand_sphere(3,8)>SIMPLICIAL; true

SIMPLICIALITY
Maximal dimension in which all faces are simplices.

SIMPLICITY
Maximal dimension in which all dual faces are simplices.
 Type:
 Example:
This checks the 3dimensional cube for simplicity. Since the cube is dual to the crosspolytope of equal dimension and all its faces are simplices, the result is 2.
> print cube(3)>SIMPLICITY; 2

SUBRIDGE_SIZES
Lists for each occurring size (= number of incident facets or ridges) of a subridge how many there are.
 Type:

TWO_FACE_SIZES
Lists for each occurring size (= number of incident vertices or edges) of a 2face how many there are.
 Type:
 Example:
This prints the number of facets spanned by 3,4 or 5 vertices a truncated 3dimensional cube has.
> $p = truncation(cube(3),5); > print $p>TWO_FACE_SIZES; {(3 1) (4 3) (5 3)}

VERTEX_SIZES
Number of incident facets for each vertex. Alias for property
RAY_SIZES
. Type:
 Example:
The following prints the number of incident facets for each vertex of the elongated pentagonal pyramid (Johnson solid 9)
> print johnson_solid(9)>VERTEX_SIZES; 5 4 4 4 4 4 3 3 3 3 3

VERTICES_IN_FACETS
Vertexfacet incidence matrix, with rows corresponding to facets and columns to vertices. Vertices and facets are numbered from 0 to
N_VERTICES
1 rsp.N_FACETS
1, according to their order inVERTICES
rsp.FACETS
. This property is at the core of all combinatorial properties. It has the following semantics: (1) The combinatorics of an unbounded and pointed polyhedron is defined to be the combinatorics of the projective closure. (2) The combiantorics of an unbounded polyhedron which is not pointed is defined to be the combinatorics of the quotient modulo the lineality space. Therefore:VERTICES_IN_FACETS
and each other property which is grouped under “Combinatorics” always refers to some polytope. Alias for propertyRAYS_IN_FACETS
. Type:
 Example:
The following prints the vertexfacet incidence matrix of a 5gon by listing all facets as a set of contained vertices in a cyclic order (each line corresponds to an edge):
> print n_gon(5)>VERTICES_IN_FACETS; {1 2} {2 3} {3 4} {0 4} {0 1}
 Example:
The following prints the Vertex_facet incidence matrix of the standard 3simplex together with the facet numbers:
> print rows_numbered(simplex(3)>VERTICES_IN_FACETS); 0:1 2 3 1:0 2 3 2:0 1 3 3:0 1 2
Geometry
These properties capture geometric information of the object. Geometric properties depend on geometric information of the object, like, e.g., vertices or facets.

AFFINE_HULL
Dual basis of the affine hull of the polyhedron. The property
AFFINE_HULL
appears only in conjunction with the propertyFACETS
. The specification of the propertyFACETS
requires the specification ofAFFINE_HULL
, and vice versa. Alias for propertyLINEAR_SPAN
. Type:
Matrix<Scalar,NonSymmetric>

BOUNDED
True if and only if
LINEALITY_SPACE
trivial andFAR_FACE
is trivial.

CENTERED
True if (1, 0, 0, …) is in the relative interior. If fulldimensional then polar to
BOUNDED
.

CENTERED_ZONOTOPE
is the zonotope calculated from ZONOTOPE_INPUT_POINTS or ZONOTOPE_INPUT_VECTORS to be centered at the origin? The zonotope is always calculated as the Minkowski sum of all segments conv {x,v}, where
 v ranges over the ZONOTOPE_INPUT_POINTS or ZONOTOPE_INPUT_VECTORS, and
 x = v if CENTERED_ZONOTOPE = 1,
 x = 0 if CENTERED_ZONOTOPE = 0.
Input section only.
 Type:

CENTRALLY_SYMMETRIC
True if P = P.
 Type:
 Example:
A centered 3cube is centrally symmetric. By stacking a single facet (5), this property is lost. We can recover it by stacking the opposing facet (4) as well.
> $p = cube(3); > print $p>CENTRALLY_SYMMETRIC; true
> print stack($p,5)>CENTRALLY_SYMMETRIC; false
> print stack($p,new Set<Int>(4,5))>CENTRALLY_SYMMETRIC; true

CENTROID
Centroid (center of mass) of the polytope.
 Type:
Vector<Scalar>

CONE_AMBIENT_DIM
One more than the dimension of the space in which the polyhedron lives. = dimension of the space in which the homogenization of the polyhedron lives
 Type:

CONE_DIM
One more than the dimension of the affine hull of the polyhedron = one more than the dimension of the polyhedron. = dimension of the homogenization of the polyhedron If the polytope is given purely combinatorially, this is the dimension of a minimal embedding space
 Type:
 Example:
This prints the cone dimension of a 3cube. Since the dimension of its affine closure is 3, the result is 4.
> print cube(3)>CONE_DIM; 4

CS_PERMUTATION
The permutation induced by the central symmetry, if present.
 Type:

FACETS_THRU_POINTS
similar to
FACETS_THRU_VERTICES
, but withPOINTS
instead ofVERTICES
Notice that this is a temporary property; it will not be stored in any file. Alias for propertyFACETS_THRU_INPUT_RAYS
. Type:

FAR_HYPERPLANE
Valid strict inequality for all affine points of the polyhedron.
 Type:
Vector<Scalar>

FEASIBLE
True if the polyhedron is not empty.
 Type:

GALE_TRANSFORM
Coordinates of the Gale transform.
 Type:
Matrix<Scalar,NonSymmetric>

INEQUALITIES_THRU_VERTICES
transposed
VERTICES_IN_INEQUALITIES
Alias for propertyINEQUALITIES_THRU_RAYS
. Type:

LATTICE
A rational polytope is lattice if each bounded vertex has integer coordinates.
 Type:

MINIMAL_VERTEX_ANGLE
The minimal angle between any two vertices (seen from the
VERTEX_BARYCENTER
). Type:

MINKOWSKI_CONE
The cone of all Minkowski summands of the polytope P. Up to scaling, a polytope S is a Minkowski summand of P if and only if the edge directions of S are a subset of those of P, and the closing condition around any 2face of P is preserved. Coordinates of the cone correspond to the rescaled lengths of the edges of the graph of P (in the order given by the property
EDGES
of theGRAPH
of P). The Minkowski cone is defined as the intersection of all equations given by the closing condition around 2faces with the positive orthant. For more information see e.g. Klaus Altmann: The versal deformation of an isolated toric Gorenstein singularity Type:

N_01POINTS
Number of points with 0/1coordinates in a polytope.
 Type:
 depends on extension:

N_POINTS
Number of
POINTS
. Alias for propertyN_INPUT_RAYS
. Type:

ONE_VERTEX
A vertex of a pointed polyhedron. Alias for property
ONE_RAY
.

POINTED
True if the polyhedron does not contain an affine line.
 Type:
 Example:
A square does not contain an affine line and is therefore pointed. Removing one facet does not change this, although it is no longer bounded. After removing two opposing facets, it contains infinitely many affine lines orthogonal to the removed facets.
> $p = cube(2); > print $p>POINTED; true
> print facet_to_infinity($p,0)>POINTED; true
> print new Polytope(INEQUALITIES=>$p>FACETS>minor([0,1],All))>POINTED; false

POINTS_IN_FACETS
Similar to
VERTICES_IN_FACETS
, but with columns corresponding toPOINTS
instead ofVERTICES
. This property is a byproduct of convex hull computation algorithms. It is discarded as soon asVERTICES_IN_FACETS
is computed. Alias for propertyINPUT_RAYS_IN_FACETS
. Type:

QUOTIENT_SPACE
A topological quotient space obtained from a polytope by identifying faces.
 Type:

SLACK_IDEAL
The slack ideal of the polytope as described in > João Gouveia, Antonio Macchia, Rekha R. Thomas, Amy Wiebe: > The Slack Realization Space of a Polytope > (https://arxiv.org/abs/1708.04739) Since saturation is computationally expensive, a nonsaturated version of the ideal is stored in the property
NON_SATURATED
. Asking forGENERATORS
will do the saturation. Type:
 depends on extension:
 Example:
> $c = cube(2,1,0); > $I = $c>SLACK_IDEAL; > $I>properties; type: SlackIdeal NON_SATURATED type: Ideal
> $I>NON_SATURATED>properties; type: Ideal N_VARIABLES 8 GENERATORS x_0*x_3*x_5*x_6  x_1*x_2*x_4*x_7
> print $I>GENERATORS; x_0*x_3*x_5*x_6  x_1*x_2*x_4*x_7

SLACK_MATRIX
The slack matrix of the polytope. The (i,j)th entry is the value of the jth facet on the ith vertex. See > João Gouveia, Antonio Macchia, Rekha R. Thomas, Amy Wiebe: > The Slack Realization Space of a Polytope > (https://arxiv.org/abs/1708.04739)
 Type:
Matrix<Scalar,NonSymmetric>

SPECIAL_FACETS
The following is defined for
CENTERED
polytopes only: A facet is special if the cone over that facet with the origin as the apex contains theVERTEX_BARYCENTER
. Motivated by Obro's work on Fano polytopes. Type:

SPLITS
The splits of the polytope, i.e., hyperplanes cutting the polytope in two parts such that we have a regular subdivision.
 Type:
Matrix<Scalar,NonSymmetric>

SPLIT_COMPATIBILITY_GRAPH
Two
SPLITS
are compatible if the defining hyperplanes do not intersect in the interior of the polytope. This defines a graph. Type:

STEINER_POINT
Steiner point of the whole polytope.
 Type:
Vector<Scalar>

STEINER_POINTS
A weighted inner point depending on the outer angle called Steiner point for all faces of dimensions 2 to d.
 Type:
Matrix<Scalar,NonSymmetric>

TILING_LATTICE
An affine lattice L such that P + L tiles the affine span of P
 Type:
AffineLattice<Scalar>

VALID_POINT
Some point belonging to the polyhedron.

VERTEX_BARYCENTER
The center of gravity of the vertices of a bounded polytope.

VERTEX_NORMALS
The ith row is the normal vector of a hyperplane separating the ith vertex from the others. This property is a byproduct of redundant point elimination algorithm. All vectors in this section must be nonzero. Alias for property
RAY_SEPARATORS
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
This prints a matrix in which each row represents a normal vector of a hyperplane seperating one vertex of a centered square with side length 2 from the other ones. The first and the last hyperplanes as well as the second and third hyperplanes are the same up to orientation.
> print cube(2)>VERTEX_NORMALS; 0 1/2 1/2 0 1/2 1/2 0 1/2 1/2 0 1/2 1/2

VERTICES
Vertices of the polyhedron. No redundancies are allowed. All vectors in this section must be nonzero. The coordinates are normalized the same way as
POINTS
. Dual toFACETS
. This section is empty if and only if the polytope is empty. The propertyVERTICES
appears only in conjunction with the propertyLINEALITY_SPACE
. The specification of the propertyVERTICES
requires the specification ofLINEALITY_SPACE
, and vice versa. Alias for propertyRAYS
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
To print the vertices (in homogeneous coordinates) of the standard 2simplex, i.e. a rightangled isoceles triangle, type this:
> print simplex(2)>VERTICES; (3) (0 1) 1 1 0 1 0 1
 Example:
If we know some points to be vertices of their convex hull, we can store them as rows in a Matrix and construct a new polytope with it. The following produces a 3dimensioanl pyramid over the standard 2simplex with the specified vertices:
> $M = new Matrix([[1,0,0,0],[1,1,0,0],[1,0,1,0],[1,0,0,3]]); > $p = new Polytope(VERTICES=>$M);
 Example:
The following adds a (square) pyramid to one facet of a 3cube. We do this by extracting the vertices of the cube via the builtin method and then attach the apex of the pyramid to the matrix.
> $v = new Vector([1,0,0,3/2]); > $M = cube(3)>VERTICES / $v; > $p = new Polytope(VERTICES=>$M);

VERTICES_IN_INEQUALITIES
Similar to
VERTICES_IN_FACETS
, but with rows corresponding toINEQUALITIES
instead ofFACETS
. This property is a byproduct of convex hull computation algorithms. It is discarded as soon asVERTICES_IN_FACETS
is computed. Alias for propertyRAYS_IN_INEQUALITIES
. Type:

VERTICES_IN_RIDGES
Alias for property
RAYS_IN_RIDGES
. Type:

WEAKLY_CENTERED
True if (1, 0, 0, …) is contained (possibly in the boundary).

ZONOTOPE_INPUT_POINTS
The rows of this matrix contain a configuration of affine points in homogeneous cooordinates. The zonotope is obtained as the Minkowski sum of all rows, normalized to x_0 = 1. Thus, if the input matrix has n columns, the ambient affine dimension of the resulting zonotope is n1.
 Type:
Matrix<Scalar,NonSymmetric>
Lattice points in cones
These properties capture information that depends on the lattice structure of the cone. polymake always works with the integer lattice.

CANONICAL
The polytope is canonical if there is exactly one interior lattice point.
 Type:

COMPRESSED
True if the
FACET_WIDTH
is one. Type:

EHRHART_POLYNOMIAL
The Ehrhart polynomial.
 Type:
 depends on extension:

EHRHART_QUASI_POLYNOMIAL
The Ehrhart quasipolynomial of a rational polytope. Coefficients are periodic functions of integral period.
 Type:
 depends on extension:
 Example:
To obtain the Ehrhart quasipolynomial of a scaled 2dimensional cross polytope write:

FACET_VERTEX_LATTICE_DISTANCES
The entry (i,j) equals the lattice distance of vertex j from facet i.
 Type:

FACET_WIDTH
The maximal integral width of the polytope with respect to the facet normals.
 Type:

FACET_WIDTHS
The integral width of the polytope with respect to each facet normal.
 Type:

GORENSTEIN
The polytope is Gorenstein if a dilation of the polytope is
REFLEXIVE
up to translation. Type:

GORENSTEIN_INDEX
If the polytope is
GORENSTEIN
then this is the multiple such that the polytope isREFLEXIVE
. Type:

GORENSTEIN_VECTOR
If the polytope is
GORENSTEIN
, then this is the unique interior lattice point in the multiple of the polytope that isREFLEXIVE
. Type:

GROEBNER_BASIS
The Groebner basis for the toric ideal associated to the lattice points in the polytope using any term order.
 Type:

LATTICE_BASIS
VERTICES
are interpreted as coefficient vectors for this basis given in affine form assumed to the the standard basis if not explicitely specified. Type:

LATTICE_CODEGREE
COMBINATORIAL_DIM
+1LATTICE_DEGREE
or the smallest integer k such that k*P has an interior lattice point. Type:

LATTICE_DEGREE
The degree of the h*polynomial or Ehrhart polynomial.
 Type:

LATTICE_EMPTY
True if the polytope contains no lattice points other than the vertices.
 Type:

LATTICE_VOLUME
The normalized volume of the polytope.
 Type:

LATTICE_WIDTH
The minimal integral width of the polytope.
 Type:

LATTICE_WIDTH_DIRECTION
One direction which realizes
LATTICE_WIDTH
of the polytope. Type:

NORMAL
The polytope is normal if the Hilbert basis of the cone spanned by P x {1} is at height 1. Equivalently points in integral dilates of P are postive integral sums of lattice points of P.
 Type:
 depends on extension:

POLAR_SMOOTH
The lattice polytope is polar to smooth if it is
REFLEXIVE
and the polar of the polytope (wrt to its interior point) is aSMOOTH
lattice polytope. Type:

REFLEXIVE
True if the polytope and its dual have integral vertices.
 Type:

SMOOTH
The polytope is smooth if the associated projective variety is smooth; the determinant of the edge directions is +/1 at every vertex.
 Type:

SPANNING
The polytope is spanning if the lattice points generate the lattice
 Type:

TERMINAL
The polytope is terminal if there is exactly one interior lattice point and all other lattice points are vertices.
 Type:

VERY_AMPLE
The polytope is very ample if the Hilbert Basis of the cone spanned by the edgedirections of any vertex lies inside the polytope.
 Type:
 depends on extension:
Lattice points in polytopes
These properties capture information that depends on the lattice structure of the polytope. polymake always works with the integer lattice.

BOUNDARY_LATTICE_POINTS
The lattice points on the boundary of the polytope, including the vertices.
 Type:

INTERIOR_LATTICE_POINTS
The lattice points strictly in the interior of the polytope
 Type:

LATTICE_POINTS_GENERATORS
The lattice points generators in the polytope. The output consists of three matrices [P,R,L], where P are lattice points which are contained in the polytope R are rays and L is the lineality. Together they form a description of all lattice points. Every lattice point can be described as p + lambda*R + mu*L where p is a row in P and lambda has only nonnegative integral coordinates and mu has arbitrary integral coordinates.
 Type:
 depends on extension:

N_BOUNDARY_LATTICE_POINTS
The number of
BOUNDARY_LATTICE_POINTS
 Type:

N_INTERIOR_LATTICE_POINTS
The number of
INTERIOR_LATTICE_POINTS
 Type:

N_LATTICE_POINTS
The number of
LATTICE_POINTS
 Type:
Matroid properties
Properties which belong to the corresponding (oriented) matroid

CHIROTOPE
Chirotope corresponding to the
VERTICES
. TOPCOM format. Type:
 depends on extension:

CIRCUITS
Circuits in
VECTORS
 Type:
 depends on extension:

COCIRCUITS
Cocircuits in
VECTORS
 Type:
 depends on extension:
Optimization
These properties provide tools from linear, integer and dicrete optimization. In particular, linear programs are defined here.

LP
Linear program applied to the polytope
 Type:
LinearProgram<Scalar>

MILP
Mixed integer linear program applied to the polytope
 Type:
MixedIntegerLinearProgram<Scalar>
Symmetry
These properties capture information of the object that is concerned with the action of permutation groups.

GROUP
 derived from:
 Type:
 Methods of GROUP:

REPRESENTATIVE_INEQUALITIES
UNDOCUMENTED

 Properties of GROUP:

COORDINATE_ACTION
 Type:
 Properties of COORDINATE_ACTION:

CP_INDICES
The row indices of all core points among the
REPRESENTATIVE_CERTIFIERS
. Type:

NOP_GRAPH
The NOPgraph of
POINTS_GENERATORS
with respect to theGROUP
. The nodes of the NOPgraph correspond to theREPRESENTATIVE_CERTIFIERS
, which represent the different orbit polytopes contained in the given orbit polytope. Type:

N_POINTS_GENERATORS
Alias for property
N_INPUT_RAYS_GENERATORS
. Type:

N_REPRESENTATIVE_CERTIFIERS
The number of
REPRESENTATIVE_CERTIFIERS
. Type:

N_REPRESENTATIVE_CORE_POINTS
The number of
REPRESENTATIVE_CORE_POINTS
. Type:

N_VERTICES_GENERATORS
Alias for property
N_RAYS_GENERATORS
. Type:

POINTS_GENERATORS
Alias for property
INPUT_RAYS_GENERATORS
. Type:

REPRESENTATIVE_CERTIFIERS
A matrix of representatives of all certifiers for
POINTS_GENERATORS
with respect to theGROUP
. A certifier is an integer point in the given orbit polytope. Note that the representative certifiers must be in the same order as the corresponding nodes in theNOP_GRAPH
. Further, theCP_INDICES
refer to row indices of this property. Type:

REPRESENTATIVE_CORE_POINTS
A matrix of representatives of all core points in the given orbit polytope. A core point is an integer point whose orbit polytope is latticefree (i.e. does not contain integer points besides its vertices).
 Type:

VERTICES_GENERATORS
Alias for property
RAYS_GENERATORS
. Type:


MATRIX_ACTION
 derived from:
 Type:
MatrixActionOnVectors<Scalar>
 Properties of MATRIX_ACTION:

VERTICES_ORBITS
Alias for property
VECTORS_ORBITS
. Type:


POINTS_ACTION
Alias for property
INPUT_RAYS_ACTION
. Type:

REPRESENTATIVE_VERTICES
Alias for property
REPRESENTATIVE_RAYS
. Type:
Matrix<Scalar,NonSymmetric>

SYMMETRIC_FACETS
 Type:
Matrix<Scalar,NonSymmetric>

SYMMETRIC_RAYS
 Type:
Matrix<Scalar,NonSymmetric>

VERTICES_ACTION
 Type:
 Properties of VERTICES_ACTION:

SYMMETRIZED_COCIRCUIT_EQUATIONS
The cocircuit equations, projected to a certain direct sum of isotypic components
 Type:


Triangulation and volume
Everything in this group is defined for BOUNDED
polytopes only.

MAHLER_VOLUME
Mahler volume (or volume product) of the polytope. Defined as the volume of the polytope and the volume of its polar (for
BOUNDED
,CENTERED
andFULL_DIM
polytopes only). Often studied for centrally symmetric convex bodies, where the regular cubes are conjectured to be the global minimiers. Type:
Scalar
 Example:
The following prints the Mahler volume of the centered 2cube:
> print cube(2)>MAHLER_VOLUME; 8

POLYTOPAL_SUBDIVISION
 Type:
SubdivisionOfPoints<Scalar>
 Properties of POLYTOPAL_SUBDIVISION:

REFINED_SPLITS
The splits that are coarsenings of the subdivision. If the subdivision is regular these form the unique split decomposition of the corresponding weight function.
 Type:


RELATIVE_VOLUME
The kdimensional Euclidean volume of a kdimensional rational polytope embedded in R^n. This value is obtained by summing the square roots of the entries in SQUARED_RELATIVE_VOLUMES using the function naive_sum_of_square_roots. Since this latter function does not try very hard to compute the real value, you may have to resort to a computer algebra package. The value is encoded as a map collecting the coefficients of various roots encountered in the sum. For example, {(3 1/2),(5 7)} represents sqrt{3}/2 + 7 sqrt{5}. If the output is not satisfactory, please use a symbolic algebra package.
 Type:
 Example:
The following prints the 2dimensional volume of a centered square with side length 2 embedded in the 3space (the result is 4):
> $M = new Matrix([1,1,1,0],[1,1,1,0],[1,1,1,0],[1,1,1,0]); > $p = new Polytope<Rational>(VERTICES=>$M); > print $p>RELATIVE_VOLUME; {(1 4)}

SQUARED_RELATIVE_VOLUMES
Array of the squared relative kdimensional volumes of the simplices in a triangulation of a ddimensional polytope.
 Type:
Array<Scalar>

TRIANGULATION
 derived from:
 Type:
GeometricSimplicialComplex<Scalar>
 Properties of TRIANGULATION:

GKZ_VECTOR
GKZvector
See Chapter 7 in Gelfand, Kapranov, and Zelevinsky:
Discriminants, Resultants and Multidimensional Determinants, Birkhäuser 1994
 Type:
Vector<Scalar>


VOLUME
Volume of the polytope.
 Type:
Scalar
 Example:
The following prints the volume of the centered 3dimensional cube with side length 2:
> print cube(3)>VOLUME; 8
Unbounded polyhedra
These properties collect geometric information of a polytope only relevant if it is unbounded, e. g. the far face or the complex of bounded faces.

BOUNDED_COMPLEX
 Type:
PolyhedralComplex<Scalar>
 Properties of BOUNDED_COMPLEX:

GRAPH
 derived from:
 Type:
 Properties of GRAPH:

EDGE_COLORS
Each edge indicates the maximal dimension of a bounded face containing it. Mainly used for visualization purposes.
 Type:

EDGE_DIRECTIONS
Difference of the vertices for each edge (only defined up to signs).
 Type:
EdgeMap<Undirected,Vector<Scalar>>

EDGE_LENGTHS
The length of each edge measured in the maximum metric.
 Type:
EdgeMap<Undirected,Scalar>

TOTAL_LENGTH
Sum of all
EDGE_LENGTHS
. Type:
Scalar


VERTEX_MAP
For every row of
VERTICES
this indicates the corresponding row in theVERTICES
of the parent polytope. Type:


FAR_FACE
Indices of vertices that are rays.
 Type:

N_BOUNDED_VERTICES
Number of bounded vertices (nonrays).
 Type:

SIMPLE_POLYHEDRON
True if each bounded vertex of a (possibly unbounded) dpolyhedron has vertex degree d in the
GRAPH
. The vertex degrees of the vertices on theFAR_FACE
do not matter. Type:

TOWARDS_FAR_FACE
A linear objective function for which each unbounded edge is increasing; only defined for unbounded polyhedra.
 Type:
Vector<Scalar>

UNBOUNDED_FACETS
Indices of facets that are unbounded.
 Type:
Visualization
These properties are for visualization.

FACET_LABELS
Unique names assigned to the
FACETS
, analogous toVERTEX_LABELS
. Type:

FTV_CYCLIC_NORMAL
Reordered transposed
VERTICES_IN_FACETS
. Dual toVIF_CYCLIC_NORMAL
. Alias for propertyFTR_CYCLIC_NORMAL
. Type:

GALE_VERTICES
Coordinates of points for an affine Gale diagram.
 Type:

INEQUALITY_LABELS
Unique names assigned to the
INEQUALITIES
, analogous toVERTEX_LABELS
. Type:

NEIGHBOR_VERTICES_CYCLIC_NORMAL
Reordered
GRAPH
. Dual toNEIGHBOR_FACETS_CYCLIC_NORMAL
. Alias for propertyNEIGHBOR_RAYS_CYCLIC_NORMAL
. Type:

POINT_LABELS
Unique names assigned to the
POINTS
, analogous toVERTEX_LABELS
. Alias for propertyINPUT_RAY_LABELS
. Type:

SCHLEGEL_DIAGRAM
Holds one special projection (the Schlegel diagram) of the polytope.
 Type:
SchlegelDiagram<Scalar>

VERTEX_LABELS
Unique names assigned to the
VERTICES
. If specified, they are shown by visualization tools instead of vertex indices. For a polytope build from scratch, you should create this property by yourself, either manually in a text editor, or with a client program. If you build a polytope with a construction function taking some other input polytope(s), the labels are created the labels automatically except if you call the function with a no_labels option. The exact format of the abels is dependent on the construction, and is described in the corresponding help topic. Alias for propertyRAY_LABELS
. Type:

VIF_CYCLIC_NORMAL
Reordered
VERTICES_IN_FACETS
for 2d and 3dpolytopes. Vertices are listed in the order of their appearance when traversing the facet border counterclockwise seen from outside of the polytope. For a 2dpolytope (which is a closed polygon), lists all vertices in the border traversing order. Alias for propertyRIF_CYCLIC_NORMAL
. Type:
Methods
Combinatorics
These methods capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.

CD_INDEX()
Prettily print the cdindex given in
CD_INDEX_COEFFICIENTS
 Returns:
Geometry
These methods capture geometric information of the object. Geometric properties depend on geometric information of the object, like, e.g., vertices or facets.

AMBIENT_DIM()
returns the dimension of the ambient space of the polytope
 Returns:

DIM()
returns the dimension of the polytope
 Returns:

INNER_DESCRIPTION()
Returns the inner description of a Polytope: [V,L] where V are the vertices and L is the lineality space
 Returns:

MINKOWSKI_CONE_COEFF(Vector<Rational> coeff)
returns the Minkowski summand of a polytope P given by a coefficient vector to the rays of the
MINKOWSKI_CONE
. Parameters:
 Returns:

MINKOWSKI_CONE_POINT(Vector<Rational> point)
returns the Minkowski summand of a polytope P given by a point in the
MINKOWSKI_CONE
. Parameters:
 Returns:

OUTER_DESCRIPTION()
Returns the outer description of a Polytope: [F,A] where F are the facets and A is the affine hull
 Returns:

labeled_vertices(String label …)
Find the vertices by given labels.
 Parameters:
String
label …
: vertex labels Returns:
Lattice points in cones
These methods capture information that depends on the lattice structure of the cone. polymake always works with the integer lattice.

EHRHART_POLYNOMIAL_COEFF()
Vector containing the coefficients of the
EHRHART_POLYNOMIAL
, ordered by increasing degree of the corresponding term. Returns:

FACET_POINT_LATTICE_DISTANCES(Vector<Rational> v)
Vector containing the distances of a given point v from all facets
 Parameters:
 Returns:

N_LATTICE_POINTS_IN_DILATION(Int n)
The number of
LATTICE_POINTS
in the nth dilation of the polytope Parameters:
Int
n
: dilation factor Returns:

POLYTOPE_IN_STD_BASIS(Polytope<Rational> P)
returns a polytope in the integer lattice basis if a
LATTICE_BASIS
is given Parameters:
 Returns:
Lattice points in polytopes
These methods capture information that depends on the lattice structure of the polytope. polymake always works with the integer lattice.

LATTICE_POINTS()
Returns the lattice points in bounded Polytopes.
 Returns:
Symmetry
These methods capture information of the object that is concerned with the action of permutation groups.

VISUAL_NOP(ARRAY colors_ref, ARRAY trans_ref)
Visualizes all (nested) orbit polytopes contained in orb in one picture.
 Parameters:
ARRAY
colors_ref
: the reference to an array of colorsARRAY
trans_ref
: the reference to an array of transparency values

VISUAL_NOP_GRAPH(String filename)
Visualizes the NOPgraph of an orbit polytope. Requires 'graphviz' and a Postscript viewer. Produces a file which is to be processed with the program 'dot' from the graphviz package. If 'dot' is installed, the NOPgraph is visualized by the Postscript viewer.
 Parameters:
String
filename
: the filename for the 'dot' file
Triangulation and volume
These methods collect information about triangulations of the object and properties usually computed from such, as the volume.

TRIANGULATION_INT_SIGNS()
the orientation of the simplices of
TRIANGULATION_INT
in the given order of thePOINTS
 Returns:
Unbounded polyhedra
These methods collect geometric information of a polytope only relevant if it is unbounded, e. g. the far face or the complex of bounded faces.

BOUNDED_DUAL_GRAPH
Dual graph of the bounded subcomplex.

BOUNDED_FACETS()
Indices of
FACETS
that are bounded. Returns:

BOUNDED_GRAPH
Graph of the bounded subcomplex.

BOUNDED_HASSE_DIAGRAM
HASSE_DIAGRAM
constrained to affine vertices Nodes representing the maximal inclusionindependent faces are connected to the topnode regardless of their dimension

BOUNDED_VERTICES()
Indices of
VERTICES
that are no rays. Returns:
Visualization
These methods are for visualization.

GALE()
Generate the Gale diagram of a dpolyhedron with at most d+4 vertices.
 Returns:

SCHLEGEL()
Create a Schlegel diagram and draw it.
 Options:
Visual::Graph::decorations
proj_facet
: decorations for the edges of the projection face option list
schlegel_init
 option list
Visual::Wire::decorations
 Returns:

VISUAL()
Visualize a polytope as a graph (if 1d), or as a solid object (if 2d or 3d), or as a Schlegel diagram (4d).
 Options:
 option list
Visual::Polygons::decorations
 option list
Visual::Wire::decorations
 option list
Visual::PointSet::decorations
 option list
geometric_options
 Returns:

VISUAL_BOUNDED_GRAPH()
Visualize the
GRAPH
of a polyhedron. Options:
Int
seed
: random seed value for the string embedder option list
Visual::Graph::decorations
 Returns:

VISUAL_DUAL()
 Options:
 option list
Visual::Polygons::decorations
 option list
geometric_options
 Returns:

VISUAL_DUAL_FACE_LATTICE()
Visualize the dual face lattice of a polyhedron as a multilayer graph.
 Options:
Int
seed
: random seed value for the node placement option list
Visual::Lattice::decorations
 Returns:

VISUAL_DUAL_GRAPH()
Visualize the
DUAL_GRAPH
of a polyhedron. Options:
Int
seed
: random seed value for the string embedder option list
Visual::Graph::decorations
 Returns:

VISUAL_FACE_LATTICE()
Visualize the
HASSE_DIAGRAM
of a polyhedron as a multilayer graph. Options:
Int
seed
: random seed value for the node placement option list
Visual::Lattice::decorations
 Returns:

VISUAL_GRAPH()
Visualize the
GRAPH
of a polyhedron. Options:
Int
seed
: random seed value for the string embedder option list
Visual::Graph::decorations
 Returns:

VISUAL_ORBIT_COLORED_GRAPH()
Visualizes the graph of a symmetric cone: All nodes belonging to one orbit get the same color.
 Options:
 option list
Visual::Graph::decorations
 Returns:

write_stl(String filename)
Take a 3polytope and write ASCII STL output.
 Parameters:
String
filename
 Example:
> dodecahedron()>write_stl("/tmp/dodecahedron.stl");