0% found this document useful (0 votes)
10 views42 pages

Week 4 and 5

The document discusses the rules of inference in propositional logic, which are essential for constructing valid arguments. It covers various forms of arguments, such as Modus Ponens, Modus Tollens, and others, providing examples and proofs to illustrate their application. Additionally, it explains rules related to universal and existential quantifiers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views42 pages

Week 4 and 5

The document discusses the rules of inference in propositional logic, which are essential for constructing valid arguments. It covers various forms of arguments, such as Modus Ponens, Modus Tollens, and others, providing examples and proofs to illustrate their application. Additionally, it explains rules related to universal and existential quantifiers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Discrete Structures

Week - 5
Rules of Inference
Rules of Inference
• Rules of inference are templates for constructing valid
arguments.
• Rules of inference are basic tools for establishing the truth
of statements.
• Valid means that the conclusion of the argument must
follow from the truth of the preceding statements of the
argument.
Definitions
• An Argument in propositional logic is a sequence of
propositions that end with a conclusion.
• All except the final proposition in the argument are called
premises.
• The final proposition is called conclusion.
• An argument is valid if the truth of all premises implies that the
conclusion is true.
• i.e. (p1  p2  …  pn)  q is a tautology.
• An Argument form in propositional logic is sequence of
compound propositions involving propositions variables. An
argument form is valid if no matter which particular propositions
are substituted for the propositional variables in its premises,
the conclusion is true if the premises are all true.
Valid Arguments
• Consider the following argument involving
propositions:
• “if you are in this class, then you will get a grade”
• “You are in this class”
Therefore,
“You will get a grade”

pq
p
 q
Modus Ponens

• The tautology (p  (p→q)) → q is basis of modus ponens.

p q p→q p(p→q)) (p(p→q)) → q

T T T T T
T F F F T
F T T F T
F F T F T

p
pq
q
Modus Ponens

• The tautology (p  (p→q)) → q is basis of modus ponens.


• In particular, modus ponens tells us that if a conditional
statement and the hypothesis of this conditional statement
are both true, then the conclusion must also be true.
Modus Ponens Example
• Assume you are given the following two statements:
• “you are in this class”
• “if you are in this class, you will get a grade”

• Let p = “you are in this class”


• Let q = “you will get a grade”

• By Modus Ponens, you can conclude that “you will get a


grade”.
Modus Ponens Example
• Consider the following statements
• “If it snows today, then we will go skiing”
• “It is snowing today”

• Let p = “it is snowing today”


• Let q =“we will go skiing”

• By Modus Ponens, you can conclude that “We will go


skiing”.
Modus Ponens Example
• Consider the following statements
2
• “If 2 > , then( 2) > (32) 2 ”
3
2

• “ 2 > 32”
Modus Tollens
• Assume that we know: ¬q and p → q
• Recall that p → q  ¬q → ¬p
• Thus, we know ¬q and ¬q → ¬p
• We can conclude ¬p

q
pq
p
Modus Tollens Example
• Assume you are given the following two statements:
• “you will not get a grade”
• “if you are in this class, you will get a grade”

• Let p = “you are in this class”


• Let q = “you will get a grade”

• By Modus Tollens, you can conclude that you are not in


this class
Addition & Simplification
• Addition: If you know that p is true, then p  q will
ALWAYS be true i.e. p → p  q
p
pq

• Simplification: If p  q is true, then p will ALWAYS be true


i.e. p  q → p
pq
p
Addition Example
• Assume you are given the following statements:
• “ It is below freezing now. Therefore, it is either below
freezing or raining now”

• Let p = “It is below freezing now”.


• Let q = “It is raining now”.

• Then this argument is of the form


p
pq
Simplification Example
• Assume you are given the following statements:
• “ It is below freezing and raining now. Therefore, it is
below freezing now”

• Let p = “It is below freezing now”.


• Let q = “It is raining now”.

• This argument is of the form


pq
p
Hypothetical Syllogism
• If p → q is true, and q → r is true, then p → r must be true

p→q
q→r
∴p→r
Hypothetical Syllogism Example
• Assume you are given the following statements:
• If it rains today, then we will not have a barbecue today. If we
do not have a barbecue today, then we will have a barbecue
tomorrow. Therefore, if it rains today, then we will have a
barbecue tomorrow.

• Let p = “It is raining today,”


• Let q = “We will not have a barbecue today,”
• Let r =“We will have a barbecue tomorrow.”

• Then this argument is of the form


p→q
q→r
∴p→r
Example Proof
• We have the hypotheses:
• “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”
• “If we take a canoe trip, then we will be home by sunset”
• Can it lead to the conclusion that “we will be home by
sunset”?
• (( s  c)  (m  s)  ( m  t)  (t  h))  h ???
• When
• s = “It is sunny this afternoon”; c = “it is colder than yesterday”
• m = “We will go swimming”; t = “we will take a canoe trip”
• h = “we will be home by sunset”
Example of Proof
1. ¬s  c 1st hypothesis
2. ¬s Simplification using step 1
3. ms 2nd hypothesis
4. ¬m Modus tollens using steps 2 & 3
5. ¬m  t 3rd hypothesis
6. t Modus ponens using steps 4 & 5
7. th 4th hypothesis
8. h Modus ponens using steps 6 & 7
Example Proof

• “If it does not rain or it is not foggy, then the sailing race
will be held and the lifesaving demonstration will go on”
• ( r   f)  (s  d)
• “If the sailing race is held, then the trophy will be
awarded”
• st
• “The trophy was not awarded”
• t

• Can you conclude: “It rained”?


Example of Proof
1. ¬t 3rd hypothesis
2. s→t 2nd hypothesis
3. ¬s Modus tollens using steps 1 & 2
4. (¬r¬f)→(sd) 1st hypothesis
5. ¬(sd)→¬(¬r¬f) Contrapositive of step 4
6. (¬s¬d)→(rf) DeMorgan’s law and double
negation law
7. ¬s¬d Addition from step 3
8. rf Modus ponens using steps 6 & 7
9. r Simplification using step 8
More Rules of Inference
• Disjunctive syllogism: If p  q is true, and p is false, then q
must be true
[(p  q)  ¬p]  q

• Conjunction: if p and q are true separately, then p  q is


true
[(p)  (q)]  (p  q)

• Resolution: If p  q is true, and ¬p  r is true, then q  r


must be true
[(p  q)  (¬p  r )]  q  r
Summary: Rules of Inference
Rules of Inference Tautology Name
p (p 𝖠 (p → q)) → q Modus ponens
p→q
∴q
¬q (¬q 𝖠 (p → q))→¬p Modus tollens
p→q
∴ ¬p
p→q ((p → q) 𝖠 (q → r)) → (p Hypothetical syllogism
q→r → r)
∴p→r
p∨q ((p ∨ q)𝖠¬p) → q Disjunctive syllogism
¬p
∴q
Summary: Rules of Inference
Rules of Inference Tautology Name
p p → (p ∨ q) Addition
∴p∨q
p𝖠q (p 𝖠 q) → p Simplification
∴p
p ((p) 𝖠 (q)) → (p 𝖠 q) Conjunction
q
∴p𝖠q
p∨q ((p ∨ q) 𝖠 (¬p ∨ r)) → (q Resolution
¬p ∨ r ∨ r)
∴q∨r
Example Proof
• We have hypotheses
“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”
The conclusion “If I do not finish writing the program, then I will wake
up feeling refreshed.”

• Let p = “You send me an e-mail message,”


• q = “I will finish writing the program,”
• r = “I will go to sleep early,”
• s = “I will wake up feeling refreshed.”
Example Proof

1. p → q 1st Hypothesis
2. ¬q →¬p Contrapositive of 1
3. ¬p → r 2nd Hypothesis
4. ¬q → r Hypothetical syllogism using 2 and 3
5. r → s 3rd Hypothesis
6. ¬q → s Hypothetical syllogism using 4 and 5
Example
• Consider the following argument
• If you do the every problem in this book, then you will
learn discrete mathematics. You learned discrete
mathematics
Therefore
You did every problem in this book
Let p = “you do the every problem in this book”
q = “you learned discrete mathematics”
pq
q
p
Exercise
• What rule of inference is used in each of these
arguments?
a) Alice is a mathematics major. Therefore, Alice is either
a mathematics major or a computer science major.

b) Jerry is a mathematics major and a computer science


major. Therefore, Jerry is a mathematics major.

c) If it is rainy, then the pool will be closed. It is rainy.


Therefore, the pool is closed.
Exercise

d) If it snows today, then university will close. The


university is not closed today. Therefore, it did not snow
today.

e) If I go swimming, then I will stay in the sun too long. If I


stay in the sun too long, then I will sunburn. Therefore, if
I go swimming, then I will sunburn.
Rules of Inference for the Universal Quantifier

• Assume that we know that x P(x) is true


• Then we can conclude that P(c) is true
• Here c is particular value in domain
• This is called “universal instantiation”
• Example: All women are wise therefore Lisa is wise.

• Assume that we know that P(c) is true for all value of c in


