# distributiveLattice -- computes the lattice of order ideals of a poset

## Synopsis

• Usage:
L = distributiveLattice P
• Inputs:
• P, an instance of the type Poset,
• Outputs:
• L, an instance of the type Poset, the distributive lattice of $P$

## Description

The distributive lattice of a poset $P$ is the poset of all order ideals of $P$ ordered by inclusion.

 i1 : P = poset {{1,2}, {1,3}}; i2 : distributiveLattice P o2 = Relation Matrix: | 1 1 1 1 1 | | 0 1 1 1 1 | | 0 0 1 1 0 | | 0 0 0 1 0 | | 0 0 0 1 1 | o2 : Poset

The distributive lattice of a chain poset of length $n$ is the chain poset of length $n+1$.

 i3 : distributiveLattice chain 3 o3 = Relation Matrix: | 1 1 1 1 | | 0 1 1 1 | | 0 0 1 1 | | 0 0 0 1 | o3 : Poset