, and Hilbert’s

Jan Stovicek Department of Mathematical September 9th, 2008

www.ntnu.no Jan Stovicek, Axioms & algorithms 2 Outline

The

Formal and

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms 3 Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms and a mathematical , decides whether it is or is not provable from the axioms?

From: and , Foundations of Theoretical (Grundzüge der theoretischen Logik), 1928.

4 The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an ) which, given a of axioms

www.ntnu.no Jan Stovicek, Axioms & algorithms decides whether it is or is not provable from the axioms?

From: David Hilbert and Wilhelm Ackermann, Foundations of Theoretical Logic (Grundzüge der theoretischen Logik), 1928.

4 The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm) which, given a set of axioms and a mathematical proposition,

www.ntnu.no Jan Stovicek, Axioms & algorithms From: David Hilbert and Wilhelm Ackermann, Foundations of Theoretical Logic (Grundzüge der theoretischen Logik), 1928.

4 The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm) which, given a set of axioms and a mathematical proposition, decides whether it is or is not provable from the axioms?

www.ntnu.no Jan Stovicek, Axioms & algorithms 4 The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm) which, given a set of axioms and a mathematical proposition, decides whether it is or is not provable from the axioms?

From: David Hilbert and Wilhelm Ackermann, Foundations of Theoretical Logic (Grundzüge der theoretischen Logik), 1928.

www.ntnu.no Jan Stovicek, Axioms & algorithms 1. Give a complete axiomatic description; 2. Use the decision procedure (algorithm) to prove or disprove mathematical statements mechanically. Hilbert & Ackermann: We want to make it clear that for the solution of the decision problem a process would be given . . . , even though the difficulties of the process would make practical use illusory . . .

5 The Idea Behind

If we have a reasonable mathematical structure, such as the on natural numbers, then:

www.ntnu.no Jan Stovicek, Axioms & algorithms 2. Use the decision procedure (algorithm) to prove or disprove mathematical statements mechanically. Hilbert & Ackermann: We want to make it clear that for the solution of the decision problem a process would be given . . . , even though the difficulties of the process would make practical use illusory . . .

5 The Idea Behind

If we have a reasonable mathematical structure, such as the arithmetics on natural numbers, then: 1. Give a complete axiomatic description;

www.ntnu.no Jan Stovicek, Axioms & algorithms Hilbert & Ackermann: We want to make it clear that for the solution of the decision problem a process would be given . . . , even though the difficulties of the process would make practical use illusory . . .

5 The Idea Behind

If we have a reasonable mathematical structure, such as the arithmetics on natural numbers, then: 1. Give a complete axiomatic description; 2. Use the decision procedure (algorithm) to prove or disprove mathematical statements mechanically.

www.ntnu.no Jan Stovicek, Axioms & algorithms 5 The Idea Behind

If we have a reasonable mathematical structure, such as the arithmetics on natural numbers, then: 1. Give a complete axiomatic description; 2. Use the decision procedure (algorithm) to prove or disprove mathematical statements mechanically. Hilbert & Ackermann: We want to make it clear that for the solution of the decision problem a process would be given . . . , even though the difficulties of the process would make practical use illusory . . .

www.ntnu.no Jan Stovicek, Axioms & algorithms — Undecidability: There are problems which cannot be solved by any algorithm. — Inefficiency: Even if we have an algorithm, it may be far too slow. Remarks. 1. The important results on incompleteness and undecidability come from 1930’s — well before the first real computers were constructed! 2. Despite the problems, there are computer programs designed for automated proving.

6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description.

www.ntnu.no Jan Stovicek, Axioms & algorithms — Inefficiency: Even if we have an algorithm, it may be far too slow. Remarks. 1. The important results on incompleteness and undecidability come from 1930’s — well before the first real computers were constructed! 2. Despite the problems, there are computer programs designed for automated proving.

6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description. — Undecidability: There are problems which cannot be solved by any algorithm.

www.ntnu.no Jan Stovicek, Axioms & algorithms Remarks. 1. The important results on incompleteness and undecidability come from 1930’s — well before the first real computers were constructed! 2. Despite the problems, there are computer programs designed for automated proving.

