Announcements. CS311H: Discrete Mathematics. First Order Logic, Rules of Inference. Satisfiability, Validity in FOL. Example.

Similar documents
Announcements. CS243: Discrete Structures. First Order Logic, Rules of Inference. Review of Last Lecture. Translating English into First-Order Logic

Revisiting the Socrates Example

Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, 2018

Selections from Aristotle s Prior Analytics 41a21 41b5

Semantic Entailment and Natural Deduction

Study Guides. Chapter 1 - Basic Training

Informalizing Formal Logic

Foundations of Non-Monotonic Reasoning

In this section you will learn three basic aspects of logic. When you are done, you will understand the following:

Philosophy 1100: Ethics

Chapter 1. Introduction. 1.1 Deductive and Plausible Reasoning Strong Syllogism

The Perfect Being Argument in Case-Intensional Logic The perfect being argument for God s existence is the following deduction:

Transition to Quantified Predicate Logic

10.3 Universal and Existential Quantifiers

Exercise Sets. KS Philosophical Logic: Modality, Conditionals Vagueness. Dirk Kindermann University of Graz July 2014

Day 3. Wednesday May 23, Learn the basic building blocks of proofs (specifically, direct proofs)

Deductive Forms: Elementary Logic By R.A. Neidorf READ ONLINE

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

16. Universal derivation

Artificial Intelligence Prof. P. Dasgupta Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

HOW TO ANALYZE AN ARGUMENT

(Refer Slide Time 03:00)

How Gödelian Ontological Arguments Fail

The way we convince people is generally to refer to sufficiently many things that they already know are correct.

Philosophical Logic. LECTURE SEVEN MICHAELMAS 2017 Dr Maarten Steenhagen

Module 5. Knowledge Representation and Logic (Propositional Logic) Version 2 CSE IIT, Kharagpur

Broad on Theological Arguments. I. The Ontological Argument

Logic: A Brief Introduction. Ronald L. Hall, Stetson University

Artificial Intelligence: Valid Arguments and Proof Systems. Prof. Deepak Khemani. Department of Computer Science and Engineering

MATH1061/MATH7861 Discrete Mathematics Semester 2, Lecture 5 Valid and Invalid Arguments. Learning Goals

A BRIEF INTRODUCTION TO LOGIC FOR METAPHYSICIANS

Chapter 8 - Sentential Truth Tables and Argument Forms

Workbook Unit 17: Negated Categorical Propositions

Lecture 17:Inference Michael Fourman

Lecture 3 Arguments Jim Pryor What is an Argument? Jim Pryor Vocabulary Describing Arguments

9.1 Intro to Predicate Logic Practice with symbolizations. Today s Lecture 3/30/10

Essential Logic Ronald C. Pine

Overview of Today s Lecture

Also, in Argument #1 (Lecture 11, Slide 11), the inference from steps 2 and 3 to 4 is stated as:

There are two common forms of deductively valid conditional argument: modus ponens and modus tollens.

UC Berkeley, Philosophy 142, Spring 2016

What is the Nature of Logic? Judy Pelham Philosophy, York University, Canada July 16, 2013 Pan-Hellenic Logic Symposium Athens, Greece

4.1 A problem with semantic demonstrations of validity

PHILOSOPHY 102 INTRODUCTION TO LOGIC PRACTICE EXAM 1. W# Section (10 or 11) 4. T F The statements that compose a disjunction are called conjuncts.

Logic for Robotics: Defeasible Reasoning and Non-monotonicity

Logic I or Moving in on the Monkey & Bananas Problem

Elements of Science (cont.); Conditional Statements. Phil 12: Logic and Decision Making Fall 2010 UC San Diego 9/29/2010

Facts and Free Logic. R. M. Sainsbury

Facts and Free Logic R. M. Sainsbury

An Introduction to. Formal Logic. Second edition. Peter Smith, February 27, 2019

Comments on Truth at A World for Modal Propositions

A Judgmental Formulation of Modal Logic

PHI Introduction Lecture 4. An Overview of the Two Branches of Logic

Tutorial A03: Patterns of Valid Arguments By: Jonathan Chan

Chapter 9- Sentential Proofs

CHAPTER THREE Philosophical Argument

MCQ IN TRADITIONAL LOGIC. 1. Logic is the science of A) Thought. B) Beauty. C) Mind. D) Goodness

Part II: How to Evaluate Deductive Arguments

PHI 1500: Major Issues in Philosophy

Philosophy 1100: Introduction to Ethics. Critical Thinking Lecture 1. Background Material for the Exercise on Validity

