DM 03 Proof techniques

Previous: DM 02 Predicates and Quantifiers | DM 00 Course Map | Next: DM 04 Sets

One sentence

A proof is a chain of steps, each justified by a definition or an earlier result, that leaves no way for the statement to be false; a small set of standard strategies covers most proofs.

What a proof is

Evidence persuades; a proof guarantees. A thousand examples leave a universal claim unproven, and one counterexample destroys it.

A proof starts from definitions and already-established facts, and moves by valid logical steps (DM 01 Logic and Propositions) to the conclusion. Most of the work in a beginner’s proof is writing out definitions precisely. These are used throughout this chapter:

  • is even if for some integer .
  • is odd if for some integer .
  • divides , written , if for some integer .
  • is rational if for integers with .

Direct proof

To prove : assume , unpack the definitions, compute, arrive at .

Theorem. The sum of two odd integers is even.

Proof. Let and be odd. By definition, and for some integers . Then

Since is an integer, is twice an integer, hence even.

Template: assume the hypothesis; write what it means; manipulate; recognize the conclusion’s definition. Note the use of two different letters and : the two odd numbers need not be equal.

Proof by contrapositive

Since , you may prove the contrapositive instead. Use it when “not ” gives you more to work with than .

Theorem. If is even, then is even.

A direct attempt stalls: from you would need a square root. Flip it.

Proof. We prove the contrapositive: if is odd, then is odd. Let . Then

which is odd.

Proof by contradiction

Assume the statement is false and derive something impossible. Since the assumption leads to nonsense, the statement must be true.

Theorem. is irrational.

Proof. Suppose, for contradiction, that is rational. Then where are integers with no common factor (cancel any common factors first). Squaring, , so is even, so is even by the previous theorem. Write . Then , so , so is even too. Now and share the factor 2, contradicting the choice of in lowest terms. Hence is irrational.

Theorem (Euclid). There are infinitely many primes.

Proof. Suppose there are only finitely many: . Let . Dividing by any leaves remainder 1, so no divides . But has some prime factor, and that prime is not on the list. Contradiction.

Contradiction is powerful and slightly dangerous: an arithmetic slip also produces a “contradiction”. Prefer a direct or contrapositive proof when one is available.

Proof by cases

Split into cases that together cover every possibility and prove each.

Theorem. For every integer , is even.

Proof. .
Case 1: is even, . Then is even.
Case 2: is odd, . Then , so is even.
These cases cover all integers.

The cases must be exhaustive. Forgetting a case (often zero, or negatives) is the standard error.

Existence and uniqueness

Constructive existence. Exhibit the object. “There is an even prime”: 2.

Non-constructive existence. Show that one must exist without saying which.

Theorem. There exist irrational with rational.

Proof. Consider . If it is rational, take . If it is irrational, take and ; then . Either way such a pair exists.

The proof does not tell you which case holds.

Uniqueness. Suppose two objects both have the property and show they are equal.

Example. The additive identity is unique: if and both satisfy and for all , then .

Disproof by counterexample

To disprove , give one where fails.

Claim: every prime is odd. Counterexample: 2.
Claim: if then or . Counterexample: but and . (The claim is true when is prime.)

If and only if

Prove both directions separately. Label them.

Theorem. is even if and only if is even.

Proof. () If then is even. () Proved above by contrapositive.

Choosing a strategy

The statement looks likeTry
if then , and is easy to unpackdirect
the conclusion is a negative (“is not”, “has no”)contrapositive or contradiction
”irrational”, “infinitely many”, “no such object exists”contradiction
natural split (even/odd, sign, remainder)cases
”for all ” over the natural numbersinduction (DM 06 Induction and Recursion)
“there exists”construct an example
you suspect it is falsehunt for a small counterexample

How to write a proof

  1. State what you are assuming and what you will show.
  2. Introduce every variable: “Let be an integer.”
  3. Write in full sentences. Equations are part of sentences.
  4. Justify each step (“by definition”, “by the previous theorem”).
  5. End by stating that the conclusion has been reached.

Common mistakes

  • Assuming what you want to prove. Starting from the conclusion and reaching "" proves nothing unless every step is reversible.
  • Proving by example.
  • Reusing a letter. Writing both odd numbers as assumes they are equal.
  • Proving the converse instead of the statement.
  • Dividing by something that might be zero.

Learn by doing

  1. Prove directly: the product of two odd integers is odd.
  2. Prove by contrapositive: if is odd then is odd.
  3. Prove by contradiction: there is no largest even integer.
  4. Disprove: for all real , .

Where this shows up

Proofs of algorithm correctness, convergence guarantees in optimization, and stability arguments in control are all built from these moves. Reading a research paper’s theorem starts with identifying its quantifiers (DM 02 Predicates and Quantifiers) and its proof strategy.