rulesOfInference (Week 6)

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

Discrete Structure

Rules of Inference
Instructor:Engr Sadaf Khan Gondal
Proofs in mathematics are valid arguments

An argument is a sequence of statements that end in a conclusion

By valid we mean the conclusion must follow from the truth of the preceding
statements or premises

We use rules of inference to construct valid arguments


Valid Arguments in Propositional Logic

Is this a valid argument?

If you listen you will hear what I’m saying


You are listening
Therefore, you hear what I am saying

Let p represent the statement “you listen”


Let q represent the statement “you hear what I am saying”

pq
The argument has the form: p
q
Valid Arguments in Propositional Logic

pq
p
(( p  q)  p )  q is a tautology (always true)

q
p q p  q ( p  q)  p (( p  q)  p)  q
0 0 1 0 1
0 1 1 0 1
1 0 0 0 1
1 1 1 1 1

This is another way of saying that

 therefore
Valid Arguments in Propositional Logic

When we replace statements/propositions with propositional variables


we have an argument form.

Defn:
An argument (in propositional logic) is a sequence of propositions.
All but the final proposition are called premises.
The last proposition is the conclusion
The argument is valid iff the truth of all premises implies the conclusion is true
An argument form is a sequence of compound propositions
Valid Arguments in Propositional Logic

The argument form with premises p1 , p2 , , pn


q
and conclusion

is valid when ( p1  p2    pn )  q is a tautology

We prove that an argument form is valid by using the laws of inference

But we could use a truth table. Why not?


Rules of Inference for Propositional Logic The 1st law

pq
p modus ponens

law of detachment
q

modus ponens (Latin) translates to “mode that affirms”


Rules of Inference for Propositional Logic modus ponens
pq
p
q

If it’s a nice day we’ll go to the beach. Assume the hypothesis


“it’s a nice day” is true. Then by modus ponens it follows that
“we’ll go to the beach”.
The rules of inference Page 66
Rule of inference Tautology Name
pq
p [ p  ( p  q )]  q Modus ponens
q
q
pq [q  ( p  q)]  p Modus tollen
 p
pq
qr [( p  q)  (q  r )]  ( p  r ) Hypothetical syllogism
pr
pq
p (( p  q)  p )  q Disjunctiv e syllogism
q
p
p  ( p  q) Addition
pq
pq
( p  q)  p Simplification
p
p
q (( p)  (q))  ( p  q) Conjunctio n
pq
pq
p  r [( p  q )  (p  r )]  ( p  r ) Resolution
q  r
Another view on what we are doing

You might think of this as some sort of game.

You are given some statement, and you want to see if it is a


valid argument and true

You translate the statement into argument form using propositional


variables, and make sure you have the premises right, and clear what
is the conclusion

You then want to get from premises/hypotheses (A) to the conclusion (B)
using the rules of inference.

So, get from A to B using as “moves” the rules of inference


Using the rules of inference to build arguments An example

It is not sunny this afternoon and it is colder than yesterday.


If we go swimming it is sunny.
If we do not go swimming then we will take a canoe trip.
If we take a canoe trip then we will be home by sunset.
We will be home by sunset
Using the rules of inference to build arguments An example

1. It is not sunny this afternoon and it is colder than yesterday.


2. If we go swimming it is sunny.
3. If we do not go swimming then we will take a canoe trip.
4. If we take a canoe trip then we will be home by sunset.
5. We will be home by sunset

p It is sunny this afternoon 1. p  q


q It is colder than yesterday 2. rp
r We go swimming
3.  r  s
s We will take a canoe trip
t We will be home by sunset (the conclusion) 4. st
5. t

propositions hypotheses
Using the rules of inference to build arguments An example
1. p  q
p It is sunny this afternoon
q It is colder than yesterday
2. r p
r We go swimming 3.  r  s
s We will take a canoe trip 4. st
t We will be home by sunset (the conclusion)
5. t
Step
Step Reason
Reason
Reason
1. 
pp  qq Hypothesis
Hypothesis
Hypothesis Rule of inference
pq
Tautology Name

p [ p  ( p  q )]  q Modus ponens

2. p Simplifica
Simplification
tionusing
using(1)
(1) q
q
pq
3. r  p Hypothesis
[q  ( p  q)]  p Modus tollen
Hypothesis  p
pq

4. r Modus
Modustollens
tollensusing
using(2)
(2)and
and(3)
(3) qr
pr
[( p  q )  (q  r )]  ( p  r ) Hypothetical syllogism

pq
5. r  s Hypothesis p (( p  q)  p )  q Disjunctiv e syllogism
q

6. s Modus ponens using (4) and (5) p


pq
p  ( p  q) Addition

pq
7. s  t Hypothesis p
p
( p  q)  p Simplification

8. t Modus ponens using (6) and (7) (( p )  (q ))  ( p  q )


q Conjunctio n
pq
pq
p  r [( p  q )  (p  r )]  ( p  r ) Resolution
q  r
Using the resolution rule (an example)

1. Anna is skiing or it is not snowing.


2. It is snowing or Bart is playing hockey.
3. Consequently Anna is skiing or Bart is playing hockey.

We want to show that (3) follows from (1) and (2)


Using the resolution rule (an example)

1. Anna is skiing or it is not snowing.


2. It is snowing or Bart is playing hockey.
3. Consequently Anna is skiing or Bart is playing hockey.

hypotheses propositions
1. p  r p Anna is skiing
2. r  q q Bart is playing hockey
r it is snowing

pq
p  r Resolution rule

q  r
Consequently Anna is skiing or Bart is playing hockey
Rules of Inference & Quantified Statements

Maybe another example?


You are about to leave for school in the
morning and discover that you don’t have your
glasses. You know that the following
statements are true.
a.If my glasses are on the kitchen table,then i
saw them at breakfast.
b.I was reading the newspaper in the living
room or I was reading the newspaper in the
kitchen.
c.If I was reading the newspaper in the living
room,then my glasses are on the coffee table.
d.I did not see my glass at breakfast
e.e. If I was reading my book in bed, then my
glasses are on the bed table.
f.f. If I was reading the newspaper in the
kitchen, then my glasses are on the kitchen
table.
g.Where are the glasses?
Solution:
1.The glasses are not on the
kitchen table(by a,d and
modus tollens)
2.I didn’t read the newspaper
in the kitchen(by f,1 and
modus tollens)
3.I read the newspaper in the
living room (by b,2 and
elimination)
4.My glasses are on the coffee
table(by c,3 and modus
ponens)
Symbolize the situation to find
solution:
 Let p=my glass are on the kitchen
table.
 q= I saw my glasses at breakfast
 r= I was reading the newspaper in
the living room
 s= I was reading the newspaper in
the kitchen
 t= my glasses are on the coffee table
 u= I was reading my book in bed
 v= my glasses are on the bed table
Statements translate into the following
premises:
(a) p⇒q (b) r ˅ s (c) r ⇒t (d) ~q (e) u
⇒ v (f) s ⇒ p
The following deductions can be made:
1.p ⇒ q by(a)
~q by(d)
 ∴  ~p by modus tollens

2.s ⇒ p by(f)
~p by the conclusion of (1)
∴  ~s by modus tollens
3. r ˅ s by(b)
~s by the conclusion of (2)
∴ r by elimination

4. r ⇒t by(c )
r by the conclusion of (3)
∴ t by modus ponens
Hence t is true and the glasses are on

You might also like