Chapter 3. Formal Number Theory

Similar documents
First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Informal Statement Calculus

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Herbrand Theorem, Equality, and Compactness

03 Review of First-Order Logic

Propositional and Predicate Logic - XIII

2.2 Lowenheim-Skolem-Tarski theorems

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

Part II Logic and Set Theory

Part II. Logic and Set Theory. Year

Chapter 1 : The language of mathematics.

by Yurii Khomskii There is a weaker notion called semi-representability:

CS156: The Calculus of Computation

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

5. Peano arithmetic and Gödel s incompleteness theorem

COMP 409: Logic Homework 5

Chapter 0. Introduction: Prerequisites and Preliminaries

Arithmetic and Incompleteness. Will Gunther. Goals. Coding with Naturals. Logic and Incompleteness. Will Gunther. February 6, 2013

Gödel s Incompleteness Theorems by Sally Cockburn (2016)

Chapter 1. Sets and Mappings

MATH 3330 ABSTRACT ALGEBRA SPRING Definition. A statement is a declarative sentence that is either true or false.

Logic: The Big Picture

Notes for Math 601, Fall based on Introduction to Mathematical Logic by Elliott Mendelson Fifth edition, 2010, Chapman & Hall

On some Metatheorems about FOL

Proofs. Chapter 2 P P Q Q

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

07 Equational Logic and Algebraic Reasoning

Gödel s Incompleteness Theorems

23.1 Gödel Numberings and Diagonalization

Gödel s Incompleteness Theorem. Part II: Arithmetical Definability. Computability and Logic

1 Predicates and Quantifiers

VAUGHT S THEOREM: THE FINITE SPECTRUM OF COMPLETE THEORIES IN ℵ 0. Contents

Proofs. Chapter 2 P P Q Q

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

2 Lecture 2: Logical statements and proof by contradiction Lecture 10: More on Permutations, Group Homomorphisms 31

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

More Model Theory Notes

MODEL THEORY FOR ALGEBRAIC GEOMETRY

Gödel s Completeness Theorem

Introduction to Model Theory

Constructions of Models in Fuzzy Logic with Evaluated Syntax

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

185.A09 Advanced Mathematical Logic

Properties of Relational Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Arithmetical classification of the set of all provably recursive functions

Part I: Propositional Calculus

First Order Logic (FOL) 1 znj/dm2017

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

Moreover this binary operation satisfies the following properties

Set Theory and the Foundation of Mathematics. June 19, 2018

Model Theory MARIA MANZANO. University of Salamanca, Spain. Translated by RUY J. G. B. DE QUEIROZ

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

06 Recursive Definition and Inductive Proof

Gödel s Incompleteness Theorem. Overview. Computability and Logic

CS156: The Calculus of Computation Zohar Manna Winter 2010

A Model Theoretic Proof of Completeness of an Axiomatization of Monadic Second-Order Logic on Infinite Words

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

A Simple Proof of Gödel s Incompleteness Theorems

Kreisel s Conjecture with minimality principle

Undecidable propositions with Diophantine form arisen from. every axiom and every theorem in Peano Arithmetic. T. Mei

Algebraizing Hybrid Logic. Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation

Logic Synthesis and Verification

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

Propositional Logic: Syntax

NONSTANDARD ARITHMETIC AND RECURSIVE COMPREHENSION

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

MAT115A-21 COMPLETE LECTURE NOTES

October 12, Complexity and Absoluteness in L ω1,ω. John T. Baldwin. Measuring complexity. Complexity of. concepts. to first order.

Bound and Free Variables. Theorems and Proofs. More valid formulas involving quantifiers:

The Mother of All Paradoxes

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

Notes on ordinals and cardinals

Automata Theory and Formal Grammars: Lecture 1

Handbook of Logic and Proof Techniques for Computer Science

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

07 Practical Application of The Axiomatic Method

Contribution of Problems

Arithmetical Hierarchy

Math 4606, Summer 2004: Inductive sets, N, the Peano Axioms, Recursive Sequences Page 1 of 10

Part IA Numbers and Sets

Outline. We will now investigate the structure of this important set.

Arithmetical Hierarchy

