Mathematics for Computer Science 201-N11 • CEGEP, Montreal
Revision sheet: writing a mathematical proof (201-N11)
This revision sheet covers the proof techniques of Mathematics for Computer Science, 201-N11: direct proof, contrapositive, proof by contradiction, mathematical induction and the pigeonhole principle, the five structures the course outline prescribes by name. It does not redo the course, which you have in your class notes: it holds what costs marks on the exam, namely the diagnosis, choosing the structure before the first line, and the write-up the marker expects after that. It is written for CEGEP students in computer science programs; once it is read, the corrected exercise set on the same chapter puts every reflex to the test.
The thread: on this chapter, tests almost never lose marks on a computation, they lose them on the structure, and the same mistake comes back in five forms. Calling the converse the contrapositive. Believing that an example proves a universal statement. Announcing a contradiction and writing a contrapositive. Believing that induction proves the base case when it requires it. Making the pigeonhole principle say WHICH box is crowded. Each pitfall below gives the wrong sentence as it is written on a test, the right sentence to copy, and its cost on the marking scheme.
Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.
The thread of the chapter
A proof is not a sequence of correct computations: it is a STRUCTURE chosen before the first line, and it is the FORM of the statement, never its subject, that tells you which one.
The five structures of the course outline, and what each one assumes
•Direct proof: assume P, translate the hypothesis into something you can manipulate, arrive at Q. It is the default choice when the hypothesis is RICH, that is, when it translates at once into an equation.
•Contrapositive: assume ¬Q ALONE and aim for exactly ¬P. It exists only for an implication, and it is always equivalent to it.
•Contradiction: assume P AND ¬Q, and aim for any contradiction. It also applies to statements that are not implications.
•Induction: base case at the first rank, THEN the inductive step from rank n to rank n+1. Reserved for statements INDEXED by an integer.
•Pigeonhole principle: n+1 objects in n boxes give a box with two objects; m objects in n boxes give one with ⌈m/n⌉ objects.
•Two tools that are not structures on their own: proof by cases, which splits the domain and whose list must be EXHAUSTIVE, and the counterexample, which disproves a universal statement without ever proving anything.
Naming the technique earns marks in its own right: “we prove the contrapositive”, “suppose, for the sake of contradiction, that”, “by the pigeonhole principle”. A sequence of correct computations without that sentence is not a written proof.
The square of the four implications
•From P⇒Q four implications can be formed: the statement, the CONVERSE Q⇒P, the CONTRAPOSITIVE ¬Q⇒¬P, and ¬P⇒¬Q, the contrapositive of the converse, called the inverse.
•Only two columns coincide: the statement and its contrapositive. The converse differs from the statement on 2 of the 4 rows of the truth table, one row in two.
•The example to keep in mind: “n divisible by 6 ⇒n divisible by 3” is true, so is its contrapositive, and its converse is false, as n=9 shows.
•The negations to write without thinking: ¬(P⇒Q)=P∧¬Q, ¬(A∨B)=¬A∧¬B, ¬(A∧B)=¬A∨¬B.
On the left, the statement and its contrapositive ALWAYS have the same truth value. On the right, a second pair, independent of the first: moving from one column to the other means changing propositions.
Proving the contrapositive proves the statement. Proving the converse proves nothing about the statement: it is another proposition, with its own proof.
The pigeonhole principle, in both its forms
•Simple form: n+1 objects placed in n boxes give at least one box with two objects.
•Generalized form: m objects in n boxes give at least one box with ⌈m/n⌉ objects, the CEILING.
•The proof of both is the same, and it is worth knowing: negate the conclusion, the negation puts an UPPER BOUND on each box, add up the n bounds and the total becomes too small.
•What the principle does NOT say: which box, or which objects. It is a NONCONSTRUCTIVE existence proof, just like a proof by cases that is left unsettled.
•The difficulty of a pigeonhole exercise is never the computation: it is deciding what plays the role of the boxes, that is, which characteristic takes only a small number of values.
If each box held at most 2 objects, it would take only 6: with 7 objects, at least one box receives ⌈7/3⌉=3, without our knowing which.
The pigeonhole principle gives a WORST-CASE certainty. A probability computation gives a frequency: with 23 people two birthdays coincide with more than a one-in-two chance, with 367 it is forced. The two registers neither contradict nor replace each other.
The mistakes that cost marks
These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.
1.Starting to write before choosing the structure
the whole question: a page of correct computations that proves nothing is worth zero
What not to write
“Let us prove that if n3+5 is odd, then n is even. We have n3+5 odd, so n3 is even, so n3=2k, so n×n×n=2k, so...”
What to write
“The conclusion “n is even” negates into “n odd”, which is rich. We prove the contrapositive: if n is odd, then n3+5 is even. n=2k+1 makes n3 odd, and the sum of two odd numbers is even.”
Why: The hypothesis is about a CONSTRUCTED expression and the conclusion about the basic object: that is the signal for the contrapositive. Starting from the hypothesis keeps relaunching the same problem one step further along.
2.Calling the converse the contrapositive
the whole question, even when all the computation that follows is correct
What not to write
“We know that if n is divisible by 6 then n is divisible by 3. By contraposition, if n is divisible by 3 then n is divisible by 6.”
What to write
“By contraposition: if n is not divisible by 3, then n is not divisible by 6. The converse would be “divisible by 3 so by 6”, and it is false: n=9 disproves it.”
The multiples of 6 lie inside the multiples of 3: the statement and its contrapositive hold; 9 (red), divisible by 3 and not by 6, disproves the converse.
Why: The contrapositive negates AND swaps, the converse only swaps. On the 4 rows of the truth table, the converse differs from the statement on 2: getting the form wrong is a one-in-two chance of reasoning about a false proposition.
3.Believing that an example, however well chosen, proves a universal statement
all the marks for the proof; there is no such thing as half a proof
What not to write
“3+5=8, 7+11=18 and 101+3=104: so the sum of two odd integers is even.”
What to write
“Let n=2k+1 and m=2j+1 with k and j integers. Then n+m=2(k+j+1), which is 2 times an integer, so even.” The three equalities are only a check done before writing.
Why: A universal statement covers infinitely many cases and no finite list exhausts them. Fermat had checked five numbers, F0 to F4, all prime, and F5=4,294,967,297=641×6,700,417 is composite.
4.Announcing a contradiction and writing a contrapositive
1 to 2 marks for rigour, and the whole question if the marker looks for the announced contradiction
What not to write
“Let us prove that if 3n+2 is odd then n is odd. Suppose, for the sake of contradiction, that n is even. Then 3n+2=2(3k+1) is even. Contradiction.”
What to write
“We prove the CONTRAPOSITIVE: if n is even, then 3n+2 is even. n=2k gives 3n+2=2(3k+1), so 3n+2 is not odd. Since the contrapositive is equivalent to the statement, the statement is proved.”
On the left, you assume only one thing, ¬Q, and aim for exactly ¬P: everything written is true. On the right, you assume TWO things, P and ¬Q, and any contradiction ends the proof.
Why: The wrong test never assumed P: without “3n+2 is odd” among the assumptions, “3n+2 is even” is not a contradiction, it is merely ¬P. It was a correct contrapositive, wrongly labelled.
5.Negating an OR as if it were an OR
the whole question, and on top of that the student concludes that the statement is false
What not to write
“The conclusion is “x>31 or y>31”. Its negation is “x≤31 or y≤31”.”
What to write
“The negation of “A or B” is “¬A AND ¬B”: here “x≤31 and y≤31”, hence xy≤31×31=961≤1,000.”
“x>31 or y>31” covers everything except the green square; its negation is that square, “x≤31 AND y≤31”.
Why: With the wrong “or”, the pair (10,200) satisfies the hypothesis and gives xy=2,000: the proof collapses on a counterexample that is not one. The negation goes on the first line of your scratch work, before any computation.
6.Forgetting to take the fraction in lowest terms before squaring
3 marks out of 5: the proof is fully written and proves nothing
What not to write
“Suppose 2=ba. Then a2=2b2, so a is even, a=2c, then b2=2c2, so b is even. Contradiction.”
What to write
“Suppose 2=ba with the fraction in LOWEST TERMS, which is always possible by simplifying. [...] a and b are both even, so both divisible by 2, which contradicts the lowest terms assumed at the start.”
Why: Without lowest terms, “a and b even” is not a contradiction but a commonplace: 24 and 48 are two perfectly legitimate ways of writing the same number. The contradiction must clash with an assumption that was STATED.
7.Believing that induction proves the base case
up to half the marks: the base case alone is typically worth 1 mark out of 4, and the conclusion “for all n”, which rests on it, goes with it
What not to write
“The inductive step is established: if the property holds at rank n, it holds at rank n+1. So the property holds for all n.”
What to write
“Base case: at rank 1, 1=21×2, the property holds. Inductive step: [...] Conclusion: by induction, the property holds for all n≥1.”
At the top, a single rank checked by hand, and the chain carries the truth all the way. At the bottom, the same chain, intact, carries NOTHING: it only passes on what it is given, and it was given nothing.
Why: Induction does not establish the first rank, it REQUIRES it. The property “n=n+1” passes from each rank to the next, since n=n+1 implies n+1=n+2, and it is false at every rank: the inductive step alone proves nothing.
8.Not saying where the induction hypothesis is used
1 to 2 marks: it is the line the marker looks for first in the inductive step
What not to write
“At rank n+1: 1+2+⋯+(n+1)=2(n+1)(n+2), which is indeed the property at rank n+1.”
What to write
“1+2+⋯+n+(n+1)=2n(n+1)+(n+1) BY THE INDUCTION HYPOTHESIS, then =2(n+1)(n+2) after putting over a common denominator.”
Why: An inductive step that does not use the induction hypothesis proves rank n+1 directly, in which case induction was unnecessary, or else, far more often, it is wrong and the student has written the conclusion in place of the reasoning.
9.Making the pigeonhole principle say WHICH box contains two objects
1 mark, and the whole next question if the reasoning relies on it
What not to write
“By the pigeonhole principle, the first folder contains at least 67 files.”
What to write
“By the pigeonhole principle, THERE IS a folder that contains at least ⌈2,000/30⌉=67 files. The principle does not say which one, and it gives no way of finding it.”
Both arrangements have 5 objects for 4 boxes, and both have a box with two objects. It is not the same box: the principle guarantees that one exists, it never designates it.
Why: The pigeonhole principle proves an existence without constructing the object: the conclusion is “there exists”, never “it is this one”. That is exactly why a checksum collision is certain without being computable.
10.Taking the floor in the generalized form
1 mark every time, and it is the most mechanical mistake of the chapter
What not to write
“2,000 files in 30 folders: one folder contains at least 2,000/30≈66.67 files, so 66.”
What to write
“At least one folder contains ⌈2,000/30⌉=67 files: the CEILING, because no folder contains 66.67 files.”
30 folders of 66 files hold only 1,980: the remaining 20 go somewhere, so some folder contains at least 67=⌈2000/30⌉.
Why: If all 30 folders contained at most 66 files, the total would be at most 30×66=1,980<2,000: that is precisely the argument that proves the generalized form, and you can redo it in your head to check the rounding.
11.Handing in a circular proof that nevertheless reads very smoothly
the whole question, and it is the hardest mistake to see when proofreading
What not to write
“Since two sessions have the same ID, there are more sessions than IDs, so two sessions have the same ID.”
What to write
“There are 163=4,096 possible IDs; there are 5,000 sessions, so more of them; by the pigeonhole principle, at least two sessions carry the same ID.”
Why: Each sentence does follow from the previous one, and the first one is what had to be proved. The proofreading test is mechanical: does the conclusion appear anywhere BEFORE its justification?
12.Forgetting to conclude, or concluding on something other than the statement
1 mark for the conclusion, taken off systematically, on every proof question
What not to write
“... so a and b are both even.” And the test stops there.
What to write
“... so a and b are both even, which contradicts the fact that ba is in lowest terms. The initial assumption is therefore impossible: 2 is irrational.”
Why: A proof ends with the original statement, not with the last line of the computation. Finding the contradiction and stopping there hands in an unfinished question; concluding “so a collision” without coming back to the sessions of the statement does too.
Which method to choose
Which structure, from the FORM of the statement
Before the first line, two questions: what do we assume, what are we looking for? The branches can be recognized without having understood the mathematical content, solely from the form of the sentence.
If the hypothesis translates at once into an equation (n=2k, b=ak) → direct proof: start from P and compute until you reach the DEFINITION of Q
Example: if a∣b and a∣c, then a∣(bu+cv), because bu+cv=a(ku+lv)
a FRESH letter for each object you know nothing about: b=ak and c=al, never k twice
If the conclusion is a negation, an OR, or is about n while the hypothesis is about 3n+2 → contrapositive: assume ¬Q and aim for ¬P
Example: if 3n+2 is odd then n is odd: start from n=2k
the criterion is RICHNESS: prove starting from the richer of the two, the hypothesis or the negation of the conclusion
If the statement contains there is no, none, at most one, is unique, is irrational, is impossible → contradiction: assume P AND ¬Q, and look for any contradiction
Example: 2 is irrational; log23 is irrational; there are infinitely many prime numbers
these words designate a proposition whose NEGATION is an existence, hence a rich hypothesis: you can name the object and compute with it
If the statement is indexed by an integer n, and rank n+1 follows from rank n by a small computation → induction: base case, inductive step, conclusion
Example: for all n≥0, 7n−1 is divisible by 6, because 7n+1−1=7(7n−1)+6
induction is not compulsory just because a statement is about all integers: 1+3+⋯+(2n−1)=n2 is proved in one line by regrouping
If the statement claims that two objects coincide, or that a value repeats, without asking which → pigeonhole principle: name the objects, name the boxes, count both
Example: among 13 integers, two have the same remainder modulo 12
simple form if you want two objects, generalized form with ⌈m/n⌉ if you want more
If the statement is universal and you suspect it is FALSE → counterexample: a single value, checked against the hypothesis AND the conclusion
Example: F5=4,294,967,297=641×6,700,417 disproves “every Fermat number is prime”
it is the only case where a numerical value on its own constitutes a complete proof
If the domain splits naturally: even or odd, remainders modulo n, sign → proof by cases, set up INSIDE one of the structures above
Example: n2≡0 or 1(mod4), so no 4k+3 is a perfect square
the list must be EXHAUSTIVE; it does not need to be disjoint, an overlap costs nothing
No branch settles it? Write the negation of the conclusion and compare its richness with that of the hypothesis: it is the only criterion that decides between the direct proof and the contrapositive. And if the contrapositive is enough, prefer it to contradiction: it is shorter and nothing false is assumed.
Which negation to write, on the first line of your scratch work
The contrapositive and contradiction both begin by negating. Getting the negation wrong ruins the proof without a single wrong computation, so the negation is written separately, before reasoning.
If the conclusion is “A or B” → negate as “¬A AND ¬B”
Example: the negation of “x>31 or y>31” is “x≤31 and y≤31”
If the conclusion is “A and B” → negate as “¬A OR ¬B”
Example: the negation of “n even and n>4” is “n odd or n≤4”
If the conclusion is an implication “if A then B” → negate as “A AND ¬B”, which is no longer an implication
Example: ¬(P⇒Q)=P∧¬Q, and never P⇒¬Q
a test that writes “suppose, for the sake of contradiction, that P implies not Q” has already lost the question
If the conclusion is “for all x, P(x)” → negate as “there exists x such that ¬P(x)”: that is exactly a counterexample
Example: negating “every Fk is prime” gives “some Fk is composite”, and F5 is
If the conclusion is “there exists x such that P(x)” → negate as “for all x, ¬P(x)”, which gives a uniform UPPER BOUND
Example: negating “some box contains 2 objects” gives “each box contains at most 1”, hence a total ≤n
The last row is the skeleton of the proof of the pigeonhole principle itself: negate, the negation bounds each box, add up the bounds, and the total becomes too small. Knowing how to negate is already half the proofs of the chapter.
How the answer is expected to be written
A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.
A proof by contrapositive
When to use it: The conclusion is a negation or an OR, or it is directly about the basic object while the hypothesis is about an expression built from it.
1Announce the structure: “We prove the contrapositive.”
2Write the contrapositive IN FULL before proving it, negations included: “if n is even, then 3n+2 is even”.
3Translate the hypothesis ¬Q into something you can manipulate, with a fresh letter: “n is even, so there is an integer k such that n=2k”.
4Compute until the DEFINITION of ¬P appears: “3n+2=6k+2=2(3k+1), and 3k+1 is an integer”.
5Conclude in two stages: first the contrapositive, then the original statement.
Concluding sentence
“So 3n+2 is even, which establishes the contrapositive. Since the contrapositive is equivalent to the statement, if 3n+2 is odd then n is odd.”
The trap: Skipping the second step. A test that proves the contrapositive without having written it leaves the marker guessing which proposition it is working on, and the marker does not guess.
Marking: Typically 1 mark for announcing and writing the contrapositive, 2 marks for the computation, 1 mark for the two-stage conclusion.
A proof by contradiction
When to use it: The statement contains there is no, none, at most one, is unique, is irrational, is impossible; or the contrapositive has failed for lack of a usable hypothesis.
1Announce: “Suppose, for the sake of contradiction, that...”, and write the COMPLETE negation. For an implication, it is P AND ¬Q: you keep the hypothesis of the statement, you do not throw it away.
2Set up the objects with all their writing precautions: fraction in LOWEST TERMS, positive integers, list assumed COMPLETE. That is where the contradiction will be found.
3Reason normally, never using what you want to prove, and justifying every existence by a named theorem.
4Exhibit the contradiction and NAME it: “a and b are both even, which contradicts the lowest terms assumed at the start”.
5Conclude on the original statement, not on the contradiction.
Concluding sentence
“The initial assumption is therefore impossible: 2 is irrational.”
The trap: Finding the contradiction and stopping there. The marker expects the sentence that comes back to the statement; without it, the question is not finished.
Marking: 1 mark for the correct negation, 1 mark for the writing precautions, 2 marks for the contradiction exhibited and named, 1 mark for the conclusion.
A proof by the pigeonhole principle
When to use it: The statement claims that two objects coincide, or that a value repeats, without asking which.
1Name the OBJECTS and the BOXES in words: “the objects are the 5,000 sessions, the boxes are the possible IDs”.
2Count both, with the computation shown: “an ID is written with 3 hexadecimal digits, so there are 163=4,096 of them”.
3Compare and cite the form used: “5,000>4,096, so by the pigeonhole principle...”, or the generalized form with ⌈m/n⌉.
4Conclude by coming back to the objects of the statement, and only on what the principle gives.
Concluding sentence
“So at least two sessions received the same ID. The principle does not say which ones.”
The trap: Naming the crowded box, or writing the average 5,000/4,096≈1.22 instead of ⌈1.22⌉=2.
Marking: 1 mark for naming objects and boxes, 1 mark for the count, 1 mark for citing the technique, 1 mark for the conclusion.
Check before you hand in
Five minutes of checking recover more marks than one more problem started in a hurry.
The converse test
Reread your concluding sentence and compare it word for word with the statement. If the two parts have swapped places without being negated, you have proved the converse, so something else.
Statement “divisible by 6 so by 3”, conclusion written “so divisible by 6”: the places have moved, the proof is about a proposition that n=9 disproves.
Is the contradiction named?
In a proof by contradiction, look for the sentence containing the word contradicts and check that it points to an assumption STATED at the start. If there is none, there is no proof.
“a and b are even” is a contradiction only if the words lowest terms appear five lines higher. Otherwise it is a commonplace, as 48 shows.
Is the induction hypothesis used anywhere?
In the inductive step, highlight the exact place where you replace the expression at rank n by its assumed value. If there is none, either induction was unnecessary or the inductive step is wrong.
In 1+2+⋯+n+(n+1)=2n(n+1)+(n+1), the highlighted equality IS the induction hypothesis: it is the line the marker looks for.
The pigeonhole count, redone in your head
Multiply the number of boxes by the announced load minus 1: the result must be STRICTLY less than the number of objects. It is the proof of the principle, in one multiplication.
30×66=1,980<2,000: the load 67 is right. 30×67=2,010>2,000: announcing 68 would be wrong.
A counterexample is checked twice
On the proposed value, check separately that the HYPOTHESIS is satisfied and that the CONCLUSION is violated. A counterexample that misses the hypothesis disproves nothing at all.
x=2 disproves “if x≥0 then x is a perfect square”: 2≥0 is true, and 12=1 then 22=4 bracket 2 strictly.
The typical problem, taken apart
No lossless compressor shortens every file
A lossless compressor turns a sequence of bits into another sequence of bits, in such a way that decompression recovers the original sequence EXACTLY. A company announces a format that shortens any file by at least one bit. Prove that this program cannot exist.
We reason on 10-bit files, which is enough: if the claim is false at that size, it is false.
On the left what goes in, on the right what must come out: the announced compressor sends each sequence of 10 bits to a strictly shorter sequence.
Step 1
The objects are the 10-bit sequences. Each bit takes two values and the choices are independent, so there are 210=1,024 of them.
Why
The count comes BEFORE the proof structure: without the two numbers, no technique can get started. It is the only counting line in the whole problem.
Step 2
The boxes are the strictly shorter sequences, ALL lengths combined: 20+21+⋯+29=210−1=1,023, by the sum of a geometric sequence with ratio 2.
Why
The claim promises at least one bit less, not exactly one: lengths 0 to 8 count as much as length 9. Keeping only the 9-bit sequences would give 512 and leave half the problem untreated.
Step 3
“Lossless” means that two DIFFERENT files cannot give the same compressed version: otherwise the decompressor, faced with that version, would not know which one to return. The function is therefore INJECTIVE.
Why
It is the step everyone skips, because the word injective is not in the statement: it has to be produced by reading. Without it, the two counts are useless.
Step 4
“Suppose, for the sake of contradiction, that this compressor exists.”
Why
The statement is a NONEXISTENCE, a word that calls for contradiction according to the decision tree. And the negation of a nonexistence is an existence, hence a rich hypothesis: you can name the object and compute with it.
Step 5
It sends each of the 1,024 sequences of 10 bits to one of the 1,023 shorter sequences. We place 1,024 objects in 1,023 boxes: by the pigeonhole principle, two distinct sequences receive the same compressed version.
Why
The contradiction is PRODUCED by a second structure, the pigeonhole principle, nested inside the first. It is the standard pattern of impossibility proofs in computer science: assume the object, count what it would have to tell apart, and one place is missing.
Step 6
This contradicts the injectivity established in step 3.
Why
The contradiction is named and must point to a property written above. The word “contradiction” used on its own is worth no marks, because it does not say what is contradicted.
Step 7
Check: 1,024−1,023=1, a single place is missing and that is enough. On 5 bits, 25=32 sequences for 25−1=31 shorter ones: the gap is still 1.
Why
The identity 20+⋯+2n−1=2n−1 is easy to recover in your head and the gap is always 1, whatever the size: an error by a factor of 2 in the count would show immediately.
The conclusion, written out
“The announced compressor does not exist: no lossless program can shorten every file. The proof is a proof by contradiction whose contradiction is produced by the pigeonhole principle, applied to a count.”
The classic mistake on this problem: Counting 512 boxes, that is, only the 9-bit sequences. The inequality 1,024>512 still holds and the proof seems to work, but it has only handled the files shortened by exactly one bit, whereas the claim promises at least one.
Learn by heart
•Contrapositive of P⇒Q: ¬Q⇒¬P, ALWAYS equivalent. Converse: Q⇒P, no link in truth value.
•¬(P⇒Q)=P∧¬Q. ¬(A∨B)=¬A∧¬B. ¬(A∧B)=¬A∨¬B.
•Contradiction: assume P AND ¬Q, any contradiction will do. Contrapositive: assume ¬Q ALONE and aim for ¬P.
•A counterexample DISPROVES a universal statement. No number of examples PROVES it.
•Induction: base case AND inductive step. The inductive step alone proves nothing: “n=n+1” passes from each rank to the next and is false everywhere.
•Pigeonhole: n+1 objects in n boxes give a box with 2 objects; m objects in n boxes give one with ⌈m/n⌉ objects, the CEILING.
•The pigeonhole principle gives an EXISTENCE: never the box, never the objects.
•A proof by cases must be EXHAUSTIVE, and does not need to be disjoint. Modulo n, there are exactly n cases.
•Termination of an algorithm: a positive, strictly decreasing INTEGER variant. A rational variant proves nothing: 2n1 decreases without ever stopping.
Frequently asked questions
What is the difference between the contrapositive and the converse?
The contrapositive negates both parts AND swaps them: from if P then Q, you go to if not Q then not P. It always has the same truth value as the statement, so proving it proves the statement. The converse only swaps them, if Q then P. It is another proposition, which can be false when the statement is true, and which needs its own proof.
How do you know which proof technique to choose?
Read the form of the statement, never its subject. A hypothesis that translates at once into an equation: direct proof. A conclusion that is easier to negate than the hypothesis is to use: contrapositive. Nonexistence, uniqueness or irrationality: contradiction. A statement indexed by an integer: induction. An existence you cannot construct: the pigeonhole principle.
When should you argue by contradiction rather than by contrapositive?
By contrapositive whenever the statement is an implication and the negation of the conclusion is easy to handle: the proof is shorter and nothing false is assumed. By contradiction when the statement is not an implication, or when it contains the words there is no, none, at most one, is unique, is irrational, is impossible.
Is one example enough to prove a mathematical statement?
No, except for an existence statement, where exhibiting an object is a complete proof. A universal statement covers infinitely many cases and no finite list exhausts them. Fermat had checked five numbers, all prime, before Euler showed that the sixth is composite. On the other hand, a single counterexample is enough to disprove a universal statement.
What exactly does the pigeonhole principle say?
If you place more objects than boxes, at least one box contains two objects. With m objects in n boxes, at least one box contains m over n of them, rounded up to the next integer. The principle only asserts that such a box exists: it says neither which one, nor which objects are in it. It is a nonconstructive existence proof.
Why do you have to check the base case in an induction?
Because induction does not prove it, it requires it. The inductive step only says that the property passes from one rank to the next; without a starting rank checked by hand, it passes nothing on. The property n equals n plus 1 does pass from each rank to the next, and it is false at every rank: that is the example that settles the question.
Practise it
Corrected exercises: Proof techniques, 201-N11
A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.
Something missing from this sheet?A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.
Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space.
Rather not create an account? Write to me directly.
Get in touch for a first session. With a B.Sc. in computer science from McGill and an M.Sc. in applied computer science from Concordia, I train students to write a proof the way it will be graded: choose the structure before writing the first line, and name it.