%! TEX root = MT.tex
% vim: tw=50
% 25/01/2025 11AM

% Part 1: Complete Theories

\newpage
\section{Complete Theories}

\begin{fcdefn}[$T$ models a sentence]
  % [$T \models \varphi$]
  \label{defn:1.1}
  % Definition 1.1
  Let $T$ be an $\mathcal{L}$-theory, $\varphi$ an
  $\mathcal{L}$-sentence. Then $T \models \varphi$
  if every model of $T$ is a model of $\varphi$.
\end{fcdefn}

\begin{example*}
  $\emptyset \models \exists (x = x)$.

  $T_{\text{groups}} \models \forall x \forall y
  \forall z ((x * y = e \wedge x * z = e) \to y =
  z)$.
\end{example*}

\begin{fcdefn}[Complete theory]
  \label{defn:1.3}
  \glsadjdefn{compt}{complete}{theory}%
  % Definition 1.3
  An $\mathcal{L}$-theory $T$ is \emph{complete}
  if for every $\mathcal{L}$-sentence $\varphi$,
  either $T \models \varphi$ or $T \models \neg
  \varphi$.
\end{fcdefn}

\begin{example}
  $T_{\text{groups}}$ is not complete, as (for
  example) it doesn't imply $\forall x \forall y(x
  + y = y + x)$ or $\neg \forall x \forall y(x + y
  = y + x)$.
\end{example}

\begin{fcdefn}[Theory of $M$]
  % [Theory of $\mathcal{M}$]
  \label{defn:1.4}
  \glsnoundefn{mtheory}{theory}{theories}%
  \glssymboldefn{Th}%
  Let $\mathcal{M}$ be an $\mathcal{L}$-structure. Then the
  \emph{theory of $\mathcal{M}$}
  \[
    \mathrm{Th}_{\mathcal{L}}(\mathcal{M}) = \{\varphi :
    \text{$\varphi$ is an $\mathcal{L}$-sentence,
    and $\mathcal{M} \models \varphi$}\}
  .\]
  (can be written $\mathrm{Th}(\mathcal{M})$ when
  $\mathcal{L}$ is clear).
\end{fcdefn}

\begin{remark}
  \label{remark:1.5}
  $\Th_{\mathcal{L}}(\mathcal{M})$ is always \gls{compt}.
\end{remark}

\begin{fcdefn}[Elementarily equivalent]
  \label{defn:1.6}
  \glsadjdefn{ee}{elementarily
  equivalent}{models}%
  Two $\mathcal{L}$-structures are
  \emph{elementarily equivalent} if their
  \glspl{mtheory} are equal.

  Given $\mathcal{L}$-structures $\mathcal{M},
  \mathcal{N}$, we write
  $\mathcal{M} \equiv_{\mathcal{L}} \mathcal{N}$ to mean
  $\Th_{\mathcal{L}}(\mathcal{M}) =
  \Th_{\mathcal{L}}(\mathcal{N})$.
\end{fcdefn}

\begin{note*}
  This is an equivalence relation on
  $\mathcal{L}$-structures.
\end{note*}

\textbf{Exercise:} Let $T$ be an
$\mathcal{L}$-theory. Then the following are
equivalent:
\vspace{-1em}
\begin{itemize}
  \item $T$ is complete
  \item For any $\mathcal{L}$-sentence $\varphi$,
    if $T \not\models \varphi$ then $T \models
    \neg \varphi$.
  \item Any two models of $T$ are elementarily
    equivalent.
\end{itemize}

\begin{example}
  Let $\mathcal{L} = \emptyset$ and
  $T_{\text{sets}} = \{\varphi_n : n \ge 2\}$,
  where
  \[
    \varphi_n = \exists x_1 \cdots \exists x_n
    \bigwedge_{i \neq j} x_i \neq x_j
  .\]
  This forms the theory of infinite sets. Any
  infinite set models this, but also in this
  language we have that any two infinite sets are
  \gls{ee}. For example,
  \[
    \Nbb \ee_{\mathcal{L}} \Rbb \ee_{\mathcal{L}}
    \Qbb \ee_{\mathcal{L}} \Cbb \ee_{\mathcal{L}}
    \mathcal{P}(\Cbb)
  .\]
