Logic of Informatics - Rules of Inference
Logic of Informatics - Rules of Inference
Rules of Inference
Last Lecture
• Converse
• Inverse
• Contrapositive
• Tautology
• Contradiction
What is an argument?
An argument is a sequence of statements or
premises that end in a conclusion.
Ex:
If I jump I will fall
I jump
Therefore, I will fall pq
This argument has the form:
p
q
Another Example
Ex: p q
Premise: If I eat too much, my stomach will be hurt
Premise: My stomach doesn’t hurt
Conclusion: Therefore, I don’t eat too much
pq
This argument has the form: q
p
The purpose of rules of inference
We use rules of inference to construct valid
arguments.
and conclusion q
is valid when ( p1 p2 pn ) q is a tautology
The Rules of Inference -
Modus Ponens
pq
p
q
pq
q
p
pq
qr
pr
pq pq
q OR
p
p q
p
q
pq
p q
OR
pq pq
pq pq
OR
p q
a). P (Q R)
R
PQ
b). P (Q R)
Q (P R)
PR
Exercise 2
One day, you want to go to college and realized that you do not wear glasses.
Having to remember, there are some facts that you make sure the truth:
1. If the glasses are on the kitchen table, then I would have seen it as
breakfast. p q
2. I read the newspaper in the living room or I read it in the kitchen. r s
3. If I read the newspaper in the living room, then surely put my glasses on
the coffee table. r t
4. I do not see my glasses at breakfast time. q
5. If I read a book in bed, then put my glasses on the bedside table. u w
6. If I read the newspaper in the kitchen, then my glasses are on the kitchen
table. s p
Based on these facts, prove / show that the glasses left on the coffee table!
Exercise 3
• Prove the validity of the following arguments using
the rules of inference!
pq
(p q) r
r