Skip to content

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.

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 PP is denoted T(P)∈{T,F}\mathcal{T}(P) \in \{T, F\}.

There are five fundamental connectives. Let PP and QQ be propositions.

ConnectiveSymbolRead asMeaning
Negation¬P\neg P”not P”True when P is false
ConjunctionP∧QP \wedge Q”P and Q”True when both are true
DisjunctionP∨QP \vee Q”P or Q”True when at least one is true
ImplicationP  ⟹  QP \implies Q”P implies Q”False only when P true and Q false
BiconditionalP  ⟺  QP \iff Q”P if and only if Q”True when P and Q have same truth value

Negation:

PP¬P\neg P
TF
FT

Conjunction:

PPQQP∧QP \wedge Q
TTT
TFF
FTF
FFF

Disjunction (inclusive OR):

PPQQP∨QP \vee Q
TTT
TFT
FTT
FFF

Implication:

PPQQP  ⟹  QP \implies Q
TTT
TFF
FTT
FFT

The implication P  ⟹  QP \implies Q 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 PP is false, the implication is vacuously true, there is no counterexample to “whenever P holds, Q holds.”

Biconditional:

PPQQP  ⟺  QP \iff Q
TTT
TFF
FTF
FFT

Two compound propositions are logically equivalent (written ≡\equiv) if they have identical Truth values for every possible assignment of truth values to their component propositions.

Key equivalences (Laws of Logic):

  1. Commutative: P∧Q≡Q∧PP \wedge Q \equiv Q \wedge P And P∨Q≡Q∨PP \vee Q \equiv Q \vee P
  2. Associative: (P∧Q)∧R≡P∧(Q∧R)(P \wedge Q) \wedge R \equiv P \wedge (Q \wedge R) And similarly for ∨\vee
  3. Distributive: P∧(Q∨R)≡(P∧Q)∨(P∧R)P \wedge (Q \vee R) \equiv (P \wedge Q) \vee (P \wedge R) And P∨(Q∧R)≡(P∨Q)∧(P∨R)P \vee (Q \wedge R) \equiv (P \vee Q) \wedge (P \vee R)
  4. Identity: P∧T≡PP \wedge T \equiv P And P∨F≡PP \vee F \equiv P
  5. Domination: P∨T≡TP \vee T \equiv T And P∧F≡FP \wedge F \equiv F
  6. Idempotent: P∧P≡PP \wedge P \equiv P And P∨P≡PP \vee P \equiv P
  7. Double Negation: ¬(¬P)≡P\neg(\neg P) \equiv P
  8. Absorption: P∨(P∧Q)≡PP \vee (P \wedge Q) \equiv P And P∧(P∨Q)≡PP \wedge (P \vee Q) \equiv P

These are essential for negating compound statements.

¬(P∧Q)≡¬P∨¬Q\neg(P \wedge Q) \equiv \neg P \vee \neg Q ¬(P∨Q)≡¬P∧¬Q\neg(P \vee Q) \equiv \neg P \wedge \neg Q

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 ff is continuous and differentiable.”

Let CC: ”ff is continuous.” Let DD: ”ff is differentiable.” The statement is C∧DC \wedge D. Its negation is ¬C∨¬D\neg C \vee \neg D I.e., ”ff is either not continuous or not differentiable.”

For any implication P  ⟹  QP \implies Q The contrapositive is ¬Q  ⟹  ¬P\neg Q \implies \neg P.

Theorem: An implication and its contrapositive are logically equivalent.

P  ⟹  Q≡¬Q  ⟹  ¬PP \implies Q \equiv \neg Q \implies \neg P

This is proved by comparing truth tables. Both are false only when PP is true and QQ is false.

Compare with two other related statements that are NOT equivalent:

  • The converse of P  ⟹  QP \implies Q is Q  ⟹  PQ \implies P (not equivalent )
  • The inverse of P  ⟹  QP \implies Q is ¬P  ⟹  ¬Q\neg P \implies \neg Q (not equivalent , but equivalent to the converse)

Danger: Danger Implication. Never confuse the contrapositive with the converse. Worked Example:

Statement: “If nn is even, then n2n^2 is even.”

Contrapositive: “If n2n^2 is odd, then nn is odd.”

Converse: “If n2n^2 is even, then nn is even.” (True in this case, but not logically guaranteed.)

Inverse: “If nn is odd, then n2n^2 is odd.” (Also true here, but again not guaranteed.)

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: P∨¬PP \vee \neg P (Law of Excluded Middle)

Important contradiction: P∧¬PP \wedge \neg P

Another key tautology, Modus Ponens: ((P  ⟹  Q)∧P)  ⟹  Q((P \implies Q) \wedge P) \implies Q

This says: if you know P  ⟹  QP \implies Q and you know PP Then you can conclude QQ. This is the fundamental rule of direct …/1-number-and-algebra/3_proof-and-logic.

Modus Tollens: ((P  ⟹  Q)∧¬Q)  ⟹  ¬P((P \implies Q) \wedge \neg Q) \implies \neg P

This says: if you know P  ⟹  QP \implies Q and you know ¬Q\neg Q Then you can conclude ¬P\neg P. This is the fundamental rule of …/1-number-and-algebra/3_proof-and-logic by contrapositive.

Quantifiers let us express statements about collections of objects.

Universal quantifier (∀\forall): “For all”, the statement must hold for every element in the Domain.

∀x∈S,  P(x)\forall x \in S, \; P(x)

Existential quantifier (∃\exists): “There exists”, the statement must hold for at least one Element.

∃x∈S,  P(x)\exists x \in S, \; P(x)

Negating quantified statements:

¬(∀x,  P(x))≡∃x,  ¬P(x)\neg(\forall x, \; P(x)) \equiv \exists x, \; \neg P(x) ¬(∃x,  P(x))≡∀x,  ¬P(x)\neg(\exists x, \; P(x)) \equiv \forall x, \; \neg P(x)

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:

∀x ∃y,  P(x,y)isNOTequivalentto∃y ∀x,  P(x,y)\forall x \, \exists y, \; P(x,y) \quad \mathrm{is NOT equivalent to} \quad \exists y \, \forall x, \; P(x,y)

Worked Example, Negating a nested quantifier statement:

Negate: “For every positive real number ε\varepsilon There exists a positive real number δ\delta such that…”

¬(∀ε>0,  ∃δ>0,  P(ε,δ))≡∃ε>0,  ∀δ>0,  ¬P(ε,δ)\neg\left(\forall \varepsilon \gt 0, \; \exists \delta \gt 0, \; P(\varepsilon, \delta)\right) \equiv \exists \varepsilon \gt 0, \; \forall \delta \gt 0, \; \neg P(\varepsilon, \delta)

The existential becomes universal and the universal becomes existential. This is the logical Backbone of epsilon-delta definitions in analysis.

Worked Example: Negate $\forall n \in \mathbb{Z}^+, \; \exists p \mathrm{ prime}, \; p \gt n$

Step 1: Identify the structure, it is ∀n,  ∃p,  P(n,p)\forall n, \; \exists p, \; P(n,p) where P(n,p)P(n,p) is ”pp is prime and p>np \gt n.”

Step 2: Negate, ∃n∈Z+,  ∀pprime,  ¬(p>n)\exists n \in \mathbb{Z}^+, \; \forall p \mathrm{ prime}, \; \neg(p \gt n)

