The GAP package Simplicial Homology, available at http://www.eecis.udel.edu/~dumas/Homology/, provides methods for using posets within GAP. According to the documentation, posets are stored in GAP in the following manor: The ground set is the set of integers $1..n+1$ and the relations are stored in a list of length $n$, where the $i$th entry is the set of vertices which cover $i$ in the poset. In particular, $1$ should be the unique minimal element and $n+1$ should be the unique maximal element.
When converting from GAP format, the conversion is direct using the above convention. In this example, S is generated with the GAP command OrderRelationToPoset(Subsets([1,2,3]), IsSubset);.
i1 : S = "[ [ 3 ], [ 10 ], [ 4, 7, 9 ], [ 5, 6 ], [ 2 ], [ 2 ], [ 5, 8 ], [ 2 ], [ 6, 8 ], [ ] ]"; |
i2 : P = gapConvertPoset S o2 = P o2 : Poset |
i3 : P == augmentPoset booleanLattice 3 o3 = true |
When converting to GAP format, the method automatically augments the poset. In this example, the $3$ chain becomes a $5$ chain in GAP format.
i4 : gapConvertPoset chain 3 o4 = [[2], [3], [4], [5], []] |
The object gapConvertPoset is a method function.