![]() | 1 | initial version |
Like this
def dilworth(P):
def lequal(A, B):
return all(any(P.is_lequal(a, b) for b in B) for a in A)
data = [tuple(a) for a in P.maximal_antichains()]
return Poset([data, lequal])
![]() | 2 | No.2 Revision |
Like this
def dilworth(P):
def lequal(A, B):
return all(any(P.is_lequal(a, b) for b in B) for a in A)
w = P.width()
data = [tuple(a) for a in P.maximal_antichains()]
P.maximal_antichains() if len(a) == w]
return Poset([data, lequal])