utomated Reasoning 2 What is automated reasoning? In one sense we'll interpret our title narrowly: we are interested in reasoning in logic and mathema

Similar documents
The LCF Approach to Theorem Proving

An overview of automated reasoning

02 The Axiomatic Method

Bootstrapping Mathematics

Lectures on Computational Type Theory

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

Automated Reasoning and its Applications

07 Practical Application of The Axiomatic Method

Formalizing Mathematics

What is logic, the topic of this course? There are at least two answers to that question.

A Complete Proof of the Robbins Conjecture

The Calculus of Inductive Constructions

Introduction. Pedro Cabalar. Department of Computer Science University of Corunna, SPAIN 2013/2014

Theorem Proving for Verification

Interactive Theorem Proving in Industry

cse541 LOGIC FOR COMPUTER SCIENCE

Formal Verification of Mathematical Algorithms

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

Automata Theory. Definition. Computational Complexity Theory. Computability Theory

Logic in Computer Science. Frank Wolter

The Legacy of Hilbert, Gödel, Gentzen and Turing

LCF + Logical Frameworks = Isabelle (25 Years Later)

Intel s Successes with Formal Methods

Computational Logic and the Quest for Greater Automation

On some Metatheorems about FOL

The roots of computability theory. September 5, 2016

The Reflection Theorem

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Church s undecidability result

Chapter 2: Introduction to Propositional Logic

IST 4 Information and Logic

Propositions as Types

Little Engines of Proof: Lecture 1

MAGIC Set theory. lecture 2

Computer Science and Logic A Match Made in Heaven

Why is the Universe Described in Mathematics? This essay attempts to address the questions, "Why is the Universe described in

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

Propositional and Predicate Logic - XIII

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

Mathematical Logic. Introduction to Reasoning and Automated Reasoning. Hilbert-style Propositional Reasoning. Chiara Ghidini. FBK-IRST, Trento, Italy

IST 4 Information and Logic

COMP4418, 2017 Assignment 1

The Limit of Humanly Knowable Mathematical Truth

M.Burgin Department of Mathematics University of California, Los Angeles Los Angeles, CA 90095

A Little History Incompleteness The First Theorem The Second Theorem Implications. Gödel s Theorem. Anders O.F. Hendrickson

The Search for the Perfect Language

Computer-Checked Meta-Logic

02 Propositional Logic

CITS2211 Discrete Structures Proofs

(ADVANCED) PROOF AND COMPUTATION. Semester II 2015/ Introduction

NONSTANDARD MODELS AND KRIPKE S PROOF OF THE GÖDEL THEOREM

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

Informal Statement Calculus

Introduction to Metalogic

Models. Models of Computation, Turing Machines, and the Limits of Turing Computation. Effective Calculability. Motivation for Models of Computation

1. A motivation for algebraic approaches to logics

Propositional and Predicate Logic. jean/gbooks/logic.html

Automated theorem proving in algebra

Main Issues in Computer Mathematics. Henk Barendregt Brouwer Institute Radboud University Nijmegen, The Netherlands

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

Lectures on The Lambda Calculus (I)

An Introduction to Gödel s Theorems

Herbrand Theorem, Equality, and Compactness

Gödel s Proof. Henrik Jeldtoft Jensen Dept. of Mathematics Imperial College. Kurt Gödel

Andrew Schumann, Roman Murawski Is the Polish Logic One of the Best Traditions Still? Studia Humana nr 3/4, 78-82

Introducing Proof 1. hsn.uk.net. Contents

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

Industrial revolution and reform of mathematics

The Mechanization of Mathematics

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

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

NICTA Advanced Course. Theorem Proving Principles, Techniques, Applications. Gerwin Klein Formal Methods

MATH10040: Chapter 0 Mathematics, Logic and Reasoning

Cogito ergo sum non machina!

Marie Duží

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

COMP 2600: Formal Methods for Software Engineeing

