Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Similar documents
Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

software design & management Gachon University Chulyun Kim

Rules of Inference. Arguments and Validity

Rules Build Arguments Rules Building Arguments

2.2: Logical Equivalence: The Laws of Logic

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

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

CS 2336 Discrete Mathematics

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

Discrete Structures of Computer Science Propositional Logic I

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

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

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

Review: Potential stumbling blocks

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

PROPOSITIONAL CALCULUS

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

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

The Logic of Compound Statements cont.

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

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

ECOM Discrete Mathematics

Readings: Conjecture. Theorem. Rosen Section 1.5

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

Propositional Logic. Spring Propositional Logic Spring / 32

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

Operations on Sets. Gazihan Alankuş (Based on original slides by Brahim Hnich et al.) August 6, 2012

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

A. Propositional Logic

DISCRETE MATHEMATICS BA202

Intro to Logic and Proofs

Knowledge Representation. Propositional logic

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

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

CSC Discrete Math I, Spring Propositional Logic

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

Compound Propositions

1.1 Statements and Compound Statements

PHI Propositional Logic Lecture 2. Truth Tables

Knowledge Representation. Propositional logic.

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Predicate Logic. Andreas Klappenecker

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.

Packet #1: Logic & Proofs. Applied Discrete Mathematics

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Logic Overview, I. and T T T T F F F T F F F F

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

CSE 20: Discrete Mathematics

THE LOGIC OF COMPOUND STATEMENTS

Logic, Sets, and Proofs

Review. p q ~p v q Contrapositive: ~q ~p Inverse: ~p ~q Converse: q p

Section 1.2: Propositional Logic

1 The Foundation: Logic and Proofs

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Math 3336: Discrete Mathematics Practice Problems for Exam I

We last time we began introducing equivalency laws.

Language of Propositional Logic

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

FORMAL PROOFS DONU ARAPURA

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Proof Tactics, Strategies and Derived Rules. CS 270 Math Foundations of CS Jeremy Johnson

1 The Foundation: Logic and Proofs

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

Supplementary Logic Notes CSE 321 Winter 2009

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

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/33

ICS141: Discrete Mathematics for Computer Science I

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

15414/614 Optional Lecture 1: Propositional Logic

Anna University, Chennai, November/December 2012

A Quick Lesson on Negation

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

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

EECS 1028 M: Discrete Mathematics for Engineers

Manual of Logical Style

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

Where are my glasses?

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

Equational Logic: Part 2. Roland Backhouse March 6, 2001

PHIL 50 - Introduction to Logic

The Logic of Compound Statements. CSE 2353 Discrete Computational Structures Spring 2018

Proof strategies, or, a manual of logical style

Logic and Proof. Aiichiro Nakano

[Ch 3, 4] Logic and Proofs (2) 1. Valid and Invalid Arguments ( 2.3, 3.4) 400 lecture note #2. 1) Basics

Propositional Calculus: Formula Simplification, Essential Laws, Normal Forms

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Advanced Topics in LP and FP

UNIT 2: A DISCUSSION ON FUNDAMENTALS OF LOGIC

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

Transcription:

Discrete Structures of Computer Science Propositional Logic III Rules of Inference Gazihan Alankuş (Based on original slides by Brahim Hnich) July 30, 2012

1 Previous Lecture 2 Summary of Laws of Logic 3 Substitution Laws 4 Logic Inference 5 Rules of Inference

Previous Lecture Logically equivalent statement Statements Φ and Ψ are equivalent iff Φ Ψ is a tautology Main logic equivalences double negation DeMorgan s Laws commutative, associative, and distributive laws idempotent, identity, and domination laws the law of contradiction and the law of excluded middle absorption law

Laws of Logic Double Negation : p p DeMorgan s Laws (p q) p q (p q) p q

Algebraic Laws of Logic Commutative laws p q q p p q q p Associative laws Distributive laws Idempotent laws p (q r) (p q) r p (q r) (p q) r p (q r) (p q) (p r) p (q r) (p q) (p r) p p p p p p

Logic Laws of Logic Identity laws p T p p F p Inverse laws also known as the law of contradiction or the law of excluded middle p p F p p T Domination laws Absorption laws p F F p T T p (p q) p p (p q) p

More useful equivalences p q (p q) p q (p q) (q p) p q p q

Example Show that (p q) p q

