Proofs
Contents
1.3. Proofs#
Now that we have a solid understanding of propositional and predicate logic, it is time to actually put them to use. In this section we will examine a few proof methods—strategies to formally prove something. Then, we will see lots of examples of putting them to use.
We have already seen equivalence proofs as one kind of proof. “Proof by truth table” is also another valid option for proving equivalence. Here, we look to prove more general statements that cannot (easily) be proved by a truth table.
1.3.1. Theorems#
In mathematics, a proof is a very formal thing.
Definition (proof)
A proof is a precise, formal, and valid argument which establishes the truth of a statement.
Much like how satisfiability and consistency have direct applications to computer science, so too do mathematical proofs. For example:
computer and software system verification;
cybersecurity and cryptography;
artifical intelligence; and
guaranteeing algorithm correctness.
But to find a proof, we must first begin with something to prove. In mathematics we have several different categories of “provable” things.
Definition (theorem)
A theorem is a formal statement that can be shown to be true. It establishes a truth from which other theorems can be proved, or algorithms constructed.
Definition (lemma)
A lemma is a formal statement that can be shown to be true, and is used as part of the proof of another theorem. It is a “helper theorem”.
Definition (proposition)
A proposition is a formal statement that can be shown to be true, but the importance of this fact is less than that of a theorem.
Definition (corollary)
A corollary is a special case of a theorem, lemma, or proposition. It follows directly from a theorem and is not typically proved explicitly. Corollaries are stated to show an “important result” or “important implication” of of a theorem.
Definition (conjecture)
A conjecture is a formal statement that is likely to be true, but has not yet been proved to be true. Once proven to be true, it may become a formal theorem or lemma.
Regarless of whether we are dealing with a theorem, a lemma, or a proposition, the way they are stated and the way they are proved remains the same. So, all of the remaining content in this section applies to a theorem, lemma, etc. We will simply use “theorem” for consistency.
A rose by any other name would smell as sweet.
—Shakespeare
Theorem Statements#
Theorems are typically stated as inferences or biconditionals. “If
Moreover, this structure of using “let
With a little practice, we can extract the impliciation from such statements. Indeed, the “language of mathematics” is itself a language, and we need to understand it through practice.
Implicit implications
Consider the following theorem statement.
Theorem
Let
This also means:
“If
Which also means:
“For all positive real numbers
Notice that the last statement in this previous example is the closest to being a direct translation to predicate logic.
Let
Translating theorems
Translate the following theorems to quantified logic statements.
“
holds for any real number ”“Suppose
and are integers such that . Then, must be the sum of squares of two integers.”
Translating theorems
Let
. Let the domain of be all real numbers.Let
. Let . The domains of are the integers.
Proving “obvious” theorems#
Sometimes, certain statements are obviously true. Nonetheless, a simple and straight-forward proof is needed. Often, such proofs are used to prove larger or more complex theorems. Here, we will look at two such kinds of proofs before starting “real” proofs.
Consider the implication
Trivial proof
Proposition
If it is raining, then 1=1.
Proof:
This implication is trivially true since
Another obvious proof for implications
Vacuous proof
Proposition
If the door is both open and closed,
Proof:
This implication is trivially true since the premise is always false (by the law of complementation). The truth value of the conclusion does not matter.
1.3.2. Direct Proofs#
A direct proof is one of the most straight-forward types of proofs.
If we wish to prove the statement
Another way of defining a direct proof is the following. If we want to prove a statement
Before we see some examples, lets consider a few mathematical definitions.
Definition (even and odd integers)
An integer
Definition (rational number)
A number
In the following two examples, we prove the statement through a direct proof.
By assuming
A first direct proof
Proposition
If
Proof:
Let
Let us assume
Note that we use the symbol
A second direct proof
Proposition
The sum of two rational numbers is rational.
Proof:
Let
Let us assume that
where
Note that translating the statement to predicate logic is not required for the proof. These are just shown for the sake of extra practice of translating and understanding theorem statements.
Proving biconditionals#
A theorem can also be stated as a conditional instead of just a single conditional, i.e.
Note that each implication can be proved in a different way. For example, one implication may be vacuously true while the other requires a direct proof. For a different proof, you may prove on condition with a direct proof, and another condition with an indirect proof (see Indirect Proofs below).
Translating theorems
Prove the following statement using a direct proof.
Proposition
“A non-zero number
Translating theorems
In this example we are proving a biconditional, an “if and only if”. Therefore, we must prove two conditionals:
“If
is a non-zero rational number then there exists a non-zero integer such that is an integer”, and“If
is an integer for some number and some non-zero integer , then is rational.”
Let us prove 1. Assume
Let us prove 2. Assume
1.3.3. Indirect Proofs#
In an indirect proof we look to prove a statement like
There are two main types of indirect proofs. Proof by contrapositive and proof by contradition.
Proof by Contrapositive#
To prove a statement
Proving the contrapositive can be done using any other proof method. Typically, one proves the contrapositive directly. But this is not always true. Let’s consider an example where we do prove the contrapositive directly.
Proof by contrapositive
Proposition
If
Proof:
We will proceed by proof by contrapositive. Assume
In this previous example, notice that you may have interpreted the theorem statement as
“if (
Important
When reading and interpreting theorem statements, be sure to distinguish between what is part of the premise, and what is part of the domain of discourse.
Proof by Contradiction#
In a proof by contradiction, we look to assume some fact and then find a contradiction. Recall that a contradiction is a statement is always false.
Typically, we are looking to prove some statement
By contrapositive, if
Proof by contradiction
Theorem
There is no largest integer.
Proof:
Proceed by proof by contradiction. Assume that there does exist some largest integer. Call such an integer
1.3.4. Strategies to help with proofs#
In this section we will see some examples that will help with writing and deciphering proofs. These strategies can be incorporated into various different proof methods.
Finding errors in proofs
Proof by cases
Without loss of generality
Disproof by counterexample
Finding errors in proofs#
Remember that a proof is a logical and sequential argument. A proof only holds is every step along the way is correct. A single “misstep” makes a proof invalid and thus, not proving anything. Try to find the error in the following proof.
An incorrect proof
Proposition
Proof:
Premise
Multiply both sides by
Subtract
from both sidesFactor both sides
Divide both sides by
Since
, .Divide both sides by
.
Translating theorems
Proof:
Premise
Multiply both sides by
Subtract
from both sidesFactor both sides
Divide both sides by
Since
, .Divide both sides by
.
At step 5, we cannot divide by
Proof by cases#
In a theorem, it is possible that the premise itself is a compound statement. The compound statement may be explicit, like “Let
There are two steps in a proof by cases:
Extract from the theorem statement the possible cases; and
Prove each case independently.
The validity of a proof by cases comes from the following logical equivalence:
Each of the “or” conditions in the premise is a separate case that we must prove.
Proof by cases
Proposition
Let
Proof:
First, consider
Second, consider
Notice in this previous proof that the proof for each case is identical, up to the “naming” of
Without loss of generality#
Without loss of generality, often abbreviated to w.l.o.g., is a way for provers to be lazy. When two cases are sufficiently similar, one only needs to give a proof to one of the cases.
What constitutes as “sufficiently similar”? Typically, it will be an arbitrary choice made throughout the proof for which the other choice would be equally as valid. Such an arbitrary choice should be symmetric.
For example, if proving a statement regrading two integers
Without loss of generality
Proposition
For two integers
Proof:
We provide a proof by contrapositive. Suppose that it is not that case that both
Without loss of generality, assume that
Case 1:
Therefore,
Case 2:
Therefore,
In either case, at least one of
In this example, we used w.l.o.g. to state that we made an arbitrary choice. We chose that
Disproof by counterexample#
We have seen that many theorems are stated in the form
From predicate logic we know that if
A proof by example is a proof of
Disproof by counterexample
Conjecture
For a real number
Let
Therefore, this conjecture is false.
1.3.5. Even more types of proofs#
Up to this point we have seen several different kinds of proofs and proof strategies:
Direct proof
Proof by contrapositive
Proof by contradiction
Proof by cases
Disproof by counterexample
We will see even more proof methods in later chapters of this course. Most importantly, induction. To conclude this chapter we see two more kinds of closely related proofs. Existence proofs and uniqueness proofs.
Existence proofs#
Existence proofs look to prove theorems of the form
There are two kinds of existence proofs for
A constructive proof finds a witness
such that is true. Thus proving that the statement with the existential quantifier is true. Constructive proofs may provide the witness itself or provide a method for “constructing” a witness.A nonconstructive proof proves that a witness must exist (usually in some indirect way) without providing a particular witness.
Constructive proof
Theorem
There is a positive integer that is equal to two different sums of cubes of positive integers.
Proof:
You might now say: where did that proof come from? Indeed, the difficulty with existence theorems is that
finding a witness can be very challenging. Moreover, it is often equally as difficult to disprove an existence theorem. That is, it is just as difficult to prove that
Aside (open problems)
Such problems that have not yet been proven to be true, but also not yet proved to be false, are open problems. Open problems often have a conjecture associated with them. It is often the case that research continues in certain directions with the assumption that a conjecture is true.
If a conjecture is later found to be false, then all of that work which assumed the opposite is immediately invalidated. Such open problems are therefore very “high stakes”.
The Millenium Prize Problems are 7 open problems with particularly high stakes. In 2000, the Clay Mathematics Institute issued a bounty of $1,000,000 to each problem. The person who proved (or disproved) one of the problems would be awarded $1,000,000. In 22 years, only one of those problems has been solved: the Poincaré conjecture.
The biggest, and arguably most consequential, open problem is
In some sense, this is related to existence proofs. Once we have a witness, it is very easy to verify if that witness satisfies the theorem. But, is it always easy to find a witness? That is the open question of whether or not
Most of computer science has been developed under the assumption that
Another way of performing a constructive proof is a give a method or algorithm to construct/compute a witness. This is a core principle which underlies the theory of computer science. You start with a theorem statement, prove that a solution exists by providing an algorithm to compute one, and then and only then do you implement the algorithm in a programming language.
Going the other way may not work out for you. If you try to implement an algorithm before you have proven that thing you are trying to do exists, then you may never be able to finish the algorithm because no such algorithm exists.
Even without an algorithm to construct a witness, it may still be possible to prove an existence theorem. That kind of proof would be a nonconstructive existence proof.
Nonconstructive proof
Theorem
There exists irrational numbers
Proof:
We know
We have two cases:
Surely 2 is rational, and we have proved the statement in both cases.
Notice that this proof does not provide a particular witness. Rather, the proof showed that either
Uniqueness proofs#
The last kind of proof we will discuss in this chapter is uniqueness proofs. These are a form of existence proofs where we want to prove a statement of the form “there exists a unique
This kind of theorem statement can be written using special notation:
Proving uniqueness can be very tricky. Indeed, proving
or, equivalently:
Therefore, there are two parts of a uniqueness proof.
Existence: we must show that an
exists such that is true.Uniqueness: we must show if
then is false or we must show that if is true then (they are contrapositives).
Uniqueness proof
Theorem
If
Proof:
Existence: Since
Uniqueness: Proceed by contradiction. Suppose
Since we chose
1.3.6. Exercises#
Exercise 1.33
Let
Solution to Exercise 1.33
First prove
Let
Second, prove
Let
Exercise 1.34
Let
Solution to Exercise 1.34
Proceed by contrapositive. Assume that
Letting
Exercise 1.35
Let
Solution to Exercise 1.35
By hypothesis
Letting
Exercise 1.36
Prove the following by a direct proof.
Proposition
If
Solution to Exercise 1.36
Assume
Now, we know from Exercise 1.33 that an integer is even if and only if its square is even. This also means that an integer is odd if and only if its square is odd. Since
Exercise 1.37
Prove the following by contrapositive.
Proposition
Let
Solution to Exercise 1.37
Proceed by contrapositive. We look to prove that if
By hypothesis,
Then,
Exercise 1.38
Prove the following proposition using proof by contradiction.
Proposition
Solution to Exercise 1.38
Suppose
Then,
Therefore,
Exercise 1.39
Prove the following proposition using proof by contradiction.
Proposition
Let
Solution to Exercise 1.39
We look to prove “
Thus, there exists integers
Since
Exercise 1.40
Prove that the following propositional formula is a tautology.
Solution to Exercise 1.40
First, we replace all implications
We will prove the latter formula by cases. (You could also use a truth table).
Case 1: if
Case 2: now, either
Case 2.a: if
Case 2.b: if
Therefore, in all possible truth assignments, the formula is true. It is a tautology.
Exercise 1.41
Prove that
Solution to Exercise 1.41
We proceed by proof by contradiction.
Suppose
Since
Exercise 1.42
Recall the absolute value function,
Prove that
Solution to Exercise 1.42
Proceed by cases.
. Therefore, , and . Therefore, and is negative if and only if .2.a: if
then and2.b: if
then and
Case 3 is the same as Case 2.
. Therefore and we have .