Proof and Logic
This note covers IB Mathematics AA — Topic 1.4: Proof in full depth. Everything here is examinable at both Standard Level and Higher Level, with HL extensions marked where relevant.
1. Logic Foundations
1.1 Propositions and Truth Values
A proposition is a declarative sentence that is either true or false — never both, never neither.
"7 is prime" is a proposition (true). "Solve for x" is not a proposition. "This sentence is false" is not a proposition (it is paradoxical).
The truth value of a proposition is denoted .
1.2 Logical Connectives
There are five fundamental connectives. Let and be propositions.
| Connective | Symbol | Read as | Meaning |
|---|---|---|---|
| Negation | "not P" | True when P is false | |
| Conjunction | "P and Q" | True when both are true | |
| Disjunction | "P or Q" | True when at least one is true | |
| Implication | "P implies Q" | False only when P true and Q false | |
| Biconditional | "P if and only if Q" | True when P and Q have same truth value |
Truth Tables
Negation:
| T | F |
| F | T |
Conjunction:
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Disjunction (inclusive OR):
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Implication:
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
The implication is only false when a true premise leads to a false conclusion. This is the single most misunderstood truth table entry in all of mathematics. When is false, the implication is vacuously true — there is no counterexample to "whenever P holds, Q holds."
Biconditional:
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
1.3 Logical Equivalence
Two compound propositions are logically equivalent (written ) if they have identical truth values for every possible assignment of truth values to their component propositions.
Key equivalences (Laws of Logic):
- Commutative: , and
- Associative: , and similarly for
- Distributive: , and
- Identity: , and
- Domination: , and
- Idempotent: , and
- Double Negation:
- Absorption: , and
1.4 De Morgan's Laws
These are essential for negating compound statements.
Intuition: To negate an "and," negate each part and switch to "or." To negate an "or," negate each part and switch to "and."
Worked Example — Negating a compound statement:
Negate: "The function is continuous and differentiable."
Let : " is continuous." Let : " is differentiable." The statement is . Its negation is , i.e., " is either not continuous or not differentiable."
A common mistake is to negate "P and Q" as "not P and not Q." That is wrong. The negation of " is continuous and differentiable" is NOT " is not continuous and not differentiable" — that is too strong.
1.5 The Contrapositive
For any implication , the contrapositive is .
Theorem: An implication and its contrapositive are logically equivalent.
This is proved by comparing truth tables. Both are false only when is true and is false.
Compare with two other related statements that are NOT equivalent:
- The converse of is (not equivalent in general)
- The inverse of is (not equivalent in general, but equivalent to the converse)
danger implication. Never confuse the contrapositive with the converse.
Worked Example:
Statement: "If is even, then is even."
Contrapositive: "If is odd, then is odd."
Converse: "If is even, then is even." (True in this case, but not logically guaranteed.)
Inverse: "If is odd, then is odd." (Also true here, but again not guaranteed.)
1.6 Tautologies and Contradictions
A tautology is a compound proposition that is true for every possible truth assignment. A contradiction is a compound proposition that is false for every possible truth assignment.
Important tautology: (Law of Excluded Middle)
Important contradiction:
Another key tautology — Modus Ponens:
This says: if you know and you know , then you can conclude . This is the fundamental rule of direct proof.
Modus Tollens:
This says: if you know and you know , then you can conclude . This is the fundamental rule of proof by contrapositive.
1.7 Quantifiers
Quantifiers let us express statements about collections of objects.
Universal quantifier (): "For all" — the statement must hold for every element in the domain.
Existential quantifier (): "There exists" — the statement must hold for at least one element.
Negating quantified statements:
To negate a universal statement, you get an existential counterexample. To negate an existential statement, you must show it fails for every case.
Nested quantifiers require careful handling. The order matters:
Worked Example — Negating a nested quantifier statement:
Negate: "For every positive real number , there exists a positive real number such that..."
The existential becomes universal and the universal becomes existential. This is the logical backbone of epsilon-delta definitions in analysis.
warning negate the predicate. The order of quantifiers does NOT change — it remains the same sequence but with each quantifier flipped.
Worked Example: Negate
Step 1: Identify the structure — it is where is " is prime and ."
Step 2: Negate —
Step 3: Simplify —
Reading: "There exists a positive integer such that every prime satisfies ." This is false (there are infinitely many primes), so the original statement is true.
2. Methods of Proof
2.1 Direct Proof
Strategy: To prove , assume is true and use logical deduction to arrive at .
This is the most straightforward method. You chain together known results, definitions, and algebraic manipulations.
Template:
- Assume .
- [Logical steps...]
- Therefore .
- Hence .
Worked Example — If is odd, then is odd:
Assume is odd. By definition, for some .
Since is an integer (sum and product of integers), let . Then , which is odd by definition.
Therefore, if is odd, then is odd.
Worked Example — The sum of two even numbers is even:
Let and for some .
Since , we have is even.
Exercise: Prove that the product of two odd numbers is odd.
Let and for some .
Since , the product is of the form , hence odd.
2.2 Proof by Contradiction
Strategy: To prove a statement , assume and derive a logical contradiction (something that is always false, like or ).
Template:
- Assume (the negation of what you want to prove).
- [Logical steps leading to a contradiction...]
- This contradicts [known fact].
- Therefore is false, so is true.
This method is especially powerful when the statement you want to prove is a negation itself ("there does not exist..." or "there are no...").
info which means must be false, hence is true. It relies on the Law of Excluded Middle ( must be true).
Worked Example — is irrational:
Assume is rational. Then where , (the fraction is in lowest terms).
Squaring both sides: , so .
Since , we have is even. Therefore is even (by the lemma: if is even, then is even — proved below).
Write for some . Substituting:
, so , so .
Therefore is even, so is even.
But now both and are even, contradicting .
Therefore our assumption is false, and is irrational.
note odd, then , so , which is odd. Hence if is even, cannot be odd, so is even.
Exercise: Prove that is irrational.
Assume in lowest terms. Then , so is divisible by 3. By the lemma (if , then ), write . Then , so , hence , so . Both and are divisible by 3, contradicting lowest terms.
The supporting lemma "if for prime , then " follows from the Fundamental Theorem of Arithmetic: if appears in the prime factorization of , it must appear in the factorization of .
2.3 Proof by Contrapositive
Strategy: To prove , instead prove . Since an implication is logically equivalent to its contrapositive, this proves the original statement.
When to use this: When the hypothesis feels "too big" or "too loose" to work with directly, but the negation of the conclusion gives you something concrete to grab.
Template:
- We prove the contrapositive: if , then .
- Assume .
- [Logical steps...]
- Therefore .
- Hence .
Worked Example — If is even, then is even:
We prove the contrapositive: if is odd, then is odd.
Assume is odd. Then for some .
This is odd. Therefore, if is odd, is odd. By contrapositive, if is even, then is even.
tip " even implies even" by contradiction (assume even and odd, derive that is both even and odd). But the contrapositive proof is cleaner — it is a direct proof of the equivalent statement.
Exercise: Prove that if is odd, then is odd (by contrapositive).
Contrapositive: If is even, then is even.
Assume is even, so for some .
Since , is even. By contrapositive, if is odd, then is odd.
2.4 Mathematical Induction
Induction proves statements of the form , where .
2.4.1 Standard (Weak) Induction
Template:
- Base case: Verify is true.
- Inductive hypothesis: Assume is true for some arbitrary .
- Inductive step: Using the hypothesis that holds, prove that holds.
- Conclusion: By the Principle of Mathematical Induction, is true for all .
Worked Example — Sum formula :
Let : .
Base case (): LHS , RHS . So is true.
Inductive hypothesis: Assume is true for some , i.e., .
Inductive step: We must show : .
Starting from the LHS:
(by the inductive hypothesis)
This is exactly the RHS of . Therefore holds.
Conclusion: By induction, is true for all .
Worked Example — Sum of squares :
Let : .
Base case (): LHS , RHS . True.
Inductive hypothesis: Assume holds for some .
Inductive step:
This is . By induction, the formula holds for all .
Exercise: Prove by induction that for all .
Let : .
Base case (): LHS , RHS . True.
Inductive hypothesis: Assume : .
Inductive step: .
By induction, holds for all .
Exercise: Prove by induction that for all .
Let : .
Base case (): . True.
Inductive hypothesis: Assume for some .
Inductive step: (by IH, since and multiplying by 2).
Now, for . Therefore .
By induction, holds for all .
2.4.2 Strong Induction
In strong induction, the inductive hypothesis assumes are ALL true, not just .
Template:
- Base case(s): Verify (and possibly more base cases).
- Inductive hypothesis: Assume is true for all .
- Inductive step: Using that holds for all , prove .
- Conclusion: By the Principle of Strong Induction, is true for all .
When to use strong induction: When proving requires not just but some earlier case where .
Weak and strong induction are logically equivalent — anything provable by one is provable by the other. But strong induction can make certain proofs much more natural. Use it when the inductive step needs to reference cases earlier than just .
Worked Example — Every integer is a product of primes:
Let : " is a product of primes (possibly a single prime)."
Base case (): 2 is prime, hence a product of primes. True.
Strong inductive hypothesis: Assume is true for all .
Inductive step for :
Case 1: is prime. Then it is trivially a product of primes.
Case 2: is composite. Then where . By the strong inductive hypothesis, both and are products of primes. Therefore is a product of primes.
In either case, holds. By strong induction, every integer is a product of primes.
Exercise: Prove that every amount of postage cents can be formed using 4-cent and 5-cent stamps.
Let : "Postage of cents can be formed using 4-cent and 5-cent stamps."
Base cases: : one 4-cent stamp. : one 5-cent stamp. : cannot — wait, this needs checking. : cannot either. Let me reconsider.
Actually, we need : two 4-cent stamps. : one 4-cent + one 5-cent. : two 5-cent stamps. : ... Hmm, : three 4-cent stamps. : two 4-cent + one 5-cent. : one 4-cent + two 5-cent. : three 5-cent stamps.
Let us use base cases , , , . Strong inductive hypothesis: assume for all , where .
For : note that (since ). By strong IH, holds, meaning we can form cents. Adding one 4-cent stamp gives cents.
By strong induction, holds for all . But we should verify the smaller cases: through . We find , , , , hold, but , , do not. So the correct statement is: all postage except . Or: all .
The cleanest formulation: all can be formed. Base cases through . Inductive step as above.
2.5 Proof by Exhaustion
Strategy: When the domain of possible cases is finite and small, prove the statement by verifying each case individually.
This is brute-force but rigorous. It is only practical when the number of cases is manageable.
Worked Example — Show that is prime for :
: (prime) : (prime) : (prime) : (prime) : (prime)
All five cases verified. (Note: this polynomial produces primes for through , but fails at since .)
2.6 Counterexamples
A single counterexample is sufficient to disprove a universal statement.
Strategy: To disprove , find one such that is false.
Worked Example — Disprove: "All prime numbers are odd."
Counterexample: is prime and is even.
Worked Example — Disprove: " is prime for all ."
When : , which is composite ().
To prove a universal claim requires a general proof. To disprove it requires only one counterexample. This asymmetry is fundamental to mathematical logic.
Exercise: Disprove: "For all positive integers and , ."
Take , . Then , but . Since , the statement is false.
3. Classical Proof Examples
3.1 is Irrational (Detailed)
This proof appeared in Section 2.2. Here we present it with full commentary on every logical step.
Theorem: .
Proof:
We proceed by contradiction.
Assume . Then there exist coprime integers with such that .
The requirement that is without loss of generality: any rational number can be expressed as a fraction in lowest terms.
Squaring: , so . Equation (1).
From (1): is divisible by 2, so is even. By the contrapositive of "odd implies square is odd," is even.
Since is even, write for some integer . Substituting into (1):
, i.e., , i.e., . Equation (2).
From (2): is even, so is even (same reasoning as above).
But now and are both even, meaning , contradicting .
This contradiction shows our assumption is false. Hence .
3.2 There Are Infinitely Many Primes
Theorem (Euclid): The set of prime numbers is infinite.
Proof:
We proceed by contradiction.
Assume there are only finitely many primes: .
Consider the number .
Since , by the Fundamental Theorem of Arithmetic, has a prime factor .
This prime must be one of (since we assumed these are all the primes).
But , and for each :
So for all . This contradicts that some divides .
Therefore, there are infinitely many primes.
info example, . The proof only requires that has SOME prime factor not in the list.
3.3 is Irrational
Theorem: is irrational.
Proof:
We proceed by contradiction. Assume is rational.
Then for some coprime positive integers with .
This means , so .
Since , is a power of 2. Its only prime factor is 2.
Since , is a power of 3. Its only prime factor is 3.
By the Fundamental Theorem of Arithmetic, prime factorizations are unique. The number would need to have prime factorization consisting of only 2's AND only 3's simultaneously. This is impossible unless , but .
Contradiction. Hence is irrational.
Exercise: Prove that is irrational.
Assume in lowest terms, so . The LHS has only prime factor 3; the RHS has only prime factor 5. By uniqueness of prime factorization, this is impossible unless , contradicting . Hence is irrational.
3.4 Sum Formulas
We proved these by induction in Section 2.4. Here is the complete reference:
The last identity is notable: the sum of cubes equals the square of the sum of the first integers.
Exercise: Prove by induction.
Let : .
Base case (): LHS , RHS . True.
Inductive hypothesis: Assume holds.
Inductive step:
This is . By induction, holds for all .
3.5 Divisibility Proofs
Theorem: If is even, then is even.
We proved this by contrapositive in Section 2.3. Here are additional divisibility results.
Theorem: If and , then (transitivity of divisibility).
Proof:
Since , there exists such that . Since , there exists such that .
Therefore .
Since , we have .
Theorem: If and , then for all .
Proof:
Since , write for some . Since , write for some .
.
Since , .
This theorem is the foundation of the Euclidean algorithm. The expression is called a linear combination of and . The greatest common divisor can always be expressed as a linear combination of and (Bezout's identity).
3.6 Inequality Proofs
AM-GM Inequality (two variables): For :
with equality if and only if .
Proof:
Note that for all .
Expanding: , so .
Dividing by 2: . Equality holds when , i.e., .
Cauchy-Schwarz Inequality (statement): For real numbers and :
with equality when the vectors are proportional ( for all and some scalar ).
The proof is beyond the scope of this note but uses the fact that for all , and a quadratic in that is always non-negative must have a non-positive discriminant.
Exercise: Prove the AM-GM inequality for three variables: for .
Apply two-variable AM-GM twice. First, . Let . Then:
Wait, that gives us , i.e., .
That is not quite right for three-variable AM-GM. A cleaner approach: let , , with . We need .
Consider .
Since and squares are non-negative, . Dividing by 3 and substituting back gives the result.
4. Number Theory Proofs (HL Extension)
4.1 Divisibility Properties
For integers with :
Definition: (read " divides ") means there exists such that .
Key properties:
- for all (since )
- for all (since )
- If and , then
- If and , then and
Proof of property 3:
implies for some . implies for some .
Substituting: , so . Since , we have .
In integers, implies or .
If : . If : . So .
4.2 Congruences and Modular Arithmetic
Definition: means , i.e., for some .
Key properties of congruences:
If and , then:
- for any
Proof of property 1:
means . means .
.
Therefore , so .
Proof of property 3:
and for some .
.
Therefore , so .
Division does NOT work with congruences in general. From , you can only conclude if . For example, and , but (undefined).
Worked Example: Find the last two digits of .
We need .
First, find : , so .
Next, find : By Euler's theorem (or Fermat's Little Theorem since 25 is a prime power and ), , so , hence .
We need such that and . By CRT, .
The last two digits are 01.
4.3 Fermat's Little Theorem
Theorem (Fermat's Little Theorem): If is prime and , then:
Equivalently, for any integer and prime : .
Proof sketch (using the fact that is a permutation of modulo ):
Consider the product .
Modulo , the numbers are all nonzero and pairwise non-congruent modulo (since implies , and since , we get , which means , and since , we get ).
Therefore is a complete residue system modulo excluding 0, so:
Since (Wilson's theorem tells us ), we can divide both sides by modulo :
Worked Example — Find :
Since 13 is prime and , by Fermat: .
, so .
Exercise: Find .
By Fermat: .
, so .
Answer: .
4.4 Fundamental Theorem of Arithmetic
Theorem: Every integer can be expressed uniquely (up to order of factors) as a product of primes:
where are primes and .
Existence was proved in Section 2.4.2 using strong induction. Here we sketch uniqueness.
Uniqueness proof (sketch):
Suppose has two prime factorizations:
where all are primes. Since , by Euclid's lemma ( and prime implies or ), divides some .
Since is prime and is prime with , we must have . Cancel this factor and repeat. By induction, the factorizations are identical.
4.5 GCD and LCM Properties
Definition: is the greatest common divisor of and — the largest positive integer dividing both.
Definition: is the least common multiple — the smallest positive integer that both and divide.
Key relationship:
Proof (using prime factorizations):
Let and (with , padding with zeros where needed).
.
Bezout's Identity: For integers (not both zero), there exist integers such that:
This is proved constructively by the Euclidean algorithm (reversing the steps).
4.6 Euclidean Algorithm Correctness
Theorem: The Euclidean algorithm correctly computes .
Algorithm: For :
The algorithm terminates with .
Proof of correctness:
Claim 1: The remainders form a strictly decreasing sequence of non-negative integers: . This follows from the division algorithm: each remainder is strictly less than the previous divisor.
Claim 2: The algorithm terminates. Since the remainders are non-negative integers and strictly decrease, the process must eventually reach remainder 0 (by the well-ordering principle).
Claim 3: . This follows from the key lemma: for any integer .
Proof of the key lemma: if and , then . Conversely, if and , then . So divides both and if and only if divides both and . Therefore .
Claim 4: . Since (the last step is ), the GCD is .
Combining claims: .
Worked Example: Compute and express it as a linear combination.
So .
Back-substitution to find Bezout coefficients:
So .
5. Common Pitfalls
5.1 Circular Reasoning
Circular reasoning occurs when you implicitly assume what you are trying to prove.
Example of circular reasoning:
"Prove that is irrational."
Bad proof: "Since is irrational, it cannot be written as . Therefore is irrational."
The conclusion ( is irrational) appears in the hypothesis. This proves nothing.
How to avoid: Check that every step of your proof relies only on axioms, definitions, and previously established theorems — never on the statement you are proving.
Circular reasoning is the most dangerous logical fallacy in mathematics because it can look convincing. Always verify that your proof does not contain the conclusion as an unstated assumption.
5.2 Assuming the Conclusion
Related to circular reasoning, this occurs when you "work backwards" from the conclusion without checking reversibility.
Example:
"Prove: If , then ."
Bad proof: , so . Done.
This is wrong because also satisfies . The step implicitly assumes .
The statement itself is false: does not imply . The correct implication is or .
5.3 Incorrect Negation of Implications
The negation of is NOT .
Reasoning: is logically equivalent to (check the truth table). So:
Worked Example:
Negate: "If it rains, the ground gets wet."
Correct negation: "It rains AND the ground does NOT get wet." (The premise holds but the conclusion fails.)
Incorrect negation: "If it rains, the ground does not get wet." (This is a different implication entirely.)
This is one of the most common errors on IB exams. Memorize: the negation of " implies " is " AND not ."
5.4 Induction Base Case Errors
The pitfall: Skipping the base case or proving the wrong base case.
Example:
"Prove: for all ."
Bad proof: Assume . Then . So , i.e., . QED.
This "proof" never checks the base case. The statement is false, so the base case fails.
Another example: When using strong induction with a recursive definition like the Fibonacci sequence, you may need MULTIPLE base cases. Proving the induction step from and to requires both and as base cases.
Worked Example: Prove for all , where is the -th Fibonacci number.
Let : .
Base cases: . True. . True. We need TWO base cases because the recurrence references two previous terms.
Strong inductive hypothesis: Assume for all , where .
Inductive step:
Now, since .
Therefore . By strong induction, holds for all .
If we had only checked and tried to use weak induction, the inductive step from alone would not suffice because depends on as well.
5.5 Weak vs. Strong Induction Confusion
Weak induction assumes and proves .
Strong induction assumes and proves .
Common mistake: Using weak induction when you need strong induction. If depends on or earlier, weak induction's hypothesis is insufficient.
Common mistake (reverse): Always using strong induction "to be safe." While not logically wrong, this is usually unnecessary and makes proofs harder to read. Use weak induction unless the structure of the problem clearly requires strong induction.
Rule of thumb: If the statement for depends only on the statement for (like ), use weak induction. If it depends on earlier terms (like ), use strong induction.
5.6 Confusing Converse with Contrapositive
| Original | |
|---|---|
| Contrapositive (equivalent) | |
| Converse (NOT equivalent) | |
| Inverse (NOT equivalent) |
A true implication does NOT guarantee a true converse.
Example: "If a number is prime, then it is positive." True (for integers). Converse: "If a number is positive, then it is prime." False ( is positive but not prime).
5.7 Forgetting Vacuous Truth
The implication is true whenever is false, regardless of .
Example: "If , then the moon is made of cheese." This is TRUE (vacuously), because the premise "" is false.
Practical consequence: To disprove , you must show is true AND is false. Showing is false does NOT disprove the implication.
5.8 Incorrect Quantifier Negation
| Statement | Correct Negation |
|---|---|
The order of quantifiers matters. "For every person, there exists a mother" is very different from "There exists a person who is the mother of everyone." The negation of "for every x there exists y" is "there exists x such that for every y" — quantifiers flip but their order is preserved.
6. Proof Techniques Summary
| Method | When to Use | Key Idea |
|---|---|---|
| Direct | Straightforward chain from P to Q | Assume P, derive Q |
| Contradiction | Statement is a negation, or no obvious direct path | Assume not-P, find contradiction |
| Contrapositive | Not-Q gives more to work with than P | Prove not-Q implies not-P |
| Induction (weak) | Statement depends on previous case | Base case + inductive step |
| Induction (strong) | Statement depends on multiple previous cases | Base cases + strong inductive step |
| Exhaustion | Finite, small number of cases | Check each case |
| Counterexample | Disproving a universal claim | Find one exception |
Comprehensive Exercise Set
-
Prove that is irrational.
-
Prove that the product of any three consecutive integers is divisible by 6.
-
Prove by induction that for all .
-
Prove that if is divisible by 3, then is divisible by 3.
-
Disprove: "For all real numbers , ."
-
Negate: "For every real number , there exists a real number such that ."
-
Prove that there is no largest prime number.
-
Prove that is irrational.
-
Find using the Euclidean algorithm, and express it as a linear combination.
-
Prove that if and , then .
Answers to Selected Exercises
Exercise 1: Assume in lowest terms. Then , so is even (divisible by 2), hence is even. Write . Then , so . This means is even, so is even, so is even. Both and are even, contradicting lowest terms.
Exercise 2: Among any three consecutive integers : one is divisible by 3 (since one of is a multiple of 3), and at least one is even (among any two consecutive integers, one is even, and we have three). Since 2 and 3 are coprime, the product is divisible by .
Exercise 4: By contrapositive. If , then or . If , then . If , then . In either case , so .
Exercise 5: Counterexample: . Then . Also : .
Exercise 6: .
Exercise 10: means . Since and , by transitivity of divisibility, . Therefore .
Diagnostic Test Ready to test your understanding of Proof and Logic? The diagnostic test contains the hardest questions within the IB specification for this topic, each with a full worked solution.
Unit tests probe edge cases and common misconceptions. Integration tests combine Proof and Logic with other IB mathematics topics to test synthesis under exam conditions.
See Diagnostic Guide for instructions on self-marking and building a personal test matrix.