Lecture 1.2: Equivalences, and Predicate Logic

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Propositional Equivalences. L32 Agenda Tautologies Logical Equivalences.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Chapter 1: The Foundations: Logic and Proofs
CSci 2011 Discrete Mathematics Lecture 3 CSci 2011.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Discrete Mathematics. Propositional Logic 10/8/2015 What’s a proposition? PropositionsNot Propositions = 32Bring me coffee! CS173 is Bryan’s favorite.
Tautologies, contradictions, contingencies
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Lecture 1.2: Equivalences, and Predicate Logic* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren, Zeph.
CS203 Discrete Mathematical Structures Logic (2).
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Lecture 2.2: Set Theory* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Discrete Mathematics. Predicates - the universal quantifier 11/28/2015 Suppose P(x) is a predicate on some universe of discourse. Ex. B(x) = “x is carrying.
Chapter 1: The Foundations: Logic and Proofs
Lecture Predicates and Quantifiers 1.4 Nested Quantifiers.
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Discrete Structures Predicate Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
Lecture 2.2: Set Theory CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2015 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Lecture 1.4: Rules of Inference, and Proof Techniques* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Discrete Mathematics Mathematical reasoning: think logically; know how to prove Combinatorial analysis: know how to count Discrete structures: represent.
Statements Containing Multiple Quantifiers Lecture 11 Section 2.3 Mon, Feb 5, 2007.
321 Section, Week 2 Natalie Linnell. Extra Credit problem.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Lecture 1.3: Predicate Logic, and Rules of Inference* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Lecture 1.5: Proof Techniques CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren 1.
Introduction to Predicates and Quantified Statements I Lecture 9 Section 2.1 Wed, Jan 31, 2007.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Lecture 1.5: Proof Techniques
Propositional Logic.
The Foundations: Logic and Proofs
Advanced Algorithms Analysis and Design
Semantic Web Logic.
CSE15 Discrete Mathematics 01/23/17
CSNB 143 Discrete Mathematical Structures
Lecture 1.4: Rules of Inference
CSE 311 Foundations of Computing I
Lecture 1.5: Proof Techniques
(CSC 102) Discrete Structures Lecture 2.
CPCS222 Discrete Structures I
Proposition & Predicates
CS203 Discrete Mathematical Structures
Discrete Structures for Computer Science
CMSC Discrete Structures
Chapter 1 The Foundations: Logic and Proofs
CSCI 3310 Mathematical Foundation of Computer Science
Discrete Mathematics CS 2610
Propositional Equivalences
1.4 Predicates and Quantifiers
CS 220: Discrete Structures and their Applications
CS 220: Discrete Structures and their Applications
CS201: Data Structures and Discrete Mathematics I
Introduction to Predicates and Quantified Statements II
CSE 311 Foundations of Computing I
Introduction to Predicates and Quantified Statements I
Lecture 1.6: Proof Techniques (contd)
Lecture 1.3: Predicate Logic
Lecture 2: Propositional Equivalences
CS 250, Discrete Structures, Fall 2013
Lecture 1.6: Proof Techniques (contd)
Predicates and Quantifiers
CS 250, Discrete Structures, Fall 2014 Nitesh Saxena
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Lecture 1.4: Rules of Inference
CS201: Data Structures and Discrete Mathematics I
Lecture 1.3: Predicate Logic
Presentation transcript:

Lecture 1.2: Equivalences, and Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren, Zeph Grunschlag

Lecture 1.2 - Equivalence, and Predicate Logic Course Admin Everyone receiving my emails? Lecture slides worked okay? Everyone knows how to access the course web page? TA/Grader office hours Mondays: 8-9am Tuesdays: 9-10am 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Outline Equivalences (contd.) Predicate Logic (Predicates and Quantifiers) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Propositional Logic – Logical Equivalence p is logically equivalent to q if their truth tables are the same. We write p  q. In other words, p is logically equivalent to q if p  q is True. There are some famous laws of equivalence, which we review next. Very useful in simplifying complex composite propositions 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Laws of Logical Equivalences Rosen; page 27: Table 6 Identity laws Like adding 0 Domination laws Like multiplying by 0 Idempotent laws Delete redundancies Double negation “I don’t like you, not” Commutativity Like “x+y = y+x” Associativity Like “(x+y)+z = y+(x+z)” Distributivity Like “(x+y)z = xz+yz” De Morgan 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

