Discrete Mathematics : Proof Techniques

Contents

Proof

What is a proof?

A proof is a method for establishing the truth of a statement.

RigorTruth typeFieldTruth teller
0Word of GodReligionGod/Priests
1Authoritative truthBusiness/SchoolBoss/Teacher
2Legal truthJudiciaryLaw/Judge/Law makers
3Philosophical truthPhilosophyPlausible argument
4Scientific truthPhysical sciencesExperiments/Observations
5Statistical truthStatisticsData sampling
6Mathematical truthMathematicsLogical deduction

What is a mathematical proof?

A mathematical proof is a verification for establishing the truth of a proposition by a chain of logical deductions from a set of axioms.

Some concepts:

Why care for mathematical proofs?

I believe that we can understand the laws of the world using mathematics and computation as shown below.

Properties of a proof

Number theory

Number theory is the branch of mathematics that deals with the study of integers.

NumbersSet
Natural numbers $(\mathbb{N})$$\{1, 2, 3, \ldots\}$
Whole numbers $(\mathbb{W})$$\{0, 1, 2, \ldots\}$
Integers $(\mathbb{Z})$$\{0, \pm 1, \pm 2, \pm 3, \ldots\}$
Even numbers $(\mathbb{E})$$\{0, \pm 2, \pm 4, \pm 6, \ldots\}$
Odd numbers $(\mathbb{O})$ $\{\pm 1, \pm 3, \pm 5, \pm 7, \ldots\}$
Prime numbers $(\mathbb{P})$$\{2, 3, 5, 7, 11, \ldots\}$
Composite numbers $(\mathbb{C})$$\{\text{Natural numbers } (> 1) \text{ that are not prime}\}$
Rational numbers $(\mathbb{Q})$$\{\text{Ratio of integers with non-zero denominator}\}$
Real numbers $(\mathbb{R})$$\{\text{Numbers with infinite decimal representation}\}$
Irrational numbers $(\mathbb{I})$$\{\text{Real numbers that are not rational}\}$
Complex numbers $(\mathbb{S})$$\{\text{real} + i \cdot \text{real}\}$

Even and odd numbers

An integer $n$ is even if and only if $n$ equals twice some integer. That is, for any integer $n$,
$n \text{ is even} \Leftrightarrow \exists k \in \mathbb{Z}, ~n = 2k$

An integer $n$ is odd if and only if $n$ equals twice some integer plus 1. That is, for any integer $n$,
$n \text{ is odd} \Leftrightarrow \exists k \in \mathbb{Z}, ~n = 2k + 1$

Examples:

Rational and irrational numbers

A real number $r$ is rational if and only if it can be expressed as a ratio of two integers with a nonzero denominator.
That is, if $r$ is a real number, then
$r \text{ is rational} \Leftrightarrow \exists a\in\mathbb{Z}, \exists b\in\mathbb{Z}^{\ne 0},~ (~ r = \frac{a}{b} ~)$
where $\mathbb{Z}^{\ne 0}$ is the set of nonzero integers.

A real number $r$ is irrational if and only if it is not rational.
That is, if $r$ is a real number, then
$r \text{ is irrational} \Leftrightarrow \forall a\in\mathbb{Z}, \forall b\in\mathbb{Z}^{\ne 0},~ (~ r \ne \frac{a}{b} ~)$

Examples:

Divisibility

If $n$ is an integer and $d$ is a nonzero integer, then $n$ is divisible by $d$, denoted by $d$ divides $n$, if and only if $n$ equals $d$ times some integer.

Formally, if $n \in \mathbb{Z}$ and $d \in \mathbb{Z}^{\ne 0}$, then
$d ~|~ n \Leftrightarrow \exists k \in \mathbb{Z}, n = dk$

Examples:

Quotient-Remainder theorem

Theorem: Given any integer $n$ and a positive integer $d$, there exists a unique integer $q$ and a unique whole number $r$ such that
$n = qd + r$ and $r \in [0, d - 1]$

Examples: Let $n = 6$ and $d \in [1, 7]$:

Num. $(n)$Divisor $(d)$TheoremQuotient $(q)$Rem. $(r)$
$6$$1$$6 = 6 \times 1 + 0$$6$$0$
$6$$2$$6 = 3 \times 2 + 0$$3$$0$
$6$$3$$6 = 2 \times 3 + 0$$2$$0$
$6$$4$$6 = 1 \times 4 + 2$$1$$2$
$6$$5$$6 = 1 \times 5 + 1$$1$$1$
$6$$6$$6 = 1 \times 6 + 0$$1$$0$
$6$$7$$6 = 0 \times 7 + 6$$0$$6$

Primes and composites

