next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Posets :: hasseDiagram

hasseDiagram -- returns Hasse diagram for the poset

Synopsis

Description

This routine returns the Hasse diagram which is a directed graph (defined in the Graphs package) whose edges correspond to the covering relations in P. Specifically, the vertices in the graph correspond to the elements in the ground set of P, and two vertices a and b have a directed edge from a to b if a > b.
i1 : P = poset ({a,b,c,d},{(a,b), (b,c), (b,d)})

o1 = Poset{cache => CacheTable{}                }
           GroundSet => {a, b, c, d}
           RelationMatrix => | 1 1 1 1 |
                             | 0 1 1 1 |
                             | 0 0 1 0 |
                             | 0 0 0 1 |
           Relations => {(a, b), (b, c), (b, d)}

o1 : Poset
i2 : G = hasseDiagram(P)

o2 = Digraph{a => set {b}   }
             b => set {c, d}
             c => set {}
             d => set {}

o2 : Digraph

See also

Ways to use hasseDiagram :