Thales’ Legacy: What Is A Proof? Great Theoretical Ideas In Computer Science Steven RudichCS 15-251 Spring 2004 Lecture 27April 22, 2004Carnegie Mellon.

Slides:



Advertisements
Similar presentations
Cognitive Computing 2013 Consciousness and Computations 7. THE SELF APPLICABILITY PROBLEM (SAP); PENROSE ON UNDERSTANDING UNDERSTANDING Mark Bishop.
Advertisements

Completeness and Expressiveness
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Copyright © Cengage Learning. All rights reserved.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Induction: One Step At A Time Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 4Jan 22, 2004Carnegie Mellon University.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
February 11, 2015CS21 Lecture 161 CS21 Decidability and Tractability Lecture 16 February 11, 2015.
Great Theoretical Ideas in Computer Science.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Lecture 8 Recursively enumerable (r.e.) languages
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Great Theoretical Ideas in Computer Science.
So far we have learned about:
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
Turing’s Legacy: The Limits Of Computation. Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 26April 20, 2003Carnegie.
MATH 224 – Discrete Mathematics
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Institute for Experimental Physics University of Vienna Institute for Quantum Optics and Quantum Information Austrian Academy of Sciences Undecidability.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Great Theoretical Ideas in Computer Science for Some.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really.
Lecture 18. Unsolvability Before the 1930’s, mathematics was not like today. Then people believed that “everything true must be provable”. (More formally,
Course Overview and Road Map Computability and Logic.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
Great Theoretical Ideas in Computer Science.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
Great Theoretical Ideas in Computer Science.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
1 Finite Model Theory Lecture 1: Overview and Background.
Great Theoretical Ideas in Computer Science.
Incompleteness. System Relativity Soundness and completeness are properties of particular logical systems. There’s no sense to be made of the claim that.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
Chapter 4 Computation Chapter 4: Computation.
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Turing’s Legacy: The Limits Of Computation. Great Theoretical Ideas In Computer Science Anupam GuptaCS Fall 2005 Lecture 26Nov 29, 2005Carnegie.
Payam Seraji IPM-Isfahan branch, Ordibehesht 1396
Self-Reference And Undecidability
Gödel's Legacy: The Limits Of Logics
Discrete Mathematics for Computer Science
Great Theoretical Ideas in Computer Science
Turing’s Legacy: The Limits Of Computation.
Great Theoretical Ideas in Computer Science
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
CSCE 411 Design and Analysis of Algorithms
Thales’ and Gödel’s Legacy: Proofs and Their Limitations
The Limitations of Proofs: An Incompressible Resolution
CS21 Decidability and Tractability
MA/CSSE 474 More Math Review Theory of Computation
Great Theoretical Ideas in Computer Science
Introduction to Discrete Mathematics
Class 24: Computability Halting Problems Hockey Team Logo
Turing Machines Everything is an Integer
Presentation transcript:

Thales’ Legacy: What Is A Proof? Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 27April 22, 2004Carnegie Mellon University

Thales Of Miletus (600 BC) Insisted on Proofs! “first mathematician” Most of the starting theorems of geometry. SSS, SAS, ASA, angle sum equals 180,...

So what is a proof?

Intuitively, a proof is a sequence of “statements”, each of which follows “logically” from some of the previous steps.

What are “statements”? What does it mean for one to follow “logically” from another?

Intuitively, statements must take place in some language. Formally, statements will take place in a computable language.

Let S be a computable language over . That is, S ½   and there is a Java program P S (x) that outputs Yes if x 2 S, and outputs No otherwise. S implicitly defines the “syntactically valid” statements of a language.

We define our “language” to be a decidable set of strings S. Any s 2 S is called a STATEMENT or a SYNTACTICALLY VALID string. Before pinning down the notion of “logic”, let’s see some examples of languages in mathematics.

In fact, valid language syntax is typically defined inductively, so it is easy to make a recursive program to recognize the strings considered valid.

Example: Let S be the set of all syntactically well formed statements in Peano Arithmetic. 8 x Sx = x 8 x Sx = SX But not: === 8

Valid Peano Syntax. Exp -> 0 | S (Exp) V = x 1, x 2, x 3, … Statement -> E=E 9 V (Statement) 8 V (statement) (statement) Æ (statement) : (statement)

Recursive Program ValidPeano(s) return True if any of the following: S has form 8 x (T) and Valid P roof(T) S has form …..

Example: Let S be the set of all syntactically well formed statements in propositional logic. X Ç : X XY Æ Y But not: Æ X Æ Y

Example: Let S be the set of all syntactically well formed statements in first- order logic. 8 x P(x) 8 x 9 y 8 z f(x,y,z) = g(x,y,z)

Example: Let S be the set of all syntactically well formed statements Euclidean Geometry.

Now we have a way to precisely define what it means to set forth a syntactically valid set of statements in a “language”. What is “logic” and what is “meaning”?

In fact, we will continue to ignore “meaning” and pin down our concepts in purely symbolic (syntactic) terms.

We have a computable set of “statements” S. Fix any single computable logic function: Logic S (x,y) = Yes/No If Logic(x,y) = Yes, we say that y is implied by x.

In fact, let’s expand the inputs space of our logic function to include a “start statement”  not in S. Logic S ( ,S) = Yes will mean that our logic views S as an axiom.

A sequence of statements s 1, s 2, …, s n is a VALID PROOF of statement Q in LOGIC S iff LOGIC( , s 1 ) = True And for n+1> i>1 LOGIC (s i-1,s i ) = True s_n = Q

Notice that our notion of “valid proof” is purely symbolic. In fact, we can make a proofcheck machine to read it and gives a VLID/INVALID answer.

Let S be a set of statements. Let L be a logic function. PROVABLE S,L = All Q 2 S for which there is a valid proof of Q in logic L

Example: SILLY FOO FOO 1 S = All strings. L = All pairs of the form: s 2 S PROVABLE S,L is the set of all strings.

Example: SILLY FOO FOO 2 S = All strings. L =,, and All pairs of the form: or PROVABLE S,L is the set of all strings.

Example: SILLY FOO FOO 3 S = All strings. L =,, and All pairs of the form: or PROVABLE S,L is the set of all strings with a zero parity.

Example: SILLY FOO FOO 4 S = All strings. L =,, and All pairs of the form: or PROVABLE S,L is the set of all strings.

Example: Propositional Logic S = All well-formed formulas in the notation of Boolean algebra. L = Two formulas are one step apart if one can be made from the other from a finite list of forms. (hopefully) PROVABLE S,L is the set of all formulas that are tautologies in propositional logic.

We know what valid syntax is, what logic, proof, and theorems are …. Where does “truth” and “meaning” come in it?

Let S be any computable language. Let TRUTH S be any fixed function from S to {T, F}. We will say that we have a “truth concept” associated with the strings in S.

The world of mathematics has certain established truth concepts associated with logical statements.

Let A(x 1, x 2,.., x n ) be a syntactically valid Boolean proposition. TRUTH prop logic (A) is T iff any setting of the variables evaluates to true. A would be called a tautology.

GENERAL PICTURE: A decidable set of statements S. A (possibly incomputable) Truth concept TRUTH_S: S  {True, False}

We work in logics that we think are related to our truth concepts….. A (possibly incomputable) Truth concept TRUTH_S: S  {True, False}

A logic is “sound” for a truth concept if everything it proves is true according to the truth concept.

L is SOUND for TRUTH S if L( , A) = true ) TRUTH(A)= True L(B,C)=true and TRUTH(B)=True ) TRUTH(C)=True

If L is sound for TRUTH S Then L proves C ) TRUTH S (C) = yes

L is sound for TRUTH S means that L can’t prove anything false for the truth concept TRUTH.

Boolean algebra is SOUND for the truth concept of propositional tautology. High school algebra is SOUND for the truth concept of algebraic equivalence.

SILLY FOO FOO 3 is SOUND for the truth concept of an even number of ones.

Euclidean Geometry is SOUND for the truth concept of facts about points and lines in the Euclidean plane. Peano Arithmetic is SOUND for the truth concept of (first order) number facts about Natural numbers.

A logic may be SOUND but it still might not be complete. A logic is “complete” if it can prove every statement that is True in the truth concept.

SOUND: PROVABLE S,L ½ TRUTH S COMPLETE: TRUTH S ½ PROVABLE S,L

SOUND: PROVABLE S,L ½ TRUTH S COMPLETE: TRUTH S ½ PROVABLE S,L Ex: Axioms of Euclidean Geometry are known to be sound and complete for the truths of line and point in the plane.

SOUND: PROVABLE S,L ½ TRUTH S COMPLETE: TRUTH S ½ PROVABLE S,L SILLY FOO FOO 3 is sound and complete for the truth concept of strings having an even number of 1s.

Example: SILLY FOO FOO 3 S = All strings. L =,, and All pairs of the form: or PROVABLE S,L is the set of all strings with a zero parity.

What is a proof? A language. A truth concept. A logic that is sound (maybe even complete) for the truth concept.

What is a proof? A language. A truth concept. A logic that is sound (maybe even complete) for the truth concept. An ENUMERABLE list of PROVABLE THEOREMS in the logic.

A set S is Recursively Enumerable if its elements can be printed out by a computer program. In other words: There is a program LIST S that outputs a list of strings separated by spaces, and such that an element is on the list if and only if it is in S.

SUPER IMPORTANT Let F be any logic. We can write a program to enumerate the provable theorems of F.

Listing THEOREMS F k;=0; For sum = 0 to forever do {Let PROOF loop through all strings of length k do {Let STATEMENT loop through strings of length <k do If proofcheck(STATEMENT, PROOF) = valid, output STATEMENT k ++ } }

Whatever the details of our proof system, an inherent property of any proof system is that its theorems are recursively enumerable

Recall: SELF-REFERENCE Theorem: God is not omnipotent. Proof: Let S be the statement “God can’t make a rock so heavy that he can’t lift it.”. If S is true, then there is something God can’t do, and is hence not omnipotent. If S is false, then God can’t lift the rock

Alan Turing ( )

THEOREM: There is no program to solve the halting problem (Alan Turing 1937) Suppose a program HALT, solving the halting problem, existed: HALT(P)= yes, if P(P) halts HALT(P)= no, if P(P) does not halt We will call HALT as a subroutine in a new program called CONFUSE.

CONFUSE(P): If HALT(P) then loop_for_ever Else return (i.e., halt) Does CONFUSE(CONFUSE) halt? YES implies HALT(CONFUSE) = yes thus, CONFUSE(CONFUSE) will not halt NO implies HALT(CONFUSE) = no thus, CONFUSE(CONFUSE) halts

CONFUSE(P): If HALT(P) then loop_for_ever Else return (i.e., halt) Does CONFUSE(CONFUSE) halt? YES implies HALT(CONFUSE) = yes thus, CONFUSE(CONFUSE) will not halt NO implies HALT(CONFUSE) = no thus, CONFUSE(CONFUSE) halts CONTRADICTIO N

K = { P | P(P) halts } K is an undecidable set. There is no procedure running on an ideal machine to give yes/no answers for all questions of the form “x 2 K?”

Self-Reference Puzzle Write a program that prints itself out as output. No calls to the operating system, or to memory external to the program.

Auto_Cannibal_Maker Write a program AutoCannibalMaker that takes the text of a program EAT as input and outputs a program called SELF EAT. When SELF EAT is executed it should output EAT(SELF EAT ). For any (input taking) program: EAT AutoCannibalMaker(EAT) = SELF EAT SELF EAT is a program taking no input. When executed SELF EAT should output EAT(SELF eat )

Auto Cannibal Maker Suppose Halt with no input was programmable in JAVA. Write a program AutoCannibalMaker that takes the text of a program EAT as input and outputs a program called SELF EAT. When SELF EAT is executed it should output EAT(SELF EAT ) Let EAT(P) = halt, if P does not halt loop forever, otherwise. What does SELF EAT do? Contradiction! Hence EAT does not have a corresponding JAVA program.

Theorems of F Define the set of provable theorems of F to be the set: THEOREMS F = { STATEMENT 2  * | 9 PROOF 2  *, proofcheck F (STATEMENT, PROOF) = valid }

Example: Euclid and ELEMENTS. We could write a program ELEMENTS to check STATEMENT, PROOF pairs to determine if PROOF is a sequence, where each step is either one logical inference, or one application of the axioms of Euclidian geometry. THEOREMS ELEMENTS is the set of all statement provable from the axioms of Euclidean geometry.

Example: Set Theory and SFC. We could write a program ZFC to check STATEMENT, PROOF pairs to determine if PROOF is a sequence, where each step is either one logical inference, or one application of the axioms of Zermilo Frankel Set Theory, as well as, the axiom of choice. THEOREMS ZFC is the set of all statement provable from the axioms of set theory.

Example: Peano and PA. We could write a program PA to check STATEMENT, PROOF pairs to determine if PROOF is a sequence, where each step is either one logical inference, or one application of the axioms of Peano Arithmetic THEOREMS PA is the set of all statement provable from the axioms of Peano Arithmetic

Listing THEOREMS F k;=0; For sum = 0 to forever do {Let PROOF loop through all strings of length k do {Let STATEMENT loop through strings of length <k do If proofcheck(STATEMENT, PROOF) = valid, output STATEMENT k ++ } }

Whatever the details of our proof system, an inherent property of any proof system is that its theorems are recursively enumerable

Language and Meaning By a language, we mean any syntactically defined subset of  * By truth value, we mean a SEMANTIC function that takes expressions in the language to TRUE or FALSE.

Truths of Natural Arithmetic ARITHMETIC _TRUTH = All TRUE expressions of the language of arithmetic (logical symbols and quantification over Naturals).

Truths of Euclidean Geometry EUCLID _TRUTH = All TRUE expressions of the language of Euclidean geometry.

Truths of JAVA program behavior. JAVA _TRUTH = All TRUE expressions of the form program P on input X will output Y, or program P will/won’t halt.

TRUTH versus PROVABILITY Let L be a language L, with a well defined truth function. If proof system F proves only true statements in the language, we say that F is SOUND. If F proves all statements in language, we say that F is COMPLETE.

TRUTH versus PROVABILITY Happy News: THEOREMS ELEMENTS = EUCLID_TRUTH The ELEMENTS are SOUND and COMPLETE for geometry.

TRUTH versus PROVABILITY THEOREMS PA is a proper subset of ARITHMETIC_TRUTH PA is SOUND. PA is not COMPLETE.

TRUTH versus PROVABILITY FOUNDATIONAL CRISIS: It is impossible to have a proof system F such that THEOREMS F = ARITHMETIC_TRUTH F is SOUND will imply F is INCOMPLETE for arithmetic.

JAVA_TRUTH is not R.E. Assume a program LIST enumerates JAVA_TRUTH. We can now make a program Halt(P) Run list until one of the two statements appears: “P(P) halts”, or “P(P) does not halt”. Output the appropriate answer. Contradiction of undecidability of K.

JAVA_TRUTH has no proof system.. There is no proof system for JAVA T RUTH. Let F be any proosystem. There must be a program LIST to enumerate THROEMS F. THEOREM F is R,E. JAVA_TRUTH is not R.E. So THEOREMS F  JAVA_TRUTH

Whatever the details of our proof system, an inherent property of any proof system is that its theorems are recursively enumerable

JAVA_TRUTH is not recursively enumerable. Hence, JAVA_TRUTH has no sound and complete proof system.

ARITHEMTIC_TRUTH is not recursively enumerable. Hence, ARITHMETIC_TRUTH has no sound and complete proof system!!!!

Hilbert’s Question [1900] Is there a foundation for mathematics that would, in principle, allow us to decide the truth of any mathematical proposition? Such a foundation would have to give us a clear procedure (algorithm) for making the decision.

Foundation F Let F be any foundation for mathematics: F is a proof system that only proves true things [Soundness] The set of valid proofs is computable. [There is a program to check any candidate proof in this system]

INCOMPLETENESS Let F be any attempt to give a foundation for mathematics We will construct a statement that we will all believe to be true, but is not provable in F.

CONFUSE F (P) Loop though all sequences of symbols S If S is a valid F-proof of “P halts”, then LOOP_FOR_EVER If S is a valid F-proof of “P never halts”, then HALT

GODEL F GODEL F = AUTO_CANNIBAL_MAKER(CONFUSE F ) Thus, when we run GODEL F it will do the same thing as: CONFUSE F (GODEL F )

GODEL F Can F prove GODEL F halts? Yes -> CONFUSE F (GODEL F ) does not halt Contradiction Can F prove GODEL F does not halt? Yes -> CONFUSE F (GODEL F ) halts Contradiction

GODEL F F can’t prove or disprove that GODEL F halts. GODEL F = CONFUSE F (GODEL F ) Loop though all sequences of symbols S If S is a valid F-proof of “GODEL F halts”, then LOOP_FOR_EVER If S is a valid F-proof of “GODEL F never halts”, then HALT

GODEL F F can’t prove or disprove that GODEL F halts. Thus CONFUSE F (GODEL F ) = GODEL F will not halt. Thus, we have just proved what F can’t. F can’t prove something that we know is true. It is not a complete foundation for mathematics.

CONCLUSION No fixed set of assumptions F can provide a complete foundation for mathematical proof. In particular, it can’t prove the true statement that GODEL F does not halt.

Gödel/Turing: Any statement S of the form “Program P halts on input x” can be easily translated to an equivalent statement S’ in the language of Peano Arithmetic. I.e, S is true if and only if S’ is true. Hence: No mathematical domain that contains (or implicitly expresses) Peano Arithmetic can have a complete foundation.

GÖDEL’S INCOMPLETENESS THEOREM In 1931, Gödel stunned the world by proving that for any consistent axioms F there is a true statement of first order number theory that is not provable or disprovable by F. I.e., a true statement that can be made using 0, 1, plus, times, for every, there exists, AND, OR, NOT, parentheses, and variables that refer to natural numbers.

So what is mathematics? We can still have rigorous, precise axioms that we agree to use in our reasoning (like the Peano Axioms, or axioms for Set Theory). We just can’t hope for them to be complete. Most working mathematicians never hit these points of uncertainty in their work, but it does happen!

ENDNOTE You might think that Gödel’s theorem proves that are mathematically capable in ways that computers are not. This would show that the Church-Turing Thesis is wrong. Gödel’s theorem proves no such thing!

We can talk about this over coffee.