# partitionLattice -- computes the lattice of set-partitions of size $n$

## Synopsis

• Usage:
P = partitionLattice n
• Inputs:
• n, an integer, the size of the set to partition
• Outputs:
• P, an instance of the type Poset,

## Description

The partition lattice of order $n$ is the lattice of setPartitions of the set $\{1,\ldots,n\}$ with ordering given by refinement. That is, the set-partition $p$ is greater than or equal to the set-partition $q$ if each part of $p$ is contained in exactly one part of $q$.

 i1 : partitionLattice 3 o1 = Relation Matrix: | 1 1 1 1 1 | | 0 1 0 0 1 | | 0 0 1 0 1 | | 0 0 0 1 1 | | 0 0 0 0 1 | o1 : Poset

• setPartition -- computes the list of set-partitions of size $n$