120
Axioms, algorithms and Hilbert’s Entscheidungsproblem Jan Stovicek Department of Mathematical Sciences September 9th, 2008 www.ntnu.no Jan Stovicek, Axioms & algorithms

Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

Axioms, algorithms andHilbert’s Entscheidungsproblem

Jan StovicekDepartment of Mathematical Sciences

September 9th, 2008

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 2: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

2

Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 3: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

3

Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 4: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

4

The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928)

Is there an effective procedure (an algorithm) which, given a set ofaxioms

and a mathematical proposition, decides whether it is or isnot provable from the axioms?

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 5: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

4

The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928)

Is there an effective procedure (an algorithm) which, given a set ofaxioms and a mathematical proposition,

decides whether it is or isnot provable from the axioms?

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 6: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

4

The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928)

Is there an effective procedure (an algorithm) which, given a set ofaxioms and a mathematical proposition, decides whether it is or isnot provable from the axioms?

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 7: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

4

The Decision Problem

Problem (Hilbert’s Entscheidungsproblem, 1928)

Is there an effective procedure (an algorithm) which, given a set ofaxioms and a mathematical proposition, decides whether it is or isnot provable from the axioms?

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 8: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

5

The Idea Behind

If we have a reasonable mathematical structure, such as thearithmetics 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 thedecision problem a process would be given . . . , eventhough the difficulties of the process would make practicaluse illusory . . .

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 9: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

5

The Idea Behind

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

1. Give a complete axiomatic description;

2. Use the decision procedure (algorithm) to prove or disprovemathematical statements mechanically.

Hilbert & Ackermann:We want to make it clear that for the solution of thedecision problem a process would be given . . . , eventhough the difficulties of the process would make practicaluse illusory . . .

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 10: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

5

The Idea Behind

If we have a reasonable mathematical structure, such as thearithmetics 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 thedecision problem a process would be given . . . , eventhough the difficulties of the process would make practicaluse illusory . . .

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 11: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

5

The Idea Behind

If we have a reasonable mathematical structure, such as thearithmetics 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 thedecision problem a process would be given . . . , eventhough the difficulties of the process would make practicaluse illusory . . .

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 12: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 byany algorithm.

— Inefficiency: Even if we have an algorithm, it may be far tooslow.

Remarks.

1. The important results on incompleteness and undecidabilitycome from 1930’s — well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 13: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 tooslow.

Remarks.

1. The important results on incompleteness and undecidabilitycome from 1930’s — well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 14: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 undecidabilitycome from 1930’s — well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 15: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 undecidabilitycome from 1930’s

— well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 16: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 undecidabilitycome from 1930’s — well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 17: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 undecidabilitycome from 1930’s — well before the first real computers wereconstructed!

2. Despite the problems, there are computer programs designedfor automated proving.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 18: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

7

Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 19: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 20: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 21: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 22: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 23: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 24: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 25: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 26: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 27: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 28: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 29: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

8

Example: Peano ArithmeticAn attempt to axiomatically describe natural numbers and theirarithmetics.

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

Page 30: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 31: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 32: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 33: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 34: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 35: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 36: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 37: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 38: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 39: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 40: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 41: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 42: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 43: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 44: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 45: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 46: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 47: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 48: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 49: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 50: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 51: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 52: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

11

TheoriesA 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, logicalaxioms).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 53: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

12

Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 54: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure,

such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 55: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 56: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 57: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 58: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 59: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 60: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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

(cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 61: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 62: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete.

If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 63: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

13

Consistency and Completeness

If we have a theory describing some structure, such as thearithmetics 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 (cheatingin a sense!).

2. Complete. If ξ is a sentence, there should be a proof for eitherξ or “not ξ”.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 64: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics

which cannot be proved, but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 65: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved,

but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 66: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved, but it is a true statement aboutnatural numbers.

In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 67: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved, but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 68: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved, but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 69: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved, but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

Recall: (P7) (ϕ(0) and (∀x)(ϕ(x) =⇒ ϕ(x + 1))) =⇒ (∀x)(ϕ(x)).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 70: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

14

Gödel’s Incompleteness Theorem

Theorem (Kurt Gödel, 1931)

There is a sentence ξ, the so called Gödel sentence, in PeanoArithmetics which cannot be proved, but it is a true statement aboutnatural numbers. In particular, Peano Arithmetics is incomplete.

In fact, any consistent effective axiomatic description of thearithmetics of natural numbers is incomplete.

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

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 71: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

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

We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 72: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

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

(theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 73: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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

Page 74: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 75: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 76: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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

Page 77: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 78: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 79: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 80: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

15

Idea behind the Theorem

— Every formula ϕ(x1, . . . , xn) in Peano Arithmetics can berepresented by a number. We will denote this number Gϕ (theGö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 atrue statement about natural numbers.

— The second part is newer with a different proof, it can beessentially found in a nice book by Alfred Tarski.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 81: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

16

Summary

Any axiomatic description of the arithmetics of natural numberswhich is

1. consistent, and2. effectively described,

is necessarily incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 82: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

16

Summary

Any axiomatic description of the arithmetics of natural numberswhich is

1. consistent,

and2. effectively described,

is necessarily incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 83: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

16

Summary

Any axiomatic description of the arithmetics of natural numberswhich is

1. consistent, and2. effectively described,

is necessarily incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 84: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

16

Summary

Any axiomatic description of the arithmetics of natural numberswhich is

1. consistent, and2. effectively described,

is necessarily incomplete.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 85: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

17

Outline

The Decision Problem

Formal Languages and Theories

Incompleteness

Undecidability

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 86: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 87: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 88: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 89: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 90: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 91: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 fornatural numbers.

— However, we still want an algorithm for automated proving forthe descriptions we have at our disposal.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 92: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

If we want to prove anything about existence of algorithms

we needto have a definition of an algorithm.

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 93: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 94: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 95: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar

which gets an input fileand 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

Page 96: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 97: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 98: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 99: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

19

What Precisely is an Algorithm?

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

Different computational models:

1. A program in C, Java, Pascal or similar which gets an input fileand 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

Page 100: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

20

Church-Turing Thesis

A Turing machine:

Church-Turing Thesis

The intuitive notion of an “algorithm” is, formally, a Turing machinewhich finishes its computation in finite time given any input (= haltson each input).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 101: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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 (= haltson each input).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 102: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

20

Church-Turing Thesis

A Turing machine:

Church-Turing Thesis

The intuitive notion of an “algorithm” is, formally, a Turing machinewhich finishes its computation in finite time given any input

(= haltson each input).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 103: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

20

Church-Turing Thesis

A Turing machine:

Church-Turing Thesis

The intuitive notion of an “algorithm” is, formally, a Turing machinewhich finishes its computation in finite time given any input (= haltson each input).

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 104: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

21

The Halting Problem

Problem (The Halting Problem)

Is there an algorithm (program) Halt(P,F )

which, given a sourcecode P of another program and its input file F , decides whether Phalts on the input F?

Theorem (Alan Turing, 1936)

There is no such algorithm. Therefore, the halting problem isundecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 105: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

21

The Halting Problem

Problem (The Halting Problem)

Is there an algorithm (program) Halt(P,F ) which, given a sourcecode P of another program and its input file F ,

decides whether Phalts on the input F?

Theorem (Alan Turing, 1936)

There is no such algorithm. Therefore, the halting problem isundecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 106: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

21

The Halting Problem

Problem (The Halting Problem)

Is there an algorithm (program) Halt(P,F ) which, given a sourcecode P of another program and its input file F , decides whether Phalts on the input F?

Theorem (Alan Turing, 1936)

There is no such algorithm. Therefore, the halting problem isundecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 107: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

21

The Halting Problem

Problem (The Halting Problem)

Is there an algorithm (program) Halt(P,F ) which, given a sourcecode P of another program and its input file F , decides whether Phalts on the input F?

Theorem (Alan Turing, 1936)

There is no such algorithm.

Therefore, the halting problem isundecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 108: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

21

The Halting Problem

Problem (The Halting Problem)

Is there an algorithm (program) Halt(P,F ) which, given a sourcecode P of another program and its input file F , decides whether Phalts on the input F?

Theorem (Alan Turing, 1936)

There is no such algorithm. Therefore, the halting problem isundecidable.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 109: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 110: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 111: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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

Page 112: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

23

Undecidability

Theorem (Alan Turing, Alonzo Church, 1936)

There is no algorithm which, given a sentence ξ in PeanoArithmetics, would decide whether or not ξ is provable from theaxioms.

The same holds for any consistent axiomatic description of theartihmetics of natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 113: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

23

Undecidability

Theorem (Alan Turing, Alonzo Church, 1936)

There is no algorithm which, given a sentence ξ in PeanoArithmetics, would decide whether or not ξ is provable from theaxioms.

The same holds for any consistent axiomatic description of theartihmetics of natural numbers.

www.ntnu.no Jan Stovicek, Axioms & algorithms

Page 114: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 115: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 116: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 117: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 118: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 119: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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

Page 120: Axioms, algorithms and Hilbert's Entscheidungsproblemstovicek/math/decidability.pdf · Problem (Hilbert’s Entscheidungsproblem, 1928) Is there an effective procedure (an algorithm)

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) isprovable.

— Here, n = 1 + 1 + · · ·+ 1︸ ︷︷ ︸n times

.

— Key point: A function f : N→ N is definable if and only if it iscomputable by a program.

— With similar arguments as in Gödel’s theorem, we show that

f (x) =

{1 if x = Gϕ for a provable formula ϕ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