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

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

Axiomatic set theory. Chapter Why axiomatic set theory?

Propositional and Predicate Logic - XIII

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

MAGIC Set theory. lecture 2

Hilbert s problems, Gödel, and the limits of computation

Gödel s First Incompleteness Theorem

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

Gödel s Incompleteness Theorems

Hilbert s problems, Gödel, and the limits of computation

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

CHAPTER 2. FIRST ORDER LOGIC

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

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:

Euler s, Fermat s and Wilson s Theorems

Commutative Rings and Fields

Informal Statement Calculus

Logic: The Big Picture

Chapter 3. Formal Number Theory

Understanding Decimal Addition

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Lecture 15 The Second Incompleteness Theorem. Michael Beeson

Propositional Logic: Syntax

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

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

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

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

where c R and the content of f is one. 1

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

Part II Logic and Set Theory

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

PEANO AXIOMS FOR THE NATURAL NUMBERS AND PROOFS BY INDUCTION. The Peano axioms

23.1 Gödel Numberings and Diagonalization

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

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

2. Two binary operations (addition, denoted + and multiplication, denoted

Herbrand Theorem, Equality, and Compactness

TRUTH-THEORIES FOR FRAGMENTS OF PA

Lecture 6: Finite Fields

The Representability of Partial Recursive Functions in Arithmetical Theories and Categories

Decidability: Church-Turing Thesis

Arithmetical classification of the set of all provably recursive functions

5. Peano arithmetic and Gödel s incompleteness theorem

a 2 = ab a 2 b 2 = ab b 2 (a + b)(a b) = b(a b) a + b = b

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

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

Gödel s First Incompleteness Theorem (excerpted from Gödel s Great Theorems) Selmer Bringsjord Intro to Logic May RPI Troy NY USA

Logic and Computation

Homework 8 Solutions to Selected Problems

The constructible universe

Chapter 5. Number Theory. 5.1 Base b representations

Handout: Proof of the completeness theorem

CSCI3390-Lecture 6: An Undecidable Problem

D-MATH Algebra I HS18 Prof. Rahul Pandharipande. Solution 1. Arithmetic, Zorn s Lemma.

Lecture 2: Syntax. January 24, 2018

Arithmetical Hierarchy

Arithmetical Hierarchy

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

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

CSE 1400 Applied Discrete Mathematics Proofs

A Generalization of Wilson s Theorem

Chapter 0. Introduction: Prerequisites and Preliminaries

Contribution of Problems

Logic. Propositional Logic: Syntax

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

Primes and Modular Arithmetic! CSCI 2824, Fall 2014!!

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Divisibility = 16, = 9, = 2, = 5. (Negative!)

The Chinese Remainder Theorem

be any ring homomorphism and let s S be any element of S. Then there is a unique ring homomorphism

185.A09 Advanced Mathematical Logic

Logic. Propositional Logic: Syntax. Wffs

Fuzzy Does Not Lie! Can BAŞKENT. 20 January 2006 Akçay, Göttingen, Amsterdam Student No:

Meta-logic derivation rules

COMP 409: Logic Homework 5

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

CS21 Decidability and Tractability

Between proof theory and model theory Three traditions in logic: Syntactic (formal deduction)

Representability of Recursive Functions

EQUIVALENCE RELATIONS (NOTES FOR STUDENTS) 1. RELATIONS

6 Cosets & Factor Groups

NONSTANDARD ARITHMETIC AND RECURSIVE COMPREHENSION

Some Applications of MATH 1090 Techniques

Gödel s Incompleteness Theorems

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

Final Exam (100 points)

Russell s logicism. Jeff Speaks. September 26, 2007

06 Recursive Definition and Inductive Proof

1 The decision problem for First order logic

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

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

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

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

Proof Theory and Subsystems of Second-Order Arithmetic

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

0.Axioms for the Integers 1

MATH 25 CLASS 12 NOTES, OCT Contents 1. Simultaneous linear congruences 1 2. Simultaneous linear congruences 2

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).

Chapter 3. Rings. The basic commutative rings in mathematics are the integers Z, the. Examples

XII. Elementary Function

Transcription:

Logic February 6, 2013

Logic 1 2 3 Logic

About Talk Logic Things talk Will approach from angle of computation. Will not assume very much knowledge. Will prove Gödel s Incompleteness Theorem. Will not talk much about first order logic. Will not even write down any axioms of arithmetic. Will not talk about every detail.

Things to Take Away Logic 1 is powerful. 2 Incompleteness is an obvious corollary of (1). 3 Incompleteness is not frustrating.

The big theorems Logic There are three big theorems which make up incompleteness. We will prove two. Gödel s β Function Lemma There is a very computable way to code sequences of natural numbers. Gödel s Representability Theorem All primitive recursive functions can be represented in Peano s (omitted). Gödel s Diagonal Lemma Formulas have fixed points