NumberFactorizationPrime?
$2$$2 = 1 \times 2 = 2 \times 1$$\checkmark$
$3$$3 = 1 \times 3 = 3 \times 1$$\checkmark$
$4$$4 = 1 \times 4 = 4 \times 1 = 2 \times 2$$\times$
$5$$5 = 1 \times 5 = 5 \times 1$$\checkmark$
$6$$6 = 1 \times 6 = 6 \times 1 = 2 \times 3 = 3 \times 2$$\times$
$7$$7 = 1 \times 7 = 7 \times 1$$\checkmark$
$8$$8 = 1 \times 8 = 8 \times 1 = 2 \times 4 = 4 \times 2$$\times$
$9$$9 = 1 \times 9 = 9 \times 1 = 3 \times 3$$\times$
$10$$10 = 1 \times 10 = 10 \times 1 = 2 \times 5 = 5 \times 2$$\times$
$11$$11 = 1 \times 11 = 11 \times 1$$\checkmark$
$12$$12 = 1 \times 12 = 12 \times 1 = 2 \times 6 = 6 \times 2 = 3 \times 4 = 4 \times 3$$\times$
$13$$13 = 1 \times 13 = 13 \times 1$$\checkmark$
$14$$14 = 1 \times 14 = 14 \times 1 = 2 \times 7 = 7 \times 2$$\times$
$15$$15 = 1 \times 15 = 15 \times 1 = 3 \times 5 = 5 \times 3$$\times$
$16$$16 = 1 \times 16 = 16 \times 1 = 2 \times 8 = 8 \times 2 = 4 \times 4$$\times$
$17$$17 = 1 \times 17 = 17 \times 1$$\checkmark$

A natural number $n > 1$ is prime if and only if for all natural numbers $r$ and $s$, if $n = rs$, then either $r$ or $s$ equals $n$;
Formally, for each natural number $n > 1$,
$n \text{ is prime} \Leftrightarrow \forall r \in \mathbb{N}, \forall s \in \mathbb{N}, \text{ and } s, \text{ if } n = rs \text{ then } (~ (r = n \text{ and } s = 1) \text{ or } (s = n \text{ and } r = 1) ~)$

A natural number $n > 1$ is composite if and only if $n = r s$ for some natural numbers $r$ and $s$ with $1 < r < n$ and $1 < s < n$
Formally, for each natural number $n > 1$,
$n \text{ is composite} \Leftrightarrow \exists r \in \mathbb{N}, \exists s \in \mathbb{N}, n = rs \text{ and } 1 < r < n \text{ and } 1 < s < n$

Properties:

Unique prime factorization of natural numbers

$n$Unique prime factorization $n$Unique prime factorization $n$Unique prime factorization
$2$$2$ $16$$2^4$ $30$$2 \times 3 \times 5$
$3$$3$ $17$$17$ $31$$31$
$4$$2^2$ $18$$2 \times 3^2$ $32$$2^5$
$5$$5$ $19$$19$ $33$$3 \times 11$
$6$$2 \times 3$ $20$$2^2 \times 5$ $34$$2 \times 17$
$7$$7$ $21$$3 \times 7$ $35$$5 \times 7$
$8$$2^3$ $22$$2 \times 11$ $36$$2^2 \times 3^2$
$9$$3^2$ $23$$23$ $37$$37$
$10$$2 \times 5$ $24$$2^3 \times 3$ $38$$2 \times 19$
$11$$11$ $25$$5^2$ $39$$3 \times 13$
$12$$2^2 \times 3$ $26$$2 \times 13$ $40$$2^3 \times 5$
$13$$13$ $27$$3^3$ $41$$41$
$14$$2 \times 7$ $28$$2^2 \times 7$ $42$$2 \times 3 \times 7$
$15$$3 \times 5$ $29$$29$ $43$$43$

Fundamental theorem of arithmetic. Standard factored form.

Any natural number $n > 1$ can be uniquely represented as a product as follows:
$n = p_1^{e_1} \times p_2^{e_2} \times \cdots \times p_k^{e_k}$
such that $p_1 < p_2 < \cdots < p_k$ are primes in $[2, n]$, $e_1, e_2, \ldots, e_k$ are whole number exponents, and $k$ is a natural number.

Some more definitions

Proof techniques

StatementsMethod of proof
Proving existential statements
(Disproving universal statements)
Constructive proof
Non-constructive proof
Proving universal statements
(Disproving existential statements)
Direct proof
Proof by mathematical induction
Well-ordering principle
Proof by exhaustion
Proof by cases
Proof by contradiction
Proof by contraposition
Computer-aided proofs

Direct proof

Even + odd = odd

Proposition: Sum of an even integer and an odd integer is odd.

Proof

Direct proof.
Suppose $a$ is even and $b$ is odd. Then: \begin{align*} & a + b \\ &= (2m) + b && \text{(defn. of even, } a = 2m \text{ for integer } m \text{)}\\ &= (2m) + (2n+1) && \text{(defn. of odd, } b = 2n+1 \text{ for integer } n \text{)}\\ &= 2 (m+n) + 1 && \text{(taking 2 as common factor)}\\ &= 2 p + 1 && \text{(} p = m + n \text{ and addition is closed on integers)}\\ &= \text{odd} && \text{(defn. of odd)}\\ \end{align*}

