%! TEX root = LST.tex
% vim: tw=50
% 08/02/2024 09AM

\begin{warning*}
  Recall that when studying
  \glsref[linord]{linearly ordered} sets, we noted
  that
  \[ \text{$f$ is \gls{op} and injective} \iff
  \forall x, y \in A, x \llt y \implies f(x) \llt
  f(y) .\]
  The $\Rightarrow$ direction is true for
  \glspl{poset}, but the $\Leftarrow$ direction is
  not true in general for a \gls{poset}.
\end{warning*}

\subsubsection*{Applications of Zorn's Lemma}

\begin{flashcard}[every-vspace-has-basis-thm]
\begin{theorem}
  Every vector space $V$ (over some field) has a
  basis.
\end{theorem}

\begin{proof}
  \cloze{We seek a maximal linearly independent set $B
  \subset V$. Then we're done: if $V \neq \langle
  B \rangle$, then for any $x \in V \setminus
  \langle B \rangle$, $B \cup \{x\}$ is also
  linearly independent, which would contradict
  maximality of $B$.

  Let $X = \{A \subset v \st A \text{ is linearly
  independent}\}$ ordered by inclusion. Let $\{A_i
  \st i \in I\}$ be a \gls{chain} in $X$. Then
  this has upper bound $A = \bigcup_{i \in I}
  A_i$. We first need to check that $A$ is
  linearly independent. Assume $\sum_{j = 1}^n
  \lambda_j x_j = 0$ is a linear relation on $A$
  (where $x_1, \ldots, x_n \in A$, and $\lambda_1,
  \ldots, \lambda_n$ are scalars). For each $1 \le
  j \le n$, pick $i_j \in I$ such that $x_j \in
  A_{i_j}$. Since the $A_i$ form a chain, there
  exists $1 \le m \le n$ such that $A_{i_j}
  \subset A_{i_m}$ for all $1 \le j \le n$. Then
  $\sum_{j = 1}^n \lambda_j x_j = 0$ is a linear
  relation on the linearly independent set
  $A_{i_m}$, so $\lambda_1 = \cdots = \lambda_n =
  0$. Thus $A$ is linearly independent.}
\end{proof}
\end{flashcard}

\begin{remark*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item A very similar proof shows that if $B_0
      \subset V$ is linearly independent, then $V$
      has a basis $B$ such that $B \supset B_0$.
    \item $\RR$ is a vector space over $\QQ$, so
      has a basis (Hamel basis). This can be used
      to show the existence of
      non-Lebesgue-measurable sets (see
      \courseref[Probability \& Measure]{PM}).
    \item $\RR^{\NN}$ the real vector space of
      real sequences has no countable basis, but
      we now know it has a basis.
    \item In topology: Tychonoff's Theorem. In
      Functional Analysis: Hahn-Banach Theorem. In
      algebra: maximal ideals in rings with $1$.
  \end{enumerate}
\end{remark*}

\vspace{-1em}
The next application of \nameref{ZL} completes the
proof of \nameref{model_existence_lemma}:

\begin{flashcard}[ZL-model-existence-lemma]
\begin{theorem}
  Let $P$ be any set of \gls{primp}, $S \subset
  \propL = \propL(\propP)$ be \gls{cons}. Then
  there exists a \gls{cons} set $\ol{S} \subset
  \propL$ such that $S \subset \ol{S}$ and
  $\forall t \in \propL$ either $t \in \ol{S}$ or
  $\pnot t \in \ol{S}$.
\end{theorem}

\begin{proof}
  \cloze{We seek a maximal consistent set $\ol{S} \supset
  S$. Then we're done as follows: given $t \in L$,
  one of $S \cup \{t\}$ and $S \cup \{\pnot t\}$
  is consistent, otherwise $S \cup \{t\}
  \synentails \false$, $\ol{S} \cup \{\pnot t\}
  \synentails \false$, and so by the
  \nameref{ded_thm}, $\ol{S} \synentails \pnot
  t$, $\ol{S} \synentails \pnot \pnot t$ and hence
  $\ol{S} \synentails \false$ by \gls{MP},
  contradiction. Hence by maximality of $\ol{S}$,
  either $t \in \ol{S}$ or $\pnot t \in \ol{S}$.

  Let $X = \{T \subset \propL \st S \subset T,
  \text{$T$ is \gls{cons}}\}$,
  \glsref[partord]{partially ordered} by $\subset$.
  $X \neq \emptyset$ since $S \in X$. Let $C =
  \{T_i \st i \in I\}$ be a non-empty \gls{chain}
  in $X$. Let $T = \bigcup_{i \in I} T_i$. Then $S
  \subset T$ ($I \neq \emptyset$). If $T
  \synentails \false$ then as proofs are finite,
  there exists finite $J \subset I$ such that
  $\bigcup_{j \in J} T_j \synentails \false$.
  Since $C$ is a chain, there exists $j_0 \in J$
  such that $\bigcup_{j \in J} T_j = T_{j_0}$, so
  $T_{j_0} \synentails \false$, contradiction. By
  \nameref{ZL}, $X$ has a \gls{pomaxel}.}
\end{proof}
\end{flashcard}

\begin{flashcard}[well-ordering-principle]
\begin{theorem}[Well-ordering principle]
  \label{WO}
  Every set can be well-ordered.
\end{theorem}

\fcscrap{
\begin{example*}
  $\RR$ can be \glsref[wellord]{well-ordered}.
  Think about this for a bit. This feels very
  unnatural!
\end{example*}
}

\begin{proof}
  \cloze{Let $A$ be a set. Let
  \[ X = \{(B, R) \in \PP A \times \PP(A \times A)
  \st \text{$R$ is a \gls{wellord} of $B$}\} \]
  \glsref[partord]{partially ordered} by
  extension: $(B_1, R_1) \ple (B_2, R_2)$ if and
  only if $B_1 \subset B_2$, $R_1 = R_2 \cap (B_1
  \times B_1)$ ($R_1$ is the restriction of $R_2$
  to $B_1$) and $B_1$ is an \gls{is} of $B_2$.
  Note $X \neq \emptyset$, since $(\emptyset,
  \emptyset) \in X$.

  Let $C = \{(B_i, R_i) \st i \in I\}$ be a
  \gls{chain} in $X$, i.e. a nested set of
  \glsref[wellord]{well-ordered} sets. Then
  \[ \left( \bigcup_{i \in I}, \bigcup_{i \in I}
  R_i \right) \]
  is an upper bound as in \cref{sec2}.

  By \nameref{ZL}, $X$ has a maximal element $(B,
  R)$. We need $B = A$. If not, pick $x \in A
  \setminus B$, then
  \[ (B, R)^+ = (B \cup \{x\}, R \cup \{(b, x) \st
  b \in B\}) \in X \]
  and $(B, R) \plt (B, R)^+$, contradiction.}
\end{proof}
\end{flashcard}

\begin{remark*}
  Often in applications of \nameref{ZL}, the
  maximal object whose existence it asserts cannot
  be described explicitly (``magical'').
\end{remark*}

\subsubsection*{The Axiom of Choice (AC)}

In the proof of \nameref{ZL} we used two
functions:
\begin{align*}
  X
  &\to X \\
  x
  &\mapsto x' \in \{y \st y \pgt x\} \\
  u : \{C \subset X \st \text{$C$ is a
  \gls{chain}}\}
  &\to X \\
  u(C)
  &\in \{x \in X \st \text{$x$ is an \gls{ub} for
  $C$}\}
\end{align*}
These are known as choice functions.

Axiom of Choice says:

\begin{flashcard}[ax-of-choice]
\prompt{Axiom of Choice? \\}
\glsnoundefn{aoc}{axiom of choice}{N/A}
\cloze{For any set $\{A_i \st i \in I\}$ of non-empty
sets, there exists a function $f : I \to
\bigcup_{i \in I} A_i$ such that $f(i) \in A_i$
for all $i \in I$. We call this a \emph{choice
function}.}
\end{flashcard}

This is different in character from other rules
for building sets ($\cup$, $\PP$ etc) in the sense
that choice functions need not be unique. For this
reason, we're often interested in proving things
without \gls{aoc}.

\begin{note*}
  When $I$ is finite, we can prove existence of
  choice functions by induction on $|I|$.
\end{note*}

\begin{flashcard}[AC-iff-ZL-iff-WO]
\begin{theorem}
  The following are equivalent:
  \begin{enumerate}[(i)]
    \item \glsref[aoc]{Axiom of choice}.
    \item \nameref{ZL}.
    \item \nameref{WO}.
  \end{enumerate}
\end{theorem}

\begin{proof}
  \cloze{\phantom{}
  \begin{enumerate}[WO $\Rightarrow$ AC]
    \item[AC $\Rightarrow$ ZL] See proof of \cref{ZL}.
    \item[ZL $\Rightarrow$ WO] See proof of \cref{WO}.
    \item[WO $\Rightarrow$ AC] Let $\{A_i \st i
      \in I\}$ be a set of non-empty sets. Let $A
      = \bigcup_{i \in I} A_i$.
      \glsref[wellord]{Well order} $A$ and define
      $f : I \to A$ by setting $f(i)$ to be the
      least element of $A_i$. \qedhere
  \end{enumerate}}
\end{proof}
\end{flashcard}

\textbf{Exercise:} Prove the implications
directly.
