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

\subsubsection*{** Non-examinable **}

\begin{definition*}[Chain-complete]
  A \gls{poset} $X$ is \emph{chain-complete} if $X
  \neq \emptyset$ and every \gls{chain} has a supremum.
\end{definition*}

\begin{example*}
  Every complete \gls{poset} is chain-complete.
  Finite non-empty \glspl{poset} are
  chain-complete. If $S$ is a \gls{poset}, then
  \[ X = \{C \subset C \st \text{$C$ is a chain}\} \]
  ordered by $\subset$ is chain-complete, but not
  complete in general.
\end{example*}

\begin{definition*}[Inflationary function]
  A function $f : X \to X$, $X$ a \gls{poset} is
  \emph{inflationary} if $x \ple f(x)$ for all $x
  \in X$.
\end{definition*}

\begin{theorem*}[Bourbak-Witt fixed point theorem]
  \label{BWfp}
  If $X$ is chain-complete and $f : X \to X$ is
  inflationary, then $f$ has a fixed point.
\end{theorem*}

\begin{proof}[Proof 1 (with \gls{aoc})]
  By \nameref{ZL}, $X$ has a \gls{pomaxel}. Then $x
  \ple f(x)$, so $x = f(x)$.
\end{proof}

\begin{proof}[Proof 2 (without \gls{aoc})]
  Fix $x _0 \in X$. Let $\gamma = \hartgamma(X)$.
  Define $g : \gamma \to X$ by recursion:
  \begin{itemize}
    \item $g(0) = x_0$
    \item $g(\alpha \opl 1) = f(g(\alpha))$
    \item $g(\lambda) = \sup\{g(\alpha)\st \alpha
      \olt \lambda \}$ ($\lambda \neq 0$
      \glsref[limord]{limit})
  \end{itemize}
  By \gls{induction} $\forall \alpha \olt \gamma$,
  $g(\alpha) \ple g(\alpha \opl 1)$

  Either there exists $\alpha \olt \gamma$ with
  $g(\alpha \opl 1) = g(\alpha)$. Then $g(\alpha)$
  is a \gls{fp} of $f$. Otherwise $g$ is
  injective, which would contradict \nameref{hartogs}.
\end{proof}

\begin{remark*}
  \glsref[aoc]{Axiom of Choice} and \nameref{BWfp}
  implies \nameref{ZL}. \nameref{BWfp} is
  sometimes called ``the choice-free part of the
  proof of \nameref{ZL}''.
\end{remark*}

\begin{proof}[Proof of Remark]
  Let $X$ be a \gls{poset} in which every
  \gls{chain} has an \gls{ub}.

  \textbf{Case 1:} $X$ is chain-complete. Assume
  $X$ has no \gls{pomaxel}. Fix a choice function
  $g ; (\PP X) \setminus \{\emptyset\} \to X$.
  Define
  \[ f : X \to X ,f(x) = g(\{y \in X \st x < y\})
  .\]
  Then $x \plt f(x) ~\forall x \in X$,
  contradicting \nameref{BWfp}.

  \textbf{Case 2:} General case. We first prove
  that $\mathcal{C} = \{C \subset X \st \text{$C$
  is a \gls{chain}}\}$ has a \gls{pomaxel}. (This
  is the Hausdorff Maximality Principle). Follows
  from Case 1, since $\mathcal{C}$ is
  chain-complete.

  Let $C$ be a maximal chain in $X$. Let $x$ be an
  \gls{ub} of $C$. If $x \plt y$ in $X$, then $C
  \cup \{y\}$ is a \gls{chain} which is
  $\supsetneq C$, contradicting maximality. So $x$
  is \gls{pomaxel}.
\end{proof}

Lattices, Boolean algebras -- not covered (for now)

\textbf{This is the end of the non-examinable
part.}

\newpage
\section{First-order Predicate Logic}
\label{sec4}

In \nameref{sec1} we had a set $\propP$ of
\glspl{primp} and then we combined them using
logical connectives $\impl, \false$ (and
shorthands $\pand, \por, \pnot, \true$) to form
the language $\propL = \propL(\propP)$ of all
(compound) \glspl{prop}. We attached no meaning to
\glspl{primp}.

\textbf{Aim:} To develop languages to describe a
wide range of mathematical theorems. We will
replace \glspl{primp} with mathematical
statements.

\begin{example*}
  In language of groups:
  \[ m(x, m(y, z)) = m(m(x, y), z), \qquad m(x,
  i(x)) = e .\]
  In language of \glspl{poset}:
  \[ x \le y .\]
\end{example*}

\vspace{-1em}
\glsnoundefn{arity}{arity}{arities}
This will need variables ($x, y, z, \ldots$),
operation symbols ($m, i, e$ with arities $2, 1,
0$ respectively) and predicates (for example $\le$
with arity $2$). Note that ``arity'' means the
number of elements that the function takes as
input.

We will then combine these to build formulae:

