Logik MN2

Anton Setzer December 18, 1997

2

Contents

0 Preliminaries 5 0.1 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 0.2 Remarks for future versions of these course notes . . . . . . . . . 6 0.3 Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 0.4 Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1 Model theory 9 1.1 Structures and Models . . . . . . . . . . . . . . . . . . . . . . . . 9 1.2 Compactness and Löwenheim-Skolem . . . . . . . . . . . . . . . . 12 1.3 Substructure, Isomorphism, Elementary Equiv. . . . . . . . . . . 12 1.4 Nonstandard Structures . . . . . . . . . . . . . . . . . . . . . . . 15 1.5 Axiomatizability . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.6 An Example of a Theory with Unique Infinite Model (up to Iso-

morphism) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.7 Nonstandard Analysis . . . . . . . . . . . . . . . . . . . . . . . . 18

2 Recursion Theory, part 1 21 2.1 Preliminaries: Partial functions . . . . . . . . . . . . . . . . . . . 21 2.2 Primitive Recursive functions . . . . . . . . . . . . . . . . . . . . 23 2.3 Recursive enumerable relations . . . . . . . . . . . . . . . . . . . 29 2.4 Recursive functions . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.5 Computability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3 Gödel’s first incompleteness theorem 35 3.1 Coding of Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.2 Representation of Relations and Functions . . . . . . . . . . . . . 45 3.3 Incompleteness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4 Representation of Recursive Functions 51 4.1 Another Definition of the Recursive Functions . . . . . . . . . . . 51 4.2 Robinson’s Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.3 Provability and Decidability in Q . . . . . . . . . . . . . . . . . . 56 5 Recursion Theory, part 2 59

5.1 The theorems of Rice and Rice/Shapiro . . . . . . . . . . . . . . 62 5.2 The Arithmetical Hierarchy . . . . . . . . . . . . . . . . . . . . . 63

6 Gödel’s Second Incompleteness Theorem 67 6.1 Proof of Gödel’s and Löb’s theorem . . . . . . . . . . . . . . . . . 67 6.2 The axiom system Z. . . . . . . . . . . . . . . . . . . . . . . . . . 69 6.3 Verification of the conditions (D1) - (D3) . . . . . . . . . . . . . 71 6.4 Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

7 Set Theory 81 7.1 Adding new function and relation symbols . . . . . . . . . . . . . 81 7.2 The axioms of set theory . . . . . . . . . . . . . . . . . . . . . . . 82

8 Ordinals 89 8.1 Well-founded relations . . . . . . . . . . . . . . . . . . . . . . . . 90 8.2 The class of Ordinals . . . . . . . . . . . . . . . . . . . . . . . . . 92 8.3 The Axiom of Choice . . . . . . . . . . . . . . . . . . . . . . . . . 96 8.4 Ordinal Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 97

9 Cardinals 101 9.1 Basics about Cardinals . . . . . . . . . . . . . . . . . . . . . . . . 101 9.2 Cardinal arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 105 9.3 The Continuum Hypothesis . . . . . . . . . . . . . . . . . . . . . 107

10 Appendix: Selected Topics 109 10.1 Relative Computability . . . . . . . . . . . . . . . . . . . . . . . 109 10.2 κ-categoricity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 10.3 Tennenbaum’s theorem . . . . . . . . . . . . . . . . . . . . . . . . 110 10.4 The second Recursion theorem . . . . . . . . . . . . . . . . . . . 111

Chapter 0

Preliminaries

0.1 Preface

The following notes are course notes of a course LogikMN2 held at the Department of Mathematics, Uppsala University, October - December 1997.

Content of the Course We cite here from the course handbook [UU97]. The course is based on LogikMN1, which has the following content (English translation by the author): Propositional logic: Truth, proof, completeness. Predicate logic: structure, semantic, proof, natural deduction, completeness. Introduction to model theory. orientation about incompleteness theorems, mathematical foundations (?, Swedish: matematikens grundvalar) and intuitionistic logic. Literature for this course was van Dalen’s book [vD94]. The content of the course LogikMN2 itself according to [UU97] is: Gödel’s incompleteness theorem. Recursion theory: recursive functions, second recursion theorem, universal functions, S-m-n-theorem, Rice’s theorem, recursive enumerable sets, theorem of Rice and Shapiro, recursive inseparable sets, arithmetical hierarchy. Relative computability. Selected topics from set theory: well-ordering, ordinals, cardinals, transfinite induction, equivalent formulations of the axiom of choice, continuum hypothesis. Model theory: isomorphism, substructure, elementary equivalence, elementary substructure, compactness theorem, theorem of Löwenheim-Skolem, complete theories, categoricity. Nonstandard arithmetic and analysis. Tennenbaum’s theorem. Literature for the course was: [Men87] and for additional reading: [Cra91], [Cut80], [vD94] and [Sho67].

The plan for this lecture given in the first lecture was:

1. Model theory I Use of the completeness theorem, nonstandard structures.

2. Recursion theory I. Exploration of what “computable” means.

3. 1. Gödel’s Incompleteness theorem

4. Representability and recursion theory II. Recursion theorem. Non recursive sets.

5. 2. Gödel’s Incompleteness theorem “There is no 100% security in mathematics”.

6. Set theory. The inconsistency of naïve set theory and how to define a system which is (hopefully) consistent. Ordinals, cardinals.

7. Model theory and higher cardinalities. If time permits.

Incompleteness theorem for uncountable languages. κ-categoricity.

The material in 1 - 6 was actually covered, from 7. only κ-categoricity was mentioned in the appendix (chapter 10).

Sources The major source for this notes are the lecture notes by Buchholz, [Buc89], [Buc93a],[Buc93b] and [Buc97a], unbeatable in their technical precision and shortness. Large parts are translations of his notes.

Status Currently these notes are in the state as they were typed during the teaching period. Mistakes found during teaching and in the immediate revision afterwards have been corrected, but the author didn’t have time yet to do a major proof check, which would be necessary in order to guarantee accuracy. Therefore the reader should be aware that there might be inaccuracies, typos, mistakes. The author appreciates very much hints about mistakes and inaccuracies.

0.2 Remarks for future versions of these course notes

We have made some decisions, some of them turned out not to be as good as we thought. Since we want to hand out these notes to the students, in the current version we are very close to the version taught and therefore haven’t changed this. However we want to note here, what should be in later versions modified:

• We didn’t choose equality to be part of the logic and therefore = was in structures by definition not supposed to be interpreted standard. We regretted this choice very much, because practically in all theorems we had to add the statement: this holds if = is interpreted standard (we might have overlooked some statements, where this has to be added).

• To introduce partial functions f : A →_{par} B as strict functions A_{⊥} → B_{⊥}, where A_{⊥} := A ∪ {⊥}, would have been more natural.

• In the part of recursion theory it would have been better to introduce functions ∧, ∨, …: ℕ^{2} → ℕ etc., which act as the boolean valued functions on {0, 1} instead of simulating them with + and ·.

• We defined Δ_{0} formulas only as formulas with connectives →, ¬, ∀ (no ∧, ∨, ∃), and showed that they are essentially closed under ∧, ∨, ∃. This didn’t save us much time and was didactically not wise.

0.3 Notations

Since we are used to it and since it is easier to distinguish it from ordinary letters in handwriting, we will sometimes write symbols in (capital) Sütterlin letters. Only a few of them will be actually used. In print they will be represented by calligraphic letters. The transcription is as follows:

A � E � I � M � P � U � X �
B � F � J � N � Q � V � Y �
C � G � K � O � R � W � Z �
D � H � L � P � S � X �

Quantification will be written in the form ∀x(ϕ), ∃x(ϕ), where the scope of the quantifier is what is within parenthesis. We omit the parenthesis if there is no confusion and write usually in this case ∀x.ϕ, ∃x.ϕ. ∧ and ∨ bind more than →, for instance 5 = 10 ∧ 3 = 5 → 2 = 7 ∨ 9 = 9 should be read as (5 = 10 ∧ 3 = 5) → (2 = 7 ∨ 9 = 9). We will write expressions like ϕ(x, y, z). Once we have used it, ϕ(r, s, t) means ϕ[x := r, y := s, z := t] where we assume that r, s, t are substitutable for x, y, z (which can always be achieved after renaming of bounded variables). ∃!x.ϕ(x) := ∃x.(ϕ(x)) ∧ ∀y, y′(ϕ(y) ∧ ϕ(y′) → y = y′).

0.4 Equality

Definition 0.1 (a) If L is a language, then the equality axioms for L are

• ∀x.x = x.

• ∀x, y(x = y → y = x).

• ∀x, y, z(x = y ∧ y = z → x = z).

• ∀x_{1}, …, x_{n}.∀y_{1}, …, y_{n}.(x_{1} = y_{1} ∧ ⋯ x_{n} = y_{n} → f(x_{1}, …, x_{n}) =

f(y_{1}, …, y_{n})), f an n-ary function symbol of L.

• ∀x_{1}, …, x_{n}∀y_{1}, …, y_{n}.(x_{1} = y_{1} ∧ ⋯ x_{n} = y_{n} → R(x_{1}, …, x_{n}) →

R(y_{1}, …, y_{n})), R an n-ary relation symbol of L which is not =.

(b) A theory with equality is a theory containing the equality axioms.

Lemma 0.2 From the equality axioms for a language L follows

• If t(y_{1}, …, y_{n}) is a term (in L), FV(t(y_{1}, …, y_{n})) ⊆ {y_{1}, …, y_{n}}, x_{i}, x′_{i} are distinct, then

\begin{aligned}∀x_{1}, …, x_{n}, x′_{1}, …, x′_{n}. & x_{1} = x′_{1} ∧ ⋯ ∧ x_{n} = x′_{n} \\ & → t(x_{1}, …, x_{n}) = t(x′_{1}, …, x′_{n}) . \end{aligned}

8 CHAPTER 0. PRELIMINARIES

• If A(y_{1}, …, y_{n}) is a formula (of L), FV(A(y_{1}, …, y_{n})) ⊆ {y_{1}, …, y_{n}},

x_{i}, x′_{i} are distinct, then

\begin{aligned}∀x_{1}, …, x_{n}, x′_{1}, …, x′_{n}. & x_{1} = x′_{1} ∧ ⋯ ∧ x_{n} = x′_{n} \\ & → A(x_{1}, …, x_{n}) → A(x′_{1}, …, x′_{n}) . \end{aligned}

Proof: Easy induction.

Model theory

1.1 Structures and Models

We will follow in this chapter very closely [Buc97a], chapter 1 and 3. In the following we will assume the completeness theorem for arbitrary (not only countable) languages. (Originally we planned to prove it, if possible, in a section Model theory II, but it turned out, that it wasn’t possible.

Definition 1.1 (a) 𝔹 := {0, 1}. max and min will be considered with respect to the ordering 0 < 1.

(b) Let L be language, i.e. a collection of function symbols f and relation symbols R together with the arities arity(f) and arity(R). We assume here that formulas are built from prime formulas and ⊥ using the connectives ∧, ∨ and ¬. A structure to L is a pair M = (M, (p^{M})_{p∈L}), where M is a not empty set, called domain of the interpretation, and a family (p^{M})_{p∈L} where

(i) p^{M} : M^{n} → 𝔹 if p is an n-ary relation symbol;

(ii) p^{M} : M^{n} → M if p is an n-ary function symbol, n ≥ 1;

(iii) p^{M} ∈ M if p is an constant (i.e. a 0-ary function symbol).

If M is as above, |M| := M.

(c) We define ∧^{M}, ∨^{M}, →^{M}: 𝔹^{2} → 𝔹, ¬^{M} : 𝔹 → 𝔹 and ⊥^{M}∈ 𝔹 by ∧^{M}(a, b) := min{a, b}, ∨^{M}(a, b) := max{a, b}, →^{M} (a, b) := max{a, 1 − b}, ¬^{M}(a) := 1 − a, ⊥^{M}:= 0.

(d) If not mentioned differently, we will interpret = by defining

=^{M} (a, b) := \begin{cases}1 & if a = b \\ 0 & otherwise \end{cases}.

This is called the standard interpretation of =.

(e) If M is a structure for L, an M-assignment is a function ξ : Var → |M|. If ξ is an M-assignment, a ∈ |M|, x ∈ Var, then ξ_{x}^{a} : Var → |M|,

ξ_{x}^{a}(y) := \begin{cases}a & if x = y \\ ξ(y) & otherwise. \end{cases}.

(f) An interpretation for a language L is a pair I = (M, ξ) where M is an interpretation and ξ is an interpretation for M. I_{x}^{a} := (M, ξ_{x}^{a}).

(g) If I = (M, ξ) is an interpretation for L, we define for expressions (= terms

or formulas) u in L I(u) ∈ \begin{cases}|M| & if u is a term \\ 𝔹 & if u is a formula \end{cases} by induction on the

definition of expressions u. (If u is a term, I(u) is called the value of u under interpretation I, if it is a formula, then I(u) is called the interpretation of u under I).

• If u is a variable, I(u) := ξ(u).

• If u = fu_{1}, …, u_{n}, f a function- or relation symbol or f ∈ {∧, ∨, →, ¬, ⊥}, then

I(t) := f^{M}(I(u_{1}), …, I(u_{n})) .

• I(^{∀ ∃} xA) :={min \atop max} \{I_{x}^{a}(A) | a ∈ |M|\}.

(h) Assume I is an interpretation, A is a formula, both of L. I ⊧ A :⇔ I(A) = 1. If Γ is a set of formulas in L, then I ⊧ Γ :⇔ for every A ∈ Γ, I ⊧ A. Γ is satisfiable, iff there exists an interpretation I such that I ⊧ Γ. Such an interpretation is called a model of Γ.

(i) Assume Γ is a set of formulas, A a formula of the language L. Γ ⊧ A :⇔ A holds in any model of Γ. A is called valid, ⊧ A, iff ∅ ⊧ A. Two formulas A and B are equivalent, iff {A} and {B} have the same models.

Definition 1.2 (a) If u is an expression, FV(u) ⊆ {x_{1}, …, x_{n}} (x_{1}, …, x_{n} distinct), a_{1}, …, a_{n} ∈ |M|, then

u^{M}[x_{1} := a_{1}, …, x_{n} := a_{n}] := (M, ξ)(u)

where ξ is an assignment with ξ(x_{i}) = a_{i}, i = 1, …, n. If u = A is a formula, then

M ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}] :⇔ A^{M}[x_{1} := a_{1}, …, x_{n} := a_{n}] = 1

If the choice of variables is clear we write u^{M}[a_{1}, …, a_{n}] and M ⊧ A[a_{1}, …, a_{n}].

(b) If L is finite, we sometimes write it as a tuple (R_{1}, …, R_{n}, f_{1}, …, f_{m}). Then we will sometimes write structures M as (|M|, R_{1}^{M}, …, R_{n}^{M}, f_{1}^{M}, …, f_{m}^{M}).

Definition 1.3 (a) L(Γ) is the set of function- and relation symbols in a set of formulas Γ.

(b) A sentence is a closed formula.

For_{L}^{0} is the set of L-sentences.

The universal closure of the formula A is ∀x_{1} ⋯ ∀x_{n}.A where FV(A) = {x_{1}, …, x_{n}} and x_{i} are distinct. An axiom system is a collection of sentences.

(c) For every L-structure M let Th(M) := {A ∈ For_{L}^{0} | M ⊧ A} (the theory of M).

(d) If Σ is an axiom system let Th_{L}(Σ) := {A ∈ For_{L}^{0} | Σ ⊧ A} (the theory derived by Σ). (Note the different use of Th(M) and Th_{L}(Σ).

(e) Mod_{L}(Σ) is the class of all L-models of Σ.

Definition 1.4 (a) An axiom system Γ is called a theory, iff it is deductively closed, i.e. for every sentence A ∈ For_{L(Γ)}^{0}, if T ⊢ A then A ∈ T.

(b) If T is a theory and Σ ⊆ T, then Σ is called an axiom system of T if T = Th_{L}(Σ).

(c) An axiom system Σ is called complete, iff for every L(Σ) sentence A follows Σ ⊢ A or Σ ⊢ ¬A.

Lemma 1.5 (a) Th(M) is a complete theory.

(b) Is Σ an axiom system, L(Σ) ⊆ L, then Th_{L}(Σ) is a theory, and Th_{L}(Σ) = {A ∈ For_{L}^{0} | Σ ⊢ A}.

(c) If T is a complete theory, T′ is consistent, T ⊆ T′, then T = T′.

Proof: (a) Th(M) ⊢ A ⇒ M ⊧ A ⇒ A ∈ Th(M). Th(M) is obviously complete.

(b) trivial.

(c) Exercise.

Definition 1.6 Let L, L′ be languages. L′ is an extension of L iff L ⊆ L′. If L ⊆ L′, M is an L-structure, M′ is an L′-structure, then M′ is an expansion of M :⇔ M is a reduct of M′ :⇔ |M| = |M′| and for all p ∈ L′ p^{M} = p^{M′}. Let M′ ↾ L be the (unique) L-reduct of M.

Remark 1.7 If M′ is an expansion of the L-structure M, and ξ an M-assign-ment, then for every expression u of the language L (M, ξ)(u) = (M′, ξ)(u). Γ ⊧ A and “Γ has a model” are therefore independent of the language L ⊇ L(Γ ∪ {A}). Because of the completeness theorem, the same holds for “Γ ⊢ A” and “Γ is consistent”.

1.2 Compactness and Löwenheim-Skolem

Definition 1.8 A structure M is called finite (infinite, countable), iff this holds for |M|.

Theorem 1.9 (Compactness theorem) Let Γ be a set of formulas. Is every finite subset of Γ satisfiable, then Γ is satisfiable, too.

Proof: Assume Γ is not satisfiable. Then by the completeness theorem Γ is not consistent. Therefore Γ ⊢⊥. Then for a finite subset Γ′ of Γ follows Γ′ ⊢⊥. Therefore Γ′ is not satisfiable, a contradiction.

Theorem 1.10 (Löwenheim-Skolem) A countable satisfiable set of formulas Γ has a countable model.

Proof: Let C := {c_{n} | n ∈ ω} new constants. With Γ are L := L(Γ) ∪ C and T := {t | t closed L-term} countable. If Γ is satisfiable, it is as well consistent. In the proof of the completeness theorem, a model of Γ was constructed, with |M| = T. Therefore Γ has a countable model.

Theorem 1.11 If an axiom system Σ has arbitrary big finite models, then Σ has an infinite model, too.

Proof: Let L := L(Σ) ∪ {=}, where = is a new binary relation, x_{1}, x_{2}, …, different variables and

Γ := Σ ∪ {¬(x_{i} = x_{j}) | i, j ∈ ℕ, i < j} .

We show: Every finite subset of Γ can be satisfied. Proof: Let Δ ⊆ Γ be finite. Then Δ ⊆ Σ ∪ {¬(x_{i} = x_{j}) | i, j ∈ ℕ, i < j ≤ n}. Let (M′, ξ′) be a model of Σ having at least n distinct elements a_{1}, …, a_{n}. Let η be an assignment with η(x_{i}) := a_{i}. Then (M′, η) is a model of Δ. By the compactness-theorem Γ can be satisfied. If (M, ξ) is a model of Γ, then i ↦ ξ(x_{i}) is an injective map from ℕ into |M|, M is infinite.

1.3 Substructures, Isomorphisms and Elementary Equivalence

Definition 1.12 Let M, M′ two L-structures (L a language).

(a) M is called substructure of M′ (M ⊆ M′), if |M| ⊆ |M′| and further:

(i) c^{M} = c^{M′} for every constant c ∈ L.

(ii) p^{M} = p^{M′} ↾ |M|^{n} for every n-ary function- or relation symbol p ∈ L (in case p a function symbol, n ≥ 1).

(b) An isomorphic embedding π : M → M′ is an injective function π : |M| → |M′| such that

(i) π(f^{M}(a_{1}, …, a_{n})) = f^{M′}(π(a_{1}), …, π(a_{n})) for very function symbol

f ∈ L of arity n ≥ 0, and every a_{1}, …, a_{n} ∈ |M|.

(ii) R^{M}(a_{1}, …, a_{n}) = R^{M′}(π(a_{1}), …, π(a_{n})) for very relation symbol

R ∈ L of arity n, and every a_{1}, …, a_{n} ∈ |M|.

An isomorphism π : M → M′ is an isomorphic embedding M → M′ such that π : |M| → |M′| surjective. We write π : M ⟶^{≅} M′ for π is an isomorphism from M to M′. M ≅ M′ :⇔ there exists an isomorphism π : M ⟶^{≅} M′.

Remark 1.13 A function π : |M| → |M′| is an isomorphic embedding from M into M′ iff it is an isomorphism from M to a substructure of M′.

Definition 1.14

Two L-structures M, M′ are elementary equivalent, M ≡ M′, if Th(M) = Th(M′).

Lemma 1.15 (a) M ≡ M′ ⇔ M ⊧ Th(M′).

(b) If L is countable, then for every L-structure M there exists a countable structure M′ such that M ≡ M′.

(a) “⇒” Th(M) = Th(M′) ⇒ M ⊧ Th(M′). “⇐” Assume M ⊧ Th(M′). Then Th(M′) ⊆ Th(M). By 1.5 (c) Th(M′) = Th(M).

(b) Th(M) can be satisfied and is countable. Therefore there is a countable M′ such that M′ ⊧ Th(M).

Theorem 1.16 Let T be a theory and L = L(T). The following are equivalent:

(i) T is complete

(ii) For every M ∈ Mod_{L}(T) we have Th(M) = T

(iii) If M, M′ ∈ Mod_{L}(T), then M ≡ M′.

Proof: Exercise.

Lemma 1.17 Let π be an isomorphism from M to M′ and ξ an M-assignment. Then for every L-term t and M-formula A the following holds

(a) • π((M, ξ)(t)) = (M′, π ∘ ξ)(t)

• (M, ξ)(A) = (M′, π ∘ ξ)(A)

(b) If FV(t), FV(A) ⊆ {x_{1}, …, x_{n}}, x_{i} distinct, this can be written as

• π(t^{M}[x_{1} := a_{1}, …, x_{n} := a_{n}]) = t^{M′}[x_{1} := π(a_{1}), …, x_{n} := π(a_{n})] • M ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}] ⇔ M′ ⊧ A[x_{1} := π(a_{1}), …, x_{n} :=

π(a_{n})]

(c) If t, A are closed, this can be simplified to:

• π(M(t)) = M′(t).

• M(A) = M′(A).

Proof: If we define π : 𝔹 → 𝔹, I := (M, ξ), I′ := (M′, π ∘ ξ), then the above equation reads: π(I(u)) = I′(u) for every expression u. Induction on u, simultaneously for all I. u a variable x: π(I(u)) = π(ξ(x)) = I′(u). u = fu_{1}, …, u_{n}, f a relation-, function- or constant- symbol or f ∈ {∧, ∨, →, ¬, ⊥}:

π(I(fu_{1}, …, u_{n})) = π(f^{M}(I(u_{1}), …, I(u_{n})))
= f^{M′}(π(I(u_{1})), …, π(I(u_{n})))
{IH \atop =} f^{M′}(I′(u_{1}), …, I′(u_{n}))
= I′(fu_{1}, …, u_{n})

u =^{∀ ∃} xA:

π(I(^{∀ ∃} x.A))  =  I(^{∀ ∃} x.A)
=  {min \atop max} \{(M, ξ_{x}^{a})(A) | a ∈ |M|\}
{IH \atop =}  {min \atop max} \{(M′, π ∘ ξ_{x}^{a})(A) | a ∈ |M|\}
=  {min \atop max} \{(M′, (π ∘ ξ)_{x}^{π(a)})(A) | a ∈ |M|\}
π surjective ; = {min \atop max} \{(M′, (π ∘ ξ)_{x}^{b})(A) | b ∈ |M′|\}
=  I′(^{∀ ∃} xA)

A corollary of the lemma is the following theorem:

Theorem 1.18 If M ≅ M′ then M ≡ M′

Lemma 1.19 For every structure M in which the equality axioms hold, there exists an elementary equivalent structure M′ such that =^{M′} is standard and if M is countable (finite), then M′ is countable (finite), too.

Proof: Let M := |M|, ∼:= {(a, b) ∈ M × M | =^{M} (a, b) = 1}. ∼ is an equivalence relation. Let M′ be the equivalence classes of M with respect to ∼ and define for n-ary functions f f^{M′}([a_{1}], …, [a_{n}]) := [f^{M}(a_{1}, …, a_{n})] and for n-ary relations R R^{M′}([a_{1}], …, [a_{n}]) := R^{M}(a_{1}, …, a_{n}). By the congruence axioms, which are part of the equality axioms, follows that this definition is welldefined, =^{M′} is standard, and if π is the canonical map M → |M′|, then for any term t, formula A and assignment ξ with respect to M, we get π((M, ξ)(t)) = (M′, π ∘ ξ)(t) and (M, ξ)(A) = (M′, π ∘ ξ)(A). M ≡ M′.

Theorem 1.20 For every infinite structure M there exists an elementary equivalent structure M′, which is not isomorphic to M. If the language contains = and =^{M} is standard, then =^{M′} can be chosen standard, too.

Proof: Let L be the language of M. Let M := |M|, P(M) be the power set of M. For every α ∈ P(M) let c_{α} be a new constant, further let, if M has not equality with standard interpretation, = be a new binary relation symbol. L′ := L ∪ {=} ∪ {c_{α} | α ∈ P(M)}. Σ′ := Th(M) ∪ {¬(c_{α} = c_{β}) | α, β ∈ P(M), α ≠ β}. Every finite subset of Σ′ can be satisfied by a suitable expansion of M. By the compactness theorem Σ′ has a model M′_{1} (with standard interpretation of =^{M′}, if =^{M} was standard). Let M′ := M′_{1} ↾ L. M′_{1} ⊧ Σ′ ⇒ M′_{1} ⊧ Th(M) ⇒ M′ ⊧ Th(M) ⇒ M ≡ M′. M′_{1} ⊧ ¬(c_{α} = c_{β}) ⇒ c_{α}^{M′_{1}} ≠ c_{β}^{M′_{1}} ⇒ c_{α}^{M′} ≠ c_{β}^{M′}. Therefore M′ has at least P(M) many different element, therefore it cannot be isomorphic to M.

1.4 Nonstandard Structures

Definition 1.21 (a) Let L_{ℕ} := (=, 0, S) be the language of arithmetic, with = being the 2-ary relation symbol for equality, 0 the constant 0 and S a unary function symbol for the successor. N_{0} := (ℕ, =, 0, S), where S : ℕ → ℕ, n ↦ n + 1.

(b) Let L_{ℝ} := (=, 0, 1, +, ·, <) the language of the real numbers, with the obvious arities, and R be the usual structure of the reals.

Remark By theorem 1.20 no infinite structure structure can be characterized by a first-order-axiom system up to isomorphism. However, the Structure N_{0} is, if = is interpreted standard, uniquely determined by the Peano-axioms (i.e. the equality axioms, ∀x.0 ≠ S(x), ∀x, y(S(x) = S(y) → x = y), and the induction axiom: if M ⊆ ℕ, 0 ∈ M and ∀x ∈ M.S(x) ∈ M then M = ℕ). But this does not cause a contradiction, since the Peano-axioms do not form a first order axiom system. The induction axiom can be precisely written as

