Proof by Contradiction

Suppose the primes p1,…,pkp_1, \ldots, p_k were all there are — the chips show the list, P=p1⋯pkP = p_1 \cdots p_k, and N=P+1N = P+1. NN is divisible by no prime on the list (remainder 1) yet has a prime factor, and that factor is off the list — a contradiction. At k=6k = 6, N=30031=59×509N = 30031 = 59 \times 509 is composite and the proof still stands, teaching the shape of contradiction (assume ¬P\lnot P → contradiction → PP).

N=p1p2⋯pk+1≡1(modpi)N = p_1 p_2 \cdots p_k + 1 \equiv 1 \pmod{p_i}
¬P  ⇒  ⊥  ⊢  P\lnot P \;\Rightarrow\; \bot \;\vdash\; P
30031=59×50930031 = 59 \times 509

Examples & Exercises

Prove Euclid's theorem completely: there are infinitely many primes. Use proof by contradiction — assume p1,…,pkp_1, \ldots, p_k are all the primes, and show that N=p1⋯pk+1N = p_1 \cdots p_k + 1 (i) has a prime factor, since N≥2N \ge 2, and (ii) that this factor cannot equal any pip_i, deriving a contradiction. In particular, address the subtlety that NN itself need not be prime (for k=6k = 6, N=30031=59×509N = 30031 = 59 \times 509).

N=p1p2⋯pk+1,N≡1(modpi) for all iN = p_1 p_2 \cdots p_k + 1, \qquad N \equiv 1 \pmod{p_i} \ \text{for all } i
k=6:N=30031=59×509k = 6:\quad N = 30031 = 59 \times 509
k=6k = 6: P=30030P = 30030, N=30031=59×509N = 30031 = 59 \times 509 — NN is composite, but its prime factors 5959 and 509509 are new primes off the list {2,3,5,7,11,13}\{2, 3, 5, 7, 11, 13\}.
Show proof
  1. We argue by contradiction. Suppose there are only finitely many primes — a complete list p1,…,pkp_1, \ldots, p_k (k≥1k \ge 1). Put P=p1⋯pkP = p_1 \cdots p_k and N=P+1N = P + 1; then N≥3≥2N \ge 3 \ge 2.
  2. Lemma: every integer ≥2\ge 2 has a prime factor. Proof (strong induction): for n=2n = 2, nn itself is prime. For n>2n > 2, either nn is prime or n=abn = ab with 1<a,b<n1 < a, b < n; in the composite case the induction hypothesis gives aa a prime factor qq, and q∣a∣nq \mid a \mid n, so qq is a prime factor of nn. Applying this to NN yields a prime factor qq of NN.
  3. qq differs from every pip_i. Indeed, pi∣Pp_i \mid P for each ii, so N=P+1≡1(modpi)N = P + 1 \equiv 1 \pmod{p_i}: no pip_i divides NN. But q∣Nq \mid N, hence q≠piq \ne p_i for every ii. So qq is a prime missing from the supposedly complete list — a contradiction. Hence there are infinitely many primes. ∎
  4. The subtlety: NN itself need not be prime. For k=6k = 6, P=2⋅3⋅5⋅7⋅11⋅13=30030P = 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 \cdot 13 = 30030 and N=30031=59×509N = 30031 = 59 \times 509 is composite. The proof is unaffected — its claim is "\emph{every} prime factor of NN is new", not "NN is a new prime". The proof does pin down that a new prime is among the factors of NN, but identifying it requires factoring NN.

Prove by contradiction that log⁡25\log_2 5 is irrational. Hint: if log⁡25=pq\log_2 5 = \frac{p}{q} with p,qp, q positive integers, then 2p=5q2^p = 5^q — the left side is even and the right side is odd.

log⁡25=pq  ⇒  5=2p/q  ⇒  5q=2p\log_2 5 = \frac{p}{q} \;\Rightarrow\; 5 = 2^{p/q} \;\Rightarrow\; 5^q = 2^p
2p is even (p≥1),5q is odd2^p \text{ is even } (p \ge 1), \qquad 5^q \text{ is odd}
The scene preset is the default k=4k = 4 (P=210P = 210, N=211N = 211) — this problem is about the shape of proof by contradiction itself, not the scene's numbers.
Show proof
  1. We argue by contradiction. Suppose log⁡25\log_2 5 is rational. Since log⁡25>log⁡24=2>0\log_2 5 > \log_2 4 = 2 > 0, we can write log⁡25=pq\log_2 5 = \frac{p}{q} with p,qp, q positive integers — in particular p≥1p \ge 1.
  2. By the definition of the logarithm, 5=2p/q5 = 2^{p/q}, and raising both sides to the power qq gives 5q=2p5^q = 2^p. But p≥1p \ge 1 makes 2p=2⋅2p−12^p = 2 \cdot 2^{p-1} even, while 5q5^q, a product of odd numbers, is odd. An even number cannot equal an odd number — a contradiction. Hence log⁡25\log_2 5 is irrational. ∎
  3. Note: there is no need to put pq\frac{p}{q} in lowest terms — the parity argument alone suffices. The deeper reason is the fundamental theorem of arithmetic (unique prime factorization): 2p2^p has only the prime factor 2 and 5q5^q only the prime factor 5, so the two powers with positive exponents can never agree.

Prove by contradiction: if rr is rational and xx is irrational, then r+xr + x is irrational.

r+x=s∈Q  ⇒  x=s−r∈Qr + x = s \in \mathbb{Q} \;\Rightarrow\; x = s - r \in \mathbb{Q}
The scene preset is the default k=4k = 4 (P=210P = 210, N=211N = 211) — this problem is about the shape of proof by contradiction itself, not the scene's numbers.
Show proof
  1. We argue by contradiction. Suppose r+xr + x is rational, and put s=r+x∈Qs = r + x \in \mathbb{Q}. Then x=s−rx = s - r.
  2. A difference of rationals is rational: if r=abr = \frac{a}{b} and s=cds = \frac{c}{d} (with a,c∈Za, c \in \mathbb{Z}, b,d∈Zb, d \in \mathbb{Z}, b,d≠0b, d \ne 0), then x=s−r=cb−adbdx = s - r = \frac{cb - ad}{bd}, and cb−ad∈Zcb - ad \in \mathbb{Z} with bd≠0bd \ne 0, so x∈Qx \in \mathbb{Q}.
  3. This contradicts the assumption that xx is irrational. Hence r+xr + x cannot be rational — it is irrational. ∎ (The same argument shows rxrx is irrational for rational r≠0r \ne 0 and irrational xx: if rx=srx = s then x=s/rx = s/r is a quotient of rationals.)

1. Foundations of Proof