Axiomatic set theory. Chapter Why axiomatic set theory?

Obsevations, Truth and Logic

ILP = Logic, CS, ML Stop counting, start reasoning

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

CSCI3390-Lecture 6: An Undecidable Problem

Building a Computer Adder

Logic: The Big Picture

CMPS 217 Logic in Computer Science. Lecture #17

Math 144 Summer 2012 (UCR) Pro-Notes June 24, / 15

Lecture Notes for MATH Mathematical Logic 1

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

The Arithmetic of Reasoning. Chessa Horomanski & Matt Corson

The Nature of Natural Numbers - Peano Axioms and Arithmetics: A Formal Development in PowerEpsilon

Chapter 11: Automated Proof Systems

Formal Theorem Proving and Sum-of-Squares Techniques

The Independence of Peano's Fourth Axiom from. Martin-Lof's Type Theory without Universes. Jan M. Smith. Department of Computer Science

Gödel s Incompleteness Theorems

Interactive Theorem Provers

COEN6551: Formal Hardware Verification

Using Mathematica 3 to Understand the Computer Proof of the Robbins Conjecture. 1. The Robbins Conjecture A Brief History

Knowledge Representation and Classical Logic

Write your own Theorem Prover

Transcription:

utomated Reasoning 1 utomated Reasoning John Harrison University of Cambridge What is automated reasoning? utomatic vs. interactive. Successes of the I and logic approaches Development of formal logic History of automated reasoning Verication Current research topics

utomated Reasoning 2 What is automated reasoning? In one sense we'll interpret our title narrowly: we are interested in reasoning in logic and mathematics, rather than everyday life. The eld is also called automated theorem proving. In another sense we interpret it broadly: we don't just consider making computers prove theorems automatically, but also ways in which they can support humans. The correct title might be mechanized theorem proving. We'll divide the discussion into (fully) automatic systems, and interactive systems.

utomated Reasoning 3 The limits of automated reasoning It's almost certainly impossible, even in principle, that a computer can prove automatically all the mathematical theorems we are interested in. This follows from Tarski's theorem on the undenability of truth (1936), which implies that the set of true facts of arithmetic is not even semicomputable. However we can set up logical systems that are capable of deducing many, perhaps most, interesting theorems, such that the set of logically valid formulas is at least semicomputable. For example, the system of Zermelo-Fraenkel set theory based on rst order logic has this property. But this doesn't include all true facts (Godel 1930, also a corollary to Tarski's theorem). nd it is still not computable.

utomated Reasoning 4 Decidable systems In fact, for some limited areas of mathematics or logic, there are systems for which validity is actually computable. simple example is propositional logic. We can decide if :(p _ q) ) :p ^ :q is valid simply by considering cases, e.g. writing a truth table. For a more interesting example, the rst order theory of reals with multiplication is decidable (Tarski 1948). This theory includes many nontrivial problems. In general, note that a system that is complete and semicomputable is also computable. (This follows from a classic theorem in computability theory that if a set and its complement are both RE, the set is recursive.)

utomated Reasoning 5 Down to earth Despite these promising facts, two similar problems remain. 1. Even if a theory is decidable in principle, the time or space usage of the decision procedure may make it ineective in practice. This applies to the rst order theory of reals, for example. 2. In systems where validity is semicomputable, we just have to keep searching until we nd the theorem. This is also impractical in many cases; typically, we use ingenious tricks to cut down the search space. The tricks are usually drawn either from looking at human behaviour or considering theorems from logicians. There was (is?) still a controversy over whether the human-oriented `I' approach or the `logic' approach is better.

utomated Reasoning 6 theorem in geometry One of the early successes in automated theorem proving (the I side) was the proof of the following theorem: B C If the sides B and C are equal (i.e. the triangle is isoseles), then the angles BC and CB are equal.

