Docsity

The Gödel Incompleteness Theorems Lecture Notes, Lecture notes of Physics

Partial preview of the text

Download The Gödel Incompleteness Theorems Lecture Notes and more Lecture notes Physics in PDF only on Docsity!

THE G ¨ODEL INCOMPLETENESS THEOREMS

R. W. Knight

Hilary 2021

ABOUT THE LECTURE NOTES

Under normal circumstances, these notes would be my script for in-person lectures, which would be fleshed out by ad libs, questions and comments from the audience, extra diagrams, digressions and so forth. This year none of that is possible. I’m trying to supply some of that extra material in the videos. The biggest thing missing is you, the audience. As a very distant second-best, you can email me comments, questions, requests for clarification etc., and I will try to respond as quickly as I can (but I’m afraid that sometimes, that may not be very). The videos will not be a read-through of the notes. I intend in the videos to concentrate on the parts that I think are most difficult, passing over some of the easier stuff. The tone of the videos will also be less formal than that of the notes, and they will concentrate on trying to get over the intuitions and some of the motivation. It looks as though they are going to end up taking less time than the lectures would have done, possibly partly because I would have said absolutely everything at least once and probably as much as three times (before writing it out, while writing it, and afterwards), and would in addition have talked while waiting for people to finish writing up whatever they were writing. I hope you find these notes, and the videos, useful. Please, as I say, get in touch if you have any questions. I will continue to edit this document throughout the term. (I ended last year’s lectures wanting to make substantial changes. Then the pandemic hit... I hope to make at least some changes to improve the notes, all the same.) Latest edit: 18th January 2021.

0. Introduction

We will usually assume that the semiring (N, 0 , 1 , +, ·) exists and has the usual familiar properties (from which it will follow that various axiom systems for it are consistent, since they have a model). I assume familiarity with the Completeness Theorem of first-order logic; so when I prove a statement such as S ⊢ φ (φ is formally provable from assumptions S) I will on the whole not provide a formal proof of φ from S; I will instead argue that such a formal proof exists (which is quite different and much easier). I also assume some skill in distinguishing language from metalanguage and theorems from metatheorems. These lectures are based on lecture notes by Dan Isaacson, and on Raymond Smullyan’s book G¨odel’s Incompleteness Theorems (OUP, 1992). However, I sometimes depart (in no- tation or in other respects) from both sources.

1. A formal language for arithmetic

1.1. The language itself

We choose a formal language to make G¨odel numbering more straightforward.

Definition 1.1.1. The symbols of the language LE are:

0 +^ v f ′^ ( ) ¬ → ∀ = ≤ #

An expression in LE is any finite, non-empty sequence of symbols of L that does not begin with +.

The rules of syntax are as follows.

Definition 1.1.2. The terms of L (^) E are defined as follows. 0 is a numeral term, and if σ is a numeral term, then so is σ+. We will write 0 followed by n +’s as n. v is a variable term, and if τ is a variable term, then so is τ ′. If n is a natural number (including zero), then we’ll write vn for v followed by n ′’s. The function labels are f , f ′, and f ′′. A term is a numeral term, a variable term, an expression σ+^ where σ is a term, or an expression (τ σ υ), where σ is a function label and τ and υ are terms.

Definition 1.1.3. LE contains the following formulae. An atomic formula is an expression σ = τ or σ ≤ τ , where σ and τ are terms. Other formulae are: ¬φ, (φ → ψ), ∀x φ, where φ and ψ are formulae, and x is a variable term.

We sometimes write (φ ∨ ψ) for (¬φ → ψ), (φ ∧ ψ) for ¬(¬φ ∨ ¬ψ), (φ ↔ ψ) for ((φ → ψ) ∧ (ψ → φ)), and ∃x φ for ¬∀vi ¬φ, where φ and ψ are formulae, and vi is a variable term.

Definition 1.1.4. L is the sublanguage of LE containing no occurrences of f ′′.

1.2. Logical rules

Given the Completeness Theorem of first-order Predicate Calculus, it does not much matter which system of axioms and logical rules we use. We choose to use one which makes it easier to prove the (meta)theorems we want to use (but which is also difficult to use for constructing formal proofs). So, we use the following axiom schemes:

