Quick reference for polyhedra in Sage¶
Author: Jean-Philippe Labbé <labbe@math.fu-berlin.de> Vincent Delecroix <vincent.delecroix@u-bordeaux.fr>
List of Polyhedron methods¶
H and V-representation
| 
 | ring on which the polyhedron is defined | 
| 
 | ambient vector space or free module | 
| 
 | vector space or free module used for the vectors of the H-representation | 
| 
 | vector space or free module used for the vectors of the V-representation | 
| 
 | number of elements in the H-representation (sum of the number of equations and inequalities) | 
| 
 | number of elements in the V-representation (sum of vertices, rays and lines) | 
| 
 | number of equations | 
| 
 | number of inequalities | 
| 
 | number of vertices | 
| 
 | number of rays | 
| 
 | number of lines | 
| 
 | number of facets | 
Polyhedron boolean properties:
| 
 | tests emptyness | 
| 
 | tests whether a polyhedra is the whole ambient space | 
| 
 | tests if the polyhedron has the same dimension as the ambient space | 
| 
 | tests whether two polyhedra are combinatorially isomorphic | 
| 
 | tests compactness, or boundedness of a polyhedron | 
| 
 | tests whether a polyhedron is a lattice polytope | 
| tests whether the polyhedron is inscribed in a sphere | |
| tests if the polyhedron can be used to produce another given polyhedron using a Minkowski sum. | |
| 
 | tests whether the polyhedron has full skeleton until half of the dimension (or up to a certain dimension) | 
| tests if the polar of a lattice polytope is also a lattice polytope (only for  | |
| 
 | checks whether the degree of all vertices is equal to the dimension of the polytope | 
| 
 | test whether a polytope is a simplex | 
| 
 | checks whether all faces of the polyhedron are simplices | 
| 
 | tests whether self is a Lawrence polytope | 
| 
 | tests whether the polytope is self-dual | 
| 
 | test whether the polytope is a pyramid over one of its facets | 
| 
 | test whether the polytope is combinatorially equivalent to a bipyramid over some polytope | 
| 
 | test whether the polytope is combinatorially equivalent to a prism of some polytope | 
Enumerative properties
| 
 | the dimension of the ambient vector space | 
| 
 | the dimension of the polytope | 
| 
 | alias of dim | 
| 
 | the \(f\)-vector (number of faces of each dimension) | 
| 
 | the flag-\(f\)-vector (number of chains of faces) | 
| 
 | highest cardinality for which all \(k\)-subsets of the vertices are faces of the polyhedron | 
| 
 | highest cardinality for which all \(k\)-faces are simplices | 
| 
 | highest cardinality for which the polar is \(k\)-simplicial | 
Implementation properties
| 
 | gives the backend used | 
| 
 | gives the base ring used | 
| 
 | changes the base ring | 
Transforming polyhedra
| 
 | Minkowski sum of two polyhedra | 
| 
 | Minkowski difference of two polyhedra | 
| Minkowski decomposition (only for  | |
| 
 | cartesian product of two polyhedra | 
| 
 | intersection of two polyhedra | 
| 
 | join of two polyhedra | 
| 
 | convex hull of the union of two polyhedra | 
| 
 | constructs an affinely equivalent full-dimensional polyhedron | 
| constructs a geometric realization of the barycentric subdivision | |
| 
 | scalar dilation | 
| 
 | truncates a specific face | 
| 
 | returns the face splitting of a face of self | 
| 
 | the one-point suspension over a vertex of self (face splitting of a vertex) | 
| 
 | stack a face of the polyhedron | 
| 
 | returns an encompassing lattice polytope. | 
| 
 | returns the polar of a polytope (needs to be compact) | 
| 
 | prism over a polyhedron (increases both the dimension of the polyhedron and the dimension of the ambient space) | 
| 
 | pyramid over a polyhedron (increases both the dimension of the polyhedron and the dimension of the ambient space) | 
| 
 | bipyramid over a polyhedron (increases both the dimension of the polyhedron and the dimension of the ambient) | 
| 
 | translates by a given vector | 
| 
 | truncates all vertices simultaneously | 
| 
 | returns the Lawrence extension of self on a given point | 
| 
 | returns the Lawrence polytope of self | 
| 
 | returns the wedge over a face of self | 
Combinatorics
| 
 | the combinatorial polyhedron | 
| 
 | the face lattice | 
| 
 | the hasse diagram | 
| 
 | the automorphism group of the underlying combinatorial polytope | 
| 
 | underlying graph | 
| 
 | digraph (orientation of edges determined by a linear form) | 
| 
 | bipartite digraph given vertex-facet adjacency | 
| 
 | adjacency matrix | 
| 
 | incidence matrix | 
| 
 | slack matrix | 
| 
 | adjacency matrix of the facets | 
| 
 | adjacency matrix of the vertices | 
Integral points
| the Ehrhart polynomial for  | |
| the Ehrhart polynomial for  | |
| the Ehrhart quasipolynomial for  | |
| 
 | the \(h^*\)-vector for polytopes with integral vertices | 
| 
 | list of integral points | 
| 
 | number of integral points | 
| 
 | get the i-th integral point without computing all interior lattice points | 
| checks whether the origin is an interior lattice point and compactness (only for  | |
| 
 | get a random integral point | 
Getting related geometric objects
| 
 | returns the smallest affine subspace containing the polyhedron | 
| returns the boundary complex of simplicial compact polyhedron | |
| returns the average of the vertices of the polyhedron | |
| 
 | returns the center of the mass | 
| 
 | returns the sum of the center and the rays | 
| 
 | returns a maximal chain of faces | 
| returns the fan spanned by the faces of the polyhedron | |
| 
 | a generator over the faces | 
| 
 | the list of faces | 
| 
 | the list of facets | 
| 
 | smallest face containing specified Vrepresentatives | 
| 
 | largest face contained in specified Hrepresentatives | 
| returns the fan spanned by the normals of the supporting hyperplanes of the polyhedron | |
| 
 | returns the (affine) Gale transform of the vertices of the polyhedron | 
| returns the hyperplane arrangement given by the defining facets of the polyhedron | |
| transform the polyhedra into a Linear Program | |
| 
 | returns a triangulation of the polyhedron | 
| returns an iterator of the fibrations of the lattice polytope (only for  | 
Other
| 
 | generator for bounded edges | 
| returns the vertices of an encompassing cube | |
| 
 | tests whether the polyhedron contains a vector | 
| 
 | tests whether the polyhedron contains a vector in its interior using the ambient topology | 
| 
 | tests whether the polyhedron contains a vector in its relative interior | 
| returns the translation vector between two translation of two polyhedron (only for  | |
| 
 | computes the integral of a polynomial over the polyhedron | 
| returns the radius of the smallest sphere containing the polyhedron | |
| returns the square of the radius of the smallest sphere containing the polyhedron | |
| 
 | computes different volumes of the polyhedron | 
| 
 | returns the restricted automorphism group | 
| returns the lattice automorphism group. Only for  |