0% found this document useful (0 votes)
8 views

3 Predicate Logic

The document discusses predicate logic, focusing on the use of variables in statements and the concepts of universal and existential quantification. It explains how to denote propositions, provide counterexamples, and the rules of inference related to quantified statements. Additionally, it covers the negation of quantified expressions and the importance of the order of quantifiers.

Uploaded by

CHA ZI YU Moe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

3 Predicate Logic

The document discusses predicate logic, focusing on the use of variables in statements and the concepts of universal and existential quantification. It explains how to denote propositions, provide counterexamples, and the rules of inference related to quantified statements. Additionally, it covers the negation of quantified expressions and the importance of the order of quantifiers.

Uploaded by

CHA ZI YU Moe
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Predicate Logic

Introduction
• Statements involving variables are
common in natural languages and
mathematics:
– x > 50
– Book y is sold out.
– Author z has just published his new
book with the title y.
• Not propositions → neither T or F if the
variables are not specified.
2
Introduction
• 2 parts in the previous statements:
x is greater than 10.

Subject Predicate (refers to a property that


the subject may have)

3
Introduction
• 2 parts in the previous statements:
x is greater than 10.

Subject Predicate (refers to a property that


the subject may have)

The statement can be denoted by a


propositional function, P(x).
>> P : the predicate “greater than 10”
>> x : the variable, x 4
Example
• If P(x) denotes “x is a positive number”
and Q(y,z) denotes “y+z=10”
• P(500) is true
• P(-20) is false
• Q(0,10) is true
• Q(3,5) is false

5
Quantifiers
• Quantification : to create a proposition
from a propositional function.
• In English, the words all, some, many,
none, and few are used in
quantification.
• We focus on 2 types of quantification:
universal and existential quantification.

6
Universal Quantification
• assert that a property is true for all
values of a variable in the domain of
discourse.
– i.e. P(x) is true for all values of x in this
domain.
• The domain must always be specified
when a universal quantifier is used,
since a change of domain may lead to
change of truth value or unverifiable.
7
Universal Quantification
• The universal quantification of P(x) is
the statement:
“P (x) for all values of x in the domain.”
• Notation:
∀x P(x)
• ∀ is universal quantifier. Read as “for
all”, “for every”, “for each”, ...

8
Example
• Let P(x) be the statement “x + 1 > x”
for all real numbers x. Is ∀xP(x) true?

9
Example
• Let P(x) be the statement “x + 1 > x”
for all real numbers x. Is ∀xP(x) true?

• P(x) is true for all real numbers x, so


the quantification ∀xP(x) is true

10
Example
• Let Q(x) be the statement “x < 2”
where the domain consists of all real
numbers. Is ∀xQ(x) true?

11
Example
• Let Q(x) be the statement “x < 2”
where the domain consists of all real
numbers. Is ∀xQ(x) true?

• The quantification ∀xQ(x) is false since


it is not true if x is a real number 2 or
greater.

12
Counterexample
• We can assert a universal quantification
is false by providing a counterexample
• Counterexample of ∀xP(x) : An element
for which P(x) is false.
• Note: Never assert a universal
quantification as true by providing an
example!

13
Example
• If the domain of discourse is all real
numbers, is ∀x, x2 ≥ x true?

14
Example
• If the domain of discourse is all real
numbers, is ∀x, x2 ≥ x true?

• False.
• Because if x = ½ ,
x2 = (½)2 = ¼ ≥ ½ is false

15
Existential Quantification
• Proposition that is true if and only if
P(x) is true for at least one value of x
in the domain.
• The existential quantification of P(x) is
the proposition:
“There exists an element x in the
domain such that P(x).”
• Notation : ∃xP(x)

16
Existential Quantification
• ∃ is called the existential quantifier, read
as “there exists,” “for some,” “for at least
one,” or “there is.”
• ∃xP(x) is read as:
“There is an x such that P(x),”
“There is at least one x such that P(x),”
or
“For some xP(x).”
17
Example
• Let Q(x) be the statement “x < 2” and x
is a real number.

• As discussed earlier, the quantification


∀xQ(x) is false.
• But, the quantification ∃xQ(x) is true,
since there is an x, say 1.9 is less than
2.
Q(1.9) is 1.9<2 is true.
18
Example
• Let P(x) be the statement “x + 1 = x”
for all real numbers x. Is ∃xP(x) true?

19
Example
• Let P(x) be the statement “x + 1 = x”
for all real numbers x. Is ∃xP(x) true?

• Because P(x) is false for every real


number x, ∃xP(x) is false.

20
Example
• Let R(x) be the statement “x/2 = x” for
all real numbers x. Is ∃xR(x) true?

21
Example
• Let R(x) be the statement “x/2 = x” for
all real numbers x. Is ∃xR(x) true?

• R(x) seems like false for many real


number x, but since 0/2 = 0, ∃xR(x) is
true.

22
Domains of Quantifiers
• The domains of quantifiers can be
expressed in mathematical form.
• Example:
– ∀x∊ℝ, P(x)
∀x∊ℝ, x+1>x
∃x∊ℝ (x/2 = x)

25
Precedence of Quantifiers
• Precedence of ∀ and ∃ is higher than
NOT, AND, and OR.
• Example:
∀xP(x) /\ Q(x)
means:
( ∀xP(x) ) /\ Q(x)
not:
∀x ( P(x) /\ Q(x) )
26
Examples of Quantified
Statements
• “If x likes BLACKPINK then he likes K-Pop”

• Proposition?

• “For all people it holds that if the person likes


BLACKPINK then she likes K-Pop”

• Proposition?

27
Examples of Quantified
Statements
• “If x likes BLACKPINK then he likes K-Pop”
• B(x) → K(x)
• Proposition? No

• “For all people it holds that if the person likes


BLACKPINK then she likes K-Pop”
• ∀x(B(x) → K(x))
• Proposition? Yes

28
Examples of Quantified
Statements
• “x is your classmate who has founded
Microsoft”

• Proposition?

• “There is a person who is your classmate


and the founder of Microsoft”

• Proposition?
29
Examples of Quantified
Statements
• “x is your classmate who has founded
Microsoft”
• C(x) /\ M(x)
• Proposition? No

• “There is a person who is your classmate


and the founder of Microsoft”
• ∃x ( C(x) /\ M(x) )
• Proposition? Yes
30
Examples of Quantified
Statements
• “Every student with a smartphone uses
social media.”
• ∀xS(x) ???
• Only if the domain of discourse is fixed
- “students with smartphones”
• What if the domain of discourse is “all
students”?

31
Examples of Quantified
Statements
• “Every student with a smartphone uses
social media.”
• Rephrase:
“If a student x has a smartphone, x
uses social media”
– S(x) : Student x has a smartphone
– M(x) : x uses social media
– ∀x ( S(x) → M(x) )
32
Quantified Statements
Universal statements typically tie with implications
All S(x) is P(x): No S(x) is P(x):
∀x (S(x) → P(x)) ∀x (S(x) → ~P(x))

Existential statements typically tie with conjunctions


Some S(x) is P(x): Some S(x) is not P(x):
∃x (S(x) /\ P(x)) ∃x (S(x) /\ ~P(x))

33
Negation of Quantified
Expressions
Consider P(x) as “x likes ice cream”
Everyone likes ice cream ∀xP(x)

34
Negation of Quantified
Expressions
Consider P(x) as “x likes ice cream”
Everyone likes ice cream ∀xP(x)
Negation
It is not the case that everyone ¬∀xP(x)
likes ice cream

35
Negation of Quantified
Expressions
Consider P(x) as “x likes ice cream”
Everyone likes ice cream ∀xP(x)
Negation
It is not the case that everyone ¬∀xP(x)
likes ice cream

There is at least a person that ∃x ¬P(x)


do not like ice cream

36
Negation of Quantified
Expressions
Consider P(x) as “x likes ice cream”
Everyone likes ice cream ∀xP(x)
Negation
It is not the case that everyone ¬∀xP(x)
likes ice cream

There is at least a person that ∃x ¬P(x)


do not like ice cream

¬∀xP (x) ≡ ∃x ¬P (x) 37


Negation of Quantified
Expressions
Consider P(x) as “x is a honest politician”
There is at least one honest politician ∃xP(x)

38
Negation of Quantified
Expressions
Consider P(x) as “x is a honest politician”
There is at least one honest politician ∃xP(x)
Negation
It is not the case that there is a ¬∃xP(x)
honest politician

39
Negation of Quantified
Expressions
Consider P(x) as “x is a honest politician”
There is at least one honest politician ∃xP(x)
Negation
It is not the case that there is a ¬∃xP(x)
honest politician

All the politicians are not honest ∀x ¬P(x)

40
Negation of Quantified
Expressions
Consider P(x) as “x is a honest politician”
There is at least one honest politician ∃xP(x)
Negation
It is not the case that there is a ¬∃xP(x)
honest politician

All the politicians are not honest ∀x ¬P(x)

¬∃xP (x) ≡ ∀x ¬P (x) 41


De Morgan’s Laws for
Quantifiers

42
Example
• What is the negation of “All Malaysians
like teh tarik”?
∀xP(x)

43
Example
• What is the negation of “All Malaysians
like teh tarik”?
∀xP(x)

• ¬∀xP(x) : It is not the case that all


Malaysians like teh tarik
• ∃x ¬P(x) : At least one Malaysians do
not like teh tarik
44
Example
• What is the negation of ∃x(x2 = 2)?

45
Example
• What is the negation of ∃x(x2 = 2)?

• The negation: ¬∃x(x2 = 2)


• Or : ∀x ¬(x2 = 2)
or ∀x (x2 ≠ 2)

46
Example
• Show that ¬∀x(P (x) → Q(x)) is
equivalent to ∃x (P(x) /\ ¬Q(x)).

47
Example
• Show that ¬∀x(P (x) → Q(x)) is
equivalent to ∃x (P(x) /\ ¬Q(x)).

¬∀x(P(x) → Q(x))
= ∃x ¬(P(x) → Q(x))
= ∃x ¬(¬P(x) V Q(x))
= ∃x (P(x) /\ ¬Q(x))
48
Nested Quantifiers
• In many cases we have more than one
variables
• Require more than 1 quantifiers
• Examples:
– P(x,y) : Every author wrotes some
books
– Q(x,y) : f(x) = y

49
Example
• “Every author wrotes some books”

• Translate:
• “For every author x, each author wrote
his book y”
• ∀x∃y W(x,y)

50
Example
• “There is a number x that returns y
when we multiply x with y.”
• ∃x∀y M(x,y)

** There is only 1 possible value for x, i.e. 1

51
Order of quantifiers
• The order of quantifiers is important if
the quantifiers are of different types
∃x∀y M(x,y) ≠ ∀y∃x M(x,y)
• But,
∀x∀y M(x,y) is equal to ∀y∀x M(x,y)

52
53
Rule of inferences
(Quantified Statements)
• Universal instantiation: If a universal
quantification is true, ∀xP(x),
preposition for an instance in the
domain, c, written as P(c) is also true.
∀xP(x) → P(c)
• But, if ∀xP(x) is false, it doesn’t means
P(c) is false.

54
Rule of inferences
(Quantified Statements)
• Universal generalization: If we find
P(c) is true for an element c in the
domain, then further investigations find
that it is also true for all the other c in
the domain:
P(c) for every c in domain → ∀xP(x)

55
Rule of inferences
(Quantified Statements)
• Existential instantiation: If the
existential quantification ∃xP(x) is true,
then there is an element c in the
domain so that P(c) is true.
∃xP(x) → P(c) for some c
• But, it doesn’t means that P(c) holds
true for an arbitrary c.

56
Rule of inferences
(Quantified Statements)
• Existential generalization: If c, an
element in the domain let P(c) holds
true, the existential quantification is
true, ∃xP(x).
P(c) → ∃xP(x)

57
58
Example
• Let:
» D(x) : “x likes durian”
» U(x) : “x is a UM student”
• And given that the premises are
» ∀x(D(x) → U(x))
» D(Mutu)
• Find the conclusion “Mutu is a UM
student”
59
Example (cont’)
• Let:
» D(x) : “x likes durian”
» U(x) : “x is a UM student”

• ∀x(D(x) → U(x)) (1) Premise


• D(Mutu) (2) Premise
• D(Mutu) → U(Mutu) (3) Universal instantiation from (1)
• U(Mutu) (4) Modus Ponens from (3), (2)

Therefore, we conclude that U(Mutu),


i.e. : Mutu is a UM student
60
Example 2
• Given that
» ∀x(M(x) → P(x)) (1) premise
» ∃x (M(x) /\ C(x)) (2) premise
• Derive the conclusion ∃x (P(x) /\ C(x))

• M(k) /\ C(k) (3) Existantial instantiation from (2)


• M(k) (4) From (3)
• M(k) → P(k) (5) Universal instantiation from (1), (3)
• P(k) (6) From (4), (5)
• C(k) (7) From (3)
• P(k) /\ C(k) (8) From (6), (7)
• ∃x (P(x) /\ C(x)) Existantial generalization from (8) 62

You might also like