Introduction

Many collections are ordered, but not totally: subsets ordered by inclusion, tasks ordered by "must finish before", integers ordered by divisibility. In each case some pairs are comparable and others are not. A partially ordered set (poset) captures this. A lattice is a poset in which every two elements have a best common upper bound and a best common lower bound; lattices underlie Boolean algebra, data-flow analysis in compilers, and type hierarchies.

Prerequisites

  • Relations: reflexive, antisymmetric and transitive relations; digraphs of relations.

Core concepts

Partial orders

A relation ⪯\preceq on a set SS is a partial order if it is

  • reflexive: a⪯aa \preceq a;
  • antisymmetric: a⪯ba \preceq b and b⪯ab \preceq a imply a=ba = b;
  • transitive: a⪯ba \preceq b and b⪯cb \preceq c imply a⪯ca \preceq c.

(S,⪯)(S, \preceq) is a poset. Elements a,ba, b are comparable if a⪯ba \preceq b or b⪯ab \preceq a, otherwise incomparable. A poset in which every pair is comparable is a total (linear) order, or chain. A set of pairwise incomparable elements is an antichain. We write a≺ba \prec b for a⪯ba \preceq b and a≠ba \ne b (a strict order: irreflexive and transitive).

Standard examples: (Z,≤)(\mathbb{Z}, \le) (total); (P(A),⊆)(\mathcal{P}(A), \subseteq) (not total when ∣A∣≥2|A| \ge 2); (Z+,∣)(\mathbb{Z}^{+}, \mid) where a∣ba \mid b means "aa divides bb" (not total: 2 and 3 are incomparable). Divisibility on all of Z\mathbb{Z} is not a partial order, because 2∣−22 \mid -2 and −2∣2-2 \mid 2 with 2≠−22 \ne -2.

A well-ordered set is a total order in which every non-empty subset has a least element: (N,≤)(\mathbb{N}, \le) is well-ordered, (Z,≤)(\mathbb{Z}, \le) is not. Well-ordering is the basis of mathematical induction.

Hasse diagrams

A Hasse diagram draws a finite poset without redundant information. bb covers aa if a≺ba \prec b and there is no cc with a≺c≺ba \prec c \prec b. Draw an upward edge from aa to bb for each covering pair only: omit loops (reflexivity), omit edges implied by transitivity, and omit arrowheads (larger elements are higher).

Hasse diagram of the divisors of 12
Figure 1. The poset of positive divisors of 12 under divisibility, D12={1,2,3,4,6,12}D_{12} = \{1, 2, 3, 4, 6, 12\}: left, the full digraph of the relation; right, its Hasse diagram with only the 7 covering edges.

Special elements

Let (S,⪯)(S, \preceq) be a poset and T⊆ST \subseteq S.

TermDefinition
Maximal element of SSno b∈Sb \in S with a≺ba \prec b
Minimal element of SSno b∈Sb \in S with b≺ab \prec a
Greatest element (top, 11)b⪯ab \preceq a for all b∈Sb \in S
Least element (bottom, 00)a⪯ba \preceq b for all b∈Sb \in S
Upper bound of TTuu with t⪯ut \preceq u for all t∈Tt \in T
Least upper bound (lub, supremum, join)an upper bound below every other upper bound
Lower bound, greatest lower bound (glb, infimum, meet)the mirror images

Key distinctions:

  • A greatest element is maximal, but a maximal element need not be greatest. In ({2,3,4,6},∣)(\{2, 3, 4, 6\}, \mid), 4 and 6 are both maximal and there is no greatest element.
  • A finite non-empty poset always has at least one maximal and one minimal element. The greatest element, if it exists, is unique, and then it is the only maximal element.
  • An infinite poset may have none: (Z,≤)(\mathbb{Z}, \le) has no maximal element.
  • A lub, when it exists, is unique (by antisymmetry). It may not belong to TT.

Topological sorting

Every finite partial order can be extended to a total order compatible with it (a linear extension, or topological sort): repeatedly remove a minimal element and append it to the output. This is how a build system or a course planner orders tasks; the graph version is in Depth-First Search. D12D_{12} has 5 linear extensions, for example 1,2,3,4,6,121, 2, 3, 4, 6, 12 and 1,3,2,6,4,121, 3, 2, 6, 4, 12.