∀X(0 ∈ X ∧ (∀x(x ∈ X → S(x) ∈ X) → ∀x.x ∈ X)

and has a quantifier ∀X ranging over all subsets of the natural numbers, therefore this formula is a 2nd order formula.

Definition 1.22 (a) A nonstandard model of the natural numbers is a structure of the language L_{ℕ} which is elementary equivalent, but not isomorphic to N_{0}.

(b) A nonstandard model of the reals is a structure of the language L_{ℝ} which is elementary equivalent, but not isomorphic to R.

In a nonstandard model of the natural numbers, the principal of complete induction does not hold, only, if it is restricted to (first-order-) definable subsets of the natural numbers.

Theorem 1.23 There are countable nonstandard models of the natural numbers.

Proof: Γ := Th(N_{0}) ∪ {¬(x = 0), ¬(x = S(0)), ¬(x = S(S(0))), … }. Every finite subset of Γ and therefore Γ itself can be satisfied by a countable structure N_{1} and an assignment ξ. N_{1} ⊧ Th(N_{0}), therefore N_{0} ≡ N_{1}. If π : N_{0} ⟶^{≅} N_{1}, then for every n ∈ ℕ π(n) = π(N_{0}(\underbrace{S(⋯ S}_{n times}(0) ⋯))) = N_{1}(S(⋯ S(0)) ≠ ξ(x), π

is not surjective, a contradiction.

The structure R is up to isomorphism the unique complete ordered archimedean field with standard interpretation of =. (The axioms of an ordered field (formulated in the language L_{ℝ} are the equality axioms, the field axiom, axioms stating the linearity of < and ∀x, y, z(x < y → x + z < y + z), ∀x, y, z(x < y ∧ 0 < z → x · z < y · z). An ordered field is archimedean, iff for every x there exists a natural number n such that x < n. This can be axiomatized by adding a predicate ℕ (where we write x ∈ ℕ for ℕ(x) and axioms expressing, that ℕ is the set of natural numbers, i.e. 0 ∈ ℕ, ∀x(x ∈ ℕ → x + 1 ∈ ℕ), ∀X.(0 ∈ ℕ ∧ ∀x ∈ X(x + 1 ∈ ℕ) → ∀x ∈ ℕ.x ∈ X). The completeness axiom can be expressed by: every nonempty bounded set has a supremum), which is the 2^{nd}-order formula

∀X(∅ ≠ X bounded → ∃y.y = sup(X))

as is the induction axiom for the predicate ℕ. In a nonstandard model of the reals not every bounded set X ≠ ∅ has a supremum (however every in the language ofL_{ℝ} definable has), or ℕ is non standard.

Lemma 1.24 For every archimedean ordered field there exists an elementary equivalent ordered field which is not archimedean.

Proof: Let K be an archimedean ordered field in the language L_{ℝ}, Γ := Th(K) ∪ \{\underline{n} <

x | 1 ≤ n ∈ ℕ\}, where \underline{n} := \underbrace{1 + ⋯ 1}_{n times}.

Every finite subset of Γ can be satisfied, therefore Γ can be satisfied. Let (M, ξ) be a model of Γ. M ≡ K, M is an ordered field. However (M, ξ) ⊧ \underline{n} < x, \underbrace{1^{M} +^{M} ⋯ +^{M} 1^{M}}_{n times} <^{M} ξ(x), M is not archimedean.

Corollary 1.25 If a sentence A in the language L_{R} holds in every non-archi-medean ordered field, then it holds in every ordered field.

Proof: If K is archimedean, K ≡ M where M is a non-archimedean ordered field. M ⊧ A, therefore K ⊧ A.

1.5 Axiomatizability

Definition 1.26 A class S of L-structures is (finitely) axiomatizable, iff there exists a (finite) axiom system Σ such that S = Mod_{L}(Σ).

Remark 1.27 (a) S is finitely axiomatizable iff there is an L-sentence such that S = Mod_{L}({A}).

(b) If there are structures M, M′ such that M ≡ M′, M ∈ S, M′ ∉ S, then S is not axiomatizable.

Lemma 1.28 Let S be a class of L-structures and Σ an axiom system.

(a) S is finitely axiomatizable iff S and its complement are axiomatizable.

(b) Is Mod_{L}(Σ) finitely axiomatizable, then there exists a finite Δ ⊆ Σ such that Mod_{L}(Σ) = Mod_{L}(Δ).

Proof: Let S^{c} be the complement of S. (a) “⇒”: If S = Mod_{L}({A}) then S^{c} = Mod_{L}({¬A}). “⇐” Let S = Mod_{L}(Σ), S^{c} = Mod_{L}(Δ). Σ∪Δ is not satisfiable. Therefore there exists a finite subset Σ′ of Σ such that Σ′ ∪ Δ is unsatisfiable. M ∈ S ⇒ M ⊧ Σ′, and M ⊧ Σ′ ⇒ M |̸= Δ ⇒ M ∉ S^{c} ⇒ M ∈ S, therefore Σ′ axiomatizes S.

(b) Let Δ be an axiom system for S^{c}. As in (a), “⇐” follows now Σ′ axiomatizes Mod_{L}(Σ) for some Σ′ ⊆ Σ finite.

Lemma 1.29 (a) Is S a class of finite L-structures, and S contains arbitrary big structures (|M| for M ∈ S is arbitrary big), then S is not axiomatizable.

(b) The class of all infinite L-structures (or groups or rings or fields) is axiomatizable, but not finitely axiomatizable.

(c) The class of fields of characteristic 0 is axiomatizable, but not finitely axiomatizable.

(d) If a sentence A holds in all fields of characteristic 0, then there exists an n_{0} ∈ ℕ such that A holds in all fields of characteristic p ≥ n_{0}.

(e) The class of all (non-)archimedean ordered fields is not axiomatizable.

Proof: Exercise.

1.6 An Example of a Theory with Unique Infinite Model (up to Isomorphism)

Definition 1.30 Let DO, the theory of dense linear orderings without endpoints be the deductive closure of the following axioms in the language L = {<, =}:

(0) The equality axioms for L;

(1) ∀x.¬(x < x)∧∀x, y, z(x < y ∧y < z → x < z)∧∀x, y(x < y ∨x = y ∨y < x)

(2)∀x, y.(x < y → ∃z(x < z ∧ z < y))

(3) ∀x.(∃y(x < y) ∧ ∃y(y < x)).

Lemma 1.31 Every countable model of DO with standard interpretation of = is isomorphic to the structure (ℚ, =, <).

Proof: Exercise.

Theorem 1.32 The theory DO is complete and DO = Th(ℚ, =, <).

Proof: It suffices to show, that every model of DO is elementary equivalent to (ℚ, =, <): If M is a model of DO, there exists a countable structure M_{0} such that M ≡ M_{0}. M_{0} ≅ (ℚ, =, <), therefore M ≡ M_{0} ≅ (ℚ, =, <).

1.7 Nonstandard Analysis

In this section let r, s be real numbers.

Definition 1.33 (a) The language L_{ℝ}^{+} contains =, one constant s̃ for every s ∈ ℝ, one n-ary function symbol F̃ for every F : ℝ^{n} → ℝ (n ≥ 1) and one 2-ary relation symbol <.

(b) Let R^{+} be the standard structure in the language L_{ℝ}^{+}, i.e. |R^{+}| = ℝ, s^{R^{+}} = s, F̃^{R^{+}} = F, <^{R^{+}} (s_{0}, s_{1}) = 1 ⇔ s_{0} < s_{1} and =^{R^{+}} is standard.

(c) Let R^{∗} be an L_{ℝ}-structure with standard interpretation of =, such that R^{∗} ≡ R^{+} and {a ∈ |R^{∗}| | ∀s ∈ ℝ.s^{R^{∗}} <^{R^{∗}} a} ≠ ∅. ℝ^{∗} := |R^{∗}|, F^{∗} := F̃^{R^{∗}}, <^{∗}:=<^{R^{∗}}. Further π : ℝ → ℝ^{∗}, π(s) = s^{R^{∗}}.

Remark 1.34 π : R^{+} → R^{∗} is an isomorphic embedding.

Notation 1.35 (a) If s ∈ ℝ, we write s instead of π(s) and consider R^{+} as a substructure of R^{∗}.

(b) Let +_{ℝ} : ℝ^{2} → ℝ be the ordinary addition. We write + for +_{ℝ}, +_{ℝ}^{∗} and the function symbol ˜+_{ℝ}. The same holds for 0 (zero), 1 (one), · (multiplication), − (subtraction), and | · | (absolute value) and /. Further we write \frac{r}{s} instead of r/s.

(c) In this chapter we write a, b, c, d for elements of ℝ^{∗}.

(d) ℝ_{+} := {s ∈ ℝ | 0 < s}.

a ≈ b :⇔ ∀ϵ ∈ ℝ_{+}.|a − b| < ϵ. (a and b are infinitely close).

a is finite :⇔ ∃s ∈ ℝ.|a| < s. a is infinitely small :⇔ s ≈ 0.

[a] := {d ∈ ℝ^{∗} | a ≈ d}. [a]′ := [a] \ {a}.

Remark 1.36 (ℝ^{∗}, =, +, ·, 0, 1, <) is an ordered field.

Proof: R^{∗} ≡ R^{+} and the axiom system for ordered fields is a set of sentences in the language {=, +, ·, 0, 1, <}.

Remark 1.37 For every a ∈ ℝ^{∗} there exists b ∈ [a]′ such that a < b.

Proof: There exists d ∈ ℝ^{∗} such that s < d for all s ∈ ℝ_{+}. By Remark 1.36 0 < \frac{1}{d} < \frac{1}{s} for all s ∈ ℝ_{+}, a < a + \frac{1}{d} and |(a + \frac{1}{d}) − a| < ϵ for all ϵ ∈ ℝ_{+}.

Lemma 1.38 Assume F : ℝ → ℝ and r, s ∈ ℝ.

(a) lim_{x→r} F (x) = s ⇔ for every a ∈ [r]′ follows F^{∗}(a) ≈ s.

(b) F′(r) = s ⇔ for every d ∈ [0]′ follows \frac{F^{∗}(r+d)−F (r)}{d} ≈ s.

Proof: “⇒” Let a ∈ [r]′ and ϵ ∈ ℝ_{+}. By assumption there exists δ ∈ ℝ_{+} such that

R^{+} ⊧ ∀x(0 < |x − r̃| < δ̃ → |F̃(x) − s̃| < ϵ̃) ,

the same holds in R^{∗} as well. If a ∈ [r]′, then 0 < |a − r| < δ, F^{∗}(a) − s| < ϵ. “⇐” Assume ϵ ∈ ℝ_{+}, and let 0 < d ∈ [0]′. For all a ∈ ℝ^{∗} such that 0 < |a−r| < d we have a ∈ [r]′, therefore F^{∗}(a) ≈ s and therefore |F^{∗}(a) − s| < ϵ. Therefore

R^{∗} ⊧ ∃y(0 < y ∧ ∀x(0 < |x − r̃| < y → |F̃(x) − s̃| < ϵ̃)) .

By R^{+} ≡ R^{∗}, this formula holds as well in R^{+}, and the assertion follows.

(b) F′(r) = s ⇔ lim_{d→0} G(d) = s where

G : ℝ → ℝ, G(s) := \begin{cases}\frac{F (r+s)−F (r)}{d} & if s ≠ 0 \\ 0 & otherwise. \end{cases}

If d ∈ ℝ^{∗} \ \{0\}, G^{∗}(d) = \frac{F^{∗}(r+d)−F (r)}{d} and by (a) follows now the assertion.

Example: Let F : ℝ → ℝ, F (r) := r^{2}. Then for d ∈ [0]′,

\frac{F^{∗}(r + d) − F (r)}{d} = \frac{(r + d)^{2} − r^{2}}{d} = \frac{r^{2} + 2rd + d^{2} − r^{2}}{d} = 2r + d^{2} ≈ 2r ,

F′(r) = 2r.

Lemma 1.39 (Chain rule) If F, G : ℝ → ℝ, r ∈ ℝ, G′(r) exists and F′(G(r)) exists. Then (F ∘ G)′(r) = F′(G(r)) · G′(r).

Proof: Let Φ(d) := \frac{(F ∘G)^{∗}(r+d)−(F ∘G)^{∗}(r)}{d} for d ∈ [0]′. Show Φ(d) ≈ F′(G(r)) · G′(r). Since \frac{G^{∗}(r+d)−G(r)}{d} ≈ G′(r) and G′(r) finite follows G^{∗}(r + d) − G(r) ≈ 0.

Φ(d) =^{!} \frac{F^{∗}(G^{∗}(r+d))−F (G(r))}{d}.

If G^{∗}(r + d) = G(r) follows G′(r) ≈ \frac{G^{∗}(r+d)−G(r)}{d} = 0, G′(r) = 0, Φ(d) = 0 = F′(G(r))G′(r), otherwise

Φ(d) = \frac{F^{∗}(G^{∗}(r + d)) − F (G(r))}{G^{∗}(r + d) − G(r)} · \frac{G^{∗}(r + d) − G(r)}{d}
≈ F′(G(r)) · G′(r) .

Recursion Theory, part 1

2.1 Preliminaries: Partial functions

We will follow in this chapter very closely [Buc97a], chapter 1 and 3 and [Buc93b], section 14. There is an attempt at the moment to rename this subject into computability theory.

Notation 2.1 In this chapter a, b, c, d, i, j, k, l, m, n will be natural numbers and a⃗, b⃗, c⃗, d⃗, i⃗, j⃗, k⃗, l⃗, m⃗, n⃗ finite sequences (tuples) of natural numbers (the empty tuple is allowed as well).

In this chapter we are dealing with computability. Computer programs do not always terminate. Therefore the functions computed by a program will be in general partial. Partial functions will be needed not before section 2.4, however for systematic reason we introduce them now.

Definition 2.2 (a) An n-ary partial function (n > 0) is a function f such that dom(f) ⊆ ℕ^{n} and rng(f) ⊆ ℕ. We define f(a⃗) ≃ e :⇔ (a⃗ ∈ dom(f) ∧ f(a⃗) = e) ∨ (a⃗ ∈ ℕ^{n} \ dom(f) ∧ e =⊥). In case f(a⃗) ≃⊥ we say, f(a⃗) is undefined. We write f : ℕ^{n} →_{par} ℕ for f is an n-ary partial function and identify partial functions with their graph.

(b) We extend the above notion to the case n = 0 by defining: a 0-ary partial function f, f : ℕ^{0} →_{par} ℕ, is either a natural number or the undefined element ⊥. We define f ≃ e :⇔ (f is defined and f = e) ∨ f is undefined and e =⊥). The graph of f is {f}, if f ≄⊥ and ∅ otherwise. If a⃗ is the empty tuple, we define f(a⃗) ≃ e ⇔ f ≃ e.

(c) A partial function f : ℕ^{n} →_{par} ℕ is total iff dom(f) = ℕ^{n} (in case n = 0, if f is defined).

(d) n-ary functions are n-ary partial functions which are total.

(e) If f, g are partial functions, we define:

f(a⃗) ≃ g(b⃗) ↔ ∀e ∈ ℕ ∪ {⊥}.f(a⃗) ≃ e ⇔ g(a⃗) ≃ e.

Example 2.3 The integer division div, the integer part of division of two natural numbers, is a partial function div : ℕ^{2} →_{par} ℕ, with dom(div) = ℕ×(ℕ\{0}).

Definition 2.4 (a) 0^{n} : ℕ^{n} → ℕ, 0^{n}(x⃗) := 0. (n > 0). 0^{0} := 0 S : ℕ → ℕ, S(a) := a + 1. proj_{i}^{n} : ℕ^{n} → ℕ, proj_{i}^{n}(a_{1}, …, a_{n}) := a_{i}. (1 ≤ i ≤ n).

(b) If 1 ≤ m, h : ℕ^{m} →_{par} ℕ, g_{i} : ℕ^{n} →_{par} ℕ (i = 1, …, m), then h ∘ (g_{1}, …, g_{m}) : ℕ^{n} →_{par} ℕ, (h∘(g_{1}, …, g_{m}))(a⃗) ≃ b ⇔ ∃c_{1}, …, c_{m}(g_{1}(a⃗) ≃ c_{1} ∧ ⋯ ∧ g_{m}(a⃗) ≃ c_{m} ∧ h(c_{1}, …, c_{m}) ≃ b).

(c) If g : ℕ^{n} →_{par} ℕ, h : ℕ^{n+2} →_{par} ℕ, then (Rgh) : ℕ^{n+1} →_{par} ℕ, (Rgh)(a⃗, 0) :≃ g(a⃗), (Rgh)(a⃗, n + 1) ≃ b :⇔ ∃c((Rgh)(a⃗, n) ≃ c ∧ h(a⃗, n, c) ≃ b).

(d) If g : ℕ^{n+1} →_{par} ℕ, then μg : ℕ^{n} →_{par} ℕ, (μg)(a⃗) ≃ c ⇔ g(a⃗, c) ≃ 0 ∧ ∀i < c.∃d ≠ 0.g(a⃗, i) ≃ d.

(e) If g : ℕ^{n+1} →_{par} ℕ, then \overline{μ}g : ℕ^{n+1} →_{par} ℕ, (\overline{μ}g)(a⃗, b) ≃ (μh_{b})(a⃗), where

h_{b}(a⃗, i) = \begin{cases}g(a⃗, i) & if i < b, \\ 0 & otherwise. \end{cases}, i.e.

(\overline{μ}g)(a⃗, b) ≃ c ⇔ (g(a⃗, c) = 0 ∨ c = b) ∧ ∀i < c.∃d ≠ 0.g(a⃗, i) ≃ d. (if g is total, (\overline{μ}g)(a⃗, b) = min\{i | g(a⃗, i) = 0 ∨ i = b\}).

(f) If R ⊆ ℕ^{n}, the characteristic function of R χ_{R} : ℕ^{n} → ℕ, is defined by

χ_{R}(a⃗) := \begin{cases}1 & if a⃗ ∈ R , \\ 0 & otherwise . \end{cases}

(1 − χ_{R}) : ℕ^{n} → ℕ, (1 − χ_{R})(a⃗) := 1 − χ_{R}(a⃗)

(g) If R ⊆ ℕ^{n+1} is a n + 1-ary relation, a⃗ ∈ ℕ^{n} then μy.R(a⃗, y) := (μ(1 − χ_{R}))(a⃗); μy < b.R(a⃗, y) := (\overline{μ}(1 − χ_{R}))(a⃗, b)

Remark 2.5 (a) If f, g, h_{1}, …, h_{m} are total, then f ∘(h_{1}, …, h_{m}), Rfg and \overline{μ}f are total, too (if they the operations are defined respectively). If R is a relation, χ_{R} is total. However μf might not be total, if f is total.

(b) If g_{i} are 0-ary partial functions, h is an n-ary partial functions, then h ∘ (g_{1}, …, g_{m}) is application, i.e. h ∘ (g_{1}, …, g_{m}) ≃ b ⇔ g_{1}, …, g_{m} are defined and h(g_{1}, …, g_{m}) ≃ b). We write h(g_{1}, …, g_{m}) instead of h ∘ (g_{1}, …, g_{m}).

Example 2.6 (a) If f : ℕ^{2} →_{par} ℕ, f(a, b) ≃ b + b, then (R1f) : ℕ → ℕ, (R1f)(0) = 1, (R1f)(1) = f(0, (R1f)(0)) = 2, (R1f)(2) = f(1, (R1f)(1)) = 4, (R1f)(n) = 2^{n}.

(b) Let R(a, b) ⇔ (a ≤ 5 ∧ b = 3).

(μR)(a) ≃ \begin{cases}3 & if a ≤ 5 \\ ⊥ & otherwise. \end{cases}.

(\overline{μ}R)(a, b) ≃ \begin{cases}3 & if a ≤ 5 ∧ b ≥ 3 \\ b & otherwise. \end{cases}.

(c) f : ℕ →_{par} ℕ, f(0) ≃⊥, f(n) ≃ 0 for n > 0, then (μf) ≃⊥.

2.2 Primitive Recursive functions

We start with the definition of primitive recursive functions. Primitive recursive functions are those which can be defined from some basic functions (constant, projection and successor function) using primitive recursion and composition. Primitive recursion is hereby the definition principle corresponding to the induction principle: If we have an initial value a and a function g : ℕ^{2} → ℕ, then we can introduce a new function f : ℕ → ℕ such that f(0) = a and f(n + 1) = g(n, f(n)). This can be generalized to having some additional arguments.

Definition 2.7 (a) The sets of n-ary primitive recursive function symbols P̃R^{n} are defined simultaneously inductively by

(P̃R 1) ˜0^{n} ∈ P̃R^{n}, S̃ ∈ P̃R^{1} and if 1 ≤ i ≤ n, \begin{matrix} \\ proj & n i \end{matrix} ∈ P̃R^{n}.

(P̃R 2) If 1 ≤ m ∈ ℕ, h ∈ P̃R^{m}, g_{1}, …, g_{m} ∈ P̃R^{n}, then h˜∘(g_{1}, …, g_{m}) ∈

P̃R^{n}.

(P̃R 3) If g ∈ P̃R^{n}, h ∈ P̃R^{n+2}, then R̃gh ∈ P̃R^{n+1}.

(b) Let L_{PR} be the language having the elements of P̃R^{n} as n-ary function symbols and the binary relation =.

(c) We define the standard structure N with respect to the language L_{PR}

by |N | := ℕ, = is standard, ˜0^{n}^{N} := 0^{n}, S̃^{N} := S, \begin{matrix} \\ proj & in \end{matrix}^{N} := proj_{n}^{i}, (f˜∘(g_{1}, …, g_{m}))^{N} := f^{N} ∘ (g_{1}^{N} , …, g_{m}^{N}), (R̃fg)^{N} := Rf^{N} g^{N}.

(d) PR^{n} := {f^{N} | f ∈ P̃R^{n}}, PR := ⋃_{n∈ℕ} PR^{n}. The elements of PR are called primitive recursive functions.

(e) A relation R ⊆ ℕ^{n} is primitive recursive, if χ_{R} is primitive recursive.

Remark 2.8 (a) Definition 2.7 (c) is well-defined, since f^{N} is total, if f ∈ P̃R^{n}.

(b) PR^{0} = ℕ.

Proof of (b): “⊆” is trivial. “⊇”: n = \underbrace{S ∘ (⋯ ∘ (S}_{ntimes} ∘0^{0}) ⋯).

An expression λx_{1}, …, x_{n}.t, where t is a term of the language L_{PR} such that FV(t) ⊆ {x_{1}, …, x_{n}} should represent the function, mapping a_{1}, …, a_{n} to t^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}]. We will show now, that the primitive recursive functions are closed under λ-abstraction in the following sense:

Lemma 2.9 The primitive recursive functions are closed under λ-abstraction: For every PR-term t and pairwise distinct variables x_{1}, …, x_{n} (n ≥ 1) such that FV(t) ⊆ {x_{1}, …, x_{n}} there exists an element λ̃x_{1}, …, x_{n}.t of P̃R^{n} such that

∀a_{1}, …, a_{n} ∈ ℕ.(λ̃x_{1}, …, x_{n}.t)^{N} (a_{1}, …, a_{n}) = t^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] .

λ̃x_{1}, …, x_{n}.t can be effectively computed.

Definition 2.10 λx_{1}, …, x_{n}.t := (λ̃x_{1}, …, x_{n}.t)^{N}. We will usually not distinguish between elements of P̃R and PR and omit usually the symbol tilde. We will write 0 instead of 0^{0}.

Proof of Lemma 2.9: Induction on t.

(i) t = c, c a constant: Side induction on c ∈ PR^{0}:

Subcase c = ˜0^{0}: λ̃x_{1}, …, x_{n}.c := ˜0^{n}.

(λ̃x_{1}, …, x_{n}.c)^{N} (a_{1}, …, a_{n}) = 0 = ( ˜0^{0})^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}]

Subcase c = f˜∘(g_{1}, …, g_{m}): Let λ̃x⃗.g_{i} =: h_{i}. λ̃x⃗.c := f˜∘(h_{1}, …, h_{m}). (λ̃x⃗.c)^{N} (a⃗) = f^{N} (h_{1}^{N} (a⃗), …, h_{m}^{N}(a⃗)) = f^{N} (g_{1}^{N} [x⃗ := a⃗], …, g_{m}^{N} [x⃗ := a⃗]) = c^{N} [x⃗ := a⃗].

(ii) λ̃x_{1}, …, x_{n}.x_{i} := \begin{matrix} \\ proj & n i \end{matrix}.

(λ̃x_{1}, …, x_{n}.x_{i})^{N} (a_{1}, …, a_{n}) = a_{i} = x_{i}^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}].

(iii) If λ̃x_{1}, …, x_{n}.t_{i} = g_{i}, (i = 1, …, m), then λ̃x_{1}, …, x_{n}.ht_{1}, …, t_{m} := h˜∘(g_{1}, …, g_{m}), and

(λ̃x_{1}, …, x_{n}.ht_{1}, …, t_{m})^{N} (a⃗) = h^{N} (g_{1}^{N} (a⃗), …, g_{m}^{N} (a⃗))
= h^{N} (t_{1}^{N} [x⃗ := a⃗], …, t_{m}^{N}[x⃗ := a⃗])
= (ht_{1}, …, t_{m})^{N} [x⃗ := a⃗] .

Definition 2.11 (a) + := R(λx.x)(λx, y′, z.Sz). + will be written infix. · := R(λx.0)(λx, y′, z.z + x). · will be written infix. pred := R0(λy, z.y). − · := R(λx.x)(λx, y′, z.pred(z)). − · will be written infix.

(b) If f ∈ PR^{n+1}, then (∑ f) := (R(λx_{1}, …, x_{n}.0)(λx_{1}, …, x_{n}, y′, z.z + f(x_{1}, …, x_{n}, y′)))(y).

Remark 2.12 (a) a + 0 = a, a + S(b) = S(a + b), therefore + is ordinary addition.

(b) a · 0 = 0, a · (b + 1) = (a · b) + a, therefore · is multiplication.

(c) pred(0) = 0, pred(b + 1) = b.

(d) a− · 0 = a, a− · (b + 1) = pred(a− · b),

therefore a− · b = \begin{cases}a − b & if b ≤ a \\ 0 & otherwise. \end{cases}

(e) (∑ f)(a⃗, 0) = 0, (∑ f)(a⃗, b + 1) = (∑ f)(a⃗, b) + f(a⃗, b), therefore (∑ f)(a⃗, b) = ∑_{i<b} f(a⃗, i).

Remark 2.13 A relation R ⊆ ℕ^{n} is primitive recursive, iff there exists an f ∈ PR^{n} such that R = {a⃗ ∈ ℕ^{n} | f(a⃗) = 0}.

Proof: λx⃗.1− · g(x⃗) switches between g = χ_{R} and g = f as in the lemma.

Definition 2.14 of some formulas in the language L_{PR}.

(a) s ≤ t := s− · t = 0; s < t := S(s) ≤ t.

(b) ∀x < t.A := ∀x.x < t → A, ∃x < t.A := ∃x.x < t ∧ A (x ∉ FV(t)).

(c) ∀x ≤ t.A := ∀x.x ≤ t → A, ∃x ≤ t.A := ∃x.x ≤ t ∧ A (x ∉ FV(t)).

Definition 2.15 The set of Δ_{0}-formulas of the language L_{PR}, which is a subset of the formulas is inductively defined by:

1. Every prime formula of PR is a Δ_{0}-formula.

2. If A, B are Δ_{0} formulas, so is A → B.

3. If A is a Δ_{0}-formula and t is a PR-term such that x ∉ FV(t), then ∀x < t.A is a Δ_{0}-formula, too.

Remark 2.16 If A, B are Δ_{0}-formulas, t is a term, x ∉ FV(t), then ¬A,

A ∧ B, A ∨ B, ∃x < t.A, ^{∀ ∃} x ≤ t.A are (in N) equivalent to Δ_{0}-formulas. In this sense Δ_{0}-formulas are closed under ¬, ∧, ∨ and bounded ∃.

Proof: ¬A ⇔ A →⊥, A ∨ B ⇔ (¬A → B), A ∧ B ⇔ ¬(¬(A) ∨ ¬(B)), ∃x <

t.A ⇔ ¬(∀x < t.A), ^{∀ ∃} x ≤ t.A ⇔^{∀ ∃} x < S(t).A.

Lemma and Definition 2.17 (a) If A is a Δ_{0}-formula of the language L_{PR}, x_{1}, …, x_{n} are distinct and FV(A) ⊆ {x_{1}, …, x_{n}}. Then the relation {(a_{1}, …, a_{n}) ∈ ℕ^{n} | N ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}]} is primitive recursive. In this case we say, that R is defined by the Δ_{0}- formula A.

(b) On the other hand, every primitive recursive relation can be defined by a Δ_{0}-formula.

Proof: (a): We define by induction on the definition of A PR-terms r_{A} such that FV(r_{A}) = FV(A) and if FV(A) ⊆ {x_{1}, …, x_{n}}, x_{i} distinct, then

(r_{A})^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = 0 ⇔ N ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}] .

Then with f := λx_{1}, …, x_{n}.r_{A} according to Lemma 2.13 follows the assertion.

1. A =⊥: r_{A} := S ∘ 0.

2. A = (s = t): r_{A} := (s− · t) + (t− · s).

3. A = B → C: r_{A} := (1− · r_{B}) · r_{C}.

4. A = ∀y < t.B, y ∉ FV(t): Let FV(A) = {x_{1}, …, x_{n}}, x_{i} distinct. f := λx_{1}, …, x_{n}, y.r_{B}. r_{A} := (∑ f)(x⃗, t). (b): A primitive recursive relation R can be defined by the Δ_{0}-formula χ_{R}(x⃗) = S ∘ 0.

Corollary 2.18 The set of primitive recursive relations is closed under ∩, ∪, \ (difference), bounded quantification and replacement by primitive recursive functions (i.e. if R ⊆ ℕ^{k} is a primitive recursive relation, f_{i} : ℕ^{n} → ℕ (i = 1, …, k), then the subset of ℕ^{n} {(n⃗) | R(f_{1}(n⃗), …, f_{k}(n⃗))} is primitive recursive, too.

Proof: The new relation can always be written as a Δ_{0}-formula.

Lemma 2.19 If f_{1}, …, f_{k+1} ∈ PR^{n} and R_{1}, …, R_{k} ⊆ ℕ^{n} are pairwise disjoint primitive recursive relations, then the function

f : ℕ^{n} → ℕ, f(a⃗) := \begin{cases}f_{1}(a⃗) & if a⃗ ∈ R_{1}, \\ ⋯ & ⋯ \\ f_{k}(a⃗) & if a⃗ ∈ R_{k}, \\ f_{k+1}(a⃗) & otherwise \end{cases}

is primitive recursive.

Proof: Let R_{k+1} := ℕ^{n} \ (R_{1} ∪ ⋯ ∪ R_{k}). f := λx⃗.(f_{1}(x⃗)χ_{R_{1}}(x⃗) + ⋯ + f_{k+1}(x⃗)χ_{R_{k+1}}(x⃗)).

Lemma 2.20 Assume g : ℕ^{n+1} → ℕ primitive recursive. Then (a) \overline{μ}g is primitive recursive.

(b) If there exists an h ∈ PR^{n+1} such that ∀a⃗ ∈ ℕ^{n}∃i < h(a⃗).g(a⃗, i) = 0, then (μg) is primitive recursive, too.

Proof:

(a) p : ℕ^{n+1} → ℕ, p(a⃗, c) := \begin{cases}c & if c < b ∧ g(a⃗, c) = 0 ∧ ∀i < c.g(a⃗, i) ≠ 0 \\ b & if c = b ∧ ∀i < b.g(a⃗, i) ≠ 0 \\ 0 & otherwise \end{cases} is

primitive recursive. (\overline{μ}g)(a⃗, b) = (∑ p)(a⃗, S(b)).

(b) (μg)(a⃗) = (\overline{μ}g)(a⃗, h(a⃗)).

Definition 2.21 Let π : ℕ^{2} → ℕ, π(a, b) := (∑_{i<a+b}(i + 1)) + b = (∑ S)(a + b) + b.

Lemma 2.22 (a) π : ℕ^{2} → ℕ is bijective.

(b) a, b ≤ π(a, b).

0 < a ⇒ b < π(a, b).

Remark: The picture is like this:

\begin{matrix}0 = π(0, 0) & 2 = π(0, 1) & 5 = π(0, 2) & 9 = π(0, 3) & ⋯ \\ 1 = π(1, 0) & 4 = π(1, 1) & 8 = π(1, 2) & ⋯ & ⋯ \\ 3 = π(2, 0) & 7 = π(2, 1) & ⋯ & ⋯ & ⋯ \\ 6 = π(3, 0) & ⋯ & ⋯ & ⋯ & ⋯ \\ ⋯ & ⋯ & ⋯ & ⋯ & ⋯ \end{matrix}

Proof: (a): Let f(c) := ∑_{i<c}(i+1). f(c) is monotone, f(0) = 0, f(c+1) = f(c)+c+1. Assume π(a, b) = π(a′, b′). Then f(a + b) ≤ π(a + b) < f(a + b + 1), f(a′ + b′) ≤ π(a′ + b′) < f(a′ + b′ + 1), a + b = a′ + b′, b = π(a, b) − f(a + b) = π(a′, b′) − f(a′ + b′) = b′, a = a′. Further if n ∈ ℕ, there exists some c such that f(c) ≤ n < f(c + 1). 0 ≤ b := n − f(c) < c + 1. 0 ≤ a := c − b, π(a, b) = f(c) + b = n.

(b) is clear.

Definition 2.23 π_{1}(c) := μa < S(c).∃b ≤ c.c = π(a, b). π_{2}(c) := μb < S(c).c = π(π_{1}(c), b).

Remark 2.24 π_{1}, π_{2} are primitive recursive, π_{1}(π(a, b)) = a, π_{2}(π(a, b)) = b, c = π(π_{1}(c), π_{2}(c)).

Proof: By 2.22.

Definition 2.25 (coding of finite sequences) a ∗ <b> := π(a, b) + 1. π_{i}^{−}(a) := π_{i}(a− · 1) (i = 1, 2). τ(a, 0) := a, τ(a, k + 1) := π_{1}^{−}(τ(a, k)). (obviously τ(a, k) ≠ 0 ⇒ τ(a, k + 1) < τ(a, k)). lh(a) := μk < S(a).τ(a, k) = 0.

(a)_{i} := \begin{cases}π_{2}^{−}(τ(a, lh(a)− · (i + 1))) & if i < lh(a) \\ 0 & otherwise. \end{cases}

<> := 0, <a_{1}, …, a_{n+1}> := <a_{1}, …, a_{n}> ∗ <a_{n+1}>.

Lemma 2.26 (a) The functions (a, b) ↦ a∗<b>, π_{i}^{−}, τ, lh, (a, i) ↦ (a)_{i} are obviously primitive recursive.

(b) lh(a ∗ <b>) = lh(a) + 1, (a ∗ <b>)_{lh(a)} = b, (a ∗ <b>)_{i} = (a)_{i} if i < lh(a).

(c) i < lh(a) ⇒ (a)_{i} < a.

(d) (lh(c) = lh(c′) ∧ ∀i < lh(c).(c)_{i} = (c′)_{i}) ⇒ c = c′.

(e) lh(<a_{0}, …, a_{n−1}>) = n, (<a_{0}, …, a_{n−1}>)_{i} = a_{i} (i < n). a = <(a)_{0}, …, (a)_{n−1}> with n := lh(a).

Proof: (a): clear. (b): c := a ∗ <b>. τ(c, i + 1) = τ(a, i), τ(c, 0) ≠ 0. Therefore lh(c) = lh(a) + 1, (c)_{lh(a)} = π_{2}^{−}τ(c, lh(c)− · (lh(a) + 1)) = π_{2}^{−}(τ(c, 0)) = π_{2}^{−}(c) = b, and if i < lh(a), (c)_{i} = π_{2}^{−}(τ(c, lh(c)− · (i + 1))) = π_{2}^{−}(τ(c, lh(a) − i + 1)) = π_{2}^{−}(τ(a, lh(a)− · i)) = (a)_{i}.

(c) (a)_{i} = π_{2}^{−}(τ(a, j)) < τ(a, j) ≤ a for some j.

(d) Induction on lh(c): If lh(c) = 0, then c = 0 = c′. lh(c) = k + 1: c = a ∗ <b>, c′ = a′ ∗ <b′> for some a, b, a′, b′. b = (c)_{lh(c)} = (c′)_{lh(c′)} = b′, lh(a) = lh(c)− · 1 = lh(a′), (a)_{i} = (c)_{i} = (c′)_{i} = (a′)_{i} for i < lh(a), by IH a = a′, c = c′.

(e) By (b) and (d).

Definition 2.27 If f : ℕ^{n+1} → ℕ, then let \overline{f} : ℕ^{n+1} → ℕ, \overline{f}(a⃗, b) := <f(a⃗, 0), …, f(a⃗, b)>.

Remark 2.28 f ∈ PR^{n+1} iff \overline{f} ∈ PR^{n+1}.

Proof: “⇒”: \overline{f}(a⃗, 0) = <>, \overline{f}(a⃗, b + 1) = \overline{f}(a⃗, b) ∗ <f(a⃗, b)>. “⇐”: f(a⃗, n) = (\overline{f}(a⃗, n + 1))_{n}.

Lemma 2.29 (Course of value recursion).

(a) If g ∈ PR^{n+2}, then f : ℕ^{n+1} → ℕ, f(a⃗, b) := g(a⃗, b, \overline{f}(a⃗, b)) is primitive recursive.

(b) If R ⊆ ℕ^{n+2} is primitive recursive, Q ⊆ ℕ^{n+1} such that ∀(a⃗, b) ∈ ℕ^{n+1}[(a⃗, b) ∈ Q ⇔ (a⃗, b, \overline{χ_{Q}}(a⃗, b)) ∈ R]. Then Q is primitive recursive.

Proof:

(a) \overline{f}(a⃗, 0) = <>, \overline{f}(a⃗, b+1) = \overline{f}(a⃗, b)∗<g(a⃗, b, \overline{f}(a⃗, b))>, therefore \overline{f} is primitive recursive, f is primitive recursive. (b) χ_{Q}(a⃗, b) = χ_{R}(a⃗, b, \overline{χ_{Q}}(a⃗, b)).

Lemma 2.29a Assume g ∈ PR^{k}, h ∈ PR^{k+1+l}, k_{1}, …, k_{l} ∈ PR^{k+1}, ∀a⃗, n.k(a⃗, n) ≤ n, Let f : ℕ^{k+1} → ℕ, f(a⃗, 0) := g(a⃗), f(a⃗, n + 1) := h(a⃗, n, f(a⃗, k_{1}(a⃗, n)), …, f(a⃗, k_{l}(a⃗, n))). Then f ∈ PR^{n+1}.

Proof:

f(a⃗, n) = \begin{cases}g(a⃗) & if n = 0 \\ h(a⃗, n− · 1, \overline{f}(a⃗, n)_{k_{1}(a⃗,n− · 1)}, …, \overline{f}(a⃗, n)_{k_{l}(a⃗,n− · 1)}) & otherwise . \end{cases}

2.3 Recursive enumerable relations

Definition 2.30 A relation Q ⊆ ℕ^{n} is called recursive enumerable, iff there exists a primitive recursive relation R ⊆ ℕ^{n+1} such that Q = {a⃗ ∈ ℕ^{n} | ∃b.(a⃗, b) ∈ R}.

Remark 2.31 (a) Every primitive recursive relation Q is recursive enumerable.

(b) ∅ ≠ Q ⊆ ℕ^{k} is recursive enumerable, iff Q = {(f_{1}(n), …, f_{k}(n)) | n ∈ ℕ} for some f_{1}, …, f_{k} ∈ PR^{1}.

Proof:

(a) R := Q × ℕ.

(b) “⇒” Let R be as in the definition of recursive enumerable, (a_{1}, …, a_{k}) ∈ Q,

define f_{j} : ℕ → ℕ, f_{j}(n) := \begin{cases}(n)_{j} & if R((n)_{0}, …, (n)_{k}, (n)_{k+1}) \\ a_{j} & otherwise. \end{cases}

One sees immediately (f_{1}(n), …, f_{k}(n)) ∈ Q, and if (a_{1}, …, a_{n}) ∈ Q, R(a_{1}, …, a_{n}, b), then f_{j}(<a_{1}, …, a_{n}, b>) = a_{j}. “⇐” R(a, b) :⇔ a = f(b).

Definition 2.32 Inductive definition of the extended Σ_{1}-formulas:

1. If A is Δ_{0}, then A is an extended Σ_{1} formula.

2. If A, B are extended Σ_{1}-formulas, x a variable, t a term, x ∉ FV(t), then A ∧ B, A ∨ B, ∃x.A, ∀x < t.A are extended Σ_{1}-formulas.

Lemma 2.33 A relation Q ⊆ ℕ^{n} is recursive enumerable, iff it can be defined by an extended Σ_{1} formula, i.e. Q = {(a_{1}, …, a_{n}) ∈ ℕ^{n} | N ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}]} for some distinct variables x_{1}, …, x_{n} and extended Σ_{1}- formula A with FV(A) ⊆ {x_{1}, …, x_{n}}.

Proof: A strict Σ_{1}-formula (often called just Σ-formula) is a formula ∃z.C where C is Δ_{0}. By Lemma 2.17 the recursive enumerable relations are exactly those definable by a strict Σ_{1}-formula. Therefore it suffices to show that for every extended Σ_{1}-formula A there exists a strict Σ_{1} formula A′ such that FV(A) = FV(A′) and if FV(A) ⊆ {x_{1}, …, x_{n}}, N ⊧ ∀x_{1}, …, x_{n}.(A ↔ A′):

1. If A is Δ_{0} let A′ := ∃z.A such that z ∉ FV(A).

2. Let A′_{i} := ∃x_{i}.A′′_{i}, i = 1, 2, x ∉ FV(A_{1}) ∪ BV(A_{1}) ∪ FV(A_{2}) ∪ FV(t) ∪ {x_{1}}, w.l.o.g. x_{1} ∉ BV(A_{1}). (A_{1} ∧ ∨ B_{1})′ := ∃x(A′′_{1}[x_{1} := π_{1}(x)] ∧ ∨ A′′_{2}[x_{2} := π_{2}(x)]), (∃z.A_{1})′ := ∃x.A′′_{1}[z := π_{1}(x), x_{1} := π_{2}(x)]. (∀z < t.A)′ := ∃x.∀z < t.∃x_{1} < x.A′′_{1}.

2.4 Recursive functions

Partial recursive functions will be what will be later referred to as the computable functions. At first sight it is not clear that they will capture the notion of computability. After some work we will be able to see, that programs can be represented by partial recursive functions.

Definition 2.34 (a) A function f : ℕ^{n} →_{par} ℕ is partial recursive, iff the relation Graph(f) := {(a⃗, b) | f(a⃗) ≃ b} is recursive enumerable.

(b) A recursive function is a partial recursive function, which is total.

(c) A relation R ⊆ ℕ^{n} is recursive, iff its characteristic function χ_{R} is recursive.

Lemma 2.34a If f is primitive recursive, then it is recursive.

Proof: f primitive recursive ⇒ Graph(f) primitive recursive ⇒ Graph(f) recursive enumerable ⇒ f partial recursive, and since f is total, f is recursive.

Lemma 2.35 (a) A relation Q ⊆ ℕ^{n} is recursive, iff Q and ℕ^{n} \ Q are recursive enumerable. Especially if Q is recursive, then it is recursive enumerable, too.

(b) f : ℕ^{n} → ℕ is recursive, iff Graph(f) is recursive.

(c) A relation Q ⊆ ℕ^{n} is recursive enumerable, iff it is the domain of a n-ary partial recursive function.

(d) The set of n-ary partial recursive (recursive) functions is R_{par}^{n} (R^{n}). Here for n ∈ ℕ R^{n} are simultaneously defined by

1. 0^{n} ∈ R^{n}, S ∈ R^{1}, proj_{i}^{n} ∈ R^{n}, (1 ≤ i ≤ n).

2. h ∈ R^{m}, m ≥ 1, g_{i} ∈ R^{n} (i = 1, …, m), then h ∘ (g_{1}, …, g_{m}) ∈ R^{n}.

3. If g ∈ R^{n}, h ∈ R^{n+2}, then (Rgh) ∈ R^{n+1}.

4. If n ≥ 1, g ∈ R^{n+1}, for all a⃗ ∈ ℕ^{n} there exists i such that g(a⃗, i) = 0,

