Chapter 0.1 showed how to read a statement. This chapter is about what to do next. The logical shape of a statement mostly decides how to start its proof. “If P then Q” says: assume P, aim for Q. “For every ” says: take an arbitrary . “There exists” says: build one. When a direct start gets stuck, there are four standard ways around it. You will see every one of them again throughout this book.
Chapter 0.1: implication, contrapositive, and negation.
The picture: what each technique assumes and aims for
| To prove | Technique | You assume | You aim to show |
|---|---|---|---|
| direct | |||
| contrapositive | |||
| contradiction | and | something impossible | |
| cases | , split into cases that cover everything | in each case | |
| induction | ; then | ||
| well-ordering | a smallest with false | a smaller one, or a contradiction |
The table is the whole chapter in one view. The rest shows each row working, and how to choose.
Greek mathematicians already needed these tricks. Around 350 BCE Aristotle used the diagonal of a square as his example of an argument by contradiction: if the diagonal and the side were commensurable (a whole-number ratio), the same number would be both odd and even. That is the proof that is irrational. Euclid’s Elements (around 300 BCE, Book IX) shows that any finite list of primes is missing one, by multiplying the primes together and adding 1. Early uses of induction are credited to al-Karaji (around 1000 CE) and Gersonides (who lived 1288 to 1344), and Blaise Pascal stated it explicitly in his treatise on the arithmetical triangle (written around 1654, published in 1665). The name “mathematical induction” is credited to Augustus De Morgan, who used it in 1838. The problem each trick solved was the same: prove a claim about infinitely many cases, or about numbers you cannot list, with a finite argument.
Definitions and techniques
Direct proof
Direct proof
A direct proof of assumes and reaches through steps, each justified by a definition, an axiom, or an earlier result.
In one lineTo prove 'if P then Q': assume P, then derive Q one justified step at a time.
Why it existsIt is the default; most proofs in this book are direct.
Two moves make direct proofs work. The first is to unfold definitions (replace “even” by ” for some integer ”). The second is to work towards the form the conclusion needs (if the conclusion says “odd”, aim for "").
Solution.
- Assume the hypothesis, and unfold it. Let be odd. Then for some integer . Definition of odd. The letter names the integer the definition promises.
- Compute what the conclusion is about. . Algebra on the expression we have.
- Rewrite in the form the conclusion needs. . ‘Odd’ means , so we factor a 2 out of everything except the 1.
- Check the bracket is an integer. is an integer because is. Sums and products of integers are integers. Without this line the form proves nothing.
Answer. with an integer, so is odd.
To show a number is even or odd, write it as or . Do not divide by 2 and “solve for ”: tells you nothing until you show it is an integer, which is the original question again.
Divisibility works the same way. For integers and , we say divides , written , when for some integer . To use in a proof, unfold it to . To prove , produce an integer with .
Solution.
- Assume the hypothesis and unfold it. Let be integers with and . Then and for some integers and . Definition of divides. Two different letters, and , because the two multipliers need not be equal.
- Compute the thing the conclusion is about. . The conclusion asks for , so we factor out.
- Check the bracket is an integer. is an integer because and are. Sums of integers are integers. Without this the form proves nothing.
Answer. with an integer, so .
Proof by contrapositive
Proof by contrapositive
A proof by contrapositive of is a direct proof of . It proves the original, because the two are equivalent.
In one lineTo prove 'if P then Q', prove 'if not Q then not P' directly; the two statements are equivalent.
Why it existsSometimes 'not Q' gives you something concrete to unfold while P does not.
When to use it: when the hypothesis is hard to unfold but is easy.
Solution.
- Notice the direct route is awkward. "" does not easily tell you anything about (taking square roots leaves the integers). Spotting a stuck start is the signal to switch technique.
- Write the contrapositive. If is not even (so odd), then is not even (so odd). For integers, ‘not even’ is the same as ‘odd’.
- Prove it directly. That is exactly the previous worked example: odd gives odd . Reuse a proved result.
Answer. The contrapositive is true, so the statement is true.
Solution.
- Try the direct start. Assume . This says nothing about or alone, and we cannot split into a piece for each. The hypothesis is not concrete, which is the signal to try the contrapositive.
- Write the contrapositive using the negation rules. The conclusion is ” even OR even”. Its negation is ” not even AND not even” (De Morgan, rule 2 of 0.1). So the contrapositive is: if and are both odd, then is odd. Negating a conclusion with ‘or’ gives ‘and’, and for integers ‘not even’ means ‘odd’.
- Unfold the new hypothesis. and for integers . Now we have two concrete formulas to compute with.
- Multiply and aim for the odd form. . Odd means , so we factor 2 out of everything except the 1.
- Check the bracket is an integer. is an integer because and are. Sums and products of integers are integers.
Answer. The contrapositive is true, so the original statement is true.
Proof by contradiction
Proof by contradiction
A proof by contradiction of a statement assumes and derives a contradiction: a statement known to be false, such as "", or a pair and . Since a true assumption cannot lead to a false conclusion, must be false, so is true. For the assumption is and .
In one lineAssume the statement is false and derive something impossible; then it cannot be false.
Why it existsIt gives you an extra assumption (the negation) to work with, which is often what a stuck proof needs.
Solution.
- Assume the negation, exactly. Suppose is odd AND is odd. The negation of ‘if P then Q’ is ‘P and not Q’. Both facts are now available.
- Unfold both. and for some integers . Definition of odd, with a different letter for each, since they need not be equal.
- Express from the simpler one. . The second equation pins down.
- Substitute into the other. . Now compute a second way.
- Compare the two forms. is , which is even, and also , which is odd. Compare forms. Do not divide by 2 or solve for .
- Contradiction. No integer is both even and odd. An even number leaves remainder 0 on division by 2, an odd one remainder 1 (the division algorithm, 0.5).
Answer. The assumption is impossible, so the statement is true. (A direct proof also works: if is odd, then is odd, so is odd, so is even. Contradiction is not the only way; it is one tool.)
Contradiction is the natural tool for statements that say something does NOT exist. A real number is rational if it equals for integers with , and irrational if it is not rational. ” is irrational” says “no such exist”, so the negation hands us a and a to compute with.
The square root of 2 is irrational
is not a rational number: there are no integers with and .
In one lineThere are no integers with .
Why it is trueA fraction in lowest terms cannot have both top and bottom even, but forces both to be even.
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
Solution.
- Write the assumption, exactly. Suppose is irrational AND is rational. The negation of ‘if P then Q’ is ‘P and not Q’. Not-Q here is ‘rational’, since ‘not irrational’ means rational.
- Unfold the rational one. for integers with . Definition of rational. This is the concrete fact we were missing in a direct proof.
- Solve for . . Subtract 1 and use a common denominator.
- Check the target form. is an integer and is a non-zero integer. So is rational. That is exactly the definition of rational, including the condition .
- State the contradiction. is rational and is irrational. No number is both, and step 1 gave us ‘irrational’.
Answer. The assumption is impossible, so if is irrational then is irrational.
If your contradiction proof never uses the assumption , it was really a direct proof of from , wrapped in an unnecessary layer. Unwrap it. A direct proof is shorter and easier to check.
Proof by cases
Proof by cases
A proof by cases divides the hypothesis into finitely many cases such that every situation falls into at least one, and proves the conclusion in each case.
In one lineSplit the situation into cases that together cover every possibility, and prove the statement in each.
Why it existsWhen one argument cannot handle every object, separate arguments for separate kinds often can.
Solution.
- Choose cases that cover everything. Every integer is even or odd. The cases must leave nothing out; say why they are exhaustive.
- Case even. , so , even. Unfold and factor out 2.
- Case odd. , so , even. Same method.
Answer. Even in both cases, hence for every integer. (A one-line proof also exists: is a product of two consecutive integers, one of which is even. Looking for structure often removes the need for cases.)
Induction
Mathematical induction
Mathematical induction proves by proving two things:
- Base case: is true.
- Inductive step: for every , if is true then is true.
The assumption ” is true” inside step 2 is the induction hypothesis.
In one lineTo prove S(n) for every n ≥ 1: prove S(1), and prove that S(k) implies S(k+1) for every k ≥ 1.
Why it existsInfinitely many statements cannot be checked one by one, but a single argument for the step from k to k+1 covers them all.
Step 1 knocks over the first domino; step 2 says each falling domino knocks over the next. So all of them fall. As a proof: suppose some were false. Among the with false, take the smallest (the well-ordering principle below). It is not 1, by the base case. So and is true, because was the smallest failure. The inductive step then gives true, a contradiction.
Induction also proves statements that are not formulas. The inductive step then often rewrites the case so that the case appears inside it.
Solution.
- State . : ” for some integer ”. Divisibility has to be unfolded into an equation before we can compute with it.
- Base case. : . is true, so the first domino falls.
- Assume for one fixed . with an integer. This is the induction hypothesis. We assume only the case , not all cases.
- Rewrite the case so that appears. . We add and subtract 7 to create the bracket , because that is the quantity the hypothesis talks about.
- Substitute the hypothesis and factor. . Replace by . Both terms now contain 6, so it factors out.
- Check the bracket. is an integer. The form is what demands.
Answer. is true and for every , so for all . (Check: , and with from .)
Solution.
- Find where the claim starts being true. , , , but . The claim is false for . The base case must be a true case, so it is .
- Base case. . The first domino.
- Assume for a fixed . . The induction hypothesis.
- Build the case from the hypothesis. . Factorials grow by multiplying by the next number, and the hypothesis lets us replace by the smaller . Multiplying a strict inequality by the positive number keeps its direction.
- Compare with the target . Since , we have , so . Here is where is used. It makes the multiplier at least 2.
Answer. , so the step works for every . With the base case, for all .
Solution.
- Find where the claim starts to hold. Compare with : for it is against (equal, so not “greater”), for it is against , for it is against , and for it is against . The base case must be a true case from which the step works. The inequality fails at 2, 3 and 4, so we start at 5.
- Base case. : . The first domino.
- Assume for a fixed . . The induction hypothesis.
- Start from the case and use the hypothesis. . Doubling both sides of the hypothesis.
- Compare with the target . , which is positive for , in particular for . We need . This is where the size of is used.
- Chain the inequalities. . The first step is the hypothesis, the second is step 5.
Answer. The step holds for every and the base case holds, so for all .
Solution.
- Check the base case. If then and are positive integers at most 1, so both are 1. The base case is fine, so the flaw is in the step.
- Check the step with the smallest numbers. Take , , , so . Then and . Test the step on its first real case. A false conclusion must break somewhere, and small cases break first.
- Find the broken hypothesis. The induction hypothesis speaks only about POSITIVE integers, and is not positive. The step used the hypothesis on a pair outside its range.
- Conclude. The step "" is false for . A valid induction needs the step for EVERY , including the first.
Answer. The inductive step fails when one of , is 0, so the proof is invalid. A proof by induction is only as good as its weakest step.
Solution.
- Check the algebra of the step. . The step is correct. We should not assume a proof is wrong in the place we first look.
- Look for the missing part. No base case was checked. An induction needs both the base case and the step.
- Test the base case. At : left side , right side . These differ. The formula fails at , so the first domino never falls.
Answer. The step is valid and the claim is false, because the base case fails. The true formula is , which differs from by the constant .
Strong induction
Strong induction proves from the base case and the step: for every , if are all true, then is true. It is no stronger logically than ordinary induction (apply ordinary induction to ” and … and ”), but it is often more convenient.
In one lineIn the inductive step you may assume S(1), S(2), …, S(k) all at once, not only S(k).
Why it existsSome statements about n depend on cases much smaller than n − 1, such as factoring n into smaller numbers.
Solution.
- Set up strong induction from 2. : ” is a prime or a product of primes”, for . Base case : 2 is prime. Induction can start at any integer, as long as the base case matches.
- Assume and look at . If is prime, done. Split into the two possibilities: prime or not.
- Otherwise factor it. with . ‘Not prime’ means it has a factor other than 1 and itself, and both factors are then smaller than .
- Use the strong hypothesis on BOTH factors. and are each a prime or a product of primes, so is a product of primes. and can be anywhere between 2 and , not just . That is why ordinary induction is not enough here.
Answer. By strong induction, every is a product of primes (a prime counts as a product of one prime). Uniqueness of the factorisation is harder; it is in 0.5.
Solution.
- Say what is to be shown. : for some integers . ‘Paid with coins’ means a count of each coin, and counts cannot be negative.
- Choose the step first, to see how many base cases we need. To reach we add one 3-rupee coin to a payment of . The step reaches back 3 places, so we may need 3 base cases. The step comes first so that it tells us how many bases to check.
- Base cases. , , . Three consecutive values, because the step reaches back 3.
- Strong step. Let and assume . Since , we have , so holds: . The hypothesis for is available only because strong induction lets us use ALL earlier cases, not just . We need to be inside the range of the claim.
- Add the coin. , with . This is the required form.
Answer. Every can be paid. (Only the amounts cannot be paid, which is why the claim starts at 8. With 4-rupee and 5-rupee coins the step reaches back 4 places, so it needs four base cases, . That is one of the problems below.)
Well-ordering principle
The well-ordering principle: every non-empty set of positive integers has a smallest element. (It fails for the reals: the set of positive reals has no smallest element.)
In one lineEvery non-empty set of positive integers has a smallest element.
Why it existsIt lets you study a 'smallest counterexample', which is often easier than the general case; it is equivalent to induction.
Solution.
- Assume the claim fails somewhere. Let be the set of integers with . Suppose is not empty. This is a proof by contradiction. The set collects all the counterexamples.
- Take the smallest counterexample. By well-ordering, has a smallest element . Now we have one specific counterexample, and everything below is known to be fine.
- Rule out . , so . Hence and . We want to use the case , so it must be a positive integer.
- Use minimality. , so . That is, . is the smallest element of , so nothing smaller is in .
- Double it. Since both sides are integers, gives , so . Between integers, ‘less than’ lets us add 1 to the left side. Then double both sides.
- Reach the contradiction. because , so , which says . We assumed , that is .
Answer. must be empty, so for every .
How to choose
- Try direct first. Unfold the hypothesis and the conclusion into definitions; see if you can bridge them.
- Stuck because the hypothesis gives nothing concrete? Try the contrapositive.
- Stuck because you need an extra fact to work with? Try contradiction.
- The objects come in a few different kinds? Use cases.
- The statement is “for every ” and case is built from smaller cases? Use induction (strong induction if it uses several earlier cases).
Solution.
- Read the statement. “Infinitely many” is a negation: “not finitely many”. Statements that are themselves negations are natural for contradiction.
- Assume the negation. Suppose the only primes are . Contradiction gives us a concrete finite list to work with.
- Build a new number. . Each divides the product, so dividing by leaves remainder 1.
- Use the factorisation result. , so has a prime factor (previous example). Every integer at least 2 is a product of primes.
- Derive the contradiction. must be some , but no divides . Remainder 1, not 0.
Answer. No finite list contains every prime. (This is Euclid’s idea. He wrote it as “any finite list of primes is missing one” and did not use contradiction; the version above is the modern retelling. The list is not empty because 2 is a prime.)
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
- Suppose the only primes are .
- Let .
- Dividing by any leaves remainder 1.
- , so has a prime factor .
- Then equals some , but no divides . Contradiction.
Where it is used
Rank–nullity (2.3) is a direct proof; “an implication equals its contrapositive” (0.1) underlies every contrapositive proof; the theorem (2.2) is an induction whose step is elimination; uniqueness of the zero vector (2.1) is a “suppose there were two” argument; and the irrationality of is the model for every “this number is not of that form” proof in analysis.
A loop invariant is an induction. To prove that “after passes of insertion sort, the first items are sorted”, you check (base case) and show one more pass keeps the property (inductive step). Merge sort’s correctness is strong induction: sorting items relies on sorting two halves of size about , not . Proof assistants check such induction proofs by machine. The seL4 microkernel, for example, has a machine-checked proof in the Isabelle/HOL assistant (first completed in 2009) that its code does what its specification says.
Traps
In an induction step, assume , not ” for all ”. In a direct proof, do not start from the conclusion and “work backwards” to something true unless every step reverses: is fine, but does not give .
For “if P then Q”, the contradiction assumption is both and . Assuming only , or “if P then not Q”, sets up the wrong proof.
Before using cases, say why they are exhaustive (“every integer is even or odd”). A missing case is a missing proof.
If the statement is for , the base case is . Induction that skips the base case can “prove” false things: ” for all ” has a valid inductive step and no base case.
Problems
Which technique would you try first, and what would you assume? (a) If and are odd, then is odd. (b) If is even, then or is even. (c) for every .
Solution
(a) Direct: assume , . (b) Contrapositive: assume and are both odd, show odd, which is (a). (c) Induction on .
What is wrong with this “proof” that is even for even : “Take . Then , which is even.”
Solution
It checks one example. The statement is about every even , so the proof must use an arbitrary even : .
Write the assumption for a proof by contradiction of “If is irrational, then is irrational.”
Solution
is irrational AND is rational.
Prove directly: if and then . (Here , read ” divides ”, means for some integer .)
Solution
and for integers . Then , and is an integer, so .
Prove by contrapositive: if is even, then is odd.
Solution
Contrapositive: if is even, then is odd. With : , odd.
Prove by induction: for every .
Solution
Base: . Step: assume . Then adding the next odd number, , gives .
Prove that is irrational. Where does the proof for need changing?
Solution
Suppose in lowest terms, so . Then . Since 3 is prime, (Euclid’s lemma, 0.5; or check by cases : squares are , , , so only the first is divisible by 3). Write : , so and . Both divisible by 3, contradiction. The change: “even” becomes “divisible by 3”, and the fact about squares needs the cases argument.
Prove by induction that is divisible by 3 for every .
Solution
Base: . Step: . By the hypothesis , so the whole is .
Use the well-ordering principle to prove that every integer has a prime factor (without using the previous examples).
Solution
Suppose not. Then the set of integers with no prime factor is non-empty, so it has a smallest element . is not prime (a prime is its own prime factor), so with . Since , has a prime factor , and , so is a prime factor of . Contradiction.
Find the flaw: “Claim: all horses are the same colour. Induction on the number of horses. Base : true. Step: given horses, remove one: the remaining are the same colour. Remove a different one: those are the same colour. The groups overlap, so all are the same colour.”
Solution
The step fails from to . With two horses, the two groups of size 1 do not overlap, so nothing links their colours. The step “for every ” is false at , so the induction breaks.
Every integer can be written as with integers. Prove it with strong induction using four base cases.
Solution
Base cases: , , , . Step: for , the number is covered by the strong hypothesis: . Then . Four base cases are needed because the step reaches back 4 places.
Prove that for every . Why does the claim fail for , and what does that say about choosing the base case?
Solution
Base : . Step (for ): . We need , that is , true for . So . For : , , , so the claim is false there. The base case must be a value where the claim is true AND from which the step works.
Summary
- The shape of the statement chooses the start. If-then: assume the hypothesis. For every: take an arbitrary object. There exists: build one.
- Direct: assume , derive . Unfold definitions; aim for the form the conclusion needs.
- Contrapositive: prove instead. Same theorem.
- Contradiction: assume and , derive the impossible. In parity proofs, compare with ; never divide.
- Cases: split into cases that cover everything; say why they do.
- Induction: base case plus "". Strong induction may assume all earlier cases. Well-ordering studies the smallest counterexample. All three are the same idea.