This paper is also taken by Combined Studies Students. Optional Subject (i): Set Theory and Further Logic

The Syntax of First-Order Logic. Marc Hoyois

Reminder of Notation. For a variable-free term t, we let t N N stand for the interpretation of t in N. (For example, (SSS0 SS0) N equals 6.

Introduction to Model Theory

Gödel s First Incompleteness Theorem

0 Sets and Induction. Sets

Computably Enumerable Algebras, Their Expansions, and Isomorphisms

Representability of Recursive Functions

Chapter 2 Axiomatic Set Theory

06 From Propositional to Predicate Logic

Short Introduction to Admissible Recursion Theory


CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Contribution of Problems

MAGIC Set theory. lecture 2

Transcription:

Chapter 3. Formal Number Theory 1. An Axiom System for Peano Arithmetic (S) The language L A of Peano arithmetic has a constant 0, a unary function symbol, a binary function symbol +, binary function symbol, and a binary relation symbol =. There are two versions, both containing these axioms: S1 x = y (x = z y = z) S2 x = y x = y S3 (0 = x ) S4 S5 x = y x = y x + 0 = x S6 (x + y) = x + y S7 x 0 = 0 S8 x y = x y + x Second-order S has induction for all subsets Q, stated with a second-order quantifier Q, where Q(x) means x is an element of Q. (1) Q(Q(0)( x(q(x) Q(x )) xq(x))). First-order S has induction only for definable subsets: (2) B(0)( x(b(x) B(x )) xb(x)). for every formula B(x) in L A. S is a theory in L A, but the second-order version is not. In any model M for the language of Peano arithmetic, the binary relation symbol = is interpreted as the binary relation = M on the nonempty domain D M, the binary function symbol + is interpreted as the binary operation + M on D M, the binary function symbol is interpreted as the binary operation M on D M, and the unary function symbol is interpreted as the function M from D M to D M. The standard interpretation/model N has domain ω = {0, 1, 2, 3, }, interprets as +1 (the function that adds 1 to its input), inteprets the symbol as the binary operation of multiplication of natural numbers, and interprets the symbol + as the binary operation + of addition of natural numbers, and interprets the relation symbol = as the equality relation between natural numbers. A nonstandard model is any model that interprets the relation symbol = as the equality relation on its universe and yet is not isomorphic to the standard model. Second-order S is categorical: any two models are isomorphic. (Prove this.) S has only infinite models (this follows from just S1 S4), but also has models of all infinite cardinalities (by the upward Löwenheim-Skolem Theorem), and has 2 ℵ 0 pairwise nonisomorphic models of cardinality ℵ 0 (Ehrenfeucht). 1

2 Lemma 3.1 Some theorems of S obtained by replacing variables in the axioms with terms. They follow from S1 S8 by Gen and the instantiation schema (A4). S1 t = r (t = s r = s) S2 t = r t = r S3 (0 = t ) S4 S5 t = r t = r t + 0 = t S6 (t + r) = t + r S7 t 0 = 0 S8 t r = t r + t Prop. 3.2 All the following formulas are theorems of S. They express basic properties of the operations + M and M and the relation = M in any model M of S. (a) S x = x, so = M is reflexive on D M. (b) S x = y y = x, so = M is symmetric. (c) S x = y (y = z x = z), so = M is transitive. (d) S y = x (z = x y = z). (e) S x = y (x + z = y + z). (f) S x = 0 + x. (g) S x + y = (x + y). (h) S x + y = y + x, so + M is commutative. (i) S x = y (z + x = z + y). (j) S x + (y + z) = (x + y) + z, so + M is associative. (k) S x = y x z = y z. (l) S 0 x = 0. (m) S x y = x y + y. (n) S x y = y x, so M is commutative. (o) S x = y z x = z y. The following proof is not completely formalized within first-order logic. (The proof in the text is somewhat more formal.) That the proof below can be so formalized follows from the Deduction Theorem and other results from the text. (a): x + 0 = x (x + 0 = x x = x) x + 0 = x x = x S1 S5 MP twice (b): x = y (x = x y = x) x = y y = x S1 (a), PC

(c): By S1, (b), PC, so (c) holds. y = x (x = z y = z) (d): holds by (a),(b),(c). From now on we use the fact that = M is transitive without any explicit mention. (e): S x = y (x + z = y + z). Let B(z) be x = y (x + z = y + z)). B(0) holds because if x = y then Show: B(z) B(z ). x + 0 = S5 x = y = S5 y + 0. Hyp: x = y (x + z = y + z)). Show: x = y (x + z = y + z )). Assume x = y. Then x + z = y + z by Hyp, so x + z = S6 (x + z) = S2 (y + z) = S6 y + z Since x and y were arbitrary, we have shown S B(0) and S B(z) B(z ). By (2) we have S B(0)( z(b(z) B(z )) zb(z)), hence, by MP, S zb(z)), hence, by (A4), S B(z). Below, in proofs of the other parts, these last steps will be omitted. (f): S x = 0 + x. Let B(x) be x = 0 + x. B(0) holds because 0 = 0 + 0 by S5 and (b). Show: B(x) B(x ). Hyp: x = 0 + x. Show: x = 0 + x. x = Hyp,S2 (0 + x) = S6 0 + x (g): S x + y = (x + y). Let B(y) be x + y = (x + y). B(0) holds because x + 0 = S5 x = S2,S5 (x + 0). Show: B(y) B(y ). Hyp: x + y = (x + y). Show: x + y = (x + y ). x + y = S6 (x + y) = Hyp,S2 (x + y) = S6,S2 (x + y ) (h): S x + y = y + x. Let B(y) be x + y = y + x. B(0) holds because Show: B(y) B(y ). x + 0 = S5 x = (f) 0 + x 3

