Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
The number $x$ is the G\"odel number of an atomic !!{formula} iff
one of the following holds:
\begin{enumerate}
\item There are $n$, $j < x$, and $z < x$ such that for each $i < n$,
$\fn{Term}((z)_i)$ and $x = $
\item There are $n$, $j < x$, and $z \le p_{k-1}^{k(x+1)}$, where
$k = \len{x}$, such that $\len{z} = n$, for each $i < n$,
$\fn{Term}((z)_i)$, and $x = $
\[
\Gn{\Obj P^n_j(} \concat \fn{flatten}(z) \concat \Gn{)}.
\]
Expand All @@ -47,9 +48,11 @@
A sequence of symbols~$s$ is !!a{formula} iff there is formation
sequence~$s_0$, \dots, $s_{k-1} = s$ of !!{formula} which records
how~$s$ was formed from atomic !!{formula}s according to the
formation rules. The code for each $s_i$ (and indeed of the code of
the sequence $\tuple{s_0, \dots, s_{k-1}}$) is less than the code~$x$
of~$s$.
formation rules. Choose such a sequence consisting only of subformulas
of~$s$. If $x$ is the code of~$s$ and $k=\len{x}$, this sequence has
some length $m\leq k$, each code $\Gn{s_i}$ is at most~$x$, and the
sequence code $\tuple{\Gn{s_0}, \dots, \Gn{s_{m-1}}}$ is at most
$p_{k-1}^{k(x+1)}$.
\end{proof}

