We need to show that there is an injective function \(f : A \to B\) or an injective function \(g : B \to A\text{.}\) If \(A\) or \(B\) is empty these functions exist trivially, so we will assume that \(A\) and \(B\) are both non-empty.
A partial function from \(A\) to \(B\) is a function of the form \(f : J \to B\text{,}\) where \(J \subseteq A\text{.}\) We can think of a partial function from \(A\) to \(B\) as a subset \(F \subseteq A \times B\) such that for each \(a\in A\text{,}\) there is at most one pair in \(F\) of the form \((a, b)\text{.}\) Hence, we can apply the concepts of subset and union to partial functions from \(A\) to \(B\text{.}\)
Let \(P\) be the set of all injective partial functions from \(A\) to \(B\text{.}\) Observe that \(P \neq\es\text{,}\) because \(\es \in P\) . Let \(C\) be a chain in \(P\) . We claim that \(\bigcup _{F\in C} F\in P\) . Suppose that \((a, b)\text{,}\) \((a, c)\in \bigcup F\in C C\text{,}\) for some \(a\in A\) and \(b, c\in B\text{.}\) Then \((a, b)\in G\) and \((a, c)\in H\) for some partial functions \(G, H\in C\) . Because \(CC\) is a chain, we know that \(G \subseteq H\) or \(G ⊇ H\text{.}\) Without loss of generality assume that \(G \subseteq H\text{.}\) Then \((a, b)\) and \((a, c)\) are both in \(H\text{,}\) and because \(H\) is a partial function, then it must be the case that \(b = c\text{.}\) We conclude that \(\bigcup F\in C F\) is a partial function from \(A\) to \(B\text{.}\) Next, suppose that \((c, e), (d, e)\in \bigcup F\in C C\text{,}\) for some \(c, d\in A\) and \(e\in B\text{.}\) A similar argument shows that \((c, e) and (d, e)\) must both be in some \(K\in C\text{,}\) and because \(K\) is an injective partial function, then it must be the case that \(c = d\text{.}\) We conclude that \bigcup \(F\in C F\) is an injective partial function from \(A\) to \(B\text{,}\) and hence that \(\bigcup F\in C F\in P\) .
By Zorn's Lemma (Theorem 3.5.6) the family of sets \(P\) has a maximal element. Let \(M\in P\) be such a maximal element. Then \(M\) is an injective partial function from \(A\) to \(B\text{.}\) There are now three cases. First, suppose that for each \(a\in A\text{,}\) there is a pair of the form \((a, b) in M\text{.}\) Then \(M\) is an injective function \(A \to B\text{.}\) Second, suppose that for each \(d\in B\text{,}\) there is a pair of the form \((c, d)\in M\text{.}\) Then \(M\) is a bijective partial function from \(A to B\text{,}\) and using Exercise 4.4.13 (3) we see that the inverse function of \(M\) can be viewed as an injective function \(B \to A\text{.}\) Third, suppose that neither of the previous two cases holds. Then there is some \(x\in A\) such that there is no pair of the form \((x, b)\) in \(M\text{,}\) and there is some \(y\in B\) such that there is no pair of the form \((a, y)\in M\text{.}\) Let \(N = M \cup\{(x, y)\}\text{.}\) It is left to the reader to verify that \(N\) is an injective partial function from \(A\) to \(B\text{,}\) and hence that \(N\in P\) . Because \(M $ N\text{,}\) we have a contradiction to the fact that \(M\) is a maximal element of \(P\text{,}\) and so this third case cannot happen.