Step 3: Simplify, ∃n∈Z+,  ∀pprime,  p≤n\exists n \in \mathbb{Z}^+, \; \forall p \mathrm{ prime}, \; p \le n

Reading: “There exists a positive integer nn such that every prime pp satisfies p≤np \le n.” This is false (there are infinitely many primes), so the original statement is true.


Strategy: To prove P  ⟹  QP \implies Q Assume PP is true and use logical deduction to arrive at QQ.

This is the most straightforward method. You chain together known results, definitions, and algebraic manipulations.

Template:

  1. Assume PP.
  2. [Logical steps…]
  3. Therefore QQ.
  4. Hence P  ⟹  QP \implies Q.

Worked Example, If nn is odd, then n2n^2 is odd:

Assume nn is odd. By definition, n=2k+1n = 2k + 1 for some k∈Zk \in \mathbb{Z}.

n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1

Since 2k2+2k2k^2 + 2k is an integer (sum and product of integers), let m=2k2+2k∈Zm = 2k^2 + 2k \in \mathbb{Z}. Then n2=2m+1n^2 = 2m + 1 Which is odd by definition.

Therefore, if nn is odd, then n2n^2 is odd.

Worked Example, The sum of two even numbers is even:

Let a=2ma = 2m and b=2nb = 2n for some m,n∈Zm, n \in \mathbb{Z}.

a+b=2m+2n=2(m+n)a + b = 2m + 2n = 2(m + n)

Since m+n∈Zm + n \in \mathbb{Z} We have a+b=2(m+n)a + b = 2(m+n) is even.

Exercise: Prove that the product of two odd numbers is odd.

Let a=2m+1a = 2m + 1 and b=2n+1b = 2n + 1 for some m,n∈Zm, n \in \mathbb{Z}.

a⋅b=(2m+1)(2n+1)=4mn+2m+2n+1=2(2mn+m+n)+1a \cdot b = (2m+1)(2n+1) = 4mn + 2m + 2n + 1 = 2(2mn + m + n) + 1

Since 2mn+m+n∈Z2mn + m + n \in \mathbb{Z} The product is of the form 2k+12k + 1 Hence odd.

Strategy: To prove a statement PP Assume ¬P\neg P and derive a logical contradiction (something that is always false, like 1=01 = 0 or 0<00 \lt 0).

Template:

  1. Assume ¬P\neg P (the negation of what you want to prove).
  2. [Logical steps leading to a contradiction…]
  3. This contradicts [known fact].
  4. Therefore ¬P\neg P is false, so PP 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…”).

Worked Example, 2\sqrt{2} is irrational:

Assume 2\sqrt{2} is rational. Then 2=ab\sqrt{2} = \frac{a}{b} where a,b∈Z+a, b \in \mathbb{Z}^+ gcd⁡(a,b)=1\gcd(a, b) = 1 (the fraction is in lowest terms).

Squaring both sides: 2=a2b22 = \frac{a^2}{b^2} So a2=2b2a^2 = 2b^2.

Since a2=2b2a^2 = 2b^2 We have a2a^2 is even. Therefore aa is even (by the lemma: if a2a^2 is even, Then aa is even, proved below).

Write a=2ka = 2k for some k∈Z+k \in \mathbb{Z}^+. Substituting:

(2k)2=2b2(2k)^2 = 2b^2 So 4k2=2b24k^2 = 2b^2 So b2=2k2b^2 = 2k^2.

Therefore b2b^2 is even, so bb is even.

But now both aa and bb are even, contradicting gcd⁡(a,b)=1\gcd(a, b) = 1.

Therefore our assumption is false, and 2\sqrt{2} is irrational.

Exercise: Prove that $\sqrt{3}$ is irrational.

Assume 3=ab\sqrt{3} = \frac{a}{b} in lowest terms. Then a2=3b2a^2 = 3b^2 So a2a^2 is divisible by 3. By The lemma (if 3∣a23 \mid a^2 Then 3∣a3 \mid a), write a=3ka = 3k. Then 9k2=3b29k^2 = 3b^2 So b2=3k2b^2 = 3k^2 Hence 3∣b23 \mid b^2 So 3∣b3 \mid b. Both aa and bb are divisible by 3, contradicting lowest terms.

The supporting lemma “if p∣a2p \mid a^2 for prime pp Then p∣ap \mid a” follows from the Fundamental Theorem of Arithmetic: if pp appears in the prime factorization of a2a^2 It must appear in the factorization of aa.

Strategy: To prove P  ⟹  QP \implies Q Instead prove ¬Q  ⟹  ¬P\neg Q \implies \neg P. Since an implication Is logically equivalent to its contrapositive, this proves the original statement.

When to use this: When the hypothesis PP feels “too big” or “too loose” to work with directly, But the negation of the conclusion ¬Q\neg Q gives you something concrete to grab.

Template:

  1. We prove the contrapositive: if ¬Q\neg Q Then ¬P\neg P.
  2. Assume ¬Q\neg Q.
  3. [Logical steps…]
  4. Therefore ¬P\neg P.
  5. Hence P  ⟹  QP \implies Q.

Worked Example, If n2n^2 is even, then nn is even:

We prove the contrapositive: if nn is odd, then n2n^2 is odd.

Assume nn is odd. Then n=2k+1n = 2k + 1 for some k∈Zk \in \mathbb{Z}.

n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1

This is odd. Therefore, if nn is odd, n2n^2 is odd. By contrapositive, if n2n^2 is even, then nn is even.

Exercise: Prove that if $3n + 2$ is odd, then $n$ is odd (by contrapositive).

Contrapositive: If nn is even, then 3n+23n + 2 is even.

Assume nn is even, so n=2kn = 2k for some k∈Zk \in \mathbb{Z}.

3n+2=3(2k)+2=6k+2=2(3k+1)3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1)

Since 3k+1∈Z3k + 1 \in \mathbb{Z}, 3n+23n + 2 is even. By contrapositive, if 3n+23n + 2 is odd, then nn is odd.

Induction proves statements of the form ∀n≥n0,  P(n)\forall n \ge n_0, \; P(n) Where n0∈Zn_0 \in \mathbb{Z}.

Template:

  1. Base case: Verify P(n0)P(n_0) is true.
  2. Inductive hypothesis: Assume P(k)P(k) is true for some arbitrary k≥n0k \ge n_0.
  3. Inductive step: Using the hypothesis that P(k)P(k) holds, prove that P(k+1)P(k+1) holds.
  4. Conclusion: By the Principle of Mathematical Induction, P(n)P(n) is true for all n≥n0n \ge n_0.

Worked Example, Sum formula 1+2+⋯+n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2}:

Let P(n)P(n): 1+2+⋯+n=n(n+1)21 + 2 + \cdots + n = \frac{n(n+1)}{2}.

Base case (n=1n = 1): LHS =1= 1 RHS =1⋅22=1= \frac{1 \cdot 2}{2} = 1. So P(1)P(1) is true.

Inductive hypothesis: Assume P(k)P(k) is true for some k≥1k \ge 1 I.e., 1+2+⋯+k=k(k+1)21 + 2 + \cdots + k = \frac{k(k+1)}{2}.

Inductive step: We must show P(k+1)P(k+1): 1+2+⋯+k+(k+1)=(k+1)(k+2)21 + 2 + \cdots + k + (k+1) = \frac{(k+1)(k+2)}{2}.

Starting from the LHS:

