You are on page 1of 40

Inference Rule and Proofs

Discrete Mathematics
Syukron Abu Ishaq Alfarozi

Based on slides by Jan Stelovsky

Source:
LOCALLY ROOTED,
GLOBALLY RESPECTED
ugm.ac.id
1.6 Rules of Inference
1.7 Introduction to Proofs
1.8 Proof Methods and Strategy

Based on the Book of​


Discrete Mathematics and It's Applications
By Kenneth H. Rosen
1.6 Rules of Inference
Intro

• An argument is a sequence of statements that end with a


conclusion
• Some forms of argument (“valid”) never lead from correct statements
to an incorrect conclusion.
• Some other forms of argument (“fallacies”) can lead from true
statements to an incorrect conclusion.
Rules of Inference

• Inference rule is a pattern establishing that if we know that a


set of premise statements of certain forms are all true, then
we can validly deduce that a certain related conclusion
statement is true.
• Each valid logical inference rule corresponds to an implication
that is a tautology
premise 1
Corresponding tautology:
premise 2 ((premise 1) ˄ (premise 2)) → conclusion
conclusion
Modus Ponens / Law of Detachment
p Corresponding tautology:
p→q (p ∧ (p → q)) → q
∴q
.

Example.
Modus Tollens
q Corresponding tautology:
p→q ( q ∧ (p → q)) →  p
∴p
.

Example.
Hypothetical Syllogism
p→q Corresponding tautology:
q→r ((p → q) ∧(q → r )) → p → r
∴p→r
.

Example.
“If it rains today, then we will not have a barbecue today.”
“If we don’t have barbecue today, then we will have it tomorrow.”

Therefore, if it rains today, then we will have a barbecue


tomorrow.
Disjunctive Syllogism
p q Corresponding tautology:
p ((p q ) ∧( p)) → q
∴q
.

Example.
Ed’s wallet is in his back pocket or it is on his desk.
Ed’s wallet is not in his back pocket.

Therefore, Ed’s wallet is on his desk.


Resolution
p q Corresponding tautology:
pr ((p q ) ∧( p  r )) → q  r
∴ q r
.

Example.
“Jasmine is skiing or it is not snowing”
“It is snowing or Bart is playing hockey”

Thus imply that


“Jasmine is skiing or Bart is playing hockey”
Quantifiers Inference Rules

∀𝑥 𝑃(𝑥) 𝑃(𝑐) ∃𝑥 𝑃(𝑥) 𝑃(𝑐)


∴ 𝑃(𝑐) ∴ ∀𝑥 𝑃(𝑥) ∴ 𝑃(𝑐) ∴ ∃𝑥 𝑃(𝑥)

Universal Universal Existential Existential


Instantiation Generalization Instantiation Generalization
substitute any (for an arbitrary substitute an for some element
specific member c element c of the element c for c in the domain
in the domain domain which P(c) is true
More Rules of Inference
Example.

Show that the premises


• “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,” and
• “If we take a canoe trip, then we will be home by sunset”

lead to the conclusion “We will be home by sunset.”


Example.

Show that the premises


• “Everyone in this discrete mathematics class has taken a
course in computer science” and
• “Marla is a student in this class”

imply the conclusion “Marla has taken a course in computer


science.”
Fallacies
A fallacy is an inference rule or other proof method that is not logically valid.
A fallacy may yield a false conclusion.

1. Fallacy of affirming the conclusion


“p → q is true, and q is true, so p must be true.”
(No, because F → T is true.)

Example
If David Cameron (DC) is president of the US, then he is at least 40 years old. (p → q)
DC is at least 40 years old. (q)
Therefore, DC is president of the US. (p)
Fallacies
2. Fallacy of denying the hypothesis
“p → q is true, and p is false, so q must be false.”
(No, again because F → T is true.)

Example.
If a person does arithmetic well then, his/her checkbook will balance. (p → q)
I cannot do arithmetic well. (¬p)
Therefore, my checkbook does not balance.(¬q)
1.7 Introduction to Proofs
• Direct Proof

• Indirect Proof
• Proof by Contraposition
• Proof by Contradictiom
Terminologies
Proof A valid argument that establishes the truth of a mathematical statement

Axiom / Postulate A statement that is assumed to be true

Theorem A statement that has been proven to be true

Hypothesis, An assumption (often unproven) defining the structures about which we


premise are reasoning.

Lemma A minor theorem used as a stepping-stone to proving a major theorem.

Corollary A minor theorem proved as an easy consequence of a major theorem.

A statement whose truth value has not been proven. (A conjecture may
Conjecture be widely believed to be true, regardless.)
Proof Methods for p → q
Mainly, there are two (direct and indirect). But overall there are four.

Indirect Vacuous Trivial


Direct Proof
Proof Proof Proof

Proof by Contradiction

Proof by Contraposition
Direct Proof
We have p → q

• Assume that p is true


• Using inference rule and many other means, at the end prove
that q must also be true

Example.
Give a direct proof of the theorem
“If n is an odd integer, then 𝑛2 is odd.”
Indirect Proof: Proof by Contraposition
Using the fact that an implication is equal to its contrapositive
𝑝 → 𝑞 ≡ ¬𝑞 → ¬𝑝
This means that 𝑝 → 𝑞 is true by showing that ¬𝑞 → ¬𝑝 is true.

• Assume that ¬𝑞 is true.


• Using inference rule and many other means, at the end prove that ¬𝑝

Example.
Prove that if n is an integer and 3n + 2 is odd, then n is odd.
Indirect Proof: Proof by Contraposition

Example.
Prove that if n is an integer and 𝑛2 is odd, then n is odd.
Indirect Proof: Proof by Contradiction

We have p → q, suppose we want to prove that p is true.

• Assume that ¬𝑞 is true


• Using inference rule and many other means, show that it arrives at a
contradiction
i.e. prove (p ˄  q) → False
Alternatives.
• Assume that ¬𝑞 and 𝑝 is true
• Using inference rule and many other means, show that q is also true.
• Thus implies that ¬𝑞 and q are both true, which is a contradiction.
Indirect Proof: Proof by Contradiction

Example.
Give a proof by contradiction of the theorem
“If 3n + 2 is odd, then n is odd.”
Indirect Proof: Proof by Contradiction

Example.
Prove that √2 is irrational by giving a proof by contradiction.
Trivial Proof
prove q by itself.
Show ¬p (i.e. p is false) to prove p → q is true.

i.e. q is true, then p → q is true

Example.
Theorem: (For all n) If n is both odd and even, then 𝑛2 = 𝑛 + 𝑛.
Proof: The statement “n is both odd and even” is necessarily false, since no
number can be both odd and even.
So, the theorem is vacuously true
Vacuous Proof
prove  p by itself.
Show q (i.e. q is true) to prove p → q is true.

i.e. p → q is true when p is false

Example.
Theorem: (For integers n) If n is the sum of two prime numbers, then either n is odd or
n is even.
Proof: Any integer n is either odd or even. So the conclusion of the implication is
true regardless of the truth of the hypothesis.
Thus, the implication is true trivially.
1.8 Proof Methods and Strategy
• Proof by Cases and Exhaustion Proofs

• Existence Proofs

o Constructive

o nonconstructive

• Uniqueness Proofs
Exhaustive Proof and Proof by Cases
• Sometimes we cannot prove a theorem using a single argument that
holds for all possible cases
• Proof by Cases is a method that can be used to prove a theorem, by
considering different cases separately.
This means that we can solve this:
𝑝1 ∨ 𝑝2 ∨ … ∨ 𝑝𝑛 → 𝑞
By proving each 𝑝𝑛 → 𝑞 as such.
𝑝1 ∨ 𝑝2 ∨ … ∨ 𝑝𝑛 → 𝑞 ↔ 𝑝1 → 𝑞 ∧ 𝑝2 → 𝑞 ∧ ⋯ ∧ 𝑝𝑛 → 𝑞
Note that: A proof by cases must cover all possible cases that arise in a theorem.
• In Exhaustive Proofs we proceed by exhausting all possibilities as
some theorems can be proved by examining a relatively small number of
examples.
Exhaustive Proof and Proof by Cases
• Exhaustive Proof
Example.
3
Prove that 𝑛 + 1 ≥ 3𝑛 if n is a positive integer with n ≤ 4.
Exhaustive Proof and Proof by Cases
• Proof by Cases
Example.
Prove that if n is an integer, then n2 ≥ 𝑛
Exhaustive Proof and Proof by Cases
Common Errors:
1. Draw incorrect conclusions from examples
No matter how many separate examples are considered, Theorem is not proved unless
every possible cases is covered.

2. Making unwarranted assumptions that lead to incorrect proofs by cases


where not all cases are considered.
This happen when we miss to cover a certain cases which could lead to wrong
conclusions.
Existence Proofs
• A proof of a proposition of the form ∃xP (x)

• Constructive Existence Proof


Is an existence proof of ∃xP (x) that can be given by finding an element
a, called a witness,such that P (a) is true.
• Nonconstructive Existence Proof
Here we do not find an element a such that P (a) is true, but rather
prove that ∃xP (x) is true in some other way
Existence Proof
• Constructive
Example.
Show that there is a positive integer that can be written as
the sum of cubes of positive integers in two different ways.

1729
103 + 93 = 123 + 13
Existence Proof
• Nonconstructive
Example.
Show that there exist irrational numbers x and y such
that 𝑥 𝑦 is rational.

Note: use 2
Uniqueness Proofs

In Uniqueness proof, what we are trying to prove are:

Existence: We show that an element x with the desired property exists.


Uniqueness: We show that if y ≠ x, then y does not have the desired property

• Showing that there is a unique element x such that P (x) is the same as
proving the statement
∃x(P (x) ∧ ∀y(y ≠ x → ¬P (y)))
Uniqueness Proof
Example.
Show that if a and b are real numbers and a ≠ 0,
then there is a unique real number r such that
ar + b = 0.
Proof Strategies: How to Construct Proof
When confronted with a statement to Prove:
1. First replace terms by their definitions
2. Then carefully analyze what the hypotheses and the conclusion mean.
3. Attempt to prove the result using one of the available methods of proof.

Generally, if the statement is a conditional statement:


• First try a direct proof; if this fails,
• Try an indirect proof. If neither of these approaches works,
• Try a proof by contradiction.
What we have learned today …
1 The Foundations: Logic and Proofs

1.6 Rules of Inference

1.7 Introduction to Proofs

1.8 Proof Methods and Strategy


Is there Any Question???

LOCALLY ROOTED, GLOBALLY RESPECTED ugm.ac.id

You might also like