6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description. — Undecidability: There are problems which cannot be solved by any algorithm. — Inefficiency: Even if we have an algorithm, it may be far too slow.

www.ntnu.no Jan Stovicek, Axioms & algorithms — well before the first real computers were constructed! 2. Despite the problems, there are computer programs designed for automated proving.

6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description. — Undecidability: There are problems which cannot be solved by any algorithm. — Inefficiency: Even if we have an algorithm, it may be far too slow. Remarks. 1. The important results on incompleteness and undecidability come from 1930’s

www.ntnu.no Jan Stovicek, Axioms & algorithms 2. Despite the problems, there are computer programs designed for automated proving.

6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description. — Undecidability: There are problems which cannot be solved by any algorithm. — Inefficiency: Even if we have an algorithm, it may be far too slow. Remarks. 1. The important results on incompleteness and undecidability come from 1930’s — well before the first real computers were constructed!

www.ntnu.no Jan Stovicek, Axioms & algorithms 6 Obstacles to Automated Proving

— Incompleteness: For some very basic mathematical structures, there is no reasonable complete description. — Undecidability: There are problems which cannot be solved by any algorithm. — Inefficiency: Even if we have an algorithm, it may be far too slow. Remarks. 1. The important results on incompleteness and undecidability come from 1930’s — well before the first real computers were constructed! 2. Despite the problems, there are computer programs designed for automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms 7 Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any ϕ(x) in Peano Arithmetics, we have an (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano An attempt to axiomatically describe natural numbers and their arithmetics.

www.ntnu.no Jan Stovicek, Axioms & algorithms (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0);

www.ntnu.no Jan Stovicek, Axioms & algorithms (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y;

www.ntnu.no Jan Stovicek, Axioms & algorithms (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x;

www.ntnu.no Jan Stovicek, Axioms & algorithms (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1;

www.ntnu.no Jan Stovicek, Axioms & algorithms (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0;

www.ntnu.no Jan Stovicek, Axioms & algorithms (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x;

www.ntnu.no Jan Stovicek, Axioms & algorithms (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom

www.ntnu.no Jan Stovicek, Axioms & algorithms 8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

www.ntnu.no Jan Stovicek, Axioms & algorithms 8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

www.ntnu.no Jan Stovicek, Axioms & algorithms 8 Example: Peano Arithmetic An attempt to axiomatically describe natural numbers and their arithmetics.

Axioms: (P1) not (∃x)(x + 1 = 0); (P2) x + 1 = y + 1 =⇒ x = y; (P3) x + 0 = x; (P4) x + (y + 1) = (x + y) + 1; (P5) x · 0 = 0; (P6) x · (y + 1) = x · y + x; (P7) for any formula ϕ(x) in Peano Arithmetics, we have an axiom (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

www.ntnu.no Jan Stovicek, Axioms & algorithms — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation : =

9 Formal Languages

We have the following components:

www.ntnu.no Jan Stovicek, Axioms & algorithms — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,...

www.ntnu.no Jan Stovicek, Axioms & algorithms — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1

www.ntnu.no Jan Stovicek, Axioms & algorithms — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, ·

www.ntnu.no Jan Stovicek, Axioms & algorithms If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y.

www.ntnu.no Jan Stovicek, Axioms & algorithms Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2.

www.ntnu.no Jan Stovicek, Axioms & algorithms — Relation symbol: =

9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms.

www.ntnu.no Jan Stovicek, Axioms & algorithms 9 Formal Languages

We have the following components: — Variables: x, y, z,... — Constants: 0, 1 — Operation symbols: +, · — Terms: 0, 1, x, x + y, x · y. If t1 and t2 are terms, so are t1 + t2 and t1 · t2. Therefore, (x + y) · z, (1 + x) · y + z,... are terms. — Relation symbol: =

www.ntnu.no Jan Stovicek, Axioms & algorithms — Atomic : t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s ).

10 Formal Languages (continued) Formulas, sentences:

www.ntnu.no Jan Stovicek, Axioms & algorithms Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms.

www.ntnu.no Jan Stovicek, Axioms & algorithms — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y

www.ntnu.no Jan Stovicek, Axioms & algorithms — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not .

www.ntnu.no Jan Stovicek, Axioms & algorithms Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x).

www.ntnu.no Jan Stovicek, Axioms & algorithms — Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

www.ntnu.no Jan Stovicek, Axioms & algorithms (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables.

www.ntnu.no Jan Stovicek, Axioms & algorithms (Goldbach’s Conjecture).

10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) )

www.ntnu.no Jan Stovicek, Axioms & algorithms 10 Formal Languages (continued) Formulas, sentences:

— Atomic formulas: t1 = t2, where t1, t2 are terms. Example. ϕ(x, y): x + y = x · y — Logical operators: and , or , not . — Quantifiers: (∀x), (∃x). Example. ψ(x): not (∃y)(∃z)(y < x and z < x and x = y · z)

— Sentences: Formulas without free variables. (∀x)( not (x = 0 or x = 1) =⇒ (∃y)(∃z)(ψ(y) and ψ(z) and x + x = y + z) ) (Goldbach’s Conjecture).

www.ntnu.no Jan Stovicek, Axioms & algorithms Proofs in a : A of a sentence ξ in our is a

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas such that each ξk is — an axiom, or

— logically follows from ξ0, . . . , ξk−1 (using , , generalization, logical axioms).

11 Theories A theory is a together with a set of axioms.

www.ntnu.no Jan Stovicek, Axioms & algorithms A proof of a sentence ξ in our language is a sequence

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas such that each ξk is — an axiom, or

— logically follows from ξ0, . . . , ξk−1 (using substitution, modus ponens, generalization, logical axioms).

11 Theories A theory is a formal language together with a set of axioms.

Proofs in a theory:

www.ntnu.no Jan Stovicek, Axioms & algorithms such that each ξk is — an axiom, or

— logically follows from ξ0, . . . , ξk−1 (using substitution, modus ponens, generalization, logical axioms).

11 Theories A theory is a formal language together with a set of axioms.

Proofs in a theory: A proof of a sentence ξ in our language is a sequence

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas

www.ntnu.no Jan Stovicek, Axioms & algorithms — logically follows from ξ0, . . . , ξk−1 (using substitution, modus ponens, generalization, logical axioms).

11 Theories A theory is a formal language together with a set of axioms.

Proofs in a theory: A proof of a sentence ξ in our language is a sequence

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas such that each ξk is — an axiom, or

www.ntnu.no Jan Stovicek, Axioms & algorithms (using substitution, modus ponens, generalization, logical axioms).

11 Theories A theory is a formal language together with a set of axioms.

Proofs in a theory: A proof of a sentence ξ in our language is a sequence

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas such that each ξk is — an axiom, or

— logically follows from ξ0, . . . , ξk−1

www.ntnu.no Jan Stovicek, Axioms & algorithms 11 Theories A theory is a formal language together with a set of axioms.

Proofs in a theory: A proof of a sentence ξ in our language is a sequence

P : ξ1, ξ2, . . . , ξk , . . . , ξn = ξ

of formulas such that each ξk is — an axiom, or

— logically follows from ξ0, . . . , ξk−1 (using substitution, modus ponens, generalization, logical axioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms 12 Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 and

If we have a theory describing some structure,

www.ntnu.no Jan Stovicek, Axioms & algorithms we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers,

www.ntnu.no Jan Stovicek, Axioms & algorithms 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be:

www.ntnu.no Jan Stovicek, Axioms & algorithms If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent.

www.ntnu.no Jan Stovicek, Axioms & algorithms there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ,

www.ntnu.no Jan Stovicek, Axioms & algorithms We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”!

www.ntnu.no Jan Stovicek, Axioms & algorithms (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent

www.ntnu.no Jan Stovicek, Axioms & algorithms 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!).

www.ntnu.no Jan Stovicek, Axioms & algorithms If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete.

www.ntnu.no Jan Stovicek, Axioms & algorithms 13 Consistency and Completeness

If we have a theory describing some structure, such as the arithmetics of natural numbers, we would like it to be: 1. Consistent. If there is a proof in the theory for a sentence ξ, there must not be a proof for “not ξ”! We will assume that Peano Arithmetics is consistent (cheating in a sense!). 2. Complete. If ξ is a sentence, there should be a proof for either ξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms which cannot be proved, but it is a true about natural numbers. In particular, Peano Arithmetics is incomplete. In , any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics

www.ntnu.no Jan Stovicek, Axioms & algorithms but it is a true statement about natural numbers. In particular, Peano Arithmetics is incomplete. In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved,

www.ntnu.no Jan Stovicek, Axioms & algorithms In particular, Peano Arithmetics is incomplete. In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved, but it is a true statement about natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved, but it is a true statement about natural numbers. In particular, Peano Arithmetics is incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved, but it is a true statement about natural numbers. In particular, Peano Arithmetics is incomplete. In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved, but it is a true statement about natural numbers. In particular, Peano Arithmetics is incomplete. In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom.

www.ntnu.no Jan Stovicek, Axioms & algorithms 14 Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931) There is a sentence ξ, the so called Gödel sentence, in Peano Arithmetics which cannot be proved, but it is a true statement about natural numbers. In particular, Peano Arithmetics is incomplete. In fact, any consistent effective axiomatic description of the arithmetics of natural numbers is incomplete.

Effective axiomatic description: There is an algorithm which determines whether a given formula is an axiom. Recall: (P7)(ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

www.ntnu.no Jan Stovicek, Axioms & algorithms We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar ). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by .

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number.

www.ntnu.no Jan Stovicek, Axioms & algorithms (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ

www.ntnu.no Jan Stovicek, Axioms & algorithms So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ).

www.ntnu.no Jan Stovicek, Axioms & algorithms — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs.

www.ntnu.no Jan Stovicek, Axioms & algorithms which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ,

www.ntnu.no Jan Stovicek, Axioms & algorithms (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics

www.ntnu.no Jan Stovicek, Axioms & algorithms — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox).

www.ntnu.no Jan Stovicek, Axioms & algorithms but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics,

www.ntnu.no Jan Stovicek, Axioms & algorithms — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms 15 Idea behind the Theorem

— Every formula ϕ(x1,..., xn) in Peano Arithmetics can be represented by a number. We will denote this number Gϕ (the Gödel number of ϕ). So can be represented proofs. — Then, roughly said we construct a sentence ξ, which “says” that there is no proof for ξ in Peano Arithmetics (Liar Paradox). — There can be no proof for ξ in Peano Arithmetics, but ξ is a true statement about natural numbers. — The second part is newer with a different proof, it can be essentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms 1. consistent, and 2. effectively described, is necessarily incomplete.

16 Summary

Any axiomatic description of the arithmetics of natural numbers which is

www.ntnu.no Jan Stovicek, Axioms & algorithms and 2. effectively described, is necessarily incomplete.

16 Summary

Any axiomatic description of the arithmetics of natural numbers which is 1. consistent,

www.ntnu.no Jan Stovicek, Axioms & algorithms is necessarily incomplete.

16 Summary

Any axiomatic description of the arithmetics of natural numbers which is 1. consistent, and 2. effectively described,

www.ntnu.no Jan Stovicek, Axioms & algorithms 16 Summary

Any axiomatic description of the arithmetics of natural numbers which is 1. consistent, and 2. effectively described, is necessarily incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms 17 Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms such as Peano Arithmetics, and a sentence ξ in the theory decides, whether ξ is or is not provable from the axioms.

In other words: — We have given finding a complete axiomatic description for natural numbers. — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory,

www.ntnu.no Jan Stovicek, Axioms & algorithms and a sentence ξ in the theory decides, whether ξ is or is not provable from the axioms.

In other words: — We have given up finding a complete axiomatic description for natural numbers. — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory, such as Peano Arithmetics,

www.ntnu.no Jan Stovicek, Axioms & algorithms decides, whether ξ is or is not provable from the axioms.

In other words: — We have given up finding a complete axiomatic description for natural numbers. — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory, such as Peano Arithmetics, and a sentence ξ in the theory

www.ntnu.no Jan Stovicek, Axioms & algorithms In other words: — We have given up finding a complete axiomatic description for natural numbers. — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory, such as Peano Arithmetics, and a sentence ξ in the theory decides, whether ξ is or is not provable from the axioms.

www.ntnu.no Jan Stovicek, Axioms & algorithms — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory, such as Peano Arithmetics, and a sentence ξ in the theory decides, whether ξ is or is not provable from the axioms.

In other words: — We have given up finding a complete axiomatic description for natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms 18 The Decision Problem Revisited

Problem (Hilbert’s Entscheidungsproblem) Is there an algorithm which, given an effectively described theory, such as Peano Arithmetics, and a sentence ξ in the theory decides, whether ξ is or is not provable from the axioms.

In other words: — We have given up finding a complete axiomatic description for natural numbers. — However, we still want an algorithm for automated proving for the descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A (after ). 3. (by ). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms

www.ntnu.no Jan Stovicek, Axioms & algorithms Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing). 3. (by Alonzo Church). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

www.ntnu.no Jan Stovicek, Axioms & algorithms 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing). 3. Lambda calculus (by Alonzo Church). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models:

www.ntnu.no Jan Stovicek, Axioms & algorithms which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing). 3. Lambda calculus (by Alonzo Church). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar

www.ntnu.no Jan Stovicek, Axioms & algorithms 2. A Turing machine (after Alan Turing). 3. Lambda calculus (by Alonzo Church). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file.

www.ntnu.no Jan Stovicek, Axioms & algorithms 3. Lambda calculus (by Alonzo Church). All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing).

www.ntnu.no Jan Stovicek, Axioms & algorithms All the models above have the same computational strength.

19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing). 3. Lambda calculus (by Alonzo Church).

