6.2  Using Zorn’s Lemma

Section 6.1 turned Zorn’s lemma into a four-step template. This section uses it twice. The first use finishes the matching that opened Section 6.1 and answers the question Section 3.4 left open: any two sets are comparable in size. The second extends any partial order to a total one, the infinite form of putting tasks in an order that respects their prerequisites. An optional last subsection shows the same template in linear algebra.

6.2.1. Back to comparing sizes

Section 3.4 defined |A|≤|B| as the existence of an injection A→B (Definition 3.4.1) and proved that injections both ways give a bijection (Theorem 3.4.3). It left open whether at least one of the two injections always exists. Section 6.1 tried to build one by matching elements pair by pair, and the attempt got two things right: an unfinished matching can be enlarged by one pair, and a growing family of matchings, put together, is again a matching. Those are steps (4) and (2) of the maximality template (Example (Method: the maximality template)), and Zorn’s lemma supplies the rest.

Theorem 6.2.1 (Any Two Sets Are Comparable)

For all sets A and B, |A|≤|B| or |B|≤|A|.

Idea. By the method of Example (Method: the maximality template). The partial objects are the partial matchings: relations G⊆A×B in which each element of A and each element of B occurs in at most one pair. The union of a chain of them is one, since each condition mentions two pairs at a time. A maximal matching uses up A or B, since otherwise one more pair fits; read in the right direction, it is an injection.

Proof. Let P be the set of relations G⊆A×B such that

  • (M1) if (a,b),(a,b′)∈G, then b=b′;
  • (M2) if (a,b),(a′,b)∈G, then a=a′;

ordered by ⊆. It is a set of subsets of A×B, so ⊆ is a partial order on it.

Partial objects. ∅∈P, since (M1) and (M2) hold vacuously; so P≠∅.

Chains. Let C⊆P be a non-empty chain and H:=⋃C⊆A×B. Any two pairs of H lie in a single member G∈C (Lemma 6.1.1 (b), with n=2). So if (a,b),(a,b′)∈H, then b=b′ by (M1) for G; and (M2) for H follows in the same way. Hence H∈P, and G⊆H for every G∈C: H is an upper bound of C in P.

Zorn. By Theorem 6.1.2, P has a maximal element M.

M uses up a side. Suppose some a0∈A occurs in no pair of M, and some b0∈B occurs in no pair of M. Then M′:=M∪{(a0,b0)} satisfies (M1) and (M2), because the new pair shares no coordinate with a pair of M. So M′∈P, M⊆M′, and M≠M′, since (a0,b0)∉M. This contradicts the maximality of M. Hence every a∈A occurs in a pair of M, or every b∈B does.

Case 1: every a∈A occurs. By (M1) it occurs in exactly one pair, so M is the graph of a function f:A→B (Definition 1.5.1). If f(a)=f(a′)=b, then (a,b),(a′,b)∈M, so a=a′ by (M2): f is injective, and |A|≤|B|.

Case 2: every b∈B occurs. Consider the inverse relation M−1={(b,a):(a,b)∈M}⊆B×A (Definition 1.4.3). Every b∈B occurs as a first coordinate of M−1, and by (M2) in exactly one pair; so M−1 is the graph of a function g:B→A. By (M1), g(b)=g(b′)=a gives b=b′: g is injective, and |B|≤|A|.

Section 6.1’s “continue until one side is used up” has become step (4): a maximal matching cannot be continued, and so a side is used up. The words “and so on” never appear.

Corollary 6.2.2 (Trichotomy for Sizes)

For all sets A and B, exactly one of |A|<|B|, |A|=|B|, |B|<|A| holds.

Proof. At least one. By Theorem 6.2.1, |A|≤|B| or |B|≤|A|. In the first case, either |A|=|B|, or not, and then |A|<|B| by Definition 3.4.1. The second case gives |B|=|A|, hence |A|=|B| (Proposition 2.5.1 (b)), or |B|<|A|.

At most one. |A|<|B| excludes |A|=|B| by Definition 3.4.1. |B|<|A| excludes |B|=|A|, and therefore |A|=|B|, by symmetry (Proposition 2.5.1 (b)). Finally, |A|<|B| and |B|<|A| together give injections A→B and B→A, so |A|=|B| by Theorem 3.4.3, contradicting |A|<|B|.