domain
• Then we can conclude that x P(x) is true
• This is called “universal generalization”
• Example: Student s has taken calculus therefore All students has
taken calculus.
Rules of Inference for the Existential Quantifier

• Assume that we know that x P(x) is true


• Then we can conclude that P(c) is true for some value of c
• This is called “existential instantiation”.
• Example: There is a fish in a pool therefore Some fish c is in pool.

• Assume that we know that P(c) is true for some value of c


• Then we can conclude that x P(x) is true
• This is called “existential generalization”.
• Example: Ali is in the store therefore There is a person in store.
Rules of Inference for Quantified Statements

Rule of Inference Name

∀xP(x)
Universal instantiation
∴ P(c)

P(c) for an arbitrary c


Universal generalization
∴ ∀xP(x)

∃xP(x)
Existential instantiation
∴ P(c) for some element c

P(c) for some element c


Existential generalization
∴ ∃xP(x)
Example
• Given the hypothesis:
“Everyone in this discrete mathematics class has taken a course in
computer science” and “Ali is a student in this discrete mathematics
class” imply the conclusion “Ali has taken a course in computer
science.”

• Let D(x) = “x is in this discrete mathematics class,”


• Let C(x) = “x has taken a course in computer science.”

• The hypothesis are ∀x(D(x) → C(x)) and D(Ali).


• The conclusion is C(Ali).
Example
• The following steps can be used to establish the
conclusion from the hypothesis.

• Step Reason
1. ∀x(D(x) → C(x)) Hypothesis
2. D(Ali)→C(Ali) Universal instantiation from 1
3. D(Ali) Hypothesis
4. C(Ali) Modus ponens from 2 and 3
Example
• Given the hypothesis
“A student in this class has not read the book,” and “Everyone in this
class passed the first exam” imply the conclusion “Someone who
passed the first exam has not read the book.”

• Let C(x) = “x is in this class,”


• Let B(x) = “x has read the book,”
• Let P(x) = “x passed the first exam.”

• The hypothesis are ∃x(C(x)𝖠¬B(x)) and ∀x(C(x) → P(x)).


• The conclusion is ∃x(P(x)𝖠¬B(x)).
Example Proof
1. ∃x(C(x)𝖠¬B(x))
2. C(a)𝖠¬B(a) Hypothesis
3. C(a) Existential instantiation from 1
4. ∀x(C(x) → P(x)) Simplification from 2
5. C(a) → P(a) Hypothesis
6. P(a)
Universal instantiation from 4
7. ¬B(a)
Modus ponens from 3 and 5
8. P(a)𝖠¬B(a)
Simplification from 2
9. ∃x(P(x)𝖠¬B(x))
Conjunction from 6 and 7
Existential generalization from 8
Universal Modus Ponens

• If x(P(x) Q(x)) is true, and if P(a) is true for a particular


element ‘a’ in the domain of the universal quantifier, then
Q(a) must also be true.

x(P(x) Q(x))
P(a), where a is a particular element in the domain
 Q(a)
Universal Modus Tollens

• If x(P(x) Q(x)) is true, and if Q(a) is false for a


particular element ‘a’ in the domain of the universal
quantifier, then P(a) must also be false.

x(P(x) Q(x))
¬Q(a), where a is a particular element in the domain
 ¬P(a)
Example of Proof

• Given the hypotheses:


• “Linda, a student in this class, owns a red convertible.”
• “Everybody who owns a red convertible has gotten at least one
speeding ticket”
• Can you conclude: “Somebody in this class has gotten a speeding
ticket”?

• Let C(x) = “x is student in class”.


• Let R(x) = “x has owns a red convertible”.
• Let T(x) = “x has gotten speeding ticket”.

• The hypothesis are x (R(x)→T(x)), C(Linda) and R(Linda).


• The conclusion is x (C(x)T(x)).
Example of Proof

1. x (R(x)→T(x)) Hypothesis
2. R(Linda) → T(Linda) Universal instantiation using 1
3. R(Linda) Hypothesis
4. T(Linda) Modes ponens using 2 and 3
5. C(Linda) Hypothesis
6. C(Linda)  T(Linda) Conjunction using 5 and 4
7. x (C(x)T(x)) Existential generalization using 6
How do you know which one to use?
• Experience!

• In general, use quantifiers with statements like “for all” or


“there exists”
Chapter Reading
• Chapter 1, Kenneth H. Rosen, Discrete Mathematics and
Its Applications, Section 1.5
Exercise Questions

Pg - 70,71,72
Q - 2,4,5,13-d,13-b,23

You might also like