then (μg) ∈ R^{n}.

Further R_{par}^{n} is defined as R^{n}, but without the condition on existence of an i such that g(a⃗, i) = 0 in 4.

R := ⋃_{n∈ℕ} R^{n}, R_{par} := ⋃_{n∈ℕ} R_{par}^{n}.

Proof:

(a) “⇐”: χ_{Q}(a⃗) = b ⇔ (a⃗ ∈ Q ∧ b = 1) ∨ (a⃗ ∈ ℕ^{n} \ Q ∧ b = 0), therefore Graph(χ_{Q}) is recursive enumerable. “⇒”: G := Graph(χ_{Q}) is recursive enumerable, a⃗ ∈ Q ⇔ (a⃗, 1) ∈ G, a⃗ ∈ ℕ^{n} \ Q ⇔ (a⃗, 0) ∈ G, Q, ℕ^{n} \ Q are recursive enumerable.

(b) If f is recursive, then Graph(f) recursive enumerable, ℕ^{n+1} \ Graph(f) = {(a⃗, b)∃i((a⃗, i) ∈ Graph(f) ∧ i ≠ b}. If Graph(f) is recursive, then by (a) it is recursive enumerable, too.

(c) Let Q be recursive enumerable. Then Q = {a⃗ | ∃b.R(a⃗, b)} for some primitive recursive R. Let f(a⃗) ≃ b ⇔ R(a⃗, b) ∧ ∀b′ < b.¬R(a⃗, b′). Graph(f) is primitive recursive, therefore recursive enumerable and dom(f) = Q. Let Q = dom(f), f partial recursive, Graph(f) = {(a⃗, b) | ∃c.R(a⃗, b, c)}, R primitive recursive. Q = {a⃗ | ∃b.f(a⃗) ≃ b} = {a⃗ | ∃b, c.R(a⃗, b, c)}, therefore recursive enumerable.

(d) Proof for “recursive”. For “partial recursive” the proof is similar. Every recursive function is in R: If f : ℕ^{n} → ℕ, Graph(f) is recursive enumerable. Let f(a⃗) = b ⇔ ∃i.g(a⃗, b, i) = 0, for some primitive recursive function g. Then f(a⃗) = π_{1}(μz.g(a⃗, π_{1}(z), π_{2}(z)) = 0, f = π_{1} ∘ μh, where let h : ℕ^{n+1} → ℕ, h(a⃗, z) := g(a⃗, π_{1}(z), π_{2}(z)). h, π_{1} are primitive recursive therefore in R. ∀a⃗∃i.h(a⃗, i) = 0, therefore f in R^{n}. In the other direction we have to show, that the set of recursive functions is closed under 1. - 4.:

1. the functions are primitive recursive, therefore its Graph is primitive recursive, therefore recursive enumerable.

2. h ∘ (g_{1}, …, g_{n})(a⃗) = c ⇔ ∃b_{1}, …, b_{n}.g_{1}(a⃗) = b_{1} ∧ ⋯ ∧ g_{n}(a⃗) = b_{n} ∧ h(b_{1}, …, b_{n}) = c.

3. (Rgh)(a⃗, b) = c ⇔ ∃c[(c)_{0} = g(a⃗) ∧ ∀i < b.((c)_{i+1} = h(a⃗, i, (c)_{i}) ∧ c = (c)_{b}].

4. (μg)(a⃗) = b ⇔ g(a⃗, b) = 0 ∧ ∀i < b.∃c.(c ≠ 0 ∧ g(a⃗, i) = c).

2.5 Computability

The goal is to define a mathematical structure which captures the notion of computability. More precisely we want to give mathematical precise notions for “decision procedure” and “effective procedure for a function f” as defined as follows:

Assume M is a set of “concrete objects” (like formulas, natural numbers), X ⊆ M. A decision procedure for X relative to M is a method, which for every a ∈ M after finitely many steps determines, whether a belongs to X or not. X is decidable (relative to M), iff a decision procedure for X relative to M exists. Let F : M → N, M, N sets of concrete objects. An effective procedure for F is a method, which for every given a ∈ M calculates the value F (a) in finitely many steps. F is computable, iff an effective procedure for F exists. Let F be a partial function from M to N, i.e. there exists dom(F) ⊆ M, F : dom(F) → N. An effective procedure for F is a method, which for a ∈ M calculates, in case a ∈ dom(F), the value F (a) in finitely many steps, for a ∉ M it might not terminate. F is computable, iff an effective procedure for F exists. A decision/computational problem is the question, whether for a given set or relations/functions/partial functions there exists a decision procedure/effective procedure. Remark: Every decision problem can be regarded as a computational problem

for the function χ_{X} : M → \{0, 1\}, χ_{X}(a) := \begin{cases}1 & if a ∈ X \\ 0 & otherwise. \end{cases}

What is a method?

1. Mechanically (not using random procedure, oracles, intelligence, intuition).

2. Can be performed by an ideal machine (no upper bound on time and space available).

Church’s Thesis A function f : ℕ^{n} → ℕ is computable iff it is recursive. A n-ary partial function f is computable iff it is partial recursive. A relation Q ⊆ ℕ^{n} is decidable iff it is recursive.

It suffices to treat only the first of the two statements. That every recursive/partial recursive function is computable can be seen by checking by induction on the definition of R in lemma 2.35 (c), that every function in R is computable. The other direction is a more sophisticated problem: Church’s Thesis is not a mathematical theorem, but a philosophical statement, which can not be proved. Several machine models have been developed, which all compute the set of recursive/partial recursive functions. Therefore the theory of recursive functions is stable. More details will be given in a course on recursion theory, Turing machines etc. We sketch, how a program in some programming language can be seen to be recursive (provided the program terminates on every input value). This should cover at least all possible assembler languages, in which higher programming languages are translated. We assume that a program consists of a finite number of statements, numbered by natural numbers, and uses a finite number of registers containing natural numbers. A state of the program would then be a tuple (a_{1}, …, a_{n}, i), where i is the number of statement currently active and a_{i} is the content of the i-th register (iff only these n registers are used). In a reasonable programming language, it should be possible to determine from a_{1}, …, a_{n}, i by an easy, therefore primitive recursive function, which is the next program statement and the content of the registers a_{i}, further to determine whether the program has stopped. We code the state as above as a sequence <a_{1}, …, a_{n}, i>, and we have now primitive recursive functions f, g : ℕ → ℕ an f(<a_{1}, …, a_{n}, i>) is the code for the next state and g(<a_{1}, …, a_{n}, i>) = 0 if the program stops at state (a_{1}, …, a_{n}, i). Let h : ℕ^{2} → ℕ, h(a, 0) := a, h(a, n + 1) := f(h(a, n)). h(a, n) is the code of the state of the program after n program steps. Assume that the input of the program is contained in a_{1}, …, a_{k}, the result in a_{n}, that at the beginning a_{k+1} = ⋯ = a_{n} = 0 and that we start with program statement 1. Further assume that for every choice a_{1}, …, a_{k}, the program starting as above eventually terminates. Let f_{0} : ℕ^{k} → ℕ be the function calculated by the program. Let h_{0} : ℕ^{k+1} → ℕ, h_{0}(a_{1}, …, a_{k}, n) := h(<a_{1}, …, a_{k}, 0, …, 0, 1>, n). Then f_{0} has the form f_{0}(a⃗) = (h_{0}(a⃗, μx.g(h_{0}(a⃗, x)) = 0))_{n} and is therefore recursive. If we drop the assumption that the program terminates, we get with the same argument that the partial function f_{0} calculated by the program is partial recursive.

34 CHAPTER 2. RECURSION THEORY, PART 1

Gödel’s first incompleteness theorem

We will follow very closely [Buc93b].

3.1 Coding of Logic

Warning This chapter will be very formal. It is not necessary to understand every single detail, but it to get an understanding why in principle the coding we are going to do is possible and how to do it in this setting and in any other formalization of logic. There are of course many variations of codings, especially the concrete predicate calculus used can of course be replaced by any other complete standard calculus of predicate logic.

Gödel’s incompleteness theorems are based on reasoning in a theory about the theory itself. The step from philosophical logic to mathematical logic was to start to reason about logic and mathematics using mathematical methods. Gödel pushed this further on by starting to reason about a theory in the theory itself, which naturally led to limitations. His incompleteness theorems are about the limits of what a theory can prove about itself. In order to be able to reason about the theory itself we are working in, we need to have terms, formulas, proofs as objects of the language. Gödel showed that this can be done by coding these objects as natural numbers, if apart from some weak requirements we have natural numbers as basic objects. Before Gödel, the techniques were available, but most people thought that it is too complicated to carry this out. Gödel overcame this mental block. We assume here, that we can have the natural numbers in our logical system. We then have to code terms, formulas, proofs etc. in our system and will do this by coding them as natural numbers. This will be done in a primitive recursive way.

Such a process of coding complicated structure as natural numbers is usually called Gödelization.

Definition 3.1 (a) The Gödelization of a set X is an injective function ⌜·⌝ : X → ℕ, where we write ⌜x⌝ for ⌜·⌝(x), such that ⌜X⌝ := {⌜x⌝ | x ∈ X} is primitive recursive. We will in most (but not all) cases write the same symbol ⌜·⌝ for a Göelization.

(b) Let X_{1}, …, X_{n}, X be sets with associated Gödelization ⌜·⌝, M ⊆ X_{1}×X_{n}. ⌜M⌝ := {(⌜u_{1}⌝, …, ⌜u_{n}⌝) | (u_{1}, …, u_{n}) ∈ M}. If f : M → X, then f_{⌜·⌝} : ⌜M⌝ → ⌜X⌝, f_{⌜·⌝}(⌜u_{1}⌝, …, ⌜u_{n}⌝) := ⌜f(u_{1}, …, u_{n})⌝. If the Gödelization is denoted by ⌜·⌝, f̃:= f_{⌜·⌝}. M, f are primitive recursive, (recursive, recursive enumerable) if ⌜M⌝, f̃ are. If M, f are written infix, ⌜M⌝, f̃ will be sometimes written infix, too.

(c) Let ⌜n⌝ := n for n ∈ ℕ. Obviously ⌜·⌝ is a Gödelization for ℕ.

Definition 3.2 (a) Let \underline{Fun}, \underline{Rel}, \underline{Var}, \underline{Junc}, \underline{Quant} be different natural numbers. (so a ↦ \underline{a} is a Gödelization on the finite set \{Fun, Rel, Var, Junc\}).

(b) A primitive recursively represented language is a pair (L, enum) such that L is a language, enum is a Gödelization of L, enum(f) = <n, \underline{Fun}, i> for some i, if f is an n-ary function symbol, and enum(R) = <n, \underline{Rel}, i> for some i ≠ 0, if R is an n-ary relation symbol.

(c) Let in the following (L, enum) be a primitive recursively represented language, and assume that all function and relation symbols belong to L, if not stated differently. Further term, formula etc. refers to L as well. Abbreviation: (a)_{i,j} := ((a)_{i})_{j}.

Definition 3.3 (a) A formula A is called n-ary, iff FV(A) ⊆ {v_{1}, …, v_{n}) (v_{i} is the ith variable). In this case we write A(t_{1}, …, t_{n}) for A[v_{1} := t_{1}, …, v_{n} := t_{n}], and M ⊧ A[a_{1}, …, a_{n}] for M ⊧ A[v_{1} := a_{1}, …, v_{n} := a_{n}].

(b) Junc := {∧, ∨, →, ¬}.

Quant := {∀, ∃}. L^{+} := L ∪ {⊥}, L_{Fun} is the set of function symbols and L_{Rel} the set of relation symbols of L.

(c) Var is the set of variables, Term the set of terms, Prim the set of prime formulas, For the set of formulas. For_{arity} := {(n, A) | A is an n-ary formula }. For^{n} := {A | (n, A) ∈ For_{arity}}. FV := {(x, u) | u is an expression and x ∈ FV(u)}. subst := {(u, x, t) | t is substitutable for x in u, u a formula or term}.

Definition 3.4 (omitted)

Definition 3.5 coding of all expressions of a language:

(a) We extend enum : L → ℕ to {⊥} ∪ Var ∪ Junc ∪ Quant (i.e. all symbols used to built up terms and formulas) by defining

enum(v_{i}) := <0, \underline{Var}, i>(v_{i} being the i-th variable)
enum(∧) := <2, \underline{Junc}, 0>,
enum(∨) := <2, \underline{Junc}, 1>,
enum(→) := <2, \underline{Junc}, 2>,
enum(¬) := <1, \underline{Junc}, 3>,
enum(⊥) := <0, \underline{Rel}, 0>,
enum(∀) := <2, \underline{Quant}, 0>,
enum(∃) := <2, \underline{Quant}, 1>.

(Note that enum[L^{+}], enum[L_{Fun}], enum[L_{Rel}] are primitive recursive).

(b) arity(a) := (a)_{0}. (For p ∈ L^{+} ∪ Junc ∪ Quant ∪ Var, arity(enum(p)) is the arity of p, where variables have arity 0, quantifiers arity 2).

(c) A Gödelization of expressions is given by:

⌜v_{i}⌝ := <enum(v_{i})>, ⌜p(u_{1}, …, u_{n})⌝ := <enum(p), ⌜u_{1}⌝, …, ⌜u_{n}⌝>. (p ∈ L^{+} ∪ Junc.

⌜^{∀ ∃} xA⌝ := <enum(^{∀ ∃}), ⌜x⌝, ⌜A⌝>.

(d) To abstract from the notations we define:

Op(a) := (a)_{0}, (so Op(⌜p(u_{1}, …, u_{n})⌝) = enum(p)). If p ∈ L^{+} ∪ Junc ∪ Quant of arity n, p can be regarded as a function of n-tuples of terms, formulas or variables and formulas into terms/formulas and therefore p̃(a_{1}, …, a_{n}) := <enum(p), a_{1}, …, a_{n}>, which will be sometimes, following the conventions in Definition 3.1ab be written infix, if p is written infix. fst(a) := (a)_{1}, snd(a) = (a)_{2}. (So if p ∈ {∧, ∨, →}, ⌜A p B⌝ = (⌜A⌝ p̃⌜B⌝), fst(⌜A j B⌝) = ⌜A⌝, snd(⌜A j B⌝) = ⌜B⌝. ⌜¬A⌝ = ˜¬(⌜A⌝), fst(⌜¬A⌝) = ⌜A⌝.

⌜^{∀ ∃} x.A⌝ = _{∀ ∃}(⌜x⌝, ⌜A⌝), fst(⌜^{∀ ∃} x.A⌝) = ⌜x⌝,

snd(⌜^{∀ ∃} x.A⌝) = ⌜A⌝).

(e) For p ∈ {∧, ∨, →}, For_{p}(A) :⇔ A is of the form B p C. For p ∈ Quant For_{p}(A) :⇔ A is of the form px.B. For_{¬}(A) :⇔ A is of the form ¬(A).

Lemma 3.6 (a) ⌜·⌝ is a Gödelization of Var, Term and For respectively. Especially Var, Term, For are primitive recursive (in the sense that ⌜Var⌝, ⌜Term⌝, ⌜For⌝ are primitive recursive).

(b) Prim, FV, For_{arity}, subst and For_{p} for p ∈ Junc ∪ Quant are primitive recursive.

Proof: ⌜·⌝ is obviously injective. The primitive recursiveness of the given sets and relations follows, since all Δ_{0}-definable relations are primitive recursive (Lemma 2.17, primitive recursive relations are closed under course-of-value-recursion (Lemma 2.29 (b)) and the following equivalences: (it suffices to look only at the first 2 or 3 equivalences in order to see, that the others will work as well).

a ∈ ⌜Var⌝ ⇔ a = <<0, \underline{Var}, (a)_{0,2}>>
a ∈ ⌜Term⌝ ⇔ a ∈ ⌜Var⌝∨
[Op(a) ∈ enum[L_{Fun}] ∧ arity(Op(a)) = lh(a)− · 1∧

∀i < lh(a)− · 1((a)_{i+1} ∈ ⌜Term⌝)]

⇔ a ∈ ⌜Var⌝∨
[Op(a) ∈ enum[L_{Fun}] ∧ arity(Op(a)) = lh(a)− · 1∧

∀i < lh(a)− · 1.(\overline{χ_{⌜Term⌝}}(a))_{(a)_{i+1}} = 1]

a ∈ ⌜Prim⌝ ⇔ lh(a) > 0 ∧ ∀i < lh(a)− · 1((a)_{i+1} ∈ ⌜Term⌝)∧

Op(a) ∈ enum[L_{Rel}] ∪ {enum(⊥)}∧ arity(Op(a)) = lh(a)− · 1

a ∈ ⌜For⌝ ⇔ a ∈ ⌜Prim⌝∨

[lh(a) = arity(Op(a)) + 1 ∧ Op(a) ∈ enum[Junc] ∧ ∀i < arity(Op(a)).(a)_{i+1} ∈ ⌜For⌝]∨

[lh(a) = 3 ∧ Op(a) ∈ enum[Quant] ∧ fst(a) ∈ ⌜Var⌝∧ snd(a) ∈ ⌜For⌝]

(x, a) ∈ ⌜FV⌝ ⇔ x ∈ ⌜Var⌝ ∧

[(a ∈ ⌜Var⌝ ∧ x = a)∨ [a ∈ ⌜For⌝ ∪ ⌜Term⌝∧

∃i < lh(Op(a)).⌜FV⌝(x, (a)_{i+1})∧ (Op(a) ∈ enum[Quant] → x ≠ fst(a))]]

(n, a) ∈ ⌜For_{arity}⌝ ⇔ a ∈ ⌜For⌝ ∧ ∀i < a((i, a) ∈ ⌜FV⌝ → 1 ≤ (i)_{0,2} ≤ n)
(a, x, c) ∈ ⌜subst⌝ ⇔ a ∈ ⌜For⌝ ∧ x ∈ ⌜Var⌝ ∧ c ∈ ⌜Term⌝∧

(a ∈ ⌜Prim⌝∨

(Op(a) ∈ enum[Junc] ∧ ∀i < arity(Op(a)). (((a)_{i+1}, x, c) ∈ ⌜subst⌝))∨ (Op(a) ∈ enum[Quant] ∧ ((x, a) ∈ ⌜FV⌝ →

(fst(a), c) ∉ ⌜FV⌝ ∧ (snd(a), x, c) ∈ ⌜subst⌝)))))

a ∈ ⌜For_{p}⌝ ⇔ a ∈ For ∧ Op(a) = enum(p)

Definition 3.7 Sub : ℕ^{3} → ℕ is defined by: Sub(a, b, c) :=

c  if a = b,
a  if (For_{∀}(a) ∨ For_{∃}(a)) ∧ fst(a) = b,
<Op(a), Sub((a)_{1}, b, c), …,  otherwise .
Sub((a)_{lh(a)− · 1}, b, c)>

Lemma 3.8 (a) Sub is primitive recursive.

(b) For u ∈ Term ∪ For, x ∈ Var, t ∈ Term, Sub(⌜u⌝, ⌜x⌝, ⌜t⌝) = ⌜u[x := t]⌝

Proof:

(a) Define g(a, d, 0) := <Op(a)>, g(a, d, m + 1) := g(a, d, m) ∗ <(d)_{(a)_{m+1}}>. g is primitive recursive and g(a, d, k) = <Op(a), (d)_{(a)_{1}}, …, (d)_{(a)_{k}}>. Let h(b, c, a) := Sub(a, b, c). Then

h(b, c, a) = \begin{cases}c & if a = b, \\ a & if (For_{∀}(a) ∨ For_{∃}(a)) ∧ snd(a) = b, \\ g(a, \overline{h}(b, c, a), lh(a)− · 1) & otherwise. \end{cases},

h is primitive recursive and Sub(a, b, c) = h(b, c, a) is primitive recursive. (b): Induction on the definition of u. Let ϕ(u) := Sub(⌜u⌝, ⌜x⌝, ⌜t⌝). If u = x, then ϕ(u) = ⌜t⌝ = ⌜u[x := t]⌝, and if u is a variable y, y ≠ x, then ⌜u⌝ = <enum(y)>, u ≠ ⌜x⌝, ϕ(u) = <Op(u)> = u = ⌜u[x := t]⌝. If u = fu_{1}, …, u_{n}, f ∈ L^{+} ∪ Junc. Then ⌜u⌝ = <enum(f), ⌜u_{1}⌝, …, ⌜u_{n}⌝>,

ϕ(u) = <enum(f), ϕ(u_{1}), …, ϕ(u_{n})>
{IH \atop =} <enum(f), ⌜u_{1}[x := t]⌝, …, ⌜u_{n}[x := t]⌝>
= ⌜u[x := t]⌝

If u =^{∀ ∃} y.A with y ≠ x, then ⌜u⌝ = <enum(^{∀ ∃}), ⌜y⌝, ⌜A⌝>,

ϕ(u) = <enum(^{∀ ∃}), ⌜y[x := t]⌝, ⌜A[x := t]⌝>
= <enum(^{∀ ∃}), ⌜y⌝, ⌜A[x := t]⌝>
= ⌜^{∀ ∃} y.A[x := t]⌝ = ⌜u[x := t]⌝

and if u =^{∀ ∃} x.A, then ϕ(u) = ⌜u⌝ = ⌜u[x := t]⌝.

We are now going to formalize proofs as natural numbers. We will therefore first introduce natural deduction proofs in a sequent like formulation, since this is easier to be formalized. This will be just another way of organizing the derivations:

Definition 3.9 (a) In the following Γ, Γ′, Γ′′, Γ′′′, Δ denote finite sequences of formulas. Γ ⊆ Δ iff all formulas in Γ occur in Δ, A ∈ Γ iff A occurs in Γ. Γ, A, sometimes written as Γ ∪ A, is the extension of the sequence of formulas Γ by one occurrence of the formula A. Γ \ A is the result of deleting all occurrences of A in Γ. ∅ is the empty sequence of formulas. FV_{seq}(x, Γ) :⇔ x is a free variable in one of the formulas in Γ.

(b) The sequence-like calculus of natural deduction SND derives assertions Γ ⇒ A where Γ is a sequence of formulas and A is a formula (of a language L). A statement Γ ⇒ A should be read as: under assumptions Γ follows A.

The following are the rules of SND:

(Intro) Γ ⇒ A  (A ∈ Γ)
(∧^{+}) \frac{Γ ⇒ A  Γ ⇒ B}{Γ ⇒ A ∧ B}
(∧_{1}^{−}) \frac{Γ ⇒ A ∧ B}{Γ ⇒ A}
(∧_{2}^{−}) \frac{Γ ⇒ A ∧ B}{Γ ⇒ B}
(∨_{1}^{+}) \frac{Γ ⇒ A}{Γ ⇒ A ∨ B}
(∨_{2}^{+}) \frac{Γ ⇒ B}{Γ ⇒ A ∨ B}

(∨^{−}) \frac{Γ ⇒ A ∨ B Γ′ ⇒ C Γ′′ ⇒ C}{Γ′′′ ⇒ C} \begin{matrix}(Γ ⊆ Γ′′′; Γ′ ⊆ Γ′′′, A \\ Γ′′ ⊆ Γ′′′, B) \end{matrix}

(→^{+}) \frac{Γ ⇒ A}{Γ′ ⇒ B → A}  (Γ ⊆ Γ′, B)
(→^{−}) \frac{Γ ⇒ A Γ ⇒ A → B}{Γ ⇒ B}
(∀^{+})  \frac{Γ ⇒ A}{Γ ⇒′ ∀x.A}  (x ∉ FV(Γ), Γ ⊆ Γ′)

(∀^{−})

\frac{Γ ⇒ ∀x.A}{Γ ⇒ A[x := t]}

(t substitutable for x in A)

(∃^{+})

\frac{Γ ⇒ A[x := t]}{Γ ⇒ ∃x.A}

(t substitutable for x in A)

(∃^{−}) \frac{Γ ⇒ ∃xA Γ′ ⇒ B}{Γ′′ ⇒ B} (x ∉ FV(Γ′ \ A) ∪ FV(B) Γ ⊆ Γ′′; Γ′ ⊆ Γ′′, A)

(¬^{+}) \frac{Γ ⇒⊥}{Γ′ ⇒ ¬A}  (Γ ⊆ Γ′, A)
(¬^{−}) \frac{Γ ⇒ A Γ ⇒ ¬A}{Γ ⇒⊥}
(EFQ) \frac{Γ ⇒⊥}{Γ ⇒ C}
(Stab) \frac{Γ ⇒⊥}{Γ′ ⇒ A}  (Γ ⊆ Γ′, ¬A)

(c) Let Ruleset := {Intro, ∧^{+}, ∧_{1}^{−}, ∧_{2}^{−}, ∨_{1}^{+}, ∨_{2}^{+}, ∨^{−}, →^{+}, →^{−}, ∀^{+}, ∀^{−}, ∃^{+}, ∃^{−}, ¬^{+}, ¬^{−}, EFQ, Stab}. For r ∈ Ruleset let premnum(r) be the number of premises of r. If n := premnum(r), define Rule_{r}(Γ ⇒ A_{1}, …, Γ_{n} ⇒ A_{n}, Γ ⇒ B) :⇔

\frac{Γ_{1} ⇒ A_{1} ⋯ Γ_{n} ⇒ A_{n}}{Γ ⇒ B} is an instance of r.

(d) A proof in SND from a formulas Δ is a sequence (D_{1}, …, D_{n}) where n ≥ 1, D_{i} = Γ_{i} ⇒ A_{i} for some Γ_{i}, A_{i}, such that for each i ∈ {1, …, n}, A_{i} ∈ Δ or there is a r ∈ Ruleset and with k := premnum(r), i_{1}, …, i_{k} < i such that Rule(D_{i_{1}}, …, D_{i_{k}}, D_{i}). In this case D_{n} is called the end sequence of the proof. Let Proof_{Δ}(D_{1}, …, D_{n}) iff (D_{1}, …, D_{n}) is a proof. (D_{1}, …, D_{n}) is a proof of Γ ⇒ A from formulas Δ iff it is proof from formulas Δ with end sequence Γ ⇒ A. Δ ⊢ Γ ⇒ A :⇔Γ ⇒ A is provable from formulas Δ:⇔ there exists a proof of Γ ⇒ A from formulas Δ. Δ ⊢ A :⇔ Δ ⊢ ∅ ⇒ A.

Remark 3.10 A can be derived in ordinary natural deduction calculus from formulas Δ and assumptions contained in {A_{1}, …, A_{n}} iff Δ ⊢ A_{1}, …, A_{n} ⇒ A.

Proof: Both directions are immediate by induction on the derivation.

Definition 3.11 (a) The code of a sequence of formulas A_{1}, …, A_{n} ⌜A_{1}, …, A_{n}⌝ := <⌜A_{1}⌝, …, ⌜A_{n}⌝>. (especially ⌜∅⌝ = <>).

(b) ⌜Γ ⇒ A⌝ := π(⌜Γ⌝, ⌜A⌝).

Γ̃_{a} := π_{1}(a), Ã_{a} := π_{2}(a). (Therefore Γ̃_{⌜Γ⇒A⌝} = ⌜Γ⌝, Ã_{⌜Γ⇒A⌝} = ⌜A⌝).

(c) ⌜(Γ_{1} ⇒ A_{1}, …, Γ_{n} ⇒ A_{n})⌝ := <⌜Γ_{1} ⇒ A_{1}⌝, …, ⌜Γ_{n} ⇒ A_{n}⌝>.

(d) endseq(D_{1}, …, D_{n}) := D_{n}.

Lemma 3.12 (a) ⌜·⌝ is a Gödelization of Seq := {Γ | Γ sequence of formulas }. ⊆, ∈, FV_{seq} are primitive recursive (⌜⊆⌝, ⌜∈⌝ will be written infix). \, ∪ are primitive recursive (i.e. ˜\, ˜∪ are primitive recursive, written infix).

(b) For every rule r ∈ Ruleset Rule_{r} is primitive recursive.

(c) If Δ is primitive-recursive (recursive, recursive-enumerable), then Proof_{Δ} is primitive recursive (recursive, recursive-enumerable) as well. endseq is primitive recursive, i.e. there exists a unary primitive recursive function { \atop endseq} such that { \atop endseq}(⌜D_{1}, …, D_{n}⌝) = ⌜D_{n}⌝.

Proof: (a): ⌜:⌝Seq → ℕ is injective. Seq(a) ⇔ ∀i < lh(a).(a)_{i} ∈ ⌜For⌝. ⌜⊆⌝ (a, b) ⇔ Seq(a) ∧ Seq(b) ∧ ∀i < lh(a).∃j < lh(b).(a)_{i} = (b)_{j}. ⌜∈⌝ (a, b) ⇔ Seq(b) ∧ ∃i < lh(b).a = (b)_{i}. ⌜FV_{seq}⌝(a, b) ⇔ Var(a) ∧ Seq(b) ∧ ∃i < lh(b).⌜FV⌝(a, (b)_{i}). For the verification of the primitive recursiveness of ˜\ define first ˜\_{0} by:

˜\_{0}(n, m, 0) := <>, ˜\_{0}(n, m, k + 1) := \begin{cases}˜\_{0}(n, m, k) ∗ <(n)_{k}> & if (n)_{k} ≠ m, \\ ˜\_{0}(n, m, k) & otherwise. \end{cases}.

Now n ˜\ m := ˜\_{0}(n, m, lh(n)). n ˜∪ m := n ∗ <m>.

(b) If n = premnum(r), then Rule_{r}(a_{1}, …, a_{n}) ⇔ Γ̃_{a_{1}} ∈ ⌜Seq⌝ ∧ ⋯ Γ̃_{a_{n}} ∈ ⌜Seq⌝∧ Ã_{a_{1}} ∈ ⌜For⌝ ∧ ⋯ Ã_{a_{n}} ∈ ⌜For⌝∧ rule_{r}(Γ̃_{a_{1}}, Ã_{a_{1}}, …, Γ̃_{a_{n}}, Ã_{a_{n}}),

where rule_{r} are defined and verified to be primitive recursive by the following equivalences (in these we use G, G′, G′′, G′′′ for natural numbers usually denoting sequences) (not all cases have to be presented. Interesting are Intro, ∨^{−}, ∀^{+}, ∀^{−}).

rule_{Intro}(G, a) ⇔ a ⌜∈⌝ G.
rule_{∧^{+}}(G, a, G′, b, ⇔ G = G′ = G′′ ∧ c = a ˜∧ b.
G′′, c)
rule_{∧^{−}}(a, G, b, G′) ⇔ G = G′ ∧ a = b ˜∧ snd(a).
rule_{∧^{−}}(G, a, G′, b) ⇔ G′ = G ∧ a = fst(a) ˜∧ b.
rule_{∨_{1}^{+}}(G, a, G′, b) ⇔ G′ = G ∧ b = a ˜∨ snd(b).
rule_{∨_{2}^{+}}(G, a, G′, b) ⇔ G′ = G ∧ b = fst(b) ˜∨ snd(a).
rule_{∨^{−}}(G, a, G′, b, ⇔ b = c = d ∧ For_{∨}(a)∧
G′′, c, G′′′, d)  G ⌜⊆⌝ G′′′ ∧ G′ ⌜⊆⌝ G′′′ ˜∪ fst(a) ∧
G′′ ⌜⊆⌝ G′′′ ˜∪ snd(a).
rule_{→^{+}}(G, a, G′, b) ⇔ For_{→}(b) ∧ a = snd(b)∧
G ⌜⊆⌝ G′ ˜∪ fst(b).
rule_{→^{−}}(G, a, G′, b, ⇔ b = a ˜→ c ∧ G = G′ = G′′.
G′′, c)

rule_{∀^{+}}(G, a, G′, b) ⇔ G ⌜⊆⌝ G′ ∧ b = ˜∀(fst(b), a) ∧ ¬FV_{seq}(fst(b), G).
rule_{∀^{−}}(G, a, G′, b) ⇔ G = G′ ∧ For_{∀}(a)∧

∃w ≤ max{b, ⌜v_{0}⌝}.(⌜subst⌝(snd(a), fst(a), w)∧ b = Sub(snd(a), fst(a), w)).

(possibly w = ⌜v_{0}⌝ > b in case ¬⌜FV⌝(fst(a), snd(a)) necessary)

rule_{∃^{+}}(G, a, G′, b) ⇔ G = G′ ∧ For_{∃}(b)∧

∃w ≤ max{a, ⌜v_{0}⌝}.(⌜subst⌝(snd(b), fst(b), w)∧

a = Sub(snd(b), fst(b), w)).
rule_{∃^{−}}(G, a, G′, b, ⇔ b = c ∧ For_{∃}(a)∧
G′′, c)  ¬⌜FV⌝_{seq}(fst(a), G′ ˜\ snd(a)) ∧ ¬⌜FV⌝(fst(a), b)∧

G ⌜⊆⌝ G′′ ∧ G′ ⌜⊆⌝ G′′ ˜∪ snd(a).

rule_{¬^{+}}(G, a, G′, b) ⇔ For_{¬}(b) ∧ a = ⌜⊥⌝∧

G ⌜⊆⌝ G′ ˜∪ snd(b)

rule_{¬^{−}}(G, a, G′, b, ⇔ b = ˜¬(a) ∧ c = ⌜⊥⌝∧
G′′, c)  G = G′ = G′′
rule_{EFQ}(G, a, G′, b) ⇔ G = G′ ∧ a = ⌜⊥⌝.
rule_{Stab}(G, a, G′, b) ⇔ a = ⌜⊥⌝ ∧ G⌜⊆⌝G′ ˜∪ ˜¬(b).

(c)

⌜Proof_{Δ}⌝(n) ⇔ lh(n) ≥ 1∧

∀i < lh(n)(Γ̃_{(n)_{i}} ∈ Seq∧ (Ã_{(n)_{i}} ∈ ⌜Δ⌝∨

⋁_{r∈Ruleset}(∃i_{1}, …, i_{premnum(r)} < i.

Rule_{r}((n)_{i_{1}}, …, (n)_{i_{premnum(r)}}, (n)_{i}))).

{ \atop endseq}(n) := (n)_{lh(n)− · 1}.

Theorem 3.13 Assume that Σ is a recursive enumerable axiom system. Then {A | Σ ⊢ A} is recursive enumerable.

Proof: a ∈ {⌜A⌝ | Σ ⊢ A} ⇔ there exists a derivation <D_{0}, …, D_{n}> such that Γ̃_{D_{n}} = ⌜∅⌝ ∧ Ã_{D_{n}} = ⌜A⌝ ⇔ ∃b(Proof_{Σ}(b) ∧ Γ̃_{{ \atop endseq}(b)} = ⌜∅⌝ ∧ Ã_{{ \atop endseq}(b)} = a).

3.2 Recursive Axiom Systems and Representation of Relations and Functions

Definition 3.14 A theory T is recursively axiomatizable, if L(T) is primitive recursively represented and T has a recursive axiom system.

Lemma 3.15 Let T be a theory with primitive recursive represented language L(T). The following is equivalent:

(i) T is recursive enumerable

(ii) T has a primitive recursive axiom system.

(iii) T is recursive axiomatizable.

(iii) T has a a recursive enumerable axiom system.

Proof: Let L := L(T).

(i) ⇒ (ii): Let f ∈ PR^{1} such that ⌜T ⌝ = f(ℕ), g(n) the formula such that f(n) = ⌜g(n)⌝, B_{n} := g(0) ∧ (g(1) ∧ ⋯ (g(n − 1) ∧ g(n))). Σ := {B_{n} | n ∈ ℕ}. Σ is an axiom system for T. Further n ↦ ⌜B_{n}⌝ is primitive recursive, n < ⌜B_{n}⌝, therefore a ∈ ⌜Σ⌝ ⇔ ∃n < a(a = ⌜B_{n}⌝) is primitive recursive. (ii) ⇒ (iii) ⇒ (iv): trivial. (iv) ⇒ (i): theorem 3.13, For^{0} is primitive recursive, T = {A | Σ ⊢ A} ∩ For^{0}.

Theorem 3.16 If a theory T is recursive axiomatizable and complete, then T is recursive.

Proof: If T is inconsistent, T = For^{0}. Otherwise a ∉ ⌜T ⌝ ⇔ (a ∉ ⌜For^{0}⌝ ∨ ˜¬(a) ∈ ⌜T ⌝. By Lemma 3.15 and Lemma 2.35 (a) follows the assertion.

Definition 3.17 (a) A structure N_{1} in an extension of L_{ℕ} is L_{ℕ}-standard, if it is an expansion of N_{0} (see Definitions 1.21 and 1.6).

(b) For n ∈ ℕ we define the term \underline{n}: \underline{0} := 0, \underline{n + 1} := S(\underline{n}). These terms are called digits.

Remark 3.18 If N_{1} is a L_{ℕ}-standard structure, A an n-ary formula A, m_{1}, …, m_{n} ∈ ℕ then N_{1} ⊧ A[m_{1}, …, m_{n}] ⇔ N_{1} ⊧ A(\underline{m_{1}}, …, \underline{m_{n}}).

Definition 3.19 Let M be a L-structure. A relation R ⊆ |M|^{n} is defined by an n-ary formula A in M iff R = {(a_{1}, …, a_{n}) | M ⊧ A[a_{1}, …, a_{n}]}. It is definable, iff it is defined by an n-ary formula A. A function is in M defined by A or definable, iff this holds for its graph.

Definition 3.20 Let Σ be an axiom system in an extension of L_{ℕ} which proves the equality axioms.

(a) An n-ary formula A represents in Σ the relation R ⊆ ℕ^{n}, iff for all a_{1}, …, a_{n} ∈ ℕ we have

R(a_{1}, …, a_{n}) ⇒ Σ ⊢ A(\underline{a_{1}}, …, \underline{a_{n}})
¬R(a_{1}, …, a_{n}) ⇒ Σ ⊢ ¬A(\underline{a_{1}}, …, \underline{a_{n}}).

If only the first condition holds, then R represents R weakly.

(b) An n + 1 ary formula A represents in Σ the function f : ℕ^{n} → ℕ iff for all a⃗ ∈ ℕ^{n}, b ∈ ℕ we have

f(a⃗) = b ⇒ Σ ⊢ A(\underline{a⃗}, \underline{b}) ∧ ∀y(A(\underline{a⃗}, y) → y = \underline{b}).
f(a⃗) ≠ b ⇒ Σ ⊢ ¬A(\underline{a⃗}, \underline{b}).

(If Σ ⊢ ¬(\underline{b} = \underline{c}) for b ≠ c, the first condition implies the second).

(c) R ⊆ ℕ^{n} (f : ℕ^{n} → ℕ) are (weakly) representable in Σ if they are (weakly) represented in Σ by some formula A.

Remark 3.21 If N_{1} is L_{ℕ}-standard, and every primitive recursive relation can be defined in N_{1}, then every recursive enumerable relation can be defined in N_{1}, too.

Proof: Let R be n-ary, R(a⃗) ⇔ ∃x.Q(a⃗, x), Q primitive recursive. Let Q(a⃗, x) ⇔ N_{1} ⊧ A[a⃗, x]. Then R(a⃗) ⇔ N_{1} ⊧ ∃v_{n+1}.A[a⃗].

3.3 Incompleteness

Definition 3.22 Let s ∈ PR^{2}, s(a, k) := Sub(a, ⌜v_{1}⌝, ⌜\underline{k}⌝). (If A is unary, s(⌜A⌝, k) = ⌜A(\underline{k})⌝.)

Lemma 3.23 (Fixed point lemma).

(a) Let N_{1} be a L_{ℕ}-standard structure, in which the primitive recursive relation {(k, b) ∈ ℕ^{2} | s(k, k) = b} can be defined. Let D be a unary formula. Then there exists a sentence G such that N_{1} ⊧ G ↔ D(\underline{⌜G⌝}).

(b) Let Σ be an axiom system from which the equality axioms can be proved and in which λa.s(a, a) is representable, D be a unary L(Σ)-formula. Then there exists an L(Σ)-sentence G such that Σ ⊢ G ↔ D(\underline{⌜G⌝}).

Proof: (a) We give first a proof with some motivation and then the proof as a compact argument: Assume first that a function f : ℕ → ℕ which is defined by a formula A in N_{1}, i.e.

N_{1} ⊧ A(\underline{k}, \underline{b}) ⇔ f(k) = b .

Let for this f, A, C_{A} := ∃y(A(v_{1}, y) ∧ D(y)). Then we have

N_{1} ⊧ C_{A}(\underline{k}) ⇔ ∃b ∈ ℕ((N_{1} ⊧ A(\underline{k}, \underline{b})) ∧ N_{1} ⊧ D(\underline{b}))

⇔ ∃b(f(k) = b ∧ N_{1} ⊧ D(\underline{b}))
⇔ N_{1} ⊧ D(\underline{f(k)}) ,

i.e.

N_{1} ⊧ C_{A}(\underline{k}) ↔ D(\underline{f(k)}) .

If we have now k such that f(k) = ⌜C_{A}(\underline{k})⌝, then we have

N_{1} ⊧ C_{A}(\underline{k}) ↔ D(\underline{⌜C_{A}(\underline{k})⌝})

and with G := C_{A}(\underline{k}) follows the assertion. We cannot define f(k) := ⌜C_{A}(\underline{k})⌝, since C depends on A which defined f. However we can define f(k) such that f(⌜B⌝) = ⌜B(\underline{⌜B⌝})⌝ for unary formulas B, namely f(k) := s(k, k). This specific f can be represented by assumption by some A and if we define k := ⌜C_{A}⌝, then we get f(k) = f(⌜C_{A}⌝) = ⌜C_{A}(\underline{⌜C_{A}⌝})⌝ = ⌜C_{A}(\underline{k})⌝ and are done. The compact proof is as follows: Let \{(k, b) ∈ ℕ^{2} | s(k, k) = b\} be defined by the formula A, i.e. N_{1} ⊧ A(\underline{k}, \underline{b}) ⇔ s(k, k) = b. Let C := ∃y(A(v_{1}, y) ∧ D(y)), y a new variable. Then

N_{1} ⊧ C(\underline{k}) ⇔ ∃b ∈ ℕ((N_{1} ⊧ A(\underline{k}, \underline{b})) ∧ N_{1} ⊧ D(\underline{b}))
⇔ ∃b(s(k, k) = b ∧ N_{1} ⊧ D(\underline{b}))
⇔ N_{1} ⊧ D(\underline{s(k, k)}).

Let k := ⌜C⌝, G := C(\underline{k}). ⌜G⌝ = Sub(⌜C⌝, ⌜v_{1}⌝, k) = s(k, k). Therefore

N_{1} ⊧ G ⇔ N_{1} ⊧ C(\underline{k})
⇔ N_{1} ⊧ D(\underline{s(k, k)})
⇔ N_{1} ⊧ D(\underline{⌜G⌝}).

(b) Similar to (a): Assume A represents λx.s(x, x) and C := ∃y(A(v_{1}, y) ∧ D(y)). Then for all k ∈ ℕ Σ ⊢ C(\underline{k}) ↔ D(\underline{s(k, k)}). [Let b := s(k, k). Σ ⊢ A(\underline{k}, \underline{b}) ∧ ∀y(A(\underline{k}, \underline{y}) → \underline{b} = y). Therefore Σ ⊢ ∃y(A(\underline{k}, y) ∧ D(y)) ↔ D(\underline{b}).] Let k := ⌜C⌝, G := C(\underline{k}). Then s(k, k) = ⌜C(\underline{k})⌝ = ⌜G⌝. Σ ⊢ G ↔ D(\underline{⌜G⌝}).

Theorem 3.24 (Tarski) Let N_{1} be L_{ℕ}-standard and assume that every primitive recursive relation is definable in N_{1}. Then ⌜Th(N_{1})⌝ is not in N_{1} definable and therefore Th(N_{1}) is not recursive enumerable and not recursive axiomatizable.

Proof:

Assume Th(N_{1}) can be defined by a unary formula D. By the fixed point lemma 3.23 exists a formula G ∈ For^{0} such that

N_{1} ⊧ G ↔ ¬D(\underline{⌜G⌝}) .

But then N_{1} ⊧ G ⇔ G ∈ Th(N_{1}) ⇔ N_{1} ⊧ D(\underline{⌜G⌝}) ⇔ N_{1} |̸= G, a contradiction.

Theorem 3.25 A consistent theory T, in which all recursive functions are representable and which contains the equality axioms, is undecidable (i.e. not recursive).

Proof: Assume T is recursive. Then χ_{⌜T ⌝} and therefore as well the 1-ary relation ⌜T ⌝ are representable in T. Therefore there exists a unary L(T)-formula D, such that for every sentence A we have:

A ∈ T ⇒ T ⊢ D(\underline{⌜A⌝})
A ∉ T ⇒ T ⊢ ¬D(\underline{⌜A⌝})

By the fixed point lemma 3.23 there exists an L(T)-sentence G such that

T ⊢ G ↔ ¬D(⌜\underline{G}⌝) .

If G ∈ T follows T ⊢ D(\underline{⌜G⌝}), T ⊢ ¬G, T ⊢⊥, contradicting the consistency of T. If G ∉ T then T ⊢ ¬D(\underline{⌜G⌝}), T ⊢ G, G ∈ T. So in both cases we get a contradiction, T is not recursive.

Definition 3.26 An axiom system Σ in a language extending L_{ℕ} is ω-consis-tent, iff for every unary L(Σ)-formula A we have: If Σ ⊢ ¬A(\underline{n}) for all n ∈ ℕ, then Σ ⊬ ∃x.A(x).

Remark 3.27 ω-consistent implies consistent.

Theorem 3.28 (Gödel’s first Incompleteness Theorem).

(a) Every consistent, recursively axiomatized theory T containing the equality axioms and in which all recursive functions are representable is incomplete.

(b) For every ω-consistent, recursive axiom system Σ, in which all recursive functions can be represented by an explicitly given formula and which proves the equality axioms, we can explicitly state an L(Σ)-sentence G such that Σ ⊬ G and Σ ⊬ ¬G.

Proof: (a): Theorems 3.25, 3.16. (b): Of course we assume some explicitly given concrete definition of χ_{⌜Σ⌝}. Let Proof_{Σ}^{0}(a, b) :⇔ ⌜Proof_{Σ}⌝(a) ∧ Γ̃_{{ \atop endseq}(a)} = ⌜∅⌝ ∧ Ã_{{ \atop endseq}(a)} = b.

(Proof_{Σ}(a) iff a is a proof of the formula b from Σ). By Lemma 3.12 (c), Proof_{Σ}^{0} is recursive and by the representability of recursive functions we can find a 2-ary L formula B such that

Proof_{Σ}^{0}(a, b) ⇒ Σ ⊢ B(\underline{a}, \underline{b})
¬Proof_{Σ}^{0}(a, b) ⇒ Σ ⊢ ¬B(\underline{a}, \underline{b})

By the fixed point lemma 3.23 there exists an L-sentence G such that

Σ ⊢ G ↔ ¬∃yB(y, \underline{⌜G⌝}) .

Assume Σ ⊢ G. Then there exists a a such that Σ ⊢ B(\underline{a}, \underline{⌜G⌝}). Therefore Σ ⊢ ∃yB(y, \underline{⌜G⌝}), Σ ⊢ ¬G, contradicting the consistency of Σ. Therefore Σ ⊬ G. Then Σ ⊢ ¬B(\underline{a}, \underline{⌜G⌝}) for all a ∈ ℕ. By the ω-consistency of Σ follows Σ ⊬ ∃y.B(y, \underline{⌜G⌝}). Therefore Σ ⊬ ¬G.

50 CHAPTER 3. GÖDEL’S FIRST INCOMPLETENESS THEOREM

Representation of the Recursive Functions in Number Theory

We will follow very closely [Buc97a].

4.1 Another Definition of the Recursive Func-

tions

We want to show, that in some very simple theory we can represent all recursive functions. However the principle of primitive recursion is difficult to handle. So we show, that the recursive functions can be defined equivalently in a way which does not use this principle. Definition 4.1 Inductive definition of the sets Rec^{n} of n-ary functions:

1. 0^{n} ∈ Rec^{n} (n ∈ ℕ); S ∈ Rec^{1}; if 1 ≤ i ≤ n then proj_{i}^{n} ∈ Rec^{n}; +, ·, χ_{<} ∈ Rec^{2}.

2. If h ∈ Rec^{m}, g_{1}, …, g_{m} ∈ Rec^{n}, m ≥ 1, then h ∘ (g_{1}, …, g_{m}) ∈ Rec^{n}.

3. If g ∈ Rec^{n+1}, ∀a⃗ ∈ ℕ^{n}∃i.g(a⃗, i) = 0, then (μg) ∈ Rec^{n}. Rec := ⋃_{n∈ℕ} Rec^{n}. Theorem 4.2 The set of recursive functions is exactly Rec. Proof: Rec is obviously a subset of the recursive functions (by Lemma 2.35 (d)). In order to show that the recursive functions are a subset of Rec by Lemma 2.35 (d) it suffices to show that Rec is closed under primitive recursion. This will be done in the following lemmata and definitions. Consider for simplicity the special case of f defined by primitive recursion by f(0) = a and f(n + 1) = g(n, f(n)). The idea for showing that f is in Rec^{1} is to define, what it means for a sequence <a_{1}, …, a_{n}> to be in such a way such that a_{i} = f(i), i.e. such that a_{0} = a ∧ ∀i < n.a_{i+1} = g(i, a_{i}). f(i) is the ith element of the least such sequence which has length i, so f is in Rec if this can be carried out. Therefore we need to encode sequences in Rec. The coding we used is not suitable for this, instead one uses the Chinese Remainder Theorem:

Definition 4.3 (a) Rest_{b}^{a}(i) is the rest of the division of a by b(i + 1) + 1.

(b) β(c, i) := Rest_{π_{2}(c)}^{π_{1}(c)}(i).

(c) |a − b| := \begin{cases}a − b & if a ≥ b, \\ b − a & otherwise. \end{cases}.

Lemma 4.4 (Chinese Remainder Theorem) For arbitrary k, m_{0}, …, m_{k} ∈ ℕ there exist a, b ∈ ℕ such that Rest_{b}^{a}(i) = m_{i} for i = 0, …, k. Therefore there exists a c such that for i = 0, …, k β(c, i) = m_{i} (i.e. c represents the sequence (m_{0}, …, m_{k})).

Proof: Let s := max{k, m_{0}, …, m_{k}} + 1, b := s!, b_{i} := b(i + 1) + 1, ∏ b_{i} := b_{0} · · · · · b_{n}. m_{i} < b_{i} for i = 0, …, k.

i < j ≤ k ⇒ b_{i}, b_{j} are relative prime  (1)

Proof: Assume p is a prime, p | b_{i}, p | b_{j}. Then p | (b_{i} − b_{j}) = b(j − i), By j − i < s, b = s!, follows j − i | s!, p | s!, by p | (b(j + 1) + 1) follows p = 1.

(0 ≤ a, a′ < ∏ b_{i} ∧ a ≠ a′) ⇒ ∃i ≤ k.Rest_{b}^{a}(i) ≠ Rest_{b}^{a′}(i)  (2)

Proof: Assume Rest_{b}^{a}(i) = Rest_{b}^{a′}(i) for i = 0, …, k. Then b_{i} | (a − b), and since b_{i} are relative prime, ∏ b_{i} | (a − b), |a − b| < ∏ b_{i}, a − b = 0, contradicting the assumption. Therefore a ↦ (Rest_{b}^{a}(0), …, Rest_{b}^{a}(k)) is an injective function form {a ∈ ℕ | a < ∏ b_{i}} into {j | j < b_{0}} × ⋯ × {j | j < b_{k}}. Since both sets have the same number of elements, the function is surjective, i.e. there exists an a ∈ ℕ such that (Rest_{b}^{a}(0), …, Rest_{b}^{a}(n)) = (m_{0}, …, m_{k}).

Lemma 4.5 (a) Rec is closed under λ-abstraction, as is are the primitive recursive functions (where we refer to a language containing function symbols for all elements of Rec and a structure, in which all these are interpreted standard).

(b) − · , π, π_{1}, π_{2}, (a, b, i) ↦ Rest_{b}^{a}(i), (a, i) ↦ β(a, i) and (a, b) ↦ |a − b| are in Rec.

Proof: (a): Similar to Lemma 2.9 (b): a− · b = min{c | a ≤ b + c}, − · ∈ Rec. π(a, b) = ∑_{i<a+b}(i + 1) + b = \frac{1}{2}(a + b)(a + b + 1) + b = H((a + b)(a + b + 1)) + b, where H(c) := min{i | c ≤ 2i} = min{i | χ_{<}(2i, c) = 0}. Therefore π ∈ Rec. Let J(i) := \frac{1}{2}i · (i + 1) = ∑_{i<c}(i + 1). J(i) = H(i(i + 1)), therefore J ∈ Rec. Then if c = π(a, b), a+b = min{i | J(i) ≤ c < J(i+1)} = min{i | c < J(i+1)} = min{i | χ_{<}(J(i + 1), S(c)) = 0} =: J_{1}(c). π_{2}(c) = b = c− · J(J_{1}(c)), π_{1}(c) = a = J_{1}(c)− · π_{2}(c). Rest_{b}^{a}(i) = a− · f(a, b, i) · (b(i + 1) + 1), where f(a, b, i) := min{k | a < (k + 1)(b(i + 1) + 1)}. β(c, i) = Rest_{π_{2}(c)}^{π_{1}(c)}(i). |a − b| = (a− · b) + (b− · a).

The following lemma completes the proof of Theorem 4.2:

Lemma 4.6 Rec is closed under primitive recursion, i.e. if g ∈ Rec^{n}, h ∈ Rec^{n+2}, then Rgh ∈ Rec^{n+1}.

Proof: Let f := (Rgh). Define Correct(a⃗, b, c) :⇔ β(c, 0) = g(a⃗) ∧ ∀i < b.β(c, i + 1) = h(a⃗, i, β(c, i)). If Correct(a⃗, b, c), then ∀i ≤ b.β(c, i) = f(a⃗, i), especially f(a⃗, b) = β(c, b). We define G ∈ Rec^{n+2} such that G(a⃗, b, c) = 0 ⇔ Correct(a⃗, b, c). By Lemma 4.4 there exists for every a⃗, b a natural number c such that β(c, i) = f(a⃗, i) for i = 0, …, b, especially Correct(a⃗, b, c). Therefore, if we can define the G as before, f(a⃗, b) = β(μ(G)(a⃗, b), b), f ∈ Rec^{n+1}, and the assertion holds. Let G_{0}(a⃗, b, c) := min{i ≤ b | i = b ∨ h(a⃗, i, β(c, i)) ≠ β(c, i + 1)}, G(a⃗, b, c) := |g(a⃗) − β(c, 0)| + (b− · G_{0}(a⃗, b, c)). Then G(a⃗, b, c) = 0 ⇔ Correct(a⃗, b, c) and in order to show G ∈ Rec^{n+2} it suffices to show G_{0}(a⃗, b, c). But G_{0}(a⃗, b, c) = min{i | (b− · i) · (1− · |h(a⃗, i, β(c, i)) − β(c, i + 1)|) = 0, and such an i always exists, (namely i = b), so G_{0} ∈ Rec.

4.2 Robinson’s Q

Robinson’s Q contains very few axioms. But it will allow still to represent the recursive functions, so in every recursively axiomatized consistent/ω-consistent theory, in which Robinson’s Q can be embedded, Gödel’s incompleteness theorem 3.28 holds and in the standard model of the natural numbers of a language containing at least 0, S, +, ·, = Tarski’s theorem 3.24 holds.

Definition 4.7 (Robinson’s Q)

54 CHAPTER 4. REPRESENTATION OF RECURSIVE FUNCTIONS

(a) Let L_{ar} := {=, 0, S, +, ·}. Formulas in L_{ar} are called arithmetical formulas. A structure N_{1} in an extension of L_{ar} is called L_{ar}-standard, if |N_{1}| = ℕ and =, 0, S, +, · are interpreted in a standard way. N_{ar} is the L_{ar}-standard structure in L_{ar}. A relation R ⊆ ℕ^{n} is called arithmetical, iff it is in N_{ar} definable.

(b) The axiom system Q in the language L_{ar} consists of the equality axioms and the following axioms: (Q1) ∀x(¬(S(x) = 0)) ∧ ∀x.∀y(S(x) = S(y) → x = y). (Q2) ∀x(x + 0 = x) ∧ ∀x.∀y(x + S(y) = S(x + y)). (Q3) ∀x(x · 0 = 0) ∧ ∀x.∀y(x · S(y) = (x · y) + x). (Q4) ∀x(x = 0 ∨ ∃y(x = S(y))).

(c) Let in this section s < t := ∃z.(S(z) + s = t). Lemma 4.8 For all a, b, k ∈ ℕ the following holds:

(a) Q ⊢ A[x := 0] and Q ⊢ A[x := S(y)], y ∉ FV(A), then Q ⊢ A.

(b) Q ⊢ \underline{a} + \underline{b} = \underline{a + b}

(c) Q ⊢ \underline{a} · \underline{b} = \underline{a · b}

(d) Q ⊢ 0 < S(y).

Q ⊢ ¬(x < 0). Q ⊢ S(x) < S(y) ↔ x < y.

(e) a < b ⇒ Q ⊢ \underline{a} < \underline{b}.

(f) a < b ⇒ Q ⊢ ¬(\underline{a} = \underline{b}).

(g) a ≤ b ⇒ Q ⊢ ¬(\underline{b} < \underline{a}).

(h) Q ⊢ S(z) + \underline{a} = z + S(\underline{a}).

(i) Q ⊢ x < \underline{k} → x = \underline{0} ∨ ⋯ ∨ x = \underline{k − 1}.

(j) Q ⊢ x = \underline{0} ∨ ⋯ ∨ x = \underline{k} ∨ \underline{k} < x. Proof: Abbreviation: ⊢ B :⇔ Q ⊢ B, A ⊢ B :⇔ Q ∪ {A} ⊢ B. (a): By (Q4). (b): Induction on b: b = 0: by (Q2) ⊢ \underline{a} + 0 = \underline{a}.

b → b + 1: ⊢ \underline{a} + \underline{b + 1} = \underline{a} + S(\underline{b}) {(Q2) \atop =} S(\underline{a} + \underline{b}) {IH \atop =} S(\underline{a + b}) = \underline{a + (b + 1)}.

(c) similar to (b): b = 0: by (Q3) ⊢ \underline{a} · 0 = 0.

b → b+1: ⊢ \underline{a}·\underline{b + 1} = \underline{a}·S(\underline{b}) {(Q3) \atop =} (\underline{a}·\underline{b})+\underline{a} {IH \atop =} \underline{a · b}+\underline{a} {(b) \atop =} \underline{a · b + a} = \underline{a · (b + 1)}.

(d) ⊢ S(y) + 0 = S(y) ⊢ 0 < S(y). In order to show ¬(x < 0) by (a) it suffices to prove ¬0 < 0 and ¬S(y) < 0: S(z) + 0 = 0 ⊢ S(z) = 0 ⊢⊥. S(z) + S(y) = 0 ⊢ S(S(z) + y) = 0 ⊢⊥. ⊢ S(x) < S(y) ↔ ∃z(S(z) + S(x) = S(y)) ↔ ∃z(S(S(z) + x) = S(y))

(Q1)+Equalityaxioms ↔ ∃z(S(z) + x = y) ↔ x < y.

(e) a < b ⇒ ((b − (a + 1)) + 1) + a = b \underrightarrow{(b)}⊢ S(\underline{b − (a + 1)}) + \underline{a} = \underline{b} ⇒⊢ ∃z.S(z) + \underline{a} = \underline{b}.

(f) Induction on a. Let b = m + 1. a = 0: By (Q1) ⊢ ¬(0 = S(\underline{m})), ⊢ ¬(0 = \underline{b}).

a → a + 1. If a + 1 < b, then a < m \underrightarrow{IH}⊢ ¬(\underline{a} = \underline{m}) \underrightarrow{(Q1)}⊢ ¬(S(\underline{k}) = S(\underline{m})).

(g) Induction on b: b = 0. Then a = 0. (d). b → b + 1. If a = 0 (d). Otherwise a = a′ + 1, a′ < b. \underline{b + 1} < \underline{a} ⊢ S(\underline{b}) <

S(\underline{a′}) {(d) \atop ⊢} \underline{b} < \underline{a′} {IH \atop ⊢}⊥.

(h) Induction on a: a = 0: ⊢ S(z) + 0 = S(z) = S(z + 0) = z + S(0).

a → a+1: ⊢ S(z)+\underline{a + 1} = S(z)+S(\underline{a}) = S(S(z)+\underline{a}) {IH \atop =} S(z+S(\underline{a})) = z+S(\underline{a + 1}).

(i) Let A_{k}(x) := x < \underline{k} → x = \underline{0} ∨ ⋯ ∨ \underline{k − 1}. Induction on k. k = 0:

{(d) \atop ⊢} ¬(x < \underline{0}) ⊢ A_{0}(x).

k → k + 1: By (a) show ⊢ A_{k+1}(0) and ⊢ A_{k+1}(S(y)). ⊢ 0 = \underline{0} ⊢ A_{k+1}(0).

S(y) < \underline{k + 1} {(d) \atop ⊢} y < \underline{k} {IH \atop ⊢} y = \underline{0} ∨ ⋯ ∨ y = \underline{k-1} ⊢ S(y) = \underline{1} ∨ ⋯ ∨ y = \underline{k}.

(j) Induction on k. Let A_{k}(x) := x = \underline{0} ∨ ⋯ ∨ x = \underline{k} ∨ \underline{k} < x. For each k we will show A_{k}(0) and A_{k}(S(y)) from which by (b) follows A_{k}(x).

k = 0: ⊢ 0 = \underline{0} ⊢ A_{k}(0). {(d) \atop ⊢} \underline{0} < S(y) ⊢ A_{k}(S(y)).

k → k + 1: ⊢ 0 = \underline{0} ⊢ A_{k}(0). {IH \atop ⊢} y = \underline{0} ∨ ⋯ ∨ y = \underline{k} ∨ \underline{k} < x {(d) \atop ⊢} S(y) =

\underline{1} ∨ ⋯ ∨ S(y) = \underline{k + 1} ∨ \underline{k + 1} < S(y) ⊢ A_{k+1}(S(y)).

Definition 4.9 Let the set of extended Σ_{1} formulas in L_{ar} be defined as for the language L_{PR}, but s < t is abbreviation for ∃z(S(z) + s = t) (instead of for S(s)− · t = 0).

Theorem 4.10 Every recursive function (and therefore every recursive relation) can be represented in Q by an arithmetic extended Σ_{1}-formula.

Proof: In this proof again ⊢ A :⇔ Q ⊢ A and B ⊢ A ⇔ Q ∪ {B} ⊢ A. Further, if a⃗ = a_{1}, …, a_{n}, \underline{a⃗} := \underline{a_{1}}, …, \underline{a_{n}}.

We show that every function f ∈ Rec^{n} can be represented in Σ by an n + 1-ary extended Σ_{1}-formula A_{f} by induction on Rec. Note that since ⊢ ¬(\underline{a} = \underline{b}) for a ≠ b by Lemma 4.8 (f) it suffices to show for all a⃗ ∈ ℕ^{n}

Σ ⊢ ∀y(A(\underline{a⃗}, y) ↔ y = \underline{f(a⃗)}) .

A_{0^{n}} := v_{n+1} = 0. A_{S} := v_{2} = S(v_{1}). A_{proj}_{i}^{n} := v_{n+1} = v_{i}. A_{χ_{<}} := (v_{1} < v_{2} ∧ v_{3} = \underline{1}) ∨ (¬(v_{1} < v_{2}) ∧ v_{3} = \underline{0}): If a_{1} < a_{2}, then ⊢ \underline{a_{1}} < \underline{a_{2}}, ⊢ A_{χ_{<}}(\underline{a_{1}}, \underline{a_{2}}, y) ↔ y = \underline{1} ↔ y = \underline{χ(a_{1}, a_{2})}, and if ¬(a_{1} < a_{2}), then ⊢ ¬(\underline{a_{1}} < \underline{a_{2}}) and similarly the assertion. A_{f∘(g_{1},... ,g_{m})}(v⃗, v_{n+1}) := ∃y_{1}, …, y_{m}(A_{g_{1}}(v⃗, y_{1}) ∧ ⋯ ∧ A_{g_{m}}(v⃗, y_{m})∧ A_{f}(y_{1}, …, y_{m}, v_{n+1})). The assertion is clear. A_{μg}(v⃗, v_{n+1}) := A_{g}(v⃗, v_{n+1}, \underline{0}) ∧ ∀y < v_{n+1}.∃z(z ≠ \underline{0} ∧ A_{g}(v⃗, y, z)). We argue in Q. Let b := (μg)(a⃗). Assume A_{μg}(\underline{a⃗}, y) and show y = \underline{b}. y = \underline{0} ∨ ⋯ ∨ \underline{b} ∨ \underline{b} < y. Case y = \underline{i}, i < b. By IH ¬A_{g}(\underline{a⃗}, y, \underline{0}), ¬A_{μg}(\underline{a⃗}, y, \underline{0}). Case y = \underline{b}. The assertion follows. Case \underline{b} < y. Then by g(a⃗, b) = 0 follows A_{g}(\underline{a⃗}, \underline{b}, y) ↔ y = \underline{0}, ¬∃z(A_{g}(\underline{a⃗}, \underline{b}, z)∧z ≠ \underline{0}), \underline{b} < y, ¬A_{μg}(\underline{a⃗}, y). Assume y = \underline{b} and show A_{μg}(\underline{a⃗}, y). A_{g}(\underline{a⃗}, y, \underline{0}), and z < y → z = \underline{0} ∨ ⋯ ∨ z = \underline{b − 1}, so if z < y, z = \underline{i}, then A_{g}(\underline{a⃗}, y, \underline{g(a⃗, i)}), ¬(\underline{g(a⃗, i)} = \underline{0}), A_{μg}(\underline{a⃗}, y).

Theorem 4.11 (a) Every recursive enumerable relation (and therefore every recursive function) can be defined in a L_{ar}-standard structure N_{1} by an extended Σ_{1}-formula.

(b) Every recursive enumerable relation is arithmetical.

Proof: (a) N_{1} ⊧ Q, therefore, if A represents in a relation in Q, then it defines it in N_{1}. (b) follows from (a).

4.3 Provability and Decidability in Theories extending Q

Theorem 4.12 ⌜Th(N_{ar})⌝ is not arithmetical.

Proof: Theorem 3.24, Theorem 4.11 (b).

Corollary 4.13 Th(N_{ar}) is not recursive enumerable and therefore not recursive axiomatizable.

Theorem 4.14 Every consistent theory T with Q ⊆ T is undecidable.

Proof: Theorem 3.25 and Theorem 4.11 (b).

Theorem 4.15 (Gödel’s first incompleteness Theorem).

(a) Every consistent, recursively axiomatized theory T, in which all formulas in Q and the equality axioms are provable, is incomplete.

(b) For every ω-consistent, recursive axiom system Σ, in which all formulas of Q and the equality axioms are provable, we can explicitly state an L(Σ)- sentence G such that Σ ⊬ G and Σ ⊬ ¬G.

Theorem 4.16 (Undecidability of first order predicate logic). The set of valid L_{ar}-sentences is undecidable (not recursive).

Proof: Let Th be the set of valid L_{ar}-sentences and Th_{Q} the set of L_{ar}- sentences, following from Q. By Theorem 4.14, Th_{Q} is not recursive. On the other hand we have a ∈ ⌜Th_{Q}⌝ ⇔ ⌜⋀ Q⌝ ˜→ a ∈ ⌜P ⌝, where ⋀ Q is the conjunction of the (finitely many) axioms in Q. Therefore P is not recursive.

Rosser showed, that in (b) of Gödel’s first incompleteness theorem (3.28) we can get rid of the assumption Σ ω-consistent, as long as Σ proves Q:

Theorem 4.17 (Rosser’s strengthening of Gödel’s first incompleteness theorem) For every consistent, recursive axiom system Σ such that Σ ⊢ Q we can explicitly state a true arithmetical sentence A such that Σ ⊬ A and Σ ⊬ ¬A.

Proof: Let Proof_{Σ}^{0} be as in the proof of Theorem 3.28. Proof_{Σ}^{0} is recursive. By Theorem 4.10 there exists a binary arithmetical formula B_{Proof} such that

Proof_{Σ}^{0}(a, b) ⇒ Q ⊢ B_{Proof}^{0}(\underline{a}, \underline{b})  (1)
¬Proof_{Σ}^{0}(a, b) ⇒ Q ⊢ ¬B_{Proof}^{0}(\underline{a}, \underline{b})  (2)

Define Refute_{Σ}(a, b) :⇔ Proof_{Σ}^{0}(a, ˜¬(b)). Refute_{Σ}(a, b) is recursive, since Proof_{Σ}^{0} is recursive. Therefore there we can explicitly give a binary arithmetical formula B_{Refute} such that

Refute_{Σ}(a, b) ⇒ Q ⊢ B_{Refute}(\underline{a}, \underline{b})  (1′)
¬Proof_{Σ}^{0}(a, b) ⇒ Q ⊢ ¬B_{Refute}(\underline{a}, \underline{b})  (2′)

Let C(z) := ∀y(B_{Proof}(y, z) → ∃w < y.B_{Refute}(w, z)). C(\underline{⌜D⌝}) expresses: for every proof of D there exists a shorter refutation of D. By the fixed point lemma 3.23 we can explicitly define an arithmetical sentence A such that

Q ⊢ A ↔ C(\underline{⌜A⌝})  (∗)

We show Σ ⊬ A and Σ ⊢ ¬A. Assume, Σ ⊢ A. Then there exists a b such that Proof_{Σ}^{0}(b, ⌜A⌝), by (1)

Q ⊢ B_{Proof}(\underline{b}, \underline{⌜A⌝}). Since Σ is consistent, follows ¬Refute(n, ⌜A⌝) for all n, by (2’) Q ⊢ ¬B_{Refute}(\underline{n}, \underline{⌜A⌝}). By Lemma 4.8 (i) follows therefore Q ⊢ B_{Proof}(\underline{b}, \underline{⌜A⌝}) ∧ ∀z < \underline{b}.¬B_{Refute}(z, \underline{⌜A⌝}), Q ⊢ ¬C(\underline{⌜A⌝}), Q ⊢ ¬A, Σ ⊢ ¬A, Σ ⊢⊥, a contradiction. Therefore Σ ⊬ A, N ⊧ C(\underline{⌜A⌝}), by (∗) N ⊧ A. Assume Σ ⊢ ¬A. Then there exists a b ∈ ℕ such that (b, ⌜A⌝) ∈ Refute_{Σ}, by (1′) Q ⊢ B_{Refute}(\underline{b}, \underline{⌜A⌝}). By the consistency of Σ follows ¬Proof_{Σ}^{0}(n, ⌜A⌝) for all n ∈ ℕ, and by (2) Q ⊢ ¬B_{Proof}(\underline{n}, \underline{⌜A⌝}) for all n. We show Q ⊢ B_{Proof}(y, \underline{⌜A⌝}) → ∃w < y.B_{Refute}(w, \underline{⌜A⌝}) and argue in Q. Assume y. By Lemma 4.8 (j) we have y = \underline{0}∨⋯ y = \underline{b}∨\underline{b} < y. If y = \underline{k} for k ≤ b, then we get ¬B_{Proof}(y, \underline{⌜A⌝}). If \underline{b} < y, then by \underline{b} < y follows B_{Refute}(\underline{b}, \underline{⌜A⌝}), therefore ∃w < y.B_{Refute}(w, \underline{⌜A⌝}). Therefore Q ⊢ C(\underline{⌜A⌝}), Q ⊢ A, Σ ⊢ A, Σ ⊢⊥, a contradiction.

Definition 4.18 An arithmetical extended Π_{1}-formula is an arithmetical formula which is logically equivalent to the negation of an arithmetical extended Σ_{1} formula.

The next theorem shows that we can reduce the complexity of the unprovable true formula to Π_{1}-formulas.

Theorem 4.19 In every consistent, recursive axiom system Σ such that Σ ⊢ Q we can explicitly define a true arithmetical Π_{1}-sentence A such that Σ ⊬ A.

Note that we don’t get in general for this sentence A Σ ⊬ A̸.

Remark 4.20 (a) Every closed true arithmetical extended Σ_{1}-formula is provable in Q. (Therefore the complexity of the formula in Theorem theorepionefalse was optimal).

(b) If Σ is ω-consistent, Σ ⊢ Q, A is a false closed true arithmetical extended Σ_{1}-formula, then Σ ⊬ A. (Especially if Σ as in Theorem 4.19 is ω-consistent, and A is as there, then Σ ⊬ ¬A).

Proof of Remark 4.20: Exercise.

Proof of Theorem 4.19: By Theorem 3.13 and Theorem 4.11 (a) we can explicitly define a binary arithmetical extended Σ_{1}-formula B such that

Proof_{Σ}^{0}(a, b) ⇔ Q ⊢ B(\underline{a}, \underline{b}) .

By the fixed point lemma 3.23 we can explicitly define an arithmetical sentence A′ such that

Q ⊢ A′ ↔ ¬∃z.B(z, \underline{⌜A′⌝})  (3)

Let A := ∃z.B(z, \underline{⌜A′⌝}). Assume Σ ⊢ A. Then Σ ⊢ A′. By (1) there is a b such that Q ⊢ B(\underline{b}, \underline{⌜A′⌝}). Therefore Q ⊢ ∃z.B(z, \underline{⌜A′⌝}) and by (3) and Σ ⊢ Q follows Σ ⊢ ¬A′, Σ ⊢⊥, a contradiction. Therefore Σ ⊬ A, i.e. A′ and as well A are true, but by (3) and Σ ⊢ Q not provable in Σ. A is extended Σ_{1}.

Recursion Theory, part 2

We will follow very closely [Buc93b]. the value computed by it from this computation. We will choose in the following a maybe not as intuitive way: we use the representability of primitive recursive functions in Q. Every primitive recursive relation R and therefore as well every recursive enumerable relation can be represented in Q by a formula A. Therefore as well for every partial recursive function f, Graph(f) can be represented, i.e.

f(a_{1}, …, a_{n}) ≃ b ⇒ Q ⊢ A[\underline{a_{1}}, …, \underline{a_{n}}, \underline{b}]
f(a_{1}, …, a_{n}, b) ≄ b ⇒ Q ⊢ ¬A[\underline{a_{1}}, …, \underline{a_{n}}, \underline{b}].

So, if a is minimal such that π_{1}(a) is a proof of A[\underline{a_{1}}, …, \underline{a_{n}}, \underline{π_{2}(a)}] then (using the consistency of Q relative to the standard model) f(a_{1}, …, a_{n}) ≃ π_{2}(a). If (a_{1}, …, a_{n}) ∉ dom(f), such a proof doesn’t exist. If B is an arbitrary formula, we can define a function f : ℕ^{n} →_{par} ℕ as follows: If a⃗ ∈ ℕ^{n}, let a minimal such that π_{1}(a) is a proof of B[\underline{a⃗}, \underline{π_{2}(a)}]. If such a a exists, let f(a⃗) :≃ π_{2}(a), f(a⃗) :≃⊥ otherwise. We will see in the following that f will be partial recursive. So the set of formulas can be used as names for all partial recursive functions.

Definition 5.1 (a) Let Sb_{0}(e) := e, Sb_{n+1}(e, a_{1}, …, a_{n}) := Sb_{n}(Sub(e, ⌜v_{n+1}⌝, \underline{⌜a_{n+1}⌝}), a_{1}, …, a_{n}). (Note that Sb_{n}(⌜A⌝, a_{1}, …, a_{n}) = ⌜A[v_{1} := a_{1}, …, v_{n} := a_{n}]⌝).

(b) T^{n}(e, a_{1}, …, a_{n}, c) :⇔ (π_{2}(c), Sb_{n+1}(e, π_{1}(c), a_{1}, …, a_{n})) ∈ ⌜Proof_{Q}^{0}⌝. (Therefore T^{n}(⌜A⌝, a_{1}, …, a_{n}, c) ⇔ π_{2}(c) is a code for a proof of A[v_{1} := π_{1}(c), v_{2} := a_{1}, …, v_{n+1} := a_{n}]. U := π_{1}. {e}^{n}(a_{1}, …, a_{n}) := U(μy.T^{n}(e, a_{1}, …, a_{n}, y)).

Theorem 5.2 (a) Sb_{n}, T^{n}, U are primitive recursive.

{e}^{n} (e ∈ ℕ) and {·}^{n} : ℕ^{n+1} →_{par} ℕ, {·}^{n}(e, a_{1}, …, a_{n}) ≃ {e}(a_{1}, …, a_{n}) are partial recursive.

(b) (Kleene’s Normal form Theorem) {{e}^{n} | e ∈ ℕ} is exactly the set of n-ary partial recursive functions

Proof: (a): clear (b): {e}^{n} is partial recursive. If f : ℕ^{n} →_{par} ℕ is partial recursive, Graph(f) represented by the n + 1-ary formula A in Q, then {⌜A(v_{2}, …, v_{n+1}, v_{1})⌝}(a⃗) ≃ b ⇔ there exists a code c for a proof of A[b, a_{1}, …, a_{n}] such that π(c, b) are minimal, and since A represents f this is equivalent to f(a⃗) ≃ b.

Definition 5.3 W_{e}^{n} := dom({e}^{n}).

Lemma 5.4 {W_{e}^{n} | e ∈ ℕ} is the set of n-ary recursive enumerable relations.

Proof: W_{e}^{n} are recursive enumerable. If R is recursive enumerable, R = dom(f) for some partial recursive function, R = dom({e}^{n}) = W_{e}^{n} for some e ∈ ℕ.

Theorem 5.5 (Turing-Halting problem). K := {e ∈ ℕ | e ∈ W_{e}^{1}} is recursive enumerable but not recursive.

Remark: Intuitively {e} is the partial function computed by the eth program. Then K is the set of e such that {e}(e) is defined, i.e. program e applied to itself stops. Proof of Theorem 5.5: K is recursive enumerable: e ∈ K ⇔ e ∈ W_{e}^{1} ⇔ {e}^{1}(e) is defined ⇔ ∃c.T^{1}(e, e, c) is recursive enumerable, since T^{1} is primitive recursive. Assume K is recursive. Then ℕ \ K is recursive enumerable, ℕ \ K = W_{e_{0}}^{1} for some e_{0} ∈ ℕ. Now e_{0} ∈ K ⇔ e_{0} ∈ W_{e_{0}}^{1} ⇔ e_{0} ∉ K, a contradiction.

Theorem 5.6 (s_{n}^{m}-theorem or s-m-n-theorem) For every n, m ≥ 1 there exists an m + 1-ary primitive recursive function s_{n}^{m} such that for all e, c ∈ ℕ, a⃗ ∈ ℕ^{n}, b⃗ ∈ ℕ^{m} we have:

(a) T^{n+m}(e, a⃗, b⃗, c) ⇔ T^{n}(s_{n}^{m}(e, b⃗), a⃗, c).

(b) {e}^{n+m}(a⃗, b⃗) ≃ {s_{n}^{m}(e, b⃗)}^{n}(a⃗).

Proof: Let s_{n}^{0}(e) := e and

s_{n}^{m+1}(e, b_{1}, …, b_{m+1}) := s_{n}^{m}(Sub(e, ⌜v_{n+m+2}⌝, ⌜\underline{b_{m+1}}⌝), b_{1}, …, b_{m}) .

We show

Sb_{n+m+1}(e, c, a⃗, b⃗) = Sb_{n+1}(s_{n}^{m}(e, b⃗), c, a⃗)  (∗)

Then

T^{n}(e, a⃗, b⃗, c) ⇔ (π_{2}(c), Sb_{n+m+1}(e, π_{1}(c), a⃗, b⃗)) ∈ Proof_{Q}
⇔ (π_{2}(c), Sb_{n+1}(s_{n}^{m}(e, b⃗), c, a⃗)) ∈ Proof_{Q}
⇔ T^{n}(s_{n}^{m}(e, b⃗), a⃗, c)

i.e. (a) and therefore as well (b). Proof of (∗) by induction on m: m = 0 is trivial. m → m + 1:

Sb_{n+m+2}(e, c, a⃗, b_{1}, …, b_{m+1})
= Sb_{n+m+1}(Sub(e, ⌜v_{n+m+2}⌝, \underline{⌜b_{m+1}⌝}), c, a⃗, b_{1}, …, b_{m})
= Sb_{n+1}(s_{n}^{m}(Sub(e, ⌜v_{n+m+2}⌝, \underline{⌜b_{m+1}⌝}), b_{1}, …, b_{m}), c, a⃗)
= Sb_{n+1}(s_{n}^{m+1}(e, b_{1}, …, b_{m}, b_{m+1}), c, a⃗)

Theorem 5.7 (Kleene’s Recursion Theorem) For every n + 1ary partial recursive function g there exists an e such that {e}^{n}(a⃗) ≃ g(e, a⃗) for all a⃗ ∈ ℕ^{n}.

Proof: As for the fixed point Lemma, we give first a proof with some motivation and then the short argument. Let h be an arbitrary unary primitive recursive function. Then f_{h} : ℕ^{n+1} →_{par} ℕ, f_{h}(a⃗, e) :≃ g(h(e), a⃗) is partial recursive. Let f_{h} = {e_{h}}^{n+1}. Then {s_{n}^{1}(e_{h}, e)}^{n}(a⃗) ≃ {e_{h}}^{n+1}(e, a⃗) ≃ f_{h}(a⃗, e) ≃ g(h(e), a⃗). If now e, h are chosen, such that s_{n}^{1}(e_{h}, e) = h(e) then we are done. Now let, similarly as in the proof of the fixed point lemma h(e) := s_{n}^{1}(e, e). Then with e := e_{h} follows the assertion. Compact argument: By Lemma 5.2 (b) there exists a k such that {k}^{n+1}(a⃗, e) ≃ g(s_{n}^{1}(e, e), a⃗) for all a⃗, e. Let e := s_{n}^{1}(k, k). Then {e}^{n}(a⃗) ≃ {s_{n}^{1}(k, k)}^{n}(a⃗) ≃ {k}^{n+1}(a⃗, k) ≃ g(s_{n}^{1}(k, k), a⃗) ≃ g(e, a⃗).

Corollary 5.8 If n ≥ 1, and f is a unary recursive function, then there exists an e ∈ ℕ such that {f(e)}^{n} = {e}^{n}.

Proof: g(e, a⃗) :≃ {f(e)}^{n}(a⃗) in Theorem 5.7.

Example of an application of the recursion theorem. The Ackermann function A : ℕ^{2} → ℕ is defined by A_{0}(k) := k + 1, A_{m+1}(0) := A_{m}(1), A_{m+1}(k + 1) := A_{m}(A_{m+1}(k)). Define the partial recursive function g by

g(e, m, k) :≃ \begin{cases}k + 1 & if m = 0 \\ \{e\}^{2}(m− · 1, 1) & ifm > 0 ∧ k = 0 \\ \{e\}^{2}(m− · 1, \{e\}^{2}(m, k− · 1)) & otherwise. \end{cases}.

By the recursion theorem there exists an e such that {e}^{2}(m, k) ≃ g(e, m, k) for all m, k. By main induction on m and side induction on k one shows, that {e}^{2}(m, k) ≃ A(m, k). Therefore A(m, k) is recursive.

In general, for any function, which has recursion equations as the ones of A one can find a partial function which fulfills these equations. If the equations are in such a way, that one can prove that there exists a unique (partial or total) function which fulfills these equations, the function defined is shown to be partial recursive or recursive.

5.1 The theorems of Rice and Rice/Shapiro

We will now follow [Cut80].

Theorem 5.9 (Rice’s Theorem) If F is a set of n-ary partial recursive functions such that ∅ ≠ F ≠ {{e}^{n} | e ∈ ℕ}, then ⌜F⌝ := {e ∈ ℕ | {e}^{n} ∈ F} is not recursive.

Proof: Let e_{0}, e_{1} ∈ ℕ, {e_{0}}^{n} ∈ F, {e_{1}}^{n} ∉ F. Assume ⌜F⌝ is recursive. Define g : ℕ^{n+1} →_{par} ℕ,

g(e, a) :≃ \begin{cases}\{e_{1}\}^{n}(a) & if e ∈ ⌜F⌝ \\ \{e_{0}\}^{n}(a) & if e ∉ ⌜F⌝ \end{cases}.

By the recursion theorem, there exists an e such that ∀a ∈ ℕ^{n}.{e}^{n}(a) ≃ g(e, a). Then we get: e ∈ ⌜F⌝ ⇒ ∀a({e}^{n}(a) ≃ g(e, a) ≃ {e_{1}}^{n}(a)) ⇒ {e}^{n} = {e_{1}}^{n} ⇒ e ∉ ⌜F⌝. e ∉ ⌜F⌝ ⇒ ∀a({e}^{n}(a) ≃ g(e, a) ≃ {e_{0}}^{n}(a)) ⇒ {e}^{n} = {e_{0}}^{n} ⇒ e ∈ ⌜F⌝. So we get a contradiction.

Definition 5.10 (a) If f, f′ : ℕ^{n} →_{par} ℕ, f ⊆ f′ ⇔ ∀a⃗ ∈ dom(f)(a⃗ ∈ dom(f′) ∧ f(a⃗) ≃ f′(a⃗)) (or ⇔ Graph(f) ⊆ Graph(f′)).

(b) A function f : ℕ^{n} →_{par} ℕ is finite, iff dom(f) is finite (or equivalently Graph(f) is finite).

Theorem 5.11 (Theorem of Rice/Shapiro) Assume that F is a set of unary recursive functions such that {e | {e}^{1} ∈ F} is recursive enumerable. Then for any unary partial recursive function f follows f ∈ F iff there exists a finite function f′ ⊆ f such that f′ ∈ F.

Proof: Let ⌜F⌝ := {e | {e}^{1} ∈ F}. Suppose f ∈ F, f′ ∉ F for all f′ ⊆ f finite. K as in Theorem 5.5 is recursive enumerable. Let a ∈ K ⇔ ∃b.R(a, b), R primitive recursive. Define g : ℕ^{2} →_{par} ℕ,

g(a, b) :≃ \begin{cases}f(b) & if ∀c < b.¬R(a, c) \\ ⊥ & otherwise. \end{cases}.

By the s_{n}^{m}-theorem there exists a primitive recursive unary function s such that g(a, b) ≃ {s(a)}(b). (if g(a, b) = {e}^{2}(b, a), {s_{1}^{1}(e, a)}(b) ≃ g(a, b), s(a) := s_{1}^{1}(e, a)). By definition {s(e)} ⊆ f for every e ∈ ℕ. Further we have:

e ∈ K ⇒ {s(e)} is finite (therefore {s(e)} ∉ F)
e ∉ K ⇒ {s(e)} = f therefore {s(e)} ∈ F  (1)

Proof: If e ∈ K, then R(e, c) for some c ∈ ℕ, and for all c > c_{0} we have {s(e)}(c) ≃ g(e, c) ≃⊥, {s(e)} is finite. If e ∉ K, {s(e)}(c) ≃ g(e, c) ≃ f(c) for all c, {s(e)} = f. Therefore e ∈ ℕ\K ⇔ s(e) ∈ ⌜F⌝, ℕ\K is recursive enumerable, K is recursive, contradicting Theorem 5.5. Assume f ∉ F, f′ ∈ F, f′ ⊆ f, f′ finite. Define g : ℕ^{2} →_{par} ℕ,

g(a, b) :≃ \begin{cases}f(b) & if b ∈ dom(f′) ∨ a ∈ K \\ ⊥ & otherwise. \end{cases}.

Let using the s_{n}^{m}-theorem s be primitive recursive such that {s(e)}(b) ≃ g(e, b). {s(e)} ⊆ f.

e ∈ K ⇒ {s(e)} = f (therefore {s(e)} ∉ F)
e ∉ K ⇒ {s(e)} = f′ therefore {s(e)} ∈ F  (1)

Again e ∈ ℕ \ K ⇔ s(e) ∈ ⌜F⌝ and as in the other direction follows again the assertion.

Definition 5.12 Assume A, B ⊆ ℕ. A and B are recursively inseparable, iff A ∩ B = ∅ and there is no recursive set C ⊆ ℕ such that A ⊆ C and B ⊆ ℕ \ C.

Lemma 5.13 Let K_{i} := {e | {e}^{1}(e) ≃ i} for i = 0, 1. Then K_{i} are recursive enumerable and K_{0} and K_{1} are recursively inseparable.

Proof: K_{i} are recursive enumerable is clear. Assume K_{0} ⊆ C ⊆ ℕ, K_{1} ∩C = ∅, C recursive, and let {e}^{1} = χ_{C}. Assume e ∈ C. Then χ_{C}(e) = 1, {e}(e) = 1, e ∈ K_{1}, e ∉ C, a contradiction. Assume e ∉ C. Then χ_{C}(e) = 0, {e}(e) = 0, e ∈ K_{0}, e ∈ C, a contradiction.

5.2 The Arithmetical Hierarchy

In this section we will follow very closely [Rat96].

Definition 5.14 (a) The strict Σ_{n} and Π_{n}-formulas in a language extending L_{ar} are defined by: Every Δ_{0} formula (in the formulation of L_{ar}) is a strict Π_{0}- and Σ_{0}- formula. If A is a strict Π_{n}-formula, then ∃x.A is a strict Σ_{n+1}-formula. If A is a strict Σ_{n}-formula, then ∀x.A is a strict Π_{n+1}-formula. In this section Σ_{n}-, Π_{n}-formula stands for strict Σ_{n}-, Π_{n}-formula. (Sometimes one defines Σ_{n}-formulas as extended Σ_{n}-formulas and therefore one sometimes writes strict Σ_{n}-formulas for what we are going to define)

(b) The Σ_{n} and Π_{n} relations are defined simultaneously inductively by: If R is recursive, then it is Σ_{0} and Π_{0}. If R(x⃗, x) is Σ_{n}, S(x⃗) ⇔ ∀x.R(x⃗, x), then S is Π_{n+1}. If R(x⃗, x) is Π_{n}, S(x⃗) ⇔ ∃x.R(x⃗, x), then S is Σ_{n+1}.

Remark 5.15 If m ≥ 1, then R ⊆ ℕ^{n} is Σ_{m} (Π_{m}) iff it can be defined by a Σ_{m} (Π_{m})-formula A in ℕ over the language L_{ar}, i.e. for all a_{1}, …, a_{n} ∈ ℕ

R(a_{1}, …, a_{n}) ⇔ N ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}]

Proof: It suffices to proof the assertion for m = 1. The Σ_{1}-relations are exactly the recursive enumerable relations which are exactly those definable by a (strict) Σ_{1}-formula The Π_{1}-relations are the complements of the Σ_{1}-relations, and the Π_{1} formulas define exactly the relations which are complements of Σ_{1}-definable relations, so the assertion follows here again.

Lemma 5.16 (a) If R is in Σ_{n} ∪ Π_{n}, then R is in Σ_{m} ∪ Π_{m} for all m > n.

(b) If R is an m-ary Σ_{n} (Π_{n})-relation f_{1}, …, f_{m} are recursive, then Q′ := {x⃗ | R(f_{1}(x⃗), …, f_{m}(x⃗))} is Σ_{n} (Π_{n}), too

(c) If R is Σ_{n}, then Q′ := {x⃗ | ∃x.R(x, x⃗)} is Σ_{n}, too.

If R is Π_{n}, then Q′ := {x⃗ | ∀x.R(x, x⃗)} is Π_{n}, too.

(d) If R_{0}, R_{1} are m-ary Σ_{n} (Π_{n}) relations, then R_{0} ∩ R_{1}, R_{0} ∪ R_{1} are Σ_{n} (Π_{n}), too.

(e) If R is an m-ary Σ_{n} (Π_{n}) relation, then ℕ^{m} \ R is Π_{n} (Σ_{n}).

(f) If R is Σ_{n} (Π_{n}), f is recursive, then S := {x⃗ | ∀x < f(x⃗)R(x⃗, x)} and T := {x⃗ | ∃x < f(x⃗)R(x⃗, x)} are Π_{n} (Σ_{n}), too.

Proof: (a): If R is Σ_{n}, then by R(x⃗) ⇔ ∀y.R(x⃗) it is Π_{n+1}. Similar Π_{n} relations are Σ_{n+1}, too. Every recursive relation is recursive enumerable, and since its complement is recursive as well, it is Σ_{1} and Π_{1}. Therefore every Σ_{0} or Π_{0} relation is Σ_{1} and Π_{1} as well and from this follows that Σ_{n} (Π_{n})-relations are Σ_{n+1} (Π_{n+1})- relations as well. (b): trivial by induction on the definition of Π_{n} and Σ_{n}. (c): First assertion If R(x, x⃗) ⇔ ∃y.R′(x, y, x⃗), R′ Π_{n−1}, then ∃x.R(x, x⃗) ⇔ ∃z.R′(π_{1}(z), π_{2}(z), x⃗) for some new variable z. The second assertion follows similarly. (d): Induction on n. n = 0 trivial. n → n + 1: Only for Σ_{n}. Let R_{i}(x⃗) ⇔ ∃yS_{i}(x⃗, y), S_{i} Π_{n}. (R_{1} ∩ ∪ R_{2})(x⃗) ⇔ ∃y.(S_{1}(x⃗, π_{1}(y)) ∧ ∨ S_{2}(x⃗, π_{2}(y))) by IH Σ_{n}.

(e) trivial by induction on the definition.

(f) Proof simultaneously by induction on n. n = 0 follows, since recursive relations are closed under bounded quantification. n → n + 1. Consider only the case Σ_{n+1}. The second assertion follows from (c), (d) and since the x < f(t) is recursive in the variables in t and x. For the first assertion, let R(x⃗, x) ⇔ ∃y.R′(x⃗, x, y) Then ∀x < f(x⃗).R(x⃗, x) ⇔ ∃z.∀x < f(x⃗).∃y < z.R′(x⃗, x, y) and by IH follows the assertion.

Theorem 5.17 For each n, m > 0 there exists an m + 1-ary Σ_{n} (Π_{n}-)relation U_{n}^{m} (\overline{U}_{n}^{m}), which enumerates the m-ary Σ_{n} (Π_{n}-)relations, i.e. for each m-ary Σ_{n} (Π_{n}-relation) R there exists an e such that R(x⃗) ⇔ U_{n}^{m}(e, x⃗) and (R(x⃗) ⇔ \overline{U}_{n}^{m}(e, x⃗)) for all x⃗ ∈ ℕ^{m}.

Proof: n = 1: U_{1}^{m}(e, x⃗) :⇔ W_{e}^{n}(x⃗). U_{1}^{m} is recursive enumerable, therefore Σ_{1} and enumerates by Lemma 5.4 all recursive enumerable, i.e. Σ_{1}-relations. \overline{U}_{1}(e, x⃗) :⇔ ¬U_{1}(e, x⃗) which enumerates all complements of recursive enumerable relations, i.e. Π_{1}-relations. n → n + 1: U_{n+1}^{m}(e, x⃗) ⇔ ∃y.\overline{U}_{n}^{m+1}(e, y, x⃗). Similar for \overline{U}.

Theorem 5.18 Let Σ_{n} be the collection of all Σ_{n}-relations, similarly for Π_{n}. Then the following equations hold:

Σ_{1} ≠^{⊆} Σ_{2} ≠^{⊆} · · ·.

Π_{1} ≠^{⊆} Π_{2} ≠^{⊆} ⋯

Σ_{n} ⊈ Π_{n}, Π_{n} ⊈ Σ_{n}. Σ_{n} ⊆ Π_{n+1}, Π_{n} ⊆ Σ_{n+1}.

Proof: Σ_{n} ⊈ Π_{n}: Let U_{n}^{1} enumerate the Σ_{n} relations. D(e) :⇔ U_{n}^{1}(e, e). D is Σ_{n}. If D were Π_{n}, then D(e) ⇔ ¬U_{n}^{1}(f, e) for some f, D(f) ⇔ ¬U_{n}^{1}(f, f) ⇔ ¬D(f), a contradiction. Π_{n} ⊈ Σ_{n}: similarly. Σ_{n} ⊆ Σ_{n+1}, Π_{n} ⊆ Π_{n+1}, Σ_{n} ⊆ Π_{n+1}, Π_{n} ⊆ Σ_{n+1}: already shown. Σ_{n+1} ⊈ Σ_{n}: otherwise Σ_{n+1} ⊆ Σ_{n} ⊆ Π_{n+1}.

66 CHAPTER 5. RECURSION THEORY, PART 2

Gödel’s Second Incompleteness Theorem

We will follow very closely [Buc93b].

6.1 Proof of Gödel’s and Löb’s theorem

In this section we will prove Gödel’s and Löb’s theorem relative to some conditions on a theory T. We will later verify, that extension of a theory Z, which has primitive recursive functions, their defining axioms and full induction, fulfill these conditions.

Assumption 6.1 In this section let T be a recursive axiom system in a recursive represented language L extending L_{ℕ} (= {=, 0, S}), in which all primitive recursive functions are representable and which proves the equality axioms.

Löb’s theorem is relative to a predicate, expressed by a formula P. P usually stands for provability, and this instantiation is the original formulation of Gödel’s second incompleteness theorem, which expresses that under some weak assumptions in an axiom system we can not prove its own consistency. However, the generalized form of both theorems is useful as well. We will prove first the two theorems for arbitrary theories fulfilling some provability conditions. Then we will verify in section 6.3 that the ordinary provability predicate already in the relatively weak axiom system Z fulfills the conditions (D1) - (D3).

Definition 6.2

The following are provability conditions for a unary formula P in L and T:

(D1) T ⊢ A ⇒ T ⊢ P(\underline{⌜A⌝}) for every closed formula A.

(D2) T ⊢ P(\underline{⌜A → B⌝}) → P(\underline{⌜A⌝}) → P(\underline{⌜B⌝}) for every closed formula A, B.

(D3) T ⊢ P(\underline{⌜A⌝}) → P(\underline{⌜P(\underline{⌜A⌝)}⌝}).

Let Provable_{Σ}(b) := ∃a.Proof_{Σ}^{0}(a, b), b is Gödelnumber of a formula provable in Σ.

If P is a unary formula in L let Cons_{T,P} := ¬P(\underline{⌜⊥⌝}). We write Cons_{T,Provable_{T}} (“T is consistent”).

(D1), (D2) can be shown in Z and for many other axiom systems easily. However, (D3) will require some effort.

Theorem 6.3 (Löb’s theorem) If P is a unary formula which fulfills (D1), (D2), (D3) relative to T. Then for every sentence A we have

(T ⊢ P(\underline{⌜A⌝}) → A) ⇒ T ⊢ A

Corollary 6.4 (Gödel’s Second Incompleteness Theorem) If P is a unary formula fulfilling (D1), (D2), (D3) relative to T, T is consistent. Then

T ⊬ Cons_{T,P} .

Proof of the corollary: Choose A ≡⊥ in theorem 6.3. Proof of Löb’s theorem with Motivation: Let ⊢ stand for provability in T. First we will give a proof with motivation and then present the proof in a compact way. It’s easier to understand it, if we first consider the special case of Löb’s theorem, namely Gödel’s theorem (with A :=⊥. By the fixed point theorem there exists a formula C such that ⊢ C ↔ ¬P(\underline{⌜C⌝}). (C holds, iff it is not provable). We show ⊢ ¬P(\underline{⌜C⌝}): ⊢ P(\underline{⌜C⌝}) → P(\underline{⌜P(\underline{⌜C⌝})⌝}). From ⊢ C → ¬P(\underline{⌜C⌝}) follows by D2 ⊢ P(\underline{⌜C⌝}) → P(\underline{⌜P(\underline{⌜C⌝})⌝}) → P(\underline{⌜⊥⌝}), i.e. ⊢ P(\underline{⌜C⌝}) → P(\underline{⌜⊥⌝}), and from P(\underline{⌜⊥⌝}) →⊥ follows ⊢ ¬P(\underline{⌜C⌝}). Now we get ⊢ C, ⊢ P(\underline{⌜C⌝}), by ⊢ C → P(\underline{⌜C⌝}) →⊥ therefore ⊢⊥. Now we see that we haven’t made use of the fact that ⊥ was the falsum and can therefore replace A by an arbitrary sentence and yield Löb’s theorem. Short proof of Löb’s theorem: Abbreviation: □A := P(\underline{⌜A⌝}) (the binding is minimal, so □A → B should be read as (□A) → B). Further we write in this proof ⊢ for T ⊢. Assume A, ⊢ □A → A. By the fixed point lemma 3.23 there exists an L-sentence C such that ⊢ C ↔ (□C → A). Then we get: ⊢ C → (□C → A). ⊢ □(C → (□C → A)). (by (D1)). ⊢ □C → (□□C → □A). (by (D2)). ⊢ □C → □□C. (is (D3)) ⊢ □C → □A.

⊢ □A → A (assumption). ⊢ □C → A. ⊢ C. ⊢ □C. ⊢ A.

6.2 The axiom system Z.

Notation 6.5 (a) We write in the following ≡ for syntactical identity between two terms, formulas etc. By T ⊢ s ≡ t_{0} = t_{1} = ⋯ = t_{m} ≡ t we mean that s ≡ t_{0}, t_{m} ≡ t and T ⊢ t_{0} = t_{1}, T ⊢ t_{1} = t_{2}, …, T ⊢ t_{m−1} = t_{m}. Statements like T ⊢ s = t ≡ t′ = t′′ should be read similarly.

(b) Let in the following L be a primitive recursively represented language (with enumeration enum) such that L_{PR} ⊆ L. Term, formula etc. means in this section L-term, L-term etc.

Definition 6.6 (a) The axiom system Z has the following axioms in the language L_{PR} (0 := 0^{0}):

(Z =) The equality axioms for L_{PR}. (Z bas) ∀x(¬(S(x) = 0)) ∧ ∀x.∀y(S(x) = S(y) → x = y). (Z 0^{n}) ∀x_{1}, …, x_{n}.0^{n}(x_{1}, …, x_{n}) = 0. (Z proj_{n}^{i}) ∀x_{1}, …, x_{n}.proj_{n}^{i}(x_{1}, …, x_{n}) = x_{i}. (Z ∘) ∀x_{1}, …, x_{n}.(f ∘ (g_{1}, …, g_{m}))(x_{1}, …, x_{n}) =

f(g_{1}(x_{1}, …, x_{n}), …, g_{m}(x_{1}, …, x_{m}))

(g_{i} ∈ PR^{n}, f ∈ PR^{m}).

(Z R_{0}) ∀x_{1}, …, x_{n}.(Rgh)(x_{1}, …, x_{n}, 0) = g(x_{1}, …, x_{n}).

(g ∈ PR^{n}, h ∈ PR^{n+2})

(Z R_{S}) ∀x_{1}, …, x_{n}, y.(Rgh)(x_{1}, …, x_{n}, S(y)) = h(x_{1}, …, x_{n}, y, (Rgh)(x_{1}, …, x_{n}, y)).

(g ∈ PR^{n}, h ∈ PR^{n+2})

(Z Ind) A(0) → ∀x(A(x) → A(S(x))) → ∀x.A(x), where A(x) is an arbitrary formula of L_{PR}.

(b) Let 1 := S(0), x < y := χ_{<}(x, y) = 1.

(c) Let in this section N be the standard structure of L_{PR}.

Lemma 6.7 (a) If f ∈ PR^{n}, a_{1}, …, a_{n} ∈ ℕ, then Z ⊢ f(\underline{a_{1}}, …, \underline{a_{n}}) = \underline{f(a_{1}, …, a_{n})}

(b) If t is a term in L_{PR}, FV(t) ⊆ {x_{1}, …, x_{n}}, t^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = b, then Z ⊢ t[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}] = \underline{b}.

(c) If A is a Δ_{0}-sentence, then if N ⊧ A, then Z ⊢ A, and if N ⊧ ¬A, then Z ⊢ ¬A.

(d) If A is an extended Σ_{1}-sentence, N ⊧ A, then Z ⊢ A.

Proof: (a): Induction on the definition of f: f = 0^{n}: Z ⊢ 0^{n}(\underline{a_{1}}, …, \underline{a_{n}}) = 0 ≡ \underline{0^{n}(a_{1}, …, a_{n})}. f = S: Z ⊢ S(\underline{a_{1}}) = S(\underline{a_{1}}) ≡ \underline{S(a_{1})}. f = proj_{n}^{i}: b = a_{i}, Z ⊢ proj_{i}^{n}(\underline{a_{1}}, …, \underline{a_{n}}) = \underline{a_{i}} ≡ \underline{proj_{i}^{n}(a_{1}, …, a_{n})}. f = h ∘ (g_{1}, …, g_{m}): Let c_{i} := g_{i}(a⃗). Z ⊢ g_{i}(\underline{a_{1}}, …, \underline{a_{n}}) = \underline{c_{i}}, Z ⊢ h(\underline{c_{1}}, …, \underline{c_{m}}) = \underline{h(c_{1}, …, c_{m})},

Z ⊢ f(\underline{a_{1}}, …, \underline{a_{n}}) = h(g_{1}(\underline{a_{1}}, …, \underline{a_{n}}), …, g_{m}(\underline{a_{1}}, …, \underline{a_{n}}))
= h(\underline{c_{1}}, …, \underline{c_{m}})
= \underline{h(c_{1}, …, c_{m})}
= \underline{f(a_{1}, …, a_{n})} .

f = (Rgh): Show Z ⊢ f(\underline{a_{1}}, …, \underline{a_{n}}, \underline{c}) = \underline{f(a_{1}, …, a_{n}, c)} by side-induction on c. c = 0: Z ⊢ f(\underline{a_{1}}, …, \underline{a_{n}}, \underline{0}) ≡ f(\underline{a_{1}}, …, \underline{a_{n}}, 0) = g(\underline{a_{1}}, …, \underline{a_{n}}) = \underline{g(a_{1}, …, a_{n})} = \underline{b}. c → c + 1:

Z ⊢ f(\underline{a_{1}}, …, \underline{a_{n}}, \underline{c + 1})  ≡  f(\underline{a_{1}}, …, \underline{a_{n}}, S(\underline{c}))
=  h(\underline{a_{1}}, …, \underline{a_{n}}, \underline{c}, f(\underline{a_{1}}, …, \underline{a_{n}}, \underline{c}))
{side IH \atop =} h(\underline{a_{1}}, …, \underline{a_{n}}, \underline{c}, \underline{f(a_{1}, …, a_{n}, c)})
{main IH \atop =} \underline{h(a_{1}, …, a_{n}, c, f(a_{1}, …, a_{n}, c))}
≡  \underline{f(a_{1}, …, a_{n}, c + 1)}

(b), (c): Exercise.

Lemma 6.8 (a) If A(x) is an L_{PR}-formula, then Z ⊢ ∀x(∀y < x(A(y)) → A(x)) → ∀x.A(x).

(b) If R_{1}, …, R_{n} are n-ary primitive recursive relations, f_{1}, …, f_{n+1} are primitive recursive functions, R_{n} := ℕ^{n} \ (R_{1} ∪ ⋯ ∪ R_{n}), f(x⃗) = χ_{R_{1}}(x⃗) · f_{1}(x⃗) + ⋯ + χ_{R_{n+1}}(x⃗) · f_{n+1}(x⃗), defined in the standard way, then Z ⊢ ∀x⃗(⋀_{1≤i<j≤n}(¬(χ_{R_{i}}(x⃗) = 1 ∧ χ_{R_{j}}(x⃗) = 1)) → χ_{R_{k}}(x⃗) = 1 → f(x⃗) = f_{k}(x⃗)).

(c) All the properties of +, ·, − · , pred, ∑(f), \overline{μ}(f), π, π_{1}, π_{2}, lh, (·)_{·}, ·∗<·>, <·, …, ·>, which are statements in L_{PR} like ∀x, y(x + 0 = x ∧ x + S(y) = S(x + y)) (i.e. not statements of the form f is primitive recursive) can be shown in Z.

(d) If t is a term of L_{PR}, FV(t) ⊆ {x_{1}, …, x_{n}}, f := λ̃x_{1}, …, x_{n}.t, then Z ⊢ f(x_{1}, …, x_{n}) = t.

(e) If A is a Δ_{0} formula FV(A) ⊆ {x_{1}, …, x_{n}}, x_{i} distinct, R primitive recursive defined as in Lemma 2.17 such that R(a⃗) ⇔ N ⊧ A[x_{1} := a_{1}, …, x_{n} := a_{n}]. Then Z ⊢ ∀x⃗((χ_{R}(x⃗) = 1 ↔ A) ∧ (χ_{R}(x⃗) = 0 ↔ ¬A)).

(f) If f ∈ PR, then Z ⊢ (\overline{μ}f)(a⃗, b) = y ↔ ((y = b ∨ f(a⃗, b) = 0) ∧ ∀y′ < y(y′ ≠ b ∧ f(a⃗, y′) ≠ 0)).

Proof: (a): Note that χ_{<}(x, y) = sig(y− · x), where sig(x) := 1− · (1− · x) =

\begin{cases}1 & if x > 0 \\ 0 & if x ≤ 0 \end{cases}. With this definition and a prove of elementary properties about

− · one can show Z ⊢ ¬(x < 0) and Z ⊢ (x < S(y)) ↔ (x < y ∨ x = y). Let B(y) := ∀x < y.A(x). Z ⊢ B(0), and Z proves that from ∀y(∀y′ < y(A(y′)) → A(y)) follows ∀x(B(x) → B(x + 1)), therefore by using Induction ∀x.B(x), ∀x.A(x).

(b) - (f): One verifies easily that all the proofs can be carried out using course of value induction. Some additional theorems like associativity of + or (∑ f)(a⃗, b) = 0 ⇔ ∀i < b.f(a⃗, i) = 0 need to be proved as well, the proofs are tedious but easy.

6.3 Verification of conditions (D1) - (D3) in extensions of Z

We will show that extensions of Z with the standard provability predicate fulfill (D1) - (D3). (D1), (D2) will be shown easily, the main problem will be (D3). In order to show (D3), we will prove more generally that for every extended Σ_{1}-sentence C we have T ⊢ C → P(\underline{⌜C⌝}). This will be done by using that every extended Σ_{1}-formula A is (in Z provable) equivalent to a formula ∃x.f(x, x⃗) = 0, where f is primitive recursive, so f(x, x⃗) → A and we need to show only the reflection principle for the (open!) formula f(x, x⃗) = 0. However, if P expresses provability in a theory Σ, then f(x, x⃗) = 0 → P(\underline{⌜f(x, x⃗) = 0⌝}) is in general not a valid formula, since the conclusion expresses Σ ⊢ f(x, x⃗) = 0, therefore as well Σ ⊢ ∀x, x⃗.f(x, x⃗) = 0 which does in general not follow from f(x, x⃗) = 0 for some x, x⃗. The correct statement is f(x, x⃗) = 0 → P([f(x, x⃗) = 0]), where for formulas C with FV(C) = {x_{1}, …, x_{n}} [C] is a term with FV([C]) ⊆ FV(C) such that ([C])^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = ⌜C[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}]⌝. C → P([C]) expresses: “if C holds under assignment x_{i} = a_{i}, then C[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}] is provable”. In case of quantifiers we have to deal with substitutability. However, it turns out that we never need to consider open quantified formulas, so we can restrict ourselves to simple formulas, as defined in the following.

Definition 6.9 (a) The set of simple formulas is inductively defined by: If A is a prime formula, then A is simple.

If ^{∀ ∃} x.A is a closed formula, then A is simple.

If A, B are simple, then ¬A, A ∧ ∨ B, A → B are simple.

(b) A simple expression is a term or a simple formula.

(c) Let in the following (in this section only) f ∈ L^{+} ∪ Junc.

Definition 6.10 (a) Let <·, …, ·> ∈ PR^{n}, <·, …, ·>(a_{1}, …, a_{n}) := <a_{1}, …, a_{n}>. If t_{1}, …, t_{n} are terms, then <t_{1}, …, t_{n}> := <·, …, ·>(t_{1}, …, t_{n}) (a term, starting with a function symbol for <·, …, ·> applied to the terms t_{1}, …, t_{n}).

(b) Define ν : ℕ → ℕ, ν(n) := ⌜\underline{n}⌝. Note, that ν(t) is a term, if t is a term (more precisely the application of the function symbol for ν to t).

Lemma 6.11 (a) Z ⊢ Sub(\underline{⌜E⌝}, \underline{⌜x⌝}, y) = \underline{⌜E⌝} for expressions E such that x ∉ FV(E).

(b) Z ⊢ Sub(\underline{⌜x⌝}, \underline{⌜x⌝}, y) = y.

(c) Z ⊢ Sub(<\underline{enum(f)}, z_{1}, …, z_{n}>\underline{⌜x⌝}, y) =

<\underline{enum(f)}, Sub(z_{1}, \underline{⌜x⌝}, y), …, Sub(z_{n}, \underline{⌜x⌝}, y)> (if n is the arity of f).

Proof: (a): Induction on the definition of E, using mainly Lemma 6.8 (d), (e). (b), (c): use Lemma 6.8 (e).

We will define [u] for all simple expressions, and the obvious generalization of the condition would be: [E]^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = ⌜E[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}]⌝. Therefore [x]^{N} [x := a] = ⌜\underline{a}⌝, therefore we can define [x] := ν(x) ((ν(x))^{N} [x := a] = ν(a) = ⌜\underline{a}⌝), [f(E_{1}, …, E_{n})] := <\underline{enumf}, [E_{1}], …, [E_{n}]>

and since, if E is simple and E ≡^{∀ ∃} xA, then E is closed, [^{∀ ∃} A] := \underline{⌜^{∀ ∃} A⌝}. We need to prove P(\underline{⌜A⌝}) → P([A]), which expresses that, if A is provable, then A[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}] is provable as well. For this step we need induction on the number of variables and therefore we will define more generally a term [E]^{U} for every finite set of variables U such that, if U = {x_{1}, …, x_{n}}, ([E]^{U})^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = ⌜A[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}]⌝. Now, in case E = x ∈ U, [E]^{U} := ν(x) and in case E = x ∉ U, [E]^{U} := \underline{⌜x⌝} is a good definition. [E] can now be defined as [E]^{FV(E)}.

