Professional Documents
Culture Documents
CS103 Slides Lecture 6 PDF
CS103 Slides Lecture 6 PDF
Rules of Inference
117
Motivation
118
Rules of Inference
119
Modus ponens
120
Modus ponens
121
Modus tollens
122
Modus tollens
123
Rules Name
p→q
Common Rules of p Modus ponens
q
Inference p→q
q Modus tollens
p
• In addition to Modul ponens and
p→q
Modus tollens, there are some other q→r Hypothetical
common rules of inferences p → r syllogism
• The right-side table shows the list pq Disjunctive
• Most of them are easy to understand p
syllogism
• They are also easy to justify q
• Example: Verify disjunctive syllogism p
Addition
p q
• The first rule pq is true
• So p, or q, or both are true pq
p
Simplification
• But, by the second rule, p is true
p
• So, p is false. So, q must be true q Conjunction
• Exercise: Verify remaining rules similarly p q
124
Deduction
125
Deduction
126
Deduction
127
Deduction
128
Two Common Mistakes
129
Two Common Mistakes
130
Proof Techniques
131
Direct Proof
132
Direct Proof
133
Proof by Contrapositive
134
Proof by Contrapositive
135
Proof by Contrapositive
• Proof by contrapositive:
• Take the contrapositive of “if n2 is odd, then n is Proof by
odd”, which is “if n is not odd, then n2 is not odd”
contrapositive
• Start with “n not odd”
• n not odd, so n even. So, n = 2k // k is integer take q → p
• n2 = (2k)2 = 4k2 = 2(2k2) = 2k’ // k’ = (2k2) is start with q
// another integer
• So, n is even (not odd)
2
136
Proof by Contradiction
137
Proof by Contradiction
138
Proof by Contradiction
139
Proof of Equivalence ()
140
Proof of Equivalence ()
141