Problems for practice

Prove the following propositions:

$n$ is odd $\Rightarrow$ $n^2$ is odd

Proposition: The square of an odd integer is odd.

Proof

Direct proof.
Formal statement: If $n$ is odd, then $n^2$ is odd.
\begin{align*} & n \text{ is odd} \\ & \implies n = (2k+1) && \text{(defn. of odd, } k \text{ is an integer)}\\ & \implies n^2 = (2k+1)^2 && \text{(squaring on both sides)}\\ & \implies n^2 = 4k^2 + 4k + 1 && \text{(expanding the binomial)}\\ & \implies n^2 = 2(2k^2 + 2k) + 1 && \text{(factoring 2 from first two terms)}\\ & \implies n^2 = 2j + 1 && \text{(let } j = 2k^2 + 2k \text{; } j \text{ is an integer as mult. and add. are closed on integers)}\\ & \implies n^2 \text{ is odd} && \text{(defn. of odd)}\\ \end{align*}

Odd = difference of squares

Proposition: Every odd integer is equal to the difference between the squares of two integers.

Workout

Proof

Direct proof. \begin{align*} &\text{Odd}\\ &= 2k+1 && \text{(defn. of odd)}\\ & = (k^2 + 2k + 1) - k^2 && \text{(adding and subtracting } k^2 \text{)}\\ & = (k+1)^2 - k^2 && \text{(use the formula for $(a+b)^2$)}\\ & = m^2 - n^2 && \text{(set } m = k + 1 \in \mathbb{Z} \text{ and } n = k \in \mathbb{Z} \text{)}\\ & = \text{difference of two squares} \end{align*}

So, every odd integer can be written as the difference between two squares.

If $a|b$ and $b|c$, then $a|c$

Proposition: (Transitivity) For integers $a,b,c$, if $a|b$ and $b|c$, then $a|c$.

Proof

Direct proof.
Formal statement: $\forall$ integers $a,b,c$, if $a|b$ and $b|c$, then $a|c$. \begin{align*} & c \\ &= bn && \text{(} b|c \text{ and definition of divisibility)}\\ &= (am)n && \text{(} a|b \text{ and definition of divisibility)}\\ &= a(mn) && \text{(multiplication is associative)}\\ &= ak && \text{(let } k = mn \text{ and multiplication is closed on integers)}\\ &\implies a|c && \text{(definition of divisibility and } k \text{ is an integer)}\\ \end{align*}

Summation

Proposition: $1 + 2 + 3 + \cdots + n = n (n + 1) / 2$.

Proof

Direct proof.
Formal statement. $\forall $ natural number $n$, $1 + 2 + 3 + \cdots + n = n (n + 1) / 2$. \begin{align*} & S = 1 + 2 + 3 + \cdots + n \\ & \implies S = n + (n - 1) + (n - 2) + \cdots + 1 && \text{(addition on integers is commutative)}\\ & \implies 2S = \underbrace{(n + 1) + (n + 1) + (n + 1) + \cdots + (n + 1)}_{n \text{ terms}} && \text{(adding the previous two equations)}\\ & \implies 2S = n(n + 1) && \text{(simplifying)}\\ & \implies S = n(n + 1)/2 && \text{(divide both sides by 2)}\\ \end{align*}

Proof by Negation

$2^{999}+1$

Proposition: $2^{999}+1$ is prime.

Workout

Solution

Proof by negation.
False!
Negation: $2^{999}+1$ is composite. \begin{align*} & 2^{999} + 1 \\ &= (2^{333})^3 + 1^3 && \text{(terms represented as cubes)}\\ &= a^3 + b^3 && \text{(set } a = 2^{333} \text{, } b = 1 \text{)}\\ &= (a + b)(a^2 - ab + b^2) && \text{(factorize } a^3 + b^3 \text{)}\\ &= (2^{333} + 1)(2^{666} - 2^{333} + 1) && \text{(substituting } a \text{ and } b \text{ values)}\\ &= \text{composite} \\ \end{align*}

$n^2 + 3n + 2$

Proposition: There is a natural number $n$ such that $n^2 + 3n + 2$ is prime.

Workout

Solution

Proof by negation.
False!
Negation: $\forall n \in \mathbb{N}$, $n^2 + 3n + 2$ is composite. \begin{align*} & n^2 + 3n + 2 \\ &= n^2 + n + 2n + 2 && \text{(split } 3n \text{)}\\ &= n(n + 1) + 2(n + 1) && \text{(taking common factors)}\\ &= (n + 1)(n + 2) && \text{(distributive law)}\\ &= \text{composite} && \text{(} n + 1 > 1 \text{ and } n + 2 > 1 \text{)}\\ \end{align*}

Polynomial root

Proposition: If $x^3 - 7x^2 + x - 7 = 0$, then $x = 7$.

Proof (Invalid)

Substitute $x = 7$ in the expression to get $7^3 - 7(7^2)+7-7 = 0$.
As $x$ satisfies the equation, $x = 7$.

Incorrect! What's wrong?

Proof

Proof by negation.
False! Negation: Not all roots of the polynomial is $7$.

A polynomial equation of degree $n$ has $n$ roots.
So, the polynomial equation $x^3 - 7x^2 + x - 7 = 0$ has 3 roots.

Factorize the expression.
\begin{align*} & x^3 - 7x^2 + x - 7 \\ &= x^2(x-7) + (x-7) && \text{(taking } x^2 \text{ factor from first two terms)}\\ &= (x-7)(x^2+1) && \text{(taking } (x-7) \text{ factor)}\\ &= (x-7)(x+ i) (x - i) && \text{(factorizing } (x^2+1) \text{; this is because } (x + i)(x - i) = (x^2 - i^2) = (x^2 + 1) \text{)}\\ \end{align*} So, the three roots to the equation $x^3 - 7x^2 + x - 7 = 0$ are $x = 7$, $x = -\sqrt{-1}$, and $x = \sqrt{-1}$.

Exactly one of the three roots is $x = 7$. Hence, we have \begin{align*} & x = 7 \implies x^3 - 7x^2 + x - 7 = 0\\ & x^3 - 7x^2 + x - 7 = 0 \nRightarrow x = 7\\ \end{align*}

Proposition: If $x$ is a real number and $x^3 - 7x^2 + x - 7 = 0$, then $x = 7$.

Proof

Direct proof.
We factorize the expression.
\begin{align*} & x^3 - 7x^2 + x - 7 \\ &= x^2(x-7) + (x-7) && \text{(taking } x^2 \text{ factor from first two terms)}\\ &= (x-7)(x^2+1) && \text{(taking } (x-7) \text{ factor)}\\ &= (x-7)(x+ i) (x - i) && \text{(factorizing } (x^2+1) \text{; this is because } (x + i)(x - i) = (x^2 - i^2) = (x^2 + 1) \text{)}\\ \end{align*} So, the three roots to the equation $x^3 - 7x^2 + x - 7 = 0$ are $x = 7$, $x = -\sqrt{-1}$, and $x = \sqrt{-1}$.
As $x$ has to be a real number, $x = 7$ and hence the given proposition is true.

Proof by Counterexample

$a = b$

Proposition: For all real numbers $a$ and $b$, if $a^2 = b^2$, then $a = b$.

Solution

False!
Counterexample: $a = 1$ and $b = -1$.
In this example, $a^2 = b^2$ but $a \ne b$.

Proposition: For all nonzero integers $a$ and $b$, if $a | b$ and $b | a$, then $a = b$.

Solution

False!
Counterexample: $a = 1$ and $b = -1$.
In this example, $a | b$ and $b | a$, however, $a \ne b$.

$2^{n}+1$

Proposition: $2^n + 1$ is prime for any natural number $n$.

Workout

Solution

False!
Counterexample: $n = 3$
When $n = 3$, then $2^n + 1 = 2^3 + 1 = 9 = 3^2$ is composite.

$n^2 + n + 41$

Proposition: $n^2 + n + 41$ is prime for any whole number $n$.

Workout

Solution

$x/(y + z) + y/(x+z) + z/(x+y)$

Proposition: $\frac{x}{y + z} + \frac{y}{x + z} + \frac{z}{x + y} = 4$ has no positive integer solutions.

Workout

Solution

121111111111111111111111111111111111111111

Proposition: For whole numbers $n$, $12 \underbrace{11\cdots 1}_{n \text{ terms}}$ is composite.

Workout

Solution

Proof by Contraposition

$n^2$ is odd $\Rightarrow$ $n$ is odd

Proposition: If $n^2 \text{ is odd}$, then $n$ is odd.

Proof

Proof by contraposition
Contrapositive: If $n$ is even, then $n^2$ is even. \begin{align*} & n \text{ is even} \\ & \implies n = 2k && \text{(defn. of even, } k \text{ is an integer)}\\ & \implies n^2 = (2k)^2 && \text{(squaring on both sides)}\\ & \implies n^2 = 4k^2 && \text{(simplifying)}\\ & \implies n^2 = 2(2k^2) && \text{(factoring 2)}\\ & \implies n^2 = 2j && \text{(let } j = 2k^2 \text{; } j \text{ is an integer as mult. is closed on integers)}\\ & \implies n^2 \text{ is even} && \text{(defn. of even)}\\ \end{align*}

$n$ is odd $\Leftrightarrow$ $n^2$ is odd

Proposition: The square of an integer is odd if and only if the integer itself is odd.

Workout

Proof

There are two parts in the proof.
  1. Prove that if $n$ is odd, then $n^2$ is odd.
    Direct proof
  2. Prove that if $n^2$ is odd, then $n$ is odd.
    Proof by contraposition

Corollary: Prove that the fourth power of an integer is odd if and only if the integer itself is odd.

Proof

We have \begin{align*} & n \text{ is odd} \Leftrightarrow n^2 \text{ is odd} && \text{(previous theorem)}\\ & \implies n^2 \text{ is odd} \Leftrightarrow n^4 \text{ is odd} && \text{(previous theorem used on } n^2 \text{)}\\ & \implies n \text{ is odd} \Leftrightarrow n^4 \text{ is odd} && \text{(transitivity of biconditional)}\\ \end{align*}
Problem: Suppose $k$ is a whole number. Prove that an integer $n$ is odd if and only if $n^{2^k}$ is odd.

$n^2$ is even $\implies$ $n$ is even

Proposition: For all integers $n$, if $n^2$ is even, then $n$ is even.

Proof

Proof by contraposition.
Contrapositive. For all integers, if $n$ is odd, then $n^2$ is odd. \begin{align*} & n = 2k + 1 && \text{(definition of odd number)}\\ & \implies n^2 = (2k+1)^2 && \text{(squaring both sides)}\\ & \implies n^2 = 4k^2 + 4k + 1 && \text{(expand)}\\ & \implies n^2 = 2(2k^2 + 2k) + 1 && \text{(taking 2 out from two terms)}\\ & \implies n^2 = 2m+1 && \text{(set } m = 2k^2 + 2k \text{; } m \text{ is an integer as multiplication is closed on integers)}\\ & \implies n^2 = \text{odd} && \text{(definition of odd number)}\\ \end{align*}

Hence, the proposition is true.

Polynomial root

Proposition: If $x^3 - 7x^2 + x - 7 = 0$, then $x \ne 10$.

Proof

Proof by contraposition.
Contrapositive. If $x = 10$, then $x^3 - 7x^2 + x - 7 \ne 0$
Substitute $x = 10$ in the expression.
We get $10^3 - 7(10^2)+10-7 = 1000-700+10-7=303\ne 0$.
That is, $x = 10$ does not satisfy $x^3 - 7x^2 + x - 7 = 0$ equation.
Hence, the contrapositive is correct which implies that the original statement is correct.

$n \nmid ab \implies n \nmid a$ and $n \nmid b$

Proposition: Let $a,b,n \in \mathbb{Z}$. If $n \nmid ab$, then $n \nmid a$ and $n \nmid b$.

Proof

Proof by contraposition.
Contrapositive. Let $a,b,n \in \mathbb{Z}$. If $n | a$ or $n | b$, then $n | ab$. \begin{align*} & \text {if } n | a \\ & \implies a = nc && \text{(for some } c \in \mathbb{Z} \text{)}\\ & \implies ab = (nc)b = n(cb) && \text{(multiply by } b \text{)}\\ & \implies n | ab && \text{(definition of divisibility)}\\ \end{align*} \begin{align*} & \text {if } n | b \\ & \implies b = nd && \text{(for some } d \in \mathbb{Z} \text{)}\\ & \implies ab = a(nd) = n(ad) && \text{(multiply by } a \text{)}\\ & \implies n | ab && \text{(definition of divisibility)}\\ \end{align*}

Hence, the proposition is true.

$n^2 - 6n + 5$ is even $\implies$ $n$ is odd

Proposition: Let $n \in \mathbb{Z}$. If $n^2 - 6n + 5$ is even, then $n$ is odd.

Proof

Proof by contraposition.
Contrapositive. If $n$ is even, then $n^2 - 6n + 5$ is odd. \begin{align*} & n \text{ is even} \\ & \implies n = 2a \text{ for some integer } a && \text{(defn. of even)}\\ & \implies n^2-6n+5 = (2a)^2 - 6(2a) + 5 && \text{(substitute } n = 2a \text{)}\\ & \implies n^2-6n+5 = 2(2a^2)-2(6a)+2(2)+1 && \text{(simplify)}\\ & \implies n^2-6n+5 = 2(2a^2-6a+2) + 1 && \text{(take 2 common)}\\ & \implies n^2-6n+5 \text{ is odd} && \text{(defn. of odd)}\\ \end{align*}

Hence, the proposition is true.

$xy > 9 \implies x > 3$ or $y > 3$

Proposition: For reals $x$ and $y$, if $xy > 9$, then either $x > 3$ or $y > 3$.

Proof

Proof by contraposition.
Contrapositive. If $x \le 3$ and $y \le 3$, then $xy \le 9$. \begin{align*} & \text{Suppose } x \le 3 \text{ and } y \le 3. \\ & \implies xy \le 9 && \text{(multiply the two inequalities)} \end{align*}

Hence, the proposition is true.

Incorrect! Why?

Nonconstructive Proof

Irrational$^{\text{irrational}}$ can be rational

Proposition: An irrational raised to an irrational power may be rational.

Proof

Nonconstructive proof.
We make use of the fact that $\sqrt{2}$ is irrational.
Let $x = \sqrt{2}^{\sqrt{2}}$. Number $x$ is either rational or irrational.

Case 1. If $x$ is rational, then the proposition is true.

IrrationalIrrationalRational
$\sqrt{2}$$\sqrt{2}$$\sqrt{2}^{\sqrt{2}} = x =$ rational

Case 2. If $x$ is irrational, then the proposition is true.

IrrationalIrrationalRational
$x$$\sqrt{2}$$x^{\sqrt{2}} = \left( \sqrt{2}^{\sqrt{2}} \right)^{\sqrt{2}} = \sqrt{2}^{\sqrt{2} \cdot \sqrt{2}} = \sqrt{2}^2 = 2$

Proof by Contradiction

$n^2$ is even $\implies$ $n$ is even (Contradiction)

Proposition: For all integers $n$, if $n^2$ is even, then $n$ is even.

Proof

Proof by contradiction.
Negation. Suppose there is an integer $n$ such that $n^2$ is even but $n$ is odd. \begin{align*} & n = 2k + 1 && \text{(definition of odd number)}\\ & \implies n^2 = (2k+1)^2 && \text{(squaring both sides)}\\ & \implies n^2 = 4k^2 + 4k + 1 && \text{(expand)}\\ & \implies n^2 = 2(2k^2 + 2k) + 1 && \text{(taking 2 out from two terms)}\\ & \implies n^2 = 2m+1 && \text{(set } m = 2k^2 + 2k \text{; } m \text{ is an integer as multiplication is closed on integers)}\\ & \implies n^2 = \text{odd} && \text{(definition of odd number)}\\ \end{align*}

Contradiction! Hence, the proposition is true.

Greatest integer

Proposition: There is no greatest integer.

Proof

Proof by contradiction.
Negation. Suppose there is a greatest integer $N$.
Then $N \ge n$ for every integer $n$.
Let $M = N + 1$.
$M$ is an integer since addition is closed on integers.
$M > N$ since $M = N + 1$.
$M$ is an integer that is greater than $N$.
So, $N$ is not the greatest integer.
Contradiction! Hence, the proposition is true.

$\sqrt{2}$ is irrational

Proposition: $\sqrt{2}$ is irrational.

Proof

Proof by contradiction.
Negation. Suppose $\sqrt{2}$ is the simplest rational. \begin{align*} & \implies \sqrt{2} = m / n && \text{(} m, n \text{ have no common factors, } n \ne 0 \text{)}\\ & \implies m^2 = 2 n^2 && \text{(squaring and simplifying)}\\ & \implies m^2 = \text{even} && \text{(definition of even)}\\ & \implies m = \text{even} && \text{(why?)}\\ & \implies m = 2k \text{ for some integer } k && \text{(definition of even)}\\ & \implies (2k)^2 = 2n^2 && \text{(substitute } m \text{)}\\ & \implies n^2 = 2k^2 && \text{(simplify)}\\ & \implies n^2 = \text{even} && \text{(definition of even)}\\ & \implies n = \text{even} && \text{(why?)}\\ & \implies m, n \text{ are even} && \text{(previous results)}\\ & \implies m, n \text{ have a common factor of 2} && \text{(definition of even)}\\ \end{align*}

Contradiction! Hence, the proposition is true.

If $p | n$, then $p \nmid (n + 1)$

Proposition: For any integer $n$ and any prime $p$, if $p | n$, then $p \nmid (n + 1)$.

Proof

Proof by contradiction.
Negation. Suppose there exists integer $n$ and prime $p$ such that
$p | n$ and $p | (n + 1)$.
$p | n$ implies $pr = n$ for some integer $r$
$p | (n + 1)$ implies $p s = n + 1$ for some integer $s$
Eliminate $n$ to get:
$1 = (n + 1) - n = ps - pr = p (s - r)$
Hence, $p | 1$, from the definition of divisibility.
As $p | 1$, we have $p \le 1$. (why?)
As $p$ is prime, $p > 1$.
Contradiction! Hence, the proposition is true.

#Primes is infinite

Proposition: The set of prime numbers is infinite.

Proof

Proof by contradiction.
Negation. Assume that there are only finite number of primes.
Let the set of primes be $\{ p_1, p_2, \ldots, p_n \}$
such that $(p_1 = 2) < (p_2 = 3) < \cdots < p_n$.
Consider the number $N = p_1 p_2 p_3 \ldots p_n + 1$. Clearly, $N > 1$.
$(i)$ There is a prime that divides $N$.
Use unique prime factorization theorem.
$(ii)$ No prime divides $N$.
For all $i \in [1, n]$, $p_i$ does not divide $N$ as it leaves a remainder of $1$ when it divides $N$.
So, $p_1 \nmid ~N$, $p_2 \nmid ~N$, $\ldots$, $p_n \nmid ~N$.
Contradiction! Hence, the proposition is true.

Average

Proposition: If $a_1, a_2, \ldots, a_n$ are $n$ real numbers for natural number $n$, then at least one of these $n$ numbers is greater than or equal to the average of those $n$ numbers.

Proof

Proof by contradiction.

Proof

Direct proof.

$2^p - 1$ is prime $\implies$ $p$ is prime

Proposition: Suppose $p \in \mathbb{N}$ and $p \ge 2$. If $2^p - 1$ is prime, then $p$ is prime.

Proof

Proof by contradiction.
Negation. Suppose $p$ is an integer at least $2$ such that $2^p - 1$ is prime and $p$ is composite.
\begin{align*} &p \text{ is compositive}\\ & \implies p = rs \text{ such that both } r, s \text{ are in the range } [2, p - 1] \end{align*} Now consider \begin{align*} &2^p - 1 \\ &= 2^{rs} - 1 && \text{(substitute for } p \text{)}\\ &= (2^r)^s - 1 && \text{(} a^{bc} = ( a^b )^c \text{)}\\ &= (2^{r} - 1) \left( \frac{(2^r)^s - 1}{2^{r} - 1} \right) && \text{(multiply and divide by } (2^{r} - 1) > 0 \text{)}\\ &= (2^{r} - 1) \left( 1 + (2^r)^1 + (2^r)^2 + \cdots + (2^r)^{s - 1} \right) \\ &= m \times n && \text{(} m \ge 2 \text{ and } n \ge 2 \text{)}\\ \end{align*}

Contradiction! Hence, the proposition is true.

Pythagorean triplets

Proposition: For integers $a$, $b$, $c$, if $a^2 + b^2 = c^2$, then $a$ is even or $b$ is even.

Proof

Proof by contraposition.
Negation. $a$ and $b$ are odd and $a^2 + b^2 = c^2$.
$a = 2m + 1$; $b = 2n + 1$ (defintion of odd)
Consider \begin{align*} \text{Consider } & a^2 + b^2 \\ &= (2m+1)^2 + (2n+1)^2 \\ &= 4m^2 + 4n^2 + 4m + 4n + 2 && \text{(expand)}\\ &= 4 \times (m^2 + n^2 + m + n) + 2 && \text{(take common factor)}\\ \equiv & \; 2 \bmod 4 && \text{(remainder is 2 when divided by 4)}\\ \end{align*} $c = 2k$ or $c = 2k + 1$ (quotient-remainder theorem)
Now consider \begin{align*} &c^2 \\ &= 4k^2 \text{ or } 4(k^2 + k) + 1 && \text{(squaring)}\\ \not\equiv & \; 2 \bmod 4 && \text{(remainder is never 2 when divided by 4)}\\ \end{align*}

Contradiction! Hence, the proposition is true.

Proof by Division into Cases

$n^2 + 3n + 2$ is prime for some $n$

Proposition: There is a natural number $n$ such that $n^2 + 3n + 2$ is prime.

Proof 2

Proof by division into cases.
False!
Negation. $\forall$ natural number $n$, $n^2 + 3n + 2$ is composite.
We prove the negation in two cases:
  1. $n$ is even
  2. $n$ is odd
  1. Prove that $n$ is even $\implies n^2 + 3n + 2$ is composite.
    \begin{align*} & n \text{ is even} \\ & \implies n^2 \text{ is even and } 3n \text{ is even} && \text{(even } \times \text{ integer = even)}\\ & \implies n^2 + 3n + 2 \text{ is even} && \text{(even + even = even)}\\ & \implies n^2 + 3n + 2 \text{ is composite} && \text{(2 is a factor)}\\ \end{align*}
  2. Prove that $n$ is odd $\implies n^2 + 3n + 2$ is composite.
    \begin{align*} & n \text{ is odd} \\ & \implies n^2 \text{ is odd and } 3n \text{ is odd} && \text{(odd } \times \text{ odd = odd)}\\ & \implies n^2 + 3n \text{ is even} && \text{(odd + odd = even)}\\ & \implies n^2 + 3n + 2 \text{ is even} && \text{(even + even = even)}\\ & \implies n^2 + 3n + 2 \text{ is composite} && \text{(2 is a factor)}\\ \end{align*}
Proposition: Use this approach to prove that for all natural number $n$, $9n^4 - 7n^3 + 5n^2 - 3n + 10$ is composite.

Odd$^2 = 8m + 1$

Proposition: The square of any odd integer has the form $8m + 1$ for some integer $m$.

Proof

Proof by division into cases.
Consider an integer $n$.
We know that $n = 4q \text{ or } n = 4q + 1 \text{ or } n = 4q + 2 \text{ or } n = 4q + 3$ due to quotient remainder theorem.
In the problem, $n$ is odd.
This implies $n \ne 4q$ and $n \ne 4q + 2$ (as $4q$ and $4q+2$ are even)
Hence, $n = 4q + 1$ or $n = 4q + 3$.

$(x^2 - y^2) \bmod 4 \ne 2$

Proposition: There is no solution in integers to: $(x^2 - y^2) \bmod 4 = 2$.

Proof

Proof by division into cases.

In all these four cases, $(x^2 - y^2) \bmod 4 \ne 2$.

Problems for practice

Prove or disprove the following propositions:

Bogus Proofs

Prove 1 = 2

Proof using basic algebra (Invalid)

\begin{align*} & a > 0, b > 0 && \text{(Given)}\\ & a = b && \text{(Given)}\\ &\implies ab = b^2 && \text{(Multiply both sides by } b\text{)}\\ &\implies ab - a^2 = b^2 - a^2 && \text{(Subtract } a^2 \text{ from both sides)}\\ &\implies a(b - a) = (b + a)(b - a) && \text{(Factoring)}\\ &\implies a = b + a && \text{(Divide both sides by } (b - a)\text{)}\\ &\implies 0 = b && \text{(Subtract } a \text{ from both sides)}\\ &\implies b = 2b && \text{(Add } b \text{ to both sides)}\\ &\implies 1 = 2 && \text{(Divide both sides by } b\text{)}\\ \end{align*}

Error

Proof using basic algebra (Invalid)

\begin{align*} & n^2 + 2n + 1 = (n + 1)^2 && \text{(Expand)}\\ &\implies n^2 = (n + 1)^2 - (2n + 1) && \text{(Subtract)}\\ &\implies n^2 - n(2n + 1) = (n + 1)^2 - (2n + 1) - n(2n + 1) && \text{(Subtract)}\\ &\implies n^2 - n(2n + 1) = (n + 1)^2 - (n + 1)(2n + 1) && \text{(Factoring)}\\ &\implies n^2-n(2n + 1) + (2n + 1)^2/4 = (n + 1)^2 - (n + 1)(2n + 1) + (2n + 1)^2/4 && \text{(Add)}\\ &\implies (n - (2n + 1)/2)^2 = ((n + 1) - (2n + 1)/2)^2 && \text{(Simplify)}\\ &\implies n - (2n + 1)/2 = (n + 1) - (2n + 1)/2 && \text{(Square roots)}\\ &\implies n = n + 1 && \text{(Add)}\\ &\implies 1 = 2 && \text{(Subtract)}\\ \end{align*}

Error

Proof using calculus (Invalid)

\begin{align*} & \int u \,dv = uv - \int v \,du && \text{(Product rule)}\\ & \text{Set } u = \frac{1}{x} \text{ and } v = x \text{; We get } du=-\frac{1}{x^2} \,dx \text{ and } dv = \,dx \\ &\implies \int \frac{1}{x} \,dx = x \cdot \frac{1}{x} - \int x \cdot \left( - \frac{1}{x^2} \right) \,dx && \text{(Substitute)}\\ &\implies \int \frac{1}{x} \,dx = 1 + \int \frac{1}{x} \,dx && \text{(Simplify)}\\ &\implies 0 = 1 && \text{(Subtract)}\\ &\implies 1 = 2 && \text{(Add)}\\ \end{align*}

Error

Proof using algebra and calculus (Invalid)

\begin{align*} & x \ne 0 && \text{(Given)}\\ & x = x && \text{(Given)}\\ &\implies x + x = 2x && \text{(Add)}\\ &\implies \underbrace{x + x + \cdots + x}_{x \text{ times}} = x^2 && \text{(Repeatedly add } x \text{ times)}\\ &\implies \underbrace{1 + 1 + \cdots + 1}_{x \text{ times}} = 2 x && \text{(Differentiate)}\\ &\implies x = 2x && \text{(Simplify)}\\ &\implies 1 = 2 && \text{(Divide)}\\ \end{align*}

Error

Proof using continued fractions (Invalid)

Error

Proof using infinite series (Invalid)

\begin{align*} & \text{Let } S = 1 - 1 + 1 - 1 + \cdots \\ &\implies S = (1 - 1) + (1 - 1) + \cdots = 0 + 0 + \cdots = 0 \\ &\implies S = 1 + (- 1 + 1) + (- 1 + 1) + \cdots = 1 + 0 + 0 + \cdots = 1 \\ &\implies 0 = 1 && \text{(} S = 0 \text{ and } S = 1 \text{)}\\ &\implies 1 = 2 && \text{(Add)}\\ \end{align*}

Error

Proof using set theory (Invalid)

Error

Proof using geometry (Invalid)

Error

Proofs

Elisha Scott Loomis' book "The Pythagorean Proposition" presents 367 correct proofs of the theorem (algebraic proofs + geometric proofs + trigonometric proofs).