Godel & Turing
Sept. 21, 2009
1. What Godel and Turing Proved
2. The Significance of the
ir
Theorems
3. Godel’s Theorems

4 basic results.
4. Godel B
ased on Soundness (1 & 2)
5. Godel Based on w

consistency (3)
6. Godel’s 2nd. Incompleteness Theorem
(4)
7. Turing’s Unsolvability of the Halting Problem
8. Beyond Turing: The Theory of Computation and Uniting Godel
’s Logic
& Turing
’s Computer
into
One
I.
WHAT GODEL AND TURING PROVED
In 1931 Kurt Godel
published, “On Formally Undecidable Propositions
of Pri
ncipia Mathematica and
Related Systems I
”
http://www.research.ibm.com/people/h/hirzel/papers/canon00

goedel.pdf
. In this
famous paper, Godel
p
roved his 1st. Incompleteness Theorem: I
n any reasonable system of logic,
there
are statements that are true but
not provable.
Furthermore, these statements are neither provable nor
refutabl
e
(its negation is not pro
vable.)
This last statement is the definition of “Logic is incomplete.”
The system of Logic considered is that used throughout the history of Mathema
tics. It is called an
axiomatic
system and consists of
axioms
that are known to be true and
rules
which map true statements
into other true statements. The statements produced by the axioms and rules this way are called the
theorems
of the system.
Godel
also proved his 2nd. Incompleteness Theorem: I
n any reasonable system of logic, there is no
proof in that system that the system is
consi
stent
, that is, that there is no statement that we can both
prove and disprove.
Since
“reasonable” includes that
the
system must be consistent, we also cannot prove that it is not
consistent.
Thus, the assertion that the system itself is consistent is a
n example of a
statement that is
neither provable nor refutable.
Godel’s 1st
.
is a
n easy
consequence (
corollary
) of hi
s 2
nd
.
However,
he uses his 1st to prove his 2nd.
The Halting Problem is the problem of developing a way to determine if any given
Turing
Machine
(or
computer program) will ever halt.
In 1937
Alan Turing
published “
On Computable Numbers With An
Applica
tion To The E
ntscheidungsproblem
”
http://www.thocp.net/biographies/papers/turing_oncomputablenumbers_1936.pdf
in which he
proved
that it is not
possible to
tell in general

there is no solution to the Halting Problem.
In modern terminology, the
halting
s
et
(the set of Turing Machines that halt) is not
recursive
. It has no
decision
procedure
.
II.
THE SIGNIFICANCE OF THE
IR
THEOREMS
Godel’s theorems are significant in that the gr
eatest mathematicians of that time
, including David
Hilbert, believed that w
e can construct a system of logic in which every statement is provable or
refut
able
, and
we can prove that the system is consistent
.
Godel proved that impossible.
Hilbert
wrote,
“
For us there is no
ignorabimus (Latin for
‘
we will not know
’
)
, and in my o
pinion none whatever in
natural science. In opposition to the foolish
ignorabimus
our slogan shall be:
We must know

we will
know!
”
There are many conjectures in Mathematics that have been verified to be true of millions of numbers,
but for which no proo
f is known. Fermat’s Last Theorem was an example for 350 years, and
Goldbach’s Conjecture remains unproven: Every even number is the sum of two prime number
s
.
Godel
’s
results suggest
that these theorems may be true but unprovable.
Q1.
Can we ever prove
that a M
athematical conjecture is unprovable
using the system of Logic in
which it is unprovable
? No. Why?
Hints are on the next two lines.
Hint 1.
Consider Go
del’s 2nd. Incompleteness Theorem.
Hint 2. Recall that in an inconsistent system, all sentenc
es are provable.
Turing
was the first to show
a particular Mathematical problem

the Halting Problem

which cannot
be solved.
III.
GODEL’S THEOREMS
–
4 BASIC RESULTS
Godel actually proved 4
main theorems in his 1931 paper.
Let
(eA)w(A)
mean “There ex
ists a number
A such that w(A) is true.”. Let
(aA)w(A)
mean “For all numbers A w(A) is true.”.
A system is
sound
if all provable sentences are true. A system is
w

