Computational Logic Lecture 3. Logical Entailment. Michael Genesereth Autumn Logical Reasoning

Similar documents
Logic, Human Logic, and Propositional Logic. Human Logic. Fragments of Information. Conclusions. Foundations of Semantics LING 130 James Pustejovsky

Propositional Resolution

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Properties of Relational Logic

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

03 Propositional Logic II

cis32-ai lecture # 18 mon-3-apr-2006

Deductive Systems. Lecture - 3

15414/614 Optional Lecture 1: Propositional Logic

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional Logic: Review

Advanced Topics in LP and FP

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Inference in Propositional Logic

Artificial Intelligence Knowledge Representation I

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

02 Propositional Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

DERIVATIONS AND TRUTH TABLES

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

127: Lecture notes HT18. Week 3. D.I. Semantic and proof-theoretic approaches to consequence (LfP 1.5)

Artificial Intelligence Chapter 7: Logical Agents

Propositional logic (revision) & semantic entailment. p. 1/34

Logic: Propositional Logic (Part I)

Logic. Propositional Logic: Syntax

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

CHAPTER 11. Introduction to Intuitionistic Logic

Propositional Logic. Fall () Propositional Logic Fall / 30

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Formal Logic. Critical Thinking

Logic: Propositional Logic Truth Tables

First Order Logic: Syntax and Semantics

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 15 Propositional Calculus (PC)

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Natural Deduction for Propositional Logic

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

Introduction to Metalogic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

Propositional Logic. Logic. Propositional Logic Syntax. Propositional Logic

Marie Duží

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Modal Logic XX. Yanjing Wang

Automated Reasoning Lecture 2: Propositional Logic and Natural Deduction

Propositional Logic: Syntax

Propositional Logic. CS 3234: Logic and Formal Systems. Martin Henz and Aquinas Hobor. August 26, Generated on Tuesday 31 August, 2010, 16:54

Propositional Logic: Deductive Proof & Natural Deduction Part 1

The Converse of Deducibility: C.I. Lewis and the Origin of Modern AAL/ALC Modal 2011 Logic 1 / 26

First Order Logic: Syntax and Semantics

a. ~p : if p is T, then ~p is F, and vice versa

1. Propositional Calculus

FORMAL PROOFS DONU ARAPURA

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Propositional Logic: Part II - Syntax & Proofs 0-0

22c:145 Artificial Intelligence

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

Reasoning. Inference. Knowledge Representation 4/6/2018. User

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

KB Agents and Propositional Logic

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Notes on Inference and Deduction

8. Reductio ad absurdum

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

185.A09 Advanced Mathematical Logic

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Classical Propositional Logic

Propositional and Predicate Logic - V

CITS2211 Discrete Structures Proofs

Proof Methods for Propositional Logic

Propositional Calculus - Hilbert system H Moonzoo Kim CS Division of EECS Dept. KAIST

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

Basic Algebraic Logic

Class 29 - November 3 Semantics for Predicate Logic

Warm-Up Problem. Write a Resolution Proof for. Res 1/32

PROPOSITIONAL CALCULUS

8. Reductio ad absurdum

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

7.5.2 Proof by Resolution

1. Propositional Calculus

Gödel s Incompleteness Theorems

Logical Agents. Outline

Formal Logic 2. This lecture: Standard Procedure of Inferencing Normal forms Standard Deductive Proofs in Logic using Inference Rules

Chapter 1: The Logic of Compound Statements. January 7, 2008

Logic for Computer Science - Week 4 Natural Deduction

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

Logic and Inferences

cse371/mat371 LOGIC Professor Anita Wasilewska Fall 2018

CS157 Greatest Hits. The Top 100 Slides of the Course

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Logical Agents. September 14, 2004

PHIL 50 - Introduction to Logic

Transcription:

Computational Logic Lecture 3 Logical Entailment Michael Genesereth Autumn 2010 Logical Reasoning Logical Reasoning relates premises and conclusion does not say whether conclusion is true in general says conclusion true whenever premises are true Leibnitz: he intellect is freed of all conception of the objects involved, and yet the computation yields the correct result. Russell: Math may be defined as the subject in which we never know what we are talking about nor whether what we are saying is true. 2 1

Logical Entailment A set of premises Δ logically entails a conclusion ϕ (written as Δ = ϕ) if and only if every interpretation that satisfies the premises also satisfies the conclusion. {p} = (p q) {p} # (p q) {p, q} = (p q) 3 Logical Entailment Logical Equivalence {p} = (p q) {p q)} # p Analogy in arithmetic: inequalities rather than equations 4 2