Ling 98a: The Meaning of Negation (Week 1)

Complications for Categorical Syllogisms. PHIL 121: Methods of Reasoning February 27, 2013 Instructor:Karin Howe Binghamton University

Quantifiers: Their Semantic Type (Part 3) Heim and Kratzer Chapter 6

What is an argument? PHIL 110. Is this an argument? Is this an argument? What about this? And what about this?

Lecture Notes on Classical Logic

SYLLOGISTIC LOGIC CATEGORICAL PROPOSITIONS

CRITICAL THINKING (CT) MODEL PART 1 GENERAL CONCEPTS

Does Deduction really rest on a more secure epistemological footing than Induction?

Chapter 3: Basic Propositional Logic. Based on Harry Gensler s book For CS2209A/B By Dr. Charles Ling;

SOME RADICAL CONSEQUENCES OF GEACH'S LOGICAL THEORIES

Logic Appendix: More detailed instruction in deductive logic

Recall. Validity: If the premises are true the conclusion must be true. Soundness. Valid; and. Premises are true

What would count as Ibn Sīnā (11th century Persia) having first order logic?

T. Parent. I shall explain these steps in turn. Let s consider the following passage to illustrate the process:

Deduction by Daniel Bonevac. Chapter 1 Basic Concepts of Logic

7. Some recent rulings of the Supreme Court were politically motivated decisions that flouted the entire history of U.S. legal practice.

The basic form of a syllogism By Timo Schmitz, Philosopher

Homework: read in the book pgs and do "You Try It" (to use Submit); Read for lecture. C. Anthony Anderson

Class 33: Quine and Ontological Commitment Fisher 59-69

Conditionals II: no truth conditions?

Session 10 INDUCTIVE REASONONING IN THE SCIENCES & EVERYDAY LIFE( PART 1)

Artificial Intelligence. Clause Form and The Resolution Rule. Prof. Deepak Khemani. Department of Computer Science and Engineering

Criticizing Arguments

CONCEPT FORMATION IN ETHICAL THEORIES: DEALING WITH POLAR PREDICATES

Logic & Proofs. Chapter 3 Content. Sentential Logic Semantics. Contents: Studying this chapter will enable you to:

GENERAL NOTES ON THIS CLASS

Basic Concepts and Skills!

CHAPTER 1 A PROPOSITIONAL THEORY OF ASSERTIVE ILLOCUTIONARY ARGUMENTS OCTOBER 2017

1. Introduction Formal deductive logic Overview

INTERMEDIATE LOGIC Glossary of key terms

FIRST PUBLIC EXAMINATION. Preliminary Examination in Philosophy, Politics and Economics INTRODUCTION TO PHILOSOPHY TRINITY TERM 2013

Unit. Categorical Syllogism. What is a syllogism? Types of Syllogism

Pastor-teacher Don Hargrove Faith Bible Church September 8, 2011

HANDBOOK (New or substantially modified material appears in boxes.)

Introduction to Logic

Outline. 1 Review. 2 Formal Rules for. 3 Using Subproofs. 4 Proof Strategies. 5 Conclusion. 1 To prove that P is false, show that a contradiction

Venn Diagrams and Categorical Syllogisms. Unit 5

PHILOSOPHY OF LOGIC AND LANGUAGE OVERVIEW LOGICAL CONSTANTS WEEK 5: MODEL-THEORETIC CONSEQUENCE JONNY MCINTOSH

Logic. A Primer with Addendum

Introduction. I. Proof of the Minor Premise ( All reality is completely intelligible )

Transcription:

Announcements CS311H: Discrete Mathematics First Order Logic, Rules of Inference Instructor: Işıl Dillig Homework 1 is due now! Homework 2 is handed out today Homework 2 is due next Wednesday Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 1/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 2/38 Satisfiability, Validity in FOL An FOL formula F is satisfiable if there exists some domain and some interpretation such that F evaluates to true Example: Prove that x.(p(x) Q(x)) is satisfiable. D = { }, P( ) = true, Q( ) = true Example Is the following formula valid, unsat, or contingent? Prove your answer. (() ( x.q(x))) ( x.(p(x) Q(x))) An FOL formula F is valid if, for all domains and all interpretations, F evaluates to true Prove that x.(p(x) Q(x)) is not valid. D = { }, P( ) = true, Q( ) = false Formulas that are satisfiable, but not valid are contingent, e.g., x.(p(x) Q(x)) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 3/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 4/38 Equivalence Two formulas F 1 and F 2 are equivalent if F 1 F 2 is valid In PL, we could prove equivalence using truth tables, but not possible in FOL However, we can still use known equivalences to rewrite one formula as the other Example: Prove that ( x. (P(x) Q(x))) and x. (P(x) Q(x)) are equivalent. Example: Prove that x. y.p(x, y) and x. y. P(x, y) are equivalent. Rules of Inference We can prove validity in FOL by using proof rules Proof rules are written as rules of inference: An example inference rule: Hypothesis1 Hypothesis2... Conclusion All men are mortal Socrates is a man Socrates is mortal We ll learn about more general inference rules that will allow constructing formal proofs Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 5/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 6/38 1

