Cones, polytopes and polyhedra have similar combinatorial features: they are composed of faces of various dimensions that meet in faces of lower dimensions. Some functions apply to all of these geometrical objects, some do not.
A face of a cone C is the intersection of C with an affine hyperplane whose defining equation is non-negative on C. A facet of a cone C is a codimension 1 face of C. Definitions for polytopes and polyhedra are similar.
A sequence containing the vertices of the polyhedron P.
The number of vertices of the polyhedron P.
The sequence of generators of the rays of the cone C (returned as primitive lattice points). If C is strictly convex, this is the same as the minimal (R)-generators.
The ith ray of the of the cone C (in the order returned by Rays(C)).
A sequence of equations defining the minimal linear subspace containing the cone C (or the sequence of toric lattice points Q).
A sequence of generators of the minimal linear subspace containing the cone C (or the sequence of toric lattice points Q).
A basis of the maximal linear subspace contained in the cone C.
If the cone C or polyhedron P lies in a toric lattice L, then return a finite sequence of vectors in the dual lattice check(L) which define supporting hyperplanes of C or P. The list is forced to be minimal for MinimalInequalities, but might not be otherwise. If the argument is a polyhedron, then an integer k is returned as a second return value, so that the first k inequalities correspond to the facets of P while the remaining cut out the subspace containing P.
The inequalities of C arranged in a matrix, with each row representing an inequality.
> P := Polytope([[1,0],[0,1],[-1,-1]]); > Inequalities(P); [ <(2, -1), -1>, <(-1, -1), -1>, <(-1, 2), -1> ] 3For each inequality use HalfspaceToPolyhedron(m,h) to define the corresponding halfspace, and then intersect them all to recover P---and finally recover the vertices we started with.
> PP := &meet [HalfspaceToPolyhedron(H[1],H[2]) : H in Inequalities(P)]; > PP eq P; true > PP; 2-dimensional polytope PP with 3 vertices: ( 0, 1), (-1, -1), ( 1, 0)It can happen that a polytope does not span the ambient toric lattice in which it lies and that some of the inequalities are used to cut out the affine subspace that it does span.
> Q := Polytope([[1,0,2],[0,1,2],[-1,0,2],[0,-1,2]]); > Inequalities(Q); [ <(1, -1, 0), -1>, <(-1, -1, 0), -1>, <(-1, 1, 0), -1>, <(1, 1, 0), -1>, <(0, 0, 1), 2>, <(0, 0, -1), -2> ] 4In this case the final two inequalities are opposites of one another and cut out the affine hyperplane z=2. The second return value 4 indicates that the first 4 inequalities are cutting out facets of the polytope while the remaining inequalities are cutting out the affine hyperplane.
The (outer) normal cone of the face F of the polyhedron P.
The (outer) normal cones of the edges of the polyhedron P. The cones are presented in the same order as the edges of P; i.e. the i-th cone in the resulting sequence is the normal cone to the i-th edge returned by Edges(P) or EdgeIndices(P).
For a Gorenstein cone C, i.e. a cone such that the primitive generators ρi of the rays of C lie in a common hyperplane, gives an element u in the dual lattice such that u(ρi) = - 1 (inner normal) or u(ρi) = 1 (outer normal).
The f-vector of the polyhedron P or cone C.
The h-vector of the polyhedron P or cone C.
A sequence containing all facets of the toric cone C or polyhedron P.
A sequence of sets describing the facets of the polytope P. The jth set gives the indices of the vertices of P which define the jth facet of P.
The number of facets of the polyhedron P.
A sequence containing all face cones of the toric cone C or polyhedron P, or only those of dimension i if an integer i is also specified.
A sequence of sets describing the i-dimensional faces of the polyhedron P. The jth set gives the indices of the vertices of P which define the jth i-dimensional face.
The number of i-dimensional faces of the polyhedron P.
A sequence containing all the edges of the polyhedron P.
A sequence of sets describing the edges of the polyhedron P. The jth set gives the indices of the vertices of P which define the jth edge of P.
The number of edges of the polyhedron P.
The graph of the face lattice of the polyhedron P. The vertices of the graph are labeled by the dimension of the corresponding face.
The face of the toric cone C supported by the toric lattice element H in the dual lattice to the one containing C (so H is a linear form on the ambient lattice of C).
Return true if and only if the hyperplane defined by v.u = h is a supporting hyperplane of the polyhedron P, where v is a lattice point of the dual ambient lattice of P and h is a rational number. If so, also gives the sign τ such the hyperplane is a support of P (i.e. τ in {-1, 0, + 1} such that Sign(v.u - h) is either 0 or τ for all u in P). If P is contained within the hyperplane, then τ will be 0.
The cone C such that C + v is a supporting cone of the polyhedron P, where v is a vertex of P.
Return true if and only if F is a face of the cone C or polyhedron P.