The poset $P$ is a lattice if every pair of vertices has a unique least upper bound and a unique greatest lower bound, i.e., every pair of vertices has a unique meet and a unique join. Equivalently, the poset $P$ is a lattice if it is both a lower semilattice and an upper semilattice.
Clearly, the $n$ chain and the $n$ booleanLattice are lattices.
i1 : n = 4; |
i2 : isLattice chain n o2 = true |
i3 : B = booleanLattice n; |
i4 : isLattice B o4 = true |
The middle ranks of the $n$ booleanLattice are not lattices.
i5 : isLattice flagPoset(B, {1,2,3}) o5 = false |
The object isLattice is a method function.