You are on page 1of 16

Lecture #3 Mathematical Reasoning

Topics
1. Structure of a proof
2. Proofs by Case Analysis
3. Proofs by Contradiction
4. Existential and Universal Proofs
5. Proofs by Induction

1 Mathematical Reasoning
1.1 What is a Proof ????

 A proof of a statement is a mathematical argument for the statement.


 Also a proof of a statement serves as an explanation on why the statement
is true (mathematically).

 Proof is a general concept in that it can be applied to other contexts than


mathematics. eg. a software system, a machine, a manufacturing system,
or every day life arguments.

 Proof does not need to be expressed in a mathematical language.

Such

a proof is called informal proof, whereas proof expressed in a mathematical


language is called formal proof.

 In short, (Alan Bundy of Edinburgh Univ.)


(Formal) Proof = Explanation + (Mathematical) Guarantee.
1.2 Proof Statements and Structure of Mathematical Proofs

 A statement that can be shown formally to be true is called a theorem.


 In other words, a theorem is a claim with a proof.
 A claim without a proof is called a conjecture.
 However, conjectures are by no means trivial - they are hard to prove
formally. Mathematicians thought that intuitively those conjectures are
correct.

 Examples of Conjecture are


- Cantor's conjecture:
For in nite sets A and B , if jAj  jB j and jB j  jAj, then jAj = jB j.
- Fermat's Last Theorem:

:9 X ,Y ,Z ( X n + Y n = Z n ) where n > 2.
Pierre de Fermat (1601 - 1665) : A French Mathematician, A lawyer by
profession, One of the Greatest Mathematician of all times, One of the
inventors of Analytic Geometry, One of the founder of the foundations of
Calculus and Probability.
The Fermat's Last theorem has been proved in 1994 by an American Mathematician. The length of the proof is over 200 pages. The proof is based on
some results which was proved earlier by Japanese Mathematicians.

 A proposition is also a statement that can be shown to be true. But it is


not so hard to prove, nor of the main interest.

 To prove a theorem, it might require many arguments (steps of details).


If we put all such arguments into one place, then it is hard to read and then
to understand. Sometimes, we might notice that proofs of two theorems
share some common arguments.

 To organise proofs of a big theorem, we employ lemmas (lemmata ) and


corollaries.

Example 1.1 Organising a Theorem.


1) The following shows a structure of a proof of a theorem.
3

Theorem 1.1 x + 1 > x

for any x in .

Proof

QED.

Use Lemmas 1.1 and 1.2.

Lemma 1.1 x + 1 > x

for any x in Z+

Lemma 1.2 x + 1 > x

for any x in Z .

Corrolary 1.1 x + 1 6= x

[ f0g.

for any x in .

 A lemma is a result that we prove not for its own interest but because it
helps us to prove some theorems.

 A corollary is an immediate result which follows from lemmas, theorems


and/or other corollaries.

 In terms of programming,
a theorem is like a main procedure/program which uses many smaller
procedures,

a lemma is like such a small procedure,


a corollary is like a shell script (on UNIX) or a BAT le (on MS), which
uses explicitly existing programs.
Note that a program consists of a main procedure and many supporting
procedures. Moreover, a shell script or a BAT le itself is thought as a
program.

1.3 Necessary and Sucient Conditions

 When a statement A implies a statement B , ie. A ! B , we say that B


is a necessary condition for A. This is simply because it is necessary for B
to be true when A is true.
 If A ! B , we say that A is a sucient condition for B . This is because
the truth of A is sucient for us to calculate the truth of B .
 If A $ B , then we say A is both a sucient and necessary condition for
B , and vice versa. Also, we say A is equivalent to B .
1.4 Methods of Proving Theorems

 A direct proof of a statement is a proof that shows a direct explanation


on why the statement is true.

Example 1.2 Direct Proof

1) A direct proof of p ! q is to assume p and then to show that q must be


true. Why ??? See the truth table for implication.

 An indirect proof of a statement is a proof that implies that the statement


is true.

Example 1.3 Indirect Proof

1) An indirect proof of p ! q is to show that its equivalence, ie.


is true.

:q ! :p,

1.5 Proofs by Case Analysis (Exhaustion of Cases)

 A proof may be performed by demonstrating the validity of a statement


for all possible cases.

Example 1.4 Proof by Exhaution of Cases


Theorem 1.2 x + 1 6= x

for any x in

Z where 0  x  3.

There are four cases where x is 0, 1, 2 and 3.


case 1) where x = 0. It is obvious that 0 + 1 6= 1 is true.
case 2) where x = 1.

...

case 3) where x = 2.

...

case 4) where x = 3.

...

QED.

1.6 Proofs by Contradiction

 It is invented by Euclid (father of geometry : 300 BC).


 It is called reductio ad absurdum (in Latin) : reduction to an absurdity.
 To prove that some result P is true, we look at what would happen if we
start by assuming that P is false.

 If this assumption leads to a contradiction (ie. ? is derived), then this


means that it was wrong to assume P was false - and we conclude that P
must be true after all.

 Note that this proof method uses the property that a statement that we
want to prove is either true or false. There is no other truth value than the
two.
6

Theorem 1.3 Show that (:q

_ q) is true.

Proof

_ :q) is false.
Thus, it follows that :(q _ :q ) is true. (since R is false , :R is true)
Therefore, :q ^ q is true (by distributing : over ^).
The contradiction arises. Thus, it must be that q _ :q is true.
QED.
Assume that (q

1.7 Proving Theorems about Quanti ers

 Many theorems are stated as sentences that involve quanti ers.


1.7.1

Existential Proofs

 Many theorems are assertions that objects of a particular type exist.


 A theorem of this type is a proposition of the form 9X p(X), where p is
a predicate symbol.

 A proof of a proposition of the form 9X p(X) is called existence proof.


 There are several ways to prove a theorem of this type.
a) An existence proof of 9X p(X) can be given by nding an element a such
that p(a) is true. Such a proof is called constructive.
b) Another way to show the existential proof is to use proof by contradiction
to show that :9X p(X) implies a contradiction. Such a proof is called non-

constructive.

Example 1.5 Existential Proofs

1) Show that, for any arbitrary N 2 Z,


Suppose M =

9M 2 Z (N < M ).

N + 5.
Obviously, N < (N + 5) for any arbitrary N .
Thus, it follows that 9M ( N < M ) for any arbitrary N . Note that in
FOL, the theorem p(a) ! 9X p(X) holds. where a is a ground term.
1.7.2

Universal Proofs

 Several theorems are assertions that a property holds for every object of
a particular type.

 A theorem of this type is a proposition of the form 8X p(X).


 One way to prove the universal theorem is by showing that the theorem
is true for an arbitrary object of the particular type.

Theorem 1.4

8N 2 N (N 6= N + 2)

Proof
Suppose that i is an arbitrary natural number. Obviously, i =
6 i + 2 is true.

Since i is arbitrary, it follows that 8N (N 6= N + 2). Note that in FOL, this


is captured by universal generalisation rule.

QED.

 A way to prove that a universal theorem does not hold is by demonstraring


that the universal theorem fails to hold for a particular case.

 In other words, we can show that a universal theorem fails by nding its
counterexample.
8

Theorem 1.5

:8N 2 N (prime(N) ! odd(N))

Proof
We shall show that

8N

(prime(N)

! odd(N)) is false by illustrating that

the formula fails to hold for an instance of N.


It is not hard to see that 2 is prime since it is divisible by only 1 and itself.
However, 2 is not an odd number. Thus, 2 is the counterexample.
Thus, it follows that 9N

2 N :(prime(N) ! odd(N)).
, :8N 2 N (prime(N) ! odd(N)).

QED.

1.8 Proofs by Induction

 It is known from the work by F. Maurolico :

1494 - 1575, which proved


that the sum of the rst n odd positive integers equals n2 .

 For all natural numbers n :

0 + 1 + 2 + 3 + ... + n =
Is this correct ?

n(n+1)
2

 We do not have time to check it individually

whether this sentence is

correct, since there there are in nite numbers of natural numbers.

 A proof technique called Induction can be used to show a property involving in nitely many cases.

 The validity of mathematical induction follows from the following fundamental axiom about the set of integers.
The Well-Ordering Property : Every non-empty set of non-negative integers has a least element.
9

1.9 The Principle of Mathematical Induction


De nition 1.1 Mathematical Induction
A proof by mathematical induction that property (or proposition) P(n) is
true for every natural number n consists of two steps:
1) Basic Case : Show that P(0) is true.
2) Inductive Case : Show that the implication P(m)

! P(m+1) is true for

every positive integer m.

 P(m) in step (2) is called the inductive hypothesis.


 A way to show that the implication in step (2) holds is by assuming P(m)
which is the inductive hypothesis, and then proving that P(m+1) follows.

 When we complete both steps of a proof by mathematical induction, we


have proved that P(n) is true for all natural numbers n, ie. 8N P(N) is
true.
Why ???? Discuss ????
ANS: N = f 0, 1, 2, 3, ... g. The base case shows that P(0) holds. It follows
from the inductive step that P(1), P(2), ..., P(n) for any n
implication P(m)

! P(m+1) where m 2 N.

2 N due to the

|> Figure 3 (p. 186 [Ro95])

 The principle of Mathematical Induction can be expressed as the following


axiom schema:
[ P(0)

^ 8N (P(N) ! P(N+1)) ] ! 8M P(M)


10

 The mathematical induction is a valid technique due to the well-ordering


property. You can always nd the base case for any set of consecutive
non-negative integers.

Example 1.6 Mathematical Induction

n(n+1)

for any natural number n.


2
Let P(n) denotes this equation. So we need to show that P(0) holds and
1) Show that 1 + 2 + ... + n =

then the implication P(i)

! P(i+1) is true, for any natural number i.

Base Case: P(0)


The following is true,

0=

0(0+1)
2

Inductive Case:
Assume that P(i), where i is an arbitrary natural number, is true, that is
i(i+1) (The Inductive Hypothesis)
P(i) :
1 + 2 + ... + i = 2
To show that P(i+1) is true, start on the left hand side of the equation for
P(i+1):
1 + 2 + ... + i + (i+1) = (1 + 2 + ... + i) + (i + 1)

=
=
=
=

i(i+1)

(associativity: A + (B + C) = (A + B) + C )

+ (i+1)
2
i(i+1)+2(i+1)
2
(2+i)(i+1)
2
(i+1)((i+1)+1)
2
11

(by the inductive hypothesis)


(arithmetic)
(arithmetic)
is just P(i+1)

The last term is exactly P(i+1). Thus, it follows that P(i)


Consequently, 8n 2 N P(n).

P(i+1).

QED.

Example 1.7 Mathematical Induction

1) Show that the sum of the rst n odd positive integers is n2 . Let P(n)
denote this statement.
Base Case: P(1)
The following is true,

1 = 12, where the sum of the rst odd positive

integer is just 1.
Inductive Case:
Assume the following P(i) for an arbitrary positive integer.
1 + 3 + 5 + ... + (2i - 1) = i2

Note that (2i - 1) stands for the ith odd positive integers. Thus, we must
show that P(i+1) is true. The following holds.
1 + 3 + 5 + ... + (2i - 1) + (2i + 1) = i2 + (2i + 1)
(by the inductive hypothesis)

= (i + 1)2

QED.

This is just P(i + 1).

There is an equipvalent form of natural number induction that has a

stronger-looking induction hypothesis.

12

De nition 1.2 The Second Form of Mathematical Induction


To show that P(n) is true for all natural numbers n, it is sucient to prove
that for any natural number m,
if P(i) is true for all i <

m, then P(m) must also be true.

 In this form of induction, there is no base case, only an induction step.


 The second form of natural number induction is sometimes called strong
induction or complete induction.

Example 1.8 The Second Form of Mathematical Induction


1) Show that for every positive integer n,
(n

> 1) ! (n can be written as the product of prime(s))

Let P(n) denotes this statement.


Assume that P(i) is true for all positive integers i with i

< m.

We shall

show that P(m) also holds under this assumption. There are two cases to
consider.
a) m is prime.
Immediately, P(m) is true since m is the product of itself.
b) m is not prime.
Thus, m = a

 b where 1 < a  b < m. (by the de nition of non-primes).

By the inductive hypothesis which states that P(a) and P(b) are true, both

a and b can be written as the product of primes. Thus, m can be written


as the product of primes, namely, those primes in the factorisation of a and
those in the factorisation of b.

QED.
13

 It is worth observing that the ordinary mathematic induction is not suitable for proving this theorem. Why ?????

 For example, the fact that the interger 1,311,819 is a product of primes,
is of no help in showing that 1,311,820 is also a product of primes.
1.9.1

Well-Founded Induction

 All the forms of induction we have discussed so far are instances of a


general form of induction on what are called \well-founded relations".

De nition 1.3 Well-founded Relation

A is a binary relation  on A with the


property that there is no in nite descending sequence a0  a1  a2  ....
A well-founded relation on a set

 An example of the well-founded relation is i  j if j = i + 1 on the natural


numbers.

 It is easy to see that every well-founded relation is irre exive.


De nition 1.4 Well-founded Induction

Let  be a well-founded binary relation on set A and let P be some property


on A.

If ( 8x

2 A (8y 2 A ( y < x ! P(y) ) ) ! P(x) then 8z 2 A P(z)

 The base case is implicit in this de nition.


 In such a well-founded set A, any element x can be either a minimal
element or a non-minimal element.
14

 In case that x is minimal, called u, the following can be obtained from


the well-founded induction.
If (8y

2 A ( y < u ! P(y) ) ) ! P(u) then 8z 2 A P(z)

which is equivalent to
If P(u) then 8z

2 A P(z)

 This is the implicit base case for the well-founded induction.


 In case that x is non-minimal, called v, the following can be obtained
from the well-founded induction.
If ( 8y

2 A ( y < v ! P(y) ) ) ! P(x) then 8z 2 A P(z)

 This is the inductive step for the well-founded induction.


 Note that if the set A is the set of natural numbers, then these two statements of the well-founded induction reduce to the ordinary mathematical
induction.

Example 1.9 Well-founded Induction


Consider the following procedure.

procedure factorial(n: integer)


if n = 0 then
else

factorial(n) := 1
factorial(n) := n * factorial(n - 1)

Will a call factorial(n) always terminate ?


We shall show that the call to factorial(n) for all n  0, terminates.
Clearly, factorial(0) terminates, because factorial(0) = 1.
15

To prove that the factorial(i) terminates for any

rial(j) terminates for all 0  j

< i.

i > 0, assume that facto-

It follows from the inductive hypothesis that factorial(i-1) terminates. Thus,


by the \else" clause, i * factorial(i-1) produces a result. Hence, factorial(i)
terminates.

Note that the call factorial(n) where

n<

0 will not terminate. For

instance, factorial(-1) will call factorial(-2), factorial(-3), ..., which creates


an in nite descending sequence (looping).

16

You might also like