Lecture # 07
Lecture # 07
Lecture # 07
Lecture # 07
RULES OF INFERENCE &
PROPOSITIONAL LOGIC
We always use a truth table to show that an argument
form is valid.
For Example:
When an argument form involves 10 different
propositional variables, to use a truth table to show this
argument form is valid requires 2¹º = 1024 rows.
RULES OF INFERENCE
Inference rules are templates for valid arguments.
pq
p
(( p q ) p ) q is a tautology (always true)
q
p q p q ( p q ) p (( p q ) p ) q
T T T T T
T F F F T
F T T F T
F F T F T
therefore
Rules of Inference for Propositional Logic The 1st law
pq
p modus ponens
aka
law of detachment
q
Solution:
Let p = you have a current password.
q = you can log on to the network
Symbolically:
pq
p
q (this form
of argument is called modus ponens)
MODUS TOLLENS
~q
pq
~p
Solution:
Let p = you have a current password.
q = you can log on to the network
Symbolically:
~q
pq
~p
Rule of inference
The rules of inference Tautology Name
pq
p [ p ( p q )] q Modus ponens
q
q
pq [q ( p q )] p Modus tollen
p
pq
qr [( p q ) ( q r )] ( p r ) Hypothetic al syllogism
pr
pq
p (( p q ) p ) q Disjunctiv e syllogism
q
p
p ( p q) Addition
pq
pq
( p q) p Simplifica tion
p
p
q (( p ) ( q )) ( p q ) Conjunctio n
pq
pq
p r [( p q ) (p r )] ( p r ) Resolution
q r
Exercise:
State which rule of inference is the basis of the following
argument:
“It is below freezing now. Therefore, It is either below
freezing or raining now.”
Solution:
Let p = It is below freezing.
q = It is raining now.
Symbolically,
p
pq
This is an argument that uses Addition rule of inference.
Exercise:
State which rule of inference is the basis of the following
argument:
“It is below freezing and raining now. Therefore, it is below
freezing now.”
Solution:
Let p = It is below freezing.
q = It is raining now.
Symbolically,
p∧q
p
Solution:
Let p = If it rains today.
q = we will not have a barbecue today.
r = we will have a barbecue tomorrow.
Symbolically,
p→q
q→r
p→r
pq
The argument has the form: p
q
USING RULES OF INFERENCE TO
BUILD ARGUMENTS
When there are many premises, several rules of inference
are often needed to show that an argument is valid.
Solution:
1. p q
2. r p
Premises
3. r s
4. st
5. t Conclusion
We construct an argument that our premise lead to desired
conclusion as follows: Rule of inference
pq
Tautology
p [ p ( p q )] q
q
q
~p∧q Premise pq [q ( p q )] p
p
~p Simplification pq
qr [( p q ) ( q r )] ( p
r→p Premise pr
pq
~r Modus Tollens p (( p q ) p ) q
~r→s Premise q
p
p ( p q)
s Modus Ponens pq
pq
( p q) p
s→t Premise p
p
q (( p ) ( q )) ( p q )
t Modus Ponens pq
pq
p r [( p q ) (p r )] ( p r
q r
EXAMPLE
“If you send me an e-mail message, then I will finish writing
the problem,” “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 problem, then I will wake up feeling
refreshed.”
Solution:
p→q Premise
~q→~p Contrapositive
~p→r Premise
Rule of inference Tautology Name
pq
p [ p ( p q )] q Modus ponens
pq
p (( p q ) p ) q Disjunctiv e syllogism
q
p
p ( p q) Addition
pq
pq
( p q) p Simplifica tion
p
p
q (( p ) (q )) ( p q ) Conjunctio n
pq
pq
p r [( p q ) (p r )] ( p r ) Resolution
q r
RESOLUTION
The Resolution law is:
pq
p r
q r
Alternatively, ((p q) ∧ ( ~p r))→ (q r) is Tautology.
Example:
Using the resolution rule to show that the hypothesis:
“Jasmine is skiing or it is not snowing” and “It is snowing
or Bart is playing hockey” imply that “Jasmine is skiing or
Bart is playing hockey.”
Solution:
Let p = It is snowing.
q = Jasmine is skiing.
r = Bart is playing hockey.
Symbolically,
~pq
pr
qr
Using Resolution the q r follows.
Name
us ponens
EXAMPLE
In the back of an old cupboard you discover a note signed by a
dus tollen
pirate famous for his sense of humor and love of logical puzzles.
In the note he wrote that he had hidden treasure somewhere on
tical syllogism
the property. He listed five true statements (a–d below) and
challenged the reader to use them to figure out the location of the
treasure using inference rules for propositional logic
tiv e syllogism
a) If this house is next to a lake, then the treasure is not in the
ddition
kitchen.
b) This house is next to a lake.
plifica tion a) If the tree in the front yard is an elm, then the treasure is in the
kitchen.
njunctio n
b) The tree in the front yard is an elm or the treasure is buried under the
flagpole.
Where is the treasure hidden?
solution