222 Lecture 33
G¨odel Numberings
There are only countably many partial recursive functions, because there
are only countably many Turing machines (or C programs, or λ-terms, or
µ-recursive functions, ... ). An enumeration
ϕ
0
,ϕ
1
,ϕ
2
, ...
of the partial recursive functions is called a G¨odel numbering or acceptable
indexing if it satisfies three properties:
(i) Every partial recursive function is ϕ
i
for some i.
(ii) The universal function property: There is a partial recursive func-
tion U such that for all i and x,
U(i, x)=ϕ
i
(x).
(iii) The s
m
n
property: There exist total recursive functions s
m
n
such that
for all i, x
1
,... ,x
n
, y
1
,... ,y
m
,
ϕ
s
m
n
(i,x
1
,... ,x
n
)
(y
1
,... ,y
m
)=ϕ
i
(x
1
,... ,x
n
,y
1
,... ,y
m
).
The number i is called a G¨odel number or index for the function ϕ
i
.
Although the index i is just a number, it is convenient to think of i
as a description of an algorithm or machine to compute the function ϕ
i
.
For example, i might encode some Turing machine to compute ϕ
i
,oraC
program, or something similar. The exact form depends on the particular
indexing, and we are not so concerned with the exact form as we are with
the properties (i)–(iii). All we really care about is that each partial recursive
function has at least one index (property (i)), that it is possible to simulate
functions uniformly given their indices (property (ii), the universal function
property), and that it is possible to hard-code part of the input into the
program (property (iii), the s
m
n
property).
For example, let us take the indexing provided by Turing machines.
Writing i as a binary string, we might interpret i as an encoded description
of a Turing machine; see [61, 76] for such an encoding of a very specific
form. Any number whose binary representation does not encode a Turing
machine according to this scheme can be taken as an index of a trivial one-
state Turing machine. Because every partial recursive function is computed
by a Turing machine, and because every Turing machine has a description
that can be encoded as a binary number, property (i) holds. Because there is
a universal Turing machine that can take a description of another machine i
and an input x and simulate the machine with description i on x, property
(ii) holds. Finally, because it is possible to code parts of the input to a