In Real Analysis book by Folland G., the following proposition is given:
0.7 Proposition. For any sets $X$ and $Y$, either $\mathrm{card}(X)\leq\mathrm{card}(Y)$ or $\mathrm{card}(Y)\leq\mathrm{card}(X)$.
Proof. Consider the set $\mathcal{J}$ of all injections from subsets of $X$ to $Y$. The members of $\mathcal{J}$ can be regarded as subsets of $X\times Y$, so $\mathcal{J}$ is partially ordered by inclusion. It is easily verified that Zorn's lemma applies, so $\mathcal{J}$ has a maximal element $f$, with (say) domain $A$ and range $B$. If $x_0\in X\setminus A$ and $y_0\in Y\setminus B$, then $f$ can be extended to an injection from $A\cup\{x_0\}$ to $Y\cup\{y_0\}$ by setting $f(x_0)=y_0$, contradicting maximality. Hence either $A=X$, in which case $\mathrm{card}(X)\leq\mathrm{card}(Y)$, or $B=Y$, in which case $f^{-1}$ is an injection from $Y$ to $X$ and $\mathrm{card}(Y)\leq\mathrm{card}(X)$. $\qquad\square$
I know that Zorn's lemma is as follows:
Zorn's lemma: Suppose a partially ordered set P has the property that every chain in P has an upper bound in P. Then the set P contains at least one maximal element.
However, I am having difficulty in seeing how that quickly one can see that Zorn's lemma applies there as the textbook mentions. How can I show that any chain of $X\times Y$ has an upper bound? Could I say $X \times Y$ is itself the upper bound?
More explanation on the above proof would be greatly appreciated.
It is very common with Zorn's lemma arguments in which sets of some kind are ordered by inclusion for the upper bound of a chain to be its union. In this case, if $(f_i : A_i \to B_i)_{i \in I}$ is a chain of injections where each $A_i \subseteq X$ and each $B_i \subseteq Y$, then $\bigcup_{i \in I} f_i$ is an injection of $\bigcup_{i \in I} A_i \subseteq X$ into $\bigcup_{i \in I} B_i \subseteq Y$.