Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Hedman. A First Course in Logic, 2004 (Oxford)

.pdf
Скачиваний:
140
Добавлен:
10.08.2013
Размер:
7.17 Mб
Скачать

360

The incompleteness theorems

These axioms describe N completely and categorically. The first several axioms inductively define addition and multiplication and the final axiom states that induction works.

Proposition 8.1 Let M be a VN -structure. If each of the above axioms holds in M , then M is isomorphic to N.

Proof As a VN -structure, M contains an element that interprets the constant 1. We inductively construct an isomorphism f : N → M by sending 1 to this element and (n + 1) to the successor f (n) + 1 of f (n) in M (for each n N). If M satisfies the Induction Axiom, then the range of f must be all of the underlying set of M . It follows that f is an isomorphism.

It follows from this proposition that second-order logic does not have completeness. That is, we cannot hope to define second-order analogues for first-order resolution and formal proofs. Any such formal system would provide a systematic way to determine whether or not a sentence is a consequence of the above axioms and, hence, whether or not the sentence is true in N. By G¨odel’s First Incompleteness theorem (which we are presently taking on faith), there is no such algorithm.

It also follows from Proposition 8.1 that no first-order sentence nor set of first-order sentences can express the Induction Axiom. First-order theories are subject to the L¨owenheim–Skolem theorems and are incapable of describing an infinite structure such as N up to isomorphism. Although we cannot say “for all subsets S . . .” in first-order logic, we can say “for all definable subsets S . . .” For each VN -formula ϕ(x) in one free variable, let ψϕ be the VN -sentence

(ϕ(1) x(ϕ(x) → ϕ(x + 1)) → xϕ(x)).

Let Γind be the set of all such sentences ψϕ. This set of sentences is a first-order “approximation” of the Induction Axiom.

Definition 8.2 Let ΓN be the set of first-order sentences obtained from the above axiomatization by replacing the Induction Axiom with the set Γind.

By G¨odel’s First Incompleteness theorem, ΓN is incomplete. So these sentences do not describe the structure N up to elementary equivalence. However, the set ΓN is a natural fragment of TN to consider. This fragment is often referred to as Peano Arithmetic. We describe the di erence between TN and Peano arithmetic in terms of both VN -structures and VN - sentences.

Let M be a VN -structure. Then M interprets the VN -terms 1, 1+1, 1+1+1, and so forth. Denote the elements of M that interpret these terms as a1, a2, a3, and so forth. If M |= ΓN , then the function e : N → M defined by e(n) = an is an embedding. So any model of ΓN contains a substructure that is isomorphic

The incompleteness theorems

361

to N. In this sense, ΓN fully defines multiplication and addition on the natural numbers. Since ΓN is incomplete, some of its models contain elements beyond the natural numbers which exhibit behavior not witnessed in N. Whereas N can be embedded into every model of ΓN , it cannot be elementarily embedded into every model.

Since it is incomplete, there necessarily exists a V-sentence ϕ in TN that cannot be derived from ΓN . It should be clear from the previous paragraph that such a sentence ϕ cannot be atomic. In fact, it cannot be a Σ1 sentence (as defined in Section 7.6.2).

Proposition

8.3 If

ϕ(x1, . . . , xk)

is equivalent

to

a

Σ1

formula,

then

ΓN ϕ(tn1 , . . . , tnk ) if and only if N |= ϕ(n1, . . . , nk),

where, for each n

N,

tn denotes the VN -term 1

+ 1 + · · · + 1.

 

 

 

 

 

 

 

 

 

n

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

times

 

 

 

 

 

 

 

Proof Since

ΓN

TN ,

if

ΓN

ϕ(tn1 , . . . , tnk )

then

N |=

ϕ(n1, . . . , nk).

We must prove the converse of this. Suppose that N models ϕ(n1, . . . , nk). By completeness, it su ces to show that every model M of ΓN models ϕ(tn1 , . . . , tnk ). If this is true for some formula ϕ, then it is also true for any formula that is equivalent to ϕ. So we may assume that ϕ is in prenex normal form.

Case 1 ϕ is a ∆0 formula (as defined in Section 7.2).

We proceed by induction on the number of quantifiers in ϕ. Since it is ∆0, each quantifier is bounded. Let M be an arbitrary model of ΓN . If ϕ is quantifier-free, then M |= ϕ(tn1 , . . . , tnk ) since e : N → M (as defined above) is an embedding. Now suppose that ϕ has n + 1 quantifiers. Our induction hypothesis is that the proposition holds for any ∆0 formula having at most n quantifiers. To ease notation, suppose that ϕ has only one free variable x. If the first quantifier in ϕ is , then there exists a ∆0 formula ψ(x, y) having n quantifiers such that ϕ is equivalent to the formulay(y < x → ψ(x, y)), where y < x is an abbreviation for the VN -formulaz(y + z = x).

If N |= y(y < n → ψ(n, y)) for some n N, then N |= ψ(n, m) for each m < n, in which case

M |= ψ(tn, tm) for each m < n by our induction hypothesis.

It follows from the axioms in ΓN that M |= y < tn if and only if y = tm for some m < n. It follows that M |= y(y < tn → ψ(tn, y)) as we wanted to show.

Now suppose that the first quantifier in ϕ is . Then ϕ has the form (x, y) for some ∆0 formula ψ(x, y) having n quantifiers.

362 The incompleteness theorems

If N |= (n, y) for some n N,

then N |= ψ(n, m) for some m N, in which case

M |= ψ(tn, tm) by our induction hypothesis, and so M |= (tn, y). By induction, the proposition holds for any ∆0 formula ϕ.

Case 2 ϕ is a Σ1 formula.

By definition, ϕ is a Σ1 formula if it has the form for some ∆0 formula ψ. We have already considered such formulas in case 1. In the proof of case 1, we did not use the fact that the quantifier is bounded in ∆0 formulas. So our proof of case 1 also proves case 2.

In the final Section 8.5, we explicitly demonstrate a VN -sentence ϕ0 that is true in N but cannot be derived from ΓN . If we augment ΓN by adding ϕ0 as an axiom, then the result is still incomplete by G¨odel’s First Incompleteness theorem. There must exist a VN -sentence ϕ1 that is true in N that cannot be derived from ΓN 0}. Likewise, continuing in this manner, there exists a VN -sentence ϕn+1 that is true in N that cannot be derived from ΓN 0, ϕ1, . . . , ϕn} TN . Any decidable set of sentences in TN is necessarily incomplete. Contrapositively, any axiomatization of TN , such as TN itself, is necessarily undecidable.

8.2 The expressive power of first-order number theory

The reason that TN = T h(N) is undecidable is that so many subsets of N are VN -definable. In this section we prove that every recursive subset of Nn is a definable subset of N. Moreover, these sets are definable by a Σ1 formulas. The key to this immense expressive power is the fact that we can quantify over sequences of variable length. We demonstrate this idea with an example.

Example 8.4 Let n be a natural number. Let Sn be the subset of N consisting of those natural numbers that can be written as the sum of the squares of n primes. That is, x Sn if and only if there exists prime numbers q1, . . . , qn (not necessarily distinct) such that

x = (q1)2 + (q2)2 + · · · + (qn)2.

The set Sn is a definable subset of N. Recall the VN -formula prime(x) from the previous section. Let ϕn(x) be the VN -formula

n

z1 · · · zn prime(zi) (z1 · z1 + · · · + zn · zn = x) .

i=1

Clearly, ϕn(x) defines the set Sn.

The incompleteness theorems

363

Now consider the subset S of N2 consisting of the pairs of natural numbers (x, n) such that x Sn. That is (x, n) is in S if and only if x can be written as the sum of the squares of n primes. Let us attempt to find a VN -formula ϕS (x, y) that defines this set. The formula ϕS (x, y) must say that there exist prime numbers q1, . . . , qy such that x = (q1)2 + (q2)2 + · · · + (qy)2. The obstacle to writing such a formula is the phrase “there exist q1, . . . , qy.” It seems that the number y of existential quantifiers in this formula is determined by a free-variable of the formula itself! Later in this section, we show that we can overcome this obstacle and define the first-order VN -formula ϕS (x, y).

To define the set S from the previous example, the formula ϕS (x, y) must express that there exists a sequence of length y having certain properties. This is an example of what we mean by “quantifying over sequences of variable length.” Using S as an example, we demonstrate a technique for expressing the formula ϕS (x, y). We then use this technique to show that any recursive subset of N is definable.

To quantify over sequences of variable length, we encode the sequence. There are many ways to do this. The method we use encodes a given sequence as a triple of numbers l, m, and k. Any finite sequence of natural numbers uniquely defines its “code” [l, m, k]. Conversely, given l, m, and k, we can “decode” [l, m, k] to recover the original sequence. The coding and decoding process takes place within first-order number theory. This allows us to replace “there exists a sequence of length y such that. . .” with an expression of first-order number theory that begins “ l m k . . . .”

Given a finite sequence a¯ of natural numbers, the code for a¯ describes the sequence completely and categorically. The number m is the maximum number in the sequence and the number l represents the length of the sequence. To fully describe a particular sequence, we must provide more information. The number k completes the description. This number is more complicated than the maximum or the length of the sequence. We demonstrate k with some examples.

First we show how to decode a sequence.

Example 8.5 Suppose we are given the code [3, 5, 590]. This code represents a unique sequence of natural numbers a1, a2, a3. The first number of the code is the length of the sequence. The second number in the code tells us that one of the three numbers in the sequence is 5 and no number in the sequence is larger than 5. The third number k = 590 is the “key” to decoding the sequence a1, a2, a3. This key works as follows.

Let d be the least number bigger than m that is divisible by each number less than l + 1.

364 The incompleteness theorems

In our example, d = l! = 3 · 2 · 1 = 6.

The first number of the sequence is the remainder when k is divided by d+1.

In our example, 590 has a remainder of 2 when divided by 6 + 1 = 7 (590 = 84 · 7 + 2). So the first number of the sequence is a1 = 2.

The second number of the sequence is the remainder when k is divided by 2d + 1.

In our example, 2d + 1 = 13. Since 590 = 45 · 13 + 5, the second number is a2 = 5.

The third number of the sequence is the remainder when k is divided by 3d + 1.

In our example, 3d + 1 = 19. Since 31 · 19 = 589, the remainder a3 = 1. So [3, 5, 590] is the code for the sequence (2, 5, 1).

Next, we demonstrate how to encode a given sequence.

Example 8.6 Suppose we wish to encode the sequence (2, 8, 1). Clearly l = 3 and m = 8. We must find a key k for the encryption. To find k, we must think about how [3, 8, k] will be decoded. We want k to be such that

the remainder when k is divided by d + 1 is 2,

the remainder when k is divided by 2d + 1 is 8, and the remainder when k is divided by 3d + 1 is 1.

Recall from the previous example that d is the least number exceeding m divisible by each number less than l + 1. Since 3! = 6 and m = 8, d is equal to 12. We must find k such that the remainders when k is divided by 13, 25, and 37 are respectively 2, 8, and 1.

There is a systematic way to find such a number k. The first step is to get a calculator.

Let d1 = d+1, d2 = 2d+1, and d3 = 3d+1. Then k = a1b1d2d3 +a2b2d1d3 + a3b3d1d2, where the bis are defined as follows:

Let b1 be least such that b1d2d3 has remainder 1 when divided by d1.

In our example, d2d3 = 25 · 37 = 925. We must find the least multiple of 925 that has a remainder of 1 when divided by d1 = 13. By checking each multiple 925, 2 · 925, . . . , 12 · 925, we find that 7 · 925 = 6475 = 13 · 488 + 1 (the Euclidean algorithm works for this too). So b1 = 7.

Likewise, let b2 and b3 be least such that b2d1d3 has remainder 1 when divided by d2 and b3d1d2 has remainder 1 when divided by d3.

The incompleteness theorems

365

In our example, we must find the least multiple of 481 = d1d3 that has remainder 1 when divided by 25 = d2 and also the least multiple of 325 = d1d2 that has remainder 1 when divided by 37 = d3. Clearly, b2 = 21 and b3 = 23 since and 21 · 481 = 10101 = 404 · 25 + 1. and 23 · 325 = 202 · 37 + 1. (I confess, I am using a computer algebra system.)

Now that we know b1, b2, and b3, we can compute

k= a1b1d2d3 + a2b2d1d3 + a3b3d1d2

= 2 · 7 · 25 · 37 + 8 · 21 · 13 · 37 + 1 · 23 · 13 · 25 = 101233.

There is more than one value for k that works as a code for the sequence (2, 8, 1). What really matters is not the number k, but the remainder when k is divided by d1d2d3. In our example, since 101233 has a remainder of 5033 when divided by d1d2d3 = 12025, we can take k to be 5033, 101233, or any other number that has remainder 5033 when divided by 12025.

Whereas there exist more than one code for a sequence, the opposite is not true. There exists exactly one sequence for each code. The sequence (2, 8, 1) can be recovered by decoding either of the codes [3, 8, 5033] or [3, 8, 101233].

In the previous examples we have successfully coded sequences of length three using only three numbers l, m, and k. This is not too impressive. However, any finite sequence can be coded in a similar manner. Regardless of the length of the sequence, the code requires only the three numbers l, m, and k. In the remainder of this section, we first show that the technique described in these examples works and, secondly, use this technique to write VN -formulas to define the set S from Example 8.4 and other subsets of Nn.

We view the coding process as a computable function. Given any finite sequence of natural numbers as input, this function outputs the code [l, m, k]. As was pointed out in Example 8.6, there exists more than one code for each sequence. To make it a function, we restrict the output to the code that has the smallest value for k. To verify that our coding technique works, we must show that this function is defined for all finite sequences of natural numbers and that it is one-to-one. That is, we must show that every finite sequence has a code and no two sequences have the same code.

Let us again walk through the coding process. Given a sequence (a1, . . . , al), let l be the length of the sequence and let m be the largest ai in the sequence. Let d be the least number exceeding m divisible by each number less than l + 1. Clearly, such d is uniquely defined. We must find k such that k has remainder ai when divided by di = i · d + 1 (for each i = 1, . . . , l). To obtain the smallest value for k, let k1 be the remainder when k is divided by d1 · d2 · · · · · dn. Output [l, m, k1] as the code for (a1, . . . , al). The only step of this process that requires verification is the existence of k. For this we use the Chinese Remainder theorem.

366

The incompleteness theorems

Definition 8.7 A set of natural numbers {d1, d2, . . . , dl} is said to be relatively prime if, for 1 ≤ i < j ≤ l, there is no number that divides both di and dj other than 1.

The Chinese Remainder theorem Let {d1, . . . , dl} be a relatively prime set of natural numbers. Let (a1, . . . , al) be a sequence of natural numbers with ai ≤ di for i = 1, . . . , l. There exists k N such that when k is divided by di, the remainder is ai for each i = 1, . . . , l. Moreover, there exists a unique such k that is less than d1 · d2 · · · dl.

Proof idea The idea behind the proof was demonstrated in Example 8.6. The following formula computes k:

k = a1b1D1 + a2b2D2 + · · · + anbnDn,

where Di = (d1 · d2 · · · dn)/di and bi is least such that biDi has remainder 1 when divided by di. The existence of bi follows from the fact that the set {d1, . . . , dn} is relatively prime. Note that di divides Dj for i =j. So k has the same remainder as aibiDi when divided by di. By design, biDi has remainder 1. So aibiDi has remainder ai · 1 when divided by di.

For a detailed proof, the reader is referred to any book on elementary number theory such as [19].

Proposition 8.8 For any l and d in N, if d is divisible by each number less than l +1, then {d+1, 2·d+1, . . . , l ·d+1} is a relatively prime set of natural numbers.

Proof Consider di = i · d + 1 and dj = j · d + 1 for 1 ≤ i < j ≤ l. Let p divide both di and dj . We want to show that p = 1.

Claim p divides d.

Proof Since p divides both di and dj , p divides dj − di = j · d − i · d = (j − i)d. It follows that either p divides d or p divides (j − i). Note that (j − i) < l. By assumption, (j − i) divides d. This proves the claim.

Since p divides d, it also divides i · d. Since p divides di, it also divides di − i · d = 1. It follows that p = 1.

Corollary 8.9 Every finite sequence of natural numbers has a code [l, m, k]. Moreover, no two sequences have the same code.

Proof Any finite sequence has a length l and a maximal entry m. The existence of k follows from the previous proposition, which allows us to apply the Chinese Remainder theorem.

To see that no two sequences have the same code, consider the decoding process described in Example 8.5. To decode [l, m, k] we first find d, the least number greater than m divisible by each number less than l + 1. Clearly, such a number exists and is unique. We then divide k by d + 1, 2 · d + 1, . . . , l · d + 1

The incompleteness theorems

367

and take the remainders as the sequence a1, . . . , al. Since these remainders are uniquely determined, so is the sequence a1, . . . , al.

So the process we have described for coding finite sequences works. We next show that this process can be translated into the language of first-order number theory. The following table translates some key phrases:

To say

Use the VN -formula

Denoted by

x is smaller than y

z(x + z = y)

x < y

x is not bigger than y

x < (y + 1)

x ≤ y

x divides y

z(x · z = y)

div(x, y)

y is divisible by each

z(z ≤ x → div(z, y))

D(x, y)

number less than x + 1

 

 

y divided by x has

(z < x)

 

remainder z

q(y = q · x + z)

rem(x, y, z)

 

The VN -formula rem(x, y, z) is the graph of a function. Given any x and y, there is at most one z that satisfies rem(x, y, z). Let Rem(x, y) represent this function. That is

z = Rem(x, y) is defined by w(rem(x, y, w) z = w).

Definition 8.10 Let f : Nk N be a k-ary function on the natural numbers. We say that f is definable if there exists a VN -formula ϕf x, y) such that

f a) = b if and only if N |= ϕf a, b).

We say that f is defined by ϕf x, y).

We now show that we can decode sequences within first-order number theory.

Proposition 8.11 Let code (l, m, k, i) be the ith element in the sequence obtained by decoding [l, m, k]. This function is definable.

Proof Let ϕ(x, l, m) be the VN -formula x > m D(l, x). Let δ(x, l, m) be the VN -formula

ϕ(x, l, m) z(z < x → ¬ϕ(z, l, m))

saying that x is least such that ϕ(x, l, m) holds. That is, δ(x, l, m) says that x = d. The function code(l, m, k, i) = z is defined by

(i ≤ l) d(δ(d, l, m) z = Rem(k, i · d + 1)).

368 The incompleteness theorems

Next, we define a VN -formula seq(l, m, k) that says [l, m, k] is the code for a finite sequence. If we randomly choose the numbers, l, m, and k, then [l, m, k] will probably not be a code. For example, consider [2, 9, 24]. Since l = 2 and m = 9, d = 10. We have a1 = Rem(24, 10 + 1) = 2 and a2 = Rem(24, 20 + 1) = 3. Since the maximum entry of the sequence (a1, a2) is 3 and not 9, [2, 9, 12] is not a code for this sequence. Since [2, 9, 12] is not the code for (2, 3), it is not the code for any sequence. To say that [l, m, k] is the code for a sequence, we must say that m is the maximum number in the sequence obtained by decoding [l, m, k].

Proposition 8.12 There exists an VN -formula seq(x, y, z) such that N |= seq(l, m, k) if and only if [l, m, k] is the code for some sequence.

Proof Let seq(l, m, k) be the formula

i(i ≤ l → code(l, m, k, i) ≤ m) i(i ≤ l code(l, m, k, i) = m)).

Example 8.13 We now define the formula ϕS (x, y) from Example 8.4. We want

to say there exist primes q1, . . . , qy such that q12 + q22 + · · · + qy2 = x. To do this, we say there exists the sequence (a1, . . . , ay) defined as the partial sums

a1 = q12, a2 = q12 + q22, . . . , ay = q12 + q22 + · · · + qy2

and that x = ay. Let ps(x) be the VN -formula

z(prime(z) z · z = x)

saying that x is a prime number squared and let psd(x, y) be the VN -formula

z(x + z = y ps(z))

saying that the di erence y − x is the square of a prime number. Let ϕS (x, y) be the VN -formula

m k l(seq(m, k, l) ps(a1) i(i < y → psd(ai, ai+1)) x = ay),

where an is an abbreviation for code(m, k, l, n).

We are now able to show that every recursive subset of N is Σ1. We first show that every recursive function on the natural numbers is definable by a Σ1 formula.

Proposition 8.14 Let f : Nn N be an n-ary function on the natural numbers. If f is recursive, then f is definable by a Σ1 formula.

Proof By Exercise 7.7, it su ces to prove this for the 1-recursive functions on N. These are the function generated by composition, primitive recursion, and unbounded search from the constant function c1(x) and the basic functions s(x)

The incompleteness theorems

369

and pni (x1, . . . , xn) from Section 7.1. By the definitions of these functions:

s(x) = y is defined by the VN -formula y = x + 1, c1(x) = y is defined by the VN -formula y = 1, and

pni (x1, x2, . . . , xn) = y is defined by the VN -formula y = xi.

Now suppose that f is a composition of functions:

f (x1, . . . , xn) = h(g1(x1, . . . , xn), . . . , gm(x1, . . . , xn)).

Suppose further that the m-ary function h is defined by a Σ1 formula ϕh(x1, . . . , xm, y) and, for each i = 1, . . . m, the n-ary functions gi is defined by a Σ1 formula ϕgi (x1, . . . , xn, y). Then f is defined by the Σ1 formula

m

z1 · · · zm ϕgi (x1, . . . , xn, zi) ϕh(z1, . . . , zm, y) .

i=1

Next suppose that f is obtained from functions h and g by primitive recursion:

f (1, x2, . . . , xn) = g(x2, . . . , xn),

f (x1 + 1, x2, . . . , xn) = h(x1, . . . , xn, f (x1, . . . , xn)).

We must show that if both g and h are definable by Σ1 formulas, then so is f . For this, we must quantify over sequences of variable length.

Suppose that g and h are defined by ϕg(x2, . . . , xn, y) and ϕh(x1, . . . , xn, xn+1, y). To find ϕf (x1, . . . , xn, y), consider how to compute f (z, x2, . . . , xn) for given z and tuple x2, . . . , xn. We first compute

f (1, x2, . . . , xn) = g(x2, . . . , xn) = a1.

We then use a1 to compute

f (2, x2, . . . , xn) = h(1, x2, . . . , xn, a1) = a2.

We then use a2 to compute

f (3, x2, . . . , xn) = h(2, x2, . . . , xn, a2) = a3,

and so forth. We generate the sequence a1, a2, . . . where each ai equals f (i, x2, . . . , xn). The formula ϕf (z, x2, . . . , xn, y) says that there exists such a sequence of length z and y is the last number in the sequence. That is, y = az. More explicitly, let ϕf (z, x2, . . . , xn, y) be the formula

l m k(seq(l, m, k) z = l ϕg(x2, . . . , xn, a1)

i(i < y → ϕh(i, x2, . . . , xn, ai, ai+1)) y = az),