COMP Intro to Logic for Computer Scientists. Lecture 6

Similar documents
UWO CS2214 Jan. 19, Assignment #1 Due: Jan. 29, 2017, by 23:55 Submission: on the OWL web site of the course

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

COMP Intro to Logic for Computer Scientists. Lecture 13

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Logic. Propositional Logic: Syntax

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

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Section 1.2: Propositional Logic

Propositional Logic. Argument Forms. Ioan Despi. University of New England. July 19, 2013

The Logic of Compound Statements cont.

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

PHI Propositional Logic Lecture 2. Truth Tables

Logic. Propositional Logic: Syntax. Wffs

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

PROPOSITIONAL CALCULUS

Logical Form 5 Famous Valid Forms. Today s Lecture 1/26/10

Rules Build Arguments Rules Building Arguments

DISCRETE MATH: LECTURE 3

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

PHIL 50 - Introduction to Logic

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

DISCRETE MATH: LECTURE 6

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

FORMAL PROOFS DONU ARAPURA

Inference and Proofs (1.6 & 1.7)

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

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

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Propositional Logic: Syntax

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

Maryam Al-Towailb (KSU) Discrete Mathematics and Its Applications Math. Rules Math. of1101 Inference 1 / 13

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

THE LOGIC OF COMPOUND STATEMENTS

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

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

Today s Lecture 2/25/10. Truth Tables Continued Introduction to Proofs (the implicational rules of inference)

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:

Review The Conditional Logical symbols Argument forms. Logic 5: Material Implication and Argument Forms Jan. 28, 2014

Computational Intelligence Lecture 13:Fuzzy Logic

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

For a horseshoe statement, having the matching p (left side) gives you the q (right side) by itself. It does NOT work with matching q s.

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Predicate Logic. Andreas Klappenecker

Fuzzy Sets and Systems. Lecture 4 (Fuzzy Logic) Bu- Ali Sina University Computer Engineering Dep. Spring 2010

Intermediate Logic. Natural Deduction for TFL

(Refer Slide Time: 02:20)

Propositional Logic: Review

A Primer on Logic Part 2: Statements, Truth Functions, and Argument Schemas Jason Zarri. 1. Introduction

DISCRETE MATH: LECTURE Chapter 3.3 Statements with Multiple Quantifiers If you want to establish the truth of a statement of the form

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Valid Reasoning. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing February, Outline Truth and Validity Valid Reasoning

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Propositional Logic (2A) Young W. Lim 11/8/15

Reexam in Discrete Mathematics

Supplementary Logic Notes CSE 321 Winter 2009

Solving Problems by Inductive Reasoning

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

PHIL12A Section answers, 28 Feb 2011

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

Analyzing Arguments with Truth Tables

Section 1.3: Valid and Invalid Arguments

Last Time. Inference Rules

Logic and Truth Tables

Natural deduction for truth-functional logic

15414/614 Optional Lecture 1: Propositional Logic

Advanced Topics in LP and FP

COMP 2600: Formal Methods for Software Engineeing

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

10/13/15. Proofs: what and why. Proposi<onal Logic Proofs. 1 st Proof Method: Truth Table. A sequence of logical arguments such that:

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

First Order Logic Arguments (5A) Young W. Lim 2/24/17

Resolution (14A) Young W. Lim 8/15/14

Discrete Mathematics

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

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

3 The Semantics of the Propositional Calculus

CSE 20 DISCRETE MATH. Fall

Manual of Logical Style (fresh version 2018)

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

Manual of Logical Style

Deductive and Inductive Logic

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional natural deduction

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

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

Propositional Logic Review

1.1 Statements and Compound Statements

Department of Computer Science & Software Engineering Comp232 Mathematics for Computer Science

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

4 Derivations in the Propositional Calculus

Formal Logic. Critical Thinking

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

Logik für Informatiker Logic for computer scientists

6. Conditional derivations

CSE 20 DISCRETE MATH. Winter

Transcription:

COMP 1002 Intro to Logic for Computer Scientists Lecture 6 B 5 2 J

Treasure hunt In the back of an old cupboard you discover a note signed by a pirate famous for his bizarre sense of humour and love of logical puzzles. In the note he wrote that he had hidden a treasure somewhere on the property. He listed 5 true statements and challenged the reader to use them to figure out the location of the treasure

Treasure hunt 1. If this house is next to a lake, then a treasure is not in the kitchen 2. If the tree in the font yard is an elm, then the treasure is in the kitchen 3. This house is next to a lake 4. The tree in the front yard is an elm, or the treasure is buried under the flagpole 5. If the tree in the back yard is an oak, then the treasure is in the garage.