1+2+⋯+k+(k+1)=k(k+1)2+(k+1)1 + 2 + \cdots + k + (k+1) = \frac{k(k+1)}{2} + (k+1)

(by the inductive hypothesis)

=k(k+1)+2(k+1)2=(k+1)(k+2)2= \frac{k(k+1) + 2(k+1)}{2} = \frac{(k+1)(k + 2)}{2}

This is exactly the RHS of P(k+1)P(k+1). Therefore P(k+1)P(k+1) holds.

Conclusion: By induction, P(n)P(n) is true for all n≥1n \ge 1.

Worked Example, Sum of squares 12+22+⋯+n2=n(n+1)(2n+1)61^2 + 2^2 + \cdots + n^2 = \frac{n(n+1)(2n+1)}{6}:

Let P(n)P(n): ∑i=1ni2=n(n+1)(2n+1)6\displaystyle\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6}.

Base case (n=1n = 1): LHS =1= 1 RHS =1⋅2⋅36=1= \frac{1 \cdot 2 \cdot 3}{6} = 1. True.

Inductive hypothesis: Assume P(k)P(k) holds for some k≥1k \ge 1.

Inductive step:

∑i=1k+1i2=∑i=1ki2+(k+1)2=k(k+1)(2k+1)6+(k+1)2\sum_{i=1}^{k+1} i^2 = \sum_{i=1}^{k} i^2 + (k+1)^2 = \frac{k(k+1)(2k+1)}{6} + (k+1)^2 =k(k+1)(2k+1)+6(k+1)26= \frac{k(k+1)(2k+1) + 6(k+1)^2}{6} =(k+1)[k(2k+1)+6(k+1)]6= \frac{(k+1)[k(2k+1) + 6(k+1)]}{6} =(k+1)[2k2+k+6k+6]6= \frac{(k+1)[2k^2 + k + 6k + 6]}{6} =(k+1)(2k2+7k+6)6= \frac{(k+1)(2k^2 + 7k + 6)}{6} =(k+1)(k+2)(2k+3)6= \frac{(k+1)(k+2)(2k+3)}{6} =(k+1)((k+1)+1)(2(k+1)+1)6= \frac{(k+1)((k+1)+1)(2(k+1)+1)}{6}

This is P(k+1)P(k+1). By induction, the formula holds for all n≥1n \ge 1.

Exercise: Prove by induction that $1 + 3 + 5 + \cdots + (2n-1) = n^2$ for all $n \ge 1$.

Let P(n)P(n): ∑i=1n(2i−1)=n2\displaystyle\sum_{i=1}^{n} (2i - 1) = n^2.

Base case (n=1n = 1): LHS =1= 1 RHS =1= 1. True.

Inductive hypothesis: Assume P(k)P(k): 1+3+⋯+(2k−1)=k21 + 3 + \cdots + (2k-1) = k^2.

Inductive step: 1+3+⋯+(2k−1)+(2(k+1)−1)=k2+(2k+1)=k2+2k+1=(k+1)21 + 3 + \cdots + (2k-1) + (2(k+1)-1) = k^2 + (2k + 1) = k^2 + 2k + 1 = (k+1)^2.

By induction, P(n)P(n) holds for all n≥1n \ge 1.

Exercise: Prove by induction that $2^n \gt n$ for all $n \ge 1$.

Let P(n)P(n): 2n>n2^n \gt n.

Base case (n=1n = 1): 21=2>12^1 = 2 \gt 1. True.

Inductive hypothesis: Assume 2k>k2^k \gt k for some k≥1k \ge 1.

Inductive step: 2k+1=2⋅2k>2k2^{k+1} = 2 \cdot 2^k \gt 2k (by IH, since 2k>k2^k \gt k and multiplying by 2).

Now, 2k=k+k≥k+12k = k + k \ge k + 1 for k≥1k \ge 1. Therefore 2k+1>k+12^{k+1} \gt k + 1.

By induction, P(n)P(n) holds for all n≥1n \ge 1.

In strong induction, the inductive hypothesis assumes P(n0),P(n0+1),…,P(k)P(n_0), P(n_0+1), \ldots, P(k) are ALL true, Not just P(k)P(k).

Template:

  1. Base case(s): Verify P(n0)P(n_0) (and possibly more base cases).
  2. Inductive hypothesis: Assume P(j)P(j) is true for all n0≤j≤kn_0 \le j \le k.
  3. Inductive step: Using that P(j)P(j) holds for all j≤kj \le k Prove P(k+1)P(k+1).
  4. Conclusion: By the Principle of Strong Induction, P(n)P(n) is true for all n≥n0n \ge n_0.

When to use strong induction: When proving P(k+1)P(k+1) requires not just P(k)P(k) but some earlier Case P(j)P(j) where j<kj \lt k.

Worked Example, Every integer n≥2n \ge 2 is a product of primes:

Let P(n)P(n): ”nn is a product of primes (possibly a single prime).”

Base case (n=2n = 2): 2 is prime, hence a product of primes. True.

Strong inductive hypothesis: Assume P(j)P(j) is true for all 2≤j≤k2 \le j \le k.

Inductive step for n=k+1n = k + 1:

Case 1: k+1k+1 is prime. Then it is a product of primes.

Case 2: k+1k+1 is composite. Then k+1=abk+1 = ab where 2≤a≤b≤k2 \le a \le b \le k. By the strong inductive Hypothesis, both aa and bb are products of primes. Therefore k+1=abk+1 = ab is a product of primes.

In either case, P(k+1)P(k+1) holds. By strong induction, every integer n≥2n \ge 2 is a product of primes.

Exercise: Prove that every amount of postage $\ge 4$ cents can be formed using 4-cent and 5-cent stamps.

Let P(n)P(n): “Postage of nn cents can be formed using 4-cent and 5-cent stamps.”

Base cases: P(4)P(4): one 4-cent stamp. P(5)P(5): one 5-cent stamp. P(6)P(6): cannot, wait, this needs Checking. P(7)P(7): cannot either. Let me reconsider.

Actually, we need P(8)P(8): two 4-cent stamps. P(9)P(9): one 4-cent + one 5-cent. P(10)P(10): two 5-cent Stamps. P(11)P(11): … Hmm, P(12)P(12): three 4-cent stamps. P(13)P(13): two 4-cent + one 5-cent. P(14)P(14): One 4-cent + two 5-cent. P(15)P(15): three 5-cent stamps.

Let us use base cases P(12)P(12), P(13)P(13), P(14)P(14), P(15)P(15). Strong inductive hypothesis: assume P(j)P(j) for all 12≤j≤k12 \le j \le k Where k≥15k \ge 15.

For P(k+1)P(k+1): note that (k+1)−4=k−3≥12(k+1) - 4 = k - 3 \ge 12 (since k≥15k \ge 15). By strong IH, P(k−3)P(k-3) holds, Meaning we can form (k−3)(k-3) cents. Adding one 4-cent stamp gives (k−3)+4=k+1(k-3) + 4 = k+1 cents.

By strong induction, P(n)P(n) holds for all n≥12n \ge 12. But we should verify the smaller cases: P(4)P(4) through P(11)P(11). We find P(4)P(4), P(5)P(5), P(8)P(8), P(9)$$P(10) hold, but P(6)$$P(7)$$P(11) Do not. So the correct statement is: all postage n≥8n \ge 8 except n=11n = 11. Or: all n≥12n \ge 12.

