MTK3013-Chapter1.5 Rules of Inference - Rev1
MTK3013-Chapter1.5 Rules of Inference - Rev1
MTK3013-Chapter1.5 Rules of Inference - Rev1
my
MTK3013
DISCRETE STRUCTURES
http://fskik.upsi.edu.my
Definitions
• A theorem is a valid logical assertion which can be
proved using
– Axioms: statements which are given to be true
– Rules of inference: logical rules allowing the deduction of
conclusions from premises
• A lemma is a ‘pre-theorem’ or a result which is
needed to prove a theorem.
• A corollary is a ‘post-theorem’ or a result which
follows directly from a theorem.
http://fskik.upsi.edu.my
Rules of Inference
H1
H2
H1, H2, … Hn are the hypotheses
Hn
We use conjunction: H1 ^ H2 ^ H3…
C C is the conclusion.
“” means “therefore” or “it follows that”
http://fskik.upsi.edu.my
q
http://fskik.upsi.edu.my
Example: Simplification
pq ( p q) p Simplification
p
• In other words
If the hypothesis p is true
and the hypothesis (p->q) is true
Then I can conclude q
http://fskik.upsi.edu.my
• p : “n is greater than 3”
• q: “n2 is greater than 9”
Exercise
Validity of an Argument
• An argument is valid if
– whenever all hypotheses are true, the
conclusion is also true
• To prove that an argument is valid:
– Assume the hypotheses are true
– Use the rules of inference and logical
equivalences to determine that the conclusion
is true
http://fskik.upsi.edu.my
pTp Identity
pFp
pTT Domination
pFF
ppp Idempotent
ppp
( p) p Double Negation
http://fskik.upsi.edu.my
pqqp
(p q) r p (q r) Associative
(p q) r p (q r)
p (q r) (p q) (p r) Distributive
p (q r) (p q) (p r)
(p q) p q De Morgan’s
(p q) p q
http://fskik.upsi.edu.my
p (p q) p Absorption
p (p q) p
p p T Negation
p p F
http://fskik.upsi.edu.my
Example
Example
• Assignments:
p Horses fly
q Cows eat artichokes
r The mosquito is the national bird
s Peanut butter tastes good on hot
dogs
• Represent the argument using the
variables
(p q) r
rs
Hypotheses
s
q Conclusion
http://fskik.upsi.edu.my
Example
Assertion Reasons
1. (p q) r Hypothesis
2. r s Hypothesis
3. (p q) s Hypothetical syll. on 1. and 2.
4. s Hypothesis
5. (p q) Modus tollens on 3. and 4.
6. p q DeMorgan on 5.
7. q p Commutative on 6.
8. q Simplification on 7.
Example
we select any
element c and P(c) is true
Therefore xP(x)
xP(x)
therefore for at
least one specific c,
P(c) is true
we select a particular
element c and P(c) is true
Therefore, xP(x)
http://fskik.upsi.edu.my
Example
• Everyone in the discrete math class has taken a CS
course. Marla is a student in the discrete class.
Therefore, Marla has taken a CS course.
C(Marla)
Exercise
Fallacies
Circular Reasoning
Methods of Proof
• Direct proof
• Indirect proof
• Vacuous proof
• Trivial proof
• Proof by contradiction
• Proof by cases
• Existence proof
http://fskik.upsi.edu.my
Proof Basics
Direct Proof
• Assume the hypotheses are true
• Use rules of inference and any logical
equivalences to establish the truth of the
conclusion
• HOW TO PROVE:
– If p is true ,then q has to be true for p—>q to be
true
• Example: The proof we did earlier about
cows not eating artichokes was an example
of a direct proof
http://fskik.upsi.edu.my
Example
Example (Cont)
• Assume the hypothesis “n is odd” true:
– n is odd
• Since n is odd, then k n=2k+1
• Now, is the conclusion “n2 is odd” true?
• n2 = (2k+1)2 = 4k2 +4k +1
= 2(2k2+2k)+1
= 2 (m) +1, where some integer
m=2k2+2k
Indirect Proof
Example
• Give an indirect proof to the theorem “if
3n+2 is odd, then n is odd”
(3n+2 is odd) (n is odd)
Example (Cont)
• Assuming the hypothesis (of the contra
positive) “n is even” true
• Then n=2k
• Now, is the conclusion (of the
contrapositive) “3n+2 is even” true?
3n+2 = 3(2k)+2=6k+2
=2(3k+1)
=2(m), where m =3k+1
• Then “3n+2 is even” is true
• Proof complete
http://fskik.upsi.edu.my
Vacuous Proof
Example
Trivial Proof
Example
Proof by Contradiction
Reductio ad absurdum
(reduction to the absurd )
• We want to proof that pq, but… what if we can proof
that ~p implies a contradiction (i.e., q is FALSE no matters
what, or an absurd)??
• Mathematical definition of the proof
– Find a contradiction q such that
pq pF T
• Consequently, if we show the contradiction, then the assumption
~p is wrong (FALSE), so p must be true
• To prove that p is true, you have to show that p leads to
a contradiction i.e., you have to prove that pF is true.
http://fskik.upsi.edu.my
Example
Example cont
Proof by Contradiction
(Cont..)
• An indirect proof of an implication pq can be
rewritten as a proof by contradiction.
• In such proofs, firstly assume the negation of conclusion,
i.e., q.
• Assume that both p and q are true.
• Then use a direct proof to show that
q p
• This leads to the contradiction pp.
• HOMEWORK. Example 22 (pg 67) If 3n+2 is odd, then n is
odd.
http://fskik.upsi.edu.my
Example cont
• Prove “if 3n+2 is odd, then n is odd”.
– (3n+2 is odd) (n is odd)
p q
– p: 3n+2 is odd, ~p: 3n+2 is even
– q: n is odd, ~q: n is even
• Assume both p and q are true.
– 3n+2 is odd n is even.
http://fskik.upsi.edu.my
Example cont
• Then n=2k, this implies
– 3n+2 = 3(2k) +2
= 6k+2
= 2(3k+1)
= 2(t) , where some integer t=3k+1
Proof by Cases
• Break the premise of pq into an equivalent
disjunction of the form p1p2pn
• Then use the equivalence
[(p1p2pn) q] [(p1q)(p2 q) (pnq)]
• Each of the implications pi q is a case.
• You must
– Convince the reader that the cases are inclusive (i.e., they
exhaust all possibilities)
– Establish all implications
http://fskik.upsi.edu.my
Proving an equivalence
Existence Proof
• The proof of xP(x) is called an existence proof.
– Constructive
– Non-constructive
• Constructive existence proof
– Find an element c in the universe of discourse such
that P(c) is true
• Non-constructive existence proof
– Do not find c, rather, somehow prove xP(x) is true
– Generally, by contradiction
• Assume no c exists that makes P(c) true
• Derive a contradiction
http://fskik.upsi.edu.my
Exercise 1
• Prove that if m+n and n+p are even
integers, then m+p is even.
http://fskik.upsi.edu.my
Exercise 2
• Prove that if m and n are integers and mn is
even, then m is even or n is even.