Lattices

A poset (L,⪯)(L, \preceq) is a lattice if every pair a,b∈La, b \in L has both a least upper bound and a greatest lower bound in LL:

a∨b=lub{a,b}(join),a∧b=glb{a,b}(meet).a \lor b = \text{lub}\{a, b\} \quad (\text{join}), \qquad a \land b = \text{glb}\{a, b\} \quad (\text{meet}).
LatticeJoin a∨ba \lor bMeet a∧ba \land b
(P(A),⊆)(\mathcal{P}(A), \subseteq)a∪ba \cup ba∩ba \cap b
(Z+,∣)(\mathbb{Z}^{+}, \mid) and (Dn,∣)(D_n, \mid)lcm⁡(a,b)\operatorname{lcm}(a, b)gcd⁡(a,b)\gcd(a, b)
Any chain, e.g. (Z,≤)(\mathbb{Z}, \le)max⁡(a,b)\max(a, b)min⁡(a,b)\min(a, b)

Joins and meets in any lattice satisfy, for all a,b,ca, b, c: commutativity, associativity, idempotence (a∨a=aa \lor a = a), and the absorption laws a∨(a∧b)=aa \lor (a \land b) = a and a∧(a∨b)=aa \land (a \lor b) = a. Conversely, a set with two operations satisfying these laws is a lattice under a⪯b  ⟺  a∧b=aa \preceq b \iff a \land b = a. Also a⪯b  ⟺  a∨b=ba \preceq b \iff a \lor b = b.

To show a poset is not a lattice, find a pair with no lub (two or more minimal upper bounds, or none) or no glb.

Bounded, complemented and distributive lattices

  • Bounded: has a least element 00 and a greatest element 11. Every finite lattice is bounded (take the join of all elements, and the meet).
  • Complement: in a bounded lattice, bb is a complement of aa if a∨b=1a \lor b = 1 and a∧b=0a \land b = 0. A complemented lattice gives every element at least one complement. Complements need not be unique.
  • Distributive: a∧(b∨c)=(a∧b)∨(a∧c)a \land (b \lor c) = (a \land b) \lor (a \land c) for all a,b,ca, b, c. (Either distributive law implies the other in a lattice.)
  • In a distributive bounded lattice, every element has at most one complement.
  • A Boolean algebra is a complemented distributive lattice. Every finite Boolean algebra is isomorphic to (P(A),⊆)(\mathcal{P}(A), \subseteq) for some finite AA, so it has 2k2^k elements.

