Writing Proofs
The idea of a proof is to show that a statement is definetly and unequivocally true. This is done by providing a logical argument that shows that the statement is true. There are three different types of statements:
- Theorem: A statement that is known to be true and therefore can and has been proven.
- Conjecture: A statement that is believed to be true or false but has not been proven yet.
- Disproof: A statement that is known to be false and therefore can and has been disproven.
When writing a proof we are trying to show that a conjecture is actually a theorem.
Prooving Conditional Statements
We start with the basic building block of proofs, the conditional statement. The conditional statement is a statement of the form "If P then Q", . P is often called the hypothesis and Q is called the conclusion.
So the first step in writing a proof is to write the statement that we want to prove in the form of a conditional statement. This can be done for almost all mathematical statements that we want to prove.
Why do we use conditional statements? Because they are easy to prove if we know that the hypothesis is true then we can show that the conclusion is true thanks to truth table of the conditional statement and the logical inference rule of modus ponens. So in other words we must show that the condition of P being true forces Q to be true.
As a reminder, the truth table of the conditional statement is:
and the logical inference rule of modus ponens is:
Some examples of conditional statements that we might want to prove are:
- If is an integer and is even, then is even.
- If is an integer and is odd, then is odd.
Direct Proof
Direct proof is the most common type of proof. It is a proof that starts with the hypothesis and then uses logical inference rules and known mathematical facts, properties, rules and theorems to show that the conclusion is true.
So the setup is pretty simple, we start with the hypothesis and then we write "Proof" to indicate that we are starting the proof. Then we write the conclusion starting with "therefore" or "thus" or "so" to indicate that we are showing that the conclusion is true. To show that the proof is then completed after the conclusion we often write "QED" which stands for "Quod Erat Demonstrandum" which is Latin for "that which was to be demonstrated" or we draw a square at the end of the proof . Inbeween we write the logical steps that show that the conclusion is true.
If P, then Q
Proof: Suppose P is true..
- Some logical steps...
Therefore Q is true...
If is an integer and is odd, then is odd.
Proof: Suppose is an integer and is odd.
- Then for some integer , by the definition of an odd integer.
- Thus .
- So for some integer and where .
- Thus for some integer .
Therefore is odd, by the definition of an odd integer.
Proof by Cases
When proving a statement is true, we sometimes have to examine multiple cases to show that the statement is true for all possible scenarios. By splitting up the proof into multiple cases it can make finding the proof easier but also easier to understand. However, when using proof by cases we must make sure that the cases are exhaustive. That is, we must show that all possible cases are covered.
If P, then Q
Proof: Suppose P is true..
Then we can consider the following cases:
Case 1: Suppose something.
- Then some logical steps...
Case 2: Suppose something else.
- Then some logical steps...
These cases show that Q is true...
If is an integer then is a multiple of 4.
Proof: Suppose is an integer.
Then we can consider the two cases where is even or is odd. Let's consider these two cases separately:
Case 1: Suppose is even.
- Then for some integer and .
- Thus , which is a multiple of 4.
Case 2: Suppose is odd.
- Then for some integer and .
- Thus , which is a multiple of 4.
These cases show that is always a multiple of 4.
Sometimes two or more cases are almost the same and it can be annyoing to write them out separately. In these cases we can say that the other case is the same as the first case and then we can combine the cases into one case. This is called "without loss of generality" or WLOG.
If two integers and have opposite parity, then their sum is odd.
Proof: Suppose and are integers with opposite parity.
Without loss of generality, let's consider the case where is even and is odd.
- Then and for some integers and .
- Thus , which is odd.
Therefore, the sum of two integers with opposite parity is odd.
Contrapositive Proof
Contrapositive proofs work just like direct proofs by using logical inference rules and known mathematical facts, properties, rules and theorems to show that the conclusion is true. The only difference is that we prove the contrapositive of the original statement. So rather than proving the statement "If P then Q", we prove the statement "If not Q then not P". We do this because in some cases it is easier to prove the contrapositive statement than the original statement. However, we must be careful when creating the contrapositive statement to make sure that it is equivalent to the original statement as in some cases you might need to use De Morgan's Laws to show that the contrapositive statement is equivalent to the original statement. As a reminder, here are De Morgan's Laws:
If we compare the truth table of the conditional statement and the contrapositive statement we can see that they are equivalent. Which is what allows us to use the contrapositive statement to prove the original statement.
The setup for a contrapositive proof is then slightly different from a direct proof.
If P, then Q
Proof: Suppose P is not true..
- Some logical steps...
Therefore Q is not true...
Lets compare the direct proof and the contrapositive proof of the statement "If is an integer and is even, then is odd."
Direct Proof:
Proof: Suppose is an integer and is even.
- Then for some integer .
- Subtracting from both sides gives .
- Thus .
- Consequently, , where .
Therefore, is odd by the definition of an odd integer.
Contrapositive Proof:
Proof: Suppose is not odd.
- Then is even, so for some integer .
- Then .
- Consequently, , where .
Therefore, is odd by the definition of an odd integer and therefore not even.
Proof by Contradiction
Unlike direct and contrapositive proofs, proof by contradiction can be used to prove any statement, not just conditional statements. The idea behind proof by contradiction is to assume that the statement we want to prove is false and then show that this assumption leads to non-sense or a contradiction. This contradiction then shows that the original statement must therefore be true. So for the statement we assume and performing some logical steps and arrive to a contradiction of the form .
P
Proof: Suppose for the sake of contradiction that is true.
- Some logical steps...
This leads to the contradiction . Therefore is true.
So in other words we prove that being true forces a contradiction so . To see that this is the same as prooving is true let's look at the truth tables of the different statements:
The square root of 2 is irrational.
Proof: Suppose for the sake of contradiction that the square root of 2 is not irrational, so it is rational.
- Then for some integers and and let's assume that and have no common factors, so is fully reduced.
- This means that and are not both even, so at least one of them is odd. Because if both were even then they would have a common factor of 2.
- Squaring both sides gives , so .
- This means that is even which implies that is even. Thus as we stated before and are not both even, so is odd.
- Since is even, for some integer . Plugging this into gives or .
- This means that is even which implies that is even. But we stated before that is odd, so we have a contradiction.
This leads to the contradiction that is both odd and even. Therefore the square root of 2 is irrational.
Proof by Contradiction of Conditional Statements
Using proof by contradiction we can prove simple statements as seen above but we can also use it to prove conditional statements. To prove a conditional statement by contradiction we assume that the statement is false or in other words that is true. However, from the truth table of the conditional statement we know that being false means that can still be true and can be false. So we assume that is true and is false and then we show that this assumption leads to a contradiction.
If P, then Q
Proof: Suppose for the sake of contradiction that is true and is false.
- Some logical steps...
This leads to the contradiction . Therefore is true.
If is an integer and is even, then is even.
Proof: Suppose for the sake of contradiction that is an integer and is even, then is not even so is odd.
- Then for some integer .
- Thus .
- So for some integer and where .
- Consequently, for some integer , so is odd by the definition of an odd integer.
This leads to the contradiction that is both even and odd. Therefore if is an integer and is even, then is even.
Prooving Biconditional Statements
Some statements can not be put into the form of a conditional statement but rather a biconditional statement. The biconditional statement is a statement of the form "P if and only if Q", . However, we know that is equivalent to , so we can prove a biconditional statement by proving the two conditional statements that make up the biconditional statement.
P if and only if Q
Proof:
If P, then Q: Suppose P is true..
- Some logical steps...
Conversely, if Q, then P: Suppose Q is true..
- Some logical steps...
Therefore P if and only if Q.
An integer is odd if and only if is odd.
Proof:
If is odd, then is odd.: Suppose is odd.
- Then for some integer .
- Thus .
- So for some integer and where .
- Consequently, for some integer , so is odd by the definition of an odd integer.
Conversely, if is odd, then is odd.: Suppose for the sake of contradiction that is odd and is not odd.
- Then is even, so for some integer .
- Then .
- So for some integer and where .
- Consequently, for some integer , so is even by the definition of an even integer.
- This leads to the contradiction that is both odd and even. Therefore if is odd, then is odd.
Therefore we've shown that an integer is odd if and only if is odd.
Universal and Existential Quantifiers
When we are proving conditional statements we are actually proving statements of the form . So by default we are actually already proving universally quantified statements. However, sometimes we want to prove an existential statement of the form . To prove an existential statement we must show that there exists at least one element that satisfies the statement. This can be done by providing an example of an element that satisfies the statement.
There exists an even prime number.
Proof: The number 2 is an even prime number.
However, often a single example is not enough to prove a conditional statement but rather we need to show that an example does exist. This is the difference between a constructive proof and a non-constructive proof. In a constructive proof we provide a specific example that satisfies the statement, while in a non-constructive proof we show that an example does exist but we don't provide a specific example.
Below is an example of a non-constructive proof for a conditional statement containing an existential statement.
If , then there exist integers and for which , where is the greatest common divisor of and .
This is a conditional statement with an existential statment embedded in it:
Proof: Suppose .
- Then the set is a set of all possible linear combinations of and .
- Let be the smallest positive integer in .
- Then for some integers and .
- To show that is the greatest common divisor of and we must show that divides both and .
- Let be the remainder when is divided by , so for some integers and where .
- Then .
- Therefore has the form and is in the set . However, so . And thus divides .
- Similarly, divides .
- Now we must show that is the greatest common divisor of and .
- We know that and for some integers and .
- Then .
- Thus is a multiple of and therefore .
- However, can't be greater than because is the smallest positive integer in .
Therefore, there exist integers and for which .
Uniqueness Proofs
Sometimes we want to show that there is only one element that satisfies a statement. In other words an existenial statement of the form "there exists a unique element such that ". So there is only exactly one element that satisfies the statement. To prove that there is only one element that satisfies the statement we must produce an element that satisfies the statement and then show that no other element satisfies the statement.
If , then there exists a unique real number such that .
Proof: Suppose and .
- Then is a real number that satisfies .
- To show that is unique we must show that no other real number satisfies .
- Suppose is another real number that satisfies .
- Then so and thus .
Therefore there exists a unique real number such that .
Disproving Statements
So far we have only looked at how to prove that a statement is true. However, sometimes we want to show that a statement is false. Just because we can't find a proof that a statement is true doesn't mean that the statement is false. So we want a way to show that a statement is always false. This is called a disproof, and the process of showing that a statement is false is called disproving.
The process of disproving is actually pretty simple, rather than proving that the statement is true we prove that the statement is false. This is done by showing that the negation of the statement is true. So if the statement is we show that is true.
Disproof of Universal Statements
We already know that by default a statement is actually a universally quantified statement of the form:
So to disprove a universal statement we must show that there exists at least one element that does not satisfy the statement, in other words:
This is called finding a counterexample to the statement. A counterexample is an element that does not satisfy the statement. Just providing a single counterexample isn't great, you should also show how the counterexample was found and why it is a counterexample.
For all integers , is a prime number.
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | | | 11 | 11 | 13 | 17 | 23 | 31 | 41 | 53 | 67 | 83 | 101 | 121 | 143 |
For , which is not a prime number. Therefore the statement is false.
Disproof: The statement "For all integers , is a prime number" is false. For a counterexample we can use where which is not a prime number.
The same goes for a conditional statement, to disprove a conditional statement we must show that there exists an element for which is true but is false as this makes the statement false.
If and are sets, then .
To see where the counterexample comes from we can draw two venn diagrams, one for the left hand side and one for the right hand side.
Disproof: The statement "If and are sets, then " is false. For a counterexample we can use , and . Then and . Therefore .
Disproof of Existential Statements
If we want to disprove an existential statement of the form:
We must proove the negation of the statement:
So in other words we must show that for all elements the statement is false. However this is again equivalent to just proving a universal statement. So to disprove an existential statement we do not use a counterexample but rather a proof that the statement is false for all elements.
There exists a real number such that .
Disproof: Suppose for the sake of contradiction that there exists a real number such that .
- Then must be positive as it is greater than the non-negative number .
- We can then devide the inequality by to get .
- And subtract 1 from all sides to get .
- We can then extract the factors of the left hand side to get and devide by to get .
- However the left hand side is always positive so we have a contradiction.
This leads to the contradiction that is both positve and negative. Therefore there exists no real number such that .
Notice that we used a proof by contradiction to disprove the statement. Because we want to disprove we show that is true. Then to prove that is true by contradiction we assume that is true which is equivalent to being true and then we show that this assumption leads to a contradiction. This is the same as proving that is false.
Proof by Induction
We have all been introduced to one of the problems that gauss solved as a child. The problem was to find the sum of the first natural numbers. Gauss solved this problem by noticing that the sum of the first natural numbers can be written as follows:
The question now is how could we actually prove this? I visual proof would be to write out the first natural numbers in a row and then write them out in reverse order below. Then we can see that the sum of the first and last number is , the sum of the second and second to last number is and so on.
So the result of the first natural numbers is . However, we can see that we have counted each number twice so we must divide by 2 to get the result . The problem with this proof is that it is not a proof but rather an explanation of why the formula is true, we want to prove that the formula is true for all .
This type of proof is often used in computer sciene where we want to prove that an algorithm has a certain time complexity. In those proofs we often have some recursive relation and using telescoping sums we can find a closed form solution to the sum. We can then prove that the closed form solution is the same as the recursive relation by using proof by induction.
This is where proof by induction comes in. We want to prove the statement "For all the sum of the first natural numbers is ". We notice that this statement is a universally quantified statement and could therefore also be written as a list of statements:
Proof by induction is exactly for this case where we have an infinite number of statements that we want to prove. The structure of a proof by induction is as follows:
- Base Case: Prove that the statement is true for the first element, .
- Inductive Hypothesis: Assume that the statement is true for some .
- Inductive Step: Show that if the statement is true for then it is also true for . Notice that this is an implication, so we are proving a conditional statement.
The analogy for why this works can be seen as a row of dominos. If we can show that the first domino falls (is true) and show that if the 'th domino falling causes the 'th domino to fall then all dominos must fall.
The statements are all true.
Proof:
- Base Case: Show that is true.
- Inductive Hypothesis: Assume that is true for some .
- Inductive Step: Show that if is true then is true, so .
Therefore, the statements are all true.
Because of the inductive hypothesis we know that the statement is true for so the left hand side of the implication is true. Then we must show that the statement is true for so the right hand side of the implication is true. This often involves some algebraic manipulation using the inductive hypothesis to show that the statement is true for .
For all , the sum of the first natural numbers is .
Proof:
- Base Case: For , the sum of the first natural number is .
- Inductive Hypothesis: Assume that the sum of the first natural numbers is .
- Inductive Step: Show that if the sum of the first natural numbers is then the sum of the first natural numbers is .
- Because of the inductive hypothesis we know the sum of the first natural numbers is .
- So we must show that the sum of the first natural numbers is .
- The sum of the first natural numbers is .
- By the inductive hypothesis we know that the sum of the first natural numbers is .
- So the sum of the first natural numbers is .
Therefore, for all , the sum of the first natural numbers is .
Strong Induction
hard to show that S_k implies S_k+1 but can show that some lower S_m implies S_k+1 for m < k
Assume that all S_k are true for k < n and show that this forces S_k+1 to be true.
Why do I need multiple base cases?
Smallest Counterexample
hybrid between induction and contradiction
Proofs Involving Sets
Combinatorial Proofs
??? annyoing
Resolution Proofs
????