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

\begin{fclemma}[]
  \label{lemma:1.4.11}
  % Lemma 1.4.11
  The \gls{ltalg} of any theory relative to
  \gls{ipc} is a \gls{ha}.
\end{fclemma}

\begin{proof}
  We already saw that $\F^{\text{\gls{ipc}}}(T)$ is a
  \gls{dist} \gls{latt}, so it remains to show
  that $[\varphi] \himplies [\psi] \defeq [\varphi
  \to \psi]$ gives a Heyting implication, and that
  $\F^{\text{\gls{ipc}}}(T)$ is \gls{bdd}.

  Suppose that $[\varphi
  \pand [\psi] \le [\chi]$, i.e. $\tau, \varphi
  \pand \psi \syn_{\text{\gls{ipc}}} \chi$. We
  want to show that $[\varphi] \le [\psi \to
  \chi]$, i.e. $\tau, \varphi \syn (\psi \to
  \chi)$. But that is clear:
  \begin{logicproof}
    \varphi \qquad \ass{\psi}
    \\
    \varphi \pand \psi
    \\(hyp)
    \chi
    \\($\to$-I, $\psi$)
    \psi \to \chi
  \end{logicproof}
  Conversely, if $\tau, \varphi \syn (\psi \to
  \chi)$, then we can prove $\tau, \varphi \pand
  \psi \syn \chi$:
  \begin{logicproof}
    \varphi \pand \psi
    \\($\pand$-E)
    \varphi \qquad \psi
    \\(hyp)
    \psi \to \chi \qquad \psi
    \\($\to$-E)
    \chi
  \end{logicproof}
  So defining $[\varphi] \himplies [\psi] \defeq
  [\varphi \to \psi]$ provides a Heyting
  $\himplies$.

  The bottom element of $\F^{\text{\gls{ipc}}}(T)$
  is just $[\bot]$: if $[\varphi]$ is any element,
  then $T, \bot \syn_{\text{\gls{ipc}}} \varphi$
  by $\false$-E.

  The top element is $\top \defeq [\bot \to \bot$:
  if $\varphi$ is any proposition, then $[\varphi]
  \le [\bot \to \bot]$ via
  \begin{logicproof}
    \varphi \qquad \ass{\bot}
    \\($\bot$-E)
    \bot
    \\
    \bot \to \bot
  \end{logicproof}
  \vspace{-3em} \qedhere
\end{proof}

\begin{fcthm}[Completeness of the Heyting
  semantics]
  \label{thm:1.4.12}
  % Theorem 1.4.12
  \begin{iffc}
    \lhs
    A proposition is provable in \gls{ipc}
    \rhs
    it is \gls{hvalid} for every \gls{ha}
    $H$.
  \end{iffc}
\end{fcthm}

\begin{proof}
  One direction is easy: if
  $\syn_{\text{\gls{ipc}}} \varphi$, then there is
  a derivation in \gls{ipc}, thus $\top \le
  v(\varphi)$ for any \gls{ha} $H$ and \gls{valt}
  $v$, by \nameref{hssoundness}. But then
  $v(\varphi) = \top$ and $\varphi$ is
  \gls{hvalid}.

  For the other direction, consider the
  \gls{ltalg} $\F(L)$ of the empty theory relative
  to \gls{ipc}, which is a \gls{ha} by
  \cref{lemma:1.4.11}. We can define a \gls{valt}
  $v$ by extending $P \to \F(L)$, $p
  \mapsto [p]$ to all propositions.

  As $v$ is a \gls{valt}, it follows by induction
  (and the construction of $\F(L)$) that
  $v(\varphi) = [\varphi]$ for all propositions.

  Now $\varphi$ is valid in every \gls{ha}, and so
  is valid in $\F(L)$ in particular. So
  $v(\varphi) = \top = [\varphi]$, hence $\top
  \to \top \syn_{\text{\gls{ipc}}} \varphi$, hence
  $\syn_{\text{\gls{ipc}}} \varphi$.
\end{proof}

\glsnoundefn{pups}{principal up-set}{principal
up-sets}%
\glssymboldefn{pups}%
Given a poset $S$, we can construct sets
$a\uparrow \defeq \{s \in S : a \le s\}$ called
\emph{principal up-sets}.

\glsnoundefn{tseg}{terminal segment}{terminal
segments}%
Recall that $U \subseteq S$ is a \emph{terminal
segment} if $a\uparrow \subseteq U$ for each $a
\in U$.

\begin{fcprop}
  \glssymboldefn{tsegs}%
  % Proposition 1.4.13
  If $S$ is a poset, then the set $T(S) = \{U
  \subseteq S : \text{$U$ is a terminal segment of
  $S$}\}$ can be made into a \gls{ha}.
\end{fcprop}

\begin{proof}
  Order the \glspl{tseg} by $\subseteq$. Meets and
  joins are $\cap$ and $\cup$, so we just need to
  define $\himplies$. If $U, V \in \tsegs(S)$, define
  $(U \himplies V) \defeq \{s \in S : (s\pups)
  \cap U \subseteq V\}$.

  If $U, V, W \in \tsegs(S)$, we have
  \[
    W \subseteq (U \himplies V)
    \qquad \iff \qquad
    (w \pups)
    \cap U \subseteq V \forall w \in W
  ,\]
  which happens if for every $w \in W$ and $u \in
  U$ we have $w \le u \implies u \in V$. But $W$ is
  a \gls{tseg}, so this is the same as saying that
  $W \cap U \subseteq V$.
\end{proof}

\begin{fcdefn}[Kripke model]
  \glsnoundefn{km}{Kripke model}{Kripke models}%
  \glsnoundefn{world}{world}{worlds}%
  \glsnoundefn{state}{state}{states}%
  \glsnoundefn{forcing}{forcing}{NA}%
  \glsnoundefn{force}{force}{forces}%
  \glsadjdefn{pers}{persistence}{relation}%
  \glssymboldefn{forcing}%
  % Definition 1.4.14
  Let $P$ be a set of primitive propositions. A
  \emph{Kripke model} is a tuple $(S, \le,
  \Vdash)$ where $(S, \le)$ is a poset (whose
  elements are called ``worlds'' or ``states'',
  and whose ordering is called the ``accessibility
  relation'') and $\Vdash \subseteq S \times P$ is
  a binary relation (``forcing'') satisfying the
  persistence property: if $p \in P$ is such that
  $s \Vdash p$ and $s \le s'$, then $s' \Vdash p$.
\end{fcdefn}

Every \gls{valt} $v$ on $\tsegs(S)$ induces a
\gls{km} by setting $s \forces p$ is $s \in
v(p)$.