utomated Reasoning 7 The usual proof The usual proof proceeds by dropping a perpendicular down from the point to the side BC, meeting it at a point D: B D C and then using the fact that the triangles BD and CD are congruent.

utomated Reasoning 8 The computer's proof The computer found an ingenious proof which had been missed by most writers on geometry (though it had already been used by Pappus). B C Simply, the triangles BC and CB are congruent. Q.E.D.

utomated Reasoning 9 The Robbins Conjecture (1) very recent success in automated reasoning, this time on the logic side, was the proof by McCune's program EQP of the Robbins Conjecture. Huntington (1933) presented the following basis for Boolean algebra: x + y = y + x (x + y) + z = x + (y + z) n(n(x) + y) + n(n(x) + n(y)) = x Shortly thereafter, Herbert Robbins conjectured that the Huntington equation can be replaced with a simpler one: n(n(x + y) + n(x + n(y))) = x

utomated Reasoning 10 The Robbins Conjecture (2) This conjecture went unproved for more that 50 years, despite being studied by many mathematicians, even including Tarski. It because a popular target for researchers in automated reasoning. In May 1996, it was claimed that a proof had been found automatically using the REVEL prover. However this was traced to a bug in REVEL. The in October 1996 a correct proof was found by McCune's program EQP. The successful search took about 8 days on an RS/6000 processor and used about 30 megabytes of memory.

utomated Reasoning 11 Origins of mechanization The idea of mechanizing reasoning in a manner similar to arithmetic calculation is an old one, going back at least to Hobbes. Reason [... ] is nothing but Reckoning. For as rithmeticians teach to adde and subtract in numbers [...] The Logicians teach the same in consequences of words [...] nd as in rithmetique, unpractised men must, and Professors themselves may often erre, and cast up false; so also in any other subject of Reasoning the ablest, most attentive, and most practised men, may deceive themselves, and inferre false conclusions. Leibniz envisaged a calculus ratiocinator. First however we need a characteristica universalis.

utomated Reasoning 12 Development of formal logic We can highlight several important phases in the development of formal logic. The Socratic method ristotle's syllogisms Leibniz's attempts at a characteristica Boole's algebra of logic Frege's Begrisschrift Peano's Formulaire Russell and Whitehead's Principia Mathematica. Hilbert's programme Metamathematical studies (Godel, Tarski, Church, Turing,... )

utomated Reasoning 13 Early computer experiments The earliest uses of computers in theorem proving were in the late 50s and early 60s. mong the pioneers were: Newell and Simon (I) Gelentner's geometry machine (I) Gilmore (logical) Wang (logical) Prawitz (logical) The logical approach proved successful, but soon reached its limits. Prawitz's method is quite close to modern tableaux provers. But more powerful methods were needed.

utomated Reasoning 14 More recent methods The two most ecient general rst order theorem proving methods were invented in the 60s. Resolution, invented by lan Robinson, is a bottom-up, local, proof method based on a single, very simple, inference rule: p _ q :p q Model elimination, invented by Donald Loveland, is a top-down, global, proof method which in many versions is quite similar to Prolog. These are still the big two methods today, represented by SETHEO (from Munich) and Otter (from Chicago), probably the most powerful general rst order provers at present.

utomated Reasoning 15 Logical foundations Tableaux, model elimination and resolution all rely on a number of fundamental theorems in logic, due to Godel, Skolem, Gentzen, Herbrand and others. The most important is the `uniformity theorem', also called the Skolem-Godel-Herbrand theorem, which states that if: 9x 1 ; : : : ; xn: P [x 1 ; : : : ; xn] is valid then there are terms such that the following is too: P [t 1 1 ; : : : ; t1 n] P [t k 1 ; : : : ; tk n] This can be proved either by semantic or syntactic means. In the latter version it is properly known as Herbrand's theorem.

utomated Reasoning 16 Obviousness problem with automation is that what humans and computers nd obvious are not the same. For example computers nd: (8x y z: P (x; y) ^ P (y; z) ) P (x; z)) ^ (8x y z: Q(x; y) ^ Q(y; z) ) Q(x; z)) ^ (8x y: Q(x; y) ) Q(y; x)) ^ (8x y: P (x; y) _ Q(x; y)) ) (8x y: P (x; y)) _ (8x y: Q(x; y)) very obvious, but most people need to think about it. Conversely, most people nd McCarthy's `mutilated checkerboard' obvious (when shown the trick) but computers have trouble. Computers are really oriented towards `logical' obviousness.

