structural:reformatting, quality:correction
Zorn's lemma implies the axiom of choice

A proof that Zorn's lemma implies the axiom of choice illustrates a typical application of Zorn's lemma. (The structure of the proof is exactly the same as the one for the Hahn–Banach theorem.)

Given a set X {\displaystyle X} of nonempty sets and its union U:= ⋃ X {\displaystyle U:=\bigcup X} (which exists by the axiom of union), we want to show there is a function

such that f (S) ∈ S {\displaystyle f(S)\in S} for each S ∈ X {\displaystyle S\in X}. For that end, consider the set

It is partially ordered by extension; i.e., f ≤ g {\displaystyle f\leq g} if and only if f {\displaystyle f} is the restriction of g {\displaystyle g}. If f i: X i → U {\displaystyle f_{i}:X_{i}\to U} is a chain in P {\displaystyle P}, then we can define the function f {\displaystyle f} on the union X ′ = ∪ i X i {\displaystyle X'=\cup _{i}X_{i}} by setting f (x) = f i (x) {\displaystyle f(x)=f_{i}(x)} when x ∈ X i {\displaystyle x\in X_{i}}. This is well-defined since if i < j {\displaystyle i<j}, then f i {\displaystyle f_{i}} is the restriction of f j {\displaystyle f_{j}}. The function f {\displaystyle f} is also an element of P {\displaystyle P} and is a common extension of all f i {\displaystyle f_{i}} 's. Thus, we have shown that each chain in P {\displaystyle P} has an upper bound in P {\displaystyle P}. Hence, by Zorn's lemma, there is a maximal element f {\displaystyle f} in P {\displaystyle P} that is defined on some X ′ ⊂ X {\displaystyle X'\subset X}. We want to show X ′ = X {\displaystyle X'=X}. Suppose otherwise; then there is a set S ∈ X − X ′ {\displaystyle S\in X-X'}. As S {\displaystyle S} is nonempty, it contains an element s {\displaystyle s}. We can then extend f {\displaystyle f} to a function g {\displaystyle g} by setting g | X ′ = f {\displaystyle g|_{X'}=f} and g (S) = s {\displaystyle g(S)=s}. (Note this step does not need the axiom of choice.) The function g {\displaystyle g} is in P {\displaystyle P} and f < g {\displaystyle f<g}, a contradiction to the maximality of f {\displaystyle f}. ◻ {\displaystyle \square }

Essentially the same proof also shows that Zorn's lemma implies the well-ordering theorem: take P {\displaystyle P} to be the set of all well-ordered subsets of a given set X {\displaystyle X} and then shows a maximal element of P {\displaystyle P} is X {\displaystyle X}.