consistent
if
, for
every wff w(x)
with one free variable
x
if w(x)
is provable for
all val
ues of x
, then we cannot pro
ve that it is not so that
w holds for all values of x. That is,
[ (aA)


w(A) ] => ~


~
(aA)w(A)
w

consistent definition
( 

w ) => w
sound definition
Godel proved:
1. If the system is soun
d, there is a sentence t
hat is true and not provable.
2. If the system is sound, there is a sentence that is not provable and not refutable.
3. If the system is w

consistent, then there is a sentence that is not provable and not refutable.
4.
If the system is consistent, there is
no proof within the system that the system is consistent.
All proofs use a mapping that maps each wff to a unique natural number (0, 1, 2, . . .) now called the
Godel number
of the wff.
Then we can talk about the set of the Godel numbers of the statemen
ts that
are provable.
IV.
GODEL BASED ON SOUNDNESS

1
&
2
S
uppose the axioms and rules of our system were such that the theorems all had a Godel number of
one
more than the square of each and every
natural number. That is, the Godel numbers of the the
orems are
1, 2, 5, 10, 17, 26, . . . (one more than each square.) Then we can construct a
wff that expresses this
fact. I
t is true
iff
(if and only if) x is the Godel number of a theorem: (eA)((A*A)+1)=
x. This is true iff
x
is in 1, 2, 5, 10, 17, 26, .
. . , that is, the Godel numbers of the
provable wffs. And similarly,
~(eA)((A*A)
+1)=x is true iff x
is the Godel number of an unprovable wff.
The Godel numbers of the theorems
in all of Logic
are not really th
e squares plus one.
But still
Godel
asserts
that there is
in fact
a wff that is true iff x is the Godel number of an unprovable wff.
[ # 46 page
186 ]
Let us call that wff
unp(x)
. So unp(x) is true iff wff number x is unprovable.
Godel
also
asserts that there is a wff
[ call it
selfunp(x)
]
that
expresses the assertion that wff number x
with one free variable is unprovable when x is substituted for its free variable. For example, suppose
(e
A)A*A*A=x is wff number 3. So
if (eA)A*A*A=3 is unprovable
then selfunp(3) is true, and if
(eA)A*A*A=3 is
provable then selfunp(3)
is f
a
l
se.
Let us suppose that selfunp
(x) has Godel number 37. W
hen is selfunp(37) true? Selfunp(x) is true iff
wff x with x substituted for its one free variable is not provable.
So selfunp(37) is true iff wff 37 with
37 substi
tuted for its free variable is not provable. wff 37 is selfunp(x). wff 37 with 37 substituted for
it
s
free variable is selfunp(37). So selfunp(37) is true iff selfunp(37) is not provable. Now notice the
two sides of this e
quivalence. If we let G [ the
Godel
Sentence
] represent selfunp(37), then G is true
iff G is unprovable!
This is often written as “G says that G is unprovable.” Some authors ridicule the asserti
on th
at
carbon,
ink or
silicon
used in
pencil lead, pen
s
or computer display
s
,
or the ab
stract mathematical object called
a stri
ng of characters,
is able to
speak words or even to
emit sounds.
We prefer to write
that G is true
iff G is unprovable.
Now is G true? Let us consider the two possibilities:
1. G is true.
Then G is unprovable.
That’s funny, but doesn’t contradict anything that we have said.
2. G is false.
Then “G is unprovable” is false. So G is p
rovable. But if the system is s
ound, then G
would be true. So we have a contradiction and G cannot be false.
So G is true and G
is unprovable. And we have our theorem # 1.
Is ~G provable?
Two possibilities:
1. ~G is provable. Then because the system is Sound, ~G is true. Then G is false. But G is true. So
~G is not provable
2. ~G is not provab
le.
Ok
Then ~G is not provab
le. So G is not refutable. Then G is not provable and G is not refutable.
And we
have our theorem # 2.
V.
GODEL BASE
D
ON W

CONSISTENCY

