Examples On Predicates and Quantifiers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Examples on Predicates and

Quantifiers
Examples on Quantifiers
Tanslate into English sentences.
x(C(x)  y(C( y)  F(x, y)))
Where C(x) is a “x has a computer”
F(x,y) is “x and y are friends”
Universe of discourse for both x and y is all students in college.
Solution:
The statement says, Every student x in your college x has a
computer or there is a student y such that y has a computer nad
s and y are friends.
Or
Every student in your college has a computer or has a friend who
has a computer.
Example 2
xyz((F (x, y)  F (x, z)  (x z))  F ( y, z)))
F(x,y) means x and y are friends
And universe is all students in your college.
Solution:
This statement is saying that,
There is a student x such that for all students y and
all students z other that y, if x and y are friends,
then y and z are not friends.
Or
There is a student none of whose friends are also
friends with each other.
Express in to English statements
1.“some students in class have visited mexico”
2.“Every student in class have visited either
Mexico or canada”
Solution:
U: for x is set of students in a class.
M(x):x has visited mexico.
C(x):x has visited canada.
Then x ( M ( x )) is for 1. x(M (x)  C(x))
Example 2
“If somebody is a female and is a parent, then
this person is mother of someone”
Solution:
Let F(x): x is a female
P(x): x is a parent
M(x,y): x is mother of y

 x ( F ( x )  P ( x ))   y M ( x , y )
Transfer statement using logical quantifiers.

“None of my friends are perfect”.


“Some Real numbers are rational”.
“Not all rainy days are cold”
“Gold and Silver ornaments are precious.”
Proof of Rules of Inference
Prove p ∧ q, r ⊢ q ∧ r
1. p ∧ q Premise
2. r Premise
3. q simplification, from 1
4. q ∧ r conjunction, from 2 and 3
Prove p, ¬¬(q ∧ r ) ⊢ ¬¬p ∧ r

1. p premise
2. ¬¬(q ∧ r ) premise
3. ¬¬p insertion of double negation,in 1
4. q ∧ r elimination of double negation,
5. r simplification, from 4
6. ¬¬p ∧ r conjunction
Prove
“It is not sunny this afternoon and it is
colder than yesterday,”
“We will go swimming only if it is sunny,” “If
we do not go swimming, then we will take
a canoe trip,”
and “If we take a canoe trip, then we will
be home by sunset”
lead to the conclusion “We will be home by
sunset.”
solution
p :- “It is sunny this afternoon,”
q the proposition “It is colder than
yesterday,”
r :- “We will go swimming,”
s :- “We will take a canoe trip,”
t :- “We will be home by sunset.”
Then the premises become
¬p ∧ q, r → p, ¬r → s, and s → t. The
conclusion is simply t.
¬p ∧ q, r → p, ¬r → s, s → t ⊢ t
1. ¬p ∧ q Premise
2. ¬p simplification
3. r → p premise
4. ¬r Modus tollens using (2) and (3)
5.¬r → s premise
6. s Modus ponens using (4) and (5)
7. s → t premise
8. t Modus ponens using (6) and (7)
Prove
“If you send me an e-mail message, then I
will finish writing the program,”
“If you do not send me an e-mail message,
then I will go to sleep early,”
and “If I go to sleep early, then I will wake
up feeling refreshed
lead to the conclusion “If I do not finish
writing the program, then I will wake up
feeling refreshed.”
p :- “You send me an e-mail message,”
q :- “I will finish writing the program,”
r : “I will go to sleep early,” and
s :- “I will wake up feeling refreshed.”
The premises are p → q, ¬p → r, & r → s
The desired conclusion is ¬q → s
Proof
1. p → q Premise
2. ¬q → ¬p Contrapositive of (1)
3. ¬p → r Premise
4. ¬q → r Hypothetical syllogism using (2)
and (3)
5. r → s Premise
6. ¬q → s Hypothetical syllogism using (4)
and (5)
Derive the following

(~p v q, ~q v r, r->s) leads to p->s


1.~pvqPremise
2. p->q From 1
3. p Assumed Premise
4.q Modus ponens, From 2 ,3
5.~qvr Premise
6.r Disjunctive syllogism, From 4, 5
7.r->s Premise
8.s Modus ponens, From 6, 7
9.p->s (From 1, 5, 7)
Fallacy of affirming the conclusion (consequence
p q
q
p Can’t conclude this

p If you do every problem in this book p q


q then you will learn discrete mathematics

You learned discrete mathematics q

Therefore,
you did every problem in this book p
K. Busch - LSU 16
Fallacy of denying the hypothesis (antecedent)
p q
p
q Can’t conclude this

p If you do every problem in this book p q


q then you will learn discrete mathematics

You didn’t do every problem in this book p

Therefore,
you didn’t learn discrete mathematics q
K. Busch - LSU 17
Rules of inference for quantifiers

Universal Universal
Instantiation Generalization
xP( x) P (c) for arbitrary c
 P (c) for any c  xP( x)

Existential Existential
Instantiation Generalization
xP( x) P (c) for some c
 P (c) for some c  xP( x)
K. Busch - LSU 18
Premises:
C (x) A student in this class
x(C ( x)   B ( x))
 B(x) has not read the book

C (x)Everyone in this class


x(C ( x)  P ( x ))
P(x) passed the first exam

Conclusion:
P(x) Someone who passed the first exam
 B(x) has not read the book
x( P ( x)   B ( x))
K. Busch - LSU 19
1. x(C ( x)   B ( x)) Premise
2. C (a )   B (a) Existential instantiation from 1
3. C (a) Simplification from 2
4. x(C ( x)  P ( x)) Premise
5. C (a)  P (a) Universal instantiation from 1
6. P (a ) Modus Ponens from 3,5
7.  B (a) Simplification from 2
8. P (a )   B (a ) Conjunction from 6,7
9. x( P ( x)   B ( x)) Existential generalization from 8

K. Busch - LSU 20

You might also like