The Gödel incompleteness theorems are closly linked with computability theory. Not much computability theory is required to understand the connection, but this connection is best seen when one relates the idea of formulas to the idea of recursively enumerable sets (also sometimes called computably enumerable sets). This page reviews a small amount of computability theory and sets out the connection.
Computability theory identifies an informal intuitive idea of what it
means for a fuction or set to be computable with a precise machine model
for computability, such as Turing machines or register machines. The fact
that there are so many machine models known that capture the same notion
computable can be taken a evidence that the intuitive idea is
indeed accurately captured by these models. Here I will take the idea
register machine, as it is a little more convenient for our
purposes. The energetic reader will be able to verify that the register
machine model does indeed correspond whith his/her favourite model,
be it Turing machines, the lambda calculus, Kolmogorov machines, or whatever.
A register machine has a finite number of registers each of which is capable of storing a natural number. It has a program which is a finite list of instructions labelled . Each instruction is of the type
In both cases, the next instruction to be execute is the next one on the list, ,
is performed. There is a last instruction, and if this last
instruction is performed without any
clause being executed then the machine
instead of attempting to execute the next instruction (which doesn't exist) simply halts.
A register machine computes a total function if, for all , whenever it is started with containing and all other registers zero it eventually halts with in . Similarly, it computes a partial function (i.e. a function where ) if, for all , whenever it is started with containing and all other registers zero, if is defined (i.e. ) then it eventually halts with in and if is not defined (i.e. ) then it goes on for ever.
We can modify the definition just given to computing (total or partial) functions of several arguments by just requiring that contain the arguments of .
A (total or partial) function is computable or recursive if it can be computed by a register machine.
In the theory, total recursive functions
and partial recursive functions behave quite differently
recursive function is reserved to mean
total recursive function,
partial if applicable being never omitted.
If its charactistic function is the total function with . A register machine computes the set if and only if it computes the characteristic function . Similarly for , is defined by and is computed if and only if is. A set that is computed by some register machine is called computable or recursive.
There is a weaker notion of computability that is also important.
A set is recursively enumerable or r.e. if either it is empty or there is a (total) computable function such that is the range of .
Show that that a set is r.e. if and only if there is a register machine which when started with in and all other registers zero then the machine halts if and only if , and that this holds if and only if the partial function is partial recursive.
A set is co-r.e. if its complement is r.e.
A set is recursive if and only if it is both r.e. and co-r.e.
There is a convincing informal argument that says that this
notion of computability really does capture the
intuitive idea. This argument is due to Turing, for the idea
of computability defined using Turing machines, but it can
be adapted to register machines by simply showing how to simulate
an arbitrary Turing machine by a register machine. The statement
that this notion of computability is correct is known as
Church's thesis or the Chruch-Turing thesis.
The main theorem here says that a set is r.e. if and only if it is defined by a formula and is co-r.e. if and only if it is defined by a formula. If we are to prove statements like this we must start by finding ways of expressing complicated predicates as formulas. This is how we start. The key result is due to Gödel and is often called the -function lemma. It expresses the well-known fact that there is an injection from finite sequences of naturals to naturals, but the twist is that Gödel shows how to do this in such a way that the inverse map can be described by a formula.
We start first with something a little simpler.
Show that the function
is a bijection .
This function is (for obvious reasons) called the pairing function. Note that if then and the statement is quantifier free, so is certainly .
for . This formula is clearly and says that is the remainder on dividing by .
It is true (i.e. in ) that . This statement is not however provable in .
For , we let be
There is a formula defining and for any and sequence of length there is such that .
There are a number of possible proofs of this. The original and perhaps the simplest uses the Chinese Remainder Theorem.
If are positive integers and pairwise coprime and is for each then there is such that for each .
Given , , let and . So for , if is prime and and then and for some with , so hence divides . If divides then divides and hence since it also divides . So . In particular so divides and once again this means equals . Thus there is no such prime and the moduli are coprime for . Also for all such , so by the Chinese Remainder Theorem there is with for all .
Put and we are finished, the formula being
In particular for a sequence the map defines an injection , where is the length of and is the least natural number such that .
The link with computability comes with the following consequence of Gödel's -function lemma.
Suppose is a partial recursive function. Then there is a formula such that for all holds if and only if .
The proof is by describing the action of a register machine using the function.
Given a register machine using registers we consider a formulas starting where is the contents of at time , is the index of the next instruction to be performed at time , and is the total time of the computation. Then the entire computation can be described in a way with formulas such as
and for all other , quantified over all .
A set is r.e. if and only if it is defined by a formula. is co-r.e. if and only if it is defined by a formula.
It follows that a set is recursive iff it is simultaneously defined by both a formula and a formula.
Find a recursive set that is not definable by a formula. Hint: show that the set of , such that is the Gödel-number of a sentence and is true, is recursive.