The lattice $P$ is distributive if the meet operation distributes over the join operation. Equivalently, $P$ is distributive if the join operation distributes over the meet operation.
The $n$ booleanLattice is distributive.
i1 : isDistributive booleanLattice 3 o1 = true |
The pentagon lattice and diamond lattice are prototypical non-distributive lattices.
i2 : P = poset {{1,2}, {1,3}, {3,4}, {2,5}, {4, 5}}; |
i3 : isLattice P o3 = true |
i4 : isDistributive P o4 = false |
i5 : D = poset {{1,2}, {1,3}, {1,4}, {2,5}, {3,5}, {4,5}}; |
i6 : isLattice D o6 = true |
i7 : isDistributive D o7 = false |
The object isDistributive is a method function.