Predicate Logic
Predicate Logic
Predicate Logic
Uniqueness quantification !
2017/11/13 CSE, NCHU 5
Two Popular Quantifiers
Universal: x P(x) – “P(x) for all x in the domain”
Existential: x P(x) – “P(x) for some x in the domain”
or “there exists x such that P(x) is TRUE”.
Either is meaningless if the domain is not
known/specified. Think about x (x2 ≧ x) ?
Examples
x (x2 ≧ 0) is true, if domain of x is R.
x (x >1) is true, if domain of x is R.
(x>1) (x2 > x) is true, if domain of x is R.
Note: in the last case - quantifier with restricted domain
2017/11/13 CSE, NCHU 6
Using Quantifiers
Let domain of x be integers,
Using implications: The cube of any
negative integer is negative.
x (x < 0) (x3 < 0)
Expressing sums (domain of n be N):
n
n ( i = n(n+1)/2)
i=1
Sol_2:
Domain of x is “all people”
S(x) stands for “the person x is in this class”
x (S(x) C(x)) (Caution: Not x (S(x) C(x)) )
Sol_3:
Domain of x is “the students in this class” or “all people”
Q(x,y) represents “x has studied subject y”
x Q(x, calculus) or x (S(x) Q(x, calculus))
2017/11/13 CSE, NCHU 9
Translation Examples (2/5)
Example 24: “some student in this class has visited Mexico” and
“every student in this class has visited either Canada or Mexico”
Sol:
Let M(x) = “x has visited Mexico”
S(x) = “x is a student in this class”
C(x) = “x has visited Canada”
V(x,y) denotes “x has visited y”
x M(x) if x’s domain is “the students in this class”
X (S(x) M(x)) if x’s domain is defined as “all people”
(Caution: not X (S(x) M(x)) Why? )
x (S(x) (C(x) M(x)) or x (S(x) (V(x,Mexico) V(x,Canada)))
if x’s domain is defined as “all people”, how about in the restricted domain?
P(x): x is a lion
Q(x): x is fierce
R(x): x drinks coffee
1. x (P(x) Q(x))
2. x (P(x) ¬ R(x)) (note: not x (P(x) ¬ R(x))
3. x (Q(x) ¬ R(x)) (note: not x (Q(x) ¬ R(x))
1. m (S(m,1) C(m))
2. u A(u) n S(n, available)
2017/11/13 CSE, NCHU 13
Translation Examples Again (1/2)
Let S(x) be “x is a student”, F(x) be “x is a faculty member”, and A(x,y)
be “x has asked y a question” where the domain consists of all people.
(expressions in red are for domain of students and faculty members)
✓ Some student has not asked any faculty member a question.
This is equivalent to x y (x + y 0)
Ex 2: ¬x y (x < y)
This is equivalent to x ¬y (x < y)
This is equivalent to x y (x y)
Example 15: There does not exist a woman who has taken a
flight on every airline in the world.
w ¬ a f (P(w,f) Q(f,a))
A: (1) for all real numbers x and for all real numbers y,
there is a real number z such that x+y=z. (T)