First Law of Substitution Suppose that the compound statement Φ is a tautology. If p is a primitive statement that appears in Φ and we replace each occurrence of p by the same statement q, then the resulting compound statement Ψ is also a tautology Let Φ = (p q) (q p) be a tautology, and we substitute p by p (s r). Therefore ((p (s r)) q) (q (p (s r))) is a tautology

Second Law of Substitution Let Φ be a compound statement, p an arbitrary (not necessarily primitive) statement that appears in Φ, and let q be a statement such that p q. If we replace one or more occurrences of p by q, then for the resulting compound statement Ψ we have Φ Ψ Let Φ = (p q) (q p), and we substitute the first occurrence of p by p (p q). Therefore ((p (p q)) q) (q p) is logically equivalent to Φ Recall that p p (p q) by absorption law

Logic inference One of the main goals of logic is to distinguish between valid and invalid arguments What can we say about the following arguments? If you have a current password, then you can log onto the network. You have a current password. Therefore, you can log onto the network. If you have a current password, then you can log onto the network. You can log onto the network. Therefore, you have a current password.

Logic inference (cntd) Write the above arguments in symbolic form p stand for you have a current password q stands for you can log onto the network p q p q p q q p stands for Therefore

Inference and Tautologies p q p q Check that Φ = ((p q) p)) q is a tautology If (p q) p is false, that is if one of the p q and p is false, then Φ is true If (p q) p is true, then both p q and p are true. Since the implication p q is true and p is true, q must also be true. Therefore, Φ is true Therefore whatever the values of p and q are, Φ is a tautology The first example is a valid argument!!!

Inference and Tautologies p q q p Let us try Ψ = ((p q) q) p p q p q ((p q) q) Ψ 0 0 1 0 1 0 1 1 1 0 1 0 0 0 1 1 1 1 1 1 Since Ψ is not a tautology, the second example is not a valid argument!!!

General Definition of Inference The general form of an argument in a symbolic form is (p 1 p 2 p 3... p n ) q where each p i is called a premise and q the conclusion The argument is valid if whenever each of the premises is true, the conclusion is also true The argument is valid if and only if the following compound statement is a tautology (p 1 p 2 p 3... p n ) q

Modus Ponens p q p q If you have a current password, then you can log onto the network. You have a current password. Therefore, you can log onto the network p: You have a current password q: You can log onto the network

Rule of Syllogism p q q r p r If you send an email, then I ll finish writing the program. If I finish writing the program, then I ll go to sleep early p: You will send an email q: I will finish writing the program r: I will go to sleep early Therefore, if you send me an email, then I will go to sleep early Thus ((p q) (q r)) (p r) is a tautology

Rule of Tollens p q q p If today is Friday, then tomorrow I will go biking. I will not go biking tomorrow p: Today is Friday q: I will go biking tomorrow. Therefore, today is not Friday Thus ((p q) q) p is a tautology

Rule of Disjunctive Syllogism p q p q I will go biking on Saturday or on Sunday. I will not go biking on Saturday p: I will go biking on Saturday q: I will go biking on Sunday Therefore, I will go biking on Sunday Thus ((p q) p) q is a tautology

Rule for Proof by Cases p r q r (p q) r If today is Saturday, then I will go biking. If today is Sunday, then I will go biking p: Today is Saturday q: Today is Sunday r: I will go biking Therefore, if today is Saturday or Sunday, then I will go biking Thus ((p r) (q r)) ((p q) r) is a tautology

Rule of Contradiction p F p Thus ( p F ) p is a tautology

Rule of Simplification Thus (p q) p is a tautology p q p

Rule of Amplification Thus p (p q) is a tautology p p q

Argumentation The goal of argument is to infer the required conclusion from given premises Definition An argument is a sequence of statements, each of which is either a premise, or obtained from preceding statements by means of a rule of inference

Example Premises: It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny this afternoon. If we do not go swimming, then we will take a canoe trip. If we take a canoe trip, then we will be home by sunset. Conclusion: We will be home by sunset

Example (cntd) Notation: p: It is sunny this afternoon q: It is colder than yesterday r: We will go swimming s: We will take a canoe trip t: We will be home by sunset Premises: p q, r p, r s, and s t Conclusion: t

Example (cntd) Step Reason 1. p q premise 2. p Simplification 3. r p premise 4. r modus tollens 5. r s premise 6. s modus ponens 7. s t premise 8. t modus ponens