content/intuitionistic-logic/soundness-completeness/soundness-completeness.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness34\documentclass[../../../include/open-logic-chapter]{subfiles}56\begin{document}78\olchapter{int}{sc}{Soundness and Completeness}910\begin{editorial}11 This chapter collects soundness and completeness results for12 propositional intuitionistic logic. It needs an introduction. The13 completeness proof makes use of facts about provability that should14 be stated and proved explicitly somewhere.15\end{editorial}1617\olimport{soundness-axd}18\olimport{soundness-nd}19\olimport{lindenbaum}20\olimport{canonical-model}21\olimport{truth-lemma}22\olimport{completeness-thm}23\olimport{decidability}2425\OLEndChapterHook2627\end{document}
content/intuitionistic-logic/soundness-completeness/soundness-axd.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: soundness-axd45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{sax}1011\olsection{Soundness of Axiomatic \usetoken{P}{derivation}}1213\begin{editorial}14 The soundness proof relies on the fact that all axioms are15 intuitionistically valid; this still needs to be proved, e.g., in16 the Semantics chapter.17\end{editorial}1819\begin{thm}[Soundness]20 \ollabel{thm:soundness}21 If $\Gamma \Proves !A$, then $ \Gamma \Entails !A$.22\end{thm}2324\begin{proof}25 We prove that if $\Gamma \Proves !A$, then $\Gamma \Entails !A$.26 The proof is by induction on the number~$n$ of !!{formula}s in the27 !!{derivation} of~$!A$ from~$\Gamma$. We show that if $!A_1$,28 \dots, $!A_n = !A$ is !!a{derivation} from~$\Gamma$, then $\Gamma29 \Entails !A_n$. Note that if $!A_1$, \dots, $!A_n$ is30 !!a{derivation}, so is $!A_1$, \dots, $!A_k$ for any $k<n$.3132 There are no !!{derivation}s of length~$0$, so for $n=0$ the claim33 holds vacuously. So the claim holds for all !!{derivation}s of34 length~$<n$. We distinguish cases according to the justification35 of~$!A_n$.36 37 \begin{enumerate}38 \item $!A_n$ is an axiom. All axioms are valid, so $\Gamma \Entails39 !A_n$ for any~$\Gamma$.40 \item $!A_n \in \Gamma$. Then for any $\mModel{M}$ and $w$, if41 $\mSat{M}{\Gamma}[w]$, obviously $\mSat{M}{\Gamma}{!A_n}[w]$,42 i.e., $\Gamma \Entails !A$.43 \item $!A_n$ follows by \MP{} from $!A_i$ and $!A_j \ident !A_i \lif44 !A_n$. $!A_1$, \dots, $!A_i$ and $!A_1$, \dots, $!A_j$ are45 !!{derivation}s from~$\Gamma$, so by inductive hypothesis, $\Gamma46 \Entails !A_i$ and $\Gamma \Entails !A_i \lif !A_n$.47 48 Suppose $\mSat{M}{\Gamma}[w]$. Since $\mSat{M}{\Gamma}[w]$ and49 $\Gamma \Entails !A_i \lif !A_n$, $\mSat{M}{!A_i \lif50 !A_n}[w]$. By definition, this means that for all $w'$ such that51 $Rww'$, if $\mSat{M}{!A_i}[w']$ then $\mSat{M}{!A_n}[w']$. Since52 $R$ is reflexive, $w$ is among the $w'$ such that $Rww'$, i.e., we53 have that if $\mSat{M}{!A_i}[w]$ then $\mSat{M}{!A_n}[w]$. Since54 $\Gamma \Entails !A_i$, $\mSat{M}{!A_i}[w]$. So,55 $\mSat{M}{!A_n}[w]$, as we wanted to show.56 \end{enumerate}57\end{proof}5859\end{document}
content/intuitionistic-logic/soundness-completeness/soundness-nd.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: soundness-nd45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{snd}1011\olsection{Soundness of Natural Deduction}1213We will now prove soundness of natural deduction with regards to the14relational semantics, that is, showing that if !!a{formula} is !!{derivable}15from a set of assumptions then the set of assumptions entails the16!!{formula}.1718\begin{thm}[Soundness]19 \ollabel{thm:soundness}20 If $\Gamma \Proves !A$, then $ \Gamma \Entails !A$.21\end{thm}2223\begin{proof}24 We prove that if $\Gamma \Proves !A$, then $\Gamma \Entails !A$.25 The proof is by induction on the !!{derivation} of~$!A$26 from~$\Gamma$.27 28 \begin{enumerate}29 \item If the !!{derivation} consists of just the assumption~$!A$, we30 have $!A \Proves !A$, and want to show that $!A \Entails !A$.31 Suppose that $\mSat{M}{!A}[w]$. Then trivially $\mSat{M}{!A}[w]$.3233 \item The !!{derivation} ends in $\Intro{\land}$:34 \iftag{probAnd}{Exercise.}{The !!{derivation}s of the premises35 $!B$ from !!{undischarged} assumptions~$\Gamma$ and of~$!C$ from36 !!{undischarged} assumptions~$\Delta$ show that $\Gamma \Proves37 !B$ and $\Delta \Proves !C$. By induction hypothesis we have38 that $\Gamma \Entails !B$ and $\Delta \Entails !C$. We have to39 show that $\Gamma \cup \Delta \Entails !A \land !B$, since the40 !!{undischarged} assumptions of the entire !!{derivation} are41 $\Gamma$ together with $\Delta$. So suppose $\mSat{M}{\Gamma42 \cup \Delta}[w]$. Then also $\mSat{M}{\Gamma}[w]$. Since $\Gamma43 \Entails !B$, $\mSat{M}{!B}[w]$. Similarly, $\mSat{M}{!C}[w]$. So44 $\mSat{M}{!B \land !C}[w]$.}4546 \item The !!{derivation} ends in $\Elim{\land}$:47 \iftag{probAnd}{Exercise.}{The !!{derivation} of the premise $!B48 \land !C$ from !!{undischarged} assumptions $\Gamma$ shows49 that $\Gamma \Proves !B \land !C$. By induction hypothesis,50 $\Gamma \Entails !B \land !C$. We have to show that $\Gamma51 \Entails !B$. So suppose $\mSat{M}{\Gamma}[w]$. Since $\Gamma52 \Entails !B \land !C$, $\mSat{M}{!B \land !C}[w]$. Then also53 $\mSat{M}{!B}[w]$. Similarly if $\Elim\land$ ends in~$!C$, then54 $\Gamma \Entails !C$.}5556 \item The !!{derivation} ends in $\Intro{\lor}$:57 \iftag{probOr}{Exercise.}{Suppose the premise is $!B$, and the58 !!{undischarged} assumptions of the !!{derivation} ending59 in~$!B$ are $\Gamma$. Then we have $\Gamma \Proves !B$ and by60 inductive hypothesis, $\Gamma \Entails !B$. We have to show that61 $\Gamma \Entails !B \lor !C$. Suppose $\mSat{M}{\Gamma}[w]$. Since62 $\Gamma \Entails !B$, $\mSat{M}{!B}[w]$. But then also $\mSat{M}{!B63 \lor !C}[w]$. Similarly, if the premise is~$!C$, we have that64 $\Gamma \Entails !C$.}65 66 \item The !!{derivation} ends in~$\Elim{\lor}$:67 \iftag{probOr}{Exercise.}{The !!{derivation}s ending in the68 premises are of $!B \lor !C$ from !!{undischarged}69 assumptions~$\Gamma$, of $!D$ from !!{undischarged} assumptions70 $\Delta_1 \cup \{!B\}$, and of $!D$ from !!{undischarged}71 assumptions~$\Delta_2 \cup \{!C\}$. So we have $\Gamma \Proves72 !B \lor !C$, $\Delta_1 \cup \{!B\} \Proves !D$, and $\Delta_273 \cup \{!C\} \Proves !D$. By induction hypothesis, $\Gamma74 \Entails !B \lor !C$, $\Delta_1 \cup \{!B\} \Entails !D$, and75 $\Delta_2 \cup \{!C\} \Entails !D$. We have to prove that76 $\Gamma \cup \Delta_1 \cup \Delta_2 \Entails !D$.7778 Suppose $\mSat{M}{\Gamma \cup \Delta_1 \cup \Delta_2}[w]$. Then79 $\mSat{M}{\Gamma}[w]$ and since $\Gamma \Entails !B \lor !C$,80 $\mSat{M}{!B \lor !C}[w]$. By definition of $\mSat{M}{}$, either81 $\mSat{M}{!B}[w]$ or $\mSat{M}{!C}[w]$. So we distinguish cases:82 (a)~$\mSat{M}{!B}$[w]. Then $\mSat{M}{\Delta_1 \cup \{!B\}}[w]$.83 Since $\Delta_1 \cup !B \Entails !D$, we have $\mSat{M}{!D}[w]$.84 (b)~$\mSat{M}{!C}[w]$. Then $\mSat{M}{\Delta_2 \cup \{!C\}}[w]$.85 Since $\Delta_2 \cup !C \Entails !D$, we have $\mSat{M}{!D}[w]$. So86 in either case, $\mSat{M}{!D}[w]$, as we wanted to show.}8788 \item The !!{derivation} ends with $\Intro{\lif}$ concluding~$!B\lif89 !C$. Then the premise is~$!C$, and the !!{derivation} ending in90 the premise has !!{undischarged} assumptions~$\Gamma \cup91 \{!B\}$. So we have that $\Gamma \cup \{!B\} \Proves !C$, and by92 induction hypothesis that $\Gamma \cup \{!B\} \Entails !C$. We93 have to show that $\Gamma \Entails !B \lif !C$.9495 Suppose $\mSat{M}{\Gamma}[w]$. We want to show that for all96 $w'$ such that $Rww'$, if $\mSat{M}{!B}[w']$, then97 $\mSat{M}{!C}[w']$. So assume that $Rww'$ and98 $\mSat{M}{!B}[w']$. By \olref[sem][rel]{prop:true-monotonic},99 $\mSat{M}{\Gamma}[w']$. Since $\Gamma \cup \{!B\} \Entails !C$,100 $\mSat{M}{!C}[w']$, which is what we wanted to show. 101102 \item The !!{derivation} ends in $\Elim{\lif}$ and103 conclusion~$!C$. The premises are $!B \lif !C$ and $!B$, with104 !!{derivation}s from !!{undischarged} assumptions $\Gamma$,105 $\Delta$. So we have $\Gamma \Proves !B \lif !C$ and $\Delta106 \Proves !B$. By inductive hypothesis, $\Gamma \Entails !B \lif !C$107 and $\Delta \Entails !B$. We have to show that $\Gamma \cup \Delta108 \Entails !C$.109110 Suppose $\mSat{M}{\Gamma \cup \Delta}[w]$. Since111 $\mSat{M}{\Gamma}[w]$ and $\Gamma \Entails !B \lif !C$,112 $\mSat{M}{!B \lif !C}[w]$. By definition, this means that for all113 $w'$ such that $Rww'$, if $\mSat{M}{!B}[w']$ then114 $\mSat{M}{!C}[w']$. Since $R$ is reflexive, $w$ is among the $w'$115 such that $Rww'$, i.e., we have that if $\mSat{M}{!B}[w]$ then116 $\mSat{M}{!C}[w]$. Since $\mSat{M}{\Delta}[w]$ and $\Delta117 \Entails !B$, $\mSat{M}{!B}[w]$. So, $\mSat{M}{!C}[w]$, as we118 wanted to show.119120 \item The !!{derivation} ends in $\FalseInt$, concluding~$!A$. The121 premise is $\lfalse$ and the !!{undischarged} assumptions of the122 !!{derivation} of the premise are~$\Gamma$. Then $\Gamma \Proves123 \lfalse$. By inductive hypothesis, $\Gamma \Entails \lfalse$. We124 have to show $\Gamma \Entails !A$.125126 We proceed indirectly. If $\Gamma \Entails/ !A$ there is a127 model~$\mModel{M}$ and world~$w$ such that $\mSat{M}{\Gamma}[w]$128 and $\mSat/{M}{!A}[w]$. Since $\Gamma \Entails \lfalse$,129 $\mSat{M}{\lfalse}[w]$. But that's impossible, since by130 definition, $\mSat/{M}{\lfalse}[w]$. So $\Gamma \Entails !A$.131 \item The !!{derivation} ends in $\Intro\lnot$: Exercise.132 \item The !!{derivation} ends in $\Elim\lnot$: Exercise.133 \end{enumerate}134\end{proof}135136\begin{prob}137 Complete the proof of \olref[int][sc][snd]{thm:soundness}. For the138 cases for $\Intro\lnot$ and $\Elim\lnot$, use the definition of139 $\mSat{M}{\lnot !A}[w]$ in \olref[int][sem][rel]{defn:true-at-w}, i.e.,140 don't treat $\lnot !A$ as defined by $!A \lif \lfalse$.141\end{prob}142143\begin{prob}144 Show that the following !!{formula}s are not !!{derivable} in145 intuitionistic logic:146 \begin{enumerate}147 \item $(!A \lif !B) \lor (!B \lif !A)$148 \item $(\lnot\lnot !A \lif !A) \lif (!A \lor \lnot !A)$149 \item $(!A \lif !B \lor !C) \lif \bigl((!A \lif !B)\lor(!A \lif !C)\bigr)$150 \end{enumerate}151\end{prob}152153\end{document}
content/intuitionistic-logic/soundness-completeness/lindenbaum.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: lindenbaum45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{lin}1011\olsection{Lindenbaum's Lemma}1213The completeness theorem for intuitionistic logic is proved by assuming14$\Gamma \Proves/ !A$ and constructing a model $\mSat{M}{\Gamma}$ and~$\mSat/{M}{!A}$.1516In classical logic the relation of !!{derivability} can be reduced to17the notion of consistency since !!a{formula}~$!A$ is !!{derivable}18from a set of !!{formula}s iff the set together with the negation19of~$!A$ is inconsistent. This is not possible in intuitionistic logic.20In intuitionistic logic, if $\lnot!A$ is inconsistent, we only get21that $\Proves \lnot\lnot !A$. Since $\lnot\lnot!A \lif !A$ does not22hold intuitionistically in general, we cannot conclude that~$\Proves23!A$.2425Thus, when constructing the model~$\mModel{M}$, we will need to keep track 26of the non-!!{derivability} of the !!{formula}~$!A$ and thus we will not be 27able to use a complete set $\Gamma^* \supseteq \Gamma$ to build the model28$\mModel{M}$, as in every complete set $\Gamma^*$, we have29$\Gamma^* \Proves !A \lor \lnot !A$.3031Instead of using a complete set~$\Gamma^*$, we will us the notion of32a prime set of formulas:3334\begin{defn}\ollabel{defn:prime}35 A set of !!{formula}s~$\Gamma$ is \emph{prime} iff 36 \begin{enumerate}37 \item\ollabel{defn:prime1} $\Gamma$ is consistent, i.e., $\Gamma \Proves/ \lfalse$;38 \item\ollabel{defn:prime2} if $\Gamma \Proves !A$ then $!A \in \Gamma$; and39 \item\ollabel{defn:prime3} if $!A \lor !B \in \Gamma$ then $!A \in40 \Gamma$ or $!B \in \Gamma$.41 \end{enumerate}42\end{defn}4344\begin{lem}[Lindenbaum's Lemma]45 \ollabel{lem:lindenbaum} If $\Gamma \Proves/ !A$, there is a46 $\Gamma^* \supseteq \Gamma$ such that $\Gamma^*$ is prime and47 $\Gamma^* \Proves/ !A$.48\end{lem}4950\begin{proof}51 Let $!B_1 \lor !C_1$, $!B_2 \lor !C_2$, \dots, be an enumeration of52 all !!{formula}s of the form~$!B \lor !C$. We'll define an53 increasing sequence of sets of !!{formula}s~$\Gamma_n$, where each54 $\Gamma_{n+1}$ is defined as $\Gamma_n$ together with one new55 !!{formula}. $\Gamma^*$ will be the union of all~$\Gamma_n$. The new56 !!{formula}s are selected so as to ensure that $\Gamma^*$ is prime57 and still $\Gamma^* \Proves/ !A$. This means that at each step we58 should find the first disjunction~$!B_i \lor !C_i$ such that:59 \begin{enumerate}60 \item\ollabel{gamma-1} $\Gamma_n \Proves !B_i \lor !C_i$61 \item\ollabel{gamma-2} $!B_i \notin \Gamma_n$ and $!C_i \notin \Gamma_n$62 \end{enumerate}63 We add to $\Gamma_n$ either $!B_i$ if $\Gamma_n \cup \{!B_i\}64 \Proves/ !A$, or $!C_i$ otherwise. We'll have to show that this65 works. For now, let's define $i(n)$ as the least $i$ such that66 \olref{gamma-1} and~\olref{gamma-2} hold.67 68 Define $\Gamma_0 = \Gamma$ and69 \[70 \Gamma_{n+1} = \begin{cases}71 \Gamma_n \cup \{!B_{i(n)}\} &72 \text{if $\Gamma_n \cup \{!B_{i(n)}\} \Proves/ !A$} \\73 \Gamma_n \cup \{!C_{i(n)}\} & \text{otherwise}74 \end{cases}75 \]76 If $i(n)$ is undefined, i.e., whenever $\Gamma_n \Proves !B \lor !C$,77 either $!B \in \Gamma_n$ or $!C \in \Gamma_n$, we let $\Gamma_{n+1}78 = \Gamma_n$. Now let $\Gamma^* = \bigcup_{n=0}^\infty \Gamma_n$7980 First we show that for all $n$, $\Gamma_n \Proves/ !A$. We proceed81 by induction on~$n$. For $n = 0$ the claim holds by the hypothesis82 of the theorem, i.e., $\Gamma \Proves/ !A$. If $n>0$, we have to83 show that if $\Gamma_n \Proves/ !A$ then $\Gamma_{n+1} \Proves/ !A$. If84 $i(n)$ is undefined, $\Gamma_{n+1} = \Gamma_n$ and there is nothing85 to prove. So suppose $i(n)$ is defined. For simplicity, let $i =86 i(n)$.87 88 We'll prove the contrapositive of the claim. Suppose $\Gamma_{n+1}89 \Proves !A$. By construction, $\Gamma_{n+1} = \Gamma_n \cup90 \{!B_i\}$ if $\Gamma_n \cup \{!B_i\} \Proves/ !A$, or else91 $\Gamma_{n+1} = \Gamma_n \cup \{!C_i\}$. It clearly can't be the92 first, since then $\Gamma_{n+1} \Proves/ !A$. Hence, $\Gamma_n \cup93 \{!B_i\} \Proves !A$ and $\Gamma_{n+1} = \Gamma_n \cup \{!C_i\}$.94 By definition of $i(n)$, we have that $\Gamma _n \Proves !B_i \lor95 !C_i$. We have $\Gamma_n \cup \{!B_i\} \Proves !A$. We also have96 $\Gamma_{n+1} = \Gamma_n \cup \{!C_i\} \Proves !A$. Hence, $\Gamma_n97 \Proves !A$, which is what we wanted to show.9899 If $\Gamma^* \Proves !A$, there would be some finite subset $\Gamma'100 \subseteq \Gamma^*$ such that $\Gamma' \Proves !A$. Each $!D \in101 \Gamma'$ must be in $\Gamma_i$ for some~$i$. Let $n$ be the largest102 of these. Since $\Gamma_i \subseteq \Gamma_n$ if $i \le n$, $\Gamma'103 \subseteq \Gamma_n$. But then $\Gamma_n \Proves !A$, contrary to our104 proof above that $\Gamma_n \Proves/ !A$.105106 Lastly, we show that $\Gamma^*$ is prime, i.e., satisfies conditions107 \olref{defn:prime1}, \olref{defn:prime2}, and~\olref{defn:prime3} of108 \olref{defn:prime}.109110 First, $\Gamma^* \Proves/ !A$, so $\Gamma^*$ is111 consistent, so \olref{defn:prime1} holds.112113 We now show that if $\Gamma^* \Proves !B \lor !C$, then either $!B114 \in \Gamma^*$ or $!C \in \Gamma^*$. This proves \olref{defn:prime3},115 since if $!B \lor !C \in \Gamma^*$ then also $\Gamma^* \Proves !B 116 \lor !C$. So assume $\Gamma^* \Proves !B \lor !C$ but $!B117 \notin \Gamma^*$ and $!C \notin \Gamma^*$. Since $\Gamma^* \Proves118 !B \lor !C$, $\Gamma_n \Proves !B \lor !C$ for some~$n$. $!B \lor119 !C$ appears on the enumeration of all disjunctions, say, as $!B_j120 \lor !C_j$. $!B_j \lor !C_j$ satisfies the properties in the121 definition of $i(n)$, namely we have $\Gamma_n \Proves !B_j122 \lor !C_j$, while $!B_j \notin \Gamma_n$ and $!C_j \notin \Gamma_n$. At123 each stage, at least one fewer disjunction $!B_i \lor !C_i$124 satisfies the conditions (since at each stage we add either $!B_i$125 or $!C_i$), so at some stage~$m$ we will have $j = i(m)$. But126 then either $!B \in \Gamma_{m+1}$ or $!C \in \Gamma_{m+1}$, contrary127 to the assumption that $!B \notin \Gamma^*$ and $!C \notin128 \Gamma^*$.129130 Now suppose $\Gamma^* \Proves !B$. Then $\Gamma^* \Proves !B \lor131 !B$. But we've just proved that if $\Gamma^* \Proves !B \lor !B$132 then $!B \in \Gamma^*$. Hence, $\Gamma^*$133 satisfies~\olref{defn:prime2} of~\olref{defn:prime}.134\end{proof}135136\begin{prob}137Show that if $\Gamma \Proves/ \bot$ then $\Gamma$ is consistent in 138classical logic, i.e., there is a valuation making all formulas 139in~$\Gamma$ true.140\end{prob}141142\end{document}
content/intuitionistic-logic/soundness-completeness/canonical-model.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: canonical-model45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{mod}1011\olsection{The Canonical Model}1213The worlds in our model will be finite sequences~$\sigma$ of natural14numbers, i.e., $\sigma \in \Nat^*$. Note that $\Nat^*$ is inductively15defined by:16\begin{enumerate}17\item $\emptyseq \in \Nat^*$.18\item If $\sigma \in \Nat^*$ and $n \in \Nat$, then $\sigma.n \in19 \Nat^*$ (where $\sigma.n$ is $\sigma \concat \tuple{n}$ and $\sigma \concat \sigma'$ is the concatenation if $\sigma$ and $\sigma'$).20\item Nothing else is in $\Nat^*$.21\end{enumerate}22So we can use $\Nat^*$ to give inductive definitions.2324Let $\tuple{!B_1, !C_1}$, $\tuple{!B_2, !C_2}$, \dots, be an25enumeration of all pairs of !!{formula}s. Given a set of26!!{formula}s~$\Delta$, define $\Delta(\sigma)$ by induction as27follows:28\begin{enumerate}29\item $\Delta(\emptyseq) = \Delta$30\item $\Delta(\sigma.n) = {}$31 \[32 \begin{cases}33 (\Delta(\sigma) \cup \{!B_n\})^* &34 \text{if $\Delta(\sigma) \cup \{!B_n\} \Proves/ !C_n$} \\35 \Delta(\sigma) & \text{otherwise}36 \end{cases}37 \]38\end{enumerate}39Here by $(\Delta(\sigma) \cup \{!B_n\})^*$ we mean the prime set of40!!{formula}s which exists by \olref[lin]{lem:lindenbaum} applied to the41set $\Delta(\sigma) \cup \{!B_n\}$ and the !!{formula}~$!C_n$. Note that by this definition, if42$\Delta(\sigma) \cup \{!B_n\} \Proves/ !C_n$, then $\Delta(\sigma.n)43\Proves !B_n$ and $\Delta(\sigma.n) \Proves/ !C_n$. Note also that44$\Delta(\sigma) \subseteq \Delta(\sigma.n)$ for any~$n$. If $\Delta$45is prime, then $\Delta(\sigma)$ is prime for all~$\sigma$.4647\begin{defn}\ollabel{defn:canonical-model}48 Suppose $\Delta$ is prime. Then the \emph{canonical model} $\mModel{M(\Delta)}$ for49 $\Delta$ is defined by:50 \begin{enumerate}51 \item $W = \Nat^*$, the set of finite sequences of natural numbers.52 \item $R$ is the partial order according to which $R\sigma\sigma'$53 iff $\sigma$ is an initial segment of~$\sigma'$ (i.e., $\sigma' =54 \sigma \concat \sigma''$ for some sequence~$\sigma''$).55 \item $V(p) = \Setabs{\sigma}{p \in \Delta(\sigma)}$.56 \end{enumerate}57\end{defn}5859It is easy to verify that $R$ is indeed a partial order. Also, the60monotonicity condition on~$V$ is satisfied. Since $\Delta(\sigma)61\subseteq \Delta(\sigma.n)$ we get $\Delta(\sigma)62\subseteq \Delta(\sigma')$ whenever $R\sigma\sigma'$ by induction63on~$\sigma$.6465\end{document}
content/intuitionistic-logic/soundness-completeness/truth-lemma.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: truth-lemma45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{tru}1011\olsection{The Truth Lemma}1213The following lemma connects satisfaction in the canonical model with14which !!{formula}s are !!{element}s of the prime set $\Delta$.1516\begin{lem}\ollabel{lem:truth}17 If $\Delta$ is prime, then $\mSat{M(\Delta)}{!A}[\sigma]$ iff18 $\Delta(\sigma) \Proves !A$.19\end{lem}2021\begin{proof}22 By induction on~$!A$.23 \begin{enumerate}24 \item \indcase{!A}{\lfalse}{Since $\Delta(\sigma)$ is prime, it25 is consistent, so $\Delta(\sigma) \Proves/ \indfrm$. By26 definition, $\mSat/{M(\Delta)}{\indfrm}[\sigma]$.}27 \item \indcase{!A}{p}{By definition of $\mSat{{}}{}$,28 $\mSat{M(\Delta)}{\indfrm}[\sigma]$ iff $\sigma \in V(p)$,29 i.e., $\Delta(\sigma) \Proves \indfrm$.}30 \item \indcase!{!A}{\lnot !B}{}31 \item \indcase{!A}{!B \land32 !C}{$\mSat{M(\Delta)}{\indfrm}[\sigma]$ iff33 $\mSat{M(\Delta)}{!B}[\sigma]$ and34 $\mSat{M(\Delta)}{!C}[\sigma]$. By induction hypothesis,35 $\mSat{M(\Delta)}{!B}[\sigma]$ iff $\Delta(\sigma) \Proves36 !B$, and similarly for~$!C$. But $\Delta(\sigma) \Proves !B$37 and $\Delta(\sigma) \Proves !C$ iff $\Delta(\sigma)38 \Proves \indfrm$.}39 \item \indcase{!A}{!B \lor40 !C}{$\mSat{M(\Delta)}{\indfrm}[\sigma]$ iff41 $\mSat{M(\Delta)}{!B}[\sigma]$ or42 $\mSat{M(\Delta)}{!C}[\sigma]$. By induction hypothesis,43 this holds iff $\Delta(\sigma) \Proves !B$ or44 $\Delta(\sigma) \Proves !C$. We have to show that this in45 turn holds iff $\Delta(\sigma) \Proves \indfrm$. The46 left-to-right direction is clear. The right-to-left direction47 follows since $\Delta(\sigma)$ is prime.}48 \item \indcase{!A}{!B \lif !C}{First the contrapositive of the49 left-to-right direction: Assume $\Delta(\sigma) \Proves/ !B50 \lif !C$. Then also $\Delta(\sigma) \cup \{!B\} \Proves/51 !C$. Since $\tuple{!B, !C}$ is $\tuple{!B_n, !C_n}$ for52 some~$n$, we have $\Delta(\sigma.n) = (\Delta(\sigma) \cup53 \{!B\})^*$, and $\Delta(\sigma.n) \Proves !B$ but $\Delta(\sigma.n) \Proves/54 !C$. By inductive hypothesis, $\mSat{M(\Delta)}{!B}[\sigma.n]$55 and $\mSat/{M(\Delta)}{!C}[\sigma.n]$. Since56 $R\sigma(\sigma.n)$, this means that57 $\mSat/{M(\Delta)}{\indfrm}[\sigma]$.5859 Now assume $\Delta(\sigma) \Proves !B \lif !C$, and let60 $R\sigma\sigma'$. Since $\Delta(\sigma) \subseteq61 \Delta(\sigma')$, we have: if $\Delta(\sigma') \Proves62 !B$, then $\Delta(\sigma') \Proves !C$. In other words, for63 every $\sigma'$ such that $R\sigma\sigma'$, either64 $\Delta(\sigma') \Proves/ !B$ or $\Delta(\sigma') \Proves65 !C$. By induction hypothesis, this means that whenever66 $R\sigma\sigma'$, either $\mSat/{M(\Delta)}{!B}[\sigma']$ or67 $\mSat{M(\Delta)}{!C}[\sigma']$, i.e.,68 $\mSat{M(\Delta)}{\indfrm}[\sigma]$.}69 \end{enumerate}70\end{proof}7172\end{document}
content/intuitionistic-logic/soundness-completeness/completeness-thm.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: completeness-thm45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{cpl}1011\olsection{The Completeness Theorem}1213\begin{thm}\ollabel{thm:completeness}14 If $\Gamma \Entails !A$ then $\Gamma \Proves !A$.15\end{thm}1617\begin{proof}18 We prove the contrapositive: Suppose $\Gamma \Proves/ !A$. Then by19 \olref[lin]{lem:lindenbaum}, there is a prime set~$\Gamma^*20 \supseteq \Gamma$ such that $\Gamma^* \Proves/ !A$. Consider the21 canonical model~$\mModel{M(\Gamma^*)}$ for $\Gamma^*$ as defined in22 \olref[mod]{defn:canonical-model}. For any $!B \in \Gamma$, $\Gamma^*23 \Proves !B$. Note that $\Gamma^*(\emptyseq) = \Gamma^*$. By the Truth24 Lemma (\olref[tru]{lem:truth}), we have25 $\mSat{M(\Gamma^*)}{!B}[\emptyseq]$ for all $!B \in \Gamma$ and26 $\mSat/{M(\Gamma^*)}{!A}[\emptyseq]$. This shows that $\Gamma27 \Entails/ !A$.28\end{proof}2930\begin{prob}31 Show that if $!A$ only contains !!{propositional variable}s, $\lor$,32 and~$\land$, then $\Entails/ !A$. Use this to conclude that $\lif$ is33 not definable in intuitionistic logic from $\lor$ and~$\land$. 34\end{prob}35 36\begin{prob}37 By using the completeness theorem prove that if $\Proves !A \lor !B$ then38 $\Proves !A$ or $\Proves !B$. (Hint: Assume $\mSat/{M_1}{!A}$ and39 $\mSat/{M_2}{!B}$ and construct a new model $\mModel{M}$ such that40 $\mSat/{M}{!A \lor !B}$.)41\end{prob}42 43\begin{prob} 44 Show that if $\mModel{M}$ is a relational model using a linear order then45 $\mSat{M}{(!A \lif !B)\lor(!B \lif !A)}$.46\end{prob}4748\end{document}
content/intuitionistic-logic/soundness-completeness/decidability.tex
1% part: intuitionistic-logic2% chapter: soundness-completeness3% section: decidability45\documentclass[../../../include/open-logic-section]{subfiles}67\begin{document}89\olfileid{int}{sc}{dec}1011\olsection{Decidability}12Observe that the proof of the completeness theorem gives us for every13$\Gamma \Proves/ !A$ a model with an infinite number of worlds14witnessing the fact that $\Gamma \Entails/ !A$. The following15proposition shows that to prove $\Entails !A$ it is enough to prove16that $\mSat{M}{!A}$ for all finite models (i.e., models with a finite17set of worlds).1819\begin{thm}\ollabel{thm:decidability}20 If $\Entails/ !A$ then there is a finite model $\mSat/{M'}{!A}$.21\end{thm}2223\begin{proof}24 Assume $\mModel{M}=\tuple{W, R, V}$ is such that $\mSat/{M}{!A}$ and $P$ 25 is the set of !!{propositional variable}s occurring in~$!A$. Define26 $\mModel{M'}=\tuple{W', R', V'}$ by letting $W' = \Setabs{[w]}{w \in W}$ 27 where $[w] = \Setabs{p \in P}{w \in V(p)}$, $R'$ be the subset relation, 28 and $V'(p)=\Setabs{[w]}{p \in [w]}$. It should be clear that $W'$ is a 29 finite set and that $\mModel{M'}$ is !!a{relational model}.3031 It can be shown, by induction on~$!A$, that 32 \[33 \mSat{M}{!A}[w] \text{ iff } \mSat{M'}{!A}[{[w]}]34 \]35 for all !!{formula}s $!A$ with only !!{propositional variable}s36 from~$P$. This is left as an exercise for the reader.37\end{proof}3839\begin{prob}40Finish the proof of \olref[int][sc][dec]{thm:decidability} by showing41that $\mSat{M,w}{!A}$ iff $\mSat{M',[w]}{!A}$ for all !!{formula}s~$!A$42with only propositional variables from~$P$. 43\end{prob}4445From \olref{thm:decidability} it follows that there is an algorithm to46decide whether~$\Entails !A$.474849\end{document}