Skip to content

Commit 7eb49e8

Browse files
committed
add section incompleteness/representability-in-q/undecidability
1 parent c686cc2 commit 7eb49e8

7 files changed

Lines changed: 102 additions & 20 deletions

File tree

computability/recursive-functions/halting-problem.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
\[
1919
h(e, n) =
2020
\begin{cases}
21-
1 & \text{if computation $e$ halts on input $n$}
22-
0 & otherwise
21+
1 & \text{if computation $e$ halts on input $n$}\\
22+
0 & \text{otherwise,}
2323
\end{cases}
2424
\]
2525
is not computable.
@@ -40,8 +40,8 @@
4040
\[
4141
h(e, x) =
4242
\begin{cases}
43-
1 & \text{if $\cfind{e}(x) \defined$}
44-
0 & otherwise.
43+
1 & \text{if $\cfind{e}(x) \defined$}\\
44+
0 & \text{otherwise.}
4545
\end{cases}
4646
\]
4747
Note that $h(e, x) = 0$ if $\cfind{e}(x) \undefined$, but also
@@ -58,7 +58,7 @@
5858
\[
5959
d(y) =
6060
\begin{cases}
61-
1 & \text{if $h(y, y) = 0$}
61+
1 & \text{if $h(y, y) = 0$}\\
6262
\umin{x}{x \neq x} & \text{otherwise.}
6363
\end{cases}
6464
\]

computability/recursive-functions/normal-form.tex

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,35 @@
1010
\olsection{The Normal Form Theorem}
1111