4 Hyp: x + y = y + x. Show: x + y = y + x. x + y = S6 (x + y) = Hyp,S2 (y + x) = S6 x + y (i): S x = y (z + x = z + y). This can be proved by invoking parts (h) and (e), but for an inductive proof via S9, let B(z) be x = y (z + x = z + y). Then B(0) holds because if x = y then 0 + x = (f) x = Hyp y = (f) 0 + y. Show: B(z) B(z ). Hyp: x = y (z + x = z + y). Show: x = y (z + x = z + y). Assume x = y. Then z + x = z + y by Hyp, so z + x = (g) (z + x) = S2 (z + y) = (g) z + y (j): S x + (y + z) = (x + y) + z. Let B(z) be x + (y + z) = (x + y) + z. B(0) holds because Show: B(z) B(z ). x + (y + 0) = S5,(i) x + y = S5 (x + y) + 0. Hyp: x + (y + z) = (x + y) + z. Show: x + (y + z ) = (x + y) + z. x + (y + z ) = S6,(i) x + (y + z) = S6 (x + (y + z)) = Hyp,S2 ((x + y) + z) = (x + y) + z (k): S x = y x z = y z. Let B(z) be x = y x z = y z. B(0) holds because if x = y then x 0 = S8 x 0 + x = S7,(e) 0 + x = (f) x = Hyp y = (f) 0 + y = S7,(e) 0 y + y = S8 0 y Show: B(z) B(z ). Hyp: x = y x z = y z. Show: x = y x z = y z. Assume x = y. Then x z = y z, so x z = S8 x z + x = (e) y z + x = (i) y z + y = S8 y z (l): S 0 x = 0. Let B(x) be 0 x = 0. B(0) holds because 0 0 = 0 by S7. Show: B(x) B(x ). Hyp: 0 x = 0. Show: 0 x = 0. 0 x = S8 0 x + 0 = S5 0 x = S7 0 (m): S x y = x y + y. Let B(y) be x y = x y + y. B(0) holds because Show: B(y) B(y ). x 0 = S7 0 = S5 0 + 0 = S7,(e) x 0 + 0 Hyp: x y = x y + y. Show: x y = x y + y. x y = S8 x y +x = Hyp,(e) (x y +y)+x = (j) x y +(y +x ) = S6,(i) x y +(y +x) = (h),s2,(i) x y + (x + y) = S6,(i) x y + (x + y ) = (j) (x y + x) + y = S8,(e) x y + y

