Skip to main content

Discrete Math with SageMath: Learn math with open-source software

Section 5.6 Partial Order

A relation \(R\) on a set is a Partial Order (PO) \(\prec\) if it satisfies the reflexive, antisymmetric, and transitive properties. A poset is a set with a partial order relation. For example, the following set of numbers with a relation given by divisibility is a poset.
A Hasse diagram is a simplified visual representation of a poset. Unlike a digraph, the relative position of vertices has meaning: if \(x\) relates to \(y\text{,}\) then the vertex \(x\) appears lower in the drawing than the vertex \(y\text{.}\) Self-loops are assumed and not shown. Similarly, the diagram assumes the transitive property and does not explicitly display the edges that are implied by the transitive property.
If \(R\) is a partial order relation on \(A\text{,}\) then the function Poset((A, R)) computes the Hasse diagram associated to \(R\text{.}\)
Moreover, the cover_relations() function shows the pairs depicted in the Hasse diagram after the previous simplifications.