What are Natural Numbers? Logic The Natural Numbers are the numbers 0, 1, 2,.... We can define them inductively as the smallest set containing 0, and closed under the operation of taking a successor. This is a circular definition in the eyes of mathematical foundations. Problem to Ponder: How can we better define the natural numbers to be more pure with respect to foundations? This question invites writing down axioms for how numbers behave.

Logic What can we do with Natural Numbers? We will be particularly diligent in deciding what we can do with natural numbers. For instance, we will not give ourselves the power to do arbitrary calculations on the natural numbers. Instead, we want to capture what simple operations we can do on natural numbers. There are several approaches. Approach One: Addition and multiplication are the only thing we can do. Result: is fairly boring. Approach Two: We can do addition, multiplication, and define things by induction. Result: becomes self-aware.

Primitive Recursion Logic A function f : N n N is primitive recursive if and only if it is one of the following: f (x 1,..., x n ) = 0 f (x 1,..., x n ) = s(x 1 ) where s is the successor operation. f (x 1,..., x n ) = x i for some 1 i n. f (x 1,..., x n ) = h(g 1 (x 1,..., x n ),..., g k (x 1,..., x n )) where h, g primitive recursive. f (x 1,..., x n ) = { g(x 1,..., x n ) if x 1 = 0 h(x 1,..., x n, f (x, x 2,..., x n )) if x 1 = s(x ) where h, g are primitive recursive.

What is Primitive Recursive Logic What is a function that is not primitive recursive? Answer: It doesn t matter. In a computability class, primitive recursive functions are just the first stopping point. For us, it s all(ish) we need. Because... Fact Most functions are primitive recursive.

Logic Primitive Recursive Functions We have the above language of primitive recursive functions, and our goal is the following theorem: Theorem (Gödel s β function lemma) There is a primitive recursive function β : N 2 N such that for any sequence of natural numbers a 1, a 2,..., a n there is a natural number a such that for every 1 i n β(a, i) = a i a is called the code for the sequence a 1,..., a n The above theorem is the heart of incompleteness. It should tell you, if you look at the naturals just as 0, 1, 2,... then you re wrong. The information that is encoded in the natural numbers is immense.

Let s add and multiply first... Logic As a toy project, let s define the function + : N 2 N which represents addition. This is a simple definition by recursion: { π 2 (x, y) if x = 0 x + y := s(x + y) if x = s(x ) Now, it s not difficult to define multiplication. { 0 if x = 0 x y := y + (x y) if x = s(x )

Now let s subtract Logic Subtracting is a little more tricky perhaps. Note it s not always possible. For instance, what is 5 10? So we restrict ourselves to cut-off subtraction. That is, subtraction but it cuts off at 0. First, we define the predecessor function, which is not too hard. { 0 if x = 0 p(x) := x if x = s(x )

Logic Now, doing x y is just a matter of iterating this operation several times! { x if y = 0 x y := p(x y ) if y = s(y )

Coding Booleans Logic For our purposes, will be the constant function 1, and will be the constant function 0. Now, we define some simple booleans operations. x y := x y x y := (x + y) (x y) x := 1 x

Cases Logic We will define a function x?y : z which outputs y if x is and z if x is as follows: { z if x = 0 (x?y : z) := y

Logic Relations and Characteristic Functions A binary relation on N can be expressed as a function { if R(x, y) f (x, y) = Using this, we can talk about defining a relation using primitive recursive functions too. The relation is definable. x y := (x y)? : Then of course equality and < can be defined: x = y := (x y) (y x) x < y := (x y) (x = y)

Bounded Search Logic I can return the first value of x smaller then b for which some relation is true. 0 if b = 0 µ x<b f (x) := ((µ x<b f (x)) = b )? (f (b )?b if b = s(b ) : b) : (µ x<b f (x)) This easily allow us to do to ask if there is some x < b such that some function is true. x<b f (x) := ((µ x<b f (x)) = b)? : And one can write x<b f (x) := ( x<b f (x))

Back to Division Logic Now, we can determine whether x divides y. x y := z<y x z = y This also gives us a primality test. isprime(x) := z<x (z = 1) (z x) And we can even calculate the nth prime with the knowledge there is a prime between p and 2p. { 2 if n = 0 pr(n) := µ z<2 pr(n )(z > pr(n )) isprime(z)

Integer Division and Modulus Logic We can calculate an integer division. x y := y (µ z<y x (y z) y) And the remainder is of course: x%y := µ z<y (y (x y) + z) = y

Logic Theorem (Gödel s β function lemma) There is a primitive recursive function β : N 2 N such that for any sequence of natural numbers a 1, a 2,..., a n there is a natural number a such that for every 1 i n β(a, i) = a i a is called the code for the sequence a 1,..., a n

Logic Proof of Gödel s β Proof. Step 1: We find a way to encode a pair a, b. There are a few ways to do this. The earliest example is due to Cantor, and is the dovetailing bijection you probably have seen. Another technique is with Kleene s Pairing Function: π(a, b) = 2 a (2b + 1) We want to know that we can decode this using a primative recursive function. π 1 (p) = µ z<p ((p 2 z )%2 = 1) π 2 (p) = ((p 2 π 1(p) ) 1) 2

Chinese Remainder Theorem Logic Recall the following theorem from antiquity. Theorem (Chinese Remainder Theorem) For every sequence a 1,..., a n, if p 1,..., p n are relatively prime then there is a number u such that u a 1 mod p 1 u a 2 mod p 2. u a n mod p n u is the unique such number less than p i

β lemma proof continued Logic β lemma proof continued... Step 2: Be clever, and use CRT. Consider the sequence a 1,..., a n. Let N be the maximum of a 1,..., a n, n. Claim that N! + 1, 2N! + 1,... nn! + 1 are all relatively prime. Otherwise, there is some j that divides two of them, so it divides the difference, so it divides N!, so j < N. But of course no j < N can divide kn! + 1. Let u be obtained by CRT so that u a i mod in! + 1. Code the sequence a 1,..., a n as the pair π(n!, u). β(u, i) = π 2 (U) % (i π 1 (U) + 1)

Logic To Logic We have avoided talking about formal logic thus far, and we will continue to avoid a lot of details. The important thing is, using the β function, we can represent all the information we d ever want to about logic in arithmetic. x i := 0, i φ ψ := 1, φ, ψ x.φ := 2, x, φ etc. These are call Gödel numbers of the formulas. Every formula has a Gödel number. Now, questions about logic can be answers just by arithmetic of the numbers. Theorem There is a primitive recursive function iswff which can identify if a given natural number is the Gödel number of a formula.

What s in a Proof? Logic A proof is a sequence of formulas where each is either an axiom or obtained from previous formulas by modus ponens (ie. if P and P Q are listed earlier, we can now list Q). As formulas can be Gödel numbered with natural numbers, proofs can also be Gödel numbered as they are nothing more than sequences of formulas. We would like it if there were a function which recognizes whether a Gödel number is a valid proof. This might not always be the case for every axiomatic system. What is required is that the axioms are simple to describe.

Assumption: Simple list of Axioms Logic Our system is something in the language of arithmetic (so there is + and and 0 and 1) We will assume that the axioms of our system are simple enough there there is a primitive recursive function that can decide whether a given formula is an axiom (so there is a primitive recursive function that can decide if a sequence of formulas is a proof). This is a reasonable assumption. (Peano s and ZFC both have simple axiom system, for example).

Assumption: Expressive Logic We assume our system is sufficiently expressive. That is, the following is true : For every primitive recursive function f (x 1,..., x n ) there is a formula φ(x 1,..., x n, y) such that f (x 1,..., x n ) = y φ(x 1,..., x n, y) This was proven by Gödel to hold for Peano. We will not prove this.

Fixed Point Theorem Logic Theorem For every formula φ(x) with one free variable, there is a sentence ψ such that ψ φ( ψ ) Assume this is true momentarily.

Incompleteness Logic Theorem Our system is incomplete. Proof. We need to find a sentence ψ such that neither ψ nor ψ have a proof. Let φ(x) be the formula y.y is the Gödel number of a proof of x. By the fixed point theorem these is ψ such that φ( ψ ) ψ. Thus ψ is true if and only if there is a proof of ψ. As we are assuming our system doesn t prove contradictions, we can neither prove ψ nor ψ

Proof of Fixed Point Theorem Logic Proof. Step 1: The function App : N 2 N is primitive recursive, which does the following: App(n, m) = φ(m) Where φ(x) = n. This isn t hard to see; you just do cases on what kind of formula n represents and do the substitution inductively. Define f : N N by f (x) = App(x, x)

Logic Proof of Fixed Point Theorem continued Proof. Step 2: Recall our language is expressive. So there is some formula θ f (x, y) such that: Consider the formula: θ f (x, y) y = f (x) µ(x) := y.θ f (x, y) φ(y) It is easy to see that this formula is equivalent to φ(f (x)); therefore we have: µ(x) φ(app(x, x))

Proof of Fixed Point Theorem continued Logic Proof. Step 3: Instantiate the formula µ(x) at it s own Gödel number, µ(x). Then: µ( µ(x) ) φ(app( µ(x), µ(x) )) φ( µ( µ(x) ) ) So, set ψ := µ( µ(x) ). So ψ φ( ψ ).