Test for distributivity (Birkhoff's theorem): a lattice is distributive if and only if it contains no sublattice isomorphic to the pentagon N5N_5 or the diamond M3M_3.

  • N5N_5: elements 0<a<c<10 < a < c < 1 and 0<b<10 < b < 1, with bb incomparable to aa and cc. Here c∧(a∨b)=c∧1=cc \land (a \lor b) = c \land 1 = c but (c∧a)∨(c∧b)=a∨0=a(c \land a) \lor (c \land b) = a \lor 0 = a.
  • M3M_3: 00, three pairwise incomparable atoms a,b,ca, b, c, and 11. Here a∧(b∨c)=aa \land (b \lor c) = a but (a∧b)∨(a∧c)=0(a \land b) \lor (a \land c) = 0.

Both are complemented but not distributive; in M3M_3, aa has the two complements bb and cc.

Lattice and non-lattice examples
Figure 2. Four Hasse diagrams: a poset that is not a lattice (two minimal upper bounds), the pentagon N5N_5, the diamond M3M_3, and the Boolean lattice D30D_{30} of divisors of 30.

The divisor lattice DnD_n

DnD_n, the positive divisors of nn under divisibility, is always a distributive lattice with 0=10 = 1 (the number one) and top =n= n. The complement of dd, if it exists, must be n/dn/d with gcd⁡(d,n/d)=1\gcd(d, n/d) = 1. Hence:

Dn is complemented (and then a Boolean algebra)  ⟺  n is square-free.D_n \text{ is complemented (and then a Boolean algebra)} \iff n \text{ is square-free}.

Examples: D30D_{30} (30=2⋅3⋅530 = 2 \cdot 3 \cdot 5) is a Boolean algebra with 8 elements, isomorphic to P({2,3,5})\mathcal{P}(\{2, 3, 5\}). D12D_{12} is not complemented: 2 has no complement, since lcm⁡(2,d)=12\operatorname{lcm}(2, d) = 12 needs 4∣d4 \mid d and then gcd⁡(2,d)≥2\gcd(2, d) \ge 2.

Worked examples

Example 1: special elements

Poset ({2,3,4,6,9,12,18},∣)(\{2, 3, 4, 6, 9, 12, 18\}, \mid). Minimal elements: 2 and 3 (no proper divisor in the set). Maximal: 12 and 18. No least or greatest element. Upper bounds of {2,3}\{2, 3\}: 6, 12, 18; least upper bound 6. Upper bounds of {4,6}\{4, 6\}: only 12, so the lub is 12. Upper bounds of {12,18}\{12, 18\}: none in the set, so this poset is not a lattice.

Example 2: is it a lattice?

S={1,2,3,12,18,36}S = \{1, 2, 3, 12, 18, 36\} under divisibility. Upper bounds of {2,3}\{2, 3\} in SS: 12, 18, 36. Since 12 and 18 are incomparable and both are minimal upper bounds, {2,3}\{2, 3\} has no lub. Not a lattice.

Example 3: complements in D30D_{30} and D36D_{36}

In D30D_{30}: complement of 6 is 5 (lcm⁡=30\operatorname{lcm} = 30, gcd⁡=1\gcd = 1); complement of 10 is 3. Every element has exactly one complement.

In D36D_{36} (36=223236 = 2^2 3^2, not square-free): elements 1,2,3,4,6,9,12,18,361, 2, 3, 4, 6, 9, 12, 18, 36. Only 1, 4, 9, 36 have complements (the pairs 1↔361 \leftrightarrow 36 and 4↔94 \leftrightarrow 9); 2, 3, 6, 12 and 18 have none.

Example 4: counting comparable pairs

In D12D_{12}, how many ordered pairs (a,b)(a, b) satisfy a∣ba \mid b? For each bb, count its divisors: 1+2+2+3+4+6=181 + 2 + 2 + 3 + 4 + 6 = 18. This includes the 6 reflexive pairs, so the strict order has 12 pairs, of which 7 are covering edges.

Important properties and observations

  • Every chain is a distributive lattice. Every sublattice of a distributive lattice is distributive.
  • The dual of a poset (reverse the order) is a poset; the dual of a lattice is a lattice with ∨\lor and ∧\land swapped. Any theorem stays true after this swap (duality principle).
  • A finite lattice is bounded; an infinite lattice need not be ((Z,≤)(\mathbb{Z}, \le)).
  • In a Boolean algebra the complement is unique and De Morgan's laws hold: a∨b‾=a‾∧b‾\overline{a \lor b} = \overline{a} \land \overline{b}.
  • Number of elements of a finite Boolean algebra is a power of 2. A lattice whose size is not a power of 2 (like D12D_{12} with 6 elements) cannot be a Boolean algebra.

GATE examination perspective

  • Hasse diagram questions. Identify covering pairs, maximal/minimal, greatest/least, and lub/glb of a subset. Remember that maximal and greatest are different.
  • "Is it a lattice?" Look for two incomparable elements with two minimal upper bounds (or two maximal lower bounds).
  • Complemented and distributive. Check for N5N_5 and M3M_3; in DnD_n use the square-free test.
  • Counting. Number of comparable pairs, number of complements, number of linear extensions for small posets.
  • Trap: a complemented lattice need not be distributive; a distributive lattice need not be complemented (D12D_{12}, or any chain with more than 2 elements).
  • Trap. Divisibility is a partial order on positive integers and also on nonnegative integers. On all integers, antisymmetry fails because nonzero aa and −a-a divide each other.

Summary

Sources

  1. K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2012: Section 9.6 (Partial Orderings) and Chapter 12 (Boolean Algebra).
  2. B. A. Davey and H. A. Priestley, Introduction to Lattices and Order, 2nd ed., Cambridge University Press, 2002: Chapter 4 (Modular, distributive and Boolean lattices).

Next steps