\begin{prob}
Expand Down Expand Up @@ -84,7 +87,7 @@
A !!{sentence} is !!a{formula} without free occurrences of
!!{variable}s. So $\fn{Sent}(x)$ holds iff
\begin{multline*}
\bforall{i<\len{x}}{\bforall{z<x}{}}\\
\fn{Frm}(x) \land \bforall{i<\len{x}}{\bforall{z<x}{}}\\
(\bexists{j<z}{z=\Gn{\Obj v_j}} \lif \lnot\fn{FreeOcc}(x,z,i)).
\end{multline*}
\end{proof}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
\tuple{0, 8} & \tuple{0, 9} & \tuple{0, 10}
\end{array}
\]
\iftag{prvTrue}{If $\ltrue$ is a primitive symbol, its code is
$\tuple{0, 11}$. }{}\iftag{prvIff}{If $\liff$ is a primitive symbol, its
code is $\tuple{0, 12}$.}{}
\item If $s$ is the $i$-th variable $\Obj v_i$, then $\scode s = \tuple{1, i}$.
\item If $s$ is the $i$-th !!{constant}~$\Obj c_i$, then
$\scode s = \tuple{2, i}$.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
\begin{enumerate}
\item $\fn{Var}((y)_i)$, or
\item $\fn{Const}((y)_i)$, or
\item there is an $n$ and a number~$z = \tuple{z_1, \dots, z_n}$ such
\item there are $n$, $j$, and a number~$z = \tuple{z_1, \dots, z_n}$ such
that each $z_l$ is equal to some $(y)_{i'}$ for $i' < i$ and
\[
(y)_i = \Gn{\Obj f^n_j(} \concat \fn{flatten}(z) \concat \Gn{)},
Expand All @@ -82,9 +82,10 @@

We now just have to convince ourselves that there is a primitive
recursive bound on~$y$. But if $x$ is the G\"odel number of a term,
it must have a formation sequence with at most $\len{x}$ terms (since
every term in the formation sequence of~$s$ must start at some place
in~$s$, and no two subterms can start at the same place). The G\"odel
choose a formation sequence consisting of subterms of~$s$, ordered
so that each term follows its immediate subterms. This sequence has
at most $\len{x}$ entries, since each subterm occurrence starts at a
different place in~$s$. The G\"odel
number of each subterm of~$s$ is of course $\le x$. Hence, there
always is a formation sequence with code $\le p_{k-1}^{k(x+1)}$, where
$k=\len{x}$.
Expand Down
66 changes: 36 additions & 30 deletions content/incompleteness/arithmetization-syntax/proofs-in-ax.tex
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
can define:
\begin{multline*}
\fn{IsAx}_{!B \lif (!C \lif !B)}(n) \defiff \bexists{b< n}{
\bexists{c < n}{(\fn{Sent}(b) \land \fn{Sent}(c) \land {}}}\\ n =
\bexists{c < n}{(\fn{Frm}(b) \land \fn{Frm}(c) \land {}}}\\ n =
\Gn{(} \concat b \concat \Gn{\lif} \concat \Gn{(} \concat c \concat
\Gn{\lif} \concat b \concat \Gn{))}).
\end{multline*}
Expand All @@ -107,45 +107,47 @@
recursive, this defines a primitive recursive relation.
\item A line in $\delta$ is justified by \QR{} if it is of the form
$!B \lif \lforall[x][!A(x)]$, a preceding line is $!B \lif !A(c)$
for some !!{constant}~$c$, and $c$ does on occur in~$!B$. This is
for some !!{constant}~$c$, and $c$ does not occur in~$!B$ or~$!A(x)$. This is
the case iff
\begin{enumerate}
\item there is !!a{sentence}~$!B$ and
\item !!a{formula}~$!A(x)$ with a single variable~$x$ free so that
\item there is !!a{formula}~$!B$ and
\item !!a{formula}~$!A(x)$ and a variable~$x$ so that
\item line $i$ contains $!B \lif \lforall[x][!A(x)]$
\item some line $j < i$ contains $!B \lif \Subst{!A}{c}{x}$ for a constant~$c$
\item which does not occur in~$!B$.
\item which does not occur in~$!B$ or~$!A(x)$.
\end{enumerate}
All of these can be tested primitive recursively, since the G\"odel
numbers of $!B$, $!A(x)$, and $x$ are less than the G\"odel number of the
formula on line~$i$, and that of $a$ less than the G\"odel number of the
formula on line~$j$:
formula on line~$i$. If $x$ occurs freely in $!A(x)$, the constant
code~$c$ is less than the code of the premise on line~$j$. Otherwise
we may choose the fresh constant $\Obj c_d$, since all symbol indices
in the proof are less than~$d$. Thus $c<1+\Gn{\Obj c_d}$ suffices
in both cases:
\begin{multline*}
\fn{QR}_1(d, i) \defiff \bexists{b < (d)_i}{\bexists{x <
(d)_i}{\bexists{a < (d)_i}{\bexists{c < (d)_j}{(}}}}
\\ \fn{Var}(x) \land \fn{Const}(c) \land {} \\
\fn{QR}_1(d, i) \defiff \bexists{j<i}{}\bexists{b < (d)_i}{}\bexists{x <
(d)_i}{}\\ \bexists{a < (d)_i}{}\bexists{c < 1+\Gn{\Obj c_d}}{(}
\fn{Var}(x) \land \fn{Const}(c) \land {} \\
(d)_i = \Gn{(} \concat
b \concat \Gn{\lif} \concat \Gn{\lforall} \concat x \concat a
\concat \Gn{)} \land {}\\
(d)_j = \Gn{(} \concat b \concat
\Gn{\lif} \concat \fn{Subst}(a,c,x) \concat \Gn{)} \land {}\\ \fn{Sent}(b)
\land \fn{Sent}(\fn{Subst}(a,c,x)) \land {} \bforall{k <
\len{b}}{(b)_k \neq (c)_0})
\Gn{\lif} \concat \fn{Subst}(a,c,x) \concat \Gn{)} \land {}\\ \fn{Frm}(b) \land \fn{Frm}(a) \land {} \bforall{k <
\len{b \concat a}}{(b \concat a)_k \neq (c)_0})
\end{multline*}
Here we assume that $c$ and $x$ are the G\"odel numbers of the
variable and constant considered as terms (i.e., not their symbol
codes). We test that $x$ is the only free variable of~$!A(x)$ by
testing if $\Subst{!A(x)}{c}{x}$ is !!a{sentence}, and ensure that
$c$ does not occur in $!B$ by requiring that every symbol of~$!B$ is
different from~$c$.
constant and variable considered as terms (i.e., not their symbol
codes). We test that $!B$ and $!A(x)$ are formulas, and ensure that
$c$ does not occur in $!B$ or $!A(x)$ by requiring that every symbol
of both formulas is different from the symbol with code~$(c)_0$.

We leave the other version of \QR{} as an exercise.
\item $d$ is the G\"odel number of a correct !!{derivation} iff every
line in it is an axiom, or justified by modus ponens or~\QR. Hence:
\[
\fn{Deriv}(d) \defiff \bforall{i < \len{d}}{(\fn{IsAx}((d)_i) \lor
\fn{MP}(d,i) \lor \fn{QR}(d, i))}
\]
\begin{multline*}
\fn{Deriv}(d) \defiff \fn{Seq}(d) \land \len{d}>0 \land {}\\
\bforall{i < \len{d}}{(\fn{Frm}((d)_i) \land
(\fn{IsAx}((d)_i) \lor \fn{MP}(d,i) \lor \fn{QR}(d, i)))}
\end{multline*}
\end{enumerate}
\end{proof}

Expand All @@ -162,25 +164,27 @@
\begin{prop}
Suppose $\Gamma$ is a primitive recursive set of !!{sentence}s. Then
the relation $\Prf[\Gamma](x, y)$ expressing ``$x$ is the code of
!!a{derivation}~$\delta$ of $!A$ from~$\Gamma$ and $y$ is the G\"odel
number of~$!A$'' is primitive recursive.
!!a{derivation}~$\delta$ from no assumptions of a nested conditional
with antecedents in~$\Gamma$ and consequent~$!A$, and $y$ is the
G\"odel number of~$!A$'' is primitive recursive.
\end{prop}

\begin{proof}
Suppose ``$y \in \Gamma$'' is given by the primitive recursive
predicate~$R_\Gamma(y)$. We have to show that the relation
$\Prf[\Gamma](x, y)$ is primitive recursive, where $\Prf[\Gamma](x,
y)$ holds iff $y$ is the G\"odel number of !!a{sentence}~$!A$ and
$x$~is the code of !!a{derivation} of~$!A$ from $\Gamma$.
$x$~is the code of an assumption-free !!{derivation} of a nested
conditional with antecedents in~$\Gamma$ and consequent~$!A$.

By the previous proposition, the property $\fn{Deriv}(x)$ which holds
iff $x$ is the code of a correct !!{derivation}~$\delta$ is primitive
recursive. However, that definition did not take into account the set
$\Gamma$ as an additional way to justify lines in the !!{derivation}. Our
primitive recursive test of whether a line is justified by \QR{} also
left out of consideration the requirement that the constant~$c$ is not
allowed to occur in~$\Gamma$. It is possible to amend our definition so
that it takes into account $\Gamma$ directly, but it is easier to use
allowed to occur in the finite set of assumptions used from~$\Gamma$.
It is possible to code that finite support and check it directly, but it is easier to use
$\fn{Deriv}$ and the deduction theorem. $\Gamma \Proves !A$ iff
there is some finite list of !!{sentence}s $!B_1$, \dots, $!B_n \in
\Gamma$ such that $\{!B_1, \dots, !B_n\} \Proves !A$. And by the
Expand All @@ -190,18 +194,20 @@
instead of considering $x$ as the G\"odel number of !!a{derivation} of
the !!{sentence} with G\"odel number~$y$ \emph{from $\Gamma$}, we consider
$x$ as the G\"odel number of !!a{derivation} of a nested conditional
of the above form from~$\emptyset$.
of the above form from~$\emptyset$. The deduction theorem ensures
that such a certificate exists exactly when $\Gamma\Proves !A$.

First, if we have a sequence of !!{sentence}s, we can primitive
recursively form the conditional with all these sentences as
antecedents and given !!{sentence} as consequent:
\begin{align*}
\fn{hCond}(s, y, 0) & = y \\
\fn{hCond}(s, y, n+1) & = \Gn{(} \concat (s)_{n} \concat \Gn{\lif}
\concat \fn{Cond}(s, y, n) \concat \Gn{)}\\
\concat \fn{hCond}(s, y, n) \concat \Gn{)}\\
\fn{Cond}(s, y) & = \fn{hCond}(s, y, \len{s})\\
\intertext{So we can define $\Prf[\Gamma](x, y)$ by}
\Prf[\Gamma](x, y) & \defiff \bexists{s < \fn{sequenceBound}(x,x)}{(} \\
\Prf[\Gamma](x, y) & \defiff \fn{Sent}(y) \land {}
\bexists{s < \fn{sequenceBound}(x,x)}{(\fn{Seq}(s) \land {}} \\
&\qquad (x)_{\len{x}-1} = \fn{Cond}(s,y) \land {} \\
&\qquad\bforall{i<\len{s}}{(s)_i \in \Gamma} \land {} \\
&\qquad\fn{Deriv}(x)).
Expand Down
58 changes: 42 additions & 16 deletions content/incompleteness/arithmetization-syntax/proofs-in-lk.tex
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
\tuple{0, \Gn{\Gamma \Sequent \Delta}}.
\]
\item If $\pi$ ends in an inference with one or two premises, has
$\Gamma \Sequent \Delta$ as its conclusion, and $\pi_1$ and $\pi_2$ are the immediate subproof ending
in the premise of the last inference, then $\Gn{\pi}$ is
$\Gamma \Sequent \Delta$ as its conclusion, and $\pi_1$ (and $\pi_2$ in the two-premise case) are the immediate
subproofs ending in the respective premises of the last inference, then $\Gn{\pi}$ is
\begin{align*}
& \tuple{1, \Gn{\pi_1}, \Gn{\Gamma \Sequent \Delta}, k} \text{ or}\\
& \tuple{2, \Gn{\pi_1}, \Gn{\pi_2}, \Gn{\Gamma \Sequent \Delta}, k},
Expand Down Expand Up @@ -76,7 +76,7 @@
\RightLabel{\RightR{\lif}}
\UnaryInf$\fCenter (!A \land !B) \lif !A$
\end{prooftree}
The G\"odel number of the initial sequent would be $p_0 = \tuple{0,
The G\"odel number of the one-node !!{derivation} would be $p_0 = \tuple{0,
\Gn{!A \Sequent !A}}$. The G\"odel number of the !!{derivation}
ending in the conclusion of~$\LeftR{\land}$ would be $p_1 =
\tuple{1, p_0, \Gn{!A \land !B \Sequent !A}, 9}$ ($1$ since
Expand All @@ -95,18 +95,31 @@
show that we can manipulate such !!{derivation}s primitive recursively,
and express their essential properties and relations so. Some
operations are simple: e.g., given a G\"odel number~$p$ of
!!a{derivation}, $\fn{EndSeq}(p) = (p)_{(p)_0+1}$ gives us the G\"odel
!!a{derivation}, $\fn{EndSequent}(p) = (p)_{(p)_0+1}$ gives us the G\"odel
number of its end-sequent and $\fn{LastRule}(p) = (p)_{(p)_0+2}$ the
code of its last rule. The property $\fn{Sequent}(s)$ defined by
\[
\len{s} = 2 \land \bforall{i<\len{(s)_0} + \len{(s)_1}}{\fn{Sent}(((s)_0 \concat (s)_1)_i)}
\fn{Seq}(s) \land \len{s} = 2 \land
\fn{SentSeq}((s)_0) \land \fn{SentSeq}((s)_1)
\]
holds of $s$ iff $s$ is the G\"odel number of a sequent consisting of
!!{sentence}s. Some are much harder. We'll at least sketch how to do
this. The goal is to show that the relation ``$\pi$ is
!!a{derivation} of~$!A$ from~$\Gamma$'' is a primitive recursive
relation of the G\"odel numbers of $\pi$ and~$!A$.
\end{explain}
Here $\fn{SentSeq}(u)$ abbreviates
$\fn{Seq}(u)\land\bforall{i<\len{u}}{\fn{Sent}((u)_i)}$.
We will also use the primitive recursive predicate $\fn{Node}(p)$:
\begin{multline*}
\fn{Seq}(p)\land\fn{Sequent}(\fn{EndSequent}(p))\land{}\\
[((p)_0=0\land\len{p}=2)\lor
((p)_0=1\land\len{p}=4)\lor{}\\
((p)_0=2\land\len{p}=5)].
\end{multline*}
It checks the prescribed tuple shape and end-sequent; correctness of
an inference and of its subderivations is checked separately.


\begin{prop}\ollabel{prop:followsby}
The property $\fn{Correct}(p)$ which holds iff the last inference in
Expand All @@ -115,19 +128,26 @@
\end{prop}

\begin{proof}
$\Gamma \Sequent \Delta$ is an initial sequent if either there
$\Gamma \Sequent \Delta$ is an initial sequent if there
is !!a{sentence}~$!A$ such that $\Gamma \Sequent \Delta$ is $!A
\Sequent !A$, or there is a term~$t$ such that $\Gamma \Sequent
\Sequent !A$, or there is a closed term~$t$ such that $\Gamma \Sequent
\Delta$ is $\emptyset \Sequent \eq[t][t]$. In terms of G\"odel
numbers, $\fn{InitSeq}(s)$ holds iff
\begin{align*}
\bexists{x < s}{} (\fn{Sent}(x) & \land
s = \tuple{\tuple{x},\tuple{x}})
\lor {}\\
\bexists{t<s}{} (\fn{Term}(t) & \land
s = \tuple{0, \tuple{\Gn{{\eq}(} \concat t \concat \Gn{,} \concat t \concat \Gn{)}}}).
\bexists{t<s}{} (\fn{ClTerm}(t) & \land
s = \tuple{0, \tuple{\Gn{{\eq}(} \concat t \concat \Gn{,} \concat t \concat \Gn{)}}})
\iftag{prvTrue}{\\
{}\lor s &= \tuple{0,\tuple{\Gn{\ltrue}}}}{}
\iftag{prvFalse}{\\
{}\lor s &= \tuple{\tuple{\Gn{\lfalse}},0}}{}.
\end{align*}

\iftag{prvTrue}{The truth initial sequent is also included.}{}
\iftag{prvFalse}{The falsity initial sequent is also included.}{}

We also have to show that for each rule of inference~$R$ the
relation $\fn{FollowsBy}_R(p)$ is primitive recursive, where
$\fn{FollowsBy}_R(p)$ holds iff $p$ is the G\"odel number of
Expand Down Expand Up @@ -161,7 +181,10 @@
\Gn{\Gamma}$ and $(s)_1 = \Gn{\Delta}$. So,
$\fn{FollowsBy}_{\RightR{\land}}(p)$ holds iff
\begin{align*}
& \fn{Node}(p)\land\fn{Node}((p)_1)\land\fn{Node}((p)_2)\land{}\\
& \bexists{g < p}{\bexists{d < p}{\bexists{a < p}{\bexists{b < p}{\quad}}}} \\
& \qquad \fn{SentSeq}(g)\land\fn{SentSeq}(d)\land
\fn{Sent}(a)\land\fn{Sent}(b)\land{}\\
& \qquad \fn{EndSequent}(p) =
\tuple{g, d \concat
\tuple{\Gn{(} \concat a \concat \Gn{\land} \concat b \concat \Gn{)}}} \land {} \\
Expand All @@ -181,14 +204,17 @@

The last inference in~$\pi$ is a correct application of
$\RightR\lexists$ iff there are sequences $\Gamma$ and $\Delta$,
!!a{formula}~$!A$, a variable~$x$, and a term~$t$, such that
!!a{formula}~$!A$, a variable~$x$, and a closed term~$t$, such that
the end-sequent of $\pi$ is $\Gamma \Sequent \Delta, \lexists[x][!A]$
and the end-sequent of $\pi_1$ is $\Gamma \Sequent \Delta,
\Subst{!A}{t}{x}$. So in terms of G\"odel numbers, we have
$\fn{FollowsBy}_{\RightR\lexists}(p)$
iff
\begin{align*}
& \fn{Node}(p)\land\fn{Node}((p)_1)\land{}\\
& \bexists{g<p}{\bexists{d<p}{\bexists{a<p}{\bexists{x<p}{\bexists{t<p}{\quad}}}}}\\
& \qquad \fn{SentSeq}(g)\land\fn{SentSeq}(d)\land
\fn{Frm}(a)\land\fn{Var}(x)\land\fn{ClTerm}(t)\land{}\\
& \qquad \fn{EndSequent}(p) =
\tuple{
g,
Expand All @@ -203,13 +229,13 @@
\end{align*}
We then define $\fn{Correct}(p)$ as
\begin{multline*}
\fn{Sequent}(\fn{EndSequent}(p)) \land {}\\
\fn{Node}(p) \land {}\\
[(\fn{LastRule}(p) = 1 \land
\fn{FollowsBy}_{\LeftR\Weakening}(p)) \lor \dots \lor {}\\
(\fn{LastRule}(p) = 20 \land \fn{FollowsBy}_{\eq}(p)) \lor {}\\
(p)_0 = 0 \land \fn{InitialSeq}(\fn{EndSequent}(p))]
\end{multline*}
The first line ensures that the end-sequent of~$d$ is actually a
The first line ensures that the end-sequent of~$p$ is actually a
sequent consisting of !!{sentence}s. The last line covers the case
where $p$ is just an initial sequent.
\end{proof}
Expand All @@ -233,14 +259,14 @@

\begin{prop}
\ollabel{prop:deriv}
The relation $\fn{Deriv}(p)$ which holds if $p$ is the G\"odel
number of a correct !!{derivation}~$\pi$, is primitive recursive.
The relation $\fn{Deriv}(p)$ which holds iff $p$ is the G\"odel
number of a correct !!{derivation}~$\pi$ is primitive recursive.
\end{prop}

\begin{proof}
!!^a{derivation}~$\pi$ is correct if every one of its inferences
is a correct application of a rule, i.e., if every one of its
sub-!!{derivation}s ends in a correct inference. So, $\fn{Deriv}(d)$
sub-!!{derivation}s ends in a correct inference. So, $\fn{Deriv}(p)$
iff
\[
\bforall{i<\len{\fn{SubtreeSeq}(p)}}{\fn{Correct}((\fn{SubtreeSeq}(p))_i}.
Expand Down Expand Up @@ -271,7 +297,7 @@
sequent and $(\fn{EndSequent}(x))_1$ the right side. So we can
express ``the right side of the end-sequent of~$\pi$ is~$!A$'' as
$\len{(\fn{EndSequent}(x))_1} = 1 \land ((\fn{EndSequent}(x))_1)_0 =
x$. The left side of the end-sequent of $\pi$ is of course
y$. The left side of the end-sequent of $\pi$ is of course
automatically finite, we just have to express that every sentence in
it is in~$\Gamma$. Thus we can define $\Prf[\Gamma](x, y)$ by
\begin{align*}
Expand Down
Loading
Loading