utomated Reasoning 17 The Boyer-Moore Prover Boyer and Moore's NQTHM is unusual in that it doesn't work in pure logic. Instead it uses a very simple system of `primitive recursive arithmetic' (Skolem, Goodstein). It has the remarkable ability to do proofs by induction automatically. These properties make it much more useful in many real situations than provers for pure logic. It has been used for many impressive applications, mainly in verication, which we consider later. It is fully automatic. Nevertheless, the user still has to guide it in some way by selecting a sequence of lemmas. nd there is not much control over what it does.

utomated Reasoning 18 Interactive theorem proving Given the limitations of automation, why not build systems to combine automation with human control and guidance? There were pioneering attempts in the SM (semi-automated mathematics) project. Other pioneering proof checkers appeared in the 70s: UTOMTH (de Bruijn) Mizar (Trybulec et al.) Stanford LCF (Milner) However, these tended to be tedious to use. What was needed was a better mix of automation with the manual controllability.

utomated Reasoning 19 Edinburgh LCF One of the most important developments in theorem proving was the development of Edinburgh LCF (Milner et al.) This provides low-level security, and at the same time, programmability. The user can write completely arbitrary procedures in the ML programming language. t the same time, inside the machine, everything happens by simple primitive inferences. Many descendants including HOL (Gordon), Isabelle (Paulson), Coq (Huet et al.) and Nuprl (Constable et al.)

utomated Reasoning 20 Formalized Mathematics One application of theorem provers is to check large bodies of existing mathematics, making them completely formal. Peano started such a project with his Formulaire but did not really formalize proofs. Bourbaki seems to believe in formalization `in principle', but not in practice. However with the help of the computer we can actually achieve formalization. The most impressive example is the Mizar project. There is a recent proposal for a QED Project to extend this formalization much further.

utomated Reasoning 21 Verication The idea of verication is to make sure computer systems (hardware, software) work correctly by formal verication of the design. It is a more systematic approach than testing. It's important to understand exactly what this means. 1. The informal requirements 2. Formal specication 3. Model of the implementation 4. ctual implementation We try to link levels 2 and 3. The connections between 1 and 2 and between 3 and 4 are informal, though we can try hard to make them small.

utomated Reasoning 22 Conclusions We can draw the following conclusions: utomated reasoning is one of the most interesting applications of symbolic processing. It is also a controlled testground for ideas from rticial Intelligence. There is much research waiting to be done. Many problems have not been solved and there are many competing and completely dierent theorem provers in the world. The formalization of mathematics seems to be an interesting project, with particular value for education. It may be that theorem proving is the way to make the next generation of computer systems more reliable.

utomated Reasoning 23 Postscript theorem prover in 6 lines of Prolog (Beckert and Possega): prove(fml,varlim) :- nonvar(varlim),!,prove(fml,[],[],[],varlim). prove(fml,result) :- iterate(varlim,1,prove(fml,[],[],[],varlim),result). prove_uv(fml,varlim) :- nonvar(varlim),!,prove(fml,[],[],[],[],[],varlim). prove_uv(fml,result) :- iterate(varlim,1,prove(fml,[],[],[],[],[],varlim),result). iterate(current,current,goal,current) :- nl, write('limit = '), write(current),nl, Goal. iterate(varlim,current,goal,result) :- Current1 is Current + 1, iterate(varlim,current1,goal,result).