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

Similar documents
Math.3336: Discrete Mathematics. Nested Quantifiers

Math.3336: Discrete Mathematics. Propositional Equivalences

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Math.3336: Discrete Mathematics. Proof Methods and Strategy

Math.3336: Discrete Mathematics. Chapter 9 Relations

Math.3336: Discrete Mathematics. Cardinality of Sets

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Rules Build Arguments Rules Building Arguments

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

Predicate Logic. Andreas Klappenecker

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

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Advanced Counting Techniques

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

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Propositional Logic Not Enough

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

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

Predicate Logic & Quantification

2. Use quantifiers to express the associative law for multiplication of real numbers.

CS 2336 Discrete Mathematics

MAT 243 Test 1 SOLUTIONS, FORM A

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

The Logic of Compound Statements cont.

A. Propositional Logic

Mat 243 Exam 1 Review

Discrete Structures for Computer Science

Math 3336: Discrete Mathematics Practice Problems for Exam I

PROPOSITIONAL CALCULUS

Readings: Conjecture. Theorem. Rosen Section 1.5

Review: Potential stumbling blocks

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

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

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Introduction to Sets and Logic (MATH 1190)

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

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

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

Intro to Logic and Proofs

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

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

ECOM Discrete Mathematics

DISCRETE MATHEMATICS BA202

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

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

CPSC 121: Models of Computation

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

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.

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

Logic and Proof. Aiichiro Nakano

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Rules of Inference. Arguments and Validity

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

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Solutions to Exercises (Sections )

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Proposi'onal Logic Not Enough

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

Discrete Structures for Computer Science

software design & management Gachon University Chulyun Kim

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

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

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

The proposition p is called the hypothesis or antecedent. The proposition q is called the conclusion or consequence.

Review for Midterm 1. Andreas Klappenecker

ICS141: Discrete Mathematics for Computer Science I

CSE 20 DISCRETE MATH. Winter

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

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

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

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

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

1 The Foundation: Logic and Proofs

Chapter 3. The Logic of Quantified Statements

CSE 20 DISCRETE MATH. Fall

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

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

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

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

1 The Foundation: Logic and Proofs

COMP232 - Mathematics for Computer Science

Announcements CompSci 102 Discrete Math for Computer Science

(Refer Slide Time: 02:20)

ICS141: Discrete Mathematics for Computer Science I

Section Summary. Section 1.5 9/9/2014

Section 2.1: Introduction to the Logic of Quantified Statements

Supplementary Logic Notes CSE 321 Winter 2009

Math 55 Homework 2 solutions

Announcements. CS311H: Discrete Mathematics. Introduction to First-Order Logic. A Motivating Example. Why First-Order Logic?

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

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

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

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

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Transcription:

Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 1/26

Assignments to work on Homework #2 due Wednesday, 9/5, 11:59pm Homework #3 due Wednesday, 9/12, 11:59pm No credit unless turned in by 11:59pm on due date Late submissions not allowed, but lowest homework score dropped when calculating grades Homework will be submitted online in your CASA accounts. You can find the instructions on how to upload your homework in our class webpage. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 2/26

Part II Predicate Logic Predicate Logic Summary The Language of Quantifiers Logical Equivalences Nested Quantifiers Translation from Predicate Logic to English Translation from English to Predicate Logic Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 3/26

Summary of Quantifiers and/or Nested Quantifiers Statement When True? When False? x P(x) P(x) is true for every x P(x) is false for some x x P(x) P(x) is true for some x P(x) is false for every x Statement x y P(x, y) y x P(x, y) x y P(x, y) x y P(x, y) x y P(x, y) y x P(x, y) When True? P(x, y) is true for every pair x, y For every x, there is a y for which P(x, y) is true There is an x for which P(x, y) is true for every y There is a pair x, y for which P(x, y) is true Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 4/26

Translation with Quantifiers Let A(x) and S(x) be two predicates. Universal quantifiers usually go with implications All A(x) is S(x): No A(x) is S(x): x (A(x) S(x)) x (A(x) S(x)) Existential quantifiers usually go with conjunctions Some A(x) is S(x): x (A(x) S(x)) Some A(x) is not S(x): x (A(x) S(x)) Observation: Universal quantifiers usually go with implications, and existential quantifiers go with conjunctions Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 5/26

Understanding Quantifiers and their Orders Let U be the real numbers, and P(x, y) : x y = 0. What is the truth value of the following? x y P(x, y) false x y P(x, y) true x y P(x, y) true x y P(x, y) true Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 6/26

Understanding Quantifiers and their Orders Let U be the real numbers, and P(x, y) : x/y = 1. What is the truth value of the following? x y P(x, y) false x y P(x, y) false x y P(x, y) false x y P(x, y) true Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 7/26

Translating Predicate Logic into English Given predicates student(x), UH (x), and friends(x, y), what do the following formulas say in English? x ((UH(x) student(x)) ( y (friends(x, y) UH (y)))) Every UH student has a friend outside of UH. x ((student(x) UH(x)) y friends(x, y)) Students who are not at UH have no friends. x y ((student(x) student(y) friends(x, y)) (UH(x) UH(y))) If two students are friends, then they are both at UH. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 8/26

Translating English into predicate Logic Given predicates student(x), UH (x), and friends(x, y), how do we express the following in predicate logic? Every UH student has a friend x (student(x) UH(x) y friends(x, y)) At least one UH student has no friends x (student(x) UH(x) y friends(x, y)) All UH students are friends with each other x y (student(x) student(y) UH(x) UH(y)) friends(x, y) Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 9/26

