Ask Your Question

Revision history [back]

click to hide/show revision 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)

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)

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)