\end{example}

\textbf{Question:} How do we prove a theory is
\gls{compt}?

\begin{fcthm}[Los-Vaught test]
  \label{thm:1.8}
  \label{losvaught}
  % [L\'os-Vaught test]
  Assuming:
  - $T$ is an $L$-theory
  - $T$ has no finite models
  - There exists some $K \ge |\mathcal{L}| +
  \aleph_0$ such that any two models of $T$ of
  cardinality $\kappa$ are \gls{ee}
  Then:
  $T$ is \gls{compt}.
\end{fcthm}

\begin{proof}
  Assume $T$ is not \gls{compt}, i.e. there is
  some $\mathcal{L}$-sentence $\sigma$ such that
  $T \cup \{\sigma\}$ and $T \cup \{\neg \sigma\}$
  are both satisfiable.

  So we have $\mathcal{M} \models T \cup
  \{\sigma\}$, $\mathcal{N}
  \models T \cup \{\neg \sigma\}$.

  From (a) we know $M, N$ are infinite. By
  Lowenheim-Sk\"olem, we know we have $\mathcal{M}' \models
  T \cup \{\sigma\}$ and $\mathcal{N}' \models T \cup \{\neg
  \sigma\}$ with $|M'| = |N'| = \kappa$,
  contradicting (b).
\end{proof}

Reminder: By combining Lowenheim-Sk\"olem up and
down, we get the following statement:

If an $\mathcal{L}$-theory $T$ has an infinite
model, then it has a model of size $\kappa$ for
every $\kappa \ge |\mathcal{L}| + \aleph_0$.

\newpage
\section{Homomorphisms}

\begin{fcdefn}[Homomorphism]
  \glsnoundefn{homo}{homomorphism}{homomorphisms}%
  \glsnoundefn{em}{embedding}{embeddings}%
  \glsnoundefn{iso}{isomorphism}{isomorphisms}%
  \label{defn:2.1}
  Let $\mathcal{M}, \mathcal{N}$ be $\mathcal{L}$-structures. A
  function $h : M \to N$ is an
  $\mathcal{L}$-homomorphism if:
  \begin{enumerate}[(i)]
    \item For an $n$-ary function symbol $f$, and
      $a_1, \ldots, a_n \in M$ we have
      \[
        h(f^M(a_1, \ldots, a_n))
        = f^N(h(a_1), \ldots, h(a_n))
      .\]
    \item For an $n$-ary relation symbol $R$, and
      $a_1, \ldots, a_n \in M$ we have
      \[
        (a_1, \ldots, a_n) \in R^m \qquad
        \text{iff} \qquad (h(a_1), \ldots, h(a_n))
        \in R^N
      .\]
    \item For any constant symbol $c$, $h(c^M) =
      c^N$.
  \end{enumerate}
  We write $h : \mathcal{M} \to \mathcal{N}$ if $h$ is an
  $\mathcal{L}$-homomorphism.

  If $h$ is also injective then this is called an
  $\mathcal{L}$-embedding.

  If $h$ is also bijective then this is called an
  $\mathcal{L}$-isomorphism.
\end{fcdefn}

\begin{fcthm}[]
  \label{thm:2.2}
  Assuming:
  - $h : \mathcal{M} \to \mathcal{N}$ is an $\mathcal{L}$-\gls{iso}
  - $\varphi(x_1, \ldots, x_n)$ an
  $\mathcal{L}$-formula
  - $a_1, \ldots, a_n \in M$
  Then:
  \[
    \mathcal{M} \models \varphi(a_1, \ldots, a_n) \qquad
    \text{iff} \qquad N \models \varphi(h(a_1),
    \ldots, h(a_n))
  .\]
\end{fcthm}