1212
\begin{thm}[Kleene's Normal Form Theorem]
13+
\ollabel{thm:kleene-nf}
1314
There are a primitive recursive relation $T(e, x, s)$ and a primitive
1415
recursive function $U(s)$, with the following property: if $f$ is any
1516
partial recursive function, then for some~$e$,
1617
\[
17-
f(x) \simeq U(\mu s \; T(e, x, s))
18+
f(x) \simeq U(\umin{s}{T(e, x, s)})
1819
\]
19-
for every $x$.
20+
for every $x$.
2021
\end{thm}
2122

2223
\begin{explain}
23-
The proof of the norm is involved, but the basic idea is simple.
24-
Every partial recursive function has an \emph{index}~$e$, intuitively,
25-
a number coding its program or definition. If $f(x) \defined$, the
26-
computation can be recorded systematically and coded by some
27-
number~$s$, and that $s$ codes the computation of $f$ on input $x$ can
28-
be checked primitive recursively using only $x$ and the
24+
The proof of the normal form theorem is involved, but the basic idea
25+
is simple. Every partial recursive function has an \emph{index}~$e$,
26+
intuitively, a number coding its program or definition. If $f(x)
27+
\defined$, the computation can be recorded systematically and coded by
28+
some number~$s$, and that $s$ codes the computation of $f$ on input
29+
$x$ can be checked primitive recursively using only $x$ and the
2930
definition~$e$. This means that $T$ is primitive recursive. Given
3031
the full record of the computation~$s$, the ``upshot'' of~$s$ is the
3132
value of~$f(x)$, and it can be obtained from~$s$ primitive recursively
32-
as well. The normal form theorem shows that only a single unbounded
33-
search is required for the definition of any partial recursive
34-
function.
35-
\end{explain}
33+
as well.
3634

35+
The normal form theorem shows that only a single unbounded search is
36+
required for the definition of any partial recursive function. We can
37+
use the numbers $e$ as ``names'' of partial recursive functions, and
38+
write $\cfind{e}$ for the function $f$ defined by the equation in the
39+
theorem. Note that any partial recursive function can have more than
40+
one index---in fact, every partial recursive function has infinitely
41+
many indices.
42+
\end{explain}
3743
\end{document}
3844

computability/recursive-functions/recursive-functions.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ \chapter{Recursive Functions}
2929

3030
\olimport{normal-form}
3131

32+
\olimport{halting-problem}
33+
3234
\olimport{general-recursive-functions}
3335

3436
\OLEndChapterHook

incompleteness/arithmetization-syntax/proofs-in-lk.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
to express that every sentence in it is in~$\Gamma$. Thus we can
155155
define $\fn{Pr}_\Gamma(x, y)$ by
156156
\begin{align*}
157-
\Prov_\Gamma(x, y) \defiff {}&
157+
\fn{Pr}_\Gamma(x, y) \defiff {}&
158158
\fn{Sent}(x) \land \fn{Deriv}(y) \land {} \\
159159
& \lforall[i <
160160
\len{((y)_1)_0}][(((y)_1)_0)_i \in \Gamma] \land {}\\

incompleteness/representability-in-q/representability-in-q.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ \chapter{Representability in $\Th{Q}$}
2323

2424
\olimport{representing-relations}
2525

26+
\olimport{undecidability}
27+
2628
\OLEndChapterHook
2729

2830
\end{document}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
% Part: incompleteness
2+
% Chapter: representability-in-q
3+
% Section: undecidability
4+
5+
\documentclass[../../include/open-logic-section]{subfiles}
6+
7+
\begin{document}
8+
9+
\olfileid{inc}{req}{und}
10+
\olsection{Undecidability}
11+
12+
We call a theory $\Th{T}$ \emph{undecidable} if there is no
13+
computational procedure which, after finitely many steps and
14+
unfailingly, provides a correct answer to the question ``does $\Th{T}$
15+
prove~$!A$'' for any sentence~$!A$ in the language of~$\Th{T}$. So
16+
$\Th{Q}$ would be decidable iff there were a computational procedure
17+
which decides, given a sentence~$A$ in the language of arithmetic,
18+
whether $\Th{Q} \Proves !A$ or not. We can make this more precise by
19+
asking: Is the relation~$\fn{Prov}_{\Th{Q}}(x)$, which holds of~$x$
20+
iff $x$ is the G\"odel number of a sentence provable in~$\Th{Q}$,
21+
recursive? The answer is: no.
22+
23+
\begin{thm}
24+
$\Th{Q}$ is undecidable, i.e., the relation
25+
\[
26+
\fn{Prov}_{\Th{Q}}(x) \defiff \fn{Sent}(x) \land
27+
\lexists[y][\fn{Pr}_{\Th{Q}}(x, y)]
28+
\]
29+
is not recursive.
30+
\end{thm}
31+
32+
\begin{proof}
33+
Suppose it were. Then we could solve the halting problem as follows:
34+
Given $e$ and $n$, we know that $\cfind{e}(n) \defined$ iff there is
35+
an~$s$ such that $T(e, x, s)$, where $T$ is Kleene's predicate from
36+
\olref[cmp][rec][nft]{thm:kleene-nf}. Since $\Char{T}$ is primitive
37+
recursive it is representable in~$\Th{Q}$ by a formula
38+
$!B_T(e,x,s,y)$, that is, $\Th{Q} \Proves !B_T(\num{e}, \num{x},
39+
\num{s}, \num{1})$ iff $T(e, x, s)$. If $\Th{Q} \Proves !B_T(\num{e},
40+
\num{x}, \num{s}, \num{1})$ then also $\Th{Q} \Proves \Th{Q} \Proves
41+
\lexists[y][!B_T(\num{e}, \num{x}, y, \num{1})]$. If no such $s$
42+
exists, then $\Th{Q} \Proves \lnot !B_T(\num{e}, \num{x}, \num{s},
43+
\num{1})$ for every~$s$. Since $\Th{Q}$ is $\omega$-consistent,
44+
$\Th{Q} \Proves/ \lexists[y][!B_T(\num{e}, \num{x}, y, \num{1})]$. In
45+
other words, $\Th{Q} \Proves \lexists[y][!B_T(\num{e}, \num{x}, y,
46+
\num{1})]$ iff there is an $s$ such that $T(e, n, s)$, i.e., iff
47+
$\cfind{e}(n) \defined$. From $e$ and~$n$ we can compute
48+
$\Gn{\lexists[y][!B_T(\num{e}, \num{n}, y, \num{1})]}$, let $g(e, n)$
49+
be the primitive recursive function which does that. So
50+
\[
51+
h(e, n) =
52+
\begin{cases}
53+
1 & \text{if $\fn{Pr}_{\Th{Q}}(g(e, n))$}\\
54+
0 & \text{otherwise}.
55+
\end{cases}
56+
\]
57+
This would show that $h$ is recursive if $\fn{Pr}_{\Th{Q}}$ is. But $h$ is not
58+
recursive, by \olref[cmp][rec][hlt]{thm:halting-problem}, so $\fn{Pr}_{\Th{Q}}$
59+
cannot be either.
60+
\end{proof}
61+
62+
\begin{cor}
63+
First-order logic is undecidable.
64+
\end{cor}
65+
66+
\begin{proof}
67+
If first-order logic were decidable, provability in~$\Th{Q}$ would be
68+
as well, since $\Th{Q} \Proves !A$ iff $\Proves !O \lif !A$, where
69+
$!O$ is the conjunction of the axioms of~$\Th{Q}$.
70+
\end{proof}
71+
72+
\end{document}

sty/open-logic-formulas.sty

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@
2828
% Provides !A, !B etc in math mode to produce \phi, \psi etc.
2929

3030
\def\olgreekformulas
31-
{\gdef\formula{\lookup{A/\varphi,B/\psi,C/\chi,D/\theta,E/\alpha,F/\beta,G/\gamma,H/\delta,K/\xi,L/\zeta,R/\rho,T/\tau}}}
31+
{\gdef\formula{\lookup{A/\varphi,B/\psi,C/\chi,D/\theta,E/\alpha,F/\beta,G/\gamma,H/\delta,K/\xi,L/\zeta,O/\omega,R/\rho,T/\tau}}}
3232

3333
\def\olalphagreekformulas
34-
{\gdef\formula{\lookup{A/\alpha,B/\beta,C/\gamma,D/\delta,E/\phi,F/\psi,G/\chi,H/\sigma,K/\xi,L/\zeta,R/\rho,T/\tau}}}
34+
{\gdef\formula{\lookup{A/\alpha,B/\beta,C/\gamma,D/\delta,E/\phi,F/\psi,G/\chi,H/\sigma,K/\xi,L/\zeta,O/\omega,R/\rho,T/\tau}}}
3535

3636
% args -- format a list of arguments separated by commas without commas
3737

0 commit comments

Comments
 (0)