www.ntnu.no Jan Stovicek, Axioms & algorithms 19 What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms we need to have a definition of an algorithm.

Different computational models: 1. A program in C, Java, Pascal or similar which gets an input file and can write its output to an output file. 2. A Turing machine (after Alan Turing). 3. Lambda calculus (by Alonzo Church). All the models above have the same computational strength.

www.ntnu.no Jan Stovicek, Axioms & algorithms Church-Turing Thesis The intuitive notion of an “algorithm” is, formally, a Turing machine which finishes its computation in finite time given any input (= halts on each input).

20 Church-Turing Thesis

A Turing machine:

www.ntnu.no Jan Stovicek, Axioms & algorithms which finishes its computation in finite time given any input (= halts on each input).

20 Church-Turing Thesis

A Turing machine:

Church-Turing Thesis The intuitive notion of an “algorithm” is, formally, a Turing machine

www.ntnu.no Jan Stovicek, Axioms & algorithms (= halts on each input).

20 Church-Turing Thesis

A Turing machine:

Church-Turing Thesis The intuitive notion of an “algorithm” is, formally, a Turing machine which finishes its computation in finite time given any input

www.ntnu.no Jan Stovicek, Axioms & algorithms 20 Church-Turing Thesis

A Turing machine:

Church-Turing Thesis The intuitive notion of an “algorithm” is, formally, a Turing machine which finishes its computation in finite time given any input (= halts on each input).

