Math.3336: Discrete Mathematics
Rules of Inference,
Mathematical Proof Techniques
Instructor: Blerina Xhabli
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
1/46
Announcements
I
Please do your reading assignments for every week.
I
The book material will give you an extra point of view to all
the concepts you see during the lectures.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
2/46
Review of Last Lecture
I
Building blocks in Predicate Logic: constants, variables,
predicates
I
Formulas formed using predicates, connectives, and quantifiers
I
Truth value of predicate formulas depend on universe of
discourse and interpretation of predicates and variables
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
3/46
Summary of Quantifiers and/or Nested Quantifiers
Statement
∀x P (x )
∃x P (x )
When True?
P (x ) is true for every x
P (x ) is true for some x
Statement
∀x ∀y P (x , y)
∀y ∀x P (x , y)
∀x ∃y P (x , y)
∃x ∀y P (x , y)
∃x ∃y P (x , y)
∃y ∃x P (x , y)
Instructor: Blerina Xhabli,
When False?
P (x ) is false for some x
P (x ) is false for every x
When True?
P (x , y) is true for every pair x , y
For every x , there is a y for which P (x , y) is true
There is an x for which P (x , y) is true for every y
There is a pair x , y for which P (x , y) is true
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
4/46
Satisfiability, Validity in Predicate Logic
I
The concepts of satisfiability, validity also important in
Predicate Logic
I
A predicate logic formula F is satisfiable if there exists some
domain and some interpretation such that F evaluates to true
I
Example: Prove that ∀x P (x ) → Q(x ) is satisfiable.
D = {?}, P (?) = true, Q(?) = true
I
A predicate logic formula F is valid if, for all domains and all
interpretations, F evaluates to true
I
Prove that ∀x P (x ) → Q(x ) is not valid.
D = {?}, P (?) = true, Q(?) = false
I
Formulas that are satisfiable, but not valid are contingent,
e.g., ∀x P (x ) → Q(x )
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
5/46
Example
I
Is the following formula valid, unsatisfiable, or contingent?
Prove your answer.
((∃x P (x )) ∧ (∃x Q(x ))) → (∃x (P (x ) ∧ Q(x )))
If we take D = {?, ◦}, P (?) = true, P (◦) = false,
Q(?) = false, Q(◦) = true, then the formula above is false.
If we take D = {?, ◦}, P (?) = true, P (◦) = false,
Q(?) = true, Q(◦) = false, then the formula above is true.
Thus, the formula above is contingent.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
6/46
Equivalence
I
Two formulas F1 and F2 are equivalent if F1 ↔ F2 is valid
I
In propositional logic, we could prove equivalence using truth
tables, but not possible in predicate logic.
I
However, we can still use known equivalences to rewrite one
formula as the other.
I
Example: Prove that ¬(∀x (P (x ) → Q(x ))) and
∃x (P (x ) ∧ ¬Q(x )) are equivalent.
I
Example: Prove that ¬∃x ∀y P (x , y) and ∀x ∃y ¬P (x , y) are
equivalent.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
7/46
Rules of Inference
I
We can prove validity in Predicate Logic by using proof rules
I
Proof rules are written as rules of inference:
Hypothesis1
Hypothesis2
...
Conclusion
I
An example inference rule:
All men are mortal
Socrates is a man
∴ Socrates is mortal
I
We’ll learn about more general inference rules that will allow
constructing formal proofs
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
8/46
Modus Ponens
I
Most basic inference rule is modus ponens:
φ1
φ1 → φ2
φ2
I
Modus ponens applicable to both propositional logic and
predicate logic
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
9/46
Example Uses of Modus Ponens
I
Application of modus ponens in propositional logic:
p∧q
(p ∧ q) → r
r
I
Application of modus ponens in first-order logic:
P (a)
P (a) → Q(b)
Q(b)
I
Application of modus ponens in a math proof: ”If x > 1, then
x 2 > x . We know x > 1. Therefore, x 2 > x > 1”.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
10/46
Modus Tollens
I
Second important inference rule is modus tollens:
φ1 → φ2
¬φ2
¬φ1
I
Recall: φ1 → φ2 and its contrapositive ¬φ2 → ¬φ1 are
equivalent to each other
I
Therefore, correctness of this rule follows from modus ponens
and equivalence of a formula and its contrapositive.
I
Example argument using modus tollens: ”If x > 1, then
x 2 > x . But we know x 2 ≤ x . Therefore, x ≤ 1.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
11/46
Example Uses of Modus Tollens
I
Application of modus tollens in propositional logic:
p → (q ∨ r )
¬(q ∨ r )
¬p
I
Application of modus tollens in predicate logic:
Q(a)
¬P (a) → ¬Q(a)
P (a)
I
Application of modus ponens in a math proof: ”If x > 1, then
x 2 > x . We know x > 1. Therefore, x 2 > x > 1”.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
12/46
Hypothetical Syllogism (HS)
φ1 → φ2
φ2 → φ3
φ1 → φ3
I
Basically says ”implication is transitive”
I
An example application of hypothetical syllogism:
If I do not wake up, then I cannot go to work.
If I cannot go to work, then I will not get paid.
∴ If I do not wake up, then I will not get paid.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
13/46
Or Introduction and Elimination
I
Or introduction (Addition):
φ1
φ1 ∨ φ2
I
Example application: ”Socrates is a man. Therefore, either
Socrates is a man or there are red elephants on the moon.”
I
Or elimination (Disjunctive Syllogism):
φ1 ∨ φ2
¬φ2
φ1
I
Example application: ”It is either a dog or a cat. It is not a
dog. Therefore, it must be a cat.”
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
14/46
And Introduction and Elimination
I
And introduction (Conjunction):
φ1
φ2
φ1 ∧ φ2
I
This rule just follows from definition of conjunction
I
Example application: ”It is Tuesday. It’s the afternoon.
Therefore, it’s Tuesday afternoon”.
I
And elimination (Simplification):
φ1 ∧ φ2
φ1
I
Example application: ”It is Tuesday afternoon. Therefore, it is
Tuesday”.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
15/46
Resolution
I
Final inference rule: resolution
φ1 ∨ φ2
¬φ1 ∨ φ3
φ2 ∨ φ3
I
To see why this is correct, observe φ1 is either true or false.
I
Suppose φ1 is true. Then, ¬φ1 is false. Therefore, by second
hypothesis, φ3 must be true.
I
Suppose φ1 is false. Then, by 1st hypothesis, φ2 must be true.
I
In any case, either φ2 or φ3 must be true; ∴ φ2 ∨ φ3
I
Resolution is key inference rule for automating logical
reasoning!
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
16/46
Resolution Example
I
Example 1:
P (a) ∨ ¬Q(b)
Q(b) ∨ R(c)
P (a) ∨ R(c)
I
Example 2:
p∨q
q ∨ ¬p
q
Instructor: Blerina Xhabli,
Summary
Math.3336: Discrete Mathematics
Name
Modus ponens
Modus tollens
Hypothetical syllogism
Or introduction
Or elimination
And introduction
And elimination
Resolution
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
17/46
Rule of Inference
φ1
φ1 → φ2
φ2
φ1 → φ2
¬φ2
¬φ1
φ1 → φ2
φ2 → φ3
φ1 → φ3
φ1
φ1 ∨ φ2
φ1 ∨ φ2
¬φ2
φ1
φ1
φ2
φ1 ∧ φ2
φ1 ∧ φ2
φ1
φ1 ∨ φ2
¬φ1 ∨ φ3
φ2 ∨ φ3
Rules of Inference, Mathematical Proof Techniques
18/46
Using the Rules of Inference
Assume the following hypotheses:
1. It is not sunny today and it is colder than yesterday.
2. We will go to the lake only if it is sunny.
3. If we do not go to the lake, then we will go hiking.
4. If we go hiking, then we will be back by sunset.
Show these lead to the conclusion: ”We will be back by sunset.”
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
19/46
Encoding in Logic
I
First, encode hypotheses and conclusion as logical formulas.
I
To do this, identify propositions used in the argument:
Instructor: Blerina Xhabli,
I
s = ”It is sunny today”
I
c= ”It is colder than yesterday”
I
l = ”We’ll go to the lake”
I
h = ”We’ll go hiking”
I
b= ”We’ll be back by sunset”
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
20/46
Encoding in Logic, cont.
I
”It’s not sunny today and colder than yesterday.” ¬s ∧ c
I
”We will go to the lake only if it is sunny” l → s
I
”If we do not go to the lake, then we will go hiking.” ¬l → h
I
”If we go hiking, then we will be back by sunset.” h → b
I
Conclusion: ”We’ll be back by sunset” b
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
21/46
Formal Proof Using Inference Rules
1.
2.
3.
4.
5.
6.
7.
8.
¬s ∧ c
l →s
¬l → h
h→b
¬s
¬l
¬l → b
b
Instructor: Blerina Xhabli,
Hypothesis
Hypothesis
Hypothesis
Hypothesis
And Elim (1)
Modus tollens (2,5)
Hypothetical syllogism (3,4)
Modus ponens (6,7)
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
22/46
Another Example
Assume the following hypotheses:
1. It is not raining or Kate has her umbrella
2. Kate does not have her umbrella or she does not get wet
3. It is raining or Kate does not get wet
4. Kate is grumpy only if she is wet
Show these lead to the conclusion: ”Kate is not grumpy.”
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
23/46
Encoding in Logic
I
First, encode hypotheses and conclusion as logical formulas.
I
To do this, identify propositions used in the argument:
Instructor: Blerina Xhabli,
I
r = ”It is raining”
I
u= ”Kate has her umbrella”
I
w = ”Kate is wet”
I
g = ”Kate is grumpy”
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
24/46
Encoding in Logic, cont.
I
”It is not raining or Kate has her umbrella.” ¬r ∨ u
I
”Kate does not have her umbrella or she does not get wet”
¬u ∨ ¬w
I
”It is raining or Kate does not get wet.” r ∨ ¬w
I
” Kate is grumpy only if she is wet.” g → w
I
Conclusion: ”Kate is not grumpy.” ¬g
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
25/46
Formal Proof Using Inference Rules
1.
2.
3.
4.
5.
6.
7.
8.
¬r ∨ u
¬u ∨ ¬w
r ∨ ¬w
g →w
¬r ∨ ¬w
¬w ∨ ¬w
¬w
¬g
Instructor: Blerina Xhabli,
Hypothesis
Hypothesis
Hypothesis
Hypothesis
Resolution 1,2
Resolution 3,5
Idempotence
Modus tollens 4,7
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
26/46
Additional Inference Rules for Quantified Formulas
I
Inference rules we learned so far are sufficient for reasoning
about quantifier-free statements
I
There are four more inference rules for making deductions
from quantified formulas
I
These come in pairs for each quantifier (universal/existential)
I
One is called generalization, the other one called instantiation
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
27/46
Universal Instantiation
I
If we know something is true for all members of a group, we
can conclude it is also true for a specific member of this group
I
This idea is formally called universal instantiation:
∀x P (x )
(for any c)
P (c)
I
If we know ”All MATH classes at UH are hard”, universal
instantiation allows us to conclude ”Math3336 is hard”!
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
28/46
Example
I
Consider predicates man(x) and mortal(x) and the hypotheses:
1. All men are mortal:
2. Socrates is a man:
I
Using rules of inference, prove mortal(Socrates)
3. man(Socrates) → mortal(Socrates) ∀-inst. (1)
4. mortal(Socrates) Modus ponens (1), (3)
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
29/46
Universal Generalization
I
Suppose we can prove a claim for an arbitrary element in the
domain.
I
Since we’ve made no assumptions about this element, proof
should apply to all elements in the domain.
I
This correct reasoning is captured by universal generalization
P (c) for arbitrary c
∀x P (x )
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
30/46
Universal Generalization in Math Proofs
I
Universal generalization is (implicitly) used quite frequently in
math proofs.
I
Example: Prove ∀x x (x − 1) ≥ 0 over the domain of integers.
I
Proof: Let a be any arbitrary integer. There are three
possibilities: either (i) a = 0,(ii) a < 0 or (iii) a > 0.
For (i), if a = 0, then a(a − 1) ≥ 0.
For (ii), if a < 0, a − 1 ≤ 0; thus, a(a − 1) ≥ 0.
For (iii), if a > 0, a − 1 ≥ 0; thus, a(a − 1) ≥ 0.
Thus, a(a − 1) ≥ 0.
I
Observe: This proof uses universal generalization! We have
proved property for arbitrary integer a, and concluded
∀x x (x − 1) ≥ 0.
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
31/46
Example
Prove ∀x Q(x ) from the hypotheses:
1. ∀x (P (x ) → Q(x )) Hypothesis
2. ∀x P (x )
Hypothesis
3. P (c) → Q(c)
∀-inst (1)
4. P (c)
∀-inst (2)
5. Q(c)
Modus ponens (3), (4)
6. ∀x Q(x )
∀-gen (5)
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
32/46
Caveat About Universal Generalization
I
When using universal generalization, need to ensure that c is
truly arbitrary!
I
If you prove something about a specific person Mary, you
cannot make generalizations about all people
__________________________________
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
33/46
Existential Instantiation
I
Consider formula ∃x P (x ).
I
We know there is some element, say c, in the domain for
which P (c) is true.
I
This is called existential instantiation:
∃x P (x )
(for unused c)
P (c)
I
Here, c is a fresh name (i.e., not used before in proof).
I
Instructor: Blerina Xhabli,
Otherwise, can prove non-sensical things such as: ”There exists
some animal that can fly. Thus, rabbits can fly”!
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
34/46
Example Using Existential Instantiation
Consider the hypotheses ∃x P (x ) and ∀x ¬P (x ). Prove that we
can derive a contradiction (i.e., false) from these hypotheses.
1.
2.
3.
4.
5.
6.
∃x P (x )
∀x ¬P (x )
P (c)
¬P (c)
P (c) ∧ ¬P (c)
false
Instructor: Blerina Xhabli,
Hypothesis
Hypothesis
∃ instantiation 1, c fresh
∀ instantiation 1
∧-intro
Negation law
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
35/46
Existential Generalization
I
Suppose we know P (c) is true for some constant c
I
Then, there exists an element for which P is true
I
Thus, we can conlude ∃x P (x )
I
This inference rule called existential generalization:
P (c)
∃x P (x )
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
36/46
Example Using Existential Generalization
Consider the hypotheses atUH (George) and smart(George).
Prove ∃x (atUH (x ) ∧ smart(x ))
1.
2.
3.
4.
atUH (George)
smart(George)
atUH (George) ∧ smart(George)
∃x (atUH (x ) ∧ smart(x ))
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Hypothesis
Hypothesis
∧ intro, 1,2
∃ generalization, 3
Rules of Inference, Mathematical Proof Techniques
37/46
Summary of Inference Rules for Quantifiers
Name
Universal Instantiation
Universal Generalization
Existential Instantiation
Existential Generalization
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rule of Inference
∀x P (x )
(anyc)
P (c)
P (c) (for arbitraryc)
∀x P (x )
∃x P (x )
P (c) for fresh c
P (c)
∃x P (x )
Rules of Inference, Mathematical Proof Techniques
38/46
Example I
I
Prove that these hypotheses imply ∃x (P (x ) ∧ ¬B (x )):
1. ∃x (C (x ) ∧ ¬B (x )) (Hypothesis)
2. ∀x (C (x ) → P (x )) (Hypothesis)
3. C (a) ∧ ¬B (a) (∃-inst, 1)
4. C (a) (∧-elim, 3 )
5. ¬B (a) (∧-elim, 3 )
6. C (a) → P (a) (∀-inst, 2)
7. P (a) (Modus ponens, 4, 6)
8. P (a) ∧ ¬B (a) (∧-intro, 5,7)
9. ∃x (P (x ) ∧ ¬B (x )) (∃-gen, 8)
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
39/46
Example II
I
Prove the below hypotheses are contradictory by deriving false
1. ∀x (P (x ) → (Q(x ) ∧ S (x ))) (Hypothesis)
2. ∀x (P (x ) ∧ R(x )) (Hypothesis)
3. ∃x (¬R(x ) ∨ ¬S (x )) (Hypothesis)
4. ¬R(a) ∨ ¬S (a) (∃-inst, 3)
6. P (a) (∧-elim, 5)
5. P (a) ∧ R(a) (∀-inst, 2)
7. R(a) (∧-elim, 5)
8. ¬S (a) (Resolution, 4, 7)
9. P (a) → Q(a) ∧ S (a) (∀-inst, 1)
10. Q(a) ∧ S (a) (Modus ponens, 6, 9)
11. S (a) ∧-elim, 10
12. S (a) ∧ ¬S (a) ≡ false (∧-intro, 8, 11; double negation)
Instructor: Blerina Xhabli,
Math.3336: Discrete Mathematics
Rules of Inference, Mathematical Proof Techniques
40/46
                
    
            
    
                © Copyright 2025 Paperzz