Treasure hunt 1. If this house is next to a lake, then a treasure is not in the kitchen 2. If the tree in the font yard is an elm, then the treasure is in the kitchen. 3. This house is next to a lake 4. The tree in the front yard is an elm, or the treasure is buried under the flagpole 5. If the tree in the back yard is an oak, then the treasure is in the garage. Too many variables for a nice truth table... A: this house is next to a lake. B: the treasure is in the kitchen C: The tree in front is elm D: the treasure is under the flagpole. E: The tree in the back is oak F: The treasure is in the garage 1. If A then not B 2. If C then B 3. A 4. C or D 5. If E then F 1. A B 2. C B 3. A 4. C D 5. E F

Natural deduction A: this house is next to a lake. B: the treasure is in the kitchen C: The tree in front is elm D: the treasure is under the flagpole. E: The tree in the back is oak F: The treasure is in the garage If house is next to the lake then the treasure is not in the kitchen The house is next to the lake Therefore, the treasure is not in the kitchen. 1. If A then not B 2. If C then B 3. A 4. C or D 5. If E then F 6. Not B 7. Not C 8. D

Arguments and validity An argument, in logic, is a sequence of propositional statements. Called argument form when statements are formulas involving variables. The last statement in the sequence is called the conclusion. All the rest are premises. An argument is valid if whenever all premises are true, the conclusion is also true. So if premises are P 1,, P n, and conclusion is P n+1, then the argument is valid if and only if P 1 P 2 P n P n+1 is a tautology

Treasure hunt 1. If this house is next to a lake, then a treasure is not in the kitchen 2. If the tree in the font yard is an elm, then the treasure Premises in the kitchen 3. This house next to a lake 4. The tree in the front yard is an elm, or the treasure is buried under the flagpole 5. If the tree in the back yard is an oak, then the treasure is in the garage. 6. The treasure is under the flagpole. Conclusion

Arguments and validity Arguments are often written in this format: Symbol is pronounced therefore P 1 P 2 P n P n+1 If house is next to the lake then the treasure is not in the kitchen The house is next to the lake the treasure is not in the kitchen If x > 3, then x > 2 If x > 2, then x 1 x > 3 x 1

Arguments and validity Valid argument: AND of premises conclusion is a tautology If house is next to the lake then the treasure is not in the kitchen The house is next to the lake the treasure is not in the kitchen Valid argument: ( p q p q is a tautology If x > 3, then x > 2 If x > 2, then x 1 x > 3 x 1 Valid argument: p q q r p r is a tautology If x > 3, then x > 2 If x > 2, then x 1 x 1 x > 3 Invalid argument! p q q r r p is a not a tautology! False when r is true, and p and q are both false.

Natural deduction A: this house is next to a lake. B: the treasure is in the kitchen C: The tree in front is elm D: the treasure is under the flagpole. E: The tree in the back is oak F: The treasure is in the garage If house is next to the lake then the treasure is not in the kitchen The house is next to the lake Therefore, the treasure is not in the kitchen. 1. If A then not B 2. If C then B 3. A 4. C or D 5. If E then F 6. Not B 7. Not C 8. D How do we get the intermediate steps?

Rules of inference Just like we used equivalences to simplify a formula instead of writing truth tables Can apply tautologies of the form F G so that if F is an AND of several formulas derived so far, then we get G, and add G to premises. Such as ( p q p) q Keep going until we get the conclusion. If house is next to the lake then the treasure is not in the kitchen The house is next to the lake Therefore, the treasure is not in the kitchen. Here, p is the house is next to the lake, and q is the treasure is not in the kitchen.

Modus ponens The main rule of inference, given by the tautology p q p q, is called Modus Ponens. If house is next to the lake then the treasure is not in the kitchen The house is next to the lake the treasure is not in the kitchen If Socrates is a man, then Socrates is mortal Socrates is a man Socrates is mortal If x > 2, then x 1 x > 2 x 1

Modus ponens and friends There are several rules related to modus ponens Technically not modus ponens, but easily equivalent Since p q p q q p Most textbooks consider them separate rules; we don t. But if somebody asks you specifically what is modus ponens, that s the first rule below. p q p q q p p q p q p q

Resolution rule and friends Another group of equivalent rules is the resolution rule (that we will see a lot in the next lecture) And its friend transitivity, also known as hypothetical syllogism Resolution p q q r p r Transitivity p q q r p r If x > 3 then x > 2 If x > 2 then x > 1 If x > 3 then x > 1

Auxiliary rules These are short common-sense rules. You don t need to know them by name, just be able to use them. p q p q p q p p p q If derived both p and q, can conclude p q If p q is true, then in particular p is true If p is true, then p q is true for any possible q

False premises An argument can still be valid when some of its premises are false. Remember, false implies anything. Bertrand Russell: If 2+2=5, then I am the pope Puzzle 7: can you see how to prove this?