SlideShare une entreprise Scribd logo
1  sur  37
Predicates and Quantifiers 
1
Limitations of proposition logic 
• Proposition logic cannot adequately express 
the meaning of statements 
• Suppose we know 
“Every computer connected to the university 
network is functioning property” 
• No rules of propositional logic allow us to 
conclude 
“MATH3 is functioning property” 
where MATH3 is one of the computers connected to 
the university network 2
Example 
• Cannot use the rules of propositional logic to 
conclude from 
“CS2 is under attack by an intruder” 
where CS2 is a computer on the university network 
to conclude the truth 
“There is a computer on the university network that 
is under attack by an intruder” 
3
Predicate and quantifiers 
• Can be used to express the meaning of a wide 
range of statements 
• Allow us to reason and explore relationship 
between objects 
• Predicates: statements involving variables, 
e.g., “x > 3”, “x=y+3”, “x+y=z”, “computer x is 
under attack by an intruder”, “computer x is 
functioning property” 
4
Example: x > 3 
• The variable x is the subject of the statement 
• Predicate “is greater than 3” refers to a property 
that the subject of the statement can have 
• Can denote the statement by p(x) where p denotes 
the predicate “is greater than 3” and x is the variable 
• p(x): also called the value of the propositional 
function p at x 
• Once a value is assigned to the variable x, p(x) 
becomes a proposition and has a truth value 
5
Example 
• Let p(x) denote the statement “x > 3” 
– p(4): setting x=4, thus p(4) is true 
– p(2): setting x=2, thus p(2) is false 
• Let a(x) denote the statement “computer x is under 
attack by an intruder”. Suppose that only CS2 and 
MATH1 are currently under attack 
– a(CS1)? : false 
– a(CS2)? : true 
– a(MATH1)?: true 
6
Quantifiers 
• Express the extent to which a predicate is true 
• In English, all, some, many, none, few 
• Focus on two types: 
– Universal: a predicate is true for every element 
under consideration 
– Existential: a predicate is true for there is one or 
more elements under consideration 
• Predicate calculus: the area of logic that deals 
with predicates and quantifiers 
7
Universal quantifier 
• “p(x) for all values of x in the domain” 
• Read it as “for all x p(x)” or “for every x p(x)” 
• A statement is false if and only if p(x) 
is not always true 
• An element for which p(x) is false is called a 
counterexample of 
• A single counterexample is all we need to 
establish that is not true 
8 
"x p(x) 
" 
"x p(x) 
"x p(x) 
"x p(x)
Example 
• Let p(x) be the statement “x+1>x”. What is the 
truth value of ? 
– Implicitly assume the domain of a predicate is not 
empty 
– Best to avoid “for any x” as it is ambiguous to 
whether it means “every” or “some” 
• Let q(x) be the statement “x<2”. What is the 
truth value of where the domain 
consists of all real numbers? 
9 
"x p(x) 
"x q(x)
Example 
• Let p(x) be “x2>0”. To show that the statement 
is false where the domain consists of 
all integers 
– Show a counterexample with x=0 
• When all the elements can be listed, e.g., x1, x2, 
…, xn, it follows that the universal 
quantification is the same as the 
conjunction p(x1) ˄p(x2) ˄…˄ p(xn) 
10 
"x p(x) 
"x p(x)
Example 
• What is the truth value of where p(x) 
is the statement “x2 < 10” and the domain 
consists of positive integers not exceeding 4? 
is the same as p(1)˄p(2)˄p(3)˄p(4) 
11 
"x p(x) 
"x p(x)
Existential quantification 
• “There exists an element x in the domain such 
that p(x) (is true)” 
• Denote that as where is the 
existential quantifier 
• In English, “for some”, “for at least one”, or 
“there is” 
• Read as “There is an x such that p(x)”, “There 
is at least one x such that p(x)”, or “For some 
x, p(x)” 
12 
$ 
$x p(x) $
Example 
• Let p(x) be the statement “x>3”. Is 
true for the domain of all real numbers? 
• Let q(x) be the statement “x=x+1”. Is 
true for the domain of all real numbers? 
• When all elements of the domain can be 
listed, , e.g., x1, x2, …, xn, it follows that the 
existential quantification is the same as 
disjunction p(x1) ˅p(x2) ˅ … ˅ p(xn) 
13 
$x p(x) 
$x p(x)
Example 
• What is the truth value of where p(x) 
is the statement “x2 > 10” and the domain 
consists of positive integers not exceeding 4? 
is the same as p(1) ˅p(2) ˅p(3) ˅ p(4) 
14 
$x p(x) 
$x p(x)
Uniqueness quantifier 
• There exists a unique x such that p(x) is true 
• “There is exactly one”, “There is one and only 
one” 
15 
$! p(x) 
1 $! $
Quantifiers with restricted 
domains 
• What do the following statements mean for 
the domain of real numbers? 
2 2 
x x x x x 
" < > " < ® > 
0, 0 same as ( 0 0) 
3 3 
y y y y y 
" ¹ ¹ " ¹ ® ¹ 
0, 0 same as ( 0 0) 
16 
2 2 
z z z z z 
$ > = $ > Ù = 
0, 2 same as ( 0 2) 
Be careful about → and ˄ in these statements
Precedence of quantifiers 
• have higher precedence than all 
logical operators from propositional calculus 
17 
" and $ 
"x p(x) Ú q(x) º ("x p(x))Ú q(x) rather than "x ( p(x) Ú q(x))
Binding variables 
• When a quantifier is used on the variable x, 
this occurrence of variable is bound 
• If a variable is not bound, then it is free 
• All variables occur in propositional function of 
predicate calculus must be bound or set to a 
particular value to turn it into a proposition 
• The part of a logical expression to which a 
quantifier is applied is the scope of this 
quantifier 
18
Example 
19 
What are the scope of these expressions? 
Are all the variables bound? 
x x y 
$ + = 
( 1) 
x p x q x xR x 
$ Ù Ú" 
( ( ) ( )) ( ) 
x p x q x yR y 
$ Ù Ú" 
( ( ) ( )) ( ) 
The same letter is often used to represent variables 
bound by different quantifiers with scopes 
that do not overlap
20 
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: 
– You negate the propositional function 
– AND you change to an existential quantification 
– ¬"x P(x) = $x ¬P(x)
21 
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: 
– Tou negate the propositional function 
– AND you change to a universal quantification 
– ¬$x P(x) = "x ¬P(x)
Translating from English 
• Consider “For every student in this class, that 
student has studied calculus” 
• Rephrased: “For every student x in this class, x 
has studied calculus” 
– Let C(x) be “x has studied calculus” 
– Let S(x) be “x is a student” 
• "x C(x) 
– True if the universe of discourse is all students in 
22 
this class
23 
Translating from English 2 
• What about if the unvierse of discourse is all 
students (or all people?) 
– "x (S(x)ÙC(x)) 
• This is wrong! Why? 
– "x (S(x)→C(x)) 
• Another option: 
– Let Q(x,y) be “x has stuided y” 
– "x (S(x)→Q(x, calculus))
24 
Translating from English 3 
• Consider: 
– “Some students have visited Mexico” 
– “Every student in this class has visited Canada or 
Mexico” 
• Let: 
– S(x) be “x is a student in this class” 
– M(x) be “x has visited Mexico” 
– C(x) be “x has visited Canada”
25 
Translating from English 4 
• Consider: “Some students have visited Mexico” 
– Rephrasing: “There exists a student who has visited 
Mexico” 
• $x M(x) 
– True if the universe of discourse is all students 
• What about if the universe of discourse is all people? 
– $x (S(x) → M(x)) 
• This is wrong! Why? 
– $x (S(x) Ù M(x))
26 
Translating from English 5 
• Consider: “Every student in this class has 
visited Canada or Mexico” 
• "x (M(x)ÚC(x) 
– When the universe of discourse is all students 
• "x (S(x)→(M(x)ÚC(x)) 
– When the universe of discourse is all people 
• Why isn’t "x (S(x)Ù(M(x)ÚC(x))) correct?
27 
Translating from English 6 
• Note that it would be easier to define 
V(x, y) as “x has visited y” 
– "x (S(x) Ù V(x,Mexico)) 
– "x (S(x)→(V(x,Mexico) Ú V(x,Canada))
28 
Translating from English 7 
• 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 propositional functions 
– 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 universe of discourse be all birds
29 
Translating from English 8 
• Our propositional functions 
– 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” 
• Translate the statements: 
– “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))
30 
Multiple quantifiers 
• You can have multiple quantifiers on a statement 
• "x$y P(x, y) 
– “For all x, there exists a y such that P(x,y)” 
– Example: "x$y (x+y == 0) 
• $x"y P(x,y) 
– There exists an x such that for all y P(x,y) is true” 
– Example: $x"y (x*y == 0)
31 
Order of quantifiers 
• $x"y and "x$y are not equivalent! 
• $x"y P(x,y) 
– P(x,y) = (x+y == 0) is false 
• "x$y P(x,y) 
– P(x,y) = (x+y == 0) is true
32 
Negating multiple quantifiers 
• Recall negation rules for single quantifiers: 
– ¬"x P(x) = $x ¬P(x) 
– ¬$x P(x) = "x ¬P(x) 
– Essentially, you change the quantifier(s), and negate what 
it’s quantifying 
• Examples: 
– ¬("x$y P(x,y)) 
= $x ¬$y P(x,y) 
= $x"y ¬P(x,y) 
– ¬("x$y"z P(x,y,z)) 
= $x¬$y"z P(x,y,z) 
= $x"y¬"z P(x,y,z) 
= $x"y$z ¬P(x,y,z)
33 
Negating multiple quantifiers 2 
• Consider ¬("x$y P(x,y)) = $x"y ¬P(x,y) 
– The left side is saying “for all x, there exists a y such that P 
is true” 
– To disprove it (negate it), you need to show that “there 
exists an x such that for all y, P is false” 
• Consider ¬($x"y P(x,y)) = "x$y ¬P(x,y) 
– The left side is saying “there exists an x such that for all y, 
P is true” 
– To disprove it (negate it), you need to show that “for all x, 
there exists a y such that P is false”
34 
Translating between English and 
quantifiers 
• The product of two negative integers is positive 
– "x"y ((x<0) Ù (y<0) → (xy > 0)) 
– Why conditional instead of and? 
• The average of two positive integers is positive 
– "x"y ((x>0) Ù (y>0) → ((x+y)/2 > 0)) 
• The difference of two negative integers is not 
necessarily negative 
– $x$y ((x<0) Ù (y<0) Ù (x-y≥0)) 
– Why and instead of conditional? 
• The absolute value of the sum of two integers does 
not exceed the sum of the absolute values of these 
integers 
– "x"y (|x+y| ≤ |x| + |y|)
35 
Translating between English and 
quantifiers 
• $x"y (x+y = y) 
– There exists an additive identity for all real numbers 
• "x"y (((x≥0) Ù (y<0)) → (x-y > 0)) 
– A non-negative number minus a negative number is 
greater than zero 
• $x$y (((x≤0) Ù (y≤0)) Ù (x-y > 0)) 
– The difference between two non-positive numbers is not 
necessarily non-positive (i.e. can be positive) 
• "x"y (((x≠0) Ù (y≠0)) ↔ (xy ≠ 0)) 
– The product of two non-zero numbers is non-zero if and 
only if both factors are non-zero
36 
Negation examples 
• Rewrite these statements so that the negations 
only appear within the predicates 
a) Ø$y$x P(x,y) 
"yØ$x P(x,y) 
"y"x ØP(x,y) 
a) Ø"x$y P(x,y) 
$xØ$y P(x,y) 
$x"y ØP(x,y) 
a) Ø$y (Q(y) Ù "x ØR(x,y)) 
"y Ø(Q(y) Ù "x ØR(x,y)) 
"y (ØQ(y) Ú Ø("x ØR(x,y))) 
"y (ØQ(y) Ú $x R(x,y))
37 
Negation examples 
• Express the negations of each of these statements so that 
all negation symbols immediately precede predicates. 
a) "x$y"z T(x,y,z) 
Ø("x$y"z T(x,y,z)) 
Ø"x$y"z T(x,y,z) 
$xØ$y"z T(x,y,z) 
$x"yØ"z T(x,y,z) 
$x"y$z ØT(x,y,z) 
a) "x$y P(x,y) Ú "x$y Q(x,y) 
Ø("x$y P(x,y) Ú "x$y Q(x,y)) 
Ø"x$y P(x,y) Ù Ø"x$y Q(x,y) 
$xØ$y P(x,y) Ù $xØ$y Q(x,y) 
$x"y ØP(x,y) Ù $x"y ØQ(x,y)

Contenu connexe

Tendances

Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiersIstiak Ahmed
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDr. Khaled Bakro
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logicallyn joy calcaben
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematicsasad faraz
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical LogicJoey Valdriz
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relationsnszakir
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical inductionmath260
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics LectureGenie Rose Santos
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiersraksharao
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Propositional logic
Propositional logicPropositional logic
Propositional logicMamta Pandey
 
Number theory
Number theory Number theory
Number theory tes31
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrixitutor
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesFellowBuddy.com
 
Rules of inference
Rules of inferenceRules of inference
Rules of inferenceharman kaur
 

Tendances (20)

Discrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of ProofDiscrete Math Lecture 03: Methods of Proof
Discrete Math Lecture 03: Methods of Proof
 
Predicates and quantifiers
Predicates and quantifiersPredicates and quantifiers
Predicates and quantifiers
 
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكروDiscrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
Discrete mathematics Ch2 Propositional Logic_Dr.khaled.Bakro د. خالد بكرو
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
 
Intro to Discrete Mathematics
Intro to Discrete MathematicsIntro to Discrete Mathematics
Intro to Discrete Mathematics
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Mathematical Logic
Mathematical LogicMathematical Logic
Mathematical Logic
 
Recursion DM
Recursion DMRecursion DM
Recursion DM
 
Quantifier
QuantifierQuantifier
Quantifier
 
Set in discrete mathematics
Set in discrete mathematicsSet in discrete mathematics
Set in discrete mathematics
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
5.4 mathematical induction
5.4 mathematical induction5.4 mathematical induction
5.4 mathematical induction
 
Discrete Mathematics Lecture
Discrete Mathematics LectureDiscrete Mathematics Lecture
Discrete Mathematics Lecture
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiers
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Number theory
Number theory Number theory
Number theory
 
Linear Algebra and Matrix
Linear Algebra and MatrixLinear Algebra and Matrix
Linear Algebra and Matrix
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture Notes
 
Rules of inference
Rules of inferenceRules of inference
Rules of inference
 

En vedette

Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers Istiak Ahmed
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)Naosher Md. Zakariyar
 
Nested quantifiers
Nested quantifiersNested quantifiers
Nested quantifiersAli Saleem
 
X2 t08 02 induction (2013)
X2 t08 02 induction (2013)X2 t08 02 induction (2013)
X2 t08 02 induction (2013)Nigel Simmons
 
Divisibility Rules
Divisibility RulesDivisibility Rules
Divisibility RulesTim Bonnar
 
Mathematics - Divisibility Rules From 0 To 12
Mathematics - Divisibility Rules From 0 To 12Mathematics - Divisibility Rules From 0 To 12
Mathematics - Divisibility Rules From 0 To 12Shivansh Khurana
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logicSharif Omar Salem
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)IIUM
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Robert Almazan
 
LinkedIn Demographics & Statistics - Jan 2012
LinkedIn Demographics & Statistics - Jan 2012LinkedIn Demographics & Statistics - Jan 2012
LinkedIn Demographics & Statistics - Jan 2012Amodiovalerio Verde
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical inductionSman Abbasi
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rulesDawood Faheem Abbasi
 

En vedette (20)

Predicates and Quantifiers
Predicates and Quantifiers Predicates and Quantifiers
Predicates and Quantifiers
 
Quantifiers
QuantifiersQuantifiers
Quantifiers
 
Lec 02 logical eq (Discrete Mathematics)
Lec 02   logical eq (Discrete Mathematics)Lec 02   logical eq (Discrete Mathematics)
Lec 02 logical eq (Discrete Mathematics)
 
Logic Ppt
Logic PptLogic Ppt
Logic Ppt
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Nested quantifiers
Nested quantifiersNested quantifiers
Nested quantifiers
 
Math
MathMath
Math
 
X2 t08 02 induction (2013)
X2 t08 02 induction (2013)X2 t08 02 induction (2013)
X2 t08 02 induction (2013)
 
Euler and hamilton paths
Euler and hamilton pathsEuler and hamilton paths
Euler and hamilton paths
 
Predicate Calculus
Predicate CalculusPredicate Calculus
Predicate Calculus
 
Divisibility Rules
Divisibility RulesDivisibility Rules
Divisibility Rules
 
Mathematics - Divisibility Rules From 0 To 12
Mathematics - Divisibility Rules From 0 To 12Mathematics - Divisibility Rules From 0 To 12
Mathematics - Divisibility Rules From 0 To 12
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logic
 
Math induction principle (slides)
Math induction principle (slides)Math induction principle (slides)
Math induction principle (slides)
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
LinkedIn Demographics & Statistics - Jan 2012
LinkedIn Demographics & Statistics - Jan 2012LinkedIn Demographics & Statistics - Jan 2012
LinkedIn Demographics & Statistics - Jan 2012
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Mathematical induction and divisibility rules
Mathematical induction and divisibility rulesMathematical induction and divisibility rules
Mathematical induction and divisibility rules
 
Math 102- Statistics
Math 102- StatisticsMath 102- Statistics
Math 102- Statistics
 

Similaire à Predicates and Quantifiers

Similaire à Predicates and Quantifiers (20)

Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Predicate &amp; quantifier
Predicate &amp; quantifierPredicate &amp; quantifier
Predicate &amp; quantifier
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 
PredicateLogic (1).ppt
PredicateLogic (1).pptPredicateLogic (1).ppt
PredicateLogic (1).ppt
 
PredicateLogic.pptx
PredicateLogic.pptxPredicateLogic.pptx
PredicateLogic.pptx
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
Probability statistics assignment help
Probability statistics assignment helpProbability statistics assignment help
Probability statistics assignment help
 
Universal Quantification DM
Universal Quantification DMUniversal Quantification DM
Universal Quantification DM
 
Quantification
QuantificationQuantification
Quantification
 
Use of quantifiers
Use of quantifiersUse of quantifiers
Use of quantifiers
 
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and ProofsDiscrete Math Chapter 1 :The Foundations: Logic and Proofs
Discrete Math Chapter 1 :The Foundations: Logic and Proofs
 
3 fol examples v2
3 fol examples v23 fol examples v2
3 fol examples v2
 
Lecture3
Lecture3Lecture3
Lecture3
 

Plus de blaircomp2003

Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2blaircomp2003
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
Minimization of Boolean Functions
Minimization of Boolean FunctionsMinimization of Boolean Functions
Minimization of Boolean Functionsblaircomp2003
 
Introduction to Boolean Algebra
Introduction to Boolean AlgebraIntroduction to Boolean Algebra
Introduction to Boolean Algebrablaircomp2003
 
Introduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete MathematicsIntroduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete Mathematicsblaircomp2003
 

Plus de blaircomp2003 (6)

Mathematical Logic Part 2
Mathematical Logic Part 2Mathematical Logic Part 2
Mathematical Logic Part 2
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Minimization of Boolean Functions
Minimization of Boolean FunctionsMinimization of Boolean Functions
Minimization of Boolean Functions
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Introduction to Boolean Algebra
Introduction to Boolean AlgebraIntroduction to Boolean Algebra
Introduction to Boolean Algebra
 
Introduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete MathematicsIntroduction and Applications of Discrete Mathematics
Introduction and Applications of Discrete Mathematics
 

Dernier

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 

Dernier (20)

ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 

Predicates and Quantifiers

  • 2. Limitations of proposition logic • Proposition logic cannot adequately express the meaning of statements • Suppose we know “Every computer connected to the university network is functioning property” • No rules of propositional logic allow us to conclude “MATH3 is functioning property” where MATH3 is one of the computers connected to the university network 2
  • 3. Example • Cannot use the rules of propositional logic to conclude from “CS2 is under attack by an intruder” where CS2 is a computer on the university network to conclude the truth “There is a computer on the university network that is under attack by an intruder” 3
  • 4. Predicate and quantifiers • Can be used to express the meaning of a wide range of statements • Allow us to reason and explore relationship between objects • Predicates: statements involving variables, e.g., “x > 3”, “x=y+3”, “x+y=z”, “computer x is under attack by an intruder”, “computer x is functioning property” 4
  • 5. Example: x > 3 • The variable x is the subject of the statement • Predicate “is greater than 3” refers to a property that the subject of the statement can have • Can denote the statement by p(x) where p denotes the predicate “is greater than 3” and x is the variable • p(x): also called the value of the propositional function p at x • Once a value is assigned to the variable x, p(x) becomes a proposition and has a truth value 5
  • 6. Example • Let p(x) denote the statement “x > 3” – p(4): setting x=4, thus p(4) is true – p(2): setting x=2, thus p(2) is false • Let a(x) denote the statement “computer x is under attack by an intruder”. Suppose that only CS2 and MATH1 are currently under attack – a(CS1)? : false – a(CS2)? : true – a(MATH1)?: true 6
  • 7. Quantifiers • Express the extent to which a predicate is true • In English, all, some, many, none, few • Focus on two types: – Universal: a predicate is true for every element under consideration – Existential: a predicate is true for there is one or more elements under consideration • Predicate calculus: the area of logic that deals with predicates and quantifiers 7
  • 8. Universal quantifier • “p(x) for all values of x in the domain” • Read it as “for all x p(x)” or “for every x p(x)” • A statement is false if and only if p(x) is not always true • An element for which p(x) is false is called a counterexample of • A single counterexample is all we need to establish that is not true 8 "x p(x) " "x p(x) "x p(x) "x p(x)
  • 9. Example • Let p(x) be the statement “x+1>x”. What is the truth value of ? – Implicitly assume the domain of a predicate is not empty – Best to avoid “for any x” as it is ambiguous to whether it means “every” or “some” • Let q(x) be the statement “x<2”. What is the truth value of where the domain consists of all real numbers? 9 "x p(x) "x q(x)
  • 10. Example • Let p(x) be “x2>0”. To show that the statement is false where the domain consists of all integers – Show a counterexample with x=0 • When all the elements can be listed, e.g., x1, x2, …, xn, it follows that the universal quantification is the same as the conjunction p(x1) ˄p(x2) ˄…˄ p(xn) 10 "x p(x) "x p(x)
  • 11. Example • What is the truth value of where p(x) is the statement “x2 < 10” and the domain consists of positive integers not exceeding 4? is the same as p(1)˄p(2)˄p(3)˄p(4) 11 "x p(x) "x p(x)
  • 12. Existential quantification • “There exists an element x in the domain such that p(x) (is true)” • Denote that as where is the existential quantifier • In English, “for some”, “for at least one”, or “there is” • Read as “There is an x such that p(x)”, “There is at least one x such that p(x)”, or “For some x, p(x)” 12 $ $x p(x) $
  • 13. Example • Let p(x) be the statement “x>3”. Is true for the domain of all real numbers? • Let q(x) be the statement “x=x+1”. Is true for the domain of all real numbers? • When all elements of the domain can be listed, , e.g., x1, x2, …, xn, it follows that the existential quantification is the same as disjunction p(x1) ˅p(x2) ˅ … ˅ p(xn) 13 $x p(x) $x p(x)
  • 14. Example • What is the truth value of where p(x) is the statement “x2 > 10” and the domain consists of positive integers not exceeding 4? is the same as p(1) ˅p(2) ˅p(3) ˅ p(4) 14 $x p(x) $x p(x)
  • 15. Uniqueness quantifier • There exists a unique x such that p(x) is true • “There is exactly one”, “There is one and only one” 15 $! p(x) 1 $! $
  • 16. Quantifiers with restricted domains • What do the following statements mean for the domain of real numbers? 2 2 x x x x x " < > " < ® > 0, 0 same as ( 0 0) 3 3 y y y y y " ¹ ¹ " ¹ ® ¹ 0, 0 same as ( 0 0) 16 2 2 z z z z z $ > = $ > Ù = 0, 2 same as ( 0 2) Be careful about → and ˄ in these statements
  • 17. Precedence of quantifiers • have higher precedence than all logical operators from propositional calculus 17 " and $ "x p(x) Ú q(x) º ("x p(x))Ú q(x) rather than "x ( p(x) Ú q(x))
  • 18. Binding variables • When a quantifier is used on the variable x, this occurrence of variable is bound • If a variable is not bound, then it is free • All variables occur in propositional function of predicate calculus must be bound or set to a particular value to turn it into a proposition • The part of a logical expression to which a quantifier is applied is the scope of this quantifier 18
  • 19. Example 19 What are the scope of these expressions? Are all the variables bound? x x y $ + = ( 1) x p x q x xR x $ Ù Ú" ( ( ) ( )) ( ) x p x q x yR y $ Ù Ú" ( ( ) ( )) ( ) The same letter is often used to represent variables bound by different quantifiers with scopes that do not overlap
  • 20. 20 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: – You negate the propositional function – AND you change to an existential quantification – ¬"x P(x) = $x ¬P(x)
  • 21. 21 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: – Tou negate the propositional function – AND you change to a universal quantification – ¬$x P(x) = "x ¬P(x)
  • 22. Translating from English • Consider “For every student in this class, that student has studied calculus” • Rephrased: “For every student x in this class, x has studied calculus” – Let C(x) be “x has studied calculus” – Let S(x) be “x is a student” • "x C(x) – True if the universe of discourse is all students in 22 this class
  • 23. 23 Translating from English 2 • What about if the unvierse of discourse is all students (or all people?) – "x (S(x)ÙC(x)) • This is wrong! Why? – "x (S(x)→C(x)) • Another option: – Let Q(x,y) be “x has stuided y” – "x (S(x)→Q(x, calculus))
  • 24. 24 Translating from English 3 • Consider: – “Some students have visited Mexico” – “Every student in this class has visited Canada or Mexico” • Let: – S(x) be “x is a student in this class” – M(x) be “x has visited Mexico” – C(x) be “x has visited Canada”
  • 25. 25 Translating from English 4 • Consider: “Some students have visited Mexico” – Rephrasing: “There exists a student who has visited Mexico” • $x M(x) – True if the universe of discourse is all students • What about if the universe of discourse is all people? – $x (S(x) → M(x)) • This is wrong! Why? – $x (S(x) Ù M(x))
  • 26. 26 Translating from English 5 • Consider: “Every student in this class has visited Canada or Mexico” • "x (M(x)ÚC(x) – When the universe of discourse is all students • "x (S(x)→(M(x)ÚC(x)) – When the universe of discourse is all people • Why isn’t "x (S(x)Ù(M(x)ÚC(x))) correct?
  • 27. 27 Translating from English 6 • Note that it would be easier to define V(x, y) as “x has visited y” – "x (S(x) Ù V(x,Mexico)) – "x (S(x)→(V(x,Mexico) Ú V(x,Canada))
  • 28. 28 Translating from English 7 • 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 propositional functions – 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 universe of discourse be all birds
  • 29. 29 Translating from English 8 • Our propositional functions – 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” • Translate the statements: – “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))
  • 30. 30 Multiple quantifiers • You can have multiple quantifiers on a statement • "x$y P(x, y) – “For all x, there exists a y such that P(x,y)” – Example: "x$y (x+y == 0) • $x"y P(x,y) – There exists an x such that for all y P(x,y) is true” – Example: $x"y (x*y == 0)
  • 31. 31 Order of quantifiers • $x"y and "x$y are not equivalent! • $x"y P(x,y) – P(x,y) = (x+y == 0) is false • "x$y P(x,y) – P(x,y) = (x+y == 0) is true
  • 32. 32 Negating multiple quantifiers • Recall negation rules for single quantifiers: – ¬"x P(x) = $x ¬P(x) – ¬$x P(x) = "x ¬P(x) – Essentially, you change the quantifier(s), and negate what it’s quantifying • Examples: – ¬("x$y P(x,y)) = $x ¬$y P(x,y) = $x"y ¬P(x,y) – ¬("x$y"z P(x,y,z)) = $x¬$y"z P(x,y,z) = $x"y¬"z P(x,y,z) = $x"y$z ¬P(x,y,z)
  • 33. 33 Negating multiple quantifiers 2 • Consider ¬("x$y P(x,y)) = $x"y ¬P(x,y) – The left side is saying “for all x, there exists a y such that P is true” – To disprove it (negate it), you need to show that “there exists an x such that for all y, P is false” • Consider ¬($x"y P(x,y)) = "x$y ¬P(x,y) – The left side is saying “there exists an x such that for all y, P is true” – To disprove it (negate it), you need to show that “for all x, there exists a y such that P is false”
  • 34. 34 Translating between English and quantifiers • The product of two negative integers is positive – "x"y ((x<0) Ù (y<0) → (xy > 0)) – Why conditional instead of and? • The average of two positive integers is positive – "x"y ((x>0) Ù (y>0) → ((x+y)/2 > 0)) • The difference of two negative integers is not necessarily negative – $x$y ((x<0) Ù (y<0) Ù (x-y≥0)) – Why and instead of conditional? • The absolute value of the sum of two integers does not exceed the sum of the absolute values of these integers – "x"y (|x+y| ≤ |x| + |y|)
  • 35. 35 Translating between English and quantifiers • $x"y (x+y = y) – There exists an additive identity for all real numbers • "x"y (((x≥0) Ù (y<0)) → (x-y > 0)) – A non-negative number minus a negative number is greater than zero • $x$y (((x≤0) Ù (y≤0)) Ù (x-y > 0)) – The difference between two non-positive numbers is not necessarily non-positive (i.e. can be positive) • "x"y (((x≠0) Ù (y≠0)) ↔ (xy ≠ 0)) – The product of two non-zero numbers is non-zero if and only if both factors are non-zero
  • 36. 36 Negation examples • Rewrite these statements so that the negations only appear within the predicates a) Ø$y$x P(x,y) "yØ$x P(x,y) "y"x ØP(x,y) a) Ø"x$y P(x,y) $xØ$y P(x,y) $x"y ØP(x,y) a) Ø$y (Q(y) Ù "x ØR(x,y)) "y Ø(Q(y) Ù "x ØR(x,y)) "y (ØQ(y) Ú Ø("x ØR(x,y))) "y (ØQ(y) Ú $x R(x,y))
  • 37. 37 Negation examples • Express the negations of each of these statements so that all negation symbols immediately precede predicates. a) "x$y"z T(x,y,z) Ø("x$y"z T(x,y,z)) Ø"x$y"z T(x,y,z) $xØ$y"z T(x,y,z) $x"yØ"z T(x,y,z) $x"y$z ØT(x,y,z) a) "x$y P(x,y) Ú "x$y Q(x,y) Ø("x$y P(x,y) Ú "x$y Q(x,y)) Ø"x$y P(x,y) Ù Ø"x$y Q(x,y) $xØ$y P(x,y) Ù $xØ$y Q(x,y) $x"y ØP(x,y) Ù $x"y ØQ(x,y)