\begin{example*}
  In the language of groups:
  \[ (\forall x)(m(x, i(x)) = e) .\]
  In the language of \glspl{poset}:
  \[ (\forall x)(\forall y)(\forall z)((x \le y
  \wedge y \le z) \implies (x \le z)) .\]
\end{example*}

\vspace{-1em}
\glsref[vtion]{Valuations} will be replaced by a
structure, a set $A$ and ``truth-functions'' $p_A
: A^n \to \{0, 1\}$ for every formula $p$.

If we have a set $S$ of formulae, a model of $S$ is a
structure satisfying all $p \in S$. Then we will
define $S \models t$ in the same way as in
\cref{sec1}. $S \vdash t$ will be the same as in
\cref{sec1} but more complex.

\begin{flashcard}[first-order-language-defn]
\begin{definition*}[Language in first-order logic]
  \glsnoundefn{folang}{language}{languages}
  \glssymboldefn{pOmega}{$\Omega$}{$\Omega$}
  \glssymboldefn{pPi}{$\Pi$}{$\Pi$}
  \glssymboldefn{arity}{$\alpha$}{$\alpha$}
  \hspace{0.5em}
  \cloze{A \emph{language} in first-order logic is
  specified by two disjoint sets $\Omega$ (the
  \emph{set of operation symbols}) and $\Pi$ (the
  \emph{set of predicates}) together with an arity
  function $\alpha : \Omega \cup \Pi \to \NN_0 =
  \{0\} \cup \NN$.

  \glsnoundefn{var}{variable}{variables}
  The language $L = L(\Omega, \Pi, \alpha)$
  consists of the following:
  \begin{enumerate}[\bfseries Variables:]
    \item[\bfseries Variables:] Countably
      infinite sets disjoint from $\Omega$ and
      $\Pi$. We denote variables as $x_1, x_2,
      x_3, \ldots$ (or $x, y, z, \ldots$).
    \item[\bfseries Terms:]
      \glsnoundefn{term}{term}{terms}
      Defined inductively:
      \begin{enumerate}[(i)]
        \item Every variable is a term
        \item If $\omega \in \Omega$, $n =
          \alpha(\omega)$ and $t_1, \ldots, t_n$
          terms, then $\omega t_1 \ldots t_n$ is a
          term (could write $\omega(t_1, \ldots,
          t_n)$).
      \end{enumerate}
  \end{enumerate}
  }
\end{definition*}
\end{flashcard}

\begin{example*}
  The language of groups consists of $\pOmega =
  \{m, i, e\}$, $\pPi = \emptyset$, $\arity(m) =
  z$, $\arity(i) = 1$, $\arity(e) = 0$. Some
  terms:
  \[ m\ub{x}_{t_1}\ub{myz}_{t_2}, \qquad mmxyz,
  \qquad mxix, \qquad e .\]
\end{example*}

\begin{note*}
  Every operation symbol of \gls{arity}
  $0$ is a term, called a \emph{constant}.
\end{note*}

\begin{flashcard}[atomic-formulae-defn]
\begin{definition*}[Atomic formula]
  \glsnoundefn{atf}{atomic formula}{atomic
  formulae}
  \cloze{There are two types of \emph{atomic formula}:
  \begin{enumerate}[(i)]
    \item If $s, t$ are \glspl{term}, then $(s =
      t)$ is an atomic formula.
    \item If $\varphi \in \pPi$ with
      $\arity(\varphi) = n$ and $t_1, \ldots, t_n$
      are \glspl{term}, then $\varphi t_1 t_2
      \ldots t_n$ is an atomic formula.
  \end{enumerate}}
\end{definition*}
\end{flashcard}

\begin{example*}
  The language of \glspl{poset} consists of
  $\pOmega = \emptyset$, $\pPi = \{\le\}$,
  $\arity(\le) = 2$. Some \glspl{atf}:
  \[ x = y, \qquad x \le y ~~(\text{officially
  $\le xy$}) \]
\end{example*}

\begin{flashcard}[formulae-defn]
\begin{definition*}[Formula]
  \glsnoundefn{form}{formula}{formulae}
  \cloze{We define \emph{formulae} inductively:
  \begin{enumerate}[(i)]
    \item \glspl{atf} are formulae.
      \glssymboldefn{pperp}{$\perp$}{$\perp$}
    \item $\perp$ is a formula.
      \glssymboldefn{pimpl}{$\Rightarrow$}{$\Rightarrow$}
    \item If $p, q$ are formulae, then so is $(p
      \Rightarrow q)$.
      \glssymboldefn{pforall}{$\forall$}{$\forall$}
    \item If $p$ is a formula and the
      \gls{var} $x$
      has a \emph{free occurrence} in $p$, then
      $(\forall x) p$ is a formula.
  \end{enumerate}
  }
\end{definition*}
\end{flashcard}

\begin{note*}
  A \gls{form} is a finite string of symbols from the
  set of \glspl{var}, $\pOmega$, $\pPi$ and
  $\{(, ), \pimpl, \pperp, =, \pforall\}$.
\end{note*}
