A direct proof • Let` s show that “the square of an odd integer is odd

advertisement
A direct proof
• Let’ s show that “the square of an odd integer is odd.” Everybody knows
this (except those who do “fuzzy math”), but let’s press on.
• Step 1 is to write this statement down and to identify any hypotheses.
• We are working in the world of integers, so quantification is done over
things in this world.
• Does the statement mean – there’s some odd integer out there whose square
is odd? Not very likely, because we like to have our theorems as general as
possible.
• We read the statement as “for any integer n, if n is odd then n2 is odd.”
• In quantified form: ∀n(Odd (n) → Odd (n2)).
• Now what? There isn’t any hypothesis explicitly stated, but because we
have an if-then connective, we can manufacture a hypothesis out of the if
part.
1
Continuing the direct proof
• We’re concerned with ∀n(Odd(n) → Odd(n2)).
• We want to “strip off” the universal quantifier; we do this by saying “let
n be an integer” and then making statements about n that we know to be
true. One thing is that we can now use Odd(n) as a hypothesis, because
we only care that Odd(n2) comes out true whenever Odd(n) is true.
• We still can’t do much, because we aren’t using anything we already know
about an integer being odd. What this really means is that “there’s an even
integer (i.e. of the form 2k for some k, such that n = 2k + 1. In full glory
Odd(n) ↔ ∃k(n = 2k + 1).
What we do, though is to say informally: “for some k, n = 2k + 1”.
• Then we look to see that our conclusion has an n2, and we say “ Therefore,
for some k, n2 = (2k + 1)2 = 4k 2 + 4k + 1.”
• Next, we want to conclude that 4k 2 + 4k + 1 is an odd integer. BUT, we
notice that 4k 2 + 4k is even, so we see how to get there - almost.
• We really have to show that 4k 2 + 4k is a multiple of 2, and this is easy –
just pull a 2 factor out front.
• So you then say, “BUT 4k 2 + 4k = 2(2k 2 + 2k), so is a multiple of 2, and
therefore 4k 2 + 4k + 1 = n2 is odd, as we wanted.”
2
Another direct proof
• This one’s more interesting: “for any integer n, if n2 is odd, then n is odd.”
• This is written ∀n(Odd(n2) → Odd(n)).
• I want to illustrate an avenue that doesn’t work.
• We can start with “let n be an integer” again – that’s OK. Next we say
“Assume that n2 is odd. If we just apply the definition, this√works out to
∃k(n2 = 2k + 1), and now all we can do is solve for n: n = 2k + 1 (plus
or minus), and this is not helpful. For one thing it seems to get us out of
the world of integers. We definitely don’t want this.
• The text does this with an “indirect proof”, which we’ll illustrate shortly,
but there is a better way, which involves some creativity.
• Here’s the short proof: Let n be an integer. Then n is either even or odd
(fact about integers). If n were even, then n2 would be even (this requires
a little subproof), so n can’t be even, and the only other possibility is that
n is odd.
• I call this a “Sherlock Holmes” proof: “When you have eliminated all other
possibilities, the one that remains, however improbable, must be the truth.”
[Hound of the Baskervilles, Conan Doyle]
3
Yet another direct proof
• To show: For all positive integers n, n3 − n is divisible by 6.
• Try this for a few values: n = 3, n3 − n = 24; n = 10, n3 − n = 990 =
6 ∗ 165.
• We can do a direct proof using an extension of the idea on the last slide:
first factor n3 − n = n(n2 − 1) = n(n − 1)(n + 1). Then notice that the
three factors are consecutive values: n − 1, n, n + 1. So at least one of
these factors is divisible by 3, and thus the product is too. Furthermore, the
product is divisible by 2, by the same argument.
• Does this mean that the product is divisible by 6? Yes, it does, because 2
and 3 are prime numbers. The product is expressible in just one way as a
product of prime numbers, and both 2 and 3 occur in the prime factorization. So you can divide out by 2, and then by 3, and still get an integer.
• Why doesn’t this last line of argument show that n3 − n is divisible by 12?
(False when n = 10.)
4
Indirect proofs
• There are plenty of other types of proof; indirect proofs include proof by
contraposition and proof by contradiction.
• A proof by contraposition is based on the logical equivalence
P → Q ≡ ¬Q → ¬P.
That is, instead of assuming P as a hypothesis and directly deriving Q, you
assume ¬Q and directly derive ¬P .
• Let’s illustrate with ∀n(Odd(n2) → Odd(n)).
• Let n be an integer. Assume ¬Odd(n). Then n is even, so n = 2k for some
k. Therefore n2 = 4k 2 = 2(2k 2), which is even. Thus ¬Odd(n2) holds.
• Notice that we implicitly used the fact that any integer is either even or odd
in the last item.
5
Proofs by contradiction
• In this kind of proof, you look at the conclusion, say Q, that you want to
prove. Take ¬Q and add it as an extra hypothesis. Then proceed to derive
a contradictory statement, one which is always false, or false in the world
you are working in.
√
• Let’s show that 2 is not a rational number. That is,
√ there is no fraction
m/n, where m and n are positive integers, such that 2 = m/n.
√
• Assume the contrary, that 2 = m/n for some positive integers m, n.
Then 2 = m2/n2, or m2 = 2n2. Consider the prime factorization of m2.
Then 2 is a factor there, and moreover, 2 must appear as a factor of m2 an
even number of times, because m2 is a perfect square. (Example: 144 =
122 = 2 ∗ 2 ∗ 2 ∗ 2 ∗ 3 ∗ 3.) Now n2 is also a perfect square, so 2 appears as
a factor of n2 an even number (maybe 0) of times, and so as a factor of 2n2
an odd number of times. But this is a contradiction: 2 appears as a factor
of the left side of m2 = 2n2 an even number of times, and as a factor of the
right side an odd number of times.
√
• A perhaps better theorem is√this: If k is rational, then k is a perfect
square. To prove it, assume k = m/n, so that m2 = kn2. All the prime
factors of m2 occur an even number of times. The prime factors of n2 also
occur an even number of times, so no prime factor of k can occur an odd
number of times, because such a factor of kn2 would occur an odd number
of times in the prime factorization of kn2 = m2. This means that k is itself
a perfect square.
6
Proof by cases
• Suppose you have to prove (P ∨ Q) → R. That is, you have a disjunctive
statement as a hypothesis.
• What you can do is to prove two things: P → R and Q → R. That is, treat
P and Q as cases and show that in each case, R is a correct conclusion.
• This obviously extends to more than two cases: (P ∨ Q ∨ R) → S, etc.
• Sometimes you can introduce cases, as we did when we said that every
integer was either even or odd. Thus to prove R outright, you can prove
(P ∨ ¬P ) → R by cases.
7
Proof by cases example
• Let’s show that for any positive integer n, that n3 − n = n(n − 1)(n + 1) is
divisible by 3.
• We introduce 3 cases by noting that if we divide any integer by 3, the
remainder is either 0, 1, or 2. Thus we have a statement (P ∨ Q ∨ R) → S,
where P is ∃k(n = 3k), Q is ∃k(n = 3k + 1), R is ∃k(n = 3k + 2), and S
is ∃j(n3 − n = 3 ∗ j). Notice that P ∨ Q ∨ R is in fact true.
• For case P , we have n3 − n = 3k(3k − 1)(3k + 1), which is a multiple of
3. (That is, j = k(3k − 1)(3k + 1).)
• For case Q, we get n3 − n = (3k + 1)(3k)(3k + 2), and again 3 is a factor.
• For case R, we have n3 − n = (3k + 2)(3k + 1)(3k + 3) = 3(3k + 2)(3k +
1)(k + 1) so we have the conclusion S in this case too. This completes the
proof by cases.
8
Incorrect proofs: Boguses!
• People often reason like this: “If the battery is dead, the car won’t start.
The car won’t start. So the battery is dead.”
• This is actually a good way to go about fixing sick cars or even sick people,
but it isn’t a valid argument. It’s called “affirming the consequent”, and
corresponds to the bogus rule
P →Q
Q
.
P
The conjunction of the two premises of this “rule” does not logically imply
the conclusion. ( Take Q to be true and P false.)
• There’s another beautiful but incorrect proof method: proof by circular
reasoning. This means that you sneak in the conclusion midway through
the proof, when nobody’s looking.
• Example: ∀n(Even(n2) → Even(n)). The “proof”: Suppose n2 is even.
Then n2 = 2k for some k. Let n = 2l for some l. Then n is even.
9
Download