3
We have proved 2:
If the system is sound, there is a sentence that is not provable and not refutable.
Godel a
lso proved a stronger theorem, 3:
If the system is w

consistent, then there is a sentence that is not provable and not refutable.
This proof
of 3
is much more complex than the proof of 2.
However, 3
is stronger than 2
. That is, 3 =>
2 while
we don’t kn
ow that 2 => 3
.
Q2. Prove that 3 => 2. Let
COMP
be the expression “All sentences are provable or refutable.”
Hint 1.
We want (w

consistent => ~
COMP
) => (sound => ~
COMP
)
Hint 2. So we want
sound => w

consistent
Hint 3.
Then given
( 

w ) => w we want to
prove that [ (aA) 

w(A) ] => ~ 

~(aA)w(A) .
Hint 4. What can we conclude from
(aA) 

w(A)
using
( 

w ) => w
?
Hint 5. What can we conclude from


~(aA)w(A)
using
( 

w ) => w
?
Here is something that I wrote a few years ago
http://tech.dir.group
s.yahoo.com/group/theory

edge/message/4225
I will explain what
I wrote at the meeting if anyone is interested.
It is simply what
Godel says but without his notation and not all of the detail.
I called it Godel In 10 Easy
Steps. It is
contained in pages
15

16 in the Godel document at the link in I above.
1.
Godel s
hows that there is a 2

place (2 free

unquantified

variables) wff
w(a,b) such that
PRIT(a,a,b) => 

w(a,b) and
~PRIT(a,a,b) => 

~w(a,b) where
PRIT(a,b,c) is a relation defined to be
true i
ff wff (with
Godel) number a is
1

place and the proof (with Godel) numb
er c proves wff number a
with b
substituted for its one free variable.


means provable. I also use a 

b to mean a proves b.
2. Let (aA) mean "for all A", and consider 1

place (var
iable a is free
) wff
(aA)~w(a,A). Let N=its
number. Now let G = (
aA)~w(N,A), i.e., we substitute
the wffs own number for its free variable.
(This
is analogous to running a
program against itself, as in Turing's 1937 Halting Problem unsolvability
proof.)
3
. Consider whether 

G or 

~G, i.e., whethe
r G or ~G is provable. We first
assume that Logic is
consistent: there is no wff v such that 

v and 

~v.
4. If 

G then there is a proof of G, let
its number be k, i.e., k 

G.
Then PRIT(N,N,k) since G is jus
t wff
N with N
substituted for its one free
variable. Then by (1) property of w, we hav
e 

w(N,k). Now, since


G then


(aA)~w(N,A). By definition of (aA) we ha
ve (let A=k) 

~w(N,k). So both


w(N,k) and and 

w(N,k). This can't be,
given that Logic is c
onsistent.
So ~

G.
5. If 

~G then 

~(aA)~w(N,A). By (4) we ha
ve ~

G. That means there is no
proof of G. Then for all
proofs, let A=proo
f number, we have ~PRIT(N,N,A),
i.e., (aA)~PRIT(N,N,A). By (1) ~PRIT(
N,N,A)
=> 

~w(N,A), so we have
(aA)

~w(N,A).
6. Secret: At this point Godel is stumped! H
e wants to show a hole in Logic
like Russell did in Set
Theory (and the
ancient Greeks found in spoken
languages with the Liar paradox.) But all
he proves is
that we have a wff
w(a,b) such that (aA)

~w(N,A) an
d 

~(aA)~w(N,A). His only recourse: outlaw
that. Assume it can't be. So he calls that
"not w

consistent". He says to
assume Logic is w

consistent
and so we have a
contradiction and ~

~G, i.e.,
~G is not provable either.
7. What does w

consistent really
mean? Let v(a) r
epresent the wff ~w(N,a).
(N is a constant.) Then he
has (
aA)

v(A) and 

~(aA)v(A). Then
w

consistent means there is no wff v such t
hat (aA)

v(A) and 

