You are on page 1of 27

Tutorial 1

Methods of Proving Theorems


Direct Proof

• A direct proof is a sequence of statements which are either givens


or deductions from previous statements, and whose last statement
is the conclusion to be proved.
– Direct proofs lead from the hypothesis of a theorem to the conclusion.

• In order to proof the conditional statement (p->q),


• Assume that p is true.
• Subsequent steps are constructed using axioms, rules of inference,
with the final step showing that q must also be true.
Direct Proof
• Q1. Use a direct proof to show that every odd integer is the
difference of two squares.
Solution1
• The theorem states that For all n, (P(n) -> Q(n))
• P(n) -> n is an odd integer
• Q(n) -> Difference of two squares is n.
• Let n be an odd integer i.e. n = 2k+1
• In order to obtain a square of some integer
• n = 2k+1+0
• n = 2k+1+(k2-k2)
• n = k2+2k+1 – k2
• n = (k+1)2 – k2
• Since k is an integer and k+1 is also an integer. We then note
that n is the difference of the square of two integers.
Solution1
• The theorem states that For all n, (P(n) -> Q(n))
• P(n) -> n is an odd integer
• Q(n) -> Difference of two squares is n.
• The only thing is that we need to choose two integers a & b
such that a2-b2=n.
• we can do this by letting a and b be the integers that straddle
n/2.
• Since n is odd, we can write n as 2k+1 for some integer k
• Let a = k+1 and b = k
• Then (k + 1)2 - k2 = k2 + 2k + 1 - k2 = 2k + 1 = n.
Proof by contraposition
• To prove a statement of the form p->q, do the following
– Form the contrapositive. In particular, negate the p & q.
– Prove directly that -q -> -p (we take –q as a hypothesis and
using axioms and others, we show that –p must follow)

• Note: The important point is to find the contrapositive of the


given statement.
Proof by Contraposition

• Q2. Use a proof by contraposition to show that if x + y >= 2,


where x and y are real numbers, then x >= I or y >= I .
Solution2
• We want to proof that For all n, P(n) -> Q(n)
• P(n): x+y >=2
• Q(n): x>=1 or y>=1
• There is no obvious way of directly showing that P(n) -> Q(n)

• We try to use contraposition method (-Q(n) -> -P(n))