Modus Ponens Example Uses of Modus Ponens Most basic inference rule is modus ponens: Modus ponens applicable to both propositional logic and first-order logic Application of modus ponens in propositional logic: p q (p q) r r Application of modus ponens in first-order logic: P(a) P(a) Q(b) Q(b) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 7/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 8/38 Modus Tollens Example Uses of Modus Tollens Application of modus tollens in propositional logic: Second imporant inference rule is modus tollens: p (q r) (q r) p Application of modus tollens in first-order logic: Q(a) P(a) Q(a) P(a) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 9/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 10/38 Hypothetical Syllogism (HS) Or Introduction and Elimination φ 3 φ 3 Basically says implication is transitive Example: P(a) Q(b) Q(b) R(c) P(a) R(c) Or introduction: Example application: Socrates is a man. Therefore, either Socrates is a man or there are red elephants on the moon. Or elimination: Example application: It is either a dog or a cat. It is not a dog. Therefore, it must be a cat. Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 11/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 12/38 2

And Introduction and Elimination And introduction: Example application: It is Tuesday. It s the afternoon. Therefore, it s Tuesday afternoon. And elimination: Example application: It is Tuesday afternoon. Therefore, it is Tuesday. Resolution Final inference rule: resolution φ 3 φ 3 To see why this is correct, observe is either true or false. Suppose is true. Then, is false. Therefore, by second hypothesis, φ 3 must be true. Suppose is false. Then, by 1st hypothesis, must be true. In any case, either or φ 3 must be true; φ 3 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 13/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 14/38 Resolution Example Example 1: Example 2: P(a) Q(b) Q(b) R(c) P(a) R(c) p q q p q Summary Name Rule of Inference Modus ponens Modus tollens Hypothetical syllogism φ 3 φ 3 Or introduction Or elimination And introduction And elimination Resolution φ 3 φ 3 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 15/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 16/38 Using the Rules of Inference Encoding in Logic Assume the following hypotheses: 1. It is not sunny today and it is colder than yesterday. First, encode hypotheses and conclusion as logical formulas. To do this, identify propositions used in the argument: 2. We will go to the lake only if it is sunny. 3. If we do not go to the lake, then we will go hiking. 4. If we go hiking, then we will be back by sunset. Show these lead to the conclusion: We will be back by sunset. s = It is sunny today c= It is colder than yesterday l = We ll go to the lake h = We ll go hiking b= We ll be back by sunset Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 17/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 18/38 3

Encoding in Logic, cont. Formal Proof Using Inference Rules It s not sunny today and colder than yesterday. s c We will go to the lake only if it is sunny l s If we do not go to the lake, then we will go hiking. l h If we go hiking, then we will be back by sunset. h b Conclusion: We ll be back by sunset b 1. s c Hypothesis 2. l s Hypothesis 3. l h Hypothesis 4. h b Hypothesis 5. s And Elim (1) 6. l Modus tollens (2,5) 7. l b Hypothetical syllogism (3,4) 8. b Modus ponens (6,7) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 19/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 20/38 Another Example Encoding in Logic Assume the following hypotheses: 1. It is not raining or Kate has her umbrella 2. Kate does not have her umbrella or she does not get wet First, encode hypotheses and conclusion as logical formulas. To do this, identify propositions used in the argument: r = It is raining 3. It is raining or Kate does not get wet 4. Kate is grumpy only if she is wet Show these lead to the conclusion: Kate is not grumpy. u= Kate has her umbrella w = Kate is wet g = Kate is grumpy Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 21/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 22/38 Encoding in Logic, cont. Formal Proof Using Inference Rules It is not raining or Kate has her umbrella. r u Kate does not have her umbrella or she does not get wet u w It is raining or Kate does not get wet. r w Kate is grumpy only if she is wet. g w Conclusion: Kate is not grumpy. g 1. r u Hypothesis 2. u w Hypothesis 3. r w Hypothesis 4. g w Hypothesis 5. r w Resolution 1,2 6. w w Resolution 3,5 7. w Idempotence 8. g Modus tollens 4,7 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 23/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 24/38 4