Comparability is itself equivalent to the axiom of choice, a fact proved in Axiomatic Set Theory, Chapter 4: this book needed choice for it, and no proof can avoid it.

Quick check. Run the proof of Theorem 6.2.1 on A={1,2,3} and B={x,y}: describe the maximal elements of P, and say which case of the proof occurs.

Solution. A partial matching has at most two pairs, since each of x, y occurs at most once. The maximal elements are the six two-pair matchings {(a,x),(a′,y)} with a≠a′ in A (three choices of a, then two of a′). A matching with fewer pairs is not maximal: it leaves some element of A and some element of B unpaired, and one more pair fits. No maximal M pairs every element of A: that would be an injection A→B, impossible by Corollary 2.5.3 (a). So Case 2 occurs every time: M−1 is an injection B→A. This is the finite example of Section 6.1, where the matching (1,x), (2,y) ran out of B.

A maximal matching tells us which side is used up, not that the sizes differ. For A=B=N, the identity {(n,n):n∈N} is a maximal matching that uses up both sides. So is {(n,n+1):n∈N}: it pairs every element of A, and although 0∈B is unpaired, no element of A is left to pair it with. That matching is an injection and not a bijection, although |N|=|N|. The proof only promises an injection, and that is all it delivers.

6.2.2. Extending a partial order

Suppose a project consists of tasks, and some tasks must be done before others. Write u⪯v when task u must come no later than task v: either u=v, or u must be finished before v can start, directly or through a sequence of prerequisites. Counting each task as coming no later than itself makes ⪯ reflexive; passing prerequisites along makes it transitive; and no two different tasks can each be required before the other, or nothing could ever start. So ⪯ is a partial order. A schedule puts the tasks in one line, and it respects the prerequisites when its order, a total order, contains ⪯.

For finitely many tasks there is a procedure: pick a task with no unfinished prerequisite, do it, and repeat. Here is a small case. Five tasks, survey S, financing F, design D, permit P and building B, with four prerequisites: S before D,F before D,D before B,F before P. The order they generate consists of the five pairs (t,t), the four given pairs, and the two pairs (S,B) and (F,B) that the prerequisites pass along through D: eleven pairs in all. At the start, S and F have no prerequisites. Picking S, then F, leaves D and P free; picking D, then P, frees B. That gives the schedule S, F, D, P, B. Picking F first instead, then P, then S, then D, then B, gives a second schedule F, P, S, D, B. Each contains all eleven pairs: in both lists S and F come before D, D before B, F before P, and hence S and F before B. So schedules are not unique (there are seven in all), and the procedure needs the tasks in hand, one free task at a time, until none is left. For an infinite set with no list there is no last step, and the maximality template does the work instead. Its engine is a single move: two incomparable elements can be made comparable without breaking anything.

A partial order on X is a relation on X, a subset of X×X (Definition 1.4.3), so it makes sense to say that one partial order is contained in another.

Lemma 6.2.3 (Adding One Comparison)

Let ⪯ be a partial order on a set X, and let a,b∈X be incomparable. Let R:=⪯∪{(x,y)∈X×X:x⪯a and b⪯y}. Then R is a partial order on X, ⪯⊆R, and (a,b)∈R∖⪯.

Idea. R puts everything below a below everything above b. A new pair can break antisymmetry or transitivity only by producing b⪯a, and incomparability forbids that.

Proof. Call a pair (x,y) new if x⪯a and b⪯y, and old if x⪯y. Every pair of R is old or new. The pair (a,b) is new, since a⪯a and b⪯b by (PO1), and it is not old, since a and b are incomparable. By the definition of R, ⪯⊆R.

(PO1): x⪯x for every x∈X, and ⪯⊆R.

(PO2): let xRy and yRx. If both pairs are old, x=y by (PO2) for ⪯. If (x,y) is new and (y,x) old, then b⪯y⪯x⪯a, so b⪯a by (PO3), which incomparability excludes. If (x,y) is old and (y,x) new, then b⪯x⪯y⪯a, excluded in the same way. If both are new, then b⪯x (from (y,x)) and x⪯a (from (x,y)), so again b⪯a. Only the first case can occur, and it gives x=y.

(PO3): let xRy and yRz. If both pairs are old, x⪯z by (PO3). If (x,y) is old and (y,z) new, then x⪯y⪯a and b⪯z, so (x,z) is new. If (x,y) is new and (y,z) old, then x⪯a and b⪯y⪯z, so (x,z) is new. If both are new, x⪯a and b⪯z directly. In every case xRz.

Quick check. Apply Lemma 6.2.3 to ⊆ on P({1,2}) with a={1} and b={2}. Which pairs does R add to ⊆?

Solution. A new pair (x,y) needs x⊆{1} and {2}⊆y: x∈{∅,{1}} and y∈{{2},{1,2}}. Of these four pairs, all but ({1},{2}) already belong to ⊆. So R adds exactly one pair, and it is the total order ∅,{1},{2},{1,2}.

The lemma adds one comparison. The template adds them all at once.

Theorem 6.2.4 (Every Partial Order Extends to a Total Order)

Let ⪯ be a partial order on a set X. Then there is a total order T on X with ⪯⊆T.

This book’s word is “total” (Definition 4.3.1); “linear order” is a common synonym, and T is then called a linear extension of ⪯.

Idea. By the method of Example (Method: the maximality template). The partial objects are the partial orders on X containing ⪯. The union of a chain of them is one, since (PO2) and (PO3) each mention two pairs. A maximal one is total, because Lemma 6.2.3 enlarges any partial order that has an incomparable pair.

Proof. Let P be the set of partial orders R on X with ⪯⊆R, a set of subsets of X×X, ordered by ⊆. Then ⪯∈P, so P≠∅.

Let C⊆P be a non-empty chain and H:=⋃C⊆X×X. Since C has a member, and that member contains ⪯, so does H; in particular (PO1) holds for H. If (x,y),(y,x)∈H, some single R0∈C contains both (Lemma 6.1.1 (b)), so x=y by (PO2) for R0. If (x,y),(y,z)∈H, some R0∈C contains both, so (x,z)∈R0⊆H by (PO3) for R0. Hence H∈P, and it is an upper bound of C.

By Theorem 6.1.2, P has a maximal element T. Suppose T is not total, and let a,b∈X be incomparable for T. By Lemma 6.2.3, applied to T, there is a partial order R on X with T⊆R and T≠R. Since ⪯⊆T⊆R, R∈P, contradicting the maximality of T. So T is total.

Warning. One comparison at a time. It is tempting to skip Zorn’s lemma and settle every incomparable pair at once, each in some direction. That can fail. Take equality on X={1,2,3}, where no two different elements are comparable, and decide the three pairs as 1 before 2, 2 before 3, 3 before 1. Each decision alone is harmless, but together they break transitivity, and adding the pairs that transitivity demands puts 1 before 3 and 3 before 1, against (PO2). Lemma 6.2.3 adds one comparison and then passes the consequences along; the next comparison is made in the new order, where the earlier ones are already visible. The template is what turns this one-step move into a total order when the pairs cannot be listed.

Sometimes no Zorn is needed, because a formula gives the extension.

Example (A total order containing divisibility)

On N, let x⊑y mean: y=0, or x≠0 and x≤y. Show that ⊑ is a total order on N containing ∣, and that ≤ does not contain ∣.

Solution. In words, ⊑ is the usual order on the positive integers with 0 moved to the top.

(PO1): if x=0, then x⊑x by the first alternative; otherwise x≤x.

Total: let x,y∈N. If y=0, then x⊑y; if x=0, then y⊑x; if both are non-zero, x≤y or y≤x, by totality of ≤.

(PO2): let x⊑y and y⊑x. If y=0, then y⊑x cannot hold by the second alternative, which needs y≠0; so x=0=y. The case x=0 is the same with the roles exchanged. If both are non-zero, x≤y≤x, so x=y.

(PO3): let x⊑y and y⊑z. If z=0, then x⊑z. Otherwise the second alternative holds for (y,z): y≠0 and y≤z. Then x⊑y with y≠0 also holds by the second alternative: x≠0 and x≤y. So x≤z, and x⊑z.

Contains ∣: let a,b∈N with a∣b, say b=ka with k∈Z (Definition 1.1.2). If b=0, then a⊑b. If b≠0, then a≠0, since 0∣b would mean b=k⋅0=0. With a,b>0, k>0, so k≥1 and b=ka≥a: a⊑b.

≤ does not contain ∣: 2∣0, since 0=0⋅2, but 2≤0 fails.

Where a formula exists, it is the better proof. Theorem 6.2.4 matters for orders such as ⊆ on P(R), for which no formula for a total extension is known.

Quick check. Put 0,1,4,6,12 in ⊑-order. Which two of them are comparable under ⊑ but not under ∣?

Solution. 1⊑4⊑6⊑12⊑0. Every pair is comparable under ⊑, which is total. Under ∣: 1 divides all of them, all of them divide 0, 4∣12 and 6∣12. The remaining pair is 4, 6: 4⊑6, but neither divides the other. So 4 and 6 are the only such pair.

The four uses of the template on the main line of this chapter, side by side:

Object Partial objects Why unions of chains stay partial objects Why a maximal one is complete
choice function (Theorem 6.1.3) graphs defined on part of I (C1), (C2) mention at most two pairs a missed index can be added
representatives (Example (A set of representatives)) sets meeting each class at most once the condition mentions two elements a missed class can be added
injection (Theorem 6.2.1) partial matchings (M1), (M2) mention two pairs if both sides have an unpaired element, they can be paired
total order (Theorem 6.2.4) partial orders containing ⪯ (PO2), (PO3) mention two pairs an incomparable pair can be compared (Lemma 6.2.3)

6.2.3. Optional: every vector space has a basis

Nothing later in the book depends on this subsection. For a reader who has met vector spaces, it sketches, without proving here, how Linear Algebra, Section 1.8 uses the same template.

A basis of a vector space V is a linearly independent set of vectors that spans V. The theorem there is that every linearly independent set S⊆V lies in a basis. In the language of Example (Method: the maximality template), the partial objects are the linearly independent sets containing S, ordered by ⊆; S itself is one. Independence is a condition on finitely many vectors at a time: a set is independent when no finite non-trivial combination of its vectors is 0. So a dependence among vectors of the union of a chain involves finitely many vectors, which lie in one member of the chain (Lemma 6.1.1 (b)), and that member is independent: the union is a partial object. Zorn’s lemma gives a maximal independent set M. It spans V, since a vector outside its span could be added to M without creating a dependence, giving a strictly larger partial object. With S=∅, every vector space has a basis, including R as a vector space over Q, where no basis can be written down.

6.2.4. Exercises

A. Check your understanding

Exercise (A1)

These questions are about the proof of Theorem 6.2.1.

  • (a) Where does the proof use (M1), and where (M2)?
  • (b) Why can “some a∈A is unpaired” and “some b∈B is unpaired” not both hold for a maximal M?
  • (c) If A=∅, what is M, and which case occurs?
  • (d) In two sentences, give the proof’s idea.

Solution.

  • (a) The chain step uses both, to show that the union of a chain lies in P. The step “M uses up a side” uses both for M, to see that M∪{(a0,b0)} still satisfies them. Case 1 uses (M1) to get a function A→B and (M2) for its injectivity; Case 2 uses (M2) to get a function B→A and (M1) for its injectivity.

  • (b) Then the pair (a,b) can be added: M∪{(a,b)} satisfies (M1) and (M2) and is strictly larger, so M is not maximal.

  • (c) A×B=∅, so P={∅} and M=∅. Case 1 occurs: every element of ∅ occurs in M, vacuously, and M is the graph of the empty function ∅→B, which is injective. If also B=∅, Case 2 holds as well.

  • (d) A maximal partial matching between A and B cannot be extended, so it uses up A or B. Read in the right direction, it is an injection.

B. Practice

Exercise (B1: Name the move, then complete it)

Let R be a relation from A to B whose domain is A (Definition 1.4.3). Prove that there is a function f:A→B whose graph is contained in R.

Below, the proof is started; the second half is blank. Name the move, then complete it.

Let P be the set of G⊆R such that each a∈A occurs in at most one pair of G, ordered by ⊆. Then ∅∈P. ― Hence the graph of f is contained in R.

Solution. The move is the maximality template, Example (Method: the maximality template); steps (2) to (4) remain.

Completion. Let C⊆P be a non-empty chain. Its union lies in R, and two pairs of the union lie in one member of C (Lemma 6.1.1 (b)), so an element of A occurs in at most one pair of the union. The union is in P and is an upper bound of C. By Theorem 6.1.2, P has a maximal element M. Suppose some a0∈A occurs in no pair of M. Since a0 is in the domain of R, there is b0 with (a0,b0)∈R (one use of ∃E). Then M∪{(a0,b0)}⊆R, a0 occurs in it once, and it is strictly larger than M: a contradiction with maximality. So each a∈A occurs in exactly one pair of M, and M is the graph of a function f:A→B (Definition 1.5.1), with M⊆R.

Exercise (B2: A total order on the subsets of a three-element set)
  • (a) Write the eight subsets of {1,2,3} in a list such that A⊊B always puts A before B, and prove that it does.
  • (b) How many total orders on P({1,2}) contain ⊆?

Solution.

  • (a) ∅,{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}. The list is arranged by the number of elements. If A⊊B, then A has fewer elements than B (Proposition 2.5.6), so A comes in an earlier block of the list.

  • (b) Two. The empty set must come first, since ∅⊆Y for every Y, and {1,2} last, since every Y⊆{1,2}. The sets {1} and {2} are incomparable under ⊆, so they may come in either order, and both orders work.

Exercise (B3: A total order on the plane)

On R2, let (x1,x2)≤p(y1,y2) mean x1≤y1 and x2≤y2; and let (x1,x2)≤l(y1,y2) mean x1<y1, or x1=y1 and x2≤y2.

  • (a) Show that ≤p is a partial order and not total.
  • (b) Show that ≤l is a total order containing ≤p.

Solution.

  • (a) (PO1), (PO2) and (PO3) for ≤p hold coordinate by coordinate, from the same properties of ≤ on R; for (PO2), x1=y1 and x2=y2 give equal pairs. The points (0,1) and (1,0) are incomparable: 0≤1 but 1≰0 in the second coordinate, and the reverse in the first.

  • (b) That ≤l is a total order is the argument of Section 4.3, Exercises A1 (d) and C1 (a), with R in place of N: it uses only trichotomy and transitivity of ≤. Containment: if x1≤y1 and x2≤y2, then either x1<y1, or x1=y1 and x2≤y2; in both cases (x1,x2)≤l(y1,y2).

C. Going deeper

Exercise (C1: Exit check: an order is the intersection of its total extensions)

Let ⪯ be a partial order on a set X, and let T be the set of total orders on X that contain ⪯. Prove that ⪯=⋂T.

Solution (Hint 1). For a pair (a,b) not in ⪯, you need one T∈T without it. If a and b are incomparable, find a partial order containing ⪯ and the pair (b,a).

Solution. By Theorem 6.2.4, T≠∅, so the intersection is defined, and ⪯⊆⋂T since every T∈T contains ⪯.

Let (a,b)∈X×X with (a,b)∉⪯. Then a≠b by (PO1). Since a⪯b fails, either b⪯a or a and b are incomparable.

Case b⪯a. Every T∈T contains (b,a). If it also contained (a,b), then a=b by (PO2) for T. So no T∈T contains (a,b), and since T≠∅, (a,b)∉⋂T.

Case a, b incomparable. Lemma 6.2.3, with b, a in place of a, b, gives a partial order R⊇⪯ with (b,a)∈R. Theorem 6.2.4 applied to R gives a total order T⊇R. Then T∈T and (b,a)∈T, so (a,b)∉T by (PO2), as a≠b. Hence (a,b)∉⋂T.

In both cases (a,b)∉⋂T, so ⋂T⊆⪯.

Marking scheme. (10 points) - 1: T≠∅, cited from Theorem 6.2.4. - 1: ⪯⊆⋂T. - 2: the two cases are exhaustive, because a⪯b fails. - 2: the case b⪯a, with (PO2) and a≠b. - 2: a partial order containing ⪯ and (b,a) (for example, the lemma with a and b exchanged). - 2: the extension of R to a total order and the conclusion. Fatal error (0 for the case concerned): applying the lemma to (a,b) unexchanged, which puts (a,b) into the extension instead of keeping it out.

Exercise (C2: Find the error)

Claim: any two sets are comparable. “Proof”: If A or B is empty, the empty function is an injection. Otherwise choose a0∈A and b0∈B and pair them. Choose a1∈A∖{a0} and b1∈B∖{b0}, and so on. When one set runs out, the pairs so far are an injection from it into the other.

