A proof is a valid argument, that is used to prove the truth of a statement.
To build a proof, we need to use things previously introduced:
variables and predicates.
quantifiers.
laws of logic.
rules of inference.
Some terminology used:
Theorem
formal statement that can be shown to be true.
Axiom
a statement we assume to be true to serve as a premise for further arguments.
Lemma
a proven statement used as a step to a larger result rather than as a statement of interest by itself.
Formalising a theorem
Consider statement S: "There exists a real number between any two not equal real numbers"
S can be formalised as: ∀x,y∈R if x<y then ∃z∈R where x<z<y.
S is an example of a theorem.
Direct proof
A direct proof is based on showing that a conditional statement: p→q is true.
We start by assuming that p is true and then use: Axioms, definitions and Theorems, together with rules of inference to show that q must also be true.
Example
"There exists a real number between any two not equal real numbers"
Proof:
Let x,y be arbitrary elements in R
Let's suppose x<y
Let z=(x+y)/2
z∈R, satisfying x<z<y
Therefore, using the universal generalised rule, we can conclude that: ∀x,y∈R if x<y then ∃z∈R where x<z<y.
Proof by Contrapositive
A proof by contrapositive is based on the fact that proving the conditional statement p→q is equivalent to providing its contrapositive ¬q→¬p
We start by assuming that ¬q is true and then use axioms, definitions and theorems, together with rules of inference, to show that ¬p must be true.
Example
Proof of the theorem:
If n2 is even then n is even
Direct proof:
Let n∈Z. If n2 is even then ∃k∈Z, n2=2k
Then ∃k∈Z, n=±2k
From this equation it doesn't seem intuitive to prove that n is even.
Proof by contraposition:
Let's supposed n is odd.
Then ∃k∈Z, n=2k+1
Then ∃k∈Z, n2=(2k+1)2=2(2k2+2k)+1
Then n2 is also odd.
We have succeeded in providing the contrapositive: if n is odd then n2 is odd.
Proof by contradiction
A proof by contradiction is based on assuming that the statement we want to prove is false, and then showing that this assumption leads to a false proposition.
We start by assuming that ¬p is true and then use: Axioms, definitions and Theorems, together with rules of inference to show that ¬p is also false. We can conclude that it was wrong to assume that p is false, so it must be true.
Example
Let's give a direct proof of the theorem: "There are infinitely many prime numbers"
Proof
Let's suppose that there are only finitely many prime numbers
Let's list them as p1,p2,p3,...,pn where p1=2,p2=3,p3=5 and so on.
Let's consider the number c = p1p2p3...pn+1, the product of all prime numbers, plus 1.
Then, as c is a natural number, it has at least one prime divisor.
Then ∃k∈{1...n} where pk∣c (where pk divides c).
Then ∃k∈{1...n},∃d∈N where dpk=c=p1p2p3...pn+1
Then ∃k∈{1...n}, ∃d∈N where d=p1p2...pk+1...pn+pk1
Then, pk1, in the expression above, is an integer, which is a contradiction.
Can be used to prove that a propositional function P(n) is true for all positive integers.
The rule of inference:
P(1) is true∀k(P(k)→P(k+1))∴∀nP(n)
Intuition:
P is true for 1.
Since P is true for 1, it's true for 2.
Since P is true for 2, it's true for 3.
And so on...
Since P is true for n-1, it's true for n ...
In other words:
The base case shows that the property initially holds true.
The induction step shows how each iteration influences the next one.
Structure of induction
In order to prove that a propositional function P(n) is true for all, we need to verify 2 steps:
BASIS STEP: where we show that P(1) is true.
INDUCTION STEP: where we show that for ∀k∈N: if P(k) is true called inductive hypothesis, then P(k+1) is true.
Some uses of induction
Mathematical induction can be used to prove P(n) is true for all integers greater than a particular integer, where P(n) is a propositional function. Might cover multiple cases like:
Proving formulas
Proving inequalities
Proving divisibility
Providing properties of subsets and their cardinality.
The well-ordering property is an axiom about N that we assume to be true. The axioms about N are the following:
The number 1 is a positive integer.
If n∈N then n+1, the successor of n, is also a positive integer.
Every positive integer other than 1 is the successor of a positive integer.
The well-ordering property: every nonempty subset of positive integers has at least one element.
The well-ordering property can be used as a tool in building proofs.
Example
Let's reconsider the earlier statement P(n): ∀n∈N and n≥2, n is divisible by a prime number.
Proof
Let S be the set of positive integers greater than 1 with no prime divisor.
Suppose S is nonempty. Let n be its smallest element.
n cannot be a prime, since n divides itself and if n were prime, it would be its own prime divisor.
So n is composite: it must have a divisor d with 1 < d < n. Then, d must have a prime divisor d with 1 < d < n. Then, d must have a prime divisor (by the minimality of n), let's call it p.
Then p / d and d / n, so p/n, which is a contradiction.
Therefore S is empty, which verifies P(n).
Equivalence of the three concepts
We can prove the following statements:
mathematical induction -> the well-ordering property.
the well-ordering property -> strong induction.
strong induction -> mathematical induction.
That is, the principles of mathematical induction, strong induction and well-ordering are all equivalent.
The validaity of each of the 3 proof techniques implies the validity of the other 2 technicques.