Additional Inference Rules for Quantified Formulas Universal Instantiation Inference rules we learned so far are sufficient for reasoning about quantifier-free statements Four more inference rules for making deductions from quantified formulas These come in pairs for each quantifier (universal/existential) One is called generalization, the other one called instantiation If we know something is true for all members of a group, we can conclude it is also true for a specific member of this group This idea is formally called universal instantiation: (for any c) If we know All CS classes at UT are hard, universal instantiation allows us to conclude CS311 is hard! Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 25/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 26/38 Example Universal Generalization Consider predicates man(x) and mortal(x) and the hypotheses: 1. All men are mortal: x.(man(x) mortal(x)) 2. Socrates is a man: man(socrates) Using rules of inference, prove mortal(socrates) 3. man(socrates) mortal(socrates) -inst. (1) 4. mortal(socrates) Modus ponens (1), (3) Suppose we can prove a claim for an arbitrary element in the domain. Since we ve made no assumptions about this element, proof should apply to all elements in the domain. This correct reasoning is captured by universal generalization for arbitrary c Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 27/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 28/38 Example Caveat About Universal Generalization Prove x.q(x) from the hypotheses: 1. x. (P(x) Q(x)) Hypothesis 2. x. P(x) Hypothesis 3. Q(c) -inst (1) 4. -inst (2) When using universal generalization, need to ensure that c is truly arbitrary! If you prove something about a specific person Mary, you cannot make generalizations about all people 5. Q(c) Modus ponens (3), (4) 6. x.q(x) -gen (5) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 29/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 30/38 5

Existential Instantiation Example Using Existential Instantiation Consider formula. We know there is some element, say c, in the domain for which is true. This is called existential instantiation: (for unused c) Here, c is a fresh name (i.e., not used before in proof). Otherwise, can prove non-sensical things such as: There exists some animal that can fly. Thus, rabbits can fly! Consider the hypotheses and x. P(x). Prove that we can derive a contradiction (i.e., false) from these hypotheses. 1. Hypothesis 2. x. P(x) Hypothesis 3. instantiation 1, c fresh 4. instantiation 1 5. -intro 6. false Negation law Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 31/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 32/38 Existential Generalization Example Using Existential Generalization Suppose we know is true for some constant c Then, there exists an element for which P is true Thus, we can conlude This inference rule called existential generalization: Consider the hypotheses atut (George) and smart(george). Prove x. (atut (x) smart(x)) 1. atut (George) Hypothesis 2. smart(george) Hypothesis 3. atut (George) smart(george) intro, 1,2 4. x.(atut (x) smart(x)) generalization, 3 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 33/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 34/38 Summary of Inference Rules for Quantifiers Example I Prove that these hypotheses imply x.(p(x) B(x)): Name Universal Instantiation Universal Generalization Existential Instantiation Existential Generalization Rule of Inference (anyc) (for arbitraryc) for fresh c 1. x. (C (x) B(x)) (Hypothesis) 2. x. (C (x) P(x)) (Hypothesis) 3. C (a) B(a) ( -inst, 1) 4. C (a) ( -elim, 3 ) 5. B(a) ( -elim, 3 ) 6. C (a) P(a) ( -inst, 2) 7. P(a) (Modus ponens, 4, 6) 8. P(a) B(a) ( -intro, 5,7) 9. x.(p(x) B(x)) ( -gen, 8) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 35/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 36/38 6

Example II Prove the below hypotheses are contradictory by deriving false 1. x.(p(x) (Q(x) S(x))) (Hypothesis) 2. x.(p(x) R(x)) (Hypothesis) 3. x.( R(x) S(x)) (Hypothesis) 4. R(a) S(a) ( -inst, 3) 5. P(a) R(a) ( -inst, 2) Example III Prove x. father(x, Evan) from the following premises: 1. x. y. ((parent(x, y) male(x)) father(x, y)) 2. parent(tom, Evan) 3. male(tom) 6. P(a) ( -elim, 5) 7. R(a) ( -elim, 5) 8. S(a) (Resolution, 4, 7) 9. P(a) Q(a) S(a) ( -inst, 1) 10. Q(a) S(a) (Modus ponens, 6, 9) 11. S(a) -elim, 10 12. S(a) S(a) false ( -intro, 8, 11; double negation) Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 37/38 Instructor: Işıl Dillig, CS311H: Discrete Mathematics First Order Logic, Rules of Inference 38/38 7