# hasseDiagram -- produces the Hasse diagram of a poset

## Synopsis

• Usage:
D = hasseDiagram P
• Inputs:
• P, an instance of the type Poset,
• Outputs:
• D, an instance of the type Digraph, which has the direct edge $(a,b)$ if and only if $a < b$ in $P$ and if $a \leq c \leq b$ then $c = a$ or $c = b$.

## Description

The Hasse diagram of a poset is a Digraph with vertices given by the ground set of $P$ and which has the direct edge $(a,b)$ if and only if $a < b$ in $P$ and there exists no $c$ such that $a < c < b$.

 i1 : hasseDiagram booleanLattice 3 o1 = Digraph{0 => {1, 2, 4}} 1 => {3, 5} 2 => {3, 6} 3 => {7} 4 => {5, 6} 5 => {7} 6 => {7} 7 => {} o1 : Digraph

## Caveat

This method renames the vertices with integers $0, 1, \ldots$ corresponding to the index of the vertices in the GroundSet.

## See also

• coveringRelations -- computes the minimal list of generating relations of a poset
• displayPoset -- generates a PDF representation of a poset and attempts to display it

## Ways to use hasseDiagram :

• "hasseDiagram(Poset)"

## For the programmer

The object hasseDiagram is .