Satisfiability, Validity in Predicate Logic The concepts of satisfiability, validity also important in Predicate Logic A predicate logic 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 A predicate logic 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: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 10/26

Example Is the following formula valid, unsatisfiable, or contingent? Prove your answer. (( x P(x)) ( x Q(x))) ( x (P(x) Q(x))) If we take D = {, }, P( ) = true, P( ) = false, Q( ) = false, Q( ) = true, then the formula above is false. If we take D = {, }, P( ) = true, P( ) = false, Q( ) = true, Q( ) = false, then the formula above is true. Thus, the formula above is contingent. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 11/26

Equivalence Two formulas F 1 and F 2 are equivalent if F 1 F 2 is valid In propositional logic, we could prove equivalence using truth tables, but not possible in predicate logic. 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. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 12/26

Chapter 1 - The Foundations: Logic and Proofs Chapter 1 - Overview Propositional Logic The Language of Propositions Section 1.1 Applications* Section 1.2 Logical Equivalences Section 1.3 Predicate Logic The Language of Quantifiers Section 1.4 Logical Equivalences Section 1.4 Nested Quantifiers Section 1.5 Proofs Rules of Inference Section 1.6 Proof Methods Section 1.7 Proof Strategy Section 1.8 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 13/26

Part III Proofs Proofs Summary Valid Arguments and Rules of Inference Proof Methods Proof Strategies Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 14/26

Section 1.6 Rules of Inference Proofs Summary Valid Arguments Inference Rules for Propositional Logic Using Rules of Inference to Build Arguments Inference Rules for Quantified Statements Building Arguments for Quantified Statements Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 15/26

Rules of Inference We can prove validity in Predicate Logic 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: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 16/26

Modus Ponens Most basic inference rule is modus ponens: φ 1 φ 1 φ 2 φ 2 Modus ponens applicable to both propositional logic and predicate logic Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 17/26

Example Uses of Modus Ponens Application of modus ponens in propositional logic: p q (p q) r Application of modus ponens in first-order logic: r P(a) P(a) Q(b) Q(b) Application of modus ponens in a math proof: If x > 1, then x 2 > x. We know x > 1. Therefore, x 2 > x > 1. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 18/26

Modus Tollens Second important inference rule is modus tollens: φ 1 φ 2 φ 2 φ 1 Recall: φ 1 φ 2 and its contrapositive φ 2 φ 1 are equivalent to each other Therefore, correctness of this rule follows from modus ponens and equivalence of a formula and its contrapositive. Example argument using modus tollens: If x > 1, then x 2 > x. But we know x 2 x. Therefore, x 1. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 19/26

Example Uses of Modus Tollens Application of modus tollens in propositional logic: p (q r) (q r) p Application of modus tollens in predicate logic: Q(a) P(a) Q(a) P(a) Application of modus ponens in a math proof: If x > 1, then x 2 > x. We know x > 1. Therefore, x 2 > x > 1. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 20/26

Hypothetical Syllogism (HS) φ 1 φ 2 φ 2 φ 3 φ 1 φ 3 Basically says implication is transitive An example application of hypothetical syllogism: If I do not wake up, then I cannot go to work. If I cannot go to work, then I will not get paid. If I do not wake up, then I will not get paid. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 21/26

Addition and Elimination Addition: φ 1 φ 1 φ 2 Example application: Socrates is a man. Therefore, either Socrates is a man or there are red elephants on the moon. Elimination (Disjunctive Syllogism): φ 1 φ 2 φ 2 φ 1 Example application: It is either a dog or a cat. It is not a dog. Therefore, it must be a cat. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 22/26

Conjunction and Elimination Conjunction: φ 1 φ 2 φ 1 φ 2 This rule just follows from definition of conjunction Example application: It is Tuesday. It s the afternoon. Therefore, it s Tuesday afternoon. Elimination (Simplification): φ 1 φ 2 φ 1 Example application: It is Tuesday afternoon. Therefore, it is Tuesday. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 23/26

Resolution Final inference rule: resolution φ 1 φ 2 φ 1 φ 3 φ 2 φ 3 To see why this is correct, observe φ 1 is either true or false. Suppose φ 1 is true. Then, φ 1 is false. Therefore, by second hypothesis, φ 3 must be true. Suppose φ 1 is false. Then, by 1st hypothesis, φ 2 must be true. In any case, either φ 2 or φ 3 must be true; φ 2 φ 3 Resolution is key inference rule for automating logical reasoning! Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 24/26

Resolution Example Example 1: Example 2: P(a) Q(b) Q(b) R(c) P(a) R(c) p q q p q Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 25/26

Summary Name Rule of Inference Modus ponens φ 1 φ 1 φ 2 φ 2 Modus tollens φ 1 φ 2 φ 2 φ 1 Hypothetical syllogism Addition Or elimination Conjunction And elimination Resolution φ 1 φ 2 φ 2 φ 3 φ 1 φ 3 φ 1 φ 1 φ 2 φ 1 φ 2 φ 2 φ 1 φ 1 φ 2 φ 1 φ 2 φ 1 φ 2 φ 1 φ 1 φ 2 φ 1 φ 3 φ 2 φ 3 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Nested Quantifiers/Rules of Inference 26/26