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

\begin{proof}
  Let $\ol{a} = (a_1, \ldots, a_n)$.

  Step 1: Terms. Proof by induction on term
  complexity. For the base case:
  \begin{itemize}
    \item For $t$ a constant, we have $h(t^M) =
      h(c^M) = c^N = t^N$.
    \item For $t$ a variable: $h(t^M(x_i)) =
      h(a_i) = t^N(h(a_i))$.
  \end{itemize}
  For the inductive step: Let $f$ be an $m$-ary
  function symbol. Assume that the claim holds for
  $t_1, \ldots, t_m$ whose free variables are
  amongst $x_1, \ldots, x_n$.

  Suppose $t = f(t_1, \ldots, t_m)$. Given $a_1,
  \ldots, a_n \in M$, we have
  \begin{align*}
    h(t^M(a_1, \ldots, a_n))
    &= h(f^M(t_1^M(a_1, \ldots, a_n), \ldots,
    t_m^M(a_1, \ldots, a_n))) \\
    &= f^N(h(t_1^M(\ol{a})), \ldots, h(t_m^M(\ol{a})))
    &&\text{($f^N$ is an $\mathcal{L}$-\gls{iso})}
    \\
    &= f^N(t_1^N(h_1(\ol{a})), \ldots,
    t_m^N(h(\ol{a})))
    &&\text{(inductive step)} \\
    &= t^N(h(\ol{a}))
  \end{align*}

  Step 2: Formulas. Base case: atomic formulas.
  Suppose $\varphi$ is $t_1 = t_2$. Then:
  \begin{align*}
    \mathcal{M} \models \varphi(\ol{a})
    &\text{ iff }
    t_1^M(\ol{a}) = t_2^M(\ol{a}) \\
    &\text{ iff }
    h(t_1^M(\ol{a})) = h(t_2^M(\ol{a}))
    &&\text{by bijectivity} \\
    &\text{ iff }
    t_1^N(h(\ol{a})) = t_2^N(h(\ol{a}))
    &&\text{using step 1} \\
    &\text{ iff }
    \mathcal{N} \models \varphi(\ol{a})
  \end{align*}
  Case where $\varphi$ is $R(t_1, \ldots, t_m)$
  left as an exercise.

  Inductive step: Assume statement holds for
  $\varphi$ and $\psi$.
  \begin{itemize}
    \item $\varphi \wedge \psi$, $\neg \varphi$
      left as an exercise.
    \item $\forall x_n \varphi(x_1, \ldots, x_{n -
      1}, x_n)$ (then $\exists$ will follow since
      it can be expressed using $\forall$).

      Let $a_1, \ldots, a_{n - 1} \in M$. Then
      \begin{align*}
        \mathcal{M} \models \forall x_n \varphi(a_1, \ldots,
        a_{n - 1}, x_n)
        &\text{ iff }
        \text{for all $b \in M$, $\mathcal{M} \models
        \varphi(a_1, \ldots, a_{n - 1}, b)$} \\
        &\text{ iff }
        \text{for all $b \in M$, $\mathcal{N} \models
        \varphi(h(a_1), \ldots, h(a_{n -
        1}), h(b))$} \\
        &\text{ iff }
        \text{for all $c \in N$, $\mathcal{N} \models
        \varphi(h(a_1), \ldots, h(a_{n - 1}), c)$}
        \\
        &\text{ iff }
        \mathcal{N} \models \forall x_n \varphi(h(a_1),
        \ldots, h(a_{n - 1}), x_n) \qedhere
      \end{align*}
  \end{itemize}
\end{proof}

\begin{notation*}
  \glssymboldefn{cong}%
  Write $\mathcal{N} \cong \mathcal{M}$ if there
  is an $\mathcal{L}$-\gls{iso} between them.
\end{notation*}

\begin{corollary}
  \label{coro:2.3}
  If $\mathcal{M} \mcong \mathcal{N}$, then
  $\mathcal{M} \ee \mathcal{N}$.
\end{corollary}

\begin{remark*}
  So far we have two equivalence relations on
  $\mathcal{L}$-structures: $\ee$ and $\mcong$.
\end{remark*}

\begin{fccoro}[]
  \label{coro:2.4}
  \begin{iffc}
    \lhs
    $h : \mathcal{M} \to \mathcal{N}$ is an $\mathcal{L}$-\gls{em}
    \rhs
    the conclusion of \cref{thm:2.2} holds for all
    quantifier free formulas $\varphi(x_1, \ldots,
    x_n)$.
  \end{iffc}