• Hypothesis: Assuming that Q(n) is false (not true that x >=1 or
y >= 1) Then (by De Morgan's law) x < 1 and y < 1.
• Adding these two inequalities, we obtain x + y < 2. This is the
negation of x + y >=2
First try Direct and then
Contraposition
• Q3. Prove that if n is an integer and n2 is odd, then n is odd.
Solution3
• Suppose that n is an integer and n2 is odd. Then, there exists an
integer k such that n2 = 2k + 1 . Can we use this information to show
that n is odd?
• There seems to be no obvious approach to show that n is odd
because solving for n produces the equation n = ±J2k + 1 , which is
not terribly useful.

• We take as our hypothesis the statement that n is not odd. Because


every integer is odd or even, this means that n is even. This implies
that there exists an integer k such that n = 2k.
• To prove the theorem, we need to show that this hypothesis implies
the conclusion that n2 is not odd, that is, n2 is even.
• By squaring both sides of this equation, we obtain n2 = 4k2 = 2(2k2),
which implies that n2 is also even because n2 = 2t, where t = 2k2 .
• We have proved that if n is an integer and n2 is odd, then n is odd.
Proof by contradiction (for single statement, not
conditional statement)
• Contradiction means that a statement whose truth value is always
false.

• We want to prove that a statement p is true.


• We start with –p and reach to a statement q which is a
contradiction i.e. always false. Example of q could be (r ^ -r).

• -p -> q or –p -> (r ^ -r) or –p -> False


• -p -> False is true only if p is true.
Proof by Contradiction
• Q4. Show that at least 10 of any 64 days chosen must fall on
the same day of the week.
Solution4
• Let p be the proposition: “at least 10 of any 64 days chosen must
fall on the same day of the week.”
• Hypothesis: Suppose that –p is true. –p: “at most 9 of any 64 days
chosen must fall on the same day of the week.”
– (r: we chose 64 days)

• In order to –p be true, we need only 63 days to be chosen as


there are 7 days in a week and at most 9 can fall on the same day
(9*7=63 days).
– (-r: At the end we proved that we need only 63 days).
• This contradicts the hypothesis.

• –p -> (r ^ -r) or –p -> False is true only if p is true. Hence p is true.


Proof by contradiction
Q5. Use a proof by contradiction to prove that the sum of an
irrational number and a rational number is irrational.
Solution5
• The proposition (p) to be proved here is as follows: If r is a
rational number and i is an irrational number, then s = r + i is
an irrational number.
• Hypothesis: (Assuming –p is true) Suppose that r is rational, i
is irrational, and s is rational. Then
• We know that the sum of the rational numbers s and -r must
be rational.
– (Indeed, if s= a/b and r = c/d, where a, b, c, and d are integers, with b ≠
0 and d ≠ 0, then by algebra we see that s + ( -r) = (ad-be)/ (bd) , so s +
( -r) is a rational number.)
• But s + ( -r) = r + i - r = i, forcing us to the conclusion that i is
rational.
• This contradicts our hypothesis that i is irrational. Therefore
the assumption that s was rational was incorrect, and we
conclude, as desired, that s is irrational.
Proof by contradiction (for conditional
statement)
• We want to prove that a conditional statement (p -> q).
• We start with –q and also assume p and then reach to a
contradiction i.e. (–q ^ p) -> False

• (p -> q) and (-q^p)->False are equivalent, note that each is false in


exactly one case, namely when p is true and q is false.

• (-q ^ p) -> False


• (-q ^ p)-> (p ^ -p)
• (-q ^ p) -> -p and (-q ^ p) -> p
• We only need to prove (-q ^ p) -> -p because (-q ^ p) -> p will
always be true.
Proof by Contradiction
• Q6. Show that if n is an integer and n3 + 5 is odd, then n is
even, using a proof by contradiction.
Solution6
• p: P(n): n3+5 is odd. q: Q(n): n is even.
• We need to consider –q and p, that means n is odd and n3 + 5 is odd.
• Since n is odd, and the product of odd numbers is odd, in two steps
we see that n3 is odd.
• p: n3 + 5 means odd + odd = even = -p (p is even) which is a
contradiction.
• (-q ^ p) -> -p and (-q ^ p) -> p is always true, so (-q ^ p) -> F

• Or

• When we subtract two odd integers i.e. (n3 + 5) – (n3), we should get
even but we are getting odd (5). This is not true.
• Therefore our supposition was wrong, and the proof by
contradiction is complete.
VACUOUS AND TRIVIAL PROOFS
• We can quickly prove that a conditional statement p -> q is
true when we know that p is false, because p -> q must be
true when p is false.
• Consequently, if we can show that p is false, then we have a
proof, called a vacuous proof, of the conditional statement p -
>q.

• We can also quickly prove a conditional statement p -> q if we


know that the conclusion q is true. By showing that q is true, it
follows that p -> q must also be true. A proof of p -> q that
uses the fact that q is true is called a trivial proof.
VACUOUS AND TRIVIAL PROOFS

• Q7. Prove the proposition P(0), where P(n ) is the proposition


"If n is a positive integer greater than I , then n2 > n .“ What
kind of proof did you use?
Solution7
• The proposition we are trying to prove is "If 0 is a positive
integer greater than 1, then 02 > 0 ."
• p: 0 is a positive integer greater than 1
• q: 02 > 0
• Our proof is a vacuous one.
• Since the hypothesis is false, the conditional statement is
automatically true.
Proofs of Equivalence
• Q8. Prove that if n is a positive integer, then n is odd if and
only if 5n + 6 is odd.

• To prove a theorem that is a biconditional statement, that is,


• a statement of the form p <-> q, we show that p -> q and q ->
p are both true.
• p: n is odd
• q: 5n + 6 is odd
Solution8
• We must prove two conditional statements.
• First, we assume that n is odd and show that 5n + 6 is odd (this is
a direct proof). (p->q)
• By assumption, n = 2k + 1 for some integer k. Then 5n + 6=5(2k+1)
+ 6 = 10k + 11 = 2(5k + 5) + 1. Since we have written 5n + 6 as 2
times an integer plus 1, we have showed that 5n + 6 is odd, as
desired.

• Now we give a proof by contraposition of the converse (q->p).


Suppose that n is not odd, in other words, that n is even. Then n =
2k for some integer k. Then 5n + 6 = 10k + 6 = 2(5k + 3).
• Since we have written 5n + 6 as 2 times an integer, we have
showed that 5n + 6 is even. This completes the proof by
contraposition of this conditional statement.
Proofs of Equivalence
• Q9. Show that these statements about the integer x are
equivalent:
• (i) 3x + 2 is even, (ii) x + 5 is odd, (iii) x2 is even.
Solution9
• Perhaps the best way to do this is to prove that all of them are
equivalent to x being even, which one can discover easily enough by
trying a few small values of x.
• If x is even, then x = 2k for some integer k.
– Therefore 3x + 2 = 3 · 2k + 2 = 6k + 2 = 2(3k + 1), which is even, since it has
been written in the form 2t, where t = 3k+l.

– Similarly, x+5 = 2k+5 = 2k+4+1=2(k+2)+1, so x+5 is odd;


– and x2 = (2k)2 = 2(2k2), so x2 is even.

• For the converses, we will use a proof by contraposition. So assume


that x is not even; thus x is odd and we can write x = 2k + 1 for some
integer k.
– Then 3x + 2=3(2k+1) + 2 = 6k + 5 = 2(3k + 2) + 1, which is odd (i.e., not
even), since it has been written in the form 2t + 1, where t = 3k + 2.
– Similarly, x+5 = 2k+1+5 = 2(k+3), so x+5 is even (i.e., not odd).
– That x2 is odd -> You have to do it
• This completes the proof.
Mistakes in Proof
• Q10. What is wrong with this famous supposed "proof" that 1 =
2?
• "Proof:" We use these steps, where a and b are two equal
positive integers.

Step Reason
l. a=b Given
2. a2 = ab Multiply both sides of ( 1 ) by a
3. a2 - b2 = ab - b2 Subtract b2 from both sides of (2)
4. (a - b)(a + b) = b(a - b) Factor both sides of (3)
5. a + b = b Divide both sides of (4) by a - b
6. 2b = b Replace a by b in (5) because a = b
and simplify
7. 2 = 1 Divide both sides of (6) by b
Solution10
• Solution: Every step is valid except for one, step 5 where we
divided both sides by a - b. The error is that a - b equals zero;
division of both sides of an equation by the same quantity is
valid as long as this quantity is not zero.

You might also like