ruth able Method We can check for logical entailment by comparing tables of all possible interpretations. In the first table, eliminate all rows that do not satisfy premises. In the second table, eliminate all rows that do not satisfy the conclusion. If the remaining rows in the first table are a subset of the remaining rows in the second table, then the premises logically entail the conclusion. 5 Example Does p logically entail (p q)? p q p q 6 3

4 7 Example Does p logically entail (p q)? Does {p,q} logically entail (p q)? p q p q 8 Example If Mary loves Pat, then Mary loves Quincy. If it is Monday, then Mary loves Pat or Quincy. If it is Monday, does Mary love Quincy? q p m q p m

Logical Entailment and Satisfiability heorem: Δ = ϕ if and only if Δ { ϕ} is unsatisfiable. Suppose that Δ = ϕ. If an interpretation satisfies Δ, then it must also satisfy ϕ. But then it cannot satisfy ϕ. herefore, Δ { ϕ} is unsatisfiable. Suppose that Δ { ϕ} is unsatisfiable. hen every interpretation that satisfies Δ must fail to satisfy ϕ, i.e. it must satisfy ϕ. herefore, Δ = ϕ. Upshot: We can determine logical entailment by determining unsatisfiability. 9 Example Problem: {(p q), (m p q)} = (m q)? Or: Is {(p q), (m p q), (m q)} unsatisfiable? m p q 10 5

Problem here can be many, many interpretations for a Propositional Language. Remember that, for a language with n constants, there are 2 n possible interpretations. Sometimes there are many constants among premises that are irrelevant to the conclusion. Much wasted work. Answer: Proofs 11 Patterns A pattern is a parameterized expression, i.e. an expression satisfying the grammatical rules of our language except for the use of meta-variables (Greek letters) in place of various subparts of the expression. Sample Pattern: ϕ (ψ ϕ) Instance: p (q p) Instance: (p r) ((p q) (p r)) 12 6

Rules of Inference A rule of inference is a rule of reasoning consisting of one set of sentence patterns, called premises, and a second set of sentence patterns, called conclusions. ϕ ψ ϕ ψ 13 Rule Instances An instance of a rule of inference is a rule in which all meta-variables have been consistently replaced by expressions in such a way that all premises and conclusions are syntactically legal sentences. raining wet raining wet wet slippery wet slippery p (q r) p q r ( p q) r p q r 14 7

Sound Rules of Inference A rule of inference is sound if and only if the premises in any instance of the rule logically entail the conclusions. Modus Ponens (MP) ϕ ψ ϕ ψ Equivalence Elimination (EE) ϕ ψ ϕ ψ ψ ϕ Modus olens (M) ϕ ψ ψ ϕ Double Negation (DN) ϕ ϕ 15 Proof (Version 1) A proof of a conclusion from a set of premises is a sequence of sentences terminating in the conclusion in which each item is either: 1. a premise 2. the result of applying a rule of inference to earlier items in sequence. 16 8

Example When it is raining, the ground is wet. When the ground is wet, it is slippery. It is raining. Prove that it is slippery. 1. raining wet Premise 2. wet slippery Premise 3. raining Premise 4. wet MP :1, 3 5. slippery MP : 2, 4 17 Error Note: Rules of inference apply only to top-level sentences in a proof. Sometimes works but sometimes fails. No! 1. raining cloudy Premise 2. raining wet Premise 3. cloudy wet MP : 1, 2 No! 18 9

Example Heads you win. ails I lose. Suppose the coin comes up tails. Show that you win. 1. h y Premise 2. t m Premise 3. h t Premise 4. y m Premise 5. t Premise 6. m MP : 2, 5 7. y m EE : 4 8. m y EE : 4 9. y MP : 8, 6 19 Axiom Schemata act: If a sentence is valid, then it is true under all interpretations. Consequently, there should be a proof without making any assumptions at all. act: (p (q p)) is a valid sentence. Problem: Prove (p (q p)). Solution: We need some rules of inference without premises to get started. An axiom schema is sentence pattern construed as a rule of inference without premises. 20 10

Rules and Schemata Axiom Schemata as Rules of Inference ϕ (ψ ϕ) ϕ (ψ ϕ) Rules of Inference as Axiom Schemata ϕ ψ ψ ϕ (ϕ ψ) ( ψ ϕ) Note: Of course, we must keep a least one rule of inference to use the schemata. By convention, we retain Modus Ponens. 21 Valid Axiom Schemata A valid axiom schema is a sentence pattern denoting an infinite set of sentences, all of which are valid. Implication Introduction (II): ϕ (ψ ϕ) ImplicationDistribution (ID): (ϕ (ψ χ)) ((ϕ ψ) (ϕ χ)) 22 11

