Logic and Proof Computer Science Tripos Part IB

Total Page:16

File Type:pdf, Size:1020Kb

Logic and Proof Computer Science Tripos Part IB Logic and Proof Computer Science Tripos Part IB Lawrence C Paulson Computer Laboratory University of Cambridge [email protected] Copyright c 2015 by Lawrence C. Paulson Contents 1 Introduction and Learning Guide 1 2 Propositional Logic 2 3 Proof Systems for Propositional Logic 5 4 First-order Logic 8 5 Formal Reasoning in First-Order Logic 11 6 Clause Methods for Propositional Logic 13 7 Skolem Functions, Herbrand’s Theorem and Unification 17 8 First-Order Resolution and Prolog 21 9 Decision Procedures and SMT Solvers 24 10 Binary Decision Diagrams 27 11 Modal Logics 28 12 Tableaux-Based Methods 30 i 1 INTRODUCTION AND LEARNING GUIDE 1 1 Introduction and Learning Guide 2008 Paper 3 Q6: BDDs, DPLL, sequent calculus • 2008 Paper 4 Q5: proving or disproving first-order formulas, This course gives a brief introduction to logic, including • resolution the resolution method of theorem-proving and its relation 2009 Paper 6 Q7: modal logic (Lect. 11) to the programming language Prolog. Formal logic is used • for specifying and verifying computer systems and (some- 2009 Paper 6 Q8: resolution, tableau calculi • times) for representing knowledge in Artificial Intelligence 2007 Paper 5 Q9: propositional methods, resolution, modal programs. • logic The course should help you to understand the Prolog 2007 Paper 6 Q9: proving or disproving first-order formulas language, and its treatment of logic should be helpful for • 2006 Paper 5 Q9: proof and disproof in FOL and modal logic understanding other theoretical courses. It also describes • 2006 Paper 6 Q9: BDDs, Herbrand models, resolution a variety of techniques and data structures used in auto- • mated theorem provers. Understanding the various deduc- (Lect. 6–8) tive methods is a crucial part of the course, but in addition 2005 Paper 5 Q9: resolution (Lect. 6, 8, 9) • to this purely mechanical view of logic, you should try to 2005 Paper 6 Q9: DPLL, BDDs, tableaux (Lect. 6, 10, 12) acquire an intuitive feel for logical reasoning. • 2004 Paper 5 Q9: semantics and proof in FOL (Lect. 4, 5) The most suitable course text is this book: • 2004 Paper 6 Q9: ten true or false questions Michael Huth and Mark Ryan, Logic in • Computer Science: Modelling and Reasoning 2003 Paper 5 Q9: BDDs; clause-based proof methods • (Lect. 6, 10) about Systems, 2nd edition (CUP, 2004) 2003 Paper 6 Q9: sequent calculus (Lect. 5) It covers most aspects of this course with the exception of • 2002 Paper 5 Q11: semantics of propositional and first-order resolution theorem proving. It includes material (symbolic • logic (Lect. 2, 4) model checking) that could be useful later. 2002 Paper 6 Q11: resolution; proof systems The following book may be a useful supplement to Huth • and Ryan. It covers resolution, as well as much else relevant 2001 Paper 5 Q11: satisfaction relation; logical equivalences • to Logic and Proof. 2001 Paper 6 Q11: clause-based proof methods; ordered • ternary Mordechai Ben-Ari, Mathematical Logic for decision diagrams (Lect. 6, 10) Computer Science, 2nd edition (Springer, 2001) 2000 Paper 5 Q11: tautology checking; propositional se- • quent calculus (Lect. 2, 3, 10) The following book provides a different perspective on 2000 Paper 6 Q11: unification and resolution (Lect. 8, 9) modal logic, and it develops propositional logic carefully. • Finally available in paperback. 1999 Paper 5 Q10: Prolog resolution versus general resolu- • tion Sally Popkorn, First Steps in Modal Logic (CUP, 1999 Paper 6 Q10: Herbrand models and clause form 2008) • 1998 Paper 5 Q10: BDDs, sequent calculus, etc. (Lect. 3, There are numerous exercises in these notes, and they are • 10) suitable for supervision purposes. Most old examination 1998 Paper 6 Q10: modal logic (Lect. 11); resolution questions for Foundations of Logic Programming (the for- • 1997 Paper 5 Q10: first-order logic (Lect. 4) mer name of this course) are still relevant. As of 2013/14, • Herbrand’s theorem has been somewhat deprecated, still 1997 Paper 6 Q10: sequent rules for quantifiers (Lect. 5) • mentioned but no longer in detail. Some unification the- 1996 Paper 5 Q10: sequent calculus (Lect. 3, 5, 10) ory has also been removed. These changes created space • 1996 Paper 6 Q10: DPLL versus Resolution (Lect. 9) for a new lecture on Decision Procedures and SMT Solvers. • 1995 Paper 5 Q9: BDDs (Lect. 10) 2014 Paper 5 Q5: proof methods for propositional logic: • • 1995 Paper 6 Q9: outline logics; sequent calculus (Lect. 3, BDDs and DPLL • 5, 11) 2014 Paper 6 Q6: decision procedure; resolution with selec- • 1994 Paper 5 Q9: resolution versus Prolog (Lect. 8) tion • 1994 Paper 6 Q9: Herbrand models (Lect. 7) 2013 Paper 5 Q5: DPLL, sequent or tableau calculus • • 1994 Paper 6 Q9: most general unifiers and resolution 2013 Paper 6 Q6: resolution problems • • (Lect. 9) 2012 Paper 5 Q5: (Herbrand: deprecated) • 1993 Paper 3 Q3: resolution and Prolog (Lect. 8) 2012 Paper 6 Q6: sequent or tableau calculus, modal logic, • • BDDs Acknowledgements. Chloë Brown, Jonathan Davies and 2011 Paper 5 Q5: resolution, linear resolution, BDDs • Reuben Thomas pointed out numerous errors in these notes. 2011 Paper 6 Q6: unification, modal logic • David Richerby and Ross Younger made detailed sugges- 2010 Paper 5 Q5: BDDs and models tions. Thanks also to Darren Foong, Thomas Forster, • 2010 Paper 6 Q6: sequent or tableau calculus, DPLL. Note: Simon Frankau, Adam Hall, Ximin Luo, Priyesh Patel, • the formula in the first part of this question should be Steve Payne, Tom Puverle, Max Spencer, Nik Sultana, Ben . x P.x/ Q/ x .P.x/ Q/. Thorner, Tjark Weber and John Wickerson. 9 ! ! 8 ! 2 PROPOSITIONAL LOGIC 2 2 Propositional Logic the meaning of the propositional symbols it contains. The meaning can be calculated using the standard truth tables. Propositional logic deals with truth values and the logical connectives and, or, not, etc. Most of the concepts in propo- AB AA BA BA BA B : ^ _ ! $ sitional logic have counterparts in first-order logic. Here are 1 1 0 1 1 1 1 the most fundamental concepts. 1 0 0 0 1 0 0 0 1 1 0 1 1 0 Syntax refers to the formal notation for writing assertions. 0 0 1 0 0 1 1 It also refers to the data structures that represent asser- tions in a computer. At the level of syntax, 1 2 is a By inspecting the table, we can see that A B is equiv- ! string of three symbols, or a tree with a nodeC labelled alent to A B and that A B is equivalent to .A : _ $ ! + and having two children labelled 1 and 2. B/ .B A/. (The latter is also equivalent to .A B/, where^ !is exclusive-or.) : ⊕ Semantics expresses the meaning of a formula in terms of Note⊕ that we are using t and f in the language as symbols mathematical or real-world entities. While 1 2 and to denote the truth values 1 and 0. The former belongs to C 2 1 are syntactically distinct, they have the same se- syntax, the latter to semantics. When it comes to first-order C mantics, namely 3. The semantics of a logical state- logic, we shall spend some time on the distinction between ment will typically be true or false. symbols and their meanings. We now make some definitions that will be needed Proof theory concerns ways of proving statements, at least throughout the course. the true ones. Typically we begin with axioms and arrive at other true statements using inference rules. Definition 1 An interpretation, or truth assignment, for a Formal proofs are typically finite and mechanical: set of formulas is a function from its set of propositional their correctness can be checked without understand- symbols to 1; 0 . ing anything about the subject matter. An interpretationf g satisfies a formula if the formula eval- uates to 1 under the interpretation. Syntax can be represented in a computer. Proof methods A set S of formulas is valid (or a tautology) if every in- are syntactic, so they can be performed by computer. On terpretation for S satisfies every formula in S. the other hand, as semantics is concerned with meaning, it A set S of formulas is satisfiable (or consistent) if there is exists only inside people’s heads. This is analogous to the some interpretation for S that satisfies every formula in S. way computers handle digital photos: the computer has no A set S of formulas is unsatisfiable (or inconsistent) if it conception of what your photos mean to you, and internally is not satisfiable. they are nothing but bits. A set S of formulas entails A if every interpretation that satisfies all elements of S, also satisfies A. Write S A. jH 2.1 Syntax of propositional logic Formulas A and B are equivalent, A B, provided A B and B A. ' jH Take a set of propositional symbols P, Q, R, :::. A formula jH consisting of a propositional symbol is called atomic. We Some relationships hold among these primitives. Note use t and f to denote true and false. the following in particular: Formulas are constructed from atomic formulas using the S A if and only if A S is inconsistent. logical connectives1 • jH f: g [ If S is inconsistent, then S A for any A. This is an (not) • instance of the phenomenonjH that we can deduce any- : (and) thing from a contradiction. ^ (or) _ (implies) A if and only if A is valid, if and only if A is ! (if and only if) •inconsistent. jH f: g $ These are listed in order of precedence; is highest. We It is usual to write A B instead of A B.
Recommended publications
  • Automated Theorem Proving Introduction
    Automated Theorem Proving Scott Sanner, Guest Lecture Topics in Automated Reasoning Thursday, Jan. 19, 2006 Introduction • Def. Automated Theorem Proving: Proof of mathematical theorems by a computer program. • Depending on underlying logic, task varies from trivial to impossible: – Simple description logic: Poly-time – Propositional logic: NP-Complete (3-SAT) – First-order logic w/ arithmetic: Impossible 1 Applications • Proofs of Mathematical Conjectures – Graph theory: Four color theorem – Boolean algebra: Robbins conjecture • Hardware and Software Verification – Verification: Arithmetic circuits – Program correctness: Invariants, safety • Query Answering – Build domain-specific knowledge bases, use theorem proving to answer queries Basic Task Structure • Given: – Set of axioms (KB encoded as axioms) – Conjecture (assumptions + consequence) • Inference: – Search through space of valid inferences • Output: – Proof (if found, a sequence of steps deriving conjecture consequence from axioms and assumptions) 2 Many Logics / Many Theorem Proving Techniques Focus on theorem proving for logics with a model-theoretic semantics (TBD) • Logics: – Propositional, and first-order logic – Modal, temporal, and description logic • Theorem Proving Techniques: – Resolution, tableaux, sequent, inverse – Best technique depends on logic and app. Example of Propositional Logic Sequent Proof • Given: • Direct Proof: – Axioms: (I) A |- A None (¬R) – Conjecture: |- ¬A, A ∨ A ∨ ¬A ? ( R2) A A ? |- A∨¬A, A (PR) • Inference: |- A, A∨¬A (∨R1) – Gentzen |- A∨¬A, A∨¬A Sequent (CR) ∨ Calculus |- A ¬A 3 Example of First-order Logic Resolution Proof • Given: • CNF: ¬Man(x) ∨ Mortal(x) – Axioms: Man(Socrates) ∀ ⇒ Man(Socrates) x Man(x) Mortal(x) ¬Mortal(y) [Neg. conj.] Man(Socrates) – Conjecture: • Proof: ∃y Mortal(y) ? 1. ¬Mortal(y) [Neg. conj.] 2. ¬Man(x) ∨ Mortal(x) [Given] • Inference: 3.
    [Show full text]
  • A Prolog Technology Theorem Prover: a New Exposition and Implementation in Prolog*
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by Elsevier - Publisher Connector Theoretical Computer Science 104 (1992) 109-128 109 Elsevier A Prolog technology theorem prover: a new exposition and implementation in Prolog* Mark E. Stickel Artificial Intelligence Center, SRI International, Menlo Park, CA 94025, USA Abstract Stickel, M.E., A Prolog technology theorem prover: a new exposition and implementation in Prolog, Theoretical Computer Science 104 (1992) 109-128. A Prolog technology theorem prover (P’ITP) is an extension of Prolog that is complete for the full first-order predicate calculus. It differs from Prolog in its use of unification with the occurs check for soundness, depth-first iterative-deepening search instead of unbounded depth-first search to make the search strategy complete, and the model elimination reduction rule that is added to Prolog inferences to make the inference system complete. This paper describes a new Prolog-based implementation of PTTP. It uses three compile-time transformations to translate formulas into Prolog clauses that directly execute, with the support of a few run-time predicates, the model elimination procedure with depth-first iterative-deepening search and unification with the occurs check. Its high performance exceeds that of Prolog-based PTTP interpreters, and it is more concise and readable than the earlier Lisp-based compiler, which makes it superior for expository purposes. Examples of inputs and outputs of the compile-time transformations provide an easy and precise way to explain how PTTP works. This Prolog-based version makes it easier to incorporate PTTP theorem-proving ideas into Prolog programs.
    [Show full text]
  • Solving the Boolean Satisfiability Problem Using the Parallel Paradigm Jury Composition
    Philosophæ doctor thesis Hoessen Benoît Solving the Boolean Satisfiability problem using the parallel paradigm Jury composition: PhD director Audemard Gilles Professor at Universit´ed'Artois PhD co-director Jabbour Sa¨ıd Assistant Professor at Universit´ed'Artois PhD co-director Piette C´edric Assistant Professor at Universit´ed'Artois Examiner Simon Laurent Professor at University of Bordeaux Examiner Dequen Gilles Professor at University of Picardie Jules Vernes Katsirelos George Charg´ede recherche at Institut national de la recherche agronomique, Toulouse Abstract This thesis presents different technique to solve the Boolean satisfiability problem using parallel and distributed architec- tures. In order to provide a complete explanation, a careful presentation of the CDCL algorithm is made, followed by the state of the art in this domain. Once presented, two proposi- tions are made. The first one is an improvement on a portfo- lio algorithm, allowing to exchange more data without loosing efficiency. The second is a complete library with its API al- lowing to easily create distributed SAT solver. Keywords: SAT, parallelism, distributed, solver, logic R´esum´e Cette th`ese pr´esente diff´erentes techniques permettant de r´esoudre le probl`eme de satisfaction de formule bool´eenes utilisant le parall´elismeet du calcul distribu´e. Dans le but de fournir une explication la plus compl`ete possible, une pr´esentation d´etaill´ee de l'algorithme CDCL est effectu´ee, suivi d'un ´etatde l'art. De ce point de d´epart,deux pistes sont explor´ees. La premi`ereest une am´eliorationd'un algorithme de type portfolio, permettant d'´echanger plus d'informations sans perte d’efficacit´e.
    [Show full text]
  • Logic and Proof
    Logic and Proof Computer Science Tripos Part IB Michaelmas Term Lawrence C Paulson Computer Laboratory University of Cambridge [email protected] Copyright c 2007 by Lawrence C. Paulson Contents 1 Introduction and Learning Guide 1 2 Propositional Logic 3 3 Proof Systems for Propositional Logic 13 4 First-order Logic 20 5 Formal Reasoning in First-Order Logic 27 6 Clause Methods for Propositional Logic 33 7 Skolem Functions and Herbrand’s Theorem 41 8 Unification 50 9 Applications of Unification 58 10 BDDs, or Binary Decision Diagrams 65 11 Modal Logics 68 12 Tableaux-Based Methods 74 i ii 1 1 Introduction and Learning Guide This course gives a brief introduction to logic, with including the resolution method of theorem-proving and its relation to the programming language Prolog. Formal logic is used for specifying and verifying computer systems and (some- times) for representing knowledge in Artificial Intelligence programs. The course should help you with Prolog for AI and its treatment of logic should be helpful for understanding other theoretical courses. Try to avoid getting bogged down in the details of how the various proof methods work, since you must also acquire an intuitive feel for logical reasoning. The most suitable course text is this book: Michael Huth and Mark Ryan, Logic in Computer Science: Modelling and Reasoning about Systems, 2nd edition (CUP, 2004) It costs £35. It covers most aspects of this course with the exception of resolution theorem proving. It includes material (symbolic model checking) that should be useful for Specification and Verification II next year.
    [Show full text]
  • Exploring Semantic Hierarchies to Improve Resolution Theorem Proving on Ontologies
    The University of Maine DigitalCommons@UMaine Honors College Spring 2019 Exploring Semantic Hierarchies to Improve Resolution Theorem Proving on Ontologies Stanley Small University of Maine Follow this and additional works at: https://digitalcommons.library.umaine.edu/honors Part of the Computer Sciences Commons Recommended Citation Small, Stanley, "Exploring Semantic Hierarchies to Improve Resolution Theorem Proving on Ontologies" (2019). Honors College. 538. https://digitalcommons.library.umaine.edu/honors/538 This Honors Thesis is brought to you for free and open access by DigitalCommons@UMaine. It has been accepted for inclusion in Honors College by an authorized administrator of DigitalCommons@UMaine. For more information, please contact [email protected]. EXPLORING SEMANTIC HIERARCHIES TO IMPROVE RESOLUTION THEOREM PROVING ON ONTOLOGIES by Stanley C. Small A Thesis Submitted in Partial Fulfillment of the Requirements for a Degree with Honors (Computer Science) The Honors College University of Maine May 2019 Advisory Committee: Dr. Torsten Hahmann, Assistant Professor1, Advisor Dr. Mark Brewer, Professor of Political Science Dr. Max Egenhofer, Professor1 Dr. Sepideh Ghanavati, Assistant Professor1 Dr. Roy Turner, Associate Professor1 1School of Computing and Information Science ABSTRACT A resolution-theorem-prover (RTP) evaluates the validity (truthfulness) of conjectures against a set of axioms in a knowledge base. When given a conjecture, an RTP attempts to resolve the negated conjecture with axioms from the knowledge base until the prover finds a contradiction. If the RTP finds a contradiction between the axioms and a negated conjecture, the conjecture is proven. The order in which the axioms within the knowledge-base are evaluated significantly impacts the runtime of the program, as the search-space increases exponentially with the number of axioms.
    [Show full text]
  • Deduction and Resolution
    Lecture 12: Deduction and Resolution 1 Hilbert’s System Hilbert discovered a very elegant deductive system that is both sound and com- plete. His system uses only the connectives {¬, →}, which we know are an adequate basis. It has also been shown that each of the three axioms given below are necessary for the system to be sound and complete. Hilbert’s System consists of the following: • Three axioms (all are strongly sound): – A1: (p → (q → p)) Axiom of simplification. – A2: ((p → (q → r)) → ((p → q) → (p → r))) Frege’s axiom. – A3: ((¬p → q) → ((¬p → ¬q) → p)) Reductio ad absurdum. • Inference Rules: p,p→q – Modus Ponens: q (Strongly Sound) ϕ – Substitution: ϕ[θ] , where θ is a substitution (p → ψ). (Sound) The Substitution Inference Rule is shorthand for all sequences of the form hϕ, ϕ[θ]i. It is sometimes called a schema for generating inference rules. Note that in general, it is not the case that ϕ |= ϕ[θ], for example p 6|= q. However, in assignment 2, we showed that if |= ϕ, then |= ϕ[θ]. This is why this rule is sound but not strongly sound. Theorem 1. Hilbert’s system is sound, complete, and tractable. Proof. We prove each property separately. • Soundness: Since all axioms are strongly sound, and the two inference rules are sound, the whole system is sound. • Completeness: The proof of this property is fairly involved and thus it is outside the scope of the class. 1 + • Tractability: Given Γ ∈ Form and ϕ1, . , ϕn, is ϕ1, . , ϕn ∈ Deductions(Γ)? Clearly, < ϕ1 > is in Γ only if it is an axiom.
    [Show full text]
  • Inference (Proof) Procedures for FOL (Chapter 9)
    Inference (Proof) Procedures for FOL (Chapter 9) Torsten Hahmann, CSC384, University of Toronto, Fall 2011 85 Proof Procedures • Interestingly, proof procedures work by simply manipulating formulas. They do not know or care anything about interpretations. • Nevertheless they respect the semantics of interpretations! • We will develop a proof procedure for first-order logic called resolution . • Resolution is the mechanism used by PROLOG • Also used by automated theorem provers such as Prover9 (together with other techniques) Torsten Hahmann, CSC384, University of Toronto, Fall 2011 86 Properties of Proof Procedures • Before presenting the details of resolution, we want to look at properties we would like to have in a (any) proof procedure. • We write KB ⊢ f to indicate that f can be proved from KB (the proof procedure used is implicit). Torsten Hahmann, CSC384, University of Toronto, Fall 2011 87 Properties of Proof Procedures • Soundness • KB ⊢ f → KB ⊨ f i.e all conclusions arrived at via the proof procedure are correct: they are logical consequences. • Completeness • KB ⊨ f → KB ⊢ f i.e. every logical consequence can be generated by the proof procedure. • Note proof procedures are computable, but they might have very high complexity in the worst case. So completeness is not necessarily achievable in practice. Torsten Hahmann, CSC384, University of Toronto, Fall 2011 88 Forward Chaining • First-order inference mechanism (or proof procedure) that generalizes Modus Ponens: • From C1 ∧ … ∧ Cn → Cn+1 with C1, …, Cn in KB, we can infer Cn+1 • We can chain this until we can infer some Ck such that each Ci is either in KB or is the result of Modus Ponens involving only prior Cm (m<i) • We then have that KB ⊢ Ck.
    [Show full text]
  • An Introduction to Prolog
    Appendix A An Introduction to Prolog A.1 A Short Background Prolog was designed in the 1970s by Alain Colmerauer and a team of researchers with the idea – new at that time – that it was possible to use logic to represent knowledge and to write programs. More precisely, Prolog uses a subset of predicate logic and draws its structure from theoretical works of earlier logicians such as Herbrand (1930) and Robinson (1965) on the automation of theorem proving. Prolog was originally intended for the writing of natural language processing applications. Because of its conciseness and simplicity, it became popular well beyond this domain and now has adepts in areas such as: • Formal logic and associated forms of programming • Reasoning modeling • Database programming • Planning, and so on. This chapter is a short review of Prolog. In-depth tutorials include: in English, Bratko (2012), Clocksin and Mellish (2003), Covington et al. (1997), and Sterling and Shapiro (1994); in French, Giannesini et al. (1985); and in German, Baumann (1991). Boizumault (1988, 1993) contain a didactical implementation of Prolog in Lisp. Prolog foundations rest on first-order logic. Apt (1997), Burke and Foxley (1996), Delahaye (1986), and Lloyd (1987) examine theoretical links between this part of logic and Prolog. Colmerauer started his work at the University of Montréal, and a first version of the language was implemented at the University of Marseilles in 1972. Colmerauer and Roussel (1996) tell the story of the birth of Prolog, including their try-and-fail experimentation to select tractable algorithms from the mass of results provided by research in logic.
    [Show full text]
  • Propositional Logic. Inferences
    CS 1571 Introduction to AI Lecture 12 Propositional logic Milos Hauskrecht [email protected] 5329 Sennott Square CS 1571 Intro to AI M. Hauskrecht Logical inference problem Logical inference problem: • Given: – a knowledge base KB (a set of sentences) and – a sentence (called a theorem), • Does a KB semantically entail ? KB | ? In other words: In all interpretations in which sentences in the KB are true, is also true? CS 1571 Intro to AI M. Hauskrecht 1 Sound and complete inference Inference is a process by which conclusions are reached. • We want to implement the inference process on a computer !! Assume an inference procedure i that KB • derives a sentence from the KB : i Properties of the inference procedure in terms of entailment • Soundness: An inference procedure is sound • Completeness: An inference procedure is complete CS 1571 Intro to AI M. Hauskrecht Sound and complete inference. Inference is a process by which conclusions are reached. • We want to implement the inference process on a computer !! Assume an inference procedure i that KB • derives a sentence from the KB : i Properties of the inference procedure in terms of entailment • Soundness: An inference procedure is sound If KB then it is true that KB | i • Completeness: An inference procedure is complete If then it is true that KB KB | i CS 1571 Intro to AI M. Hauskrecht 2 Solving logical inference problem In the following: How to design the procedure that answers: KB | ? Three approaches: • Truth-table approach • Inference rules • Conversion to the inverse SAT problem – Resolution-refutation CS 1571 Intro to AI M.
    [Show full text]
  • Lecture 8: Rule-Based Reasoning
    Set 6: Knowledge Representation: The Propositional Calculus ICS 271 Fall 2013 Kalev Kask Outline • Representing knowledge using logic – Agent that reason logically – A knowledge based agent • Representing and reasoning with logic – Propositional logic • Syntax • Semantic • validity and models • Rules of inference for propositional logic • Resolution • Complexity of propositional inference. • Reading: Russel and Norvig, Chapter 7 Knowledge bases • Knowledge base = set of sentences in a formal language • • Declarative approach to building an agent (or other system): – Tell it what it needs to know – • Then it can Ask itself what to do - answers should follow from the KB • • Agents can be viewed at the knowledge level i.e., what they know, regardless of how implemented • Or at the implementation level – i.e., data structures in KB and algorithms that manipulate them – Knowledge Representation Defined by: syntax, semantics Computer Inference Assertions Conclusions (knowledge base) Semantics Facts Imply Facts Real-World Reasoning: in the syntactic level Example:x y, y z | x z The party example • If Alex goes, then Beki goes: A B • If Chris goes, then Alex goes: C A • Beki does not go: not B • Chris goes: C • Query: Is it possible to satisfy all these conditions? • Should I go to the party? Example of languages • Programming languages: – Formal languages, not ambiguous, but cannot express partial information. Not expressive enough. • Natural languages: – Very expressive but ambiguous: ex: small dogs and cats. • Good representation language:
    [Show full text]
  • My Slides for a Course on Satisfiability
    Satisfiability Victor W. Marek Computer Science University of Kentucky Spring Semester 2005 Satisfiability – p.1/97 Satisfiability story ie× Á Satisfiability - invented in the ¾¼ of XX century by philosophers and mathematicians (Wittgenstein, Tarski) ie× Á Shannon (late ¾¼ ) applications to what was then known as electrical engineering ie× ie× Á Fundamental developments: ¼ and ¼ – both mathematics of it, and fundamental algorithms ie× Á ¼ - progress in computing speed and solving moderately large problems Á Emergence of “killer applications” in Computer Engineering, Bounded Model Checking Satisfiability – p.2/97 Current situation Á SAT solvers as a class of software Á Solving large cases generated by industrial applications Á Vibrant area of research both in Computer Science and in Computer Engineering ¯ Various CS meetings (SAT, AAAI, CP) ¯ Various CE meetings (CAV, FMCAD, DATE) ¯ CE meetings Stressing applications Satisfiability – p.3/97 This Course Á Providing mathematical and computer science foundations of SAT ¯ General mathematical foundations ¯ Two- and Three- valued logics ¯ Complete sets of functors ¯ Normal forms (including ite) ¯ Compactness of propositional logic ¯ Resolution rule, completeness of resolution, semantical resolution ¯ Fundamental algorithms for SAT ¯ Craig Lemma Satisfiability – p.4/97 And if there is enough of time and will... Á Easy cases of SAT ¯ Horn ¯ 2SAT ¯ Linear formulas Á And if there is time (but notes will be provided anyway) ¯ Expressing runs of polynomial-time NDTM as SAT, NP completeness ¯ “Mix and match” ¯ Learning in SAT, partial closure under resolution ¯ Bounded Model Checking Satisfiability – p.5/97 Various remarks Á Expected involvement of Dr. Truszczynski Á An extensive set of notes (> 200 pages), covering most of topics will be provided f.o.c.
    [Show full text]
  • Designing a Theorem Prover
    Designing a Theorem Prover Lawrence C Paulson Computer Laboratory University of Cambridge May 1990 CONTENTS 2 Contents 1 Folderol: a simple theorem prover 3 1.1 Representation of rules :::::::::::::::::::::::::: 4 1.2 Propositional logic :::::::::::::::::::::::::::: 5 1.3 Quanti¯ers and uni¯cation :::::::::::::::::::::::: 7 1.4 Parameters in quanti¯er rules :::::::::::::::::::::: 7 2 Basic data structures and operations 10 2.1 Terms ::::::::::::::::::::::::::::::::::: 10 2.2 Formulae :::::::::::::::::::::::::::::::::: 11 2.3 Abstraction and substitution ::::::::::::::::::::::: 11 2.4 Parsing and printing ::::::::::::::::::::::::::: 13 3 Uni¯cation 14 3.1 Examples ::::::::::::::::::::::::::::::::: 15 3.2 Parameter dependencies in uni¯cation :::::::::::::::::: 16 3.3 The environment ::::::::::::::::::::::::::::: 17 3.4 The ML code for uni¯cation ::::::::::::::::::::::: 17 3.5 Extensions and omissions ::::::::::::::::::::::::: 18 3.6 Instantiation by the environment :::::::::::::::::::: 19 4 Inference in Folderol 20 4.1 Solving a goal ::::::::::::::::::::::::::::::: 21 4.2 Selecting a rule :::::::::::::::::::::::::::::: 22 4.3 Constructing the subgoals :::::::::::::::::::::::: 23 4.4 Goal selection ::::::::::::::::::::::::::::::: 25 5 Folderol in action 27 5.1 Propositional examples :::::::::::::::::::::::::: 27 5.2 Quanti¯er examples :::::::::::::::::::::::::::: 30 5.3 Beyond Folderol: advanced automatic methods ::::::::::::: 37 6 Interactive theorem proving 39 6.1 The Boyer/Moore theorem prover :::::::::::::::::::: 40 6.2 The Automath languages
    [Show full text]