The cleanest formulation: all n≥12n \ge 12 can be formed. Base cases P(12)P(12) through P(15)P(15). Inductive step as above.

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 n2+n+17n^2 + n + 17 is prime for n=0,1,2,3,4n = 0, 1, 2, 3, 4:

n=0n = 0: 0+0+17=170 + 0 + 17 = 17 (prime) n=1n = 1: 1+1+17=191 + 1 + 17 = 19 (prime) n=2n = 2: 4+2+17=234 + 2 + 17 = 23 (prime) n=3n = 3: 9+3+17=299 + 3 + 17 = 29 (prime) n=4n = 4: 16+4+17=3716 + 4 + 17 = 37 (prime)

All five cases verified. (Note: this polynomial produces primes for n=0n = 0 through n=15n = 15 But fails at n=16n = 16 since 162+16+17=289=17216^2 + 16 + 17 = 289 = 17^2.)

A single counterexample is sufficient to disprove a universal statement.

Strategy: To disprove ∀x∈S,  P(x)\forall x \in S, \; P(x) Find one a∈Sa \in S such that P(a)P(a) is false.

Worked Example, Disprove: “All prime numbers are odd.”

Counterexample: 22 is prime and 22 is even.

Worked Example, Disprove: ”n2−n+41n^2 - n + 41 is prime for all n∈Nn \in \mathbb{N}.”

When n=41n = 41: 412−41+41=412=168141^2 - 41 + 41 = 41^2 = 1681 Which is composite (41×4141 \times 41).

Exercise: Disprove: "For all positive integers $a$ and $b$$\gcd(a+b, a-b) = \gcd(a, b)$."

Take a = 3$$b = 1. Then gcd⁡(3+1,3−1)=gcd⁡(4,2)=2\gcd(3+1, 3-1) = \gcd(4, 2) = 2 But gcd⁡(3,1)=1\gcd(3, 1) = 1. Since 2≠12 \ne 1 The statement is false.


3.1 2\sqrt{2} is Irrational (Detailed)

Section titled “3.1 2\sqrt{2}2​ is Irrational (Detailed)”

This …/1-number-and-algebra/3_proof-and-logic appeared in Section 2.2. Here we present it with full commentary on every logical step.

Theorem: 2∉Q\sqrt{2} \notin \mathbb{Q}.

Proof:

We proceed by contradiction.

Assume 2∈Q\sqrt{2} \in \mathbb{Q}. Then there exist coprime integers a,ba, b with b>0b \gt 0 such that 2=ab\sqrt{2} = \frac{a}{b}.

The requirement that gcd⁡(a,b)=1\gcd(a, b) = 1 is without loss of generality: any rational number can be expressed as a fraction in lowest terms.

Squaring: 2=a2b22 = \frac{a^2}{b^2} So a2=2b2a^2 = 2b^2. Equation (1).

From (1): a2a^2 is divisible by 2, so a2a^2 is even. By the contrapositive of “odd implies square is odd,” aa is even.

Since aa is even, write a=2ma = 2m for some integer mm. Substituting into (1):

(2m)2=2b2(2m)^2 = 2b^2 I.e., 4m2=2b24m^2 = 2b^2 I.e., b2=2m2b^2 = 2m^2. Equation (2).

From (2): b2b^2 is even, so bb is even (same reasoning as above).

But now aa and bb are both even, meaning gcd⁡(a,b)≥2\gcd(a, b) \ge 2 Contradicting gcd⁡(a,b)=1\gcd(a, b) = 1.

This contradiction shows our assumption is false. Hence 2∉Q\sqrt{2} \notin \mathbb{Q}. ■\blacksquare

Theorem (Euclid): The set of prime numbers is infinite.

Proof:

We proceed by contradiction.

Assume there are only finitely many primes: p1,p2,…,pnp_1, p_2, \ldots, p_n.

Consider the number N=p1p2⋯pn+1N = p_1 p_2 \cdots p_n + 1.

Since N>1N \gt 1 By the Fundamental Theorem of Arithmetic, NN has a prime factor pp.

This prime pp must be one of p1,p2,…,pnp_1, p_2, \ldots, p_n (since we assumed these are all the primes).

But N=p1p2⋯pn+1N = p_1 p_2 \cdots p_n + 1 And for each pip_i:

N≡0+1≡1(modpi)N \equiv 0 + 1 \equiv 1 \pmod{p_i}

So pi∤Np_i \nmid N for all ii. This contradicts that some pip_i divides NN.

Therefore, there are infinitely many primes. ■\blacksquare

3.3 log⁡23\log_2{3} is Irrational

Section titled “3.3 log⁡23\log_2{3}log2​3 is Irrational”

Theorem: log⁡23\log_2{3} is irrational.

Proof:

We proceed by contradiction. Assume log⁡23\log_2{3} is rational.

Then log⁡23=pq\log_2{3} = \frac{p}{q} for some coprime positive integers p,qp, q with q≥1q \ge 1.

This means 2p/q=32^{p/q} = 3 So 2p=3q2^p = 3^q.

Since p \ge 1$$2^p is a power of 2. Its only prime factor is 2.

Since q \ge 1$$3^q is a power of 3. Its only prime factor is 3.

By the Fundamental Theorem of Arithmetic, prime factorizations are unique. The number 2p=3q2^p = 3^q would need to have prime factorization consisting of only 2’s AND only 3’s simultaneously. This is impossible unless p=q=0p = q = 0 But p≥1p \ge 1.

Contradiction. Hence log⁡23\log_2{3} is irrational. ■\blacksquare

Exercise: Prove that $\log_3{5}$ is irrational.

Assume log⁡35=pq\log_3{5} = \frac{p}{q} in lowest terms, so 3p=5q3^p = 5^q. The LHS has only prime factor 3; The RHS has only prime factor 5. By uniqueness of prime factorization, this is impossible unless p=q=0p = q = 0 Contradicting p≥1p \ge 1. Hence log⁡35\log_3{5} is irrational.

We proved these by induction in Section 2.4. Here is the complete reference:

∑i=1ni=n(n+1)2\sum_{i=1}^{n} i = \frac{n(n+1)}{2} ∑i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^{n} i^2 = \frac{n(n+1)(2n+1)}{6} ∑i=1ni3=n2(n+1)24=(n(n+1)2)2\sum_{i=1}^{n} i^3 = \frac{n^2(n+1)^2}{4} = \left(\frac{n(n+1)}{2}\right)^2

The last identity is notable: the sum of cubes equals the square of the sum of the first nn Integers.

Exercise: Prove $\sum_{i=1}^{n} i^3 = \left(\frac{n(n+1)}{2}\right)^2$ by induction.

Let P(n)P(n): ∑i=1ni3=(n(n+1)2)2\displaystyle\sum_{i=1}^{n} i^3 = \left(\frac{n(n+1)}{2}\right)^2.

Base case (n=1n = 1): LHS =1= 1 RHS =(1⋅22)2=1= \left(\frac{1 \cdot 2}{2}\right)^2 = 1. True.

Inductive hypothesis: Assume P(k)P(k) holds.

Inductive step:

∑i=1k+1i3=(k(k+1)2)2+(k+1)3\sum_{i=1}^{k+1} i^3 = \left(\frac{k(k+1)}{2}\right)^2 + (k+1)^3 =k2(k+1)24+(k+1)3=(k+1)2(k24+(k+1))= \frac{k^2(k+1)^2}{4} + (k+1)^3 = (k+1)^2 \left(\frac{k^2}{4} + (k+1)\right) =(k+1)2⋅k2+4k+44=(k+1)2⋅(k+2)24= (k+1)^2 \cdot \frac{k^2 + 4k + 4}{4} = (k+1)^2 \cdot \frac{(k+2)^2}{4} =((k+1)(k+2)2)2= \left(\frac{(k+1)(k+2)}{2}\right)^2

This is P(k+1)P(k+1). By induction, P(n)P(n) holds for all n≥1n \ge 1.

Theorem: If n2n^2 is even, then nn is even.

We proved this by contrapositive in Section 2.3. Here are additional divisibility results.

Theorem: If a∣ba \mid b and b∣cb \mid c Then a∣ca \mid c (transitivity of divisibility).

Proof:

Since a∣ba \mid b There exists m∈Zm \in \mathbb{Z} such that b=amb = am. Since b∣cb \mid c There exists n∈Zn \in \mathbb{Z} such that c=bnc = bn.

Therefore c=bn=(am)n=a(mn)c = bn = (am)n = a(mn).

Since mn∈Zmn \in \mathbb{Z} We have a∣ca \mid c. ■\blacksquare

Theorem: If d∣ad \mid a and d∣bd \mid b Then d∣(ax+by)d \mid (ax + by) for all x,y∈Zx, y \in \mathbb{Z}.

Proof:

Since d∣ad \mid a Write a=dma = dm for some m∈Zm \in \mathbb{Z}. Since d∣bd \mid b Write b=dnb = dn for Some n∈Zn \in \mathbb{Z}.

ax+by=(dm)x+(dn)y=d(mx+ny)ax + by = (dm)x + (dn)y = d(mx + ny).

Since mx + ny \in \mathbb{Z}$$d \mid (ax + by). ■\blacksquare

AM-GM Inequality (two variables): For a,b≥0a, b \ge 0:

a+b2≥ab\frac{a + b}{2} \ge \sqrt{ab}

With equality if and only if a=ba = b.

Proof:

Note that (a−b)2≥0(\sqrt{a} - \sqrt{b})^2 \ge 0 for all a,b≥0a, b \ge 0.

Expanding: a−2ab+b≥0a - 2\sqrt{ab} + b \ge 0 So a+b≥2aba + b \ge 2\sqrt{ab}.

Dividing by 2: a+b2≥ab\frac{a+b}{2} \ge \sqrt{ab}. Equality holds when a=b\sqrt{a} = \sqrt{b} I.e., a=ba = b. ■\blacksquare

Cauchy-Schwarz Inequality (statement): For real numbers a1,…,ana_1, \ldots, a_n and b1,…,bnb_1, \ldots, b_n:

(∑i=1naibi)2≤(∑i=1nai2)(∑i=1nbi2)\left(\sum_{i=1}^{n} a_i b_i\right)^2 \le \left(\sum_{i=1}^{n} a_i^2\right) \left(\sum_{i=1}^{n} b_i^2\right)

With equality when the vectors are proportional (ai=λbia_i = \lambda b_i for all ii and some scalar λ\lambda).

The …/1-number-and-algebra/3_proof-and-logic is beyond the scope of this note but uses the fact that ∑(aix+bi)2≥0\sum (a_i x + b_i)^2 \ge 0 for All x∈Rx \in \mathbb{R} And a quadratic in xx that is always non-negative must have a non-positive Discriminant.

Exercise: Prove the AM-GM inequality for three variables: $\frac{a+b+c}{3} \ge \sqrt[3]{abc}$ for $a, b, c \ge 0$.

Apply two-variable AM-GM twice. First, a+b2≥ab\frac{a+b}{2} \ge \sqrt{ab}. Let m=a+b2m = \frac{a+b}{2}. Then:

m+c2≥mc≥ab⋅c=(abc)1/4\frac{m + c}{2} \ge \sqrt{mc} \ge \sqrt{\sqrt{ab} \cdot c} = (abc)^{1/4}

Wait, that gives us a+b2+c2≥(abc)1/4\frac{\frac{a+b}{2} + c}{2} \ge (abc)^{1/4} I.e., a+b+2c4≥(abc)1/4\frac{a+b+2c}{4} \ge (abc)^{1/4}.

That is not quite right for three-variable AM-GM. A cleaner approach: let a=x3a = x^3, b=y3b = y^3 c=z3c = z^3 with x,y,z≥0x, y, z \ge 0. We need x3+y3+z33≥xyz\frac{x^3 + y^3 + z^3}{3} \ge xyz.

Consider x3+y3+z3−3xyz=12(x+y+z)[(x−y)2+(y−z)2+(z−x)2]≥0x^3 + y^3 + z^3 - 3xyz = \frac{1}{2}(x+y+z)[(x-y)^2 + (y-z)^2 + (z-x)^2] \ge 0.

Since x+y+z≥0x+y+z \ge 0 and squares are non-negative, x3+y3+z3≥3xyzx^3 + y^3 + z^3 \ge 3xyz. Dividing by 3 and substituting back gives the result.


For integers a,b,ca, b, c with a≠0a \ne 0:

Definition: a∣ba \mid b (read ”aa divides bb”) means there exists k∈Zk \in \mathbb{Z} such that b=akb = ak.

Key properties:

  1. a∣0a \mid 0 for all a≠0a \ne 0 (since 0=a⋅00 = a \cdot 0)
  2. 1∣b1 \mid b for all bb (since b=1⋅bb = 1 \cdot b)
  3. If a∣ba \mid b and b∣ab \mid a Then a=±ba = \pm b
  4. If a∣ba \mid b and a∣ca \mid c Then a∣(b+c)a \mid (b + c) and a∣(b−c)a \mid (b - c)

Proof of property 3:

a∣ba \mid b implies b=mab = ma for some m∈Zm \in \mathbb{Z}. b∣ab \mid a implies a=nba = nb for some n∈Zn \in \mathbb{Z}.

Substituting: a=n(ma)=(nm)aa = n(ma) = (nm)a So (nm−1)a=0(nm - 1)a = 0. Since a≠0a \ne 0 We have nm=1nm = 1.

In integers, nm=1nm = 1 implies (n,m)=(1,1)(n, m) = (1, 1) or (n,m)=(−1,−1)(n, m) = (-1, -1).

If m=1m = 1: b=ab = a. If m=−1m = -1: b=−ab = -a. So a=±ba = \pm b. ■\blacksquare

Definition: a≡b(modn)a \equiv b \pmod{n} means n∣(a−b)n \mid (a - b) I.e., a−b=kna - b = kn for some k∈Zk \in \mathbb{Z}.

Key properties of congruences:

If a≡b(modn)a \equiv b \pmod{n} and c≡d(modn)c \equiv d \pmod{n} Then:

  1. a+c≡b+d(modn)a + c \equiv b + d \pmod{n}
  2. a−c≡b−d(modn)a - c \equiv b - d \pmod{n}
  3. ac≡bd(modn)ac \equiv bd \pmod{n}
  4. am≡bm(modn)a^m \equiv b^m \pmod{n} for any m∈Z+m \in \mathbb{Z}^+

Proof of property 1:

a≡b(modn)a \equiv b \pmod{n} means a−b=kna - b = kn. c≡d(modn)c \equiv d \pmod{n} means c−d=lnc - d = ln.

