1 | initial version |
I assume you want to construct boolean lattice. If so, it defined in Sage's Catalog of posets and lattices:
posets.BooleanLattice(p, use_subsets=True)
2 | No.2 Revision |
I assume you want to construct boolean lattice. If so, it it's defined in Sage's Catalog of posets and lattices:
posets.BooleanLattice(p, use_subsets=True)
3 | No.3 Revision |
I assume you want to construct boolean lattice. If so, it's defined in Sage's Catalog of posets and lattices:
posets.BooleanLattice(p, use_subsets=True)
ADDED. A subposet can be constructed as
p=5
B = posets.BooleanLattice(p, use_subsets=True)
B.subposet(t for t in B if sum(t)==p)