This routine returns the intreval between the elements a and b in P, not including a and b, and an error message if the two elements are not comparable in P.
i1 : P = poset({a,b,c,d,e,f,g}, {(a,b), (a,c), (a,d), (b,e), (c,e), (c,f), (d,f), (e,g), (f,g)}) o1 = Poset{cache => CacheTable{} } GroundSet => {a, b, c, d, e, f, g} RelationMatrix => | 1 1 1 1 1 1 1 | | 0 1 0 0 1 0 1 | | 0 0 1 0 1 1 1 | | 0 0 0 1 0 1 1 | | 0 0 0 0 1 0 1 | | 0 0 0 0 0 1 1 | | 0 0 0 0 0 0 1 | Relations => {(a, b), (a, c), (a, d), (b, e), (c, e), (c, f), (d, f), (e, g), (f, g)} o1 : Poset |
i2 : openInterval(P,a,g) o2 = Poset{cache => CacheTable{} } GroundSet => {b, c, d, e, f} RelationMatrix => | 1 0 0 1 0 | | 0 1 0 1 1 | | 0 0 1 0 1 | | 0 0 0 1 0 | | 0 0 0 0 1 | Relations => {(b, b), (b, e), (c, c), (c, e), (c, f), (d, d), (d, f), (e, e), (f, f)} o2 : Poset |