(a+c)−(b+d)=(a−b)+(c−d)=kn+ln=(k+l)n(a+c) - (b+d) = (a-b) + (c-d) = kn + ln = (k+l)n.

Therefore n∣[(a+c)−(b+d)]n \mid [(a+c) - (b+d)] So a+c≡b+d(modn)a+c \equiv b+d \pmod{n}. ■\blacksquare

Proof of property 3:

a=b+kna = b + kn and c=d+lnc = d + ln for some k,l∈Zk, l \in \mathbb{Z}.

ac=(b+kn)(d+ln)=bd+bln+dkn+kln2=bd+n(bl+dk+kln)ac = (b + kn)(d + ln) = bd + bln + dkn + kln^2 = bd + n(bl + dk + kln).

Therefore n∣(ac−bd)n \mid (ac - bd) So ac≡bd(modn)ac \equiv bd \pmod{n}. ■\blacksquare

Worked Example: Find the last two digits of $7^{100}$.

We need 7100(mod100)7^{100} \pmod{100}.

First, find 7100(mod4)7^{100} \pmod{4}: 7≡3≡−1(mod4)7 \equiv 3 \equiv -1 \pmod{4} So 7100≡(−1)100=1(mod4)7^{100} \equiv (-1)^{100} = 1 \pmod{4}.

Next, find 7100(mod25)7^{100} \pmod{25}: By Euler’s theorem (or Fermat’s Little Theorem since 25 is a prime Power and gcd⁡(7,25)=1\gcd(7, 25) = 1), ϕ(25)=20\phi(25) = 20 So 720≡1(mod25)7^{20} \equiv 1 \pmod{25} Hence 7100=(720)5≡15=1(mod25)7^{100} = (7^{20})^5 \equiv 1^5 = 1 \pmod{25}.

We need xx such that x≡1(mod4)x \equiv 1 \pmod{4} and x≡1(mod25)x \equiv 1 \pmod{25}. By CRT, x≡1(mod100)x \equiv 1 \pmod{100}.

The last two digits are 01.

Theorem (Fermat’s Little Theorem): If pp is prime and gcd⁡(a,p)=1\gcd(a, p) = 1 Then:

ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}

Equivalently, for any integer aa and prime pp: ap≡a(modp)a^p \equiv a \pmod{p}.

Proof sketch (using the fact that {a,2a,3a,…,(p−1)a}\{a, 2a, 3a, \ldots, (p-1)a\} is a permutation of {1,2,…,p−1}\{1, 2, \ldots, p-1\} modulo pp):

Consider the product 1⋅2⋅3⋯(p−1)=(p−1)!1 \cdot 2 \cdot 3 \cdots (p-1) = (p-1)!.

Modulo pp The numbers a,2a,3a,…,(p−1)aa, 2a, 3a, \ldots, (p-1)a are all nonzero and pairwise non-congruent Modulo pp (since ja≡ka(modp)ja \equiv ka \pmod{p} implies p∣(j−k)ap \mid (j-k)a And since p∤ap \nmid a We get p∣(j−k)p \mid (j-k) Which means j≡k(modp)j \equiv k \pmod{p} And since 1≤j,k≤p−11 \le j, k \le p-1 We get j=kj = k).

Therefore {a,2a,…,(p−1)a}\{a, 2a, \ldots, (p-1)a\} is a complete residue system modulo pp excluding 0, so:

a⋅2a⋅3a⋯(p−1)a≡(p−1)!(modp)a \cdot 2a \cdot 3a \cdots (p-1)a \equiv (p-1)! \pmod{p} ap−1⋅(p−1)!≡(p−1)!(modp)a^{p-1} \cdot (p-1)! \equiv (p-1)! \pmod{p}

Since p∤(p−1)!p \nmid (p-1)! (Wilson’s theorem tells us (p−1)!≡−1(modp)(p-1)! \equiv -1 \pmod{p}), we can divide both sides by (p−1)!(p-1)! modulo pp:

ap−1≡1(modp)■a^{p-1} \equiv 1 \pmod{p} \quad \blacksquare

Worked Example, Find 2100(mod13)2^{100} \pmod{13}:

Since 13 is prime and gcd⁡(2,13)=1\gcd(2, 13) = 1 By Fermat: 212≡1(mod13)2^{12} \equiv 1 \pmod{13}.

100=8⋅12+4100 = 8 \cdot 12 + 4 So 2100=(212)8⋅24≡18⋅16≡16≡3(mod13)2^{100} = (2^{12})^8 \cdot 2^4 \equiv 1^8 \cdot 16 \equiv 16 \equiv 3 \pmod{13}.

Exercise: Find $3^{50} \pmod{11}$.

By Fermat: 310≡1(mod11)3^{10} \equiv 1 \pmod{11}.

50=5⋅1050 = 5 \cdot 10 So 350=(310)5≡15=1(mod11)3^{50} = (3^{10})^5 \equiv 1^5 = 1 \pmod{11}.

Answer: 350≡1(mod11)3^{50} \equiv 1 \pmod{11}.

Theorem: Every integer n≥2n \ge 2 can be expressed uniquely (up to order of factors) as a product Of primes:

n=p1a1⋅p2a2⋯pkakn = p_1^{a_1} \cdot p_2^{a_2} \cdots p_k^{a_k}

Where p1<p2<⋯<pkp_1 \lt p_2 \lt \cdots \lt p_k are primes and ai≥1a_i \ge 1.

Existence was proved in Section 2.4.2 using strong induction. Here we sketch uniqueness.

Uniqueness …/1-number-and-algebra/3_proof-and-logic (sketch):

Suppose nn has two prime factorizations:

n=p1p2⋯pr=q1q2⋯qsn = p_1 p_2 \cdots p_r = q_1 q_2 \cdots q_s

Where all pi,qjp_i, q_j are primes. Since p1∣n=q1q2⋯qsp_1 \mid n = q_1 q_2 \cdots q_s By Euclid’s lemma (p∣abp \mid ab and pp prime implies p∣ap \mid a or p∣bp \mid b), p1p_1 divides some qjq_j.

Since qjq_j is prime and p1p_1 is prime with p1∣qjp_1 \mid q_j We must have p1=qjp_1 = q_j. Cancel this factor and repeat. By induction, the factorizations are identical. ■\blacksquare

Definition: gcd⁡(a,b)\gcd(a, b) is the greatest common divisor of aa and bb, the largest positive Integer dividing both.

Definition: lcm(a,b)\mathrm{lcm}(a, b) is the least common multiple, the smallest positive integer That both aa and bb divide.

Key relationship:

gcd⁡(a,b)⋅lcm(a,b)=∣ab∣\gcd(a, b) \cdot \mathrm{lcm}(a, b) = |ab|

Proof (using prime factorizations):

Let a=∏piαia = \prod p_i^{\alpha_i} and b=∏piβib = \prod p_i^{\beta_i} (with αi,βi≥0\alpha_i, \beta_i \ge 0 Padding with zeros where needed).

gcd⁡(a,b)=∏pimin⁡(αi,βi)\gcd(a, b) = \prod p_i^{\min(\alpha_i, \beta_i)}

lcm(a,b)=∏pimax⁡(αi,βi)\mathrm{lcm}(a, b) = \prod p_i^{\max(\alpha_i, \beta_i)}

gcd⁡(a,b)⋅lcm(a,b)=∏pimin⁡(αi,βi)+max⁡(αi,βi)=∏piαi+βi=ab\gcd(a,b) \cdot \mathrm{lcm}(a,b) = \prod p_i^{\min(\alpha_i, \beta_i) + \max(\alpha_i, \beta_i)} = \prod p_i^{\alpha_i + \beta_i} = ab. ■\blacksquare

Bezout’s Identity: For integers a,ba, b (not both zero), there exist integers x,yx, y such that:

gcd⁡(a,b)=ax+by\gcd(a, b) = ax + by

This is proved constructively by the Euclidean algorithm (reversing the steps).

Theorem: The Euclidean algorithm correctly computes gcd⁡(a,b)\gcd(a, b).

Algorithm: For a≥b≥0a \ge b \ge 0:

a=bq1+r1,0≤r1<ba = bq_1 + r_1, \quad 0 \le r_1 \lt b b=r1q2+r2,0≤r2<r1b = r_1 q_2 + r_2, \quad 0 \le r_2 \lt r_1

r1=r2q3+r3,0≤r3<r2r_1 = r_2 q_3 + r_3, \quad 0 \le r_3 \lt r_2 ⋮\vdots

rn−2=rn−1qn+rn,0≤rn<rn−1r_{n-2} = r_{n-1} q_n + r_n, \quad 0 \le r_n \lt r_{n-1} rn−1=rnqn+1+0r_{n-1} = r_n q_{n+1} + 0

The algorithm terminates with gcd⁡(a,b)=rn\gcd(a, b) = r_n.

Proof of correctness:

Claim 1: The remainders form a strictly decreasing sequence of non-negative integers: b>r1>r2>⋯≥0b \gt r_1 \gt r_2 \gt \cdots \ge 0. 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: gcd⁡(a,b)=gcd⁡(b,r1)=gcd⁡(r1,r2)=⋯=gcd⁡(rn−1,rn)\gcd(a, b) = \gcd(b, r_1) = \gcd(r_1, r_2) = \cdots = \gcd(r_{n-1}, r_n). This Follows from the key lemma: gcd⁡(a,b)=gcd⁡(b,a−bq)\gcd(a, b) = \gcd(b, a - bq) for any integer qq.

Proof of the key lemma: if d∣ad \mid a and d∣bd \mid b Then d∣(a−bq)d \mid (a - bq). Conversely, if d∣bd \mid b and d∣(a−bq)d \mid (a - bq) Then d∣(a−bq+bq)=ad \mid (a - bq + bq) = a. So dd divides both aa and bb If and only if dd divides both bb and a−bqa - bq. Therefore gcd⁡(a,b)=gcd⁡(b,a−bq)\gcd(a, b) = \gcd(b, a - bq).

Claim 4: gcd⁡(rn−1,rn)=rn\gcd(r_{n-1}, r_n) = r_n. Since rn∣rn−1r_n \mid r_{n-1} (the last step is rn−1=rnqn+1r_{n-1} = r_n q_{n+1}), the GCD is rnr_n.

Combining claims: gcd⁡(a,b)=rn\gcd(a, b) = r_n. ■\blacksquare

Worked Example: Compute $\gcd(252, 105)$ and express it as a linear combination.

252=105⋅2+42252 = 105 \cdot 2 + 42 105=42⋅2+21105 = 42 \cdot 2 + 21 42=21⋅2+042 = 21 \cdot 2 + 0

So gcd⁡(252,105)=21\gcd(252, 105) = 21.

Back-substitution to find Bezout coefficients:

21=105−42⋅221 = 105 - 42 \cdot 2

42=252−105⋅242 = 252 - 105 \cdot 2

21=105−(252−105⋅2)⋅2=105−252⋅2+105⋅4=105⋅5−252⋅221 = 105 - (252 - 105 \cdot 2) \cdot 2 = 105 - 252 \cdot 2 + 105 \cdot 4 = 105 \cdot 5 - 252 \cdot 2

So gcd⁡(252,105)=21=5⋅105+(−2)⋅252\gcd(252, 105) = 21 = 5 \cdot 105 + (-2) \cdot 252.


Circular reasoning occurs when you implicitly assume what you are trying to prove.

Example of circular reasoning:

“Prove that 2\sqrt{2} is irrational.”

Bad …/1-number-and-algebra/3_proof-and-logic: “Since 2\sqrt{2} is irrational, it cannot be written as ab\frac{a}{b}. Therefore 2\sqrt{2} is irrational.”

The conclusion (2\sqrt{2} is irrational) appears in the hypothesis. This proves nothing.

How to avoid: Check that every step of your …/1-number-and-algebra/3_proof-and-logic relies only on axioms, definitions, and Previously established theorems, never on the statement you are proving.

Related to circular reasoning, this occurs when you “work backwards” from the conclusion without checking reversibility.

Example:

“Prove: If x2=4x^2 = 4 Then x=2x = 2.”

Bad …/1-number-and-algebra/3_proof-and-logic: x2=4x^2 = 4 So x=4=2x = \sqrt{4} = 2. Done.

This is wrong because x=−2x = -2 also satisfies x2=4x^2 = 4. The step x=4x = \sqrt{4} implicitly assumes x≥0x \ge 0.

The statement itself is false: x2=4x^2 = 4 does not imply x=2x = 2. The correct implication is x2=4  ⟹  x=2x^2 = 4 \implies x = 2 or x=−2x = -2.

The negation of P  ⟹  QP \implies Q is NOT P  ⟹  ¬QP \implies \neg Q.

¬(P  ⟹  Q)≡P∧¬Q\neg(P \implies Q) \equiv P \wedge \neg Q

Reasoning: P  ⟹  QP \implies Q is logically equivalent to ¬P∨Q\neg P \vee Q (check the truth table). So:

¬(P  ⟹  Q)≡¬(¬P∨Q)≡P∧¬Q\neg(P \implies Q) \equiv \neg(\neg P \vee Q) \equiv P \wedge \neg Q

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.)

The pitfall: Skipping the base case or proving the wrong base case.

Example:

“Prove: n=n+1n = n + 1 for all n≥1n \ge 1.”

Bad …/1-number-and-algebra/3_proof-and-logic: Assume k=k+1k = k + 1. Then k+1=(k+1)+1=k+2k + 1 = (k + 1) + 1 = k + 2. So k+1=k+2k + 1 = k + 2 I.e., k+1=(k+1)+1k + 1 = (k+1) + 1. QED.

This ”…/1-number-and-algebra/3_proof-and-logic” never checks the base case. The statement 1=1+1=21 = 1 + 1 = 2 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 P(k)P(k) and P(k−1)P(k-1) to P(k+1)P(k+1) requires both P(1)P(1) and P(2)P(2) as base cases.

Worked Example: Prove $F_n \le 2^n$ for all $n \ge 1$ Where $F_n$ is the $n$-th Fibonacci number.

Let P(n)P(n): Fn≤2nF_n \le 2^n.

Base cases: F1=1≤2=21F_1 = 1 \le 2 = 2^1. True. F2=1≤4=22F_2 = 1 \le 4 = 2^2. True. We need TWO base cases because the recurrence Fk+1=Fk+Fk−1F_{k+1} = F_k + F_{k-1} references two previous terms.

Strong inductive hypothesis: Assume Fj≤2jF_j \le 2^j for all 1≤j≤k1 \le j \le k Where k≥2k \ge 2.

Inductive step:

Fk+1=Fk+Fk−1≤2k+2k−1=2k−1(2+1)=3⋅2k−1F_{k+1} = F_k + F_{k-1} \le 2^k + 2^{k-1} = 2^{k-1}(2 + 1) = 3 \cdot 2^{k-1}

Now, 3⋅2k−1≤4⋅2k−1=2k+13 \cdot 2^{k-1} \le 4 \cdot 2^{k-1} = 2^{k+1} since 3≤43 \le 4.

Therefore Fk+1≤2k+1F_{k+1} \le 2^{k+1}. By strong induction, P(n)P(n) holds for all n≥1n \ge 1.

If we had only checked P(1)P(1) and tried to use weak induction, the inductive step from P(k)P(k) alone would not suffice because Fk+1F_{k+1} depends on Fk−1F_{k-1} as well.

Weak induction assumes P(k)P(k) and proves P(k+1)P(k+1).

Strong induction assumes P(1),P(2),…,P(k)P(1), P(2), \ldots, P(k) and proves P(k+1)P(k+1).

Common mistake: Using weak induction when you need strong induction. If P(k+1)P(k+1) depends on P(k−1)P(k-1) or earlier, weak induction’s hypothesis is insufficient.

Common mistake (reverse): Always using strong induction “to be safe.” While not logically wrong, This is unnecessary and makes …/1-number-and-algebra/3_proof-and-logics harder to read. Use weak induction unless the structure Of the problem requires strong induction.

5.6 Confusing Converse with Contrapositive

Section titled “5.6 Confusing Converse with Contrapositive”
OriginalP  ⟹  QP \implies Q
Contrapositive (equivalent)¬Q  ⟹  ¬P\neg Q \implies \neg P
Converse (NOT equivalent)Q  ⟹  PQ \implies P
Inverse (NOT equivalent)¬P  ⟹  ¬Q\neg P \implies \neg Q

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 (44 is positive but not prime).

The implication P  ⟹  QP \implies Q is true whenever PP is false, regardless of QQ.

Example: “If 1=01 = 0 Then the moon is made of cheese.” This is TRUE (vacuously), because the Premise "1=01 = 0" is false.

Practical consequence: To disprove P  ⟹  QP \implies Q You must show PP is true AND QQ is false. Showing PP is false does NOT disprove the implication.

StatementCorrect Negation
∀x,  P(x)\forall x, \; P(x)∃x,  ¬P(x)\exists x, \; \neg P(x)
∃x,  P(x)\exists x, \; P(x)∀x,  ¬P(x)\forall x, \; \neg P(x)
∀x,  ∃y,  P(x,y)\forall x, \; \exists y, \; P(x,y)∃x,  ∀y,  ¬P(x,y)\exists x, \; \forall y, \; \neg P(x,y)
∃x,  ∀y,  P(x,y)\exists x, \; \forall y, \; P(x,y)∀x,  ∃y,  ¬P(x,y)\forall x, \; \exists y, \; \neg P(x,y)

MethodWhen to UseKey Idea
DirectStraightforward chain from P to QAssume P, derive Q
ContradictionStatement is a negation, or no obvious direct pathAssume not-P, find contradiction
ContrapositiveNot-Q gives more to work with than PProve not-Q implies not-P
Induction (weak)Statement depends on previous caseBase case + inductive step
Induction (strong)Statement depends on multiple previous casesBase cases + strong inductive step
ExhaustionFinite, small number of casesCheck each case
CounterexampleDisproving a universal claimFind one exception
Comprehensive Exercise Set
  1. Prove that 6\sqrt{6} is irrational.

  2. Prove that the product of any three consecutive integers is divisible by 6.

  3. Prove by induction that ∑i=0n2i=2n+1−1\sum_{i=0}^{n} 2^i = 2^{n+1} - 1 for all n≥0n \ge 0.

  4. Prove that if n2n^2 is divisible by 3, then nn is divisible by 3.

  5. Disprove: “For all real numbers xx, x2>xx^2 \gt x.”

  6. Negate: “For every real number xx There exists a real number yy such that x+y=0x + y = 0.”

  7. Prove that there is no largest prime number.

  8. Prove that log⁡57\log_5{7} is irrational.

  9. Find gcd⁡(372,84)\gcd(372, 84) using the Euclidean algorithm, and express it as a linear combination.

  10. Prove that if a≡b(modm)a \equiv b \pmod{m} and n∣mn \mid m Then a≡b(modn)a \equiv b \pmod{n}.

Answers to Selected Exercises

Exercise 1: Assume 6=ab\sqrt{6} = \frac{a}{b} in lowest terms. Then a2=6b2a^2 = 6b^2 So a2a^2 is even (divisible by 2), hence aa is even. Write a=2ka = 2k. Then 4k2=6b24k^2 = 6b^2 So 2k2=3b22k^2 = 3b^2. This Means 3b23b^2 is even, so b2b^2 is even, so bb is even. Both aa and bb are even, contradicting Lowest terms.

Exercise 2: Among any three consecutive integers n,n+1,n+2n, n+1, n+2: one is divisible by 3 (since one Of n,n+1,n+2n, n+1, n+2 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 2⋅3=62 \cdot 3 = 6.

Exercise 4: By contrapositive. If 3∤n3 \nmid n Then n≡1(mod3)n \equiv 1 \pmod{3} or n≡2(mod3)n \equiv 2 \pmod{3}. If n≡1n \equiv 1 Then n2≡1(mod3)n^2 \equiv 1 \pmod{3}. If n≡2n \equiv 2 Then n2≡4≡1(mod3)n^2 \equiv 4 \equiv 1 \pmod{3}. In either case n2≢0(mod3)n^2 \not\equiv 0 \pmod{3} So 3∤n23 \nmid n^2.

Exercise 5: Counterexample: x=0.5x = 0.5. Then x2=0.25≯0.5x^2 = 0.25 \not\gt 0.5. Also x=0x = 0: 02=0≯00^2 = 0 \not\gt 0.

Exercise 6: ∃x∈R,  ∀y∈R,  x+y≠0\exists x \in \mathbb{R}, \; \forall y \in \mathbb{R}, \; x + y \ne 0.

Exercise 10: a≡b(modm)a \equiv b \pmod{m} means m∣(a−b)m \mid (a-b). Since n∣mn \mid m and m∣(a−b)m \mid (a-b) By Transitivity of divisibility, n∣(a−b)n \mid (a-b). Therefore a≡b(modn)a \equiv b \pmod{n}.


Example 1: Logarithm laws

Solve log⁡3(x+1)+log⁡3(x−1)=2\log_3(x + 1) + \log_3(x - 1) = 2.

Solution:

log⁡3[(x+1)(x−1)]=2\log_3[(x+1)(x-1)] = 2 (x+1)(x−1)=32=9(x+1)(x-1) = 3^2 = 9

x2−1=9  ⟹  x2=10  ⟹  x=10x^2 - 1 = 9 \implies x^2 = 10 \implies x = \sqrt{10} (since x>1x > 1)

  • Proof by induction: verify base case, assume P(k)P(k), derive P(k+1)P(k+1)
  • Proof by contradiction: assume the negation, derive an impossibility
  • Necessary condition (  ⟹  \implies) vs sufficient condition (  ⟸  \impliedby) vs biconditional (  ⟺  \iff)
  • Logical equivalence verified by truth tables; De Morgan’s laws for negation
  • Counterexample disproves a universal statement
TopicSiteLink
[Proof and Logic]A-LevelView
[Proof and Logic]IBView