Order polytope
In mathematics, the order polytope of a finite partially ordered set is a convex polytope defined from the set. The points of the order polytope are the monotonic functions from the given set to the unit interval, its vertices correspond to the upper sets of the partial order, and its dimension is the number of elements in the partial order. The order polytope is a distributive polytope, meaning that coordinatewise minima and maxima of pairs of its points remain within the polytope. The order polytope of a partial order should be distinguished from the "linear ordering polytope", a  polytope defined from a number formula_1 as the convex hull of indicator vectors of the sets of edges of formula_1-vertex transitive tournaments. Definition and example. A partially ordered set is a pair formula_3 where formula_4 is an arbitrary set and formula_5 is a binary relation on pairs of elements of formula_4 that is reflexive (for all formula_7, formula_8), antisymmetric (for all formula_9 with formula_10 at most one of formula_11 and formula_12 can be true), and transitive (for all formula_13, if formula_11 and formula_15 then formula_16). A partially ordered set formula_3 is said to be finite when formula_4 is a  finite set. In this case, the collection of all functions formula_19 that map formula_4 to the real numbers forms a finite-dimensional vector space, with pointwise addition of functions as the vector sum operation. The dimension of the space is just the number of elements of formula_4. The order polytope is defined to be the subset of this space consisting of functions formula_19 with the following two properties: For example, for a partially ordered set consisting of two elements formula_31 and formula_32, with formula_33 in the partial order, the functions formula_19 from these points to real numbers can be identified  with points formula_35 in the Cartesian plane. For this example, the order polytope consists of all points in the formula_36-plane with formula_37. This is an isosceles right triangle with vertices at (0,0), (0,1), and (1,1). Vertices and facets. The vertices of the order polytope consist of monotonic functions from formula_4 to formula_39. That is, the order polytope is an integral polytope; it has no vertices with fractional coordinates. These functions are exactly the indicator functions of upper sets of the partial order. Therefore, the number of vertices equals the number of upper sets. The facets of the order polytope  are of three types: The facets can be considered in a more symmetric way by introducing special elements formula_48 below all elements in the partial order and formula_49 above all elements, mapped by formula_19 to 0 and 1 respectively, and keeping only inequalities of the third type for the resulting augmented partially ordered set. More generally, with the same augmentation by formula_48 and formula_49, the faces of all dimensions of the order polytope correspond 1-to-1 with quotients of the partial order. Each face is congruent to the order polytope of the corresponding quotient partial order. Volume and Ehrhart polynomial . The order polytope of a linear order is a special type of simplex called an order simplex or orthoscheme. Each point of the unit cube whose coordinates are all distinct lies in a unique one of these orthoschemes, the order simplex for the linear order of its coordinates. Because these order simplices are all congruent to each other and (for orders on formula_1 elements) there are formula_54 different linear orders, the volume of each order simplex is formula_55. More generally, an order polytope can be partitioned into order simplices in a canonical way, with one simplex for each linear extension  of the corresponding partially ordered set. Therefore, the volume of any order polytope is formula_55 multiplied by the number of linear extensions of the corresponding partially ordered set. This connection between the number of linear extensions and volume can be used to approximate the number of linear extensions of any partial order efficiently (despite the fact that computing this number exactly is #P-complete) by applying a randomized polynomial-time approximation scheme for polytope volume. The Ehrhart polynomial of the order polytope is a polynomial whose values at integer values formula_31 give the number of integer points in a copy  of the polytope scaled by a factor of formula_31. For the order polytope, the Ehrhart polynomial equals (after a minor change of variables) the order polynomial of the corresponding partially ordered set. This polynomial encodes several pieces of information about the polytope including its volume (the leading coefficient of the polynomial and its number of vertices (the sum of coefficients). Continuous lattice. By Birkhoff's representation theorem for finite distributive lattices, the upper sets of any partially ordered set form a finite distributive lattice, and every finite distributive lattice can be represented in this way. The upper sets correspond to  the vertices of the order polytope, so the mapping from upper sets to vertices provides a geometric representation of any finite distributive lattice. Under this representation, the edges of the polytope connect comparable elements of the lattice. If two functions formula_59 and formula_60 both belong to the order polytope of a partially ordered set formula_3, then the function formula_62 that maps formula_31 to formula_64, and the function formula_65 that maps formula_31 to formula_67 both also belong to the order polytope. The two operations formula_68 and formula_69 give the order polytope the structure of a continuous distributive lattice, within which the  finite distributive lattice of Birkhoff's theorem is embedded. That is, every order polytope is a distributive polytope. The distributive polytopes with all vertex coordinates equal to 0 or 1 are exactly the order polytopes.