Proof (Official Version) A proof of a conclusion from a set of premises is a sequence of sentences terminating in the conclusion in which each item is either: 1. a premise 2. An instance of an axiom schema 3. the result of applying a rule of inference to earlier items in sequence. 23 Sample Proof Whenever p is true, q is true. Whenever q is true, r is true. Prove that, whenever p is true, r is true. 1. p q Premise 2. q r Premise 3. (q r) ( p (q r)) II 4. p (q r) MP : 3, 2 5. ( p (q r)) (( p q) (p r)) ID 6. ( p q) ( p r) MP : 5, 4 7. p r MP : 6,1 24 12

Mendelson Axiomatization II: ϕ (ψ ϕ) ID: (ϕ (ψ χ)) ((ϕ ψ) (ϕ χ)) CR: ( ψ ϕ) (( ψ ϕ) ψ) Note: Mendelson s system assumes there are only two operators, viz. and. ortunately, all sentences in Propositional Logic can be reduced to equivalent sentences with these operators by applying the following rules. (ψ ϕ) ((ϕ ψ) (ψ ϕ)) (ϕ ψ) (ψ ϕ) (ψ ϕ) ( ϕ ψ) (ψ ϕ) ( ϕ ψ) 25 Kleene Axiomatization II: ϕ (ψ ϕ) ID: (ϕ (ψ χ)) ((ϕ ψ) (ϕ χ)) AI: AE1: AE2: ϕ (ψ (ϕ ψ)) (ϕ ψ) ϕ (ϕ ψ) ψ OI1: ϕ (ϕ ψ) OI2: ψ (ϕ ψ) OE: (ϕ χ) ((ψ χ) (ϕ ψ χ)) CM: (ψ ϕ) ((ψ ϕ) ψ) DN: ( ϕ ϕ) Note: Kleene s system assumes there are only four operators, viz.,,, and. 26 13

Standard Axiom Schemata II: ϕ (ψ ϕ) ID: (ϕ (ψ χ)) ((ϕ ψ) (ϕ χ)) CR: ( ψ ϕ) (( ψ ϕ) ψ) EQ: (ϕ ψ) (ϕ ψ) (ϕ ψ) (ψ ϕ) (ϕ ψ) ((ψ ϕ) (ϕ ψ)) OQ: (ϕ ψ) (ψ ϕ) (ϕ ψ) ( ϕ ψ) (ϕ ψ) ( ϕ ψ) 27 Meredith Axiomatization ((((ϕ ψ) ( χ µ)) χ) ν) ((ν ϕ) (µ ϕ)) 28 14

Provability A conclusion is said to be provable from a set of premises (written Δ - ϕ) if and only if there is a finite proof of the conclusion from the premises using only Modus Ponens and a complete logical axiomatization (e.g. Mendelson, Kleene, Standard, Meredith). 29 Soundness and Completeness Soundness: Our proof system is sound, i.e. if the conclusion is provable from the premises, then the premises propositionally entail the conclusion. (Δ - ϕ) (Δ = ϕ) Completeness: Our proof system is complete, i.e. if the premises propositionally entail the conclusion, then the conclusion is provable from the premises. (Δ = ϕ) (Δ - ϕ) 30 15

ruth ables and Proofs he truth table method and the proof method succeed in exactly the same cases. On large problems, the proof method often takes fewer steps than the truth table method. However, in the worst case, the proof method may take just as many or more steps to find an answer as the truth table method. Usually, proofs are much smaller than the corresponding truth tables. So writing an argument to convince others does not take as much space. 31 Metatheorems Deduction heorem: Δ - (ϕ ψ) if and only if Δ {ϕ} - ψ. Substitution heorem: Δ - (ϕ ψ) and Δ - χ, then it is the case that Δ - χ ϕ ψ. Chaining heorem: If Δ - (ϕ ψ) and Δ - (ψ χ), then Δ - (ϕ χ). 32 16

Proof Without Metatheorems Problem: {p q, q r} - (p r)? 1. p q Premise 2. q r Premise 3. (q r) ( p (q r)) II 4. p (q r) MP : 3, 2 5. ( p (q r)) (( p q) (p r)) ID 6. ( p q) ( p r) MP : 5, 4 7. p r MP : 6,1 33 Proof Using Deduction heorem Problem: {p q, q r} - (p r)? 1. p q Premise 2. q r Premise 3. p Premise 4. q MP :1, 3 5. r MP : 2, 4 34 17

A Appeasement Rules When we ask you to show that something is true, you may use metatheorems. When we ask you to give a formal proof, it means you should write out the proof as defined above. When we ask you to give a formal proof using certain rules of inference or axiom schemata, it means you should do so using only those rules of inference and axiom schemata and no others. 35 Logical Reasoning In deduction, the conclusion is true whenever the premises are true. Premise: p Conclusion: (p q) Premise: p Non-Conclusion: (p q) Premises: p, q Conclusion: (p q) 36 18