De Morgan’s Law - generalized De Morgan’s law allow for simplification of negations of complex expressions Conjunctional negation: (p1p2…pn)  (p1p2…pn) “It’s not the case that all are true iff one is false.” Disjunctional negation: (p1p2…pn)  (p1p2…pn) “It’s not the case that one is true iff all are false.” Let us do a quick (black board) proof to show that the law holds 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Another equivalence example if NOT (blue AND NOT red) OR red then… (p  q)  q  p  q (p  q)  q  (p  q)  q DeMorgan’s (p  q)  q Double negation p  (q  q) Associativity p  q Idempotent 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Yet another example Show that [p  (p  q)]  q is a tautology. We use  to show that [p  (p  q)]  q  T. [p  (p  q)]  q  [(p  p)  (p  q)]q  [p  (p  q)] q  [ F  (p  q)]  q  (p  q)  q  (p  q)  q  (p  q)  q  p  (q  q )  p  T  T substitution for  distributive uniqueness identity substitution for  De Morgan’s associative uniqueness domination 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicate Logic – why do we need it? Proposition, YES or NO? 3 + 2 = 5 X + 2 = 5 X + 2 <= 5 for any choice of X in {1, 2, 3} X + 2 = 5 for some X in {1, 2, 3} Propositional logic can not handle statements such as the last two. Predicate logic can. YES NO YES YES 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicate Logic Example Alicia eats pizza at least once a week. Garrett eats pizza at least once a week. Allison eats pizza at least once a week. Gregg eats pizza at least once a week. Ryan eats pizza at least once a week. Meera eats pizza at least once a week. Ariel eats pizza at least once a week. … 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicates -- Definition Alicia eats pizza at least once a week. Define: P(x) = “x eats pizza at least once a week.” Universe of Discourse - x is a student in cs250 A predicate, or propositional function, is a function that takes some variable(s) as arguments and returns True or False. Note that P(x) is not a proposition, P(Ariel) is. … 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicates with multiple variables Suppose Q(x,y) = “x > y” Proposition, YES or NO? Q(x,y) Q(3,4) Q(x,9) NO YES Predicate, YES or NO? Q(x,y) Q(3,4) Q(x,9) NO YES NO YES 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

The Universal Quantifier Another way of changing a predicate into a proposition. Suppose P(x) is a predicate on some universe of discourse. The universal quantifier of P(x) is the proposition: “P(x) is true for all x in the universe of discourse.” We write it x P(x), and say “for all x, P(x)” x P(x) is TRUE if P(x) is true for every single x. x P(x) is FALSE if there is an x for which P(x) is false. Ex: B(x) = “x is carrying a backpack,” x is a set of cs250 students. x B(x)? 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

The Universal Quantifier - example Universe of discourse is people in this room. B(x) = “x is allowed to drive a car” L(x) = “x is at least 16 years old.” Are either of these propositions true? x (L(x)  B(x)) x B(x) A: only a is true B: only b is true C: both are true D: neither is true 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

The Existential Quantifier Another way of changing a predicate into a proposition. Suppose P(x) is a predicate on some universe of discourse. The existential quantifier of P(x) is the proposition: “P(x) is true for some x in the universe of discourse.” We write it x P(x), and say “for some x, P(x)” x P(x) is TRUE if there is an x for which P(x) is true. x P(x) is FALSE if P(x) is false for every single x. Ex. C(x) = “x has black hair,” x is a set of cs 250 students. x C(x)? 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

The Existential Quantifier - example Universe of discourse is people in this room. B(x) = “x is wearing sneakers.” L(x) = “x is at least 21 years old.” Y(x)= “x is less than 24 years old.” Are either of these propositions true? x B(x) x (Y(x)  L(x)) A: only a is true B: only b is true C: both are true D: neither is true 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicates – more examples Universe of discourse is all creatures. L(x) = “x is a lion.” F(x) = “x is fierce.” C(x) = “x drinks coffee.” All lions are fierce. Some lions don’t drink coffee. Some fierce creatures don’t drink coffee. x (L(x)  F(x)) x (L(x)  C(x)) x (F(x)  C(x)) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Predicates – some more example B(x) = “x is a hummingbird.” L(x) = “x is a large bird.” H(x) = “x lives on honey.” R(x) = “x is richly colored.” All hummingbirds are richly colored. No large birds live on honey. Birds that do not live on honey are dully colored. Universe of discourse is all creatures. x (B(x)  R(x)) x (L(x)  H(x)) x (H(x)  R(x)) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Quantifier Negation x (L(x)  H(x)) No large birds live on honey. x P(x) means “P(x) is true for some x.” What about x P(x) ? Not [“P(x) is true for some x.”] “P(x) is not true for all x.” x P(x) So, x P(x) is the same as x P(x). x (L(x)  H(x)) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Quantifier Negation x (L(x)  H(x)) Not all large birds live on honey. x P(x) means “P(x) is true for every x.” What about x P(x) ? Not [“P(x) is true for every x.”] “There is an x for which P(x) is not true.” x P(x) So, x P(x) is the same as x P(x). x (L(x)  H(x)) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Quantifier Negation So, x P(x) is the same as x P(x). So, x P(x) is the same as x P(x). General rule: to negate a quantifier, move negation to the right, changing quantifiers as you go. 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Lecture 1.2 - Equivalence, and Predicate Logic Some quick questions p  T =? (what law?) p  T =? (what law?) (p  q) = ? (what law?) P(x) = “x >3” P(x) is a proposition: yes or no? P(3) is a proposition: yes or no? If yes, what is its value? P(4) is True or False? If the universe of discourse is all natural numbers, what is the value of x P(x) x P(x) 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic

Today’s Reading and Next Lecture Rosen 1.3 and 1.4 Please start solving the exercises at the end of each chapter section. They are fun. Please read 1.4 and 1.5 in preparation for the next lecture 5/13/2018 Lecture 1.2 - Equivalence, and Predicate Logic