Definition 6.12 (a) For U being a finite set of variables, E a simple expression we define a L_{PR}-term [E]^{U} by:

[x]^{U} := \begin{cases}\underline{ν(x)} & if x ∈ U \\ \underline{⌜x⌝} & otherwise. \end{cases}.
[f(E_{1}, …, E_{n})]^{U} := <\underline{enum(f)}, [E_{1}]^{U}, …, [E_{n}]^{U}>.
[^{∀ ∃} xA]^{U} := \underline{⌜∀x.A⌝}.

(b) [E] := [E]^{FV(E)}.

Remark 6.13 If A is a simple expression, U ∩FV(A) = {x_{1}, …, x_{n}}, FV(A)\ U = {y_{1}, …, y_{m}}, x_{i}, y_{i} are distinct, then FV([A]) = U ∩ FV(A) and

([A]^{U})^{N} [x_{1} := a_{1}, …, x_{n} := a_{n}] = ⌜A[x_{1} := \underline{a_{1}}, …, x_{n} := \underline{a_{n}}]⌝

Remark 6.14 [x] ≡ ν(x) [f(E_{1}, …, E_{n})] ≡ <\underline{enum(f)}, [E_{1}], …, [E_{n}]>.

Lemma 6.15 Let E be simple.

(a) Z ⊢ [E]^{∅} = \underline{⌜E⌝}