~(aA)v(A).
In words, we cannot both (i.) prove v(A) for e
very value of A, and also (ii
.)
prove "not all
v(A) are true". (One way t
o prove v(A) for every value A,
even though there are an infinite number o
f
A values, is to somehow prove
(aA)v(A).) This sounds like a positive thing. (i.) suggests to us that v(A)
is true for all values of A, i
.e., (aA)v(A), w
hile (ii.) suggests the
opposite, that ~(aA)v(A). But
reasonableness
does not mean that Logic (as we
have formalized it) does have this property
, w

consistency. (Godel offered
no proof

not even making the assertion

that Logic is w

consi
stent.)
8. In (3

4) and (6) we had to assu
me that Logic is consistent and
w

consistent, and in (4) and (6) we
s
howed that ~

G and ~

~G, ie.,
incompleteness. (Either G or ~G is true, bu
t both are unprovable, so
there
is a wff (either G or
~
G) that is tru
e but unprovable.
) Then consistent +
w

consistent =>
incomplete.
9. Now we prove that w

consistent => consisten
t: ~consistent => ~w

consistent (Modus Tollens): If
~consistent, then 

v an
d 

~v. Then 

v^~v so 

false.
But 

true so for any wff P we have


true v P so 

~
true => P so 

false =>
P. But 

false, so 

P for all P. Tha
t is, in an inconsistent system
everything is
provable. Now w

consistent me
ans there is no wff v such that
(aA)

v(A) and 

~(aA)v(A). But if
everyth
ing is provable, then any wf
f v
qualifies. So we are not w

consistent. Not
consistent is not w

consistent.
So w

consistent is consistent.
10. So just assume w

consistent and
we have (9) consistent, and (8)
incomplete. That is, IF LOGIC IS
W

CONSISTENT THEN IT IS INCOMPLETE.
VI.
G
ODEL’S 2ND. INCOMPLETENESS THEOREM

4
Godel’s 2nd. Incompleteness Theorem is # 4 above:
If the system is consistent, there is no proof within the system that the system is consistent.
Remember that CONS is the expression that is true iff the system is
consistent, that is, there are no
sentences that are both
provable and refutable, and G is the
Godel sentence that is true, not
provable
and not refutable.
Godel notes that
he has just proved that
,
CONS => G
Then we can prove this in the system itself,


(CONS => G)
which is equivalent to,
( 

CONS ) => ( 

G )
We also know,
~

G
So,
~( 

CONS)
Voila! (Or is it QED?)
Q3. Prove each step in the proof of Godel’s 2nd. Incompleteness Theorem.
VII.
TURING’S UNSOLVABILITY OF THE HALTING PROBL
EM
The Halting Problem is the problem of taking a Turing Machine (computer program) and its input and
determining if it will ever finish executing