www.ntnu.no Jan Stovicek, Axioms & algorithms which, given a source P of another program and its input file F, decides whether P halts on the input F?

Theorem (Alan Turing, 1936) There is no such algorithm. Therefore, the is undecidable.

21 The Halting Problem

Problem (The Halting Problem) Is there an algorithm (program) Halt(P, F)

www.ntnu.no Jan Stovicek, Axioms & algorithms decides whether P halts on the input F?

Theorem (Alan Turing, 1936) There is no such algorithm. Therefore, the halting problem is undecidable.

21 The Halting Problem

Problem (The Halting Problem) Is there an algorithm (program) Halt(P, F) which, given a source code P of another program and its input file F,

www.ntnu.no Jan Stovicek, Axioms & algorithms Theorem (Alan Turing, 1936) There is no such algorithm. Therefore, the halting problem is undecidable.

21 The Halting Problem

Problem (The Halting Problem) Is there an algorithm (program) Halt(P, F) which, given a source code P of another program and its input file F, decides whether P halts on the input F?

www.ntnu.no Jan Stovicek, Axioms & algorithms Therefore, the halting problem is undecidable.

21 The Halting Problem

Problem (The Halting Problem) Is there an algorithm (program) Halt(P, F) which, given a source code P of another program and its input file F, decides whether P halts on the input F?