(b) Z ⊢ [t] = ν(t) → [E[y := t]] = [E][y := t]

(c) Z ⊢ [0] = ν(0) ∧ [Sx] = ν(S(x)) ∧ [x] = ν(x).

(d) For the terms t ∈ {0, x, S(x)}, Z ⊢ [E[y := t]] = [E][y := t].

Proof: Let ⊢ stand for provability from axioms in Z. (a): Induction on the definition of E: E = x: [x]^{∅} ≡ \underline{⌜x⌝}. E = f(E_{1}, …, E_{n}): By Lemma 6.7 ⊢ \underline{⌜E⌝} = <\underline{enum(f)}, \underline{⌜E_{1}⌝}, …, \underline{⌜E_{n}⌝}>, by IH ⊢ \underline{⌜E_{i}⌝} = [E_{i}]^{∅}, further by definition [E]^{∅} ≡ <\underline{enum(f)}, [E_{1}]^{∅}, …, [E_{n}]^{∅}>. E ≡ ∀xA: [E]^{∅} ≡ \underline{⌜E⌝}. (b): Special case E ≡ y: Z ⊢ [t] = ν(t) → [E[y := t]] ≡ [t] = ν(y)[y := t] ≡ [E][y := t]. Other cases: Easy induction on E. (c): ⊢ [0] = ν(0) follows by 6.7. ⊢ [S(x)] = <\underline{enum(S)}, [x]> = <\underline{enum(S)}, ν(x)> = ν(Sx).

[x] ≡ ν(x).

(d) By (b), (c).

Lemma 6.16 (a) Z ⊢ Sub(ν(z), \underline{⌜x⌝}, y) = ν(z).

(b) If E is simple, then Z ⊢ Sub([E]^{U}, \underline{⌜x⌝}, ν(x)) = [E]^{U∪\{x\}}.

Proof: Again we write ⊢ for provability in Z.

(a) ⊢ Sub(ν(0), \underline{⌜x⌝}, y) ≡ Sub(<\underline{enum(0)}>, \underline{⌜x⌝}, y) = ν(0).

Sub(ν(z), \underline{⌜x⌝}, y) = ν(z) ⊢ Sub(ν(S(z)), \underline{⌜x⌝}, y)
= Sub(<\underline{enum(S)}, ν(z)>, \underline{⌜x⌝}, y)
= <\underline{enum(S)}, Sub(ν(z), \underline{⌜x⌝}, y)>
= <\underline{enum(S)}, ν(z)>
= ν(S(z)) ,

therefore by the induction principle of Z follows the assertion. (b): Induction on E. U′ := U ∪ {x}.

1. E ≡ y ∈ U:

⊢ Sub([E]^{U}, \underline{⌜x⌝}, ν(x)) = Sub([y]^{U}, \underline{⌜x⌝}, ν(x))
= Sub(ν(y), \underline{⌜x⌝}, ν(x))
= ν(y)
= [E]^{U′} .

2. E ≡ x ∉ U:

⊢ Sub([E]^{U}, \underline{⌜x⌝}, ν(x)) = Sub([x]^{U}, \underline{⌜x⌝}, ν(x))
= Sub(\underline{⌜x⌝}, \underline{⌜x⌝}, ν(x))
= ν(x)
= [E]^{U′} .

3. E ≡ y ∉ U, y ≢ x:

⊢ Sub([E]^{U}, \underline{⌜x⌝}, ν(x)) = Sub([y]^{U}, \underline{⌜x⌝}, ν(x))
= Sub(\underline{⌜y⌝}, \underline{⌜x⌝}, ν(x))
= \underline{⌜y⌝} = [E]^{U′} .

4. E ≡ f(E_{1}, …, E_{n}):

⊢  Sub([E]^{U}, \underline{⌜x⌝}, ν(x))

= Sub(<\underline{enum(f)}, [E_{1}]^{U}, …, [E_{n}]^{U}>, \underline{⌜x⌝}, ν(x))

= <\underline{enum(f)}, Sub([E_{1}]^{U}, \underline{⌜x⌝}, ν(x)), …, Sub([E_{n}]^{U}, \underline{⌜x⌝}, ν(x))>

{IH \atop =} <\underline{enum(f)}, [E_{1}]^{U′}, …, [E_{n}]^{U′}>

= [E]^{U′} .

5. E ≡ ∀xA, FV(E) = ∅: ⊢ Sub([E]^{U}, \underline{⌜x⌝}, ν(x)) = Sub(\underline{⌜E⌝}, \underline{⌜x⌝}, ν(x)) = \underline{⌜E⌝} = [E]^{U′}.

Assumption 6.17 Let in the following Σ be a primitive recursive axiom system in a recursively represented language L such that L ⊇ L_{PR}, which proves the equality axioms and Z.

Lemma 6.18 Let P be a unary formula in L_{PR} such that:

(P1) (Σ ⊢ A) ⇒ Σ ⊢ P(\underline{⌜A⌝}), if A is simple.

(P2) Σ ⊢ P([A → B]) → P([A]) → P([B]) for all simple formulas B.

(P3) Σ ⊢ P(z) → P(Sub(z, \underline{⌜x⌝}, ν(y))).

Then

(P^{∗}) (Σ ⊢ A_{1} → ⋯ → A_{m} → B) ⇒ Σ ⊢ (P([A_{1}]) → ⋯ → P([A_{m}]) → P([B])) for all m ≥ 0 and simple formulas A_{1}, …, A_{m}, B.

Proof: We write ⊢ for Σ ⊢. We show first

(⊢ A) and A simple ⇒⊢ P([A]^{U}) .  (∗)

by induction on the number of elements in U: U = ∅: If (⊢ A), then by (P1) ⊢ (P(\underline{⌜A⌝})), further ⊢ \underline{⌜A⌝} = [A]^{∅}. U → U ∪ {x}: If ⊢ A, by IH ⊢ P([A]^{U}), by (P3) ⊢ P([A]^{U}) → P(Sub([A]^{U}, \underline{⌜x⌝}, ν(y))), by Lemma 6.16 (b) ⊢ Sub([A]^{U}, \underline{⌜x⌝}, ν(x)) = [A]^{U∪\{x\}}. We show for m ≥ 0, simple formulas A_{1}, …, A_{m}, B:

⊢ P([A_{1} → ⋯ → B]) → P([A_{1}]) → ⋯ → P([A_{m}]) → P([B]) .  (∗∗)

Proof by induction on m: m = 0: trivial. m → m + 1: Let C := A_{2} → ⋯ → A_{m+1} → B. By (P2) ⊢ P([A_{1} → C]) → P([A_{1}]) → P([C]), by IH ⊢ P([C]) → P([A_{2}]) → ⋯ → P([A_{m+1}]) → P([B]) and therefore the assertion. By (∗) and (∗∗) follows the assertion.

Lemma 6.19 If P is a unary formula such that (P^{∗}) (as in Lemma 6.18) holds. Then for every n-ary function symbol g ∈ PR we have

Σ ⊢ g(x_{1}, …, x_{n}) = y → P([g(x_{1}, …, x_{n}) = y]) .

Proof: We write ⊢ for Σ ⊢. We will use for the operation A ↦ [A] only (P^{∗}), Lemma 6.15 (c) and [A] is an L_{PR}-term such that FV([A]) = FV(A). It suffices to prove

⊢ P([g(x⃗) = y][y := g(x⃗)]) .  (∗)

(note that P([E])[x := t] ≡ P([E])[x := t]). Then follows by the equality axioms the assertion. Induction on the definition of g: Case g ≡ 0^{n}, S, proj_{n}^{i}: Let t := 0, S(x_{1}), x_{i} respectively. ⊢ g(x⃗) = t, (axiom of Z), ⊢ P([g(x⃗) = t]) (P^{∗}) ⊢ [g(x⃗) = y][y := t] = [(g(x⃗) = y)[y := t]] ≡ [g(x⃗) = t] (by 6.15 (c)) ⊢ P([g(x⃗) = y][y := t]). Case g ≡ h ∘ (g_{1}, …, g_{m}). Let s_{i} := g_{i}(x⃗), s := h(g_{1}(x⃗), …, g_{m}(x⃗)). ⊢ g(x⃗) = s. (axiom of Z) ⊢ g_{1}(x⃗) = y_{1} → ⋯ → g_{m}(x⃗) = y_{m} → h(y_{1}, …, y_{m}) = z → g(x⃗) = z

(equality axioms). ⊢ P([g_{1}(x⃗) = y_{1}]) → ⋯ → P([g_{m}(x⃗) = y_{m}]) →

P([h(y_{1}, …, y_{m}) = z]) → P([g(x⃗) = z]) (by (P^{∗})). ⊢ P([g_{1}(x⃗) = y_{1}][y_{1} := s_{1}]) → ⋯ → P([g_{m}(x⃗) = y_{m}][y_{m} := s_{m}])

→ P([h(y_{1}, …, y_{m}) = z][y_{1} := s_{1}, …, y_{m} := s_{m}, z := s])

→ P([g(x⃗) = z][z := s])

(by equality axioms). ⊢ P([g_{i}(x⃗) = y_{i}][y_{i} := s_{i}]) (IH). ⊢ P([h(y⃗) = z][z := h(y⃗)]) (IH). ⊢ P([h(y⃗) = z][y_{1} := s_{1}, …, y_{m} := s_{m}, z := s]) (equality axioms). ⊢ P([g(x⃗) = z][z := s]). ⊢ s = g(x⃗). ⊢ P([g(x⃗) = z][z := g(x⃗)]). Case g = Rg′h. Let t(z, y) :≡ [g(x⃗, z) = u][u := y]. We show ⊢ P(t(0, g(x⃗, 0))) and ⊢ P(t(z, g(x⃗, z))) → P(t(S(z), g(x⃗, S(z)))). By formal induction in Σ (OBS! here is where full induction is needed — this complexity can however be reduced), follows ⊢ P(t(z, g(x⃗, z))), i.e. the assertion.

