This document discusses predicates and quantifiers in predicate logic. It begins by explaining the limitations of propositional logic in expressing statements involving variables and relationships between objects. It then introduces predicates as statements involving variables, and quantifiers like universal ("for all") and existential ("there exists") to express the extent to which a predicate is true. Examples are provided to demonstrate how predicates and quantifiers can be used to represent statements and enable logical reasoning. The document also covers translating statements between natural language and predicate logic, and negating quantified statements.
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)