5 (n): S x y = y x. Let B(y) be x y = y x. B(0) holds because Show: B(y) B(y ). Hyp: x y = y x. Show: x y = y x. x 0 = S7 x = (l) 0 x x y = S8 x y + x = Hyp,(e) y x + x = (m) y x (o): S x = y z x = z y. Let B(z) be x = y z x = z y. B(0) holds because if x = y then Show: B(z) B(z ). 0 x = (l) 0 = (l) 0 y Hyp: x = y z x = z y. Show: x = y z x = z y. Assume x = y. Then z x = z y, so z x = (m) z x + x = (e) z y + x = (i) z y + y = (m) z y Cor. 3.3 S is a theory with equality, that is, the equality axioms A6 and A7 are provable in S. S proves A6 by 3.2(a), and S proves A7 by various other considerations, starting with 3.2(a)(b)(c), which show that = M is an equivalence relation on the universe D M of any model, and S2, 3.2(e), 3.2(i), 3.2(k), 3.2(o), which show that = M is a congruence relation with respect to the functions M, + M, and M. Prop. 3.4 These arithmetical laws are provable in S: left and right distributivity of over +, associativity of, and the cancellation law for +. (a) S x (y + z) = x y + x z, (b) S (x + y) z) = x z + y z, (c) S (x y) z = x (y z), (d) S x y = x z y = z. (a): Use (2) where B is x (y + z) = x y + x z. Assume x (y + z) = x y + x z. x (y + 0) = x y = x y + 0 = x y + x 0 x (y + z ) = x ((y + z) ) = x (y + z) + x = (x y + x z) + x = x y + (x z + x) = x y + x z Define the terms called numerals, so that there is a term for each natural number, as follows. Let 0 = 0, and for every positive n ω let n {}}{ n = 0. For example, 1 = 0, 2 = 0, 3 = 0, 4 = 0, etc.

6 Prop. 3.5 The following formulas about numerals are theorems of S. (a) S x + 1 = x (b) S x 1 = x (c) S x 2 = x + x (d) S x + y = 0 (x = 0 y = 0) (e) S x 0 (y x = 0 y = 0) (f) S x + y = 1 ((x = 0 y = 1) (x = 1 y = 0)) (g) S x y = 1 (x = 1 y = 1) (h) S x 0 y(x = y ) (i) S z 0 (x z = y z x = y) (j) S x 0 (x 1 z(x = z )). Prop. 3.6 (a) Let m, n ω. (i) If m n then S n m. (ii) S m + n = m + n and S mn m n. (b) All models of S are infinite. (c) S has models of all infinite cardinalities. Definitions of orderings >, <,,. For example, x < y is the formula z( (z = 0) x + z = y), where z is the first variable distinct from x and y. For terms t, s, t < s is the formula z( (z = 0) t + z = s), where z is the first variable that does not occur in t or s. (Such a variable does exist, but why?) Prop. 3.7 27 miscellaneous theorems of S about orderings. Prop. 3.8 More theorems of S on numerals. Prop. 3.9 (a) Complete induction (for formulas B) is provable in S: S ( y(y < x B(y)) B(x)) xb(x). (b) The least-number principle (for formulas B) is provable in S: S xb(x) m(b(m) x(x < m B(x))). Divisibility, a defined binary relation: for terms t and s, t s is the formula z(t z = s) where z is the first variable not occurring in t or s. Prop. 3.10 Some theorems of S about divisibility. Prop. 3.11 S proves a sentence that asserts the existence and uniqueness of quotient and remainder. Existence: Existence and uniqueness: q n d r(n = q d + r r < d) q n d r(n = q d + r r < d e s(n = q e + s s < e d = e r = s))

7 2. Number-Theoretic Functions and Relations Notation:! means there exists a unique..., that is,! x B(x) is an abbreviation of x(b(x) y(b(y) x = y)), where y is the first variable not occurring in B. Number-theoretic functions and relations are functions and relations on the actual natural numbers ω. Let K be a theory in the language L A. A number-theoretic relation R ω n is expressible in K iff there is a formula B(x 1,, x n ) of L A such that, for all k 1,..., k n ω, (1) if k 1,, k n R then K B(k 1,, k n ) (2) if k 1,, k n / R then K B(k 1,, k n ) For example, < is expressible in S by the formula z( (z = 0) x + z = y). Suppose that R ω n is expressible in K by B(x 1,, x n ). Then K is complete with respect to variable-free instances of B, in the sense that, for all k 1,..., k n ω, either K B(k 1,, k n ) or K B(k 1,, k n ), although both could hold in case K is inconsistent. Hence, if K B(k 1,, k n ) then K B(k 1,, k n ), if K B(k 1,, k n ) then K B(k 1,, k n ). A number-theoretic function f : ω n ω is representable in K iff there is a formula B(x 1,, x n, y) of L A such that, for all k 1,, k n, m ω, (1) if f(k 1,, k n ) = m then K B(k 1,, k n, m), (2) K! y B(k 1,, k n, y). A number-theoretic function f : ω n ω is strongly representable in a theory K iff there is a formula B(x 1,, x n, y) of L A such that, for all k 1,, k n, m ω, (1) if f(k 1,, k n ) = m then K B(k 1,, k n, m), 2. K! y B(x 1,, x n, y). Prop. 3.12 (V. Huber-Dyson) A number-theoretic function is representable in a theory K iff it is strongly representable in K. Proof. Strong representability implies representability via (A4), MP, and Gen. If f is representable via formula B, then f is strongly representable via formula ( ) ( )! z B(x 1,, x n, z) B(x 1,, x n, y)! z B(x 1,, x n, z) y = 0 Prop. 3.13 If K (0 = 0 ) then a number-theoretic relation is expressible in K iff its characteristic function is (strongly) representable in K. 3. Primitive Recursive and Recursive Functions Initial functions (unary) zero, (unary) successor, (n-ary) projection functions.

8 Rules: substitution (composition) f(x 1,, x n ) = g(h 1 (x 1,, x n ),, h m (x 1,, x n )) recursion (definability via recursive equations) (restricted) µ-operator f(x 1,, x n, 0) = g(x 1,, x n ) f(x 1,, x n, y + 1) = h(x 1,, x n, y, f(x 1,, x n, y)) f(x 1,, x n ) = µy(g(x 1,, x n, y) = 0) = the least y such that g(x 1,, x n, y) = 0 assuming (the restriction) that x 1 x n y(g(x 1,, x n, y) = 0). primitive recursive = obtainable from initial functions using substitution and recursion. recursive = obtainable from initial functions using substitution, recursion, and the restricted µ-operator. All primitive recursive functions are recursive. Prop. 3.14 The set of primitive recursive (recursive) functions is closed under permutation of variables, also under adding dummy variables and identifying variables. Cor. 3.15 More primitive recursive functions: n-ary zero function, n-ary constant functions, extended substitution rule. Prop. 3.16 More primitive recursive functions: addition x + y, multiplication x y, exponentiation x y, predecessor function δ(x) = x 1 if x > 0 and δ(0) = 0, x y, factorial, { 0 x = 0 sg(x) = 1 x = 1, { 1 x = 0 sg(x) = 0 x = 1, min, max, remainder, quotient, etc. Define bounded sums and bounded products. Prop. 3.17 The set of primitive recursive (recursive) functions is closed under bounded sums and products. Example: τ(x) is the number of divisors of x if x > 0 and τ(0) = 1. τ is primitive recursive because τ(x) = y x sg(rm(y, x)) Define the bounded µ-operator. Relations are primitive recursive (recursive) iff their characteristic functions are primitive recursive (recursive). Equality, less-than, divisibility, and primality are primitive recursive relations. Prop. 3.18 The set of primitive recursive (recursive) relations is closed under intersection, union, complementation, and bounded µ-operators.

Examples of primitive recursive functions: the nth prime p n, the exponents of the prime factorization of a number, the concatenation function, etc. Prop. 3.19 The set of primitive recursive (recursive) relations is closed under definitions by cases. Define primitive recursive encodings of pairs, triplets, etc., of natural numbers. 9 f#(x 1,..., x n, y) := u<y p f(x 1,...,x n,u) u Prop. 3.20 The set of primitive recursive (recursive) functions is closed under courseof-values recursion. Cor. 3.21 The set of primitive recursive (recursive) relations is closed under course-ofvalues recursion. Lemma 3.22 (Gödel s β-function) β is primitive recursive, where β(z, c, i) := rm((i + 1)c + 1, z). Gödel s β-function can be used to code finite sequences of arbitrary length; it is needed for representability of functions obtained using the restricted µ-operator. p.190, 3.30(a) Given a, b Z. Let d be the least positive element of I := {au + bv : u, v Z}. Such a d exists unless a = b = 0. Since d I, there are u, v Z such that d = au+bv. Divide a by d, obtaining a quotient q and a remainder r such that 0 r < d and a = qd + r. Then r = a qd = a q(au + bv) = (1 qu)a + bv I. If 0 < r then r is a positive element of I that is smaller than d, contradicting the choice of d, so r = 0, hence d divides a. Similarly, d divides b. If e divides both a and b then there are k and m such that a = ke and b = me, hence d = au + bv = keu + mev, hence e divides d. Thus d is the greatest common divisor of a and b. Lemma 3.23 k ω, y 1,, y k ω, z, c ω, i {1,..., k}, β(z, c, i) = y i. Proof. (3) (4) (5) (6) k, y 1,..., y k ω given c := max(k, y 1,..., y k )! def x i := c(i + 1) + 1 def y i < x i (3), (4) Claim: i j (x i, x j ) = 1 Proof. Assume p is prime. Then p x i, p x j p x i x j p (i j)c (4) p i j p c i j p c p i j (3) p c p 1 p c, p x i (4) p 1

10 (7) (8) (9) (10) x i := x j j i def (x i, x i ) = 1 (7), (6) u i, z i Z, x i z i + x i u i = 1 (8), 3.30(a) z := x 1 z 1 y 1 + + x k z k y k def Let i denote congruence modulo x i for 1 i k (11) (12) z i x i z i y i (8), (10) z i y i, i = 1,..., k (9)(11) (12) holds for all z ± mx where x := x 1 x 1, so assume z > 0 (13) (14) β(z, c, i) := rm(c(i + 1) + 1, z) def of β β(z, c, i) = rm(x i, z) (4) β(z, c, i) i z def of rm β(z, c, i) i y i (12) β(z, c, i) = y i (13) (5) Prop. 3.24 Every recursive (or primitive recursive) function is representable in S. Proof. The zero, successor, and projection functions are (strongly) representable in S. If g, h 1,, h n are (strongly) representable, then g(h 1,, h n ) is (strongly) representable. Use Gödel s β-function to represent recursion. Say g is represented by G, h by H. Define f from g, h by f(x 1,, x n, 0) = g(x 1,, x n ) f(x 1,, x n, y + 1) = h(x 1,, x n, y, f(x 1,, x n, y)) Then there is a finite sequence of intermediate results from the computation of any particular value of f. Gödel s β is used to express this. f(k 1,, k n, l) = m iff there are y 1,..., y l such that y 1 = g(k 1,, k n ) y 2 = h(k 1,, k n, 0, y 1 ) y 3 = h(k 1,, k n, 1, y 2 ) y 4 = h(k 1,, k n, 2, y 3 ). y l = h(k 1,, k n, l 2, y l 1 ) m = h(k 1,, k n, l 1, y l )

11 iff there are z, c such that for all i {2,..., l 1}, y 1 = g(k 1,, k n ) y i = h(k 1,, k n, i 2, y i 1 ) m = h(k 1,, k n, l 1, y l ) This last condition can be expressed by a formula using the β-function. Cor. 3.25 All recursive relations are expressible in S. The converses of 3.25 and 3.24 are also true; see Prop. 3.29, Cor. 3.30, and Cor. 3.31. Consequently a relation on numbers is expressible in Peano arithmetic if and only if it is recursive, and a function on numbers is representable in Peano arithmetic if and only if it is recursive. There are finitely axiomatizable fragments of S, such as Robinson s Q, called RR in the text, which have the same key properties as Peano arithmetic. Lemma 3.32 lists specific sentences provable in RR, from which one gets Prop. 3.33, that all recursive functions are representable of RR. Prob 3.33 (Mendelson, 3rd Edition). There is a recursive function that is not primitive recursive, defined by A(n, 0) = n + 1 Rewrite these equations as follows. A(0, m + 1) = A(1, m) A(n + 1, m + 1) = A(A(n, m + 1), m) A 0 (n) = n + 1 A m+1 (0) = A m (1) A m+1 (n + 1) = A m (A m+1 (n)) n+1 {}}{ Show that A m+1 (n + 1) = A n+1 m (1) = A m (A m (...(1))). Then A 0 is the function +1, A 1 is the function +2, A 2 (n) = 2n + 3, etc. (Try calculating A 3 (n) and A 4 (n).) It can be shown that the function defined by f(n) = A n (n) grows faster than any primitive recursive function, and hence is not primitive recursive. 4. Arithmetization, Godel numbers Arithmetization of syntax treat numbers as symbols and formulas and proofs associate symbols with numbers via a function g : parts of L A ω, where g(a) = Gödel number of A. n {}}{ Recall that n = 0 for all n ω. Let (15) A = g(a). All syntactical notions (such as substitution, free variables, etc.) can be defined as primitive recursive number-theoretic functions and relations. The proof consists of several pages of definitions; see Propositions 3.26, 3.27, and 3.28.

12 Two important examples: Gödel s β-function β(x, y, z) = rm(1+(z +1)y, x) = remainder when x is divided by 1 + (z + 1)y, and the diagonal function D, which is a primitive recursive function D : ω ω such that, for every formula A(x) with exactly one free variable x, D(g(A(x))) = g(a( A )) = g(sub x A (A)). 5. The Fixed-Point Theorem. Gödel s Incompleteness Theorem Prop. 3.34 Diagonalization Lemma, 3.35 Fixed-Point Theorem Suppose D is representable in K via the formula D(x, y), and E is any formula with one free variable. Let (16) F (x) := y(d(x, y) E(y)). Then K F ( F ) E( F ( F ) ). Proof. By the definition of D, we have (17) D(g(F )) = g(f ( F ), so, since D represents D, (18) K D( F, F ( F ) ). Let s = F and t = F ( F ), so we have (19) K D(s, t). By A5 and (16), (20) F (s) (D(s, t) E(t), so, by PC and (19) we get half of the desired conclusion, namely (21) K F (s) E(t). Since D represents D, we know that K can prove D is functional, i.e., (22) K D(s, z) (D(s, y) z = y). By Gen, A5, obtain the following instance of (22). (23) K D(s, t) (D(s, y) t = y), so, by MP, (19), and (23), (24) K D(s, y) t = y. Since K is a theory with equality, (25) K E(t) (t = y E(y)) so by PC, (24), and (25), we get (26) K E(t) (D(s, y) E(y)). From this it follows, by Gen and A3, that (27) K E(t) y (D(s, y) E(y)), i.e., by (16) (the definition of F ), (28) K E(t) F (s).

K is ω-consistent iff, for every formula F (x) with one free variable x, it is not the case that K xf (x) and K F (n) for every n ω. Prop. 3.36 For a theory with equality, ω-consistency implies consistency. Proof. Assume K is ω-consistent. Since K is a theory with equality, we have K x(x = x). By the ω-consistency of K applied to the formula x = x, there must be some n ω such that K (n = n). Since there is a formula that K cannot prove, it must be consistent. For all x, y, ω, Let Pf be the binary number-theoretic predicate such that y, x Pf iff y is the Gödel number of a proof in K of the formula with Gödel number x. Assume Pf is represented in K by Pf. Let E(x) be a formula that says x has no proof in K, that is, let (29) E(x) := ypf(y, x). Define F (x) by (30) F (x) := y(d(x, y) E(y)). Assume the primitive recursive diagonal function D is represented in K by D. Then (31) K D( F, F ( F ) ). By the Fixed-Point Theorem, (32) K F ( F ) E( F ( F ) ). Let (33) G := F ( F ), so (34) K G E( G ), K G ypf(y, G ). Prop. 3.37. Godel s Incompleteness theorem (i) If K is consistent, then K G. (ii) If K is ω-consistent, then K G. 13 Proof. (i): 1. K G Hyp. 2. n ω, Pf(n, g(g)) 1. 3. K Pf(n, G ) 2. 4. K ypf(y, G ) 3., (A4), PC 5. K E( G ) 1., (34) 6. K ypf(y, G ) 5., def of E(x), (34) 7. K is inconsistent 4., 6.

14 (ii): 1. K G Hyp. 2. K E( G ) 1., (34) 3. K ypf(y, G ) 2., def of E(x), PC 4. n ω, K Pf(n, G ) 3., K is ω-consistent 5. n ω, Pf(n, g(g)) Pf represents Pf 6. K G 5. 7. K is inconsistent 1., 6. The inconsistency of K contradicts Prop. 3.36. Assume K is a recursively axiomatized theory in a language containing the constant 0, the unary function symbol, and the binary function symbol +. Let Neg be the binary number-theoretic predicate such that x, y Neg iff x is the Gödel number of a formula whose negation has Gödel number y. Thus Neg(g(A), g( A)) Assume Neg is represented in K by formula N. Let x y be the formula z(x + z = y), where z is the first variable distinct form x and y. Let E(x) be a formula that says if y is a proof of x, then there is a proof of the negation of x that is smaller than y. For example, we may let (35) E(x) := z(n(x, z) y(pf(y, x) w(w y Pf(w, z)))). Also let (36) (37) F := y(d(x, y) E(x)), R := F ( F ). So R is a formula that says, every proof of me has a shorter proof of my negation. By the Fixed-Point Theorem, (38) K R E( R ). Prop. 3.38. Gödel-Rosser Theorem (i) If K is consistent, then K R. (ii) If K is consistent, then K R. Proof. (i): FOLE means by some laws concerning equality that are provable in First- Order Logic with Equality. 1. K R Hyp. 2. K E( R ) 1., (38) 3. n ω, Pf(n, g(r)) 1. def of Pf 4. K Pf(n, R ) 3., Pf represents Pf in K 5. K N( R, R ) Neg(g(R), g( R)), N represents Neg in K 6. K w(w n Pf(w, R )) 2., 4., 5., (35), (A4), MP

15 7. K w n w = 0 w = 1 w = n Hyp. on K 8. K Pf(0, R ) Pf(n, R ) 6., 7., FOLE 9. K R 1., K is consistent 10. 0, g( R) / Pf,..., n, g( R) / Pf 9. 11. K Pf(0, R ),..., K Pf(n, R ) 10., Pf represent Pf 12. K is inconsistent 8., 11. (ii): 1. K R Hyp. 2. K E( R ) 1., (38) 3. K z(n( R, z) y(pf(y, R ) w(w y Pf(w, z)))) 2., (35) Neg(g(R), g( R)) 4. K N( R, R ) N represents Neg in K 5. K y(pf(y, R ) w(w y Pf(w, R ))) 3., 4., K Neg is functional 6. K y(pf(y, R ) w(pf(w, R ) w y)) FOL 7. n ω, Pf(n, g( R)) 1. 8. K Pf(n, R ) 7., Pf represents Pf in K 9. K n y y n Hyp. on K 10. K y(pf(y, R ) y n) 6., 8., 9. 11. K y n y = 0 y = 1 y = n Hyp. on K 12. K Pf(0, R ) Pf(n, R ) 10., 11., FOLE 13. K R 12., FOLE 14. K is inconsistent 1., 13. Recall that the standard model N of Peano arithmetic has domain ω, interprets the function symbol as the successor function, the function symbol as multiplication, the symbol + as addition, and the relation symbol = as the equality relation between numbers. By the existence of the standard model, the theory S (Peano arithmetic) is consistent. (Any formal version of this consistency proof would require enough axioms to prove the existence of the standard model and any such theory happens to be more powerful than S itself.) The sentences G and R were specially constructed in order to prove Propositions 3.37 and 3.38 for S. We know S is consistent (and ω-consistent because S has the model N), so K G, K R, K R, and K G. Are G and R true in the standard model? Since G is provably equivalent to the statement that G is not provable in Peano arithmetic, and K G (i.e. G is not provable in Peano arithmetic), what G says is true, so N = G. Answer the same question for R in HW Problem 3.47. Additional HW Problems 3.41 3.45.