SlideShare a Scribd company logo
Intro Rules of Inference Proof Methods
Inference Rules and Proof Methods
Lucia Moura
Winter 2010
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Introduction
Rules of Inference and Formal Proofs
Proofs in mathematics are valid arguments that establish the truth of
mathematical statements.
An argument is a sequence of statements that end with a conclusion.
The argument is valid if the conclusion (final statement) follows from
the truth of the preceding statements (premises).
Rules of inference are templates for building valid arguments.
We will study rules of inferences for compound propositions, for quantified
statements, and then see how to combine them.
These will be the main ingredients needed in formal proofs.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Introduction
Proof methods and Informal Proofs
After studying how to write formal proofsusing rules of inference for
predicate logic and quantified statements, wewill move to informal
proofs.
Proving useful theorems using formal proofswould result in long and
tedious proofs, where every single logical step must be provided.
Proofs used for human consumption (rather than for automated derivations
by the computer) are usually informal proofs, where steps are combined or
skipped, axioms or rules of inference are not explicitly provided.
The second part of these slides will cover methods for writing informal
proofs.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Valid Arguments using Propositional Logic
Consider the following argument (sequence of propositions):
Ifthe prof offers chocolate for an answer,you answer the prof’s
question.
The prof offers chocolate for an answer.
Therefore,you answer the prof’s question.
Let p be “the prof offers chocolate for an answer”
and q be “you answer the prof’s question”.
p→ q
The form of the above argument is: p
∴ q
The argument is valid since ((p → q) ∧p) → q is a tautology.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Arguments, argument forms and their validity
Definition
An argument in propositional logic is sequence of propositions. All but the
final proposition are called premisesand the final proposition is called the
conclusion. An argument is valid if the truth of all its premises implies that
the conclusion is true.
An argument form in propositional logic is a sequence of compound
propositions involving propositional variables. An argument form is valid if
no matter which propositions are substituted for the propositional variables
in its premises, if the premises are all true, then the conclusion is true.
In other words, an argument form with premises p1, p2, . . . , pn and
conclusion q is valid if and only if
(p1 ∧p2 ∧· · · ∧pn) → q
is a tautology.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Rules of Inference for Propositional Logic I
inference rule tautology name
∴
p
p → q
q
(p ∧(p → q)) →q Modus ponens
(mode that affirms)
∴
¬q
p → q
¬p
(¬q∧(p → q)) → ¬p Modus tollens
(mode that denies)
∴
p → q
q→ r
p → r
((p → q) ∧(q → r)) → (p → r)
hypothetical syllogism
∴
p ∨q
¬p
q
((p ∨q) ∧(¬p)) →q
disjunctive syllogism
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Rules of Inference for Propositional Logic II
∴
p
p ∨q
p → (p ∨q) addition
∴
p ∧q
p
(p ∧q) → p simplification
∴
p
q
p ∧q
((p) ∧(q)) →(p ∧q)
conjunction
∴
p ∨q
¬p∨r
q∨r
((p ∨q) ∧(¬p∨r)) → (q ∨r)
resolution
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Which rule of inference is used in each argument below?
Alice is a Math major. Therefore, Alice is either a Math major or a
CSI major.
Jerry is a Math major and a CSI major. Therefore, Jerry is a Math
major.
If it is rainy, then the pool will be closed. It is rainy. Therefore, the
pool is closed.
If it snows today, the university will close. The university is not closed
today. Therefore, it did not snow today.
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.
l go swimming or eat an ice cream. Idid not go swimming.
Therefore, Ieat an ice cream.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
Does the conclusion must be true?
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
Does the conclusion must be true?
What is wrong?
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
Does the conclusion must be true?
What is wrong?
The argument is valid: modus ponens inference rule.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
Does the conclusion must be true?
What is wrong?
The argument is valid: modus ponens inference rule.
We cannot conclude that the conclusion is true, since one of its
2
premises,
√
2 > 3, is false.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Determine whether the argument is valid and whether the
conclusion must be true
2 2 2
If
√
2 > 3 then (
√
2)2 > ( 3 )2. We know that
√
2 > 3 . Therefore,
2 4
(
√
2)2 = 2 > (3 )2 = 9 .
Isthe argument valid?
Does the conclusion must be true?
What is wrong?
The argument is valid: modus ponens inference rule.
We cannot conclude that the conclusion is true, since one of its
2
premises,
√
2 > 3, is false.
Indeed, in this case the conclusion is false, since 2 > 9
4
ƒ = 2.25.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Formal Proofs: using rules of inference to build arguments
Definition
A formal proof of a conclusion qgiven hypotheses p1, p2, . . . , pn is a
sequence of steps, each of which applies some inference rule to hypotheses
or previously proven statements (antecedents) to yield a new true statement
(the consequent).
A formal proof demonstrates that if the premises are true, then the
conclusion is true.
Note that the word formal here is not a synomym of rigorous.
A formal proof is based simply on symbol manipulation (no need of
thinking, just apply rules).
A formal proof is rigorous but so can be aproof that does not rely on
symbols!
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Formal proof example
Show that the hypotheses:
It is not sunny this afternoon and it is colder than yesterday.
We will go swimming only if it is sunny.
If wedo not go swimming, then wewill take a canoe trip.
If wetake a canoe trip, then wewill be home by sunset.
lead to the conclusion:
We will be home by the sunset.
Main steps:
1
2
Translate the statements into proposional logic.
Write a formal proof, a sequence of steps that state hypotheses or
apply inference rules to previous steps.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Show that the hypotheses:
It is not sunny this afternoon and it is colder than yesterday. ¬s∧ c
We will go swimming only if it is sunny. w → s
If wedo not go swimming, then we will take a canoe trip. ¬w → t
If wetake a canoe trip, then wewill be home by sunset. t → h
lead to the conclusion:
We will be home by the sunset. h
Step Reason
1. ¬s∧c
2. ¬s
3. w → s
4. ¬w
5. ¬w→ t
6. t
7. t →h
8. h
hypothesis
simplificatio
n hypothesis
modus tollens of 2 and 3
hypothesis
modus ponens of 4 and 5
hypothesis
modus ponens of 6 and 7
Where:
s: “it is sunny this afternoon”
c: “it is colder than yesterday”
w: “we will go swimming”
t: “we will take a canoe trip.
h: “we will be home by the sunset.”
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Resolution and Automated Theorem Proving
We can build programs that automate the task of reasoning and proving
theorems.
Recall that the rule of inference called resolution is based on the
tautology:
((p ∨q) ∧(¬p∨r)) → (q∨r)
If weexpress the hypotheses and the conclusion as clauses(possible by
CNF, a conjunction of clauses), wecan use resolution as the only
inference rule to build proofs!
This is used in programming languages like Prolog.
It can be used in automated theoremproving systems.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Proofs that use exclusively resolution as inference rule
Step 1: Convert hypotheses and conclusion into clauses:
Original hypothesis equivalent CNF Hypothesis as list of clauses
(p ∧q) ∨r
r →s
(p ∨r) ∧(q ∨r)
(¬r ∨s)
(p ∨r), (q ∨r)
(¬r ∨s)
Conclusion equivalent CNF Conclusion as list of clauses
p∨s (p ∨s) (p ∨s)
Step 2: Write a proof based on resolution:
Step Reason
1. p ∨r
2. ¬r ∨s
3. p∨s
hypothesis
hypothesis
resolution of 1 and 2
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Show that the hypotheses:
¬s∧c translates to clauses: ¬s, c
w → s translates to clause: (¬w ∨s)
¬w→ t translates to clause: (w ∨t)
t → h translates to clause: (¬t ∨ h)
lead to the conclusion:
h (it is already a trivial clause)
Note that the fact that p and ¬ p ∨ q implies q (called disjunctive syllogism) is a special case of resolution,
since p ∨ F and ¬ p ∨ q give us F ∨ q which is equivalent to q.
Resolution-based proof:
Step Reason
1. ¬s
2. ¬w∨s
3. ¬w
4. w ∨t
5. t
6. ¬t ∨h
7. h
hypothesis
hypothesis
resolution of 1 and 2
hypothesis
resolution of 3 and 4
hypothesis
resolution of 5 and 6
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Propositional Logic
Fallacies
Fallacy = misconception resulting from incorrect argument.
Fallacy of affirming the conclusion
Based on
((p → q) ∧q) →p
which is NOT A TAUTOLOGY.
Ex.: If prof gives chocolate, then you answer the question. You
answer the question. We conclude the prof gave chocolate.
Fallacy of denying the hypothesis
Based on
((p → q) ∧¬p) →¬q
which is NOT A TAUTOLOGY.
Ex.: If prof gives chocolate, then you answer the question. Prof
doesn’t give chocolate. Therefore, you don’t answer the question.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Quantified Statements
Rules of Inference for Quantified Statements
Rule of Inference Name
∀xP(x)
∴ P(c)
Universal instantiation
P (c) for an arbitrary c
∴ ∀xP(x)
Universal generalization
∃xP(x)
∴ P (c) for some element c
Existential instantiation
P (c) for some element c
∴ ∃xP(x)
Existencial generalization
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Quantified Statements
Show that the premises:
A student in Section A of the course has not read the book.
Everyone in Section A of the course passed the first exam.
imply the conclusion
Someone who passed the first exam has not read the book.
A(x): “x is in Section A of the course”
B(x): “x read the book”
P (x): “x passed the first exam.”
Hypotheses: ∃x(A(x) ∧¬B(x)) and ∀x(A(x) → P (x)).
Conclusion: ∃x(P(x) ∧¬B(x)).
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Quantified Statements
Hypotheses: ∃x(A(x) ∧¬B(x)) and ∀x(A(x) → P (x)).
Conclusion: ∃x(P(x) ∧¬B(x)).
Step Reason
1. ∃x(A(x) ∧¬B(x)) Hypothesis
2. A(a) ∧¬B(a) Existencial instantiation from (1)
3. A(a) Simplification from (2)
4. ∀x(A(x) → P(x)) Hypothesis
5. A(a) → P(a) Universal instantiation from (4)
6. P (a) Modus ponens from (3) and (5)
7. ¬B(a) Simplification from (2)
8. P (a) ∧¬B(a) Conjunction from (6) and (7)
9. ∃x(P(x) ∧¬B(x)) Existential generalization from (8)
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Rules of Inference for Quantified Statements
Combining Rules of Inference for Propositions and
Quantified Statements
These inference rules are frequently used and combine propositions and
quantified statements:
Universal Modus Ponens
∀x(P(x) →Q(x))
P (a), where a is a particular element in the domain
∴ Q(a)
Universal Modus Tollens
∀x(P(x) →Q(x))
¬Q(a), where a is a particular element in the domain
∴ ¬P(a)
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Proof Methods
A proof is a valid argument that establishes the truth of a mathematical
statement, using the hypotheses of the theorem, if any, axioms assumed to
be true, and previously proven theorems.
Using these ingredients and rules of inference, the proof establishes the
truth of the statement being proved.
We move from formal proofs, as seen in the previous section, to informal
proofs, where more than one inference rule may be used at each step,
where steps may be skipped, and where axioms and rules of inference used
are not explicitly stated.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Some terminology
Theorem: a statement that can be shown to be true (sometimes
referred to as facts or results). Less important theorems are often
called propositions.
A lemma is a less important theorem, used as an auxiliary result to
prove a more important theorem.
A corollaryis a theorem proven as an easy consequence of a theorem.
A conjecture is a statement that is being proposed as a true
statement. If later proven, it becomes a theorem, but it may be false.
Axiom (or postulates) are statements that weassume to be true
(algebraic axioms specify rules for arithmetic like commutative laws).
A proof is a valid argument that establishes the truth of a theorem.
The statements used in a proof include axioms, hypotheses (or
premises), and previously proven theorems. Rules of inference, together
with definition of terms, are used to draw conclusions from other
assertions, tying together the steps of a proof.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Understanding how theorems are stated
Many theorems assert that a property holds for all elements in a domain.
However, the universal quantifier is often not explicitly stated.
The statement:
“If x > y, where x and y are positive real numbers, then x2 > y2.”
really means
“For all positive real numbers x and y, if x > y then x2 > y2.”
That is, in formal logic under the domain of positive real numbers this is
the same as ∀x∀y((x > y) → (x2 > y2)).
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Methods of proving theorems
To prove a theorem of the form ∀x(P(x) → Q(x)), weuse the steps:
Take an arbitrary element c of the domain and show that
(P (c) → Q(c))is true.
Apply universal generalization to conclude ∀x(P(x) → Q(x)).
(Normally we not even bother with this final step.)
3 methods of showing statements of the type p → q are true:
1
2
Direct proofs: Assume p is true; the last step establishes q is true.
Proof by Contraposition: Uses a direct proof of the contrapositive
3
of p → q, which is ¬q → ¬p. That is, assume ¬q is true; the last step
established ¬p is true.
Proof by Contradiction: To prove that P is true, we assume ¬P is
true and reach a contradiction, that is that (r ∧ ¬r) is true for some
proposition r. In particular, to prove (p → q), we assume (p → q) is
false, and get as a consequence a contradiction. Assuming that
(p → q) is false = (¬p∨q) is false = (p ∧¬q) is true.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Direct Proofs
A formal direct proof of a conditional statement p → qworks as follows:
assume pis true, build steps using inference rules, with the final step
showing that q is true.
In a (informal) direct proof, weassume that p is true, and use axioms,
definitions and previous theorems, together with rules of inference to show
that q must be true.
Definition
The integer n is even if there exists an integer k such that n = 2k, and n
is odd if there exists an integer k such that n = 2k + 1.
Give a direct proof of the following theorem.
Theorem
If n is an odd integer, then n2 is odd.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Theorem
If n is an odd integer, then n2 is odd.
Observations: We want to show that ∀n(P(n) → Q(n)), where P (n) is
“n is an odd integer” and Q(n) is “n2 is odd”.
We show this by proving that for an arbitrary n, P (n) implies Q(n),
without invoking the universal generalization.
Proof:
Let n be an odd integer.
By definition of odd, we know that there exists an integer k such that
n = 2k + 1.
Squaring both sides of the equation, we get
n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.
Since n2 = 2kt + 1, where kt = 2k2 + 2k, by the definition of odd we
conclude n2 is odd. Q
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Definition
An integer a is a perfect square if there is an integer b such that a = b2.
Exercise:
Prove the following theorem using a direct proof.
Theorem
If m and n are both perfect squares, then mn is also a perfect square.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Proof by Contraposition
This method of proof makes use of the equivalence (p → q) ≡ (¬q→ ¬p).
In a proof by contraposition that p→ q, weassume ¬qis true, and using
axioms, definitions and previously proven theorems, together with inference
rules, weshow that ¬pmust be true. (It is a direct proof of the
contrapositive statement!)
Theorem
If n is an integer and 3n + 2 is odd, then n is odd.
Proof: We prove the statement by contraposition.
Assume n is even(assuming ¬q). Then, by definition, n = 2k for some
integer k. Thus, 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1). So, we have
that 3n + 2 = 2kt where kt = 3k + 1, which means 3n + 2 is an even
number. This is the negation of the hypothesis of the theorem( ¬p),
which concludes our proof by contraposition. Q
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Exercises: proof by contraposition
Prove that if n = ab, where a and b are positive integers, then
a ≤
√
n or b ≤
√
n.
Show that the proposition P (0) is true where the domain consists of
the integer numbers and P (n) is “If n ≥ 1 then n2 > n.”
Note: vacuous proof: when p is false p → qis true, regardless of the
value of q.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
When to use each type of proof?
Usually try a direct proof. If it doesn’t work, try a proof by contraposition.
Definition
A real number r is rational if there exists integers p and q with q ƒ=0 such
that r = p/q. A real number that is not rational is called irrational
Prove that the sum of two rational numbers is rational. (For all
r, s ∈R , if r and s are rational numbers, then r + s is rational.)
Let r and s be rational numbers. Then, there exist integers p, q, t, u with
q ƒ=0 and u ƒ=0 such that r = p/q and s = t/u. So,
q u qu
r + s =
p
+
t
=
pu + qt
.
Since qƒ=0 and u ƒ=0, wehave qu ƒ=0. Therefore, weexpressed r + s as the
ratio of two integers pu + qt and qu, where qu ƒ=0. This means that r + s
is rational. (The direct proof succeeded!)
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Prove that for any integer number n, if n2 is odd, then n is odd.
Trying a direct proof...
Let n be an integer number. Assume that n2 is odd. We get next that
there exists an integer k such that n2 = 2k + 1. Solving for n produces the√
equation n = ± 2k + 1, which is not very useful to show that n is odd.
Try a prove by contraposition...
Let n be an integer number. Assume n is not odd. This means that n is
even, and so there exists an integer k such that n = 2k. Thus,
n2 = (2k)2 = 4k2 = 2(2k2). So, taking kt = 2k2, wesee that n2 = 2kt
and so n2 is even. This concludes our proof by contraposition.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Proof by Contradiction
In a proof by contradiction, weprove that a proposition p is true, by
showing that there exists a contradiction q such that ¬p → q.
We can prove that p is true by showing for instance that ¬p → (r ∧ ¬r),
for some proposition r.
Prove that
√
2 is irrational.
A direct proof is difficult, as it means to show that there exists no two
integer a and bwith bƒ=0 such that
√
2 = a/b. Nonexistence proofs are
usually hard.
Let’s try a proof by contradiction...
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Theorem
√
2 is irrational.
Proof: We prove by means of contradiction. Assume
√
2 is a rational
number. So, there exists at and btintegers with btƒ=0 with
√
2 = at/bt. We
select such integers a and bwith the additional property that a and b have
no common factors, i.e. the fraction a/b is in lowest terms(this is always
possible to obtain, for wecan keep dividing by common factors). So,
√
2 =
a/b so 2 = a2/b2. This implies 2b2= a2 (1). By the definition of even, we
know that a2 is even. Next weuse a theorem that states that if a2 is even
then a is even(prove it as an exercise). Now, since a is even, we know that
there exists c such that a = 2c. Substituting in the formula
(1) above, weget that 2b2= (2c)2 = 4c2. Dividing both sides by 2 weget
b2= 2c2. By the definition of even, wesee that bis even. Therefore, we got
that a is even and bis even, and so 2 is a common factor of a and b. But we
also had that a and bhad no common factors. We just reached a
contradiction! Q
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Other types of proof statements
Proof of equivalences:
To prove a statement p↔ q, weshow that both p→ qand q→ pare
true.
Example: Prove that if n is a positive integer, then n is odd if and
only if n2 is odd.
Showing that a statement of the form ∀xP(x) is false:
In this case, we need to find a counterexample.
Example: Show that the statement “Every positive integer is the sum
of the squares of two integers.” is false.
We argue that 3 is a counterexample. The only perfect squares
smaller than 3 are 0 and 1, and clearly, 3 cannot be written as a sum
of two terms each being 0 or 1.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Methods
Mistakes in Proofs
What is the problem with he following proof that 1 = 2?
Use the following steps, where a and b are two equal positive integers.
Given
Multiply both sides of (1) by a.
Substract b2from both sides of (2)
Factoring both sides of (3)
Divide both sides of (4) by a − b
Replace a by bin (5), since a = b
Divide both sides of 6. by b.
1. a = b
2. a2 = ab
3. a2 − b2 = ab− b2
4. (a − b)(a + b) = b(a − b)
5. a + b= b
6. 2b= b
7. 2 = 1
Therefore 2 = 1.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Proof by Cases
Sometimes it is difficult to use a single argument that holds for all cases.
Proof by cases uses the following equivalence:
[(p1 ∨p2 ∨···∨pn) → q] ≡ [(p1 → q) ∧(p2 → q) ∧···∧(pn → q)]
Example: Prove that if n is integer then n2 ≥ n.
We split the proof into three cases.
Case (i) n = 0.
In this case, n2 = 02 = 0 = n.
Case (ii) n ≥ 1
In this case, when wemultiply both sides of n ≥ 1 by n we obtain
n · n ≥ n · 1. This implies n2 ≥ n.
Case (iii) n ≤ −1
In this case, n ≤ −1, but n2 ≥ 0. Therefore, n2 ≥ 0 ≥ −1 ≥ n, and
so n2 ≥ n.
Q
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Exhaustive proof
This is a special form of a proof by cases, when there is a finite and small
number of examples for which we need to prove a fact.
Prove that (n + 1)2 ≥ 3n if n is a positive integer with n ≤ 2.
We use a proof by exhaustion, by examining the cases n = 1, 2.
For n = 1, (n + 1)2 = 22 = 4 ≥ 3 =3n.
For n = 2, (n + 1)2 = 32 = 9 ≥ 32 = 3n.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Existence Proofs
Existence proofs prove statements of the form ∃xP(x).
Constructive existence proof: find a suchthat P (a) istrue.
Example: Show that there is a positive integer that can be written as
a sum of cubes of positive integers in two different ways.
Proof: 1729 = 103 + 93 and 1729 = 123 + 13.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Existence Proofs
Existence proofs prove statements of the form ∃xP(x).
Constructive existence proof: find a suchthat P (a) istrue.
Example: Show that there is a positive integer that can be written as
a sum of cubes of positive integers in two different ways.
Proof: 1729 = 103 + 93 and 1729 = 123 + 13.
Nonconstructive existence proof: showthat ∃xP(x) without
explicitly giving a for which P (a) istrue.
Example: Show that there exist irrational numbers x and y such that
xy is rational.
From a previous theorem we know that
√
2 is irrational. Consider the√
number
√
2 2
. There are two possible cases:
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Existence Proofs
Existence proofs prove statements of the form ∃xP(x).
Constructive existence proof: find a suchthat P (a) istrue.
Example: Show that there is a positive integer that can be written as
a sum of cubes of positive integers in two different ways.
Proof: 1729 = 103 + 93 and 1729 = 123 + 13.
Nonconstructive existence proof: showthat ∃xP(x) without
explicitly giving a for which P (a) istrue.
Example: Show that there exist irrational numbers x and y such that
xy is rational.
From a previous theorem we know that
√
2 is irrational. Consider the√
number
√
2 2
. There are two possible cases:
)
√
√ 2
2 is rational: In this case, take x =
√
2 and y =
√
2.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
Existence Proofs
Existence proofs prove statements of the form ∃xP(x).
Constructive existence proof: find a suchthat P (a) istrue.
Example: Show that there is a positive integer that can be written as
a sum of cubes of positive integers in two different ways.
Proof: 1729 = 103 + 93 and 1729 = 123 + 13.
Nonconstructive existence proof: showthat ∃xP(x) without
explicitly giving a for which P (a) istrue.
Example: Show that there exist irrational numbers x and y such that
xy is rational.
From a previous theorem we know that
√
2 is irrational. Consider the√
)
number
√
2 2
. There are two possible cases:√
√ 2
2 is rational: In this case, take x =
√
2 and y =
√
2.
)
√
√ 2
√
2
2 is irrational: In this case, take x =
√
2 and y =
√
2. Then√
2 √√ √
y 2 2
x = ( 2 ) = ( 2) = 2.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
Intro Rules of Inference Proof Methods
Proof Strategies
The art of finding a proof method that works for a theorem
We need practice in order to recognize which type of proof to apply to a
particular theorem/fact that weneed to prove.
In the next topic “number theory”, several theorems will be proven using
different proof methods and strategies.
CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura

More Related Content

Viewers also liked

Logical Inference in RTE
Logical Inference in RTELogical Inference in RTE
Logical Inference in RTEKilian Evang
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
Sajan Sahu
 
Анализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ методаАнализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ метода
Dima Kostyaev
 
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
Роман Тилець
 
Нечеткие знания в экспертных системах
Нечеткие знания в экспертных системахНечеткие знания в экспертных системах
Нечеткие знания в экспертных системах
Спецсеминар "Искусственный Интеллект" кафедры АЯ ВМК МГУ
 
Экспертные системы
Экспертные системыЭкспертные системы
Экспертные системы
Отшельник
 
The Science of UX Design
The Science of UX DesignThe Science of UX Design
The Science of UX Design
Zack Naylor
 
Expert system (unit 1 & 2)
Expert system (unit 1 & 2)Expert system (unit 1 & 2)
Expert system (unit 1 & 2)
Lakshya Gupta
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
David Wood
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graph
Rai University
 
Backtracking
BacktrackingBacktracking
Backtracking
cristian torres
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)jemille6
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules Management
Tobias Trapp
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
Abdur Rehman
 
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemNUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemYuichiro Yasui
 
Expert System
Expert SystemExpert System
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid arguments
Abdur Rehman
 

Viewers also liked (20)

Logical Inference in RTE
Logical Inference in RTELogical Inference in RTE
Logical Inference in RTE
 
Prpositional2
Prpositional2Prpositional2
Prpositional2
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Анализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ методаАнализ тональности с помощью ДСМ метода
Анализ тональности с помощью ДСМ метода
 
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...Ідентифікація  багатофакторних залежностей на основі нечіткої бази знань з рі...
Ідентифікація багатофакторних залежностей на основі нечіткої бази знань з рі...
 
Нечеткие знания в экспертных системах
Нечеткие знания в экспертных системахНечеткие знания в экспертных системах
Нечеткие знания в экспертных системах
 
Экспертные системы
Экспертные системыЭкспертные системы
Экспертные системы
 
The Science of UX Design
The Science of UX DesignThe Science of UX Design
The Science of UX Design
 
Expert system (unit 1 & 2)
Expert system (unit 1 & 2)Expert system (unit 1 & 2)
Expert system (unit 1 & 2)
 
Lecture5
Lecture5Lecture5
Lecture5
 
CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1CPSC 125 Ch 2 Sec 1
CPSC 125 Ch 2 Sec 1
 
Bca ii dfs u-3 tree and graph
Bca  ii dfs u-3 tree and graphBca  ii dfs u-3 tree and graph
Bca ii dfs u-3 tree and graph
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)Mayo aug1, jsm slides (3)
Mayo aug1, jsm slides (3)
 
Logical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules ManagementLogical Abduction and an Application on Business Rules Management
Logical Abduction and an Application on Business Rules Management
 
Proofs by contraposition
Proofs by contrapositionProofs by contraposition
Proofs by contraposition
 
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node SystemNUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
NUMA-optimized Parallel Breadth-first Search on Multicore Single-node System
 
Ai 2
Ai 2Ai 2
Ai 2
 
Expert System
Expert SystemExpert System
Expert System
 
Valid & invalid arguments
Valid & invalid argumentsValid & invalid arguments
Valid & invalid arguments
 

Similar to Inference rulesproofmethods

Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsWongyos Keardsri
 
Chapter 01 - p3.pdf
Chapter 01 - p3.pdfChapter 01 - p3.pdf
Chapter 01 - p3.pdf
smarwaneid
 
Chapter1p3.pptx
Chapter1p3.pptxChapter1p3.pptx
Chapter1p3.pptx
CireneSimonSimbahan
 
rulesOfInference.ppt
rulesOfInference.pptrulesOfInference.ppt
rulesOfInference.ppt
ssuserf1f9e8
 
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.pptIntroduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
yaniarianneyani
 
Mathematical Reasoning DM
Mathematical Reasoning DMMathematical Reasoning DM
Mathematical Reasoning DM
Rokonuzzaman Rony
 
Data structure chapter-1-proofs
Data structure chapter-1-proofsData structure chapter-1-proofs
Data structure chapter-1-proofs
collage of computer since
 
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.pptG8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
2z9s6rsqpn
 
SESSION-12 PPT.pptx
SESSION-12 PPT.pptxSESSION-12 PPT.pptx
SESSION-12 PPT.pptx
NaniSarath
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
Mustafa Jarrar
 
Notes discrete math
Notes discrete mathNotes discrete math
Notes discrete math
liyana31
 
Fuzzy Systems by using fuzzy set (Soft Computing)
Fuzzy Systems by using fuzzy set (Soft Computing)Fuzzy Systems by using fuzzy set (Soft Computing)
Fuzzy Systems by using fuzzy set (Soft Computing)
Amit Kumar Rathi
 
Discrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docxDiscrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docx
SwapnajitSahoo1
 
Logic
LogicLogic
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematics
saiful26baiust
 
Knowledge base artificial intelligence.pdf
Knowledge base  artificial intelligence.pdfKnowledge base  artificial intelligence.pdf
Knowledge base artificial intelligence.pdf
jannatulferdous20101
 
Lecture 01.ppt
Lecture 01.pptLecture 01.ppt
Lecture 01.ppt
VinhQuang898733
 
L2.pdf
L2.pdfL2.pdf

Similar to Inference rulesproofmethods (20)

Discrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and ProofsDiscrete-Chapter 05 Inference and Proofs
Discrete-Chapter 05 Inference and Proofs
 
Chapter 01 - p3.pdf
Chapter 01 - p3.pdfChapter 01 - p3.pdf
Chapter 01 - p3.pdf
 
Chapter1p3.pptx
Chapter1p3.pptxChapter1p3.pptx
Chapter1p3.pptx
 
rulesOfInference.ppt
rulesOfInference.pptrulesOfInference.ppt
rulesOfInference.ppt
 
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.pptIntroduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
Introduction to Logic Spring 2007 Introduction to Discrete Structures.ppt
 
Mathematical Reasoning DM
Mathematical Reasoning DMMathematical Reasoning DM
Mathematical Reasoning DM
 
Data structure chapter-1-proofs
Data structure chapter-1-proofsData structure chapter-1-proofs
Data structure chapter-1-proofs
 
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.pptG8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
G8 Math Q2- Week 9- Inductive and Deductive Reasoning.ppt
 
SESSION-12 PPT.pptx
SESSION-12 PPT.pptxSESSION-12 PPT.pptx
SESSION-12 PPT.pptx
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
 
Notes discrete math
Notes discrete mathNotes discrete math
Notes discrete math
 
Fuzzy Systems by using fuzzy set (Soft Computing)
Fuzzy Systems by using fuzzy set (Soft Computing)Fuzzy Systems by using fuzzy set (Soft Computing)
Fuzzy Systems by using fuzzy set (Soft Computing)
 
Discrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docxDiscrete_Mathmatics Projects report.docx
Discrete_Mathmatics Projects report.docx
 
Logic
LogicLogic
Logic
 
AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
 
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematics
 
Knowledge base artificial intelligence.pdf
Knowledge base  artificial intelligence.pdfKnowledge base  artificial intelligence.pdf
Knowledge base artificial intelligence.pdf
 
Lecture 01.ppt
Lecture 01.pptLecture 01.ppt
Lecture 01.ppt
 
Ch01-1.pdf
Ch01-1.pdfCh01-1.pdf
Ch01-1.pdf
 
L2.pdf
L2.pdfL2.pdf
L2.pdf
 

More from Rajendran

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
Rajendran
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
Rajendran
 
Divide and conquer surfing lower bounds
Divide and conquer  surfing lower boundsDivide and conquer  surfing lower bounds
Divide and conquer surfing lower bounds
Rajendran
 
Red black tree
Red black treeRed black tree
Red black tree
Rajendran
 
Hash table
Hash tableHash table
Hash table
Rajendran
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
Rajendran
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
Rajendran
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
Rajendran
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
Rajendran
 
Master method
Master method Master method
Master method
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Hash tables
Hash tablesHash tables
Hash tables
Rajendran
 
Lower bound
Lower boundLower bound
Lower bound
Rajendran
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
Rajendran
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
Rajendran
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
Rajendran
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
Rajendran
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
Rajendran
 
Np completeness
Np completenessNp completeness
Np completeness
Rajendran
 
computer languages
computer languagescomputer languages
computer languages
Rajendran
 

More from Rajendran (20)

Element distinctness lower bounds
Element distinctness lower boundsElement distinctness lower bounds
Element distinctness lower bounds
 
Scheduling with Startup and Holding Costs
Scheduling with Startup and Holding CostsScheduling with Startup and Holding Costs
Scheduling with Startup and Holding Costs
 
Divide and conquer surfing lower bounds
Divide and conquer  surfing lower boundsDivide and conquer  surfing lower bounds
Divide and conquer surfing lower bounds
 
Red black tree
Red black treeRed black tree
Red black tree
 
Hash table
Hash tableHash table
Hash table
 
Medians and order statistics
Medians and order statisticsMedians and order statistics
Medians and order statistics
 
Proof master theorem
Proof master theoremProof master theorem
Proof master theorem
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Recurrence theorem
Recurrence theoremRecurrence theorem
Recurrence theorem
 
Master method
Master method Master method
Master method
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Hash tables
Hash tablesHash tables
Hash tables
 
Lower bound
Lower boundLower bound
Lower bound
 
Master method theorem
Master method theoremMaster method theorem
Master method theorem
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Longest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm AnalysisLongest common subsequences in Algorithm Analysis
Longest common subsequences in Algorithm Analysis
 
Dynamic programming in Algorithm Analysis
Dynamic programming in Algorithm AnalysisDynamic programming in Algorithm Analysis
Dynamic programming in Algorithm Analysis
 
Average case Analysis of Quicksort
Average case Analysis of QuicksortAverage case Analysis of Quicksort
Average case Analysis of Quicksort
 
Np completeness
Np completenessNp completeness
Np completeness
 
computer languages
computer languagescomputer languages
computer languages
 

Recently uploaded

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 

Recently uploaded (20)

The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 

Inference rulesproofmethods

  • 1. Intro Rules of Inference Proof Methods Inference Rules and Proof Methods Lucia Moura Winter 2010 CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 2. Intro Rules of Inference Proof Methods Introduction Rules of Inference and Formal Proofs Proofs in mathematics are valid arguments that establish the truth of mathematical statements. An argument is a sequence of statements that end with a conclusion. The argument is valid if the conclusion (final statement) follows from the truth of the preceding statements (premises). Rules of inference are templates for building valid arguments. We will study rules of inferences for compound propositions, for quantified statements, and then see how to combine them. These will be the main ingredients needed in formal proofs. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 3. Intro Rules of Inference Proof Methods Introduction Proof methods and Informal Proofs After studying how to write formal proofsusing rules of inference for predicate logic and quantified statements, wewill move to informal proofs. Proving useful theorems using formal proofswould result in long and tedious proofs, where every single logical step must be provided. Proofs used for human consumption (rather than for automated derivations by the computer) are usually informal proofs, where steps are combined or skipped, axioms or rules of inference are not explicitly provided. The second part of these slides will cover methods for writing informal proofs. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 4. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Valid Arguments using Propositional Logic Consider the following argument (sequence of propositions): Ifthe prof offers chocolate for an answer,you answer the prof’s question. The prof offers chocolate for an answer. Therefore,you answer the prof’s question. Let p be “the prof offers chocolate for an answer” and q be “you answer the prof’s question”. p→ q The form of the above argument is: p ∴ q The argument is valid since ((p → q) ∧p) → q is a tautology. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 5. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Arguments, argument forms and their validity Definition An argument in propositional logic is sequence of propositions. All but the final proposition are called premisesand the final proposition is called the conclusion. An argument is valid if the truth of all its premises implies that the conclusion is true. An argument form in propositional logic is a sequence of compound propositions involving propositional variables. An argument form is valid if no matter which propositions are substituted for the propositional variables in its premises, if the premises are all true, then the conclusion is true. In other words, an argument form with premises p1, p2, . . . , pn and conclusion q is valid if and only if (p1 ∧p2 ∧· · · ∧pn) → q is a tautology. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 6. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Rules of Inference for Propositional Logic I inference rule tautology name ∴ p p → q q (p ∧(p → q)) →q Modus ponens (mode that affirms) ∴ ¬q p → q ¬p (¬q∧(p → q)) → ¬p Modus tollens (mode that denies) ∴ p → q q→ r p → r ((p → q) ∧(q → r)) → (p → r) hypothetical syllogism ∴ p ∨q ¬p q ((p ∨q) ∧(¬p)) →q disjunctive syllogism CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 7. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Rules of Inference for Propositional Logic II ∴ p p ∨q p → (p ∨q) addition ∴ p ∧q p (p ∧q) → p simplification ∴ p q p ∧q ((p) ∧(q)) →(p ∧q) conjunction ∴ p ∨q ¬p∨r q∨r ((p ∨q) ∧(¬p∨r)) → (q ∨r) resolution CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 8. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Which rule of inference is used in each argument below? Alice is a Math major. Therefore, Alice is either a Math major or a CSI major. Jerry is a Math major and a CSI major. Therefore, Jerry is a Math major. If it is rainy, then the pool will be closed. It is rainy. Therefore, the pool is closed. If it snows today, the university will close. The university is not closed today. Therefore, it did not snow today. 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. l go swimming or eat an ice cream. Idid not go swimming. Therefore, Ieat an ice cream. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 9. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 10. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 11. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? Does the conclusion must be true? CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 12. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? Does the conclusion must be true? What is wrong? CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 13. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? Does the conclusion must be true? What is wrong? The argument is valid: modus ponens inference rule. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 14. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? Does the conclusion must be true? What is wrong? The argument is valid: modus ponens inference rule. We cannot conclude that the conclusion is true, since one of its 2 premises, √ 2 > 3, is false. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 15. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Determine whether the argument is valid and whether the conclusion must be true 2 2 2 If √ 2 > 3 then ( √ 2)2 > ( 3 )2. We know that √ 2 > 3 . Therefore, 2 4 ( √ 2)2 = 2 > (3 )2 = 9 . Isthe argument valid? Does the conclusion must be true? What is wrong? The argument is valid: modus ponens inference rule. We cannot conclude that the conclusion is true, since one of its 2 premises, √ 2 > 3, is false. Indeed, in this case the conclusion is false, since 2 > 9 4 ƒ = 2.25. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 16. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Formal Proofs: using rules of inference to build arguments Definition A formal proof of a conclusion qgiven hypotheses p1, p2, . . . , pn is a sequence of steps, each of which applies some inference rule to hypotheses or previously proven statements (antecedents) to yield a new true statement (the consequent). A formal proof demonstrates that if the premises are true, then the conclusion is true. Note that the word formal here is not a synomym of rigorous. A formal proof is based simply on symbol manipulation (no need of thinking, just apply rules). A formal proof is rigorous but so can be aproof that does not rely on symbols! CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 17. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Formal proof example Show that the hypotheses: It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If wedo not go swimming, then wewill take a canoe trip. If wetake a canoe trip, then wewill be home by sunset. lead to the conclusion: We will be home by the sunset. Main steps: 1 2 Translate the statements into proposional logic. Write a formal proof, a sequence of steps that state hypotheses or apply inference rules to previous steps. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 18. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Show that the hypotheses: It is not sunny this afternoon and it is colder than yesterday. ¬s∧ c We will go swimming only if it is sunny. w → s If wedo not go swimming, then we will take a canoe trip. ¬w → t If wetake a canoe trip, then wewill be home by sunset. t → h lead to the conclusion: We will be home by the sunset. h Step Reason 1. ¬s∧c 2. ¬s 3. w → s 4. ¬w 5. ¬w→ t 6. t 7. t →h 8. h hypothesis simplificatio n hypothesis modus tollens of 2 and 3 hypothesis modus ponens of 4 and 5 hypothesis modus ponens of 6 and 7 Where: s: “it is sunny this afternoon” c: “it is colder than yesterday” w: “we will go swimming” t: “we will take a canoe trip. h: “we will be home by the sunset.” CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 19. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Resolution and Automated Theorem Proving We can build programs that automate the task of reasoning and proving theorems. Recall that the rule of inference called resolution is based on the tautology: ((p ∨q) ∧(¬p∨r)) → (q∨r) If weexpress the hypotheses and the conclusion as clauses(possible by CNF, a conjunction of clauses), wecan use resolution as the only inference rule to build proofs! This is used in programming languages like Prolog. It can be used in automated theoremproving systems. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 20. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Proofs that use exclusively resolution as inference rule Step 1: Convert hypotheses and conclusion into clauses: Original hypothesis equivalent CNF Hypothesis as list of clauses (p ∧q) ∨r r →s (p ∨r) ∧(q ∨r) (¬r ∨s) (p ∨r), (q ∨r) (¬r ∨s) Conclusion equivalent CNF Conclusion as list of clauses p∨s (p ∨s) (p ∨s) Step 2: Write a proof based on resolution: Step Reason 1. p ∨r 2. ¬r ∨s 3. p∨s hypothesis hypothesis resolution of 1 and 2 CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 21. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Show that the hypotheses: ¬s∧c translates to clauses: ¬s, c w → s translates to clause: (¬w ∨s) ¬w→ t translates to clause: (w ∨t) t → h translates to clause: (¬t ∨ h) lead to the conclusion: h (it is already a trivial clause) Note that the fact that p and ¬ p ∨ q implies q (called disjunctive syllogism) is a special case of resolution, since p ∨ F and ¬ p ∨ q give us F ∨ q which is equivalent to q. Resolution-based proof: Step Reason 1. ¬s 2. ¬w∨s 3. ¬w 4. w ∨t 5. t 6. ¬t ∨h 7. h hypothesis hypothesis resolution of 1 and 2 hypothesis resolution of 3 and 4 hypothesis resolution of 5 and 6 CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 22. Intro Rules of Inference Proof Methods Rules of Inference for Propositional Logic Fallacies Fallacy = misconception resulting from incorrect argument. Fallacy of affirming the conclusion Based on ((p → q) ∧q) →p which is NOT A TAUTOLOGY. Ex.: If prof gives chocolate, then you answer the question. You answer the question. We conclude the prof gave chocolate. Fallacy of denying the hypothesis Based on ((p → q) ∧¬p) →¬q which is NOT A TAUTOLOGY. Ex.: If prof gives chocolate, then you answer the question. Prof doesn’t give chocolate. Therefore, you don’t answer the question. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 23. Intro Rules of Inference Proof Methods Rules of Inference for Quantified Statements Rules of Inference for Quantified Statements Rule of Inference Name ∀xP(x) ∴ P(c) Universal instantiation P (c) for an arbitrary c ∴ ∀xP(x) Universal generalization ∃xP(x) ∴ P (c) for some element c Existential instantiation P (c) for some element c ∴ ∃xP(x) Existencial generalization CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 24. Intro Rules of Inference Proof Methods Rules of Inference for Quantified Statements Show that the premises: A student in Section A of the course has not read the book. Everyone in Section A of the course passed the first exam. imply the conclusion Someone who passed the first exam has not read the book. A(x): “x is in Section A of the course” B(x): “x read the book” P (x): “x passed the first exam.” Hypotheses: ∃x(A(x) ∧¬B(x)) and ∀x(A(x) → P (x)). Conclusion: ∃x(P(x) ∧¬B(x)). CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 25. Intro Rules of Inference Proof Methods Rules of Inference for Quantified Statements Hypotheses: ∃x(A(x) ∧¬B(x)) and ∀x(A(x) → P (x)). Conclusion: ∃x(P(x) ∧¬B(x)). Step Reason 1. ∃x(A(x) ∧¬B(x)) Hypothesis 2. A(a) ∧¬B(a) Existencial instantiation from (1) 3. A(a) Simplification from (2) 4. ∀x(A(x) → P(x)) Hypothesis 5. A(a) → P(a) Universal instantiation from (4) 6. P (a) Modus ponens from (3) and (5) 7. ¬B(a) Simplification from (2) 8. P (a) ∧¬B(a) Conjunction from (6) and (7) 9. ∃x(P(x) ∧¬B(x)) Existential generalization from (8) CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 26. Intro Rules of Inference Proof Methods Rules of Inference for Quantified Statements Combining Rules of Inference for Propositions and Quantified Statements These inference rules are frequently used and combine propositions and quantified statements: Universal Modus Ponens ∀x(P(x) →Q(x)) P (a), where a is a particular element in the domain ∴ Q(a) Universal Modus Tollens ∀x(P(x) →Q(x)) ¬Q(a), where a is a particular element in the domain ∴ ¬P(a) CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 27. Intro Rules of Inference Proof Methods Proof Methods Proof Methods A proof is a valid argument that establishes the truth of a mathematical statement, using the hypotheses of the theorem, if any, axioms assumed to be true, and previously proven theorems. Using these ingredients and rules of inference, the proof establishes the truth of the statement being proved. We move from formal proofs, as seen in the previous section, to informal proofs, where more than one inference rule may be used at each step, where steps may be skipped, and where axioms and rules of inference used are not explicitly stated. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 28. Intro Rules of Inference Proof Methods Proof Methods Some terminology Theorem: a statement that can be shown to be true (sometimes referred to as facts or results). Less important theorems are often called propositions. A lemma is a less important theorem, used as an auxiliary result to prove a more important theorem. A corollaryis a theorem proven as an easy consequence of a theorem. A conjecture is a statement that is being proposed as a true statement. If later proven, it becomes a theorem, but it may be false. Axiom (or postulates) are statements that weassume to be true (algebraic axioms specify rules for arithmetic like commutative laws). A proof is a valid argument that establishes the truth of a theorem. The statements used in a proof include axioms, hypotheses (or premises), and previously proven theorems. Rules of inference, together with definition of terms, are used to draw conclusions from other assertions, tying together the steps of a proof. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 29. Intro Rules of Inference Proof Methods Proof Methods Understanding how theorems are stated Many theorems assert that a property holds for all elements in a domain. However, the universal quantifier is often not explicitly stated. The statement: “If x > y, where x and y are positive real numbers, then x2 > y2.” really means “For all positive real numbers x and y, if x > y then x2 > y2.” That is, in formal logic under the domain of positive real numbers this is the same as ∀x∀y((x > y) → (x2 > y2)). CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 30. Intro Rules of Inference Proof Methods Proof Methods Methods of proving theorems To prove a theorem of the form ∀x(P(x) → Q(x)), weuse the steps: Take an arbitrary element c of the domain and show that (P (c) → Q(c))is true. Apply universal generalization to conclude ∀x(P(x) → Q(x)). (Normally we not even bother with this final step.) 3 methods of showing statements of the type p → q are true: 1 2 Direct proofs: Assume p is true; the last step establishes q is true. Proof by Contraposition: Uses a direct proof of the contrapositive 3 of p → q, which is ¬q → ¬p. That is, assume ¬q is true; the last step established ¬p is true. Proof by Contradiction: To prove that P is true, we assume ¬P is true and reach a contradiction, that is that (r ∧ ¬r) is true for some proposition r. In particular, to prove (p → q), we assume (p → q) is false, and get as a consequence a contradiction. Assuming that (p → q) is false = (¬p∨q) is false = (p ∧¬q) is true. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 31. Intro Rules of Inference Proof Methods Proof Methods Direct Proofs A formal direct proof of a conditional statement p → qworks as follows: assume pis true, build steps using inference rules, with the final step showing that q is true. In a (informal) direct proof, weassume that p is true, and use axioms, definitions and previous theorems, together with rules of inference to show that q must be true. Definition The integer n is even if there exists an integer k such that n = 2k, and n is odd if there exists an integer k such that n = 2k + 1. Give a direct proof of the following theorem. Theorem If n is an odd integer, then n2 is odd. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 32. Intro Rules of Inference Proof Methods Proof Methods Theorem If n is an odd integer, then n2 is odd. Observations: We want to show that ∀n(P(n) → Q(n)), where P (n) is “n is an odd integer” and Q(n) is “n2 is odd”. We show this by proving that for an arbitrary n, P (n) implies Q(n), without invoking the universal generalization. Proof: Let n be an odd integer. By definition of odd, we know that there exists an integer k such that n = 2k + 1. Squaring both sides of the equation, we get n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1. Since n2 = 2kt + 1, where kt = 2k2 + 2k, by the definition of odd we conclude n2 is odd. Q CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 33. Intro Rules of Inference Proof Methods Proof Methods Definition An integer a is a perfect square if there is an integer b such that a = b2. Exercise: Prove the following theorem using a direct proof. Theorem If m and n are both perfect squares, then mn is also a perfect square. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 34. Intro Rules of Inference Proof Methods Proof Methods Proof by Contraposition This method of proof makes use of the equivalence (p → q) ≡ (¬q→ ¬p). In a proof by contraposition that p→ q, weassume ¬qis true, and using axioms, definitions and previously proven theorems, together with inference rules, weshow that ¬pmust be true. (It is a direct proof of the contrapositive statement!) Theorem If n is an integer and 3n + 2 is odd, then n is odd. Proof: We prove the statement by contraposition. Assume n is even(assuming ¬q). Then, by definition, n = 2k for some integer k. Thus, 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1). So, we have that 3n + 2 = 2kt where kt = 3k + 1, which means 3n + 2 is an even number. This is the negation of the hypothesis of the theorem( ¬p), which concludes our proof by contraposition. Q CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 35. Intro Rules of Inference Proof Methods Proof Methods Exercises: proof by contraposition Prove that if n = ab, where a and b are positive integers, then a ≤ √ n or b ≤ √ n. Show that the proposition P (0) is true where the domain consists of the integer numbers and P (n) is “If n ≥ 1 then n2 > n.” Note: vacuous proof: when p is false p → qis true, regardless of the value of q. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 36. Intro Rules of Inference Proof Methods Proof Methods When to use each type of proof? Usually try a direct proof. If it doesn’t work, try a proof by contraposition. Definition A real number r is rational if there exists integers p and q with q ƒ=0 such that r = p/q. A real number that is not rational is called irrational Prove that the sum of two rational numbers is rational. (For all r, s ∈R , if r and s are rational numbers, then r + s is rational.) Let r and s be rational numbers. Then, there exist integers p, q, t, u with q ƒ=0 and u ƒ=0 such that r = p/q and s = t/u. So, q u qu r + s = p + t = pu + qt . Since qƒ=0 and u ƒ=0, wehave qu ƒ=0. Therefore, weexpressed r + s as the ratio of two integers pu + qt and qu, where qu ƒ=0. This means that r + s is rational. (The direct proof succeeded!) CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 37. Intro Rules of Inference Proof Methods Proof Methods Prove that for any integer number n, if n2 is odd, then n is odd. Trying a direct proof... Let n be an integer number. Assume that n2 is odd. We get next that there exists an integer k such that n2 = 2k + 1. Solving for n produces the√ equation n = ± 2k + 1, which is not very useful to show that n is odd. Try a prove by contraposition... Let n be an integer number. Assume n is not odd. This means that n is even, and so there exists an integer k such that n = 2k. Thus, n2 = (2k)2 = 4k2 = 2(2k2). So, taking kt = 2k2, wesee that n2 = 2kt and so n2 is even. This concludes our proof by contraposition. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 38. Intro Rules of Inference Proof Methods Proof Methods Proof by Contradiction In a proof by contradiction, weprove that a proposition p is true, by showing that there exists a contradiction q such that ¬p → q. We can prove that p is true by showing for instance that ¬p → (r ∧ ¬r), for some proposition r. Prove that √ 2 is irrational. A direct proof is difficult, as it means to show that there exists no two integer a and bwith bƒ=0 such that √ 2 = a/b. Nonexistence proofs are usually hard. Let’s try a proof by contradiction... CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 39. Intro Rules of Inference Proof Methods Proof Methods Theorem √ 2 is irrational. Proof: We prove by means of contradiction. Assume √ 2 is a rational number. So, there exists at and btintegers with btƒ=0 with √ 2 = at/bt. We select such integers a and bwith the additional property that a and b have no common factors, i.e. the fraction a/b is in lowest terms(this is always possible to obtain, for wecan keep dividing by common factors). So, √ 2 = a/b so 2 = a2/b2. This implies 2b2= a2 (1). By the definition of even, we know that a2 is even. Next weuse a theorem that states that if a2 is even then a is even(prove it as an exercise). Now, since a is even, we know that there exists c such that a = 2c. Substituting in the formula (1) above, weget that 2b2= (2c)2 = 4c2. Dividing both sides by 2 weget b2= 2c2. By the definition of even, wesee that bis even. Therefore, we got that a is even and bis even, and so 2 is a common factor of a and b. But we also had that a and bhad no common factors. We just reached a contradiction! Q CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 40. Intro Rules of Inference Proof Methods Proof Methods Other types of proof statements Proof of equivalences: To prove a statement p↔ q, weshow that both p→ qand q→ pare true. Example: Prove that if n is a positive integer, then n is odd if and only if n2 is odd. Showing that a statement of the form ∀xP(x) is false: In this case, we need to find a counterexample. Example: Show that the statement “Every positive integer is the sum of the squares of two integers.” is false. We argue that 3 is a counterexample. The only perfect squares smaller than 3 are 0 and 1, and clearly, 3 cannot be written as a sum of two terms each being 0 or 1. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 41. Intro Rules of Inference Proof Methods Proof Methods Mistakes in Proofs What is the problem with he following proof that 1 = 2? Use the following steps, where a and b are two equal positive integers. Given Multiply both sides of (1) by a. Substract b2from both sides of (2) Factoring both sides of (3) Divide both sides of (4) by a − b Replace a by bin (5), since a = b Divide both sides of 6. by b. 1. a = b 2. a2 = ab 3. a2 − b2 = ab− b2 4. (a − b)(a + b) = b(a − b) 5. a + b= b 6. 2b= b 7. 2 = 1 Therefore 2 = 1. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 42. Intro Rules of Inference Proof Methods Proof Strategies Proof by Cases Sometimes it is difficult to use a single argument that holds for all cases. Proof by cases uses the following equivalence: [(p1 ∨p2 ∨···∨pn) → q] ≡ [(p1 → q) ∧(p2 → q) ∧···∧(pn → q)] Example: Prove that if n is integer then n2 ≥ n. We split the proof into three cases. Case (i) n = 0. In this case, n2 = 02 = 0 = n. Case (ii) n ≥ 1 In this case, when wemultiply both sides of n ≥ 1 by n we obtain n · n ≥ n · 1. This implies n2 ≥ n. Case (iii) n ≤ −1 In this case, n ≤ −1, but n2 ≥ 0. Therefore, n2 ≥ 0 ≥ −1 ≥ n, and so n2 ≥ n. Q CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 43. Intro Rules of Inference Proof Methods Proof Strategies Exhaustive proof This is a special form of a proof by cases, when there is a finite and small number of examples for which we need to prove a fact. Prove that (n + 1)2 ≥ 3n if n is a positive integer with n ≤ 2. We use a proof by exhaustion, by examining the cases n = 1, 2. For n = 1, (n + 1)2 = 22 = 4 ≥ 3 =3n. For n = 2, (n + 1)2 = 32 = 9 ≥ 32 = 3n. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 44. Intro Rules of Inference Proof Methods Proof Strategies Existence Proofs Existence proofs prove statements of the form ∃xP(x). Constructive existence proof: find a suchthat P (a) istrue. Example: Show that there is a positive integer that can be written as a sum of cubes of positive integers in two different ways. Proof: 1729 = 103 + 93 and 1729 = 123 + 13. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 45. Intro Rules of Inference Proof Methods Proof Strategies Existence Proofs Existence proofs prove statements of the form ∃xP(x). Constructive existence proof: find a suchthat P (a) istrue. Example: Show that there is a positive integer that can be written as a sum of cubes of positive integers in two different ways. Proof: 1729 = 103 + 93 and 1729 = 123 + 13. Nonconstructive existence proof: showthat ∃xP(x) without explicitly giving a for which P (a) istrue. Example: Show that there exist irrational numbers x and y such that xy is rational. From a previous theorem we know that √ 2 is irrational. Consider the√ number √ 2 2 . There are two possible cases: CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 46. Intro Rules of Inference Proof Methods Proof Strategies Existence Proofs Existence proofs prove statements of the form ∃xP(x). Constructive existence proof: find a suchthat P (a) istrue. Example: Show that there is a positive integer that can be written as a sum of cubes of positive integers in two different ways. Proof: 1729 = 103 + 93 and 1729 = 123 + 13. Nonconstructive existence proof: showthat ∃xP(x) without explicitly giving a for which P (a) istrue. Example: Show that there exist irrational numbers x and y such that xy is rational. From a previous theorem we know that √ 2 is irrational. Consider the√ number √ 2 2 . There are two possible cases: ) √ √ 2 2 is rational: In this case, take x = √ 2 and y = √ 2. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 47. Intro Rules of Inference Proof Methods Proof Strategies Existence Proofs Existence proofs prove statements of the form ∃xP(x). Constructive existence proof: find a suchthat P (a) istrue. Example: Show that there is a positive integer that can be written as a sum of cubes of positive integers in two different ways. Proof: 1729 = 103 + 93 and 1729 = 123 + 13. Nonconstructive existence proof: showthat ∃xP(x) without explicitly giving a for which P (a) istrue. Example: Show that there exist irrational numbers x and y such that xy is rational. From a previous theorem we know that √ 2 is irrational. Consider the√ ) number √ 2 2 . There are two possible cases:√ √ 2 2 is rational: In this case, take x = √ 2 and y = √ 2. ) √ √ 2 √ 2 2 is irrational: In this case, take x = √ 2 and y = √ 2. Then√ 2 √√ √ y 2 2 x = ( 2 ) = ( 2) = 2. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura
  • 48. Intro Rules of Inference Proof Methods Proof Strategies The art of finding a proof method that works for a theorem We need practice in order to recognize which type of proof to apply to a particular theorem/fact that weneed to prove. In the next topic “number theory”, several theorems will be proven using different proof methods and strategies. CSI2101 Discrete Structures Winter 2010: Rules of Inferences and Proof MethodsLucia Moura