Generalized Modus Ponens



Similar documents
Logic in general. Inference rules and theorem proving

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Resolution. Informatics 1 School of Informatics, University of Edinburgh

3. Mathematical Induction

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

1.2 Forms and Validity

DEDUCTIVE & INDUCTIVE REASONING

6.080/6.089 GITCS Feb 12, Lecture 3

CHAPTER 7 GENERAL PROOF SYSTEMS

CS510 Software Engineering

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Cosmological Arguments for the Existence of God S. Clarke

The Refutation of Relativism

Mathematical Induction. Lecture 10-11

Lecture Notes on Linear Search

Lecture 8: Resolution theorem-proving

DISCRETE MATH: LECTURE 3

Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

Handout #1: Mathematical Reasoning

Example: Backward Chaining. Inference Strategy: Backward Chaining. First-Order Logic. Knowledge Engineering. Example: Proof

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

INCIDENCE-BETWEENNESS GEOMETRY

Basic Proof Techniques

Beyond Propositional Logic Lukasiewicz s System

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Lecture 2. What is the Normative Role of Logic?

Artificial Intelligence

Math Circle Beginners Group October 18, 2015

Hypothetical Syllogisms 1

Computational Logic and Cognitive Science: An Overview

Chapter 1. Use the following to answer questions 1-5: In the questions below determine whether the proposition is TRUE or FALSE

Arguments and Dialogues

How to write proofs: a quick guide

Certamen 1 de Representación del Conocimiento

Introduction to Logic in Computer Science: Autumn 2006

Full and Complete Binary Trees

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Financial Mathematics

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

Answers G53KRR

Lecture 13 of 41. More Propositional and Predicate Logic

Does rationality consist in responding correctly to reasons? John Broome Journal of Moral Philosophy, 4 (2007), pp

Lehrstuhl für Informatik 2

Copyright 2012 MECS I.J.Information Technology and Computer Science, 2012, 1, 50-63

Math 3000 Section 003 Intro to Abstract Math Homework 2

The Normative Role of Logic Hartry Field and Peter Milne

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

Logic and Reasoning Practice Final Exam Spring Section Number

Position Paper: Validation of Distributed Enterprise Data is Necessary, and RIF can Help

Peter: I think it's ridiculous. Almost as ridiculous as believing in the Tooth Fairy, or the Easter Bunny, or Santa Claus.

Practice with Proofs

Mathematical Induction

Near Optimal Solutions

Divine command theory

Regression Verification: Status Report

Lab Experience 17. Programming Language Translation

Artificial Intelligence 2014

P1. All of the students will understand validity P2. You are one of the students C. You will understand validity

8 Primes and Modular Arithmetic

A Semantical Perspective on Verification of Knowledge

Introduction. Appendix D Mathematical Induction D1

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

NP-Completeness and Cook s Theorem

Writing Thesis Defense Papers

SECTION 10-2 Mathematical Induction

8 Divisibility and prime numbers

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

A proof is a method of establishing truth. What constitutes a proof differs among fields.

Predicate Logic. For example, consider the following argument:

MATH10040 Chapter 2: Prime and relatively prime numbers

1 if 1 x 0 1 if 0 x 1

Computational Methods for Database Repair by Signed Formulae

A Few Basics of Probability

Relations: their uses in programming and computational specifications

2. The Language of First-order Logic

196 Chapter 7. Logical Agents

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Basic Set Theory. 1. Motivation. Fido Sue. Fred Aristotle Bob. LX Semantics I September 11, 2008

A simple algorithm with no simple verication

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

Five High Order Thinking Skills

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Read this syllabus very carefully. If there are any reasons why you cannot comply with what I am requiring, then talk with me about this at once.

Writing Functions in Scheme. Writing Functions in Scheme. Checking My Answer: Empty List. Checking My Answer: Empty List

Invalidity in Predicate Logic

Brought to you by the NVCC-Annandale Reading and Writing Center

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Formalization of the CRM: Initial Thoughts

Math 319 Problem Set #3 Solution 21 February 2002

The Euclidean Algorithm

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Rigorous Software Development CSCI-GA

Set Theory Basic Concepts and Definitions

Correspondence analysis for strong three-valued logic

High Integrity Software Conference, Albuquerque, New Mexico, October 1997.

Transcription:

Generalized Modus Ponens This rule allows us to derive an implication... True p 1 and... p i and... p n p 1... p i-1 and p i+1... p n implies p i implies q implies q allows: a 1 and... a i and... a n implies p i p 1 and... p i and... p n implies q (p i == a i ) p 1... p i-1 and p i+1... p n and a 1 and... a i and... a n implies q A benefit of this approach is that the reasoner now can have a single goal. To derive q from (p 1 and... p i and... p n implies q), use generalized modus ponens to drive p1 and p2 and... pn to True This is like recursion to a base case...

Generalized Modus Ponens Many AI techniques are based on a predicate logic, extended in particular ways, using generalized modus ponens as the inference rule. It is simple to program and reasonably powerful. The programming language Prolog is based on just this sort of logic.

The Catch... But it s not enough. Notice that I said reasonably powerful. Modus ponens is sound and complete. It derives only true sentences, and it can derive any true sentence that a knowledge base of this form entails. Notice that I said of this form. Modus ponens works only for knowledge bases that contain only implications of positive literals. Implications of positive literals are often called Horn clauses, after a logician who studied them deeply. But disjunction (or) and negation (not) break the rule. And many legal sentences cannot be expressed in Horn clauses.

The Catch... For example: Eugene is a Hoosier, or the Eugene is crazy. We can write this as a disjunction: ishoosier( Eugene ) or iscrazy( Eugene ) We could use negation to convert this to implications: ( not hoosier( Eugene ) ) implies iscrazy( Eugene ) ( not iscrazy( Eugene ) ) implies hoosier( Eugene ) Or we could use the semantics of implication to convert this to a clause: True implies ( ishoosier( Eugene ) or iscrazy( Eugene ) ) But we cannot eliminate all the ors and all the nots at the same time.

The Catch, Part 2 So, Horn clause form is incomplete. That is, we cannot represent all sentences in this form. But why is Horn clause form necessary? Here is an example of how modus ponens breaks down if we use negation or disjunction. Suppose that all classes at some university meet either Mon/Wed/Fri or Tue/Thu. The AI course meets at 2:30 PM in the afternoon, and Jane has volleyball practice Thursdays and Fridays at that time. Can Jane take AI?

The Catch, Part 2 Of course not! But modus ponens cannot figure that out! See: True implies ( TueThu( AI, 2:30 PM ) or MonWedFri( AI, 2:30 PM ) ) ( TueThu( AI, 2:30 PM ) and busy( Thursday, 2:30 PM ) ) implies conflict( AI ) ( MonWedFri( AI, 2:30 PM ) and busy( Friday, 2:30 PM ) ) implies conflict( AI ) True implies busy( Thursday, 2:30 PM ) True implies busy( Friday, 2:30 PM )

The Catch, Part 2 We can apply modus ponens to [2, 4] and [3, 5] to derive the following: True implies ( TueThu( AI, 2:30 PM ) or MonWedFri( AI, 2:30 PM ) ) TueThu( AI, 2:30 PM ) implies conflict( AI ) MonWedFri( AI, 2:30 PM ) implies conflict( AI ) But modus ponens cannot take us any farther, despite what s obvious about those last two sentences.

Fixing the Catch So, Horn clause form is incomplete. But, if we allow something non-horn into our knowledge base, then modus ponens is incomplete. What do we do now? We need an inference rule that handles disjunctions and negations. If we find one, then we will be able to handle any expression... Why? Because we can use the semantics of implication to convert our Horn clauses into disjunctions with negations. childof( x, y ) and likes( y, Basketball ) implies likes( x, Basketball ) not [ childof( x, y ) and likes( y, Basketball ) ] or likes( x, Basketball )

Toward Fixing the Catch And then: not [ childof( x, y ) and likes( y, Basketball ) ] or likes( x, Basketball ) BECOMES [ not childof( x, y ) ] or [ not likes( y, Basketball ) ] or likes( x, Basketball ) More generally, becomes: p1 and p 2... and p n implies q (not p1) or (not p 2 )... or (not p n ) or q

An Example: Converting Sentences into Clause Form 1. ishoosier( Eugene ) 2. x ishoosier(x) implies likes( x, Basketball ) 3. xy childof( x, y ) and likes( y, Basketball ) implies likes( x, Basketball ) 4. x likes( x, Basketball ) implies likes( x, March ) 5. daughter( Ellen, Eugene ) 6. xy daughter( x, y ) implies childof( x, y ) 1. ishoosier( Eugene ) 2. not ishoosier(x) or likes( x, Basketball ) 3. [ not childof( x, y ) ] or [ not likes( y, Basketball ) ] or likes( x, Basketball ) 4. [ not likes( x, Basketball ) ] or likes( x, March ) 5. daughter( Ellen, Eugene ) 6. [ not daughter( x, y ) ] or childof( x, y )

We re Almost There... Now we are able to write any sentence in the predicate logic, using only the connectives not and or. Any sentence that uses implies can be converted using the rule: (p implies q) == (not p) or q Any sentence that uses and can be rewritten as separate sentences! This form is called clause form, or disjunctive normal form. So, now we can write our sentences in a new, complete form. If only we had an inference rule that worked on disjunctions and negations, we would be able to infer any true sentence. The semantics of the or connective lead us to a new inference rule:

The Solution: Resolution! The semantics of or lead us to a new inference rule: p or disjunction 1 [ not p ] or disjunction 2 disjunction 1 or disjunction 2 We call this inference rule resolution because it resolves the case analysis that is required whenever one sentence asserts p and another asserts not p. Let us consider our new knowledge base: 1. ishoosier( Eugene ) 2.not ishoosier(x) or likes( x, Basketball ) 3. [ not childof( x, y ) ] or [ not likes( y, Basketball ) ] or likes( x, Basketball ) 4. [ not likes( x, Basketball ) ] or likes( x, March ) 5. daughter( Ellen, Eugene ) 6. [ not daughter( x, y ) ] or childof( x, y ) Can we infer that Ellen likes March?

Yes, But How? Using resolution as our inference rule, we conclude: Ellen likes March. by constructing a proof by contradiction... To derive the sentence: likes( Ellen, March ) We build a proof by contradiction in this way: 1. Assume that our goal sentence is false. not likes( Ellen, March ) 2. Try to show that the goal sentence being false causes a contradiction.... try to infer FALSE... If assuming that the goal sentence is false causes a contradiction, then it must not be false. Everything else in our knowledge base is true (or so we assume), and so the cause of the contradiction is our negation.

An Example Proof by Contradiction p or disjunction 1 [ not p ] or disjunction 2 disjunction 1 or disjunction 2 1. ishoosier( Eugene ) 2. [ not ishoosier(x) ] or likes( x, Basketball ) 3. [ not childof( x, y ) ] or [ not likes( y, Basketball ) ] or likes( x, Basketball ) 4. [ not likes( x, Basketball ) ] or likes( x, March ) 5. daughter( Ellen, Eugene ) 6. [ not daughter( x, y ) ] or childof( x, y ) 7. [ not likes( Ellen, March ) ] ASSUMPTION 8. [ not likes( Ellen, Basketball ) ] (4, 7) 9. [ not childof( Ellen, y ) ] or [ not likes( y, Basketball ) ] (3, 8) A. [ not daughter( Ellen, y ) ] or [ not likes( y, Basketball ) ] (6, 9) B. [ not likes( Eugene, Basketball ) ] (5, A) C. [ not ishoosier( Eugene ) ] (2, B) 13. FALSE (1, C) Since assuming that Ellen does not like March cause a contradiction, then it must follow from the knowledge base that Ellen does like March.

But Can Jane Take AI? Big deal! you might say. We could prove that with modus ponens. Can resolution do something modus ponens couldn t? Use resolution to show that our good friend Jane cannot take AI from this knowledge base: True implies ( TueThu( AI, 2:30 PM ) or MonWedFri( AI, 2:30 PM ) ) ( TueThu( AI, 2:30 PM ) and busy( Thursday, 2:30 PM ) ) implies conflict( AI ) ( MonWedFri( AI, 2:30 PM ) and busy( Friday, 2:30 PM ) ) implies conflict( AI ) True implies busy( Thursday, 2:30 PM ) True implies busy( Friday, 2:30 PM ) First, convert these sentences to clause form. Then, assume Jane can take AI...

Poor Jane 1. TueThu( AI, 2:30 PM ) or MonWedFri( AI, 2:30 PM ) 2. [ not TueThu( AI, 2:30 PM ) ] or [ not busy( Thursday, 2:30 PM ) ] or conflict( AI ) 3. [ not MonWedFri( AI, 2:30 PM ) ] or [ not busy( Friday, 2:30 PM ) ] or conflict( AI ) 4. busy( Thursday, 2:30 PM ) 5. busy( Friday, 2:30 PM ) 6. not conflict( AI ) ASSUMPTION 7. not TueThu( AI, 2:30 PM ) ] or [ not busy( Thursday, 2:30 PM ) (2, 6) 8. MonWedFri( AI, 2:30 PM ) or [ not busy( Thursday, 2:30 PM ) ] (1, 7) 9. MonWedFri( AI, 2:30 PM ) (4, 8) A. [ not busy( Friday, 2:30 PM ) ] or conflict( AI ) (3, 9) B. conflict( AI ) (5, A) C. FALSE (6, B) So, resolution can handle cases that generalized modus ponens can t!