Proof Patterns

Most claims in discrete structures have the shape “for every xx in some set, if P(x)P(x) then Q(x)Q(x).” A proof is a chain of justified steps that takes you from the hypothesis PP and accepted facts to the conclusion QQ. 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\neg Q for the negation of QQ. Each pattern fixes what you may assume and what you must reach:


Pattern

You assume

You must reach

Useful when

Direct proof

PP

QQ

PP rewrites into a usable form, such as n=2k+1n = 2k + 1

Contrapositive

¬Q\neg Q

¬P\neg P

¬Q\neg Q is easier to work with than PP

Contradiction

PP and ¬Q\neg Q

an impossibility

the claim says something cannot exist

Cases

each case of PP in turn

QQ in every case

objects split naturally, such as even and odd

Counterexample

nothing extra

one xx with P(x)P(x) true and Q(x)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: nn is even when n=2kn = 2k and odd when n=2k+1n = 2k + 1 for some integer kk, and aa divides bb when b=akb = ak for some integer kk.

Direct proof and the contrapositive

A direct proof assumes PP 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+1n = 2k + 1. Then n2=4k2+4k+1=2(2k2+2k)+1n^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1. Because 2k2+2k2k^2 + 2k is an integer, n2n^2 is odd.


Sometimes the hypothesis gives you nothing to grab. In “if n2n^2 is even, then nn is even” you start from n2=2mn^2 = 2m, and no algebra on that equation reveals the form of nn. The contrapositive of P⇒QP \Rightarrow Q is the statement ¬Q⇒¬P\neg Q \Rightarrow \neg P, and the two are logically equivalent:


(P⇒Q)≡(¬Q⇒¬P)(P \Rightarrow Q) \equiv (\neg Q \Rightarrow \neg P)


Here the contrapositive is “if nn is odd, then n2n^2 is odd,” which the example above already proves, so the original claim holds as well. When QQ is compound, negate it carefully: the negation of “x>0x > 0 or y>0y > 0” is “x≤0x \le 0 and y≤0y \le 0.”



Contradiction, cases and counterexamples

In a proof by contradiction you assume the claim is false and derive something impossible. For a conditional P⇒QP \Rightarrow Q, that means assuming PP and ¬Q\neg Q together. The pattern suits claims that something does not exist.


Example: Suppose some even integer NN is the largest. Then N+2N + 2 is also even and is larger than NN, which contradicts the choice of NN. 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|x| \ge x for every real xx: if x≥0x \ge 0 then ∣x∣=x|x| = x, and if x<0x < 0 then ∣x∣=−x>0>x|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 xx for which P(x)P(x) is true and Q(x)Q(x) is false. The claim “every prime is odd” fails at x=2x = 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 xx, if P(x)P(x) then Q(x)Q(x)” before choosing a pattern.
  • Direct proof: assume PP and reach QQ.
  • Contrapositive: assume ¬Q\neg Q and reach ¬P\neg P; it is equivalent to the original, while the converse is not.
  • Contradiction: assume PP and ¬Q\neg 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 2k2k and odd integers as 2k+12k + 1 for some integer kk. Try each part before revealing its solution.


a) Prove that if mm and nn are odd integers, then mnmn is odd.


The hypothesis gives a usable form for both numbers, so use a direct proof. Write m=2a+1m = 2a + 1 and n=2b+1n = 2b + 1 for integers aa and bb. Multiplying out, the product is ________.


mn=(2a+1)(2b+1)=4ab+2a+2b+1=2(2ab+a+b)+1mn = (2a + 1)(2b + 1) = 4ab + 2a + 2b + 1 = 2(2ab + a + b) + 1


The number inside the brackets, ________, is an integer because sums and products of integers are integers. So mnmn has the form 2(integer)+12(\text{integer}) + 1, and mnmn is odd.


b) Prove that for every integer nn, if 5n+35n + 3 is even, then nn is odd.


Starting from 5n+3=2m5n + 3 = 2m gives 5n=2m−35n = 2m - 3, which says nothing obvious about the parity of nn. Use the contrapositive instead: if nn is even, then 5n+35n + 3 is odd. Because a contrapositive proof proves the original statement, this is enough.


Let n=2kn = 2k for an integer kk. Then 5n+35n + 3 becomes ________, which equals 2 times ________, plus 1:


5n+3=5(2k)+3=10k+3=2(5k+1)+15n + 3 = 5(2k) + 3 = 10k + 3 = 2(5k + 1) + 1


Since 5k+15k + 1 is an integer, 5n+35n + 3 is odd. The contrapositive holds, so if 5n+35n + 3 is even, then nn is odd.


c) Prove that n2+3nn^2 + 3n is even for every integer nn.


Every integer is either even or odd, so a proof by cases covers every possibility.


Case 1: nn is even, n=2kn = 2k. Then n2+3n=4k2+6k=2(2k2+3k)n^2 + 3n = 4k^2 + 6k = 2(2k^2 + 3k). The bracketed integer is ________, so the expression is even.


Case 2: nn is odd, n=2k+1n = 2k + 1. Expanding gives ________:


(2k+1)2+3(2k+1)=4k2+4k+1+6k+3=4k2+10k+4=2(2k2+5k+2)(2k + 1)^2 + 3(2k + 1) = 4k^2 + 4k + 1 + 6k + 3 = 4k^2 + 10k + 4 = 2(2k^2 + 5k + 2)


Since 2k2+5k+22k^2 + 5k + 2 is an integer, the expression is even in this case too. Both cases give an even result, so n2+3nn^2 + 3n is even for every integer nn.


d) Decide whether this claim is true: for every positive integer nn, 2n+12^n + 1 is prime.


A claim about every positive integer is false if a single value breaks it, so test small values of nn in order. For n=1n = 1 the value is 33, which is prime. For n=2n = 2 the value is 55, which is prime. For n=3n = 3 the value is ________, and 9=3×39 = 3 \times 3 is not prime.


So n=3n = 3 is a counterexample, and the claim is false. The first two prime values were never evidence that the claim holds for all nn; only a proof could establish that, and here none exists.

Match each proof pattern used in discrete mathematics with the description of what an argument of that kind assumes and what it must establish.

Match each term
A.

Split the situation into an exhaustive list of possibilities and establish the conclusion in each one

B.

Assume the whole statement fails and derive an impossibility

C.

Assume the hypothesis and reach the conclusion through a chain of justified steps

D.

Assume the conclusion is false and show that the hypothesis must then be false

E.

One specific instance where the hypothesis holds but the conclusion fails, disproving a universal claim

Proof by contradiction

Direct proof

Proof by cases

Counterexample

Proof by contrapositive

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A program evaluates f(x)=x2+6x+10f(x)=x^2+6x+10 for real inputs. Complete the proof that identifies the greatest real constant CC satisfying f(x)≥Cf(x)\ge C for every real xx.


For an arbitrary real number xx, completing the square gives


f(x)=(x+a)2+1,f(x)=(x+a)^2+1,


where a=a= . Every real square is nonnegative, so f(x)≥1f(x)\ge1 for every real xx. Equality occurs when x=x= . Therefore, no larger constant works for every input, and the greatest possible value of CC is .

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Let xx and yy be real numbers. Consider the statement “If xyxy is irrational, then xx is irrational or yy is irrational.” Which of the following statements is the contrapositive of this statement?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice