The Big Proof Agenda=1 Supported by SRI International
Total Page:16
File Type:pdf, Size:1020Kb
The Big Proof Agenda1 N. Shankar Computer Science Laboratory SRI International Menlo Park, CA June 26, 2017 1 Supported by SRI International. Proofs and Machines In science nothing capable of proof ought to be accepted without proof. |Richard Dedekind The development of mathematics toward greater precision has led, as is well known, to the formalization of large tracts of it, so one can prove any theorem us- ing nothing but a few mechanical rules. {Kurt G¨odel Natarajan Shankar Pragmatics of Formal Proof 2/33 Proofs and Machines Checking mathematical proofs is potentially one of the most interesting and useful applications of automatic computers. |John McCarthy Science is what we understand well enough to explain to a computer. Art is everything else we do. |Donald Knuth Natarajan Shankar Pragmatics of Formal Proof 3/33 Overview Mathematics is the study of abstractions such as collections, maps, graphs, algebras, sequences, etc. It has been \unreasonably effective” as a language and a foundation for a growing number of other disciplines. Proofs are used to rigorously derive irrefutable conclusions using a small number of `self-evident' principles of reasoning. Formal proofs can be constructed from a small number of precisely stated axioms and rules of inference. Proof Assistants, Decision Procedures, And Theorem Provers make it possible to construct formal proofs and formally verify mathematical claims. The goal of the INI Big Proof program is to define the future direction of proof technology so that it is used by Mathematicians to discover and verify new results Educators to communicate proofs and problems solving techniques Natarajan Shankar Pragmatics of Formal Proof 4/33 In the Beginning Thales of Miletus (624 { 547 B.C.): Earliest known person to be credited with theorems and proofs. It was Thales who first conceived the principle of explaining the multitude of phenomena by a small number of hy- potheses for all the various manifesta- tions of matter. Pythagoras of Samos (569{475 B.C.): Sys- tematic study of mathematics for its own sake. ... he tried to use his symbolic method of teaching which was similar in all respects to the lessons he had learnt in Egypt. The Samians were not very keen on this method and treated him in a rude and improper manner. Natarajan Shankar Pragmatics of Formal Proof 5/33 The Axiomatic Method Plato (427{347 B.C.): Suggested the idea of a single axiom system for all knowledge. the reality which scientific thought is seek- ing must be expressible in mathematical terms, mathematics being the most pre- cise and definite kind of thinking of which we are capable. Aristotle (384{322 B.C.) of Stagira: Laid the foun- dation for scientific thought by proposing that all theoretical disciplines must be based on axiomatic principles. Natarajan Shankar Pragmatics of Formal Proof 6/33 Euclid and The Elements Euclid of Alexandria (325{265 B.C.): Systematic compila- tion and exposition of geometry and number theory. 1 A straight line segment can be drawn joining any two points. 2 Any straight line segment can be extended indefinitely in a straight line. 3 Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center. 4 All right angles are congruent. 5 If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough. This postulate is equivalent to what is known as the parallel postulate. Natarajan Shankar Pragmatics of Formal Proof 7/33 Euclid's Pons Asinorum [Wikipedia] Charles Dodgson, quoted in Ian Stewart, Concepts of Modern Mathematics: MINOS: It is proposed to prove [the theorem] by taking up the isosceles triangle, turning it over, and then lay- ing it down again upon itself. EUCLID: Surely that has too much of the Irish Bull about it, and reminds one a little too vividly of the man who walked down his own throat, to de- serve a place in a strictly philosophi- cal treatise? MINOS: I suppose its defenders would say that it is conceived to leave a trace of itself behind and the re- versed triangle is laid down on the trace so left. Natarajan Shankar Pragmatics of Formal Proof 8/33 Mechanizing Reasoning: Llull and Leibniz Ramon Llull (1235{1316): Talked of reducing all knowl- edge to first principles. Developed a symbolic notation (Ars Magna) and conceived of a reasoning machine. When he attempted to apply rational thinking to religion, Pope Gregor XI \accused him of confusing faith with reason and condemned his teachings." Gottfried Leibniz (1646{1716) The idea of a formal lan- guage (characteristica universalis) for expressing scholarly knowledge and a mechanical method for making deductions (calculus ratiocinator). What must be achieved is in fact this: that every paralogism be recognized as an error of calculation, and every sophism when expressed in this new kind of notation, appear as a solecism or barbarism, to be corrected easily by the laws of this philosophical grammar. Once this is done, then when a controversy arises, disputa- tion will no more be needed between two philosophers than between two computers. It will suffice that, pen in hand, they sit down to their abacus and (calling in a friend, if they so wish) say to each other: let us calculate. Natarajan Shankar Pragmatics of Formal Proof 9/33 Formal Arithmetic Richard Dedekind (1813{1916) : Early set theoretic ideas, infinite sets, Dedekind cuts, arithmetic. Giuseppe Peano (1858{1932) : Modern logic notation, arithmetic. 0 6= S(x) S(x) = S(y) =) x = y A(0) ^ (8x:A(x) =) A(S(x))) =) (8x:A(x)) Natarajan Shankar Pragmatics of Formal Proof 10/33 Set Theory Georg Cantor (1845{1918): Set theory, transfinite sets, continuum hypothesis. Ernst Zermelo (1871{1953): For- malized set theory, axiom of choice, well-ordering principle. Extensionality: x = y () (8z:z 2 x () z 2 y) Empty set 8x::x 2 ; Pairing: 8x; y:9z:8u:u 2 z () u = x _ u = y Union: 8x:9y:8z:z 2 y () (9w:z 2 w ^ w 2 x) Separation: fx 2 yjAg, for any formula A, y 62 vars(A). Infinity: There is a set containing all the finite ordinals. Power set: For any set, we have the set of all its subsets. Natarajan Shankar Pragmatics of Formal Proof 11/33 Modern Formal Logic Gottlob Frege (1848{1925): A system of quantifi- cational logic. Bertrand Russell (1872{1970) and Al- fred North Whitehead (1861{1947): Ramified type theory, rigorous formal development of a significant portion of mathematics. ()i is the type of propositions of order i. i1 im i (τ1 ; : : : ; τm ) with i > max(i1;:::; in), is the type of propositional functions from τ1 × ::: × τm, possibly quantifying over variables of order below i. Natarajan Shankar Pragmatics of Formal Proof 12/33 Simple Type Theory Kurt G¨odel(1906{1978): Completeness: Every statement has a counter-model or a proof. Incompleteness: Any consistent formal theory for arithmetic contains statements that are nei- ther provable nor disprovable. Such a theory cannot prove its own consistency. Alonzo Church (1909{1995): Lambda calculus, recursive unsolvability, Church's thesis, simple type theory. The types of individuals i and propositions o at level 0 The function type A!B is a type at level n + 1 if A is a type at level at most n and B is a type at level at most n + 1. Natarajan Shankar Pragmatics of Formal Proof 13/33 Computing Machinery and Intelligence Turing Machine (TM) as a finite state machine scanning and writing an infinite tape. A Universal Turing Machine (UTM) as an interpreter for a given TM on a given input. The unsolvability of the Halting Problem: Does a TM M diverge on an input i? The unsolvability of the Entscheidungsproblem: Is a given sentence in first-order logic valid? Natarajan Shankar Pragmatics of Formal Proof 14/33 The First Automated Reasoner In 1954, Martin Davis programmed a Presburger Arithmetic decision procedure. Its great triumph was to prove that the sum of two even numbers is even. Natarajan Shankar Pragmatics of Formal Proof 15/33 Early Proof Assistants [Automath, LCF, Thm/Nqthm/ACL2] John McCarthy N. G. de Bruijn Woody Bledsoe Robin Milner Bob Boyer J Moore Natarajan Shankar Pragmatics of Formal Proof 16/33 The Language of Formal Mathematics: Recursion ACL2 (1972{present) is based on Primitive Recursive Arithmetic (adapted to Lisp) and is Adequate for formalizing combinatorial mathematics. Supported by impressive mechanization in the form of induction, simplification, and rewriting. (DEFUN REV (X) (IF (ENDP X) NIL (APPEND (REV (CDR X)) (LIST (CAR X))))) (DEFTHM REV_OF_REV (IMPLIES (TRUE-LISTP X) (EQUAL (REV (REV X)) X))) Natarajan Shankar Pragmatics of Formal Proof 17/33 The Language of Formal Mathematics: Higher-Order Logic Church's introduced a simple theory of types consisting of Types: bool, nat, A!B Terms: x, c. =A, λx:a, f a. Peter Andrews in the 1970s used higher-order logic in his theorem prover TPS. HOL, HOL-Light, and Isabelle/HOL use classical higher-order logic based on Church's simple theory of types which Can be interpreted in Zermelo set theory. Captures basic mathematical concepts adequately. Natarajan Shankar Pragmatics of Formal Proof 18/33 The Language of Formal Mathematics: Dependent Higher-Order Logic PVS extends higher-order logic with subtypes (e.g., primes, continuity-preserving operators) and dependent types (e.g., finite sequences) Proof obligations are generated to check that an expression has the expected type. Type checking is undecidable since proof obligations can be arbitrary formulas.