Is the conclusion true? Does the argument prove it?

Solution. The conclusion is true: it is Theorem 6.2.1. The argument does not prove it. It fails at “and so on … when one set runs out”, the gap that (N13) of Logic and Proof, Example (What is not allowed) flags: an “and so on” needs its step, and here the process has no last step in general. Indexed by N, it uses a countable set of elements of each side (Proposition 3.1.4), and for A=B=R neither side runs out, since R is uncountable (Theorem 3.3.4). That is a counterexample to the step “the process ends”. The argument also makes infinitely many choices with no rule (Section 3.2). The repair is the proof by the template, in which “cannot be continued” replaces “runs out”.

Marking scheme. (10 points) - 2: the conclusion is true, with a citation. - 3: the failing line (“and so on … runs out”) identified, with the reason that it has no step. - 3: a counterexample to the step “the process ends” (for example A=B=R), with the countability reason. - 2: the repair by the maximality template.

R. Review

Exercise (R1: Surjections one way or the other)

Let A and B be non-empty sets. Prove that there is a surjection A→B or a surjection B→A.

Solution. By Theorem 6.2.1, |A|≤|B| or |B|≤|A|. In the first case, since A≠∅, Proposition 3.4.2 gives a surjection B→A. In the second, since B≠∅, the same proposition with the roles exchanged gives a surjection A→B.

Marking scheme. (10 points) - 3: comparability cited, with the two cases. - 4: in the first case, a surjection B→A from Proposition 3.4.2, with A≠∅ used and the direction correct. - 3: the second case, with the roles exchanged and B≠∅ used.

Exercise (R2: Maximal chains give Zorn’s lemma)
  • (a) Let C be a maximal chain of a partially ordered set (X,⪯): a chain contained properly in no chain. Let u be an upper bound of C in X. Show that u∈C, that u is the greatest element of C, and that u is a maximal element of X.
  • (b) Deduce Theorem 6.1.2 from the statement that every chain lies in a maximal chain.

Solution.

  • (a) Every element of C is below u, so C∪{u} is a chain containing C; by maximality it is not larger, so u∈C. Then u∈C is above every element of C: it is the greatest element of C. Suppose u≺x for some x∈X. For every c∈C, c⪯u⪯x, so C∪{x} is a chain, and maximality gives x∈C. Then x⪯u, and with u⪯x, (PO2) gives x=u, contradicting u≺x. So u is maximal in X.

  • (b) Let P be a non-empty partially ordered set in which every non-empty chain has an upper bound. The empty set is a chain, so by Section 6.1, Exercise B1 (Exercise (B1: Maximal chains)) with C0=∅, P has a maximal chain C. It is not empty: for p∈P, {p} is a chain properly containing ∅. So C has an upper bound u, and u is a maximal element of P by (a). Since Exercise B1 was proved from Zorn’s lemma, the two statements are equivalent.

Marking scheme. (10 points) - 1: u∈C in (a). - 1: u is the greatest element of C. - 3: u is maximal in X, using (PO2). - 2: a maximal chain C from Exercise B1 with C0=∅. - 1: C≠∅. - 2: an upper bound of C, and the conclusion.

Exercise (R3: The basis theorem, read as a template)

This item is optional and goes with the optional subsection. A set of vectors is linearly independent when no finite non-trivial combination of its vectors is 0.

  • (a) Which of the template’s four steps uses that independence is tested on finitely many vectors at a time?
  • (b) Why would the template fail for the property “S is a finite independent set”?
  • (c) A maximal element of a partial order need not be greatest. What does this say about bases?

Solution.

  • (a) Step (2), the chains: a dependence among vectors of the union of a chain involves finitely many vectors, all in one member (Lemma 6.1.1 (b)), and that member is independent.

  • (b) The union of a chain of finite sets need not be finite (the second warning of Section 6.1), so step (2) fails: the union need not be a partial object.

  • (c) This is the point of Example (Maximal elements that are not greatest). Maximal independent sets need not contain one another, so a vector space can have many bases, none of them greatest. In R2, {(1,0),(1,1)} and {(2,0),(0,3)} are both bases, and neither contains the other.