Survey

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts

Foundations of mathematics wikipedia, lookup

List of important publications in mathematics wikipedia, lookup

Brouwer–Hilbert controversy wikipedia, lookup

Turing's proof wikipedia, lookup

Elementary mathematics wikipedia, lookup

Poincaré conjecture wikipedia, lookup

Georg Cantor's first set theory article wikipedia, lookup

Collatz conjecture wikipedia, lookup

Fundamental theorem of algebra wikipedia, lookup

Four color theorem wikipedia, lookup

Theorem wikipedia, lookup

Wiles's proof of Fermat's Last Theorem wikipedia, lookup

Mathematical proof wikipedia, lookup

Proofs of Fermat's little theorem wikipedia, lookup

Transcript
```Chapt 2.1 Proof Techniques
Proofs, Recursion and Analysis of Algorithms
Motivations




1
Formal logic allows to perform detailed, direct proofs of the
validity of arguments.
However, proofs in formal logic can be rather long and complex
In many situations we are not interested in the validity of an
argument but if a conjecture is correct in a given interpretation.
We have to be able to proof not only if something is correct but
also if it is wrong. To be able to do this and to facilitate the
proof of a large range of problems we need a variety of different
proof techniques.
Proof Techniques
1
Informal Proofs
2




In general we want to prove a conjecture P  Q in a specific
context.
Once a conjecture is proven it becomes a theorem.
Conjectures are often created based on inductive reasoning.
Inductive reasoning describes the process of drawing
conclusions based on a number of experiences.
To prove a conjecture we have to apply deductive reasoning
where the truth or falsity is verified by evaluating or
transforming the conjecture.
Proof Techniques
Informal Proofs
3

Proofs are often presented in a narrative form, taking advantage
of the properties of the specific context to allow shorter proofs.
– Note: Informal proofs have to contain enough detail to be
reproduceable and to be translated into a formal proof by
introducing the rules specific to the context.
– In informal proofs conjectures like ( x)(P(x)  Q(x)) are
mostly formulated as P(x)  Q(x) where the quantifier is
maintained only implicitly. In formal logic this would be
achieved by applying universal instantiation and then later
universal generalization.
Proof Techniques
2
Proof Techniques
4

Informal proof methods :





Disproof by counterexample
Proof by exhaustion
Direct proof
Proof by contraposition
Proof Techniques
Terms
5

A few terms to remember:



Axioms: Statements that are assumed true.
• Example: Given two distinct points, there is exactly
one line that contains them.
Definitions: Used to create new concepts in terms of
existing ones.
Theorem: A proposition that has been proved to be true.
• Two special kinds of theorems: Lemma and
Corollary.
• Lemma: A theorem that is usually not too interesting
in its own right but is useful in proving another
theorem.
• Corollary: A theorem that follows quickly from
another theorem.
Proof Techniques
3
Proof by Counterexample
6



Inductive Reasoning: Drawing a conclusion from a hypothesis
based on experience. Hence the more cases you find where P
follows from Q, the more confident you are about the conjecture
P  Q.
Deductive reasoning is applied to the same conjecture to ensure
that it is indeed valid.
Deductive reasoning can look for a counterexample that
disproves the conjecture, i.e. a case when P is true but Q is false.
Proof Techniques
Counterexample
7


To prove that a conjecture is false it is sufficient to find a single
Example: Prove or disprove:
For any positive integer n, n2  10 + 5n.
n
n2
10+5n
n2 < 10+5n
0
0
10
yes
1
1
15
yes
2
4
20
yes
3
9
25
yes
4
16
30
yes
5
25
35
yes
6
36
40
yes
7
49
45
False
Proof Techniques
4
Counterexample
8



More examples of counterexample:

All animals living in the ocean are fish.

Every integer less than 10 is bigger than 5.
There is no general way to find a specific counterexample.
Moreover, there is no mechanical way to determine if a
conjecture is true or false.
Counter example is not trivial for all cases, so we have to use
other proof methods.
Proof Techniques
Exhaustive Proof
9




If dealing with a finite domain in which the proof is to be shown
to be valid, then using the exhaustive proof technique, one can
go over all the possible cases for each member of the finite
domain.
Final result of this exercise: you prove or disprove the theorem
but you could be definitely exhausted.
This proof technique can only be applied if the set of cases is
finite.
One example of an exhaustive proof technique are truth tables in
propositional logic.
Proof Techniques
5
Example: Exhaustive Proof
10

Example: For any positive integer less than or equal to 5,
the square of the integer is less than or equal to the sum of
10 plus 5 times the integer.
n
n2
10+5n
n2 < 10+5n
0
0
10
yes
1
1
15
yes
2
4
20
yes
3
9
25
yes
4
16
30
yes
5
25
35
yes
Proof Techniques
Example: Exhaustive Proof
11

Example :
Every even integer between 4 and 6 is the product of exactly
2 prime numbers.
Number of cases:
4=2*2
6=2*3
Proof Techniques
6
Direct Proof
12


Direct Proof:
Used when exhaustive proof doesn’t work. Using the rules of
propositional and predicate logic, prove P  Q.
Hence, assume the hypothesis P and prove Q. Hence, a formal proof
would consist of a proof sequence to go from P to Q.
Proof Techniques
Direct Proof Example
13

Example: If an integer is divisible by 6, then twice that integer is
divisible by 4.
Proof:
Since x is divisible by 6, x can be written as x = 6k where k is
an integer.
We have 2x = 2 * (6k) = 12k = 4 *(3k).
Since 3k is an integer, 2x is divisible by 4.
Proof Techniques
7
Direct Proof Example
14

Consider the conjecture :
x is an even integer Λ y is an even integer  the product xy is an even
integer. OR:
(x) (y)(x is an even integer Λ y is an even integer  xy is an even
integer)
Formal Proof:
A complete formal proof sequence might look like the following:
1.
x is an even integer Λ y is an even integer
hyp
2.
(x)[x is even integer (k)(k is an integer Λ x = 2k)]
number
fact (definition of even integer)
3.
x is even integer (k)(k is an integer Λ x = 2k)
2,ui
4.
y is even integer (k)(k is an integer Λ y = 2k)
2,ui
5.
x is an even integer
1,sim
6.
(k)(k is an integer Λ x = 2k)
3,5,mp
7.
m is an integer Λ x = 2m
6, ei
8.
y is an even integer
1,sim
Proof Techniques
15
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
Direct Proof Example (contd.)
(k)(k is an integer Λ y = 2k)
4,8,mp
n is an integer and y = 2n
9, ei
x = 2m
7,sim
y = 2n
10, sim
xy = (2m)(2n)
11, 12, substitution of equals
xy = 2(2mn)
13, multiplication fact
m is an integer
7,sim
n is an integer
10, sim
2mn is an integer
15, 16, number fact
xy = 2(2mn) Λ 2mn is an integer
14, 17, con
(k)(k is an integer Λ xy = 2k)
18,eg
(x)((k)(k is an integer Λ x = 2k)  x is even integer) number fact
(definition of even integer)
(k)(k an integer Λ xy = 2k)  xy is even integer
20, ui
xy is an even integer
19, 21, mp
Proof Techniques
8
Direct Proof Example (cont’d.)
16
Direct Proof:
The above lengthy proof can be done by using narrative and
proved using a shorter informal direct proof.
Proof:
Let x = 2m and y = 2n, where m and n are integers.
Then xy = (2m)(2n) = 2 (2mn) = 2k where k= 2mn and is an
integer.
Thus xy has the form 2k. Based on the definition of even
number, xy is therefore even.
Proof Techniques
Proof by Contraposition
17





Use the variants of P  Q to prove the conjecture. From the
inference rules of propositional logic, we know a rule called
contraposition (termed “cont” in short).
It states that (Q  P)  (P  Q) (a Tautology).
Q  P is the contrapositive of P  Q.
Hence, proving the contrapositive implies proving the
conjecture.
The contrapositive is different from the converse of a
conjecture.

The converse Q  P is not tautologically equivalent to the
conjecture P  Q and proving the converse does not prove
the conjecture.
Proof Techniques
9
Proof by Contraposition
18

Example: Prove that if the square of an integer is odd, then the
integer must be odd




Hence, prove n2 odd  n odd
To do a proof by contraposition prove n even  n2 even
If n is even, then it can be written as 2m where m is an integer, i.e.
even/odd.
Then, n2 = 4m2 which is always even no matter what m2 is because
of the factor 4.
Proof Techniques
Example: Proof by Contraposition
19


Example: If x is positive, so is x + 1.
Example: If there are more than n assignment sheets given out
to n students, then some student gets more than one assignment
sheet.
Proof Techniques
10
20



Proof by contradiction uses again a transformation of the
original conjecture as P Λ Q. Here the argument P Λ Q  0 is
proven.
Derived from the definition of contradiction which says
P Λ Q  0
we use the fact that (P Λ Q  0)  (P  Q) is a tautology.
In a proof of contradiction, one assumes that the hypothesis and
the negation of the conclusion are true and then to deduce some
Proof Techniques
21

Example 1: Prove that “If a number added to itself gives itself,
then the number is 0.”




The hypothesis (P) is x + x = x and the conclusion (Q) is x = 0.
Hence, the hypotheses for the proof by contradiction are:
x + x = x and x 0 (the negation of the conclusion)
Then 2x = x and x 0, hence dividing both sides by x, the result is 2
= 1, which is a contradiction.
Hence, (x + x = x)  (x = 0).
Proof Techniques
11
22

Example 2: Prove “For all real numbers x and y, if x + y  2,
then either x 1 or y 1.”
Proof Techniques
23

Example 3: The sum of even integers is even.






Proof: Let x = 2m, y = 2n for integers m and n
P: (x is even) Λ (y is even)
Q: (x + y) is even.
Q’ assumes that x + y is odd.
From original P we have x + y = 2m + 2n ,
From Q’, we have x + y = 2k + 1
So we have x + y = 2m + 2n = 2k + 1 for some integer k.
Hence, 2*(m + k - n) = 1, where m + n - k is some integer.
This is a contradiction since 1 is not even.
Proof Techniques
12
Summarizing Proof techniques
24
Proof Technique
Approach to prove P  Q
Remarks
Exhaustive Proof
Demonstrate P  Q
for all cases
May only be used for
finite number of cases
Direct Proof
Assume P, deduce Q
The standard approachusually the thing to try
Proof by
Contraposition
Assume Q, derive P
Use this Q if as a
hypothesis seems to
give more ammunition
then P would
Proof by
Assume P Λ Q , deduce a
Use this when Q says
something is not true
Serendipity
Not really a proof
technique
Fun to know
Proof Techniques
Exercise: Which Proof technique is used?
25


Example 1:
Conjecture: There are more odd natural numbers smaller than 10
that there are even ones.
Proof: There are 5 odd natural numbers smaller than 10 (1, 3, 5,
7, and 9).
There are 4 even ones (2, 4, 6, and 8).
Therefore there are more odd natural numbers smaller than 10
than there are even ones.
Proof Technique:
Proof Techniques
13
Exercise: Which Proof technique is used?
26

Example 2:
Conjecture: The sum of an even and an odd integers is odd.
Proof: Let n = 2* k and m = 2 * h + 1 be an even and an odd
integer, respectively. (k and h are integers).
Then their sum is m+n = 2*k +2 *h + 1 = 2 (k +h)+1 and thus
odd.
Proof Technique:
Proof Techniques
Exercise: Which Proof technique is used?
27

Example 3:
Conjecture: If the product of two integers is even, then at least
one of the integers is even.
Proof:
Assume both integers are odd, then their product is
m = (2 *k+1) (2*h+1)
= 4kh +2k + 2h + 1
= 2 (2kh +k +h) + 1 and thus odd.
Proof Technique:
Proof Techniques
14
Exercise: Which Proof technique is used?
28

Example 4:
Conjecture: The sum of two odd integers is even.
Proof:
Suppose the sum m is odd. Then there is an integer k such that m
= 2 * k+1.
Since m is the sum of two integers, it can be written as
2 * k+1 = x + y
and therefore at least one of the two integers has to be even.
Proof Technique:
Proof Techniques
15
```