Predicates and Quantifiers. CS 231 Dianna Xu

Similar documents
Propositional Logic Not Enough

ICS141: Discrete Mathematics for Computer Science I

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

1.3 Predicates and Quantifiers

Proposi'onal Logic Not Enough

Section Summary. Section 1.5 9/9/2014

Introduction to Sets and Logic (MATH 1190)

CS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks

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

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

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

Announcement. Homework 1

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Predicate Calculus lecture 1

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Discrete Structures for Computer Science

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

Announcements CompSci 102 Discrete Math for Computer Science

Section 2.1: Introduction to the Logic of Quantified Statements

Chapter 2: The Logic of Quantified Statements. January 22, 2010

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

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

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof

Transparencies to accompany Rosen, Discrete Mathematics and Its Applications Section 1.3. Section 1.3 Predicates and Quantifiers

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Formal (Natural) Deduction for Predicate Calculus

Discrete Mathematics and Its Applications

Recall that the expression x > 3 is not a proposition. Why?

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Lecture 3. Logic Predicates and Quantified Statements Statements with Multiple Quantifiers. Introduction to Proofs. Reading (Epp s textbook)

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

Predicate Logic & Quantification

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

Chapter 1, Part II: Predicate Logic

Predicate Logic: Introduction and Translations

Predicate Calculus - Syntax

Thinking of Nested Quantification

Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

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

Predicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

University of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter

Introduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1)

Math.3336: Discrete Mathematics. Nested Quantifiers

Discrete Structures Lecture Predicates and Quantifiers

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional.

First order Logic ( Predicate Logic) and Methods of Proof

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

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

Section 2.3: Statements Containing Multiple Quantifiers

For all For every For each For any There exists at least one There exists There is Some

Predicate Calculus. CS 270 Math Foundations of Computer Science Jeremy Johnson

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

Mat 243 Exam 1 Review

Review: Potential stumbling blocks

Discrete Structures Lecture 5

Lecture 4. Predicate logic

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

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Symbolising Quantified Arguments

Philosophy 240 Symbolic Logic Russell Marcus Hamilton College Fall 2014

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Logic and Propositional Calculus

Discrete Structures Homework 1


Variable Names. Some Ques(ons about Quan(fiers (but answers are not proven just stated here!) x ( z Q(z) y P(x,y) )

1 Predicates and Quantifiers

THE LOGIC OF QUANTIFIED STATEMENTS

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

THE LOGIC OF QUANTIFIED STATEMENTS

Negations of Quantifiers

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s).

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

Logic and Propositional Calculus

EECS 1028 M: Discrete Mathematics for Engineers

DISCRETE MATHEMATICS BA202

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

15414/614 Optional Lecture 3: Predicate Logic

Discrete Mathematics (CS503)

Math Fundamentals of Higher Math

2-4: The Use of Quantifiers

Introduction to Decision Sciences Lecture 2

Rules Build Arguments Rules Building Arguments

Introduction to first-order logic:

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Semantics I, Rutgers University Week 3-1 Yimei Xiang September 17, Predicate logic

MAT2345 Discrete Math

Solutions to Exercises (Sections )

Department of Mathematics and Statistics Math B: Discrete Mathematics and Its Applications Test 1: October 19, 2006

Proving logical equivalencies (1.3)

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. February 9, :30 pm Duration: 1:50 hs. Closed book, no calculators

Transcription:

Predicates and Quantifiers CS 231 Dianna Xu 1

Predicates Consider P(x) = x < 5 P(x) has no truth values (x is not given a value) P(1) is true 1< 5 is true P(10) is false 10 < 5 is false Thus, P(x) will become a statement/proposition when x is given a value 2

Truth set of predicates Let P(x) = x is a multiple of 5 For what values of x is P(x) true? Let P(x) = x+1 > x For what values of x is P(x) true? Let P(x) = x + 3 For what values of x is P(x) true? 3

Multiple variables Functions/predicates with multiple variables: P(x,y) = x + y == 0 P(1,2) is false, P(1,-1) is true P(x,y,z) = x + y == z P(3,4,5) is false, P(1,2,3) is true P(x 1,x 2,x 3 x n ) = 4

Quantifiers A quantifier is an operator that limits the variables of a predicate Two types: Universal Existential 5

Universal quantifiers 1 Represented by an upside-down A: " It means for all Let P(x) = x+1 > x We can state the following: "x, P(x) English translation: for all values of x, P(x) is true English translation: for all values of x, x+1>x is true 6

Universal quantifiers 2 But is that always true? "x P(x) Let x = the character a Is a +1 > a? Let x = the state of Pennsylvania Is Pennsylvania+1 > Pennsylvania? You need to specify your universe! What values x can represent Known as the domain of x 7

Universal quantifiers 3 "x ϵ R, P(x) Let P(x) = x/2 < x "x ϵ R, P(x)? To prove that a universal quantification is true, it must be shown for ALL cases exhaustion To prove that a universal quantification is false, it must be shown to be false for only ONE case counter example 8

Existential quantification 1 Represented by an backwards E: $ It means there exists Let P(x) = x+1 > x We can state the following: $x, P(x) English translation: there exists (a value of) x such that P(x) is true English translation: for at least one value of x, x+1>x is true 9

Existential quantification 2 Note that you still have to specify your domain If the domain we are talking about is all the states in the US, then $x P(x) is not true 10

Existential quantification 3 In order to show an existential quantification is true, you only have to find ONE value In order to show an existential quantification is false, you have to show it s false for ALL values 11

P(x) = x < 1 A note on quantifiers There are two ways to make a predicate (propositional function) into a statement (proposition): Supply it with a value For example, P(5) is false, P(0) is true Provide a quantification "x ϵ Z, P(x) is false and $x ϵ Z, P(x) is true 12

Universal Conditional Statements "x, if P(x) then Q(x) "x, P(x) Q(x) "x ϵ R, if x > 0 then x+2 > 0 Consider If a number is positive, then it is not zero Implicit quantification P(x) implies Q(x) "x, P(x) Q(x) P(x) iff Q(x) "x, P(x) Q(x) 13

Translation from English Consider All cats are black Let C be the set of all cats "x ϵ C, x is black Let B(x) be x is black : "x ϵ C, B(x) Some people are crazy Let P be the set of all people $x ϵ P, x is crazy Let Crazy(x) be x is crazy : $x ϵ P, Crazy(x) 14

Translation from English Consider Every student in this class has studied compound statements Rephrased: For every student x in this class, x has studied compound statements Let C(x) be x has studied compound statements "x, C(x), where the domain is all students in this class 15

Equivalent forms What if the domain is all people? Let S(x) be x is a student in this class Consider: "x (S(x)ÙC(x)) "x, S(x) C(x) "x, C(x), where the domain is all students in this class "x ϵ U, S(x) C(x) "x ϵ D, C(x), where D is the domain consisting of the truth set of S(x) 16

Translating from English Consider: Some students have visited Mexico Every student has visited Canada or Mexico Let: S(x) be x is a student M(x) be x has visited Mexico C(x) be x has visited Canada 17

Translating from English Consider: Some students have visited Mexico $x ϵ D, M(x) where D = all students What if the domain is all people? Consider: $x, (S(x) M(x)) $x, (S(x) Ù M(x)) 18

Translating from English Consider: Every student has visited Canada or Mexico "x ϵ D, M(x)ÚC(x) D = all students "x, (S(x) (M(x)ÚC(x)) 19

Negating quantifications Consider the statement: All students in this class have red hair What is required to show the statement is false? There exists a student in this class that does NOT have red hair To negate a universal quantification: Negate the predicate AND change to an existential quantification Change All are to Some are not ~("x ϵ D, P(x)) $x ϵ D, ~P(x) 20

Negating quantifications 2 Consider the statement: There is a student in this class with red hair What is required to show the statement is false? All students in this class do not have red hair Thus, to negate an existential quantification: Negate the predicate AND change to a universal quantification ~($x ϵ D, P(x)) "x ϵ D, ~P(x) 21

More negations No man is an island John Donne "x, x is not an island $x, x is an island Some men are islands All that glitters is not gold Chaucer and Shakespeare 22

Negation of universal conditionals ~("x ϵ D, P(x) Q(x)) $x ϵ D, ~(P(x) Q(x)) ~("x ϵ D, P(x) Q(x)) $x ϵ D, P(x) Ù ~Q(x) For all people x, if x is rich then x is happy There is one person who is rich and is not happy There is one person who is rich but not happy 23

" and Ù Given a predicate P(x) and values in the domain {x 1,, x n } The universal quantification "x P(x) implies: P(x 1 ) Ù P(x 2 ) Ù Ù P(x n ) 24

$ and Ú Given a predicate P(x) and values in the domain {x 1,, x n } The existential quantification $x P(x) implies: P(x 1 ) Ú P(x 2 ) Ú Ú P(x n ) 25

Translating from English Translate the statements: All hummingbirds are richly colored No large birds live on honey Birds that do not live on honey are dull in color Hummingbirds are small Assign our predicates Let P(x) be x is a hummingbird Let Q(x) be x is large Let R(x) be x lives on honey Let S(x) be x is richly colored Let our domain be all birds 26

Translating from English All hummingbirds are richly colored "x, (P(x) S(x)) No large birds live on honey ~$x, (Q(x) Ù R(x)) Alternatively: "x, (~Q(x) Ú ~R(x)) Birds that do not live on honey are dull in color "x, (~R(x) ~S(x)) Hummingbirds are small "x, (P(x) ~Q(x)) 27