as opposed to getting into some sort of loop where it just
goes
‘
round and
‘
round forever (until you pull
the plug.)
Assume you have a program HPS that solves the Halting Problem. Then HPS takes two inputs I and J,
and,
If program I with input J halts then halt YES.
If program I with input J doesn’t halt then halt NO.
Now construct a program NHPS as foll
ows:
1. Take in one input I.
2. Call HPS as a subroutine
with I for both its I and J,
and if the output is Halt YES, then go into a loop,
and if the output is Halt NO then just halt.
Now note what NHPS does:
If program I with input I halts then don’t h
alt.
If program I with input I doesn’t halt then halt.
Let this be program M. Now run M with M as its input:
If program M with input M halts then don’t halt.
If program M with input M doesn’t halt then halt.
Now note that this is M with input M. Ca
ll that program N. Then N does as follows:
If N halts then don’t halt.
If N doesn’t halt then halt.
Then if N halts then N doesn’t halt, and if N doesn’t halt then N does halt. Contradiction.
So program
HPS does not exist.
Charlie’s Proof
The Recu
rsion Theorem says that in every programming language we can have a special variable that is
equal to the current program that is executing. (That’s not how they say it, but it’s equivalent

just
using programming terminology.)
Call it SELF. Now consid
er the following program:
If HALT(SELF) then LOOP.
ELSE HALT.
Then this program halts iff it loops, and loops iff it halts, which is impossible. This if just program N
above.
VIII.
Beyond Turing: The Theory of Computation and Uniting Godel’s Logic & T
uring’s Computer
into One
Mathematicians have always looked for the ultimate system, that could solve every math problem by
simply applying some preset rules. Why not? There are rules to find the sum of any two numbers
(expressed in decimal notation) or
the solutions to any quadratic equation. Can we find rules that solve
any mathematical problem whatsoever? David Hilbert thought we could
.
After all, we have a fairly simple way to express almost any mathematical statement, or at least those
that deal
with only the
natural
numbers
{ 0, 1, 2, 3, . . . }
: the
Predicate
Calculus
(
First
Order
Logic
.)
Giuseppe Peano is credited with formally defining the natural numbers, addition and multiplication
with statements concerning their values in 1889. From this
we can write expressions that represent
Fermat’s Last Theorem and Golbach’s Conjecture. Hilbert would be satisf
ied if we can just have a way
to determine
if statements like these were true or not. Lots of famous, important, and hard to prove
statements
(conjectures and theorems) of Mathematics can be easily expressed.
B
ut as we saw in II, Godel showed that we cannot.
There are some sets for which there is no algorithm
to decide if a given number is in it. If there is such an algorithm, the set is call
ed
recursive
.
Furthermore, there are some sets for which there is no algorithm to list its elements. (If the set is
infinite, the algorithm just goes forever.) If we can list its elements, it is called
recursively
enumerable
.
The
Theory
of
Computation
is the branch of Computer Science that tries to determine:
1. Which sets are recursive?
2. Which sets are recursively enumerable?
3. What is the relationship between recursive and recursively enumerable?
Theorists eventually developed an infinite hierarc
hy of types of sets, including recursive, recursively
enumerable and beyond, called Kleene’s Arithmetic Hierarchy.
And both Logic and Computer Science
fall into the same levels. Using this scheme, we can show how theorem proving is just like running a
co
mputer program
–
it has the same power and can solve the same problems.
The fundamental relations are these. In each case, there is a parallel between the two sets:
1. a. Turing Machine x with input tape y halts after exactly z iterations.
b. Wff x
with y substituted for its one free variable is proven by proof number z.
2. a. Turing Machine x with input y eventually halts.
b. Wff x with y substituted for its one free variable is provable.
Set # 1 and its complement are both recursive and recur
sively enumerable. Set # 2 is recursively
enumerable but not recursive, while its complement is
not neither recursive nor recursively
enumerable. We can see that some sets are harder and harder to do anything with them!
Some basic theorems, where S and
T are any sets, ^ means “and”, and v means “or”:
1. If S is recursive then ~S is recursive.
2. If S is recursive then S is recursively enumerable.
3. If both S and ~S are recursively enumerable, then S is recursive.
4. If both S and T are recursively enu
merable, then S^T and SvT are recursively enumerable.
5. If both S and T are recursive, then S^T and SvT are recursive.
Q
4. Prove 1

5.
Church’s Thesis says that the only way we can list a set is to use a procedure that can be carried out by
a Turing Mach
ine. The recursively enumerable sets are those that can be listed by some Turing
Machine.
For any wff of Logic w(x) define the set { x  

w(x) }, that is, the set of values of x such that when we
substitute the value for x in wff w(x) the resulting stat
ement is provable. Consider all possible wffs
w(x) and the sets that they define this way.
Logic = Turing Machines: The sets that can be listed by a Turing Machine are the same sets that can be
defined
above
using Logic
and axiomatic theorem

proving
. Th
ese are the recursively enumerable sets
that we seek to understand.
Perhaps we will all get a chance to talk more about the Theory of Computatio
n and other branches of
the exci
ting world of Theoretical Computer Science at future meetings.
Charlie
Refere
nces:
www.
wikipedia
.org
Enter the password to open this PDF file:
File name:

File size:

Title:

Author:

Subject:

Keywords:

Creation Date:

Modification Date:

Creator:

PDF Producer:

PDF Version:

Page Count:

Preparing document for printing…
0%
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο