%! TEX root = LC.tex
% vim: tw=50
% 21/10/2024 11AM

  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/cc5b10e306354e29.png}
  \end{center}
  If $\Gamma \trel M : \sigma$ and $M$ is already
  in \gls{bnf}, then claim is trivially true. If
  $M$ is not in \gls{bnf}, let $\Delta$ be the
  rightmost \gls{redex} of maximal \gls{height} $h$.

  By reducing $\Delta$, we may introduce copies of
  existing \glspl{redex}, or create new ones.
  Creation of new \glspl{redex} of $\Delta$ has to
  happen in one of the following ways:
  \begin{enumerate}[(1)]
    \item If $\Delta$ is of the form $(\lambda x :
      (\rho \to \mu) \ldots xP^\rho \ldots)
      (\lambda y : \rho . Q^\mu)^{P \to \mu}$,
      then it \gls{red} to $\ldots(\lambda y :
      \rho . Q^\mu)^{\rho \to \mu} P^\mu \ldots$,
      in which case there is a new \gls{redex} of
      \gls{height} $\height(\rho \to \mu) < h$.
    \item We have $\Delta = (\lambda x : \tau .
      (\lambda y : \rho . R^\mu)) P^\tau$ occurring
      in $M$ in the scenario $\Delta^{\rho \to
      \mu} Q^\rho$. Say $\Delta$ \gls{red} to
      $\lambda y : \rho . R_1^\mu$. Then we create
      a new \gls{redex} of \gls{height} $\height(\rho
      \to \mu) < h(\tau \to (\rho \to \mu)) = h$.
    \item The last possibility is that $\Delta =
      (\lambda x : (\rho \to \mu) . x)(\lambda y :
      \rho . P^\mu)$, and that it occurs in $M$ as
      $\Delta^{\rho \to \mu} Q^\rho$. Reduction
      then gives the \gls{redex} $(\lambda y :
      \rho . P^\mu)^{\rho \to \mu} Q^\rho$ of
      \gls{height} $\height(\rho \to \mu) < h$.
  \end{enumerate}
  Now $\Delta$ itself is gone (lowering the count
  by $1$), and we just showed that any newly
  created \glspl{redex} have \gls{height} $< h$.

  If we have $\Delta = (\lambda x : \tau . P^\rho)
  Q^\tau$ and $P$ contains multiple free
  occurrences of $x$, then all the \glspl{redex}
  in $Q$ are multiplied when performing
  \gls{breduc}.

  However, our choice of $\Delta$ ensures that the
  \gls{height} of any such \gls{redex} in $Q$ has
  \gls{height} $< h$, as they occur to the right
  of $\Delta$ in $M$. It is this always the case
  that $m(M') < m(M)$ (in the lexicographic
  order), so by the induction hypothesis, $M'$ can
  be reduced to \gls{bnf} (and thus so can $M$).
\end{proof}

\begin{fcthm}[Strong Normalisation for lambda(->)]
  % Theorem 1.2.15
  Assuming:
  - $\Gamma \trel M : \sigma$
  Then:
  there is no infinite reduction sequence $M \tob
  M_1 \tob \cdots$.
\end{fcthm}

\begin{proof}
  See Example Sheet 1.
\end{proof}

\subsection{The Curry-Howard Correspondence}

\textbf{Propositions-as-types:} idea is to think
of $\varphi$ as the ``type of its proofs''.

The properties of the ST$\lambda$C match the rules
of \gls{ipc} rather precisely.

First we will show a correspondence between
$\lto$ and the implication fragment \gls{ipc}$(\to)$
of \gls{ipc} that includes only the $\to$ connective,
the axiom scheme, and the $(\to-I)$ and $(\to-E)$
rules. We will later extend this to the whole of
\gls{ipc} by introducing more complex types to $\lto$.

Start with \gls{ipc}$(\to)$ and build a
ST$\lambda$C out of it whose set of type variables
$U$ is precisely the set of primitive propositions
of the logic.

Clearly, the set $\stypes$ of types then matches
the set of propositions in the logic.