Definition 1.2.1. The logical axioms are all instances of the following schemata, where φ, χ and ψ may be any formulae: (A1) (φ → (χ → φ)) (A2) ((φ → (χ → ψ)) → ((φ → χ) → (φ → ψ))) (A3) ((¬φ → ¬χ) → (χ → φ)) (A4) (∀vi φ(vi) → φ(t)), where vi is a variable letter and t is a term which can be sensibly substituted for vi, that is, it contains no variable letter vj such that vi occurs free in φ in the scope of a quantifier ∀vj , (A5) (∀vi (φ → χ) → (φ → ∀vi χ)), for vi a variable letter, provided vi does not occur free in φ. (A6) ∀vi (vi = vi) (A7) If F and G are atomic formulae, where G is obtained from F by replacing some, but not necessarily all, occurrences of vi by vj , then ((vi = vj ) → (F → G)).

Definition 1.2.2. The rules of inference are the following, where φ and χ are any formulae and x is any variable letter: (MP) Modus Ponens: that is, from φ and φ → χ deduce χ (Gen) Generalisation: from φ deduce ∀vi φ.

Definition 1.2.3. If Γ is a (possibly empty) set of formulae, and φ is a formula, we say that φ can be proved from Γ, and write Γ ⊢ φ, if and only if there exists a finite sequence φ 1 ,... , φn of formulae such that φn = φ, and for each i, φi is an element of Γ, or a logical axiom, or else it is deduced from previous members of the sequence using a rule of inference.

We will need to refer to the details of the system occasionally.

1.3. Interpretation

We will usually interpret L as applying to the semiring (N, 0 , 1 , +, ·), where 0 is interpreted as referring to 0, +^ as referring to the successor function n 7 → n + 1 (so that n refers to n), and the function symbols f , f ′^ as referring, respectively, to addition and multiplication; and we interpret LE as referring to the expansion obtained by adding the exponentiation operation, when f ′′^ will refer to exponentiation. For terms σ and τ , we normally rewrite (σ f τ ) as σ + τ , (σ f ′^ τ ) as σ.τ , and (σ f ′′^ τ ) as στ^. We will normally define truth with respect to this interpretation, though we will sometimes remember to say “true in N” to make this a little clearer. We will occasionally refer to other interpretations.

Definition 1.3.1. A subset A of Nk^ is definable if and only if there exists a for- mula φ(v 1 ,... , vk) with only v 1 ,... , vk free, such that φ(n 1 ,... , nk) is true if and only if

2.2. G¨odel numbering

Notation 2.2.1. We will from time to time write numbers in base 13. When we do that, we will use the symbol A to refer to ten, B to refer to eleven, and C to refer to twelve. When confusion is likely, we’ll use a subscript 13 to indicate that a number is to be read in base 13, and 10 to indicate that it should be read in base 10.

The alphabet of L has thirteen symbols, and we will assign numbers 0 to 12 to them. A string has a G¨odel number, which is got by replacing each symbol by a digit in the set 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , A, B, C, and then interpreting the result as a number in base 13. (Thirteen is convenient partly because it’s prime, and partly because with more sym- bols, it’s easier to work out how to write stuff. We could get away with two symbols, by representing each of the above thirteen symbols by a different string of four 0’s and 1’s.) More formally:

Definition 2.2.2. G¨odel numbers are assigned to the symbols of the language LE as follows:

  • (^0) ( ) f ′ (^) v ¬ → ∀ = ≤ # 0 1 2 3 4 5 6 7 8 9 A B C

—where all numbers are to be red in base 13. If s is a symbol of LE , then its G¨odel number may be written as psq. The G¨odel number of an expression of LE is obtained by writing the G¨odel numbers of the individual symbols in order, and reading the result in base 13; that is, if φ = s 0 s 1... sr, where the si are symbols of L and s 0 is not +, then:

pφq =

ps 0 qps 1 q... psrq

