← back to algebra

Lattices and Boolean Algebras

Tom Judson · GFDL · Abstract Algebra: Theory and Applications, Ch. 8

A lattice is a partially ordered set where every pair of elements has a least upper bound (join) and a greatest lower bound (meet). A Boolean algebra is a distributive, complemented lattice. Boolean algebras connect algebra to logic: meet is AND, join is OR, complement is NOT.

Partial orders

A partial order is a relation that is reflexive (a ≤ a), antisymmetric (a ≤ b and b ≤ a implies a = b), and transitive (a ≤ b and b ≤ c implies a ≤ c). Not every pair needs to be comparable. The divisibility relation on positive integers is a partial order: 2 | 6 but 2 and 3 are incomparable.

Scheme

Meet and join

The meet (greatest lower bound) of a and b, written a ∧ b, is the largest element below both. The join (least upper bound), written a ∨ b, is the smallest element above both. In the divisibility lattice, meet is GCD and join is LCM.

Scheme

The diamond lattice

The divisors of 6 under divisibility form a diamond-shaped lattice. This is the simplest non-chain lattice: 2 and 3 are incomparable, but both sit between 1 and 6.

6 2 3 1 2|6 3|6 1|2 1|3

Boolean algebras

A Boolean algebra is a distributive lattice with complements: for every element a, there exists a' such that a ∧ a' = 0 and a ∨ a' = 1. The power set of any set, ordered by inclusion, is a Boolean algebra. So is the two-element set (0, 1) with AND, OR, and NOT.

Scheme

Notation reference

Math Scheme Python Meaning
a ∧ b(meet a b)meet(a, b)Greatest lower bound
a ∨ b(join a b)join(a, b)Least upper bound
a'(complement a)comp(a)Complement
a ≤ b(divides? a b)b % a == 0Partial order
P(S)bitmask opsbitmask opsPower set (Boolean algebra)
Neighbors

Algebra track

Category theory connections

  • Milewski Ch.3 — preorders are categories where hom-sets have at most one morphism; lattices are preorders with products and coproducts
  • Milewski Ch.23 — topoi have Heyting algebra structure on subobjects, generalizing Boolean algebras by dropping excluded middle

Translation notes

Judson covers lattices and Boolean algebras in Ch. 19. The power set Boolean algebra is the canonical example. The connection to logic (meet = AND, join = OR) makes Boolean algebras central to computer science. The wpHeyting algebra generalization (drop the complement axiom, keep distributivity) connects to intuitionistic logic and the internal logic of topoi. Every Boolean algebra is a Heyting algebra, but not conversely.