\end{fccoro}

\begin{iffproof}
  \rightimpl
  Clear from proof of \cref{thm:2.2}.
  \leftimpl
  Exercise (see \es{1}).
\end{iffproof}

\begin{fcdefn}[Elementary embedding]
  \label{defn:2.5}
  \glsnoundefn{eemb}{elementary
  embedding}{elementary embeddings}%
  An $\mathcal{L}$-\gls{homo} $h : \mathcal{M} \to
  \mathcal{N}$ is an \emph{elementary
  $\mathcal{L}$-embedding} if for any
  $\mathcal{L}$-formula $\varphi(\ol{x})$ and any
  $\ol{a} \in M$ (with $|\ol{x}| = |\ol{a}|$) we
  have
  \[
    \mathcal{M} \models \varphi(\ol{a})
    \qquad\text{iff}\qquad
    \mathcal{N} \models \varphi(h(\ol{a}))
  .\]
\end{fcdefn}

\begin{note*}
  $\mathcal{L}$-\glspl{iso} 
  are \glsref[eemb]{elementary
  $\mathcal{L}$-embeddings}.
\end{note*}

\begin{fcdefn}[Substructure]
  \glsnoundefn{substruc}{substructure}{substructures}%
  \glsnoundefn{esubstruc}{elementary
  substructure}{elementary substructures}%
  \glsnoundefn{ext}{extension}{extensions}%
  \glsnoundefn{eext}{elementary
  extension}{elementary extensions}%
  Let $\mathcal{M}$ and $\mathcal{N}$ be
  $\mathcal{L}$-structures with $M \subseteq N$.
  Let $h : M \injto N$ be the inclusion map. Then
  we say that $\mathcal{M}$ is a
  \emph{substructure} (respectively
  \emph{elementary substructure}) of
  $\mathcal{N}$, written $\mathcal{M} \subseteq
  \mathcal{N}$ (respectively $\mathcal{M}
  \preccurlyeq \mathcal{N}$) if $h$ is an
  $\mathcal{L}$-\gls{em} (respectively
  \glsref[eemb]{elementary
  $\mathcal{L}$-embedding}).

  We may also say $\mathcal{N}$ is an extension
  (respectively elementary extension) of
  $\mathcal{M}$.
\end{fcdefn}

\begin{remark*}
  \phantom{}
  \begin{itemize}
    \item The notion of \gls{substruc} generalises
      subgroups, subrings, induced subgraphs.
    \item \glsref[esubstruc]{Elementary}
      \gls{substruc} is stronger (more particular
      to model theory).
    \item If $\mathcal{M} \esub \mathcal{N}$
      then $\mathcal{M} \ee
      \mathcal{N}$ and $M \subseteq N$.
  \end{itemize}
\end{remark*}

\begin{example}
  \label{eg:2.7}
  Let $\mathcal{M} = (2\Zbb, <)$ and $\mathcal{N}
  = (\Zbb, <)$. Then $\mathcal{M} \ee \mathcal{N}$
  and $M \subseteq N$ but $\mathcal{M} \not \esub
  \mathcal{N}$.

  Why? Consider $0, 2 \in M$, $\varphi(x_1, x_2) =
  \exists y (x_1 < y < x_2)$. Then $\mathcal{M}
  \not\models \varphi(0, 2)$, but $\mathcal{N}
  \models \varphi(0, 2)$.
\end{example}

\begin{fcthm}[Tarski-Vaught Test]
  \label{thm:2.8}
  \label{tarskivaught}
  Assuming:
  - $h : \mathcal{M} \to \mathcal{N}$ is an
  $\mathcal{L}$-\gls{em}
  Then:
  the following are equivalent:
  \begin{enumerate}[(i)]
    \item $h$ is an \elemb
    \item For every first order formula
      $\varphi(y, x_1, \ldots, x_n)$ and every
      $a_1, \ldots, a_n \in \mathcal{M}$, if
      there exists $y \in \mathcal{N}$ such that
      $\mathcal{N} \models \varphi(y, h(a_1),
      \ldots, h(a_n))$ then there exists $y \in
      \mathcal{M}$ such that $\mathcal{N} \models
      \varphi(h(y), h(a_1), \ldots, h(a_n))$.
  \end{enumerate}
\end{fcthm}

\begin{proof}
  \es{1}.
\end{proof}