Theorem (Alan Turing, 1936) There is no such algorithm.

www.ntnu.no Jan Stovicek, Axioms & algorithms 21 The Halting Problem

Problem (The Halting Problem) Is there an algorithm (program) Halt(P, F) which, given a source code P of another program and its input file F, decides whether P halts on the input F?

Theorem (Alan Turing, 1936) There is no such algorithm. Therefore, the halting problem is undecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms — Then define a program

Diag(F) { x : if Halt(F, F) then go to x; }

— What does then Halt(Diag, Diag) return?

22 Idea behind the Theorem

— Suppose we have such a program Halt(P, F).

www.ntnu.no Jan Stovicek, Axioms & algorithms — What does then Halt(Diag, Diag) return?

22 Idea behind the Theorem

— Suppose we have such a program Halt(P, F). — Then define a program

Diag(F) { x : if Halt(F, F) then go to x; }

www.ntnu.no Jan Stovicek, Axioms & algorithms 22 Idea behind the Theorem

— Suppose we have such a program Halt(P, F). — Then define a program

Diag(F) { x : if Halt(F, F) then go to x; }

— What does then Halt(Diag, Diag) return?

www.ntnu.no Jan Stovicek, Axioms & algorithms The same holds for any consistent axiomatic description of the artihmetics of natural numbers.

23 Undecidability

Theorem (Alan Turing, Alonzo Church, 1936) There is no algorithm which, given a sentence ξ in Peano Arithmetics, would decide whether or not ξ is provable from the axioms.

www.ntnu.no Jan Stovicek, Axioms & algorithms 23 Undecidability

Theorem (Alan Turing, Alonzo Church, 1936) There is no algorithm which, given a sentence ξ in Peano Arithmetics, would decide whether or not ξ is provable from the axioms. The same holds for any consistent axiomatic description of the artihmetics of natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key : A f : N → N is definable if and only if it is computable by a program. — With similar as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics

www.ntnu.no Jan Stovicek, Axioms & algorithms — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key point: A function f : N → N is definable if and only if it is computable by a program. — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable.

www.ntnu.no Jan Stovicek, Axioms & algorithms — Key point: A function f : N → N is definable if and only if it is computable by a program. — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times

www.ntnu.no Jan Stovicek, Axioms & algorithms — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key point: A function f : N → N is definable if and only if it is computable by a program.

www.ntnu.no Jan Stovicek, Axioms & algorithms Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key point: A function f : N → N is definable if and only if it is computable by a program. — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable.

www.ntnu.no Jan Stovicek, Axioms & algorithms — The second part can be found in the book by Tarski.

24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key point: A function f : N → N is definable if and only if it is computable by a program. — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program.

www.ntnu.no Jan Stovicek, Axioms & algorithms 24 Idea behind the Theorem — A function f : N → N is definable if there is a formula ϕ(x, y) in Peano Arithmetics such that f (n) = k if and only if ϕ(n, k) is provable. — Here, n = 1 + 1 + ··· + 1. | {z } n times — Key point: A function f : N → N is definable if and only if it is computable by a program. — With similar arguments as in Gödel’s theorem, we show that ( 1 if x = G for a provable formula ϕ f (x) = ϕ 0 otherwise is not definable. Hence, it is not computable by a program. — The second part can be found in the book by Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms