Patterns of Proof
Proof Patterns
Most claims in discrete structures have the shape “for every x in some set, if P(x) then Q(x).” A proof is a chain of justified steps that takes you from the hypothesis P and accepted facts to the conclusion Q. A handful of patterns cover almost every such chain. Recognising which one a claim invites is what turns a blank page into a plan. This lesson covers direct proof, proof by contrapositive, proof by contradiction, proof by cases, and disproof by counterexample.
Choosing a pattern
Write ¬Q for the negation of Q. Each pattern fixes what you may assume and what you must reach:
Pattern | You assume | You must reach | Useful when |
|---|---|---|---|
Direct proof | P | Q | P rewrites into a usable form, such as n=2k+1 |
Contrapositive | ¬Q | ¬P | ¬Q is easier to work with than P |
Contradiction | P and ¬Q | an impossibility | the claim says something cannot exist |
Cases | each case of P in turn | Q in every case | objects split naturally, such as even and odd |
Counterexample | nothing extra | one x with P(x) true and Q(x) false | you suspect a universal claim is false |
Before you pick, decide what each definition gives you. Claims about integers usually turn on parity or divisibility: n is even when n=2k and odd when n=2k+1 for some integer k, and a divides b when b=ak for some integer k.
Direct proof and the contrapositive
A direct proof assumes P and rewrites it in a form you can compute with.
Example: To show that the square of an odd integer is odd, let n=2k+1. Then n2=4k2+4k+1=2(2k2+2k)+1. Because 2k2+2k is an integer, n2 is odd.
Sometimes the hypothesis gives you nothing to grab. In “if n2 is even, then n is even” you start from n2=2m, and no algebra on that equation reveals the form of n. The contrapositive of P⇒Q is the statement ¬Q⇒¬P, and the two are logically equivalent:
Here the contrapositive is “if n is odd, then n2 is odd,” which the example above already proves, so the original claim holds as well. When Q is compound, negate it carefully: the negation of “x>0 or y>0” is “x≤0 and y≤0.”
Contradiction, cases and counterexamples
In a proof by contradiction you assume the claim is false and derive something impossible. For a conditional P⇒Q, that means assuming P and ¬Q together. The pattern suits claims that something does not exist.
Example: Suppose some even integer N is the largest. Then N+2 is also even and is larger than N, which contradicts the choice of N. So there is no largest even integer.
In a proof by cases you split the situation into cases that together cover every possibility, then prove the conclusion in each one. To show ∣x∣≥x for every real x: if x≥0 then ∣x∣=x, and if x<0 then ∣x∣=−x>0>x. Leaving out a case, such as the negative numbers, leaves the proof incomplete.
To disprove a universal claim you need only one counterexample: a specific x for which P(x) is true and Q(x) is false. The claim “every prime is odd” fails at x=2. The reverse does not work: no number of confirming examples proves a claim about infinitely many objects.
What to remember
- Read the claim as “for all x, if P(x) then Q(x)” before choosing a pattern.
- Direct proof: assume P and reach Q.
- Contrapositive: assume ¬Q and reach ¬P; it is equivalent to the original, while the converse is not.
- Contradiction: assume P and ¬Q and reach an impossibility.
- Cases must be exhaustive; one counterexample disproves a universal claim, and examples never prove one.
Example: Choosing proof patterns for integer claims
Each statement below is about integers. For each one, choose a proof pattern, then carry it out. Write even integers as 2k and odd integers as 2k+1 for some integer k. Try each part before revealing its solution.
a) Prove that if m and n are odd integers, then mn is odd.
The hypothesis gives a usable form for both numbers, so use a direct proof. Write m=2a+1 and n=2b+1 for integers a and b. Multiplying out, the product is ________.
The number inside the brackets, ________, is an integer because sums and products of integers are integers. So mn has the form 2(integer)+1, and mn is odd.
b) Prove that for every integer n, if 5n+3 is even, then n is odd.
Starting from 5n+3=2m gives 5n=2m−3, which says nothing obvious about the parity of n. Use the contrapositive instead: if n is even, then 5n+3 is odd. Because a contrapositive proof proves the original statement, this is enough.
Let n=2k for an integer k. Then 5n+3 becomes ________, which equals 2 times ________, plus 1:
Since 5k+1 is an integer, 5n+3 is odd. The contrapositive holds, so if 5n+3 is even, then n is odd.
c) Prove that n2+3n is even for every integer n.
Every integer is either even or odd, so a proof by cases covers every possibility.
Case 1: n is even, n=2k. Then n2+3n=4k2+6k=2(2k2+3k). The bracketed integer is ________, so the expression is even.
Case 2: n is odd, n=2k+1. Expanding gives ________:
Since 2k2+5k+2 is an integer, the expression is even in this case too. Both cases give an even result, so n2+3n is even for every integer n.
d) Decide whether this claim is true: for every positive integer n, 2n+1 is prime.
A claim about every positive integer is false if a single value breaks it, so test small values of n in order. For n=1 the value is 3, which is prime. For n=2 the value is 5, which is prime. For n=3 the value is ________, and 9=3×3 is not prime.
So n=3 is a counterexample, and the claim is false. The first two prime values were never evidence that the claim holds for all n; only a proof could establish that, and here none exists.
A program evaluates f(x)=x2+6x+10 for real inputs. Complete the proof that identifies the greatest real constant C satisfying f(x)≥C for every real x.
For an arbitrary real number x, completing the square gives
where a= . Every real square is nonnegative, so f(x)≥1 for every real x. Equality occurs when x= . Therefore, no larger constant works for every input, and the greatest possible value of C is .
Let x and y be real numbers. Consider the statement “If xy is irrational, then x is irrational or y is irrational.” Which of the following statements is the contrapositive of this statement?