1. ⊢ g(x⃗, 0) = g′(x⃗). (axiom of Z). ⊢ g′(x⃗) = y → g(x⃗, 0) = y. ⊢ P([g′(x⃗) = y]) → P([g(x⃗, 0) = y]). ⊢ P([g′(x⃗) = y][y := g′(x⃗)]) → P([g(x⃗, 0) = y][y := g(x⃗, 0)]). ⊢ P([g′(x⃗) = y][y := g′(x⃗)] (IH).

2. ⊢ g(x⃗, S(y)) = h(x⃗, y, g(x⃗, y)). ⊢ g(x⃗, y) = z → h(x⃗, y, z) = u → g(x⃗, S(y)) = u. ⊢ P([g(x⃗, y) = z]) → P([h(x⃗, y, z) = u]) → P([g(x⃗, S(y)) = u]) (P^{∗}). ⊢ P([g(x⃗, y) = z][z := g(x⃗, y)])

→ P([h(x⃗, y, z) = u][z := g(x⃗, y), u := h(x⃗, g(x⃗, y))])

→ P([g(x⃗, S(y)) = u][u := g(x⃗, S(y))])

(by ⊢ h(x⃗, g(x⃗, y)) = g(x⃗, S(y))). ⊢ P([h(x⃗, y, z) = u][u := h(x⃗, y, z)]) (IH). ⊢ P([h(x⃗, y, z) = u][z := g(x⃗, y), u := h(x⃗, g(x⃗, y), z)]). P([g(x⃗, y) = z][z := g(x⃗, y)] ⊢ P([g(x⃗, S(y)) = u][u := g(x⃗, S(y))])

Lemma 6.20 For every extended Σ_{1}-formula A in L_{PR} and x_{1}, …, x_{n} such that FV(A) ⊆ {x_{1}, …, x_{n}} there exists g ∈ PR^{n+1} such that

Z ⊢ A ↔ ∃z(g(x_{1}, …, x_{n}, z) = 0) .

Proof: First, Z ⊢ A ↔ A′ for some strict Σ_{1}-formula A′ (see proof of Lemma 2.33) with FV(A′) ⊆ FV(A) by formalizing the argument in the proof of Lemma 2.33 in Z (use Meta-induction on the definition of extended Σ_{1}-formulas). Let A′ ≡ ∃z.B, B Δ_{0}. By Lemma 6.8 (d) there exists an g ∈ PR^{n+1} such that Z ⊢ B ↔ g(x⃗, z) = 0.

Lemma 6.21 If P is a unary formula, which fulfills (P^{∗}), then T ⊢ C → P(\underline{⌜C⌝}) for every extended Σ_{1}-sentence C.

Proof: Let g ∈ PR^{1} such that Z ⊢ C ↔ ∃x.g(x) = 0. Σ ⊢ g(x) = 0 → C. Σ ⊢ P([g(x) = 0]) → P([C]). Σ ⊢ [g(x) = 0] = [g(x) = y][y := 0] Σ ⊢ g(x) = y → P([g(x) = y]). Σ ⊢ g(x) = 0 → P([g(x) = y][y := 0]). Σ ⊢ g(x) = 0 → P([g(x) = 0]). Σ ⊢ g(x) = 0 → P([C]). Σ ⊢ ∃x(g(x) = 0) → P([C]). Σ ⊢ C → P([C]).

Lemma 6.22 (a) If P is a unary extended Σ_{1}-sentence, which fulfills (P^{∗}), then for all sentences A, B follow (D1), (D2), (D3).

(b) Σ fulfills (D1), (D2), (D3) with

P(x) := Provable_{Σ}(x) := ∃y.(Proof_{Σ}(y, x) ∧ Γ̃_{{ \atop endseq}(b)} = \underline{⌜∅⌝} ∧ Ã_{{ \atop endseq}(b)} = a).

Proof:

(a) Closed formulas are simple, so Z ⊢ [A] = \underline{⌜A⌝}. (D1), (D2) follow directly from (P^{∗}), and (D3) follows from 6.21 with C :≡ P(\underline{⌜A⌝}).

(b) By Lemma 6.18 and (a) it suffices to show (P1) - (P3): (P1): If Σ ⊢ A, then the (strict!) Σ_{1}-sentence P(\underline{⌜A⌝}) holds, therefore Z_{1} ⊢ P(\underline{⌜A⌝}). (P2): From a proof of A → B and a proof of A we get a proof of B by concatenating the two proofs and adding ∅ ⇒ B, which follows from (→^{−}). (P3) From a proof of A we get a proof of A[x := \underline{y}] by using ∀-introduction and ∀-elimination. FV(\underline{y}) = ∅, therefore \underline{y} is substitutable for x in A. Formalization of this proof yields a proof of (P3).

Theorem 6.23 Let T be a primitive recursive axiom system in a recursive presented language containing L_{PR}, which proves the equality axioms, induction for all L(Σ) formulas and all other axioms of Z and P the usual provability predicate.

(a) (Löb’s theorem) (T ⊢ P(\underline{⌜A⌝}) → A) ⇒ T ⊢ A.

(b) (Gödel’s second incompleteness theorem) If T is consistent, T ⊬ ¬P(\underline{⌜⊥⌝}).

6.4 Generalization of Gödel’s 2^{nd} incompleteness theorem

Assumption 6.24 (a) Let in this section L′ be an arbitrary recursive represented language extending L_{ar}. (L_{PR} ⊆ L′ is not required).

(b) Let in this section Σ be a primitive recursive axiom system which proves the equality axioms in the language L′. Let Provable_{Σ} be defined as before.

Definition 6.25 An interpretation of Z in Σ is a pair (N, A ↦ A^{N}), where N is a unary L′-formula and A ↦ A^{N} is a function, which assigns to every PR-formula A a L′-formula A^{N} such that

• ⊥^{N}≡⊥.

• (A s B)^{N} ≡ A^{N} s B^{N} (s ∈ {∧, ∨, →}.

• (¬A)^{N} ≡ ¬(A^{N}).

• (^{∀ ∃} xA)^{N} ≡^{∀ ∃} x(N(x) → A^{N}).

• FV(A^{N}) = FV(A).

• Z ⊢ A ⇒ Σ ⊢ A^{∗}, where, if FV(A) = {x_{1}, …, x_{n}}, A^{∗} :≡ N(x_{1}) → ⋯ → N(x_{n}) → A^{N}.

Lemma 6.26 If (N, A ↦ A^{N}) is an interpretation of Z in Σ, then for every PR-formula A follows

Σ ⊢ A^{∗} ⇒ Σ ⊢ (A[x := \underline{n}])^{∗} .

Proof: For simplicity let FV(A) = {x, y}. Σ ⊢ A^{∗} ⇒ Σ ⊢ N(y) → N(x) → A^{N} ⇒ Σ ⊢ N(y) → ∀x(N(x) → A^{N}). Z ⊢ ∀x(A) → A[x := \underline{n}] ⇒ Σ ⊢ (∀x(A) → A[x := \underline{n}])^{∗} ⇒ Σ ⊢ N(y) → (∀x(N(x) → A^{N}) → (A[x := \underline{n}])^{N}). Therefore Σ ⊢ N(y) → (A[x := \underline{n}])^{N}, Σ ⊢ (A[x := \underline{n}])^{∗}.

Definition 6.27 An interpretation (N, A ↦ A^{N}) is strict, if there exists a function g ∈ PR^{1} such that the following holds:

• g(⌜A⌝) = ⌜A^{∗}⌝ for every L_{PR}-formula A,

• g(n) = 0, if n is not number of a L_{PR}-formula,

• Z ⊢ g([A → B]) = <\underline{enum(→)}, g([A]), g([B])> for all simple L_{PR}-formulas A, B,

• Z ⊢ Provable_{Σ}(g(z)) → Provable_{Σ}(g(Sub(z, \underline{⌜x⌝}, ν(x)))).

Theorem 6.28 If Σ is a primitive recursive consistent axiom system and (N, A ↦ A^{N}) a strict interpretation of Z in Σ, then Σ ⊬ (Cons_{Σ})^{N}.

Proof: Let T := {A | AL_{PR}-sentence and Σ ⊢ A^{N}} and P(x) := Provable_{Σ}(g(x)).

((T ⊢ A) ∧ A L_{PR}-sentence ⇒ Σ ⊢ A^{N})  (1)

Proof: By assumption there exist A_{1}, …, A_{n} ∈ T such that ⊢ A_{1} → ⋯ → A_{n} → A. Therefore Z ⊢ A_{1} → ⋯ → A_{n} → A, Σ ⊢ (A_{1} → ⋯ → A_{n} → A)^{∗}, (A_{1} → ⋯ → A_{n} → A)^{∗} ≡ A_{1}^{N} → ⋯ → A_{n}^{N} → A^{N}, Σ ⊢ A_{1}^{N} → ⋯ → A_{n}^{N} → A^{N} and Σ ⊢ A_{i}^{N} (i = 1, …, n), therefore Σ ⊢ A^{N}.

T is consistent  (2)

Proof: If T ⊢⊥, then Σ ⊢⊥^{N}, ⊥^{N}≡⊥.

Z ⊆ T  (3)

Proof: If A ∈ Z, then Σ ⊢ A^{N}, A is L_{PR}-sentence, A ∈ T.

For T and P hold (P1), (P2), (P3)  (4)

Proof: (P1): If A is an L_{PR}-formula, and ∀A is the ∀-closure of A, then T ⊢ A ⇒ T ⊢ ∀A ⇒ Σ ⊢ (∀A)^{N} ⇒ Σ ⊢ A^{∗} ⇒ Provable_{Σ}(g(\underline{⌜A⌝})) is a true extended Σ_{1}-sentence ⇒ Z ⊢ Provable_{Σ}(g(\underline{⌜A⌝})) ⇒ T ⊢ P(\underline{⌜A⌝}). (P2): Assume A, B are two simple L_{PR}-formulas. Then

Z ⊢ Provable_{Σ}(<\underline{enum(→)}, x, y>) → Provable_{Σ}(x) → Provable_{Σ}(y) .

Therefore

Z ⊢ Provable_{Σ}(g([A → B])) → Provable_{Σ}(g([A])) → Provable_{Σ}(g([B])) .

(P3) Last condition on “g is strict”. From Lemmata 6.18, 6.22 and Corollary 6.4 follows T ⊬ ¬P(\underline{⌜⊥⌝}). By Lemma 6.7 (a) follows Z ⊢ g(\underline{⌜⊥⌝}) = \underline{⌜⊥⌝} and therefore T ⊬ ¬Provable_{Σ}(\underline{⌜⊥⌝}). By Definition of T follows therefore Σ ⊬ (Provable_{Σ}(\underline{⌜⊥⌝}))^{N}.

80 CHAPTER 6. GÖDEL’S SECOND INCOMPLETENESS THEOREM

Set Theory

We will develop set theory in a minimal language. We can then show that several relations and functions can be defined by formulas. In order to make life easier we show, that if relations and functions can be done (in what sense will be made clear below) then we can add new function and relation symbols for the one defined by the formula and don’t get any new theorems in the original language.

7.1 Adding new function and relation symbols

This section is very much based on [Men97], sect. 2.9.

Lemma 7.1 Let T be a set of formulas including the equality axioms, formulated in a language L.

(a) Let A^{R}(x_{1}, …, x_{n}) be a formula in L. Let L_{R} be the extension of L by one new n-ary relation symbol R and T_{R} the extension of T by adding the equality axioms for R and the axiom (R^{∗}) ∀y_{1}, …, y_{n}.(A^{R}(y_{1}, …, y_{n}) ↔ R(y_{1}, …, y_{n})). Then we have

(i) T_{R} is a conservative extension of T, i.e. T_{R} proves the same Lsentences as T.

(ii) There exists a map ∗ from formulas in L_{R} into formulas of L such

that • (ψ∧ ∨ψ)^{∗} ≡ ψ^{∗}∧ ∨ψ^{∗},

• (^{∀ ∃}xψ)^{∗} ≡ ^{∀ ∃}x.(ψ^{∗}),

• (¬ψ)^{∗} ≡ ¬(ψ^{∗})

• If FV(ψ) ⊆ {x_{1}, …, x_{n}} then T ⊢ ∀x_{1}, …, x_{n}.(ψ ↔ ψ^{∗}).

(b) Let A^{f}(x_{1}, …, x_{n}, z) be a formula in L, such that T ⊢ ∀x_{1}, …, x_{n}.∃!z.A^{f}(x_{1}, …, x_{n}, z). Let L_{f} be the extension of L by one new n-ary relation symbol f and T_{f} the extension of T by adding the new equality axioms for f and the axiom (f^{∗}) ∀y_{1}, …, y_{n}, z.A^{f}(y_{1}, …, y_{n}, f(y_{1}, …, y_{n})).

Then the same statement as for T_{R} can be proved for T_{f} mutatis mutandis.

Proof: (a) Let ψ^{∗} be the result of replacing prime formulas R(t_{1}, …, t_{n}) in ψ by A^{R}(t_{1}, …, t_{n}). With this translation all axioms and rules of T_{R} translate immediately into axioms and rules of T.

(b) We show that T and T_{f} have the same models: To any model M of T exists a model M′ of T_{f} with M′ ↾ L = M and if M′ is a model of T_{f}, then M′ ↾ L is a model of T: The second statement is trivial, and if M is a model of T, let M′ be the extension of M by defining f^{M′}(a_{1}, …, a_{n}) := b for some b such that b ∈ M and (M, (x_{1} ↦ a_{1}, …, x_{n} ↦ a_{n}, y ↦ b)) ⊧ A(x_{1}, …, x_{n}, y). Such a b exists and for any other b′ we have (b, b′) ∈=^{M}. One sees immediately that =^{M} is a congruence with respect to f^{M′} and M′ ⊧ (f^{∗}), therefore M′ ⊧ T_{f}. Now (i) follows. For (ii), we replace in A first all prime formulas R(t_{1}, …, t_{n}) containing a t_{i} which is not a variable by ∀x_{1}, …, x_{n}(x_{1} = t_{1} ∧ ⋯ ∧ x_{n} = t_{n} → R(x_{1}, …, x_{n})). Then replace prime formulas s = t with s not a variable by ∀x(x = s → x = t). Finally we replace successively x = g(t_{1}, …, t_{m}) with one of the t_{i} not a variable by ∀x_{1}, …, x_{m}(x_{1} = t_{1} ∧ ⋯ ∧ x_{m} = t_{m} → x = g(x_{1}, …, x_{m})). The resulting formula will be logically equivalent to the original formula and f occurs only in prime formulas of the form x = f(x_{1}, …, x_{n}). Now replace x = f(x_{1}, …, x_{n}) by A(x_{1}, …, x_{n}, x). The formula we get will be, by the assumption in T, in T equivalent to the original one.

7.2 The axioms of set theory

We will follow in this section very closely [Buc93b], section 7. Set Theory is the main basis for mathematics. Most mathematical reasoning is carried out in set theory. However there are some problems … Sets Cantor: “Eine Menge ist eine Zusammenfassung von Objekten.” (English: A set is a collection of objects). However … Russell’s paradox: Naïve set theory is inconsistent. Let a := {x | x ∉ x}. Case a ∈ a. Then a ∉ a. Therefore in any case a ∉ a. But then a ∈ a, contradiction. Zermelo-Fraenkel-set theory ZF In order to avoid this inconsistency, restrict the introduction of new sets. The consistency of the resulting theory cannot be shown, but up to now no inconsistency has been found, therefore it seems very likely that the ZF is consistent.

We will first introduce abbreviations for classes, to make life easier.

Definition 7.2 (a) The language of Zermelo-Fraenkel-Set Theory (ZF) consists of one binary predicate symbol ∈, written infix, and equality.

7.2. THE AXIOMS OF SET THEORY 83

(b) A class is an expression {x | A}, where A is a formula and x a variable. In the following A, B, C, D, F, Q, R be classes.

(c) a ∈ {x | B} := B[x := a] (where we assume that a can be substituted for x in A after some renaming of bounded variables.

(d) {x ∈ A | B} := {x | x ∈ A ∧ B}.

(e) We identify a set (i.e. a variable) a with the class {x | x ∈ a}. All the following abbreviations apply for classes as well (with exceptions in (f) and (i)).

(f) A = B :≡ ∀x(x ∈ A ↔ x ∈ B). This definition holds as well with A or B replaced by sets, but not both (since a = b is an atomic formula).

(g) ∀x ∈ A.B := ∀x(x ∈ A → B). ∃x ∈ A.B := ∃x(x ∈ A ∧ B).

(h) A ⊆ B := ∀x ∈ A.x ∈ B.

(i) A ∈ B := ∃x ∈ B.x = A. This abbreviation applies for B replaced by a set b, but not with A replaced by set a.

(j) ∅ := {} := {x | x ≠ x}. {x_{1}, …, x_{n}} := {x | x = x_{1} ∨ ⋯ x = x_{n}} (n ≥ 0).

(k) ⋃ A := {x | ∃y ∈ A.x ∈ y}. ⋂ A := {x | ∀y ∈ A.x ∈ y}.

(l) A ∪ B := {x | x ∈ A ∨ x ∈ B}.

A ∩ B := {x | x ∈ A ∧ x ∈ B}. A \ B := {x | x ∈ A ∧ x ∉ B}.

(m) P(A) := {x | x ⊆ A}.

(n) V := {x | x = x}.

(o) In the following a, b, c, d, e, f, g, h, x, y, z, w are sets i.e. elements of V. Remark 7.3 (a) ∀x(x ≠ ∅ ↔ ∃y.y ∈ x).

(b) A ∈ V ↔ ∃x.x = A. Proof: (a): x = ∅ ⇔ (∀y(y ∈ x ↔ y ≠ y) ⇔ ¬∃y.y ∈ x. (b): A ∈ V ⇔ ∃x ∈ V.x = A ⇔ ∃x(x = x ∧ x = A) ⇔ ∃x.x = A. Definition 7.4 The universal closure of a formula A is the formula ∀x_{1}…. ∀x_{n}.A where x_{1}, …, x_{n} are the free variables in A and distinct. Definition 7.5 The axioms of ZF are the equality axioms and the universal closure of the following formulas following:

(Ext) x = y ↔ ∀z(z ∈ x ↔ z ∈ y). (Extensionality)

(Fun) x ≠ ∅ → ∃y(y ∈ x ∧ ∀z ∈ x.z ∉ y). (Foundation axiom)

(Pair) {x, y} ∈ V.

(Union) ⋃ x ∈ V.

(Pow) P(x) ∈ V.

(Rep) (∀x, y, z(A(x, y) ∧ A(x, z) → y = z) → {y | ∃x ∈ u.A(x, y)} ∈ V. (Replacement axiom).

(Inf) ∃x.(∅ ∈ x ∧ ∀y ∈ x.(y ∪ {y}) ∈ x).

Note that (Rep) is an axiom schema rather than a simple axiom.

The Extensionality formalizes, that sets are determined by their elements. The foundation axioms expresses that sets are well-founded in the sense (which means essentially that there are no infinite sequences a_{1} ϶ a_{2} ϶ a_{3} ϶ ⋯: {a_{1}, a_{2}, …, } would contradict the axiom). The meaning of the replacement axioms is that, if a formula defines a function f, then for every set a f[a] is a set. Infinity guarantees the existence of infinite sets, without it there exists a model in which all sets are finite (the set of hereditarily finite sets, i.e. the finite sets, such that all its elements, the elements of its elements, the elements of its elements of its elements, etc. are finite).

Remark 7.6 If we add to ZF new defined relation- and function symbols as in 7.1, then adding to the new theory instances of (Rep) in the extended language yields a conservative extension. We will therefore in the following add these symbols freely without mentioning it.

Proof: The instance of R with respect to a formula A is equivalent to the instance with respect to the formula A^{∗}.

Convention 7.7 In the following all formulas will be provable in ZF.

Remark 7.8 (a) Every set a is a class i.e. there exists a class A such that a = A.

(b) There exists a class A which is not a set, i.e. ¬∃x.x = A.

Proof: (a) A := {x | x ∈ a}. (b): A := {x | x ∉ x}. If a = A, then we get Russell’s paradox (a ∈ a ↔ a ∉ a), a contradiction. We can extend the language of set theory by adding relation symbols and function symbols in the following sense:

Definition 7.9 Assume t is a term, which is not a variable, in an extension of ZF. {t | y_{1} ∈ A_{1}, …, y_{n} ∈ A_{n}, A(y_{1}, …, y_{n})} :=

{x | ∃y_{1} ∈ A_{1}, …, y_{n} ∈ A_{n}.(x = t ∧ A(y_{1}, …, y_{n}))} (x a new variable). {t | y_{1} ∈ A_{1}, …, y_{n} ∈ A_{n}} := {t | y_{1} ∈ A_{1}, …, y_{n} ∈ A_{n}, ¬ ⊥}.

Lemma 7.10 If t is some closed term in the extended language, FV(t) ⊆ {x_{1}, …, x_{n}}. Then ∀y_{1}, …, y_{n}.{t | x_{1} ∈ y_{1}, …, x_{n} ∈ y_{n}} ∈ V.

Proof: Induction on n. n = 0 {t |} = {t} ∈ V. n → n + 1. Let A_{n+1}(x_{n+1}, u) := u = {t | x_{1} ∈ y_{1}, …, x_{n} ∈ y_{n}}. Then the premise of the replacement axiom is fulfilled, therefore B := {u | ∃x_{n+1} ∈ y_{n+1}.A_{n+1}(x_{n+1}, u)} is a set. ⋃ B = {t | ∃x_{1} ∈ y_{1}, …, x_{n+1} ∈ y_{n+1}}. (“⊆” is clear. “⊃”: if x_{i} ∈ y_{i}, then by IH there exists u such that A_{n+1}(x_{n+1}, u), and t ∈ u ⊆ ⋃ B).

Lemma 7.11 (a) ZF ⊢ ∀x, y.x ∪ y ∈ V.

(b) For every n ∈ ℕ n ≥ 1. ZF ⊢ ∀x_{1}, …, x_{n}.{x_{1}, …, x_{n}} ∈ V.

(c) ∅ ∈ V.

Proof: (a) z := ⋃{a, b}. (b) Induction on n. n = 1: z := {x_{1}, x_{1}}. n → n + 1: z := {x_{1}, …, x_{n}} ∪ {x_{n+1}, x_{n+1}}.

(c) ∃x.x = x. (we have ∀x.x = x, therefore x = x, ∃x.x = x) Assume a, a = a. Let A(x, y) :≡ y ≠ y. The premise of the replacement axiom is fulfilled, therefore ∅ = {y | ∃x ∈ a.y ≠ y} is a set.

Definition 7.12 <a, b> := {{a}, {a, b}}.

Lemma 7.13 ∀x, x′, y, y′(<x, y> = <x′, y′> → x = x′ ∧ y = y′).

Proof: Case x = y. Then {{x}} = {{x′}, {x′, y′}}, {x} = {x′} = {x′, y′}, y = x = x′ = y′. Case x′ = y′. Similarly. Otherwise x ≠ y, x′ ≠ y′. {x, y} ∈ {{x′}, {x′, y′}}, {x, y} ≠ {x′} (since x ≠ y}) therefore {x, y} = {x′, y′}. Similarly {x} = {x′}, x = x′. y′ ≠ y, y′ ∈ {x, y}, y′ = y.

Definition 7.14 (a) A × B := {<a, b> | a ∈ A, b ∈ B}.

(b) Rel_{2}(R) := R ⊆ V × V (R is a binary relation). If R is a class term, R(x, y) := x R y := <x, y> ∈ R.

(c) Fun(F) := Rel_{2}(F) ∧ ∀x, y, z(<x, y> ∈ F ∧ <x, z> ∈ F → y = z). (F is a function)

(d) dom(R) := {x | ∃y.R(x, y)} (the domain of R)

(e) rng(R) := {y | ∃x.R(x, y)} (the range of R).

86 CHAPTER 7. SET THEORY

(f) R ↾ A := R ∩ (A × V) (the restriction of R to A).

(g) R[A] := {y | ∃x ∈ A.<x, y> ∈ R} (the image of R under A).

(h) Q ∘ R := {<x, z> | ∃y(R(x, y) ∧ Q(y, z))}. (Composition of relations).

(i) R^{−1} := {<y, x> | R(x, y)} (the inverse of R).

(j) F(x) := ⋃{y | <x, y> ∈ F} (which will be the application of a function to an element, if F is a function).

(k) (F : A → B) := (Fun(F) ∧ dom(F) = A ∧ rng(F) ⊆ B).

(l) a^{b} := {f | f : a → b}.

(m) injective(F) := Fun(F^{−1}) (F is injective)

(n) (F : A ↣ B) := (F : a → B) ∧ injective(F). (F is an injective function from A into B).

(o) (F : A ↠ B) := (F : A → B) ∧ rng(F) = B. (F is a surjective function from A into B).

(p) (F : A ⟶^{≅} B) := (F : A ↣ B) ∧ (F : A ↠ B). (F is an bijective function from A into B).

Lemma 7.15 Assume Fun(F), Fun(G), A ⊆ dom(F) ∩ dom(G).

(a) ∀x ∈ dom(F)(F(x) ∈ V∧<x, F(x)> ∈ F ∧∀y(<x, y> ∈ F ↔ y = F(x))).

(b) Fun(F ↾ A) ∧ dom(F ↾ A) = A ∧ rng(F ↾ A) = F[A] ∧ ∀x ∈ A(F(x) = (F ↾ A)(x)).

(c) rng(F) = F[dom(F)] ∧ F = F ↾ dom(F).

(d) (∀x ∈ A(F(x) = G(x)) → F ↾ A = G ↾ A).

(e) dom(F) = dom(G) ∧ (∀x ∈ dom(F)(F(x) = G(x)) → F = G). Proof: (a) Assume x ∈ dom(F). Then there exists z such that <x, z> ∈ F. Assume u ∈ F(x). Then u ∈ z′ for some z′ such that <x, z′> ∈ F. z′ = z. u ∈ z. Assume u ∈ z. Then u ∈ F(x). Therefore F(x) = z ∈ V, <x, F(x)> ∈ F, <x, y> ∈ F ⇔ y = z = F(x). Lemma 7.16 (Some conclusions from (Rep)

(a) Fun(F) → F[a] ∈ V.

(b) For every formula A(x) {x ∈ a | A(x)} ∈ V. (Principle of separation). ∀x(A ∩ x ∈ V). A ⊆ B ∧ B ∈ V → A ∈ V.

(c) A ≠ ∅ → ⋂ A ∈ V.

Remark: (b) will be the main basis for proving that some newly introduced classes are sets. One just needs to find a suitable a, for which usually some applications of P suffice. Proof of the lemma:

(a) Let A(x, y) := <x, y> ∈ F. By (Rep)

F[a]  =  {F(x) | x ∈ a}
{Lemma 7.15 (a) \atop =} \{y | ∃x ∈ a.<x, y> ∈ F\}
=  {y | ∃x ∈ a.A(x, y)}
{(Rep) \atop ∈}  V

(b) Let F := {<x, x> | A(x)}. Fun(F), F[a] = {x ∈ a | A(x)} ∈ V. The other assertions follow immediately from this.

(c) Assume A ≠ ∅. Therefore x ∈ A for some x. ∀y ∈ ⋂ A.y ∈ x. ⋂ A ⊆ x ∈ V. A ⊆ V.

Lemma 7.17 (a) a ∪ b, a ∩ b, a \ b, a × b, b^{a}, dom(r), rng(r), r(b), r[b], r ↾ a, r^{−1}, r ∘ s ∈ V.

(b) Rel(R) ∧ dom(R) ∈ V ∧ rng(R) ∈ V → R ∈ V.

(c) Fun(F) → F ↾ x ∈ V.

(d) Fun(F) ∧ dom(F) ∈ V → F ∈ V.

Proof:

(a) a ∪ b = ⋃{a, b}. a ∩ b, a \ b ⊆ a. If x ∈ a, y ∈ b, then <x, y> = {{x}, {x, y}} ∈ P(P(a∪b)), a×b ⊆ P(P(a∪b)) ∈ V. b^{a} ⊆ P(a × b) ∈ V. <x, y> ∈ r ⇒ {x, y} ∈ ⋃ r ⇒ x, y ∈ ⋃ ⋃ r, dom(r), rng(r), r[a] ⊆ ⋃ ⋃ r ∈ V, r(a) = ⋃ r[{a}] ∈ V. r ↾ a ⊆ r, r^{−1} ⊆ rng(r) × dom(r), r ∘ s ⊆ dom(s) × rng(r).

(b) R ⊆ dom(R) × rng(R).

(c) F ↾ a ⊆ a × F[a].

(d) F = F ↾ dom(F).

88 CHAPTER 7. SET THEORY

Ordinals

We will follow in this section very closely [Buc93b], section 8. We will work in ZF. Motivation: There are two induction principals for the natural numbers:

(i) A(0) → ∀x ∈ ℕ(A(x) → A(x + 1)) → ∀x ∈ ℕ.A(x)

(ii) ∀x ∈ ℕ(∀y < x(y ∈ ℕ → A(y)) → A(x)) → ∀x ∈ ℕ.A(x)

The second principal can be applied to bigger orderings as well. Let M := ℕ ∪ {ω}, ω a new element, for x, y ∈ M, x ≺ y ⇔ (x, y ∈ ℕ∧x < y)∨(x ∈ ℕ∧y = ω). We can visualize this order as follows:

0 1 2 3 ⋯ ω

(ii) holds with ℕ, < replaced by M, ≺: Under the assumptions of (ii) we get first ∀n ∈ ℕ.A(n), and since x ≺ ω ⇒ x ∈ ℕ ⇒ A(x) follows A(ω). We can take now bigger orderings like

0 1 2 3 ⋯ ω (ω + 1) (ω + 2) (ω + 3) ⋯

and again the above principal holds: We get A(x) for x ⪯ ω, then for ω + 1, ω + 2, …. For the ordering

0 1 2 ⋯ ω (ω + 1) (ω + 2) ⋯ (ω + ω) = ω · 2

it holds again. This scale can be extended further.

We start now with the development of orderings in general for which the above principle holds.

90 CHAPTER 8. ORDINALS

8.1 Well-founded relations

Definition 8.1 (a) ∀x R a.A(x) := ∀x(x R a → A(x)), similar for ∃.

(b) Prog_{R}(A) := ∀x(∀y R x(y ∈ A) → x ∈ A). (A is progressive with respect to R).

(c) TI_{R}(A) := Prog_{R}(A) → ∀x.x ∈ A. (transfinite induction over R for A). Lemma 8.2 Assume Rel(R). The following principles are equivalent (i.e. the set of formulas of (i) and (ii) are over ZF equivalent)

(i) Existence of minimal elements: For every class C

C ≠ ∅ → ∃x ∈ C.x_{R} ∩ C = ∅ .

(Such an x is called a minimal element in C with respect to R). (ii) For every class C TI_{R}(C). (Induction over R). Proof:

(i) with C := V \ D is equivalent to

(V \ D) ≠ ∅ → ∃x ∈ (V \ D).∀y R x.y ∉ (V \ D)

⇔ ∃x.x ∉ D → ∃x(x ∉ D ∧ ∀y R x.y ∈ D)
⇔ ¬(∃x(x ∉ D ∧ ∀y R x.y ∈ D)) → ¬∃x.x ∉ D
⇔ ∀x.(∀y R x.y ∈ D → x ∈ D) → ∀x.x ∈ D
≡ TI_{R}(D)

Definition 8.3 (a) trans(R) := ∀x, y, z(x R y ∧ y R z → x R z). (R is

transitive).

(b) irreflexive(R) := ∀x.¬(x R x). (R is irreflexive).

(c) x_{R} := {y | y R x}(= R^{−1}[{x}]).

(d) Found(R) := ∀u(u ≠ ∅ → ∃x ∈ u.x_{R} ∩ u = ∅). (R is founded).

(e) WFound(R) := Found(R) ∧ ∀x.x_{R} ∈ V (R is well-founded). Remark 8.4 (a) If (i) (or (ii)) of Lemma 8.2 holds for R, then Found(R).

(b) Found(R) → irreflexive(R).

(c) x_{∈} = x (where we identify ∈ with the relation {< y, x >| y ∈ x}). Proof: (b): Assume x. {x} ≠ ∅, exists y in {x} such that y_{R} ∩ {x} = ∅, x_{R} ∩ {x} = ∅, ¬x R x. Lemma 8.5 Assume trans(R), WFound(R). Then (i) and (ii) of Lemma 8.2 hold.

Proof: We show (i). Assume C ≠ ∅, u ∈ C. Case 1: u_{R} ∩ C = ∅. Assertion holds. Case 2: u_{R} ∩ C ≠ ∅. a := (u_{R} ∩ C) ∈ V, a ≠ ∅. By assumption exists c ∈ a such that c_{R} ∩ a = ∅. c ∈ C. By c ∈ u_{R} and trans(R) follows c_{R} ⊆ u_{R}. Therefore c ∈ C and c_{R} ∩ C = ∅.

Notation 8.5a F(a_{1}, …, a_{n}) := F(<a_{1}, …, a_{n}>), if n ≥ 2.

Theorem 8.6 (Recursion theorem of set theory) Assume WFound(R), trans(R), G : A × V → V. Then there exists a unique function F : A → V such that F(x) = G(x, F ↾ x_{R}) for all x ∈ A).

Proof: We define approximations of the resulting function F as follows:

Approx(f) := Fun(f) ∧ dom(f) ⊆ A ∧

∀x ∈ dom(f)(A ∩ x_{R} ⊆ dom(f) ∧ f(x) = G(x, f ↾ x_{R})) .

C := {f | Approx(f)}, F := ⋃ C. We show that F fulfills the assertion of the theorem.

Approx(f_{1}) ∧ Approx(f_{2}) ∧ x ∈ dom(f_{1}) ∩ dom(f_{2}) → f_{1}(x) = f_{2}(x)  (1)

Proof by induction over R. Assume x ∈ dom(f_{1})∩dom(f_{2}) and the assertion for y R x. Then A ∩ x_{R} ⊆ dom(f_{1}) ∩ dom(f_{2}), by IH ∀y ∈ A ∩ x_{R}(f_{1}(x) = f_{2}(y)), i.e. f_{1} ↾ x_{R} = f_{2} ↾ x_{R}. By Approx(f_{1}), Approx(f_{2}) follows f_{1}(x) = G(x, f_{1} ↾ x_{R}) = G(x, f_{2} ↾ x_{R}) = f_{2}(x).

Fun(F) ∧ dom(F) = ⋃{dom(f) | Approx(f)} ∧ ∀f ∈ C.f = F ↾ dom(f) (2)

Proof: By (1).

∀x ∈ dom(F)(A ∩ x_{R} ⊆ dom(F) ∧ F(x) = G(x, F(x_{R})))  (3)

Proof: If x ∈ dom(F), then x ∈ dom(f) for some f such that Approx(f), A ∩ x_{R} ⊆ dom(f) ⊆ dom(F), by (2) F(x) = f(x) = G(x, f ↾ x_{R}) = G(x, F ↾ x_{R}).

A = dom(F)  (4)

Proof: dom(F) ⊆ A is clear. We show A ⊆ dom(F) by induction on R. Assume x ∈ A, a := x_{R} ∩ A ⊆ dom(F) (IH). We show x ∈ dom(F). Let f := F ↾ a ∪ {<x, G(x, F ↾ x_{R})>}. We show Approx(f). Fun(f) since x ∉ a (otherwise x R x, contradicting the well-foundedness of R). Let now y ∈ dom(f).

If y ∈ a, then, by the transitivity of R, A ∩ y_{R} ⊆ a ⊆ dom(f) and f(y) = F(y) = G(y, F ↾ y_{R}) = G(y, f ↾ y_{R}). If y = x, then A ∩ x_{R} = a ⊆ dom(f) and f(x) = G(x, F ↾ x_{R}) = G(x, f ↾ x_{R}). The uniqueness of F follows immediately by induction on R.

Definition 8.7 (a) R ⊆ A × A is called a linear ordering on A, iff the following holds:

• ∀x.¬(x R x).

• ∀x, y, z(x R y ∧ y R z → x R z).

• ∀x, y(x R y ∨ x = y ∨ y R x).

(b) A linear ordering R on A is called well-ordering on A, iff R is well-founded.

(c) A is called well-ordered (linearly ordered) by R, if R ∩ (A × A) is a wellordering (linear ordering) on A.

(d) If A ∈ V and R is a well-ordering on A, we call the pair (A, R) a wellordered set or well-ordering

Remark 8.8 Assume A is well-ordered by R.

(a) Every non-empty class C ⊆ A has a (uniquely determined) minimal element min_{R}(C).

(b) Every subclass B ⊆ A is well-ordered by R as well

Proof of (a): Let Q := R ∩ (A × A). By Lemma 8.2 there exists a ∈ C such that C ∩ a_{Q} = ∅. ∀y ∈ C(¬(y R a)), ∀y ∈ C(y = a ∨ a R y), a = min_{R}(C). Uniqueness: If a, b are minima, then a R b R a, by well-foundedness of R a = b.

8.2 The class of Ordinals

Definition 8.9 (a) A class A is called transitive, if ∀x ∈ A.x ⊆ A.

(b) An ordinal is a transitive set, the elements of which are transitive as well.

(c) Ord := {x | x is Ordinal}.

(d) In the following α, β, γ, δ, ρ, ξ, η, ζ denote ordinals.

Therefore ^{∀ ∃} α.A stands for ^{∀ ∃} α ∈ Ord.A. α < β :≡ α ∈ β, α ≤ β :≡ α < β ∨ α = β.

Lemma 8.10 (a) If α ∈ Ord, x ∈ α, then x ∈ Ord.

(b) ∈ ∩(Ord × Ord) is transitive, well-founded and fulfills therefore (i) and (ii) of Lemma 8.4.

(c) ∈ ∩(Ord × Ord) is a linear order on Ord.

(Especially by (a) Ord is well-ordered by ∈).

(d) α ≤ β ↔ α ⊆ β.

(e) Ord ∉ V.

Proof: (a): x is transitive. If y ∈ x, then y ∈ x ∈ α, y ∈ α, y is transitive. Therefore x ∈ Ord.

(b) R :=∈ ∩(Ord × Ord). trans(R) (since x R y R z, then x ∈ y ∈ z ∈ Ord, x ∈ z ∈ Ord, x R z. WFound(R): y_{R} = ∅, if y ∉ Ord, y_{R} = y otherwise, y_{R} ∈ Ord. Further if u ≠ ∅, then v ∈ u s.t. v ∩ u = ∅, v_{R} ∩ u ⊆ v ∩ u = ∅. By Lemma 8.5 follow (i), (ii).

(c) α ∉ α by the foundation axiom (otherwise {α} contradicts it). ∈ is transitive on Ord. Proof of linearity: We show ∀α, β(α < β ∨ α = β ∨ β < α). Induction on α, so assume α, Assertion for all α′ < α and show ∀β((α < β ∨ α = β ∨ β < α). Induction on β, so assume assertion for β′ < β. Case 1: ∃α′ < α(β < α′ ∨ β = α′). Then β < α. Case 2: Otherwise. Then by IH for α, ∀α′ < α.α′ < β, α ⊆ β. Case 2.1 α < β′ ∨ α = β′ for some β′ < β. Then α < β. Case 2.2 Otherwise. Then ∀β′ < β.β′ < α, β ⊆ α. Together with α ⊆ β therefore α = β.

(d) If α ∈ β by transitivity of ∈ on Ord, α ⊆ β. If α = β, α ⊆ β. Assume now α ⊆ β and ¬(α ≤ β). By the linearity of ∈ follows then β ∈ α ⊆ β, contradicting the foundation axiom.

(e) Ord is transitive and ∀x ∈ Ord.trans(x). If Ord ∈ V, then Ord ∈ Ord, a contradiction.

Corollary 8.11 (a) Every non empty class of ordinals has (exactly) on least element min(C).

(b) ∀α(∀ξ < α(A(ξ)) → A(α)) → ∀αA(α).

(c) For every G : V → V there exists a unique function F : Ord → V such that F(α) = G(F ↾ α) for all α ∈ V.

Proof: (b): Use principle (ii) with C := {α ∈ Ord | A(α)} ∪ (V \ Ord). (c): Recursion theorem.

Lemma 8.12 (a) If A ⊆ Ord is transitive, then A ∈ V ⇒ A ∈ Ord and A ∉ V → A = Ord.

(b) If A ⊆ Ord is non empty, then ⋂ A = min(A), i.e. c := ⋂ A ∈ A ∧ ∀β ∈ A.c ≤ β (c) If a ∈ V, a ⊆ Ord, then ⋃ a ∈ Ord and ⋃ a = sup(a)(:= min{α ∈ Ord |

∀β ∈ a.β ≤ α}).

(d) For every class A ⊆ Ord we have A ∈ V ↔ ∃α ∈ Ord.∀β ∈ A.β ≤ α.

Proof:

(a) If A ⊆ Ord is transitive, then A is transitive and its elements are transitive, so A ∈ V → A ∈ Ord. If A ∉ V, then α ∈ Ord → A ⊈ α ⇒ ∃β ∈ A.β ∉ α ⇒ ∃β ∈ A.α ≤ β → α ∈ A, A ⊆ Ord ⊆ A.

(b) Let α := min(A). then ∀β ∈ A.α ⊆ β, α ∈ A. Therefore α ⊆ ⋂ A ⊆ α.

(c) Let a ⊆ Ord ∧ a ∈ V. One easily verifies ⋃ a is a transitive set of ordinals. Therefore by (a) ⋃ a ∈ Ord. Further, for all α ∈ Ord we have ⋃ a ≤ α ↔ ∀β ∈ a.β ≤ α, i.e. ⋃ a = min{α ∈ Ord | ∀β ∈ a.β ≤ α}. (d): “→”: By A ∈ V follows ⋃ A ∈ Ord, and ∀α ∈ A.α ≤ ⋃ A}. “←” From ∀β ∈ A.β ≤ α follows A ⊆ α ∪ {α}, A ∈ V.

Definition 8.13 Let R be a well-ordering on A. An order function on (A, R) is a function F such that

• dom(F) = Ord or dom(F) ∈ Ord.

• rng(F) = A.

• ∀α, β ∈ dom(F)(β < α → F(β) R F(α)).

Theorem 8.14 If R is a well-ordering on A, then there exists exactly one order function F on (A, R). And we have F(α) = min_{R}{x ∈ A | F[α] ⊆ x_{R}} for all α ∈ dom(F). We call dom(F) the order type of (A, R). Further we have A ∈ V → dom(F) ∈ Ord and A ∉ V → dom(F) = Ord.

Proof: Uniqueness: Let F be an order function on (A, R). By transfinite induction on α we show: α ∈ dom(F) → F(α) = min_{R}{x ∈ A | F[α] ⊆ x_{R}}. Then the uniqueness of F follows by the recursion theorem of set theory. So assume α ∈ dom(F). If β ∈ α then F(β) R F(α), so F[α] ⊆ F(α)_{R}. Let now x ∈ A such that F[α] ⊆ x_{R}. By rng(F) = A there exists β ∈ dom(F) such that F(β) = x. Then ∀ξ ∈ α.ξ < β, α ≤ β, F(α) ≤ F(β) = x. Existence: Define (using the recursion theorem of set theory) F_{1} : Ord → V,

F_{1}(α) = \begin{cases}min_{R}\{x ∈ A | F_{1}[α] ⊆ x_{R}\} & if ∃x ∈ A.F_{1}[α] ⊆ x_{R} \\ 0 & otherwise. \end{cases} .

D := {α ∈ Ord.F_{1}[α] ⊆ x_{R}} is obviously a transitive class of ordinals, therefore D ∈ Ord ∨ D = Ord. We show: F := F_{1} ↾ D is an order function on (A, R). Obviously dom(F) = D, rng(F) ⊆ A and ∀α, β ∈ D(β < α → F(β) R F(α)). We have to show: x ∈ A → x ∈ rng(F). Proof by R-induction: If x ∈ A, then by IH x_{R} ⊆ rng(F). F^{−1}[x_{R}] is transitive. Since F is injective, follows F^{−1}[x_{R}] ∈ V. Therefore α := F^{−1}[x_{R}] ∈ Ord. By x_{R} ⊆ rng(F) follows F[α] = x_{R}. Further ∀y ∈ A(y R x → F[α] ⊈ y_{R}), F(α) = x.

Corollary 8.15 If A is a genuine class (A ∉ V), and R a well-ordering on A, then there exists a unique bijection F : Ord → A such that ∀α, β.(β < α ↔ F(β) R F(α)).

Definition 8.16 (a) 0 := ∅.

S(x) := x ∪ {x}.

(b) ω := ⋂{u | 0 ∈ u ∧ ∀x ∈ u.S(x) ∈ u}.

(c) α is called a successor ordinal iff ∃β.α = S(β). α is called a limit ordinal, if α ≠ 0 and α is not a successor ordinal. Lim is the class of all limit ordinals.

Theorem 8.17 (a) 0 is the least ordinal and ∀α.S(α) = min{β ∈ Ord.α < β}, S(α) ∈ Ord.

(b) α ∈ Lim ↔ 0 < α ∧ ∀β(β < α → S(β) < α).

(c) ω is the least limit ordinal.

(d) 0 ∈ ω, ∀n ∈ ω.S(n) ∈ ω For every class C follows (0 ∈ C ∧ ∀x ∈ ω(x ∈ C → S(x) ∈ C)) → ∀x ∈ ω.x ∈ C. (Therefore ω is the set of natural numbers).

(e) For every class B, a_{0} ∈ B and G : ω×B → B there exists a unique function F : ω → B such that F(0) = a_{0} and F(S(x)) = G(x, F(x)).

Proof: By the infinity axiom follows that J := {u | 0 ∈ u ∧ ∀x ∈ u.S(x) ∈ u} is not empty. Therefore: ω = ⋃ J ∈ V ∧ 0 ∈ ω ∧ ∀x ∈ ω.S(x) ∈ ω. (a): 0 ∈ V, and obviously 0 ∈ V. Further, if α ∈ V, then α ∉ 0, 0 ≤ α, 0 is the least ordinal. S(α) ∈ Ord: Every element of S(α) is an ordinal, therefore transitive. If x ∈ y ∈ S(α), then x ∈ y ∈ α, x ∈ α ⊆ S(α) or x ∈ y = α, x ∈ S(α), S(α) is transitive. S(α) ∈ V, therefore S(α) ∈ Ord. Further, if α < β, then β ≠ α, ¬(β < α), S(α) ⊆ β. α < S(α), therefore S(α) = min{γ | α < γ}. (b): Follows by ∀β(β < α ↔ S(β) < α). (c): Let a := {β ∈ ω | β ∈ Ord ∧ β ⊆ ω}. 0 ∈ a and if β ∈ a, then S(β) ∈ ω, S(β) ∈ Ord and S(β) ⊆ ω, therefore S(β) ∈ a. Therefore ω ⊆ a, ω is a transitive set of ordinals and therefore an ordinal. ω ≠ 0, and if β ∈ ω, then S(β) ∈ ω, therefore ω ∈ Lim. If β < ω, β ∈ Lim, then 0 ∈ β ∧ ∀γ ∈ β.S(γ) ∈ β, ω ⊆ γ ∈ ω, a contradiction. Therefore γ ∈ Lim → ω ≤ γ. (d): Let d := ω ∩ C. Then d ∈ J, ω ⊆ d ⊆ C.

(e) Define G_{1} : ω × V → V,

G_{1}(x, f) := if(x = 0 ∨ ¬Fun(f) ∨ ⋃ x ∉ dom(f)) then a_{0}
else G(⋃ x, (f(⋃ x))) ,

i.e.

G_{1}(x, f) = {<x, z> | (ϕ(x, f) ∧ z = a_{0}) ∨ (¬(ϕ(x, f)) ∧ z = G(⋃ x, f(⋃ x)))} ,

where ϕ(x, f) is the condition in the if then else-clause. There exists a unique function F : ω → V such that ∀x ∈ ω.F(x) = G_{1}(x, F ↾ x). It follows F(0) = a_{0} and F(S(x)) = G_{1}(S(x), F ↾ S(x)) = G(⋃ S(x), (F ↾ S(x))(⋃ S(x))) = G(x, F(x)) for all x ∈ ω.

Remark (e) can be extended to the case where we have additional parameters x_{1}, …, x_{n} (i.e. if G : (A_{1} ×⋯×A_{n} ×ω) → B, H : (A_{1} ×⋯×A_{n} ×ω ×B) → B, then there exists a unique F : (A_{1} × ⋯ × A_{n} × ω → B such that for all a_{1}, …, a_{n} and x ∈ ℕ F(a_{1}, …, a_{n}, 0) = G(a_{1}, …, a_{n}), F(a_{1}, …, a_{n}, S(x)) = H(a_{1}, …, a_{n}, x, F(a_{1}, …, a_{n}, x)).) This follows since first for every a_{1}, …, a_{n} we can define F′_{a_{0},... ,a_{n}} : ω → A such that F′_{a_{1},... ,a_{n}}(0) = G(a_{1}, …, a_{n}) and F′_{a_{1},... ,a_{n}}(S(x)) = H(a_{1}, …, a_{n}, x, F′_{a_{1},... ,a_{n}}(x)). This can be done explicitly, i.e. we can define F′_{a_{1},... ,a_{n}} as a class term depending on parameters a_{1}, …, a_{n}. Now define F := {<<a_{1}, …, a_{n}, x>, y> | y = F′_{a_{1},... ,a_{n}}(x)}.

8.3 The Axiom of Choice

Definition 8.18 (a) f is a selection function for a iff Fun(f) ∧ ∀x ∈ a(x ≠ ∅ → x ∈ dom(f) ∧ f(x) ∈ x). (f selects out of every nonempty element of x an element).

(b) A relation R is called partial order iff R is irreflexive and transitive.

(c) A set K is called R-chain, iff ∀x, y ∈ K(x R y ∨ x = y ∨ y R x).

Theorem 8.19 The following assertions are equivalent

(AC) ∀x.∃f.(f is selection function for x) (Axiom of Choice.

(WO) ∀a.∃r.(r is well-ordering on a). (Well-ordering theorem)

(ZL) For every non-empty partial ordered set (a, r) we have: If every r-chain K ⊆ a has an upper bound in a (i.e. ∀x ∈ K(xRb ∨ x = b) for some b ∈ K), then a has a maximum element (i.e. ∃p ∈ a.¬∃x ∈ a(p r x)). (Zorn’s Lemma)

Proof: (AC) ⇒ (ZL): Let (a, r) be a non-empty, partial ordered set such that every r-chain K ⊆ a has an upper bound in a. By (AC) there exists a function G : V → V such that ∀x ∈ P(a)(x ≠ ∅ → G(x) ∈ x).By transfinite induction we define F : Ord → V, F(ξ) := G({x ∈ a | F[ξ] ⊆ x_{r}}) for all ξ ∈ Ord. (note x_{r} = {y | y r x}). Let D := {ξ | {x ∈ a | F[ξ] ⊆ x_{r}} ≠ ∅}. Then we have obviously:

(1) D is transitive.

(2) F[D] ⊆ a.

(3) ∀η, ξ ∈ D(η < ξ → F(η)RF(ξ)). By (2) and (3) F[D] ∈ V, F ↾ D is injective, therefore D ∈ V. By (1) follows D ∈ Ord. By D ∈ Ord \ D follows {x ∈ a | F[D] ⊆ x_{r}} = ∅. By (3), F[D] is an r-chain. Let p ∈ a be an upper bound for F[D]. Since r is transitive, ¬∃x ∈ a.p r x. (ZL) ⇒ (WO): Let c := {s ⊆ a × a | s is a well-ordering on some b ⊆ a}. Let for s arbitrary field(s) := {x ∈ ⋃ ⋃ s.∃y ∈ ⋃ ⋃ s.(<x, y> ∈ s ∨ <y, x> ∈ s)}. Define s ⊏ s′ ⇔ s ≠ s′∧s ⊆ s′∧∀x ∈ field(s).∀y ∈ field(s′)\field(s).<y, x> ∈ s′. ⊏ is obviously a partial order on c. Let K ⊆ c be a ⊏-chain. We show r := ⋃ K ∈ c. Since ⊏ is partial and K is a chain, ⊏ is linear on K. Therefore for x, y, z ∈ field(r) there exists s ∈ c such that x, y, z ∈ field(s), and if x s′ y for some s′ ∈ c, then x s y. One concludes easily now r is linear. Further if a is a non-empty set, b ∈ a, then if b_{r} ∩ a ≠ ∅, c ∈ b_{r} ∩ a, c ∈ field(s) for s ∈ c, d ∈ c_{s} ∩ a such that d_{s} ∩ a = ∅, then d_{r} ∩ a = ∅ (since if u ∈ d_{r} ∩ a, then u s′ d for some s′ ∈ c, u s d a contradiction). Therefore ⋃ K is founded, and therefore obviously well-founded. Therefore ⋃ K ∈ c and we see easily ⋃ K is an upper bound of K. Therefore c has a maximum element r. Assume field(r) ≠ b. Let a ∈ b \ field(r). Let r′ := r∪(field(r)×{b}). r′ ∈ c, r ⊏ r′, a contradiction to r being maximum. Therefore r is a well-ordering on a. (WO) ⇒ (AC): Let r be a well-ordering on ⋃ a. Define f : a \ {∅} → ⋃ a, f(x) = min_{r}(x). f is obviously a choice function for a.

8.4 Ordinal Arithmetic

We follow [Sch95].

Definition 8.20 (a) 1 := S(0), 2 := S(1).

(b) By recursion on β we define α + β by: α + 0 := α, α + S(β) := S(α + β), α + λ := sup{α + γ | γ ∈ λ}, if λ ∈ Lim. (More precisely, define for α fixed, F_{α} : Ord → V by F_{α}(β) := α, if β = 0, F_{α}(β) := S(F_{α}(⋃ β)), if β is a successor ordinal (and therefore ⋃ β < β), F_{α}(β) := ⋃ rngF_{α}[β], otherwise. α + β := F_{α}(β).

(c) By recursion on β we define α · β by: α · 0 := 0, α · S(β) := (α · β) + α, α · λ := sup{α · γ | γ ∈ λ}, if λ ∈ Lim.

(d) By recursion on β we define α^{β} by:

α^{0} := \begin{cases}0 & if α = 0 \\ 1 & otherwise, \end{cases}

α^{S(β)} := α^{β} · α,

α^{λ} := sup{α^{γ} | γ ∈ λ}, if λ ∈ Lim.

Lemma 8.21 (a) α + β, α · β, α^{β} ∈ Ord

(b) 0 + β = β.

(c) If n, m ∈ ω, then n + m < ω.

(d) If n ∈ ω, n + ω = ω.

(e) ∃α, β.α + β ≠ β + α.

(f) β < γ → α + β < α + γ.

(g) There exists α, β, γ such that α < β and α + γ ≮ β + γ.

(h) α ≤ β → α + γ ≤ β + γ.

(i) If λ ∈ Lim, then α + λ ∈ Lim.

Proof: (a): Easy induction on β. (b): Induction on β. (c): Induction on m. (d): n+m < ω, therefore n+ω = sup{n+m | m < ω} ≤ ω. m ≤ n+m ≤ n+ω, ω ≤ n + ω. (e): ω + 1 = S(ω) ≠ ω = 1 + ω.

(f) Induction on γ.

(g) 0 < 1, but 0 + ω = ω = 1 + ω.

(h) Induction on γ.

(i) If γ < α + λ, then γ < α + β for some β < λ, S(γ) < S(α + β) = α + S(β) ≤ α + λ.

Lemma 8.22 (a) 0 · β = 0.

(b) 1 · β = β.

(c) If n, m ∈ ω, then n · m < ω.

(d) If 1 ≤ n ∈ ω, then n · ω = ω.

(e) ∃α, β.α · β ≠ β · α.

(f) 0 < α ∧ β < γ → α · β < α · γ.

(g) There exists α, β, γ such that 0 < γ, α < β and α · γ ≮ β · γ.

(h) α ≤ β → α · γ ≤ β · γ.

(i) If 0 < α and λ ∈ Lim, then α · λ ∈ Lim.

(j) α · (β + γ) = α · β + α · γ.

(k) There exist α, β, γ such that (α + β) · γ ≠ α · γ + β · γ.

(l) α · β = 0 → α = 0 ∨ β = 0.

(m) (α · β) · γ = α · (β · γ).

(n) Is 0 < β, then there are uniquely defined γ, ρ such that α = β · γ + ρ and ρ < β.

Proof: (a), (b): Induction on β. (c): Induction on m. (d): As for +. (e): 2 · ω = ω < S(ω) = ω + 1 ≤ ω + ω = ω · 2. (f): Induction on γ. (g): 1 < 2, 1 · ω ≮ ω = 2 · ω. (h): Induction on γ. (i): Similarly as for +. (j): Induction on γ. (k): α = β = 1, γ = ω (α + β) · ω = 2 · ω = ω, α · ω + β · ω = ω + ω ≠ ω. (l): If α, β ≠ 0, then 0 < α, 1 ≤ β, 0 < 1 = 1 · 1 ≤ α · 1 ≤ α · β. (m): Induction on γ. (n): Uniqueness: γ is uniquely determined by β · γ ≤ α < β · S(γ), and since + is monotone in the second argument follows uniqueness of ρ. Existence: Let F : Ord → Ord, F(ν) := β · ν, F is strictly monotone, therefore there exists γ, F(γ) ≤ α < F(S(γ)). By monotonicity of + in the second argument exists ρ such that F(γ) + ρ ≤ α < F(γ) + S(ρ) = S(F(γ) + ρ). β · γ + ρ = α. If ρ ≮ β, then β · S(γ) = (β · γ) + β ≤ β · γ + ρ = α < F(S(γ)) = β · S(γ), a contradiction.

Lemma 8.23 (a) 0^{α} = 0, 1^{α} = 1.

(b) n, m < ω → n^{m} < ω.

(c) 2 ≤ n < ω → n^{ω} = ω.

(d) 1 < α ∧ β < γ → α^{β} < α^{γ}.

(e) There exist α, β, γ such that 1 < γ, 1 < α < β and α^{γ} ≮ β^{γ}.

(f) α ≤ β → α^{γ} ≤ β^{γ}.

(g) If 1 < α and λ ∈ Lim, then α^{λ} ∈ Lim.

(h) α^{β+γ} = α^{β} + α^{γ}.

(i) α^{β·γ} = (α^{β})^{γ}.

(j) 1 < α → β ≤ α^{β}.

Proof: (a): Induction on α. (b): Induction on m. (c): As for +. (d): Induction on γ. (e): α := 2, β := 3 := S(2), γ := ω. (f): Induction on γ. (g): If γ < α^{λ}, γ < α^{β} for some β < λ, S(γ) < α^{S(β)} ≤ α^{λ}. (h), (i): Induction on γ. (j): Induction on β.

Cardinals

We will follow in this section very closely [Buc93b], section 8. We will work in ZF.

9.1 Basics about Cardinals

We use natural numbers for two purposes: In order to enumerate (the first, the second, the third, the grammatical term is “ordinal number”) and in order to give a measure for the size of a collection of objects (for instance “a woman has three children”). For finite sets, both notions coincide: independent of how we enumerate the elements of a finite set, the largest number we obtain will always be the number of elements of this sets. For infinite sets these notions do not coincide: we can enumerate the set ω + 1 in two ways: by the identity (ω + 1) → (ω + 1) and by f : ω → S(ω), f(0) := ω, f(n + 1) := n. Therefore we could have two different sizes, ω and ω + 1. We have to select one, and take the least one. Cardinals will be ordinals of minimal size, i.e. those which cannot be mapped bijectively to a smaller ordinal. However, that every set has as size an ordinal, i.e. can be mapped bijectively to a ordinal, is equivalent to the well-ordering axiom (every set can be well-ordered), which is equivalent to the axiom of choice. So, in the development of the theory we will occasionally need the axiom of choice.

Definition 9.1 (a) a ∼ b :⇔ ∃f(f : a ⟶^{≅} b).

(b) a ⪯ b :⇔ ∃f(f : a ↣ b).

Lemma 9.2 (a) ⪯ is reflexive and transitive.

(b) a ⊆ b → a ⪯ b.

(c) ∼ is an equivalence relation on V.

(d) For every set a the following assertions are equivalent:

(i) ∃r(r is well-ordering on a).

(ii) ∃α ∈ Ord(α ∼ a).

(iii) ∃α ∈ Ord.∃f(f : α ↠ a).

(iv) ∃g(g : a ↣ Ord).

Proof:

(a) - (c): easy. (d): (i) ⇒ (ii): by theorem 8.14. (ii) ⇒ (iii): trivial. (iii) ⇒ (iv): g(x) := min{ξ ∈ α | f(ξ) = x}. (iv) ⇒ (i): r := {(y, x) ∈ a × a | g(y) < g(x)}.

Theorem 9.3 (Cantor-Bernstein) a ⪯ b ∧ b ⪯ a → a ∼ b.

Proof: W.l.o.g. b ⊆ a. Let f : a → b injective. We need to define g : a → b bijective. Let h : ω → P(a), h(0) := a \ b, h(S(n)) := f[h(n)].

n < m → h(n) ∩ h(m) = ∅  (1)

Induction on n: n = 0. If m > 0, then h(m) = f[h(m − 1)] ⊆ b, h(m) ∩ h(0) = h(m) ∩ (a \ b) = ∅. n → n + 1: If x ∈ h(n + 1) ∩ h(m), m > n + 1, then x = f(y) = f(y′) for some y ∈ h(n), y′ ∈ h(m − 1), by injectivity and IH y = y′ ∈ h(n) ∩ h(m − 1) = ∅, a contradiction.

f ↾ h(n) : h(n) ⟶^{≅} h(n + 1)  (2)

Clear. Let a_{0} := ⋃ rng(h) = ⋃_{n∈ω} h(n), a_{1} := a_{0} \ h(0) = a_{0} \ (a \ b) = a_{0} ∩ b. By (1) x ∈ a_{0} ↔ ∃n ≠ 0.x ∈ h(n).

f ↾ a_{0} : a_{0} ⟶^{≅} a_{1}  (3)

Let a_{2} := a \ a_{0} = b \ a_{1}. Let g : a → b, g(x) := \begin{cases}f(x) & if x ∈ a_{0} \\ x & otherwise. \end{cases} g ↾ a_{0} = f ↾

a_{0} : a_{0} → a_{1} bijective, g ↾ (a \ a_{0}) = identity_{a\a_{0}} : (a \ a_{0}) → (b \ a_{1}) bijective, where identity_{c} : c → c, identity(x) := x. Further a is the disjoint union on a_{0} and a \ a_{0}, b the disjoint union of a_{1} and b \ a_{1}, and we get the assertion.

Theorem 9.4 P(a) ⪯̸ a.

Proof: a ⪯ P(a) (f := {<x, {x}> | x ∈ a}). If P(a) ⪯ a, then P(a) ∼ a, let f : a ⟶^{≅} P(a), b := {x ∈ a | x ∉ f(x)} ∈ P(a), c such that f(c) = b. Then c ∈ f(c) ↔ c ∉ f(c), a contradiction.

Definition 9.5 (a) A cardinal is an ordinal α such that ¬∃β < α.α ∼ β.

(b) Card is the class of cardinals.

(c) |a| := \begin{cases}min\{ξ ∈ Ord | a ∼ ξ\} & if ∃ξ.a ∼ ξ \\ \{\{0\}\} & otherwise. \end{cases}

(Note {{0}} ∉ Ord).

If |a| ∈ Ord, then |a| is called the cardinality of a.

Lemma 9.6 (a) If |a| ∈ Ord, then |a| is a cardinal.

(b) α ∈ Card ↔ ¬∃ξ < α(α ⪯ ξ).

(c) |a| ∈ Card ↔ ∃α.a ⪯ α.

(d) |a| ∈ Card → |a| = min{ξ | a ⪯ ξ}.

(e) |a| ∈ Card → (a ∼ b ↔ |a| = |b|).

(f) |a| ∈ Card → (b ⪯ a ↔ |b| ≤ |a|).

(g) |a| ∈ Card ∧ Fun(F) → |F[a]| ≤ |a|.

Proof:

(a) clear. (b): if ξ < α then ξ ⪯ α, therefore α ⪯ ξ ↔ α ∼ ξ. (c): by Lemma 9.2 (d), (iv) ⇒ (ii).

(d) ξ < |a| ⇒ |a| ⪯̸ ξ ⇒ a ⪯̸ ξ. |a| ≤ ξ ⇒ a ⪯ |a| ⪯ ξ.

(e) trivial.

(f) “←” is trivial. “→”: |b| = min{ξ | b ⪯ ξ} ≤ min{ξ | a ⪯ ξ} = |a|.

(g) Let r be a well-ordering on a (existing by Lemma 9.2 (d) (ii) ⇒ (i)), h : F[a] → a, h(y) := min_{r}{x ∈ a.F(x) = y}. h is injective, F[a] ⪯ a, |F[a]| ≤ |a|.

The following theorem shows that we can come relatively far without using the axiom of choice. Note that, having the axiom of choice, it becomes trivial by defining α := |P(a)|.

Lemma 9.7 (a) (Hartog, 1915) ∀x.∃α.∀y ∈ P(x).α ≁ y.

(b) ∀α.∃β > α.β ∈ Card.

Proof:

(a) Assume x and ∀α.∃y ∈ P(x).α ∼ y. Define a function F with dom(F) = Ord and F(α) := w_{α}, where w_{α} := {<y, r> | y ⊆ x, <y, r> is a well-ordering of order-type α}. (w_{α} ⊆ P(x) × P(x × x), therefore w_{α} is a set). By assumption F(α) ≠ ∅ and since for <y, r> ∈ F(α), α is the order type of <y, r> follows F is injective, F[Ord] is a set (since ⊆ P(P(x) × P(x × x))), therefore Ord = F^{−1}[F[Ord]] is a set, too, a contradiction.

(b) Let γ such that γ ≁ x for every x ⊆ α. Let β be minimal s.t. γ ∼ β. β is a cardinal. If β ≤ α, γ ∼ β ⊆ α, a contradiction, therefore α < β.

Definition 9.8 α^{+} := min{μ ∈ Card | α < μ}.

Lemma 9.9 Let κ ∈ Card, α ∈ Ord.

(a) |α| < κ ↔ α < κ.

(b) κ < |α| ↔ κ^{+} ≤ α.

(c) |α| = κ ↔ κ ≤ α < κ^{+}.

Proof: (a): |α| < κ ↔ ¬(κ ⪯ α) ↔ α < κ. (b) κ < |α| ↔ κ^{+} ≤ |α| ≤ α. (c) by (a), (b).

Definition 9.10 (a) a is finite :⇔ |a| < ω (i.e. ∃k ∈ ω.a ∼ k).

(b) a is D-finite :⇔ ¬∃f(f : a ↣ a ∧ f[a] ≠ a).

Remark 9.11 From a infinite does not follow in general ω ≤ |a|, since |a| need not be an ordinal.

Lemma 9.12 (a) b ⪯ a ∧ a finite → b finite.

(b) a finite → a = ∅ ∨ ∃x ∈ a(|a| = S(|a \ {x}|)).

(c) a ⊆ ω → (a finite ↔ ∃n ∈ ω.a ⊆ n).

(d) ω is the least infinite cardinal.

(e) a is D-infinite ↔ ω ⪯ a.

(f) a finite → a D-finite.

(g) ω ⊆ Card.

(h) (AC) → (a D-finite ↔ a finite).

Proof: (a): Lemma 9.6 (f). (b): Let f : k → a bijective, k ∈ ω. If k = 0, a = ∅. Otherwise k = S(k′), and with x := f(k) follows the assertion. (c): “→”: Induction on |a| using (b). “←”: Induction on n: If a ⊆ 0, |a| = 0. If a ⊆ n + 1, then a ⊆ n and by IH follows the assertion or n ∈ a, a \ {n} ⊆ n, |a \ {n}| = k for some k a ⪯ k + 1. (d): Assume ω is finite. Then by (c) ω ⊆ k for some k ∈ ω, k ∈ ω = k, a contradiction. ω is therefore infinite. Therefore ¬∃α ∈ ω.α ∼ ω, ω ∈ Card.

(e) “→” Let f : a → a injective, f[a] ≠ a. Let x_{0} ∈ a \ f[a] and define g : ω → a, g(0) := x_{0}, g(S(n)) := f(g(n)). ∀n ∈ ω.∀i(i > n → g(n) ≠ g(i)): n = 0: x_{0} ∉ f[a], g(i) ∈ f[a]. n → n + 1: g(n + 1) = g(i) ⇒ f(g(n)) = f(g(i − 1)) ⇒ g(n) = g(i − 1), contradicting the IH. “←: Let g : ω ↣ a, define f := {<g(n), g(S(n))> | n ∈ ω} ∪ {<x | x> | x ∈ a \ g[ω]}. f : a → a, f is obviously injective, f[a] ≠ a.

(f): Assume a ∼ k. If ω ⪯ a, then ω ⪯ k, contradicting that ω is a cardinal. (g): Assume n ∈ ω, m ≤ n, f : n → m injective. n is D-finite (by (f)), f[n] ⊆ m ⊆ n, therefore f[n] = n, m = n. (h): “→”: By (AC) there exists a well-ordering on a, therefore |a| ∈ Card. If a is D-finite, then by (e) ω ⪯̸ a, ω = |ω| ≰ |a|, |a| < ω, a ≺ ω, a finite. “←”; (f).

Lemma 9.13 ω ⪯ κ ∈ Card → κ ∈ Lim.

Proof: Assume ω ≤ S(β). Then

f : S(β) → β, f(γ) := \begin{cases}S(γ) & if γ ∈ ω \\ 0 & if γ = β \\ γ & otherwise \end{cases}

is bijective, S(β) ∼ β < S(β).

Definition 9.14 Let α ↦ ℵ_{α} [ℵ is the Hebrew letter aleph] be defined recursively by: ℵ_{α} := min{κ ∈ Card | κ ≥ ω ∧ ∀β < α.ℵ_{β} < κ}.

Remark 9.15 α ↦ ℵ_{α} is the order function of Card \ κ. Especially it is welldefined (if α ∈ Ord, then there exists a cardinal bigger then max{ω, ⋃_{β<α} ℵ_{β}}).

Lemma 9.16 Card is closed, i.e. ∀u(u ⊆ Card → sup(u) ∈ Card).

Proof: Let γ := sup(u), f : γ → α injective. Then ∀ξ ∈ u.ξ ⪯ α, ∀ξ ∈ u.ξ ≤ α, γ = sup(u) ≤ α.

9.2 Cardinal arithmetic

Definition 9.17 Let κ, μ ∈ Card.

(a) κ ⊕ μ := |({0} × κ) ∪ ({1} × μ)| (1 := S(0)).

(b) κ ⊙ μ := |κ × μ|.

Definition 9.18 Define the relation ≺′ on Ord × Ord by: <α, β> ≺′ <α′, β′> ↔ max{α, β} < max{α′, β′}∨((max{α, β} = max{α′, β′}∧ (α < α′ ∨ (α = α′ ∧ β < β′)))).

Lemma 9.19 (a) ≺′ is a well-ordering on Ord × Ord.

(b) If κ, μ ∈ Card, then κ ⊕ μ, κ ⊙ μ ∈ Card.

Proof: (a): ≺′ is obviously linear. Further, if ∅ ≠ a ⊆ Ord×Ord, then let α be minimal such that α = max{β, γ} for some <β, γ> ∈ a, Then for all <β, γ<∈ a with max{β, γ} = α let first β be minimal and then choose γ minimal such that <β, γ> ∈ a ∧ max{β, γ} = α. <β, γ> is minimal in a. (b): by (a)

Lemma 9.20 Assume κ, μ, τ ∈ Card, m, n ∈ ω.

(a) κ ⊕ 0 = κ.

(b) κ ⊙ 0 = 0.

(c) κ ⊙ 1 = κ.

(d) ⊕, ⊙ are commutative, associative, and (together) distributive.

(e) m ⊕ n = m + n.

(f) m ⊙ n = m · n.

(g) If κ, μ ≠ 0, ω ≤ max{κ, μ} = κ ∪ μ, then κ ⊕ μ = κ ⊙ μ = κ ∪ μ.

Proof: (a), (b), (c): trivial. (d): easy. (e), (f) m+n ∼ ({0}×m)∪({1}×n), m+n is a cardinal, therefore the assertion, similar for · and ⊙. (g): Obviously κ∪μ ≤ κ⊕μ ≤ (κ∪μ)⊙(κ∪μ), κ∪μ ≤ κ⊙μ ≤ (κ∪μ)⊙(κ∪μ), so it suffices to show for ω ≤ κ ∈ Card that κ ⊙ κ = κ. κ ⪯ κ × κ, therefore it suffices to show κ × κ ⪯ κ. Let Γ : Ord × Ord → Ord the uniquely determined isomorphism (Ord × Ord, ≺′ ) → (Ord, <) (the inverse of the order function of (Ord, <). It suffices to show ∀κ ∈ Card \ Lim.Γ[κ × κ] = κ. Induction on κ. One easily verifies Γ[κ × κ] = ⋃_{β<κ} Γ[β × β] and therefore we have only to show ∀β < κ.Γ[β × β] < κ. If β < ω follows Γ[β × β] ∼ β × β ∼ β · β < ω ≤ κ. Otherwise β < κ, ω ≤ |β| < κ, Γ[β × β] ∼ Γ[|β| × |β|] = |β| < κ.

Lemma 9.21 Assume (AC), Fun(F), c ⊆ dom(F).

(a) | ⋃ F[c]| ≤ |c| ⊙ sup{|F(x)| | x ∈ c}.

(b) Let ω ≤ κ such that |c| ≤ κ ∈ Card ∧ ∀x ∈ c(|F(x)| ≤ κ). Then | ⋃_{x∈c} F(x)| ≤ κ.

Proof: (a): W.l.o.g. c = |c|. Let κ := sup{|F(x)| | x ∈ c}. By (AC) there is a function g : c → V such that g(x) : F(x) → κ injective. Let h : ⋃ F[c] → c × κ, h(y) := <ξ, g(ξ)(y)> where ξ := min{x ∈ c | y ∈ F(x)}. h is injective, and therefore ⋃ F[c] ⪯ c × κ. (b): by (a). d

Definition 9.22 (a) ^{a}b := {f : a → b}.

(b) α^{β} := |^{β}α|.

Note that this is the same notation as for ordinal exponentiation, although these are quite different operations. In the literature this double-notation has been used since long time ago.

Remark 9.23 Without (AC) we cannot prove in general α^{β} ∈ Ord.

Lemma 9.24 (AC) Let κ, μ ∈ Card.

(a) κ < 2^{κ}.

(b) (2 ≤ κ ≤ μ ∧ ω ≤ μ) → 2^{μ} = κ^{μ}.

(c) (2^{κ})^{μ} = 2^{κ⊙μ}.

Proof: (a): 2^{κ} ∼ {f : κ → 2} ∼ P(κ), κ ≁ P(κ), κ ⪯ P(κ).

(b) 2^{μ} ≤ κ^{μ} is clear. Further κ^{μ} ≤ μ^{μ} = |{f : μ → μ}| ≤ |P(μ × μ)| = |P(μ)| = 2^{μ}.

(c) Define g : ^{μ}(^{κ}2) → ^{μ×κ}2, g(f)(<x, y>) = f(x)(y). g is bijective.

Definition 9.25 Let P^{<ω}(a) be the set of finite subsets of a.

Lemma 9.26 (AC) If a is infinite, then |P^{<ω}(a)| = a.

Proof: If 0 < n ∈ ω, then a^{n} ∼ a (n = 1: clear. a^{n+1} ∼ a^{n} × a ∼ a × a ∼ a.). For every element of P^{<ω}(a) there exists an n ∈ ω and a function f : n → a such that f[n] = a. Therefore there exists an injection g : P^{<ω}(a) → ⋃_{n∈ω} ^{n}a. Therefore |P^{<ω}(a)| ≤ | ⋃_{n∈ω} ^{n}a| ≤ ω ⊙ |a| = |a|. Further a → P^{<ω}(a), x ↦ {x} is injective, therefore |a| ≤ |P^{<ω}(a)|.

9.3 The Continuum Hypothesis

Lemma 9.27 (AC) |ℝ| = |P(ℕ)|

Proof: For every real number we can choose a Cauchy sequence in ℚ. Therefore there exists by (AC) g : ℝ ↣ {f : ℕ → ℚ}. ℚ ∼ ℕ therefore |ℝ| ≤ |{f : ℕ → ℕ}| = |^{ω}ω| = |P(ℕ)|.

In the other direction, let for a ∈ P(ω), f_{a} : ω → ω, f_{a}(i) := \begin{cases}1 & if i ∈ a \\ 0 & otherwise, \end{cases}

and

g(a) := \begin{cases}∑_{i=0}^{∞} f_{a}(i)2^{−i} & if∀i ∈ ω.∃j ∈ ω(j > i ∧ f_{a}(j) = 0) \\ − ∑_{i=0}^{∞} f_{a}(i)2^{−i} & otherwise. \end{cases}

(The case distinction is necessary, because in binary notation a_{0}.a_{1} ⋯ a_{n}0111 ⋯ = a_{0}.a_{1} ⋯ a_{n}1000 ⋯). g : P(ω) → ℝ is injective.

The question is now: What is the cardinality of the reals in the ℵ-hierarchy, or, equivalently, what is the cardinality of P(ω).

Continuum Hypothesis |P(ℵ_{0})| = ℵ_{1}. Generalized Hypothesis |P(ℵ_{α})| = ℵ_{α+1}.

Equivalent to the (generalized) continuum hypothesis is the statement For a := ω (every infinite set a) there is no set b such that |a| < |b| < |P(a)|. Gödel (1939) and Cohen (1963) have shown that the continuum hypothesis is independent of set theory, i.e. it can neither be proved nor its negation can be proved in ZF, if ZF is consistent. Many set theoreticians are looking for strong (and natural) axioms (usually existence of large cardinals), which, iff added to set theory, decide the continuum hypothesis.

Appendix: Selected Topics

In this chapter we present the topics from the course description, we had no time to teach in detail:

10.1 Relative Computability

Definition 10.1 (a) (Relative computability). The set of functions recursive in a function f_{0} : ℕ^{k} → ℕ is the set of functions defined as R (Lemma 2.35 (d)), but with the additional clause f_{0} ∈ R_{k}.

(b) A set A is recursive in a set B or Turing reducible to a set B iff χ_{A} is recursive in χ_{B}. We write A ≤_{T} B for A is recursive in B.

(c) A ≡_{T} B :⇔ A ≤_{T} B ∧ B ≤_{T} A.

(d) The equivalence classes of ≡_{T} are called Turing-degrees. Theorem 10.2 (a) ≤_{T} is reflexive and transitive.

(b) ≡_{T} is an equivalence relation.

(c) A ≡_{T} (ℕ \ A).

(d) If B is recursive, then B ≤_{T} A for all A.

(e) If B is recursive, A ≤_{T} B, then A is recursive

(f) If A is recursive enumerable, then A ≤_{T} K. Proof: (a)- (e) are easy. (f): Let f : ℕ^{2} →_{par} ℕ, f(x, y) ≃ \begin{cases}0 & if y ∈ A \\ ⊥ & otherwise \end{cases}. f is partial recursive. Let e be an index of f.

a ∈ A ↔ ∀a.∃b.f(e, a) ≃ b

↔ ∃b.{e}^{2}(e, a) ≃ b
↔ {s_{1}^{1}(e, e)}^{2}(b) ≃ b
↔ s_{1}^{1}(e, e) ∈ K

Theorem 10.3 (Friedberg, Muchnik) There are recursive enumerable sets A, B such that ¬(A≤_{T}B) ∧ ¬(B≤_{T}A).

Proof: omitted.

Degree theory is the theory of the structure of Turing degrees. It is very well developed and extremely complex proof methods (i.e. so called “Monster proofs”) are used in this area. Degree theory is the main part or recursion theory nowadays, and sometimes recursion theory (or in more modern terms computability theory) is identified with degree theory.

10.2 κ-categoricity

We cannot axiomatize (except for finite structures) the set of structure isomorphic to a given one M, since for every infinite structure there exists an elementary equivalent structure of cardinality |P(M)| (Theorem 1.20). However, we could axiomatize the countable models of the structure of the rationals up to isomorphism (see Lemma 1.31). Therefore we get the following definition:

Definition 10.4 A theory T in a language L (with equality) IS κ-categorical, iff T has a model (with = standard) of cardinality κ and every two models of T of cardinality κ are isomorphic.

Lemma 10.5 The theory DO of dense linear orderings without endpoints is ω-categorical.

Proof: Lemma 1.31

10.3 Tennenbaum’s theorem

Definition 10.6 (a) Let PA be the extension of the theory Q in the language L_{ar} by the induction axiom:

A(0) → ∀x(A(x) → A(S(x))) → ∀x(A(x))

(b) A set S is coded in a structure M of L_{ar} iff there is an a ∈ |M| such that S = \{n ∈ ℕ | M ⊧ Pr_{y} | x[x := a, y := \underline{n}^{M}]\}. Here Pr_{y} | x is the formula ∃z.z = Pr_{y}∧z | y where z = Pr_{y} and z | y are the formulas representing the corresponding primitive recursive function Pr_{·} (Pr_{y} is the yth prime) and relation | (for “divides”). Further as before x < y := ∃z(z ≠ 0∧x+z = y).

(c) A nonstandard model of PA is a structure M in L_{ar} such that M ⊧ PA and M ⊧ \underline{n} ≠ x[x := a] for some x ∈ M.

(d) A recursive model of PA is a model of M such that |M| = ℕ and +^{M} and ·^{M} are recursive.

Lemma 10.7 If M is a nonstandard model of PA, then M codes a nonrecursive set.

Sketch of Proof: PA ⊢ ∀x.∃y.∀z < x(Pr_{z} | y ↔ z ∈ K), where z ∈ K is the formula in PA representing the recursive enumerable relation K in Q (and therefore as well PA. Let b be nonstandard, b ∈ |M|. Then M ⊧ ∀z < b(Pr_{z} | a ↔ z ∈ K), for some a ∈ |M|, i.e. a codes the non recursive set K.

Theorem 10.8 (Tennenbaum’s theorem) There is no recursive nonstandard model of PA.

(One can show even, that in any nonstandard model M with |M| = ℕ, neither +^{M} nor ·^{M} are recursive).

Sketch of Proof: Assume M is such a model. S^{M}(a) = a +^{M} S^{M}(0^{M}), so S^{M} and therefore as well e ↦ \underline{e}^{M} are recursive, too. Claim: It is decidable, whether M ⊧ x < y[x := a, y := b]. Proof: Test whether M ⊧ x + u = y[x := a, y := b, u := c] or M ⊧ y + u = x[x := a, y := b, u := c] for all c ∈ |M|. Such a c can be found, and once such a c is found, we conclude: If c = 0^{M} or M ⊧ y + u = x[x := a, y := b, u := c], then M |̸= x < y[x := a, y := b], otherwise the formula holds. Claim: It is decidable, whether M ⊧ x | y[x := a, y := b] for a, b ∈ |M|. Proof: PA ⊢ ∀x, y.x ≠ 0 → ∃!z.∃!w(y = x · z + w ∧ w < x). This formula holds therefore in M. In order to test whether M ⊧ x | y[x := a, y := b] we have therefore to try for all n ∈ ℕ whether M ⊧ (y = x·z+w∧w < x)[x := a, y := b, z := π_{1}(n), w := π_{2}(n)]. We will find a unique n and if π_{2}(n) = 0, M ⊧ x | y[x; = a, y := b], otherwise not. Claim: It is decidable whether M ⊧ Pr\underline{n} | y[y := a] for a ∈ |M|. Proof: M ⊧ ∀z(Pr\underline{n} = z ↔ z = \underline{Pr_{n}}). Decide, whether M ⊧ x | y[x := (\underline{Pr_{n}})^{M}, y := a]. Let S ⊆ ℕ be non-recursive, S be coded in M by a. Then e ∈ K ⇔ M ⊧ Pr\underline{e}^{M} | x[x := a], therefore K is recursive, a contradiction.

10.4 The second Recursion theorem

We follow [Cut80]. The intuitive meaning of the second recursion theorem is that for any program transformation there is a program invariant under it in the sense that the program and the transformed program compute the same function. If we consider programs as natural numbers, the function associated with program e being {e}^{1}, and program transformations as unary total recursive functions (on ℕ), then the statement reads as follows:

Theorem 10.9 (2^{nd} Recursion theorem.) If f is a unary (total) recursive function. Then there is an e_{0} ∈ ℕ such that {f(e_{0})}^{1} = {e_{0}}^{1}.

Proof: Let h be some unary partial recursive function. By the s_{n}^{m} theorem there exists a primitive recursive function g (depending on h) such that

{g(e)}^{1} = {f(h(e))}^{1} .  (∗)

(If {e_{1}}^{2}(y, e) ≃ {f(h(e))}^{1}(y), choose g(e) := s_{1}^{1}(e_{1}, e)). If e_{2} is such that g(e_{2}) ≃ h(e_{2}), (especially therefore h(e_{2}) is defined), then with e_{0} := h(e_{2}) = g(e_{2}) follows the assertion. Let now h(e) :≃ {e}^{1}(e), and for this specific h let g be chosen as above. Then (∗) reads as g(e_{2}) = {e_{2}}^{1}(e_{2}), which is fulfilled by e_{2} such that g = {e_{2}}^{1}.

Corollary 10.10 (a) If f is a unary recursive function, then there are e such that W_{f(e)} = W_{e}.

(b) If f is a unary recursive function, then there are arbitrarily big numbers e such that {f(e)}^{1} = {e}^{1}.

(c) If f is a binary recursive function, then there is an e such that {e}^{1}(y) ≃ f(e, y).

Proof: (a): Let {f(e)}^{1} ≃ {e}^{1}. (b): Let n ∈ ℕ, c ∈ ℕ such that, and {c}^{1} ≠ {0}^{0}, {1}^{1}, …, {e}^{1}.

\{f′(e)\}^{1} = \begin{cases}c & if e ≤ n \\ f(e) & otherwise. \end{cases} Assume \{f′(e)\}^{1} = \{e\}^{1}. If we had e ≤ n, then

{c}^{1} ≃ {e}^{1}, which is not possible. Therefore e > n, {f(e)}^{1} = {e}^{1}.

(c) Let {g(e)}^{1}(y) ≃ f(e, y) (s_{n}^{m}-theorem). Let e such that {g(e)}^{1} = {e}^{1}, then the problem is solved.

Examples:

(a) There is a number n such that {e}(n) = e^{n}. [Corollary 10.10 (c) with f(m, x) := x^{m}].

(b) There is a number n such that W_{e} = {e}.

[Let f(e, y) ≃ \begin{cases}0 & if x = y \\ undefined & otherwise, \end{cases} \{e\}(y) ≃ f(e, y).]

Bibliography

[Buc89] W. Buchholz. Rekursionstheorie. Manuskript of a lecture held in Sommer Semester 1989 at the University of Munich, 1989.

[Buc93a] W. Buchholz. Mathematische Logik I. Manuskript of a lecture held in Winter Semester 1992/93 at the University of Munich, 1993.

[Buc93b] W. Buchholz. Mathematische Logik II. Manuskript of a lecture held in Sommer Semester 1993 at the University of Munich, 1993.

[Buc97a] W. Buchholz. Mathematische Logik I. Manuskript of a lecture held in Winter Semester 1996/97 at the University of Munich, 1997.

[Buc97b] W. Buchholz. Mathematische Logik II. Manuskript of a lecture held in Sommer Semester 1997 at the University of Munich, 1997.

[Cra91] S. Craig. Logical Number theory I. An introduction. Springer, Berlin, Heidelberg, New York, 1991.

[Cut80] N. Cutland. Computability. An Introduction to recursive function theory. Cambridge University Press, Cambridge, 1980.

[Men87] E. Mendelson. Introduction to Mathematical Logic. Chapman and Hall, London, third edition, 1987.

[Men97] E. Mendelson. Introduction to Mathematical Logic. Chapman and Hall, London, fourth edition, 1997.

[Pal91] E. Palmgren. Lecture notes in Logik 2. Manuskript of a lecture held October-December 91 at Uppsala University, 1991.

[Rat96] M. Rathjen. Logic MN2 HT96. Manuskript of a lecture held in 1996 at Uppsala University. Typed by Sara Eklund, 1996.

[Sch86] H. Schwichtenberg. Mathematische Logik. Manuskript of a lecture held in Winter Semester 1985/86 at the University of Munich, 1986.

[Sch95] H. Schwichtenberg. Mathematische Logik II. Manuskript of a lecture held in Sommer Semester 1995 at the University of Munich, 1995.

[Sho67] J. Shoenfield. Mathematical Logic. Addison-Wesley, Reading, Massachusetts, 1967.

[SS63] J. C. Sheperdson and H. E. Sturgis. Computability of recursive functions. J. Assoc Computer Machinery, 10:217 – 255, 1963.

[Tur36] A. Turing. On computable numbers with an application to the Entscheidungsproblem. Proc. London Math. Soc., 2(42):230 – 265, 1936.

[UU97] Teknisk-natuvetenskapliga fakulteten Uppsala Universitet. Studiehandbok 1997/98, Matematisk-naturvetenskaplig program, 1997.

[vD94] D. van Dalen. Logic and structure. Third ed. Springer, Berlin, Heidelberg, New York, third edition, 1994.