One can quickly convince oneself that ( ps 0 qps 1 q... psrq

13 =^ ps^0 q^13

r (^) + ps 1 q^13 r− (^1) + · · · + ps rq.

Definition 2.2.3. The G¨odel number of a term or formula is defined as in the previous definition. The G¨odel number of a sequence of terms or formulae is obtained by separating the formulae by #, so that

p(φ 1 ,... , φk)q = p#φ 1 #φ 2 #... #φk #q.

NOTE: All we really require of our system of G¨odel numbering is that there should exist a definable (in LE ) function ◦ such that pφψq = pφq◦pψq, and such that the function n 7 → pnq is definable. We commit the abuse of using symbols such as x, y, m, n and so forth for v 0 , v 1 and so forth.

2.3. The arithmetic hierarchy

We classify formulae in prenex normal form according to the string of quantifiers at the front.

Definition 2.3.1. A bounded quantifier is of the form ∃m ≤ n or ∀m ≤ n (strictly not in our language, but ∃m ≤ n φ can be expressed by ∃m (m ≤ n ∧ φ), and ∀m ≤ n φ can be expressed by ∀m (m ≤ n → φ).)

Definition 2.3.2. A formula is Σ 0 , Π 0 , or ∆ 0 , if it contains no unbounded quantifiers. If φ is Σn, then ∀m φ is Πn+1, and if φ is Πn, then ∃m φ is Σn+1. We say that a formula φ is provably Σn (or) Πn if there is a formula φ′^ which is respectively Σn or Πn, such that φ ↔ φ′^ is a theorem. If S is a set of axioms, then we say φ is provably Σn or Πn with respect to S if there is a formula φ′^ which is respectively Σn or Πn, such that S ⊢ φ ↔ φ′. If φ is provably Σn and provably Πn, then we say that it is ∆n; similarly with ∆n with respect to S.

We often omit the word “provably”.

Example 2.3.3. As an example, (¬m ≤ n ∨ ∃k m + k = n) is not Σ 0 , but is provably Σ 0 , since it is provably equivalent to ∃k ≤ n (¬m ≤ n ∨ m + k = n).

2.4. Results concerning expressibility

Definition 2.4.1. A set T of expressions of LE is definable if and only if there exists a formula φ(x) such that φ(pψq) is true if and only if ψ belongs to T. If S is a set of sentences of LE , and T is a set of expressions, we will say that T is provably definable from S if for some formula φ, φ(pψq) is provable from S if and only if ψ belongs to T , and ¬φ(pψq) is provable from S if and only if ψ does not belong to T.

Definition 2.4.2. A property φ of natural numbers or of finite sequences of natural numbers is expressible iff the set {n : φ(n)} is definable.

Proposition 2.4.3. Any finite set of expressions is definable, and is indeed provably definable (from ∅).

Lemma 2.4.4. Express m < n as m ≤ n ∧ ¬m = n. This is Σ 0. m | n is provably Σ 0. Write [m, n] for 12 (m + n + 1)(m + n) + m. The function (m, n) 7 → [m, n] is a bijection between N × N and N, and is provably Σ 0.

Lemma 2.4.5. The n alternating blocks of quantifiers in a Σn or Πn formula can be of any length.

Proof: Problem sheets. 

Lemma 2.4.6. The statement that r is the largest number such that 13 r^ ≤ n is expressible in Σ 0.

Proof: We express it as follows: 13 r ≤ n ∧ ¬ 13 r+ ≤ n. 

Lemma 2.4.7. The statement that n is the result of concatenating k and l is expressible in Σ 0.

or is derived from previous terms in the sequence using the successor function, addition, multiplication, or exponentiation”; and then quantifying over values k such that n occurs, or doesn’t, in the associated string. Let Φ(k, n) express the conjunction of the following, in which I will indicate from time to time that certain numbers are ≤ k, in order to emphasise that this can be expressed in Σ 0.

  1. p##q does not occur as a part of k.
  2. The first digit and last digit of k are both #.
  3. The number obtained by concatenating p#q, n and p#q in that order occurs as a part of n.
  4. Suppose that l ≤ k is an initial part of k, and that the concatenation of p#q, r ≤ k and p#q is a final part of l, where p#q is not a part of r. Then one of the following must be true. 4i. r is the G¨odel number of a numeral term. 4ii. r is the G¨odel number of a variable term. 4iii. There exists a number ≤ k which is a part of l, and is the concatenation of p#q, s ≤ k and p#q, where p#q is not a part of s and r = 13.s (ie. r can be obtained from s by putting +^ on the end). 4iv. For i = 1, 2, there exists a number ≤ k which is a part of l, and is the concate- nation of p#q, si ≤ k and p#q, where p#q is not a part of si, and r is the concatenation of p(q with s 1 , one of pf q, pf ′q or pf ′′q, s 2 , and p)q. Now we can express the notion “n is the G¨odel number of a term” as ∃k Φ(k, n), which is Σ 1. Now we observe that for any given n we can calculate (based on the number of digits in n) a number K such that if there exists k such that Φ(k, n), then some such k must exist such that k ≤ K. We reason as follows. The number of substrings of n is 12 n(n − 1) < n^2 , and they all have length no greater than that of n itself. The length of n is around log 13 n and is definitely no greater than n. A total of n^2 strings of length n, with n^2 + 1 #’s added, has length n^2 (1 + n) + 1. A number whose base 13 representation has that length, must be

less than 13 × 13 n

(^2) (1+n)+

. So let K(n) = 132+n

(^2) (1+n) (which is expressible in Σ 0 ). Then we can express “n is the G¨odel number of a term” by ∀m (m ≥ K(n) → ∃k ≤ m Φ(k, n), which is Π 1. 

Lemma 2.5.6. The notion “n is the G¨odel number of an atomic formula” is expressible in ∆ 1.

Proof: We say the following: there exist k ≤ n and l ≤ n such that k and l are the G¨odel numbers of terms, and n is the concatenation of k, one of p=q or p≤q, and l. 

Lemma 2.5.7. The notion “n is the G¨odel number of a formula” is expressible in ∆ 1.

Proof: Similar to the corresponding argument for terms. 

Lemma 2.5.8. The notion “n is the G¨odel number of a logical axiom” is expressible in ∆ 1.

Proof: We express “n is the G¨odel number of an instance of (A1), or of (A2),... , or of (A7)”. For most of the schemata (Ai), it is fairly straightforward, and we give (A1) as an example. We express “n is the G¨odel number of an instance of (A1)” by: there exist k, l ≤ n such that k and l are the G¨odel numbers of formulae, and n can be obtained by concatenating, in this order, p(q, k, p→ (q, l, p→q, k, and p))q. The most important exception is (A4). We approach this cautiously. First, we express the notion “k is the G¨odel number of a term t such that whenever vj occurs in t, vi never occurs free in the formula φ in the scope of a quantifier ∀vj ”. We express it as the conjunction of the following two statements:

  1. k is the G¨odel number of a term.
  2. Suppose that j ≤ k and there exist m 1 and m 2 , which are the G¨odel numbers of expressions such that k = m 1 apvj qam 2 (here using a^ to indicate concatenation). Then the following never happens: there exist m 3 and m 4 which are the G¨odel numbers of expressions such that pφq = m 3 apviqam 4 (so vi occurs in φ at a particular location); there do not exist m 5 , m 6 , m 7 and m 8 such that m 3 = m 5 am 6 and m 4 = m 7 am 8 and m 6 apviqam 7 is the G¨odel number of a formula beginning with ∀vi (so, that occurrence of vi is free), while there do exist m 9 , m 10 , m 11 and m 12 such that m 3 = m 9 am 10 , m 4 = m 11 am 12 , m 10 apviqam 11 is the G¨odel number of a formula beginning ∀vj (so, that occurrence of vi is inside the scope of a ∀vj ). Now we define the relation Φ(φ, ψ) to hold if and only if for some formula θ, φ = ∀vi θ, and ψ = θ(t). We can define this by recursion. We say that Φ(φ, ψ) holds in any of the following cases.
  3. φ = ∀vi vi ≤ 0, then ψ = t ≤ 0; and similarly for the various other atomic formulae.
  4. φ = ∀vi ¬φ 1 and ψ = ¬ψ 1 , where Φ(∀vi φ 1 , ψ 1 ) holds.
  5. φ = ∀vi (φ 1 → φ 2 ) and ψ = (ψ 1 → ψ 2 ), where Φ(∀vi φ 1 , ψ 1 ) and Φ(∀vi φ 2 , ψ 2 ) hold.
  6. φ = ∀vi ∀vi φ 1 and ψ = ∀vi ψ 1 , where ψ 1 = φ 1.
  7. For j 6 = i, φ = ∀vi ∀vj φ 1 and ψ = ∀vj ψ 1 , where Φ(∀vi φ 1 , ψ 1 ) holds. Now we say that the sequence ((θ 1 , χ 1 ), (θ 2 , χ 2 ),... , (θr, χr)) witnesses Φ(θ, χ) if θ = θr, χ = χr, and for each i, Φ(θi, χi) holds, and either χi is atomic, or the recursive definition of the relation Φ for θi and χi refers to pairs (θj , χj ) earlier in the sequence. Now we use the same ideas as in the proof of Lemma 2.5.5. We can express the stat- ment “n is the G¨odel number of an expression ##θ 1 #χ 1 ##θ 2 #χ 2 ## · · · ##θr#χr ## such that the sequence ((θ 1 , χ 1 ),... , (θr, χr)) witnesses Φ(θ, χ)” in complexity ∆ 1 , and because we can provide a bound for the shortest length of a sequence witnessing Φ(θ, χ) in terms of the G¨odel numbers of θ and χ, we can express “there exists S such that S codes a sequence witnessing Φ(θ, χ), where k = pθq and l = pχq” in complexity ∆ 1. Now, to express that n is the G¨odel number of an instance of (A4), we need to say: “there exist k, l, m ≤ n such that k is the G¨odel number of a formula ∀vi φ, l is the G¨odel number of a formula χ, the relation Φ(∀vi φ, χ) holds, whenever vj occurs in t, vi does not occur free in φ in the scope of a quantifier ∀vj , and

n = p(qakap→qalap)q”.

2.6. PA and PAE are definable

Notation 2.6.1. Suppose φ(v 1 ) is a formula, and σ is a term.

Then we write ∀v 1 (v 1 = σ → φ(v 1 )) as φ[σ], and note that it is provably equivalent to φ(σ).

Note that pφ[σ]q = p∀v 1 (v 1 =qapσqap→qapφ(v 1 )qap)q,

which is easily calculated from pφ(v 1 )q.

Before looking at how to express PA and PAE, we look at the induction schema: For all formulae φ(x) of L, the following is an axiom:

Indφ = (φ(0) ∧ ∀x(φ(x) → φ(x+)) → ∀x φ(x).

We note that Indφ is equivalent to:

INDφ = (φ[0] ∧ ∀y(φ[y] → φ[y+]) → ∀y φ[y].

Recalling that φ[y] = ∀x (x = y → φ(x)), we see that the following is the case:

Lemma 2.6.2. There exists a ∆ 1 -formula F (x, y) of L such that for all formulae φ of L, for each formula φ, the following statement is provable from PAE:

For all n, F (pφq, n) holds if and only if n = pINDφq.

Corollary 2.6.3. The set of all formulae INDφ, for φ a formula, is definable in ∆ 1.

Proof: This set is defined by: there exists y ≤ x such that y is the G¨odel number of a formula, and F (y, x) holds. 

Theorem 2.6.4. PA and PAE are definable in ∆ 1.

Proof: Note that each of PA and PAE is the union of the induction schema for the appropriate language with a finite set.

The result follows. 

Corollary 2.6.5. ∆ 1 formulae proofPA(m, n) and proofPAE(m, n) expressing that n codes a proof of the statement coded by m, in PA and PAE respectively, can be defined, and so can Σ 1 proof predicates PrPA(n) and PrPAE(n).

3. Diagonalisation and truth

3.1. Diagonalisation

Definition 3.1.1. Let En be the expression (whatever it is) of G¨odel number n, assuming this exists.

Definition 3.1.2. d(n) = En[n]. (d for “diagonal”.)

Definition 3.1.3. D(m, n) is the formula n = pd(m)q.

Theorem 3.1.4. (Diagonal Theorem): given a formula F (x), there exists a formula C such that C ↔ F (pCq) is provable in PAE.

This is a fixed-point theorem.

Proof: We consider the formula F (pd(y)q). This is equivalent to ψ(y) := ∀z

D(y, z) → F (z)

Let k = pψq. Let C = ψ[k]. Now C is ψ[k], which is equivalent to ψ(k), which is equivalent to F (pd(k)q). Also k = pψq, so C = Ek[k] = d(k). Hence F (pd(k)q) = F (pCq). So C is equivalent to F (pCq). 

3.2. The undefinability of truth

Truth is not expressible.

Theorem 3.2.1. (Tarski’s Theorem) There does not exist a formula True(x) such that True(pφq) is true exactly when φ is true in N.

Proof: Suppose such a formula to exist. Then by the Diagonal Lemma, there exists a formula C such that C holds if and only if ¬ True(pCq). But then, True(pCq) is true if and only if C is true, if and only if ¬ True(pCq) is true, giving a contradiction. 

4. Recursive functions

In this section we pin down exactly what sets and functions can be described in complexity ∆ 1 and Σ 1.

4.1. Recursive functions

Definition 4.1.1. The primitive recursive functions are the smallest class of functions from finite powers of N to N with the following properties.

  1. The constant function n 7 → 0 is primitive recursive.
  2. The successor function n 7 → n + 1 is primitive recursive.
  3. For any positive integer k, for any i ≤ k, the projection function (n 1 ,... , nk) 7 → ni is primitive recursive.
  4. The function h(n 1 ,... , nk) = g(f 1 (n 1 ,... , nk),... , fm(n 1 ,... , nk)) is primitive recursive, when g and all fj are primitive recursive.
  5. Primitive recursion: f is primitive recursive, where f (n 1 ,... , nk, 0) = g(n 1 ,... , nk), and for all n, f (n 1 ,... , nk, n + 1) = h(n 1 ,... , nk, n, f (n 1 ,... , nk, n)), where g and h are primitive recursive.

Consider the statement D(y), where y is a natural number: “y is the G¨odel number of a sequence, the first element of which is [0, g(n 1 ,... , nk)], and for each m ≤ y, if m is a member of the sequence, then for all i, j ≤ y such that m = [i, j], for all m′^ ≤ y, if m′ immediately follows m in the sequence, for all i′, j′^ ≤ y such that m′^ = [i′, j′], i′^ = i + 1 and j = [i, h(n 1 ,... , nk, i, j)]”. This statement is Σ 1 , and expresses the idea that y codes a derivation of values of the function f using primitive recursion. We now express “z = f (n 1 ,... , nk, n)”.as “There exists y such that D(y) holds, and [n, z] occurs in the sequence coded by y.” This is Σ 1. 

Theorem 4.1.9. Every recursive partial function is Σ 1 -definable, and vice versa.

Proof: ⇒): Easy once we know primitive recursion is expressible. Minimalisation adds an existential quantifier. ⇐): Let φ be Σ 0 such that y = f (x) ↔ ∃z φ(x, y, z). Roughly speaking, search for y and z—or for [y, z]—such that φ(x, y, z). If one exists, stop and output y. If not, return ⊥. How do we tell if φ(x, y, z)? We define primitive recursive hψ which tells whether ψ is true or not by recursion on Σ 0 ψ as follows. We will define hψ to have k arguments, where k is largest such that vk occurs free in ψ. hvi =vj (n 0 ,... , nk) = S(1, S(ni, nj ) + S(nj , ni)), where k is the larger of i and j. hvi ≤vj (n 0 ,... , nk) = S(1, S(ni, nj )) where k is the larger of i and j. hvi =n(n 0 ,... , ni) = S(1, S(ni, n) + S(n, ni)), and so on through all the other kinds of atomic formula. h¬ψ (n 0 ,... , nk) = S(1, hψ(n 0 ,... , nk)). hφ→ψ (n 0 ,... , nk) = S(1, hφ(n 1 ,... , ni).S(1, hψ(n 1 ,... , nj ))) where k is the larger of i and j. h∀vi ≤vj φ(n 0 ,... , nk) = maxm≤nj hφ(n′ 0 ,... , n′ l), where l = k unless i = k and j < k, when l = k − 1, and n′ r = nr unless r = i, when n′ r = m. h∃vi ≤vj φ(n 0 ,... , nk) = minx≤y hφ(n′ 0 ,... , n′ l), where l = k unless i = k and j < k, when l = k − 1, and n′ r = nr unless r = i, when n′ r = m. Similarly for formulae beginning ∀vi ≤ n and ∃vi ≤ n. Then express “f (x) = y” as: “y is the first component of [y, z], where n = [y, z] is least such that 1 − hφ(x, y, z) = 0”. 

Definition 4.1.10. A set is recursive if its characteristic function χA is recursive, and recursively enumerable if the partial function πA which is 1 on the set and undefined off, is recursive.

Theorem 4.1.11. Equivalently, a set is recursively enumerable iff it is Σ 1 , and recursive iff it is ∆ 1.

Proof: If A is recursively enumerable, then πA is recursive, and hence Σ 1 -definable. Then A is defined by the statement “πA(n) = 1”, which is Σ 1. Suppose A is defined by a Σ 1 formula φ.

Then we define πA thus: a pair (n, m) belongs to the graph of πA if and only if φ(n) and m = 1. This statement can be expressed in Σ 1. Suppose A is recursive. Then πA = π{ 1 } ◦ χA, which is recursive, and πAc = π{ 0 } ◦ χA + 1, which is also recursive. By the above reasoning, both A and its complement are Σ 1 -definable. Also by the above, if A is ∆ 1 , then A and its complement are both Σ 1. Let us suppose that A is defined by φ and its complement by ψ. Then we may define χA in Σ 1 as follows: The formula θ(n, m) asserting that (n, m) belongs to the graph of χA expresses: “either φ(n) and^ m^ =^ 1, or^ ψ(n) and^ m^ =^ 0”. So χA is Σ 1 -definable, and therefore recursive. 

Corollary 4.1.12. A set A is recursive if and only if both A and its complement are recursively enumerable.

Corollary 4.1.13. A subset A of N is recursively enumerable if and only if it is the range of some recursive partial function.

Proof: If A is recursively enumerable, then define f (n) to be n.πA(n). This is recursive, and has range A. Now suppose that f is a recursive partial function with range A. Since f is recursive, the statement “(n, m) is in the graph of f ” is Σ 1 -definable. Now the statement “(n, m) is in the graph of πA” may be expressed as: “there exists k such that (k, n) is in the graph of f , and m = 1”. 

4.2. Defining exponentiation

Lemma 4.2.1. The property of being a power of 13 can be defined in L in complexity Σ 0.

Proof: We express “n is a power of 13” as: “n = 1, or 13 | n, and if p ≤ n and p | n and ¬ 13 | p, then p = 1”. 

Lemma 4.2.2. The statement “n is the smallest power of 13 greater than m” can be expressed in L in complexity Σ 0.

Proof: We express it as “n is a power of 13 and n is greater than m and for all k ≤ n, if k is a power of 13 greater than m, then k = n”. 

Lemma 4.2.3. We can express the concatenation operator (m, n) 7 → man in L in complexity Σ 0.

Proof: We express “k = man” as “there exists l ≤ k such that l is the smallest power of 13 greater than n, and k = m.l + n”. 

Proposition 4.2.4. We can express any primitive recursive function in L in complexity ∆ 1 , and any recursive partial function in complexity Σ 1.

Corollary 4.2.5. The statement k = mn, for m, n and k natural numbers, is definable in L, and is indeed ∆ 1.

Proof: Exponentiation is primitive recursive. 

Theorem 5.1.2. Suppose S is a definable set of assumptions. PA ⊢ PrS (φ → ψ) → (PrS φ → PrS ψ).

Proof: We show that PA ∪ {Pr φ, Pr(φ → ψ)} ⊢ Pr ψ, and deduce the result from that. Suppose that in a model of PA, proof(pφq, n 1 ) and proof(p(φ → ψ)q, n 2 ). Then if n = na 1 na 2 pψqap#q, then proof(pψq, n) holds. 

Theorem 5.1.3. Suppose that S is a provably definable set of assumptions, including PA as a subset. Then PA ⊢ PrS (pψq) → PrS (pPrS (pψq)q).

Proof: This is an arithmetised version of the proof of Theorem 5.1.1. Consider the statement “m is the G¨odel number of a proof of φ from S which is l steps long”; write as proof∗ S (pφq, m, l). Note that proofS (pφq, m) is equivalent to ∃l proof∗ S (pφq, m, l). We will argue inductively that for all l, if proof∗ S (pφq, m, l) holds,

then PrS (pPrS (pφq)q) holds; the argument will proceed by recursively constructing the

G¨odel number M of a proof in S of PrS (pφq), and noting that proofS (pPrS (pφq)q, M ) holds. We will do this in a general model of PA, which means we need to be careful, because in arbitrary models of PA, PrS (pψq) does not necessarily entail S ⊢ φ. Suppose that N is a model of PA, and that N  PrS (pφq). Then there exist m, l ∈ N such that N  proof∗ S (pφq, m, l). In the argument that follows we need to bear in mind that N may not be N, and that m and l may not be actual natural numbers; they just have, in N, some of the first-order properties that natural numbers possess. We argue using induction on l (this can be formalised in PA, using the induction scheme). We examine the inductive step; the base case is similar, but easier. Suppose then that in N, l > 1, and that N  proof∗ S (i, m, l). Suppose, using the inductive hypothesis, that if, in N, j is the G¨odel number other than the last one of an element of the sequence whose G¨odel number is m, then there exists Mj in N such that

N  proofS (pPrS (i)q, Mj ). If in N, i is the G¨odel number of a member of S, that is to say, if N  ψS (i), then we let Mj be the G¨odel number of a proof of ψS (i). To justify this step further, recall that in N, ψS (n) is provable if n is the G¨odel number of a member of S, and ¬ψS (n) is provable if not. It follows that there is an algorithm which, when presented with input n, outputs the G¨odel number of a proof of ψS (n) if n ∈ S, and outputs the G¨odel number of a proof of ¬ψS (n) if not. The algorithm goes like this. Examine all formal proofs in S, one by one. (They can be listed in a recursive way that permits us to do this). We will eventually encounter either a proof of ψS (n), in which case we output its G¨odel number; or we encounter a proof of ¬ψS (n), in which case we output the G¨odel number of that. The existence of this algorithm means that there is a Σ 1 -definable function fS inputting n and outputting the G¨odel number of the appropriate proof. Suppose that χ(x, y) expresses “y = fS (x)”. Then if we are in the situation of the previous paragraph, and N  ψS (i), then there exists Mi ∈ N such that N  χ(i, Ni). Construct Mi by appending Ni and a proof of ψlast.

In a similar way, if in N, i is the G¨odel number of a logical axiom, then let Mi be the G¨odel number of a proof of ψax(i). If i is, in N, the G¨odel number of a formula obtained using an application of a rule to formulae earlier in the sequence coded by n whose G¨odel numbers are j and k, then by the inductive hypothesis there exist elements Mj and Mk of N such that N  proofS (j, Mj ) and N  proofS (k, Mk). Then we generate Mi by combining Mj and Mk, deleting repeated #’s as necessary. 

Theorem 5.1.4. Suppose that S is a set of sentences of L , definable from P. For all φ, φ is provable in S if and only if PrS (pφq) is true in the standard model N.

Proof: If φ is provable from S, then Pr(pφq) is provable in PA, so Pr(pφq) is true in N (since true in all models of PA). Now suppose that Pr(pφq) is true in N. Now Pr(pφq) is an existential statement saying that there is an n such that n is the G¨odel number of a proof whose last line is φ. Since it is true in N, there must be a natural number n about which the formula proof(pφq, n) is true. Then n is indeed the G¨odel number of a proof in S whose last line is φ, and so that proof witnesses that φ is provable in S. 

5.2. A limit on the power of proof

Theorem 5.2.1. (Weak form of the First Incompleteness Theorem) Suppose that S is a definable set of sentences that is true in N and includes PA. Then there exists a formula G such that G is true in N, but is not provable from S.

Proof: Using the Diagonal Lemma, find a formula G such that G ↔ ¬ PrS (pGq) is provable from PA. Suppose that G is provable from S. Then G is true in N, by assumption and by soundness. Also PrS (pGq) is true by Theorem 5.1.4. But then G is false, contradiction. So G is not provable from S. Now suppose that G is false. Then PrS (pGq) is true, so G is provable from S by Theorem 5.1.4. But S is true in N, so G is true in N also by soundness, contradiction. So G is true in N. 

5.3. Grades of completeness

Definition 5.3.1. A set of axioms S is n-inconsistent if and only if there exists a Σn formula ∃x φ(x) such that ⊢S ∃x φ(x), but for all m, ⊢S ¬φ(n). S is n-consistent if and only if it is not n-inconsistent. S is ω-consistent if and only if it is n-consistent for all n.

Definition 5.3.2. A set S of statements is Σi-complete if and only if all true Σi- sentences are provable from S. We will say it is Σi-sound if and only if all Σi-sentences provable from S are true.

Definition 5.3.3. The axiom scheme Q is the following list of axioms: ∀v 1 ∀v 2 v 1 +^ = v 2 +^ → v 1 = v 2. ∀v 1 ¬v 1 +^ = 0.