|   | 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)
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.