To show a “for all” statement is true you need a proof. To show it is false you need only one case where it fails. This section explains counterexamples, and then two special kinds of proof that use a single row of the conditional’s truth table.
Counterexamples
Definition 2.17 · Counterexample
A counterexample to a statement ∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) is a value x 0 x_0 x 0 in the domain for which P ( x 0 ) P(x_0) P ( x 0 ) is false. It proves ∃ x ¬ P ( x ) \exists x\, \neg P(x) ∃ x ¬ P ( x ) , the negation of ∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) , so it disproves the statement.
For a statement ∀ x ( p ( x ) → q ( x ) ) \forall x\, (p(x) \to q(x)) ∀ x ( p ( x ) → q ( x )) , a counterexample is a value for which the hypothesis p p p is true and the conclusion q q q is false , because p ∧ ¬ q p \land \neg q p ∧ ¬ q is the only way a conditional fails.
Intuition
A software tester does not need to prove that a program is wrong for all inputs. One input that makes it crash is enough to reject it. A counterexample is that one failing test case.
Example 2.18 A formula that gives primes — but not always
Goal. Disprove: “For every natural number n n n , n 2 + n + 41 n^2 + n + 41 n 2 + n + 41 is prime.”
Step. Testing small values gives primes: n = 1 n = 1 n = 1 gives 43, n = 2 n = 2 n = 2 gives 47, n = 3 n = 3 n = 3 gives 53. Small cases are not a proof.
Step. Try n = 40 n = 40 n = 40 : 40 2 + 40 + 41 = 1600 + 40 + 41 = 1681 40^2 + 40 + 41 = 1600 + 40 + 41 = 1681 4 0 2 + 40 + 41 = 1600 + 40 + 41 = 1681 .
Step. 1681 = 41 × 41 1681 = 41 \times 41 1681 = 41 × 41 , so it is not prime.
Result. n = 40 n = 40 n = 40 is a counterexample, so the statement is false (even though it holds for n = 0 , 1 , … , 39 n = 0, 1, \dots, 39 n = 0 , 1 , … , 39 ).
To disprove p ↔ q p \leftrightarrow q p ↔ q , it is enough to show that one of the two directions, p → q p \to q p → q or q → p q \to p q → p , fails.
Vacuous and trivial proofs
Name Uses the fact that Example Vacuous proof of p → q p \to q p → q p p p is false“If n > n + 1 n > n + 1 n > n + 1 (for integer n n n ), then n 2 = 0 n^2 = 0 n 2 = 0 ” — no integer satisfies n > n + 1 n > n + 1 n > n + 1 Trivial proof of p → q p \to q p → q q q q is true“If n n n is prime, then n 2 ≥ 0 n^2 \geq 0 n 2 ≥ 0 ” — n 2 ≥ 0 n^2 \geq 0 n 2 ≥ 0 for every integer
Example 2.19 A vacuous and a trivial proof
Goal. Prove for natural numbers n n n : (a) “If n < 0 n < 0 n < 0 , then n n n is a multiple of 7”; (b) “If n n n is even, then n + 1 > n n + 1 > n n + 1 > n ”.
Step. (a) No natural number is less than 0, so the hypothesis is false for every n n n . A conditional with a false hypothesis is true.
Step. (b) n + 1 > n n + 1 > n n + 1 > n is true for every n n n , whatever the hypothesis. A conditional with a true conclusion is true.
Result. (a) is true by a vacuous proof and (b) is true by a trivial proof.
Note
Vacuous proofs are common in programming: “every element of an empty list is positive” is true, because there is no element to check. That is why Python’s all([]) returns True.
Common mistake
Giving a counterexample that does not satisfy the hypothesis. To disprove “if n n n is odd, then n n n is prime”, n = 4 n = 4 n = 4 is useless (4 is not odd). Use n = 9 n = 9 n = 9 : odd but not prime.
Common mistake
Trying to prove a universal statement with examples, or disprove an existential one with one example. One counterexample disproves “for all”; but to disprove “there exists”, you must show the property fails for every value.
Key idea
One counterexample — a case where the hypothesis is true and the conclusion is false — is enough to disprove a “for all” statement.
TEE Exam note
For “Disprove by counterexample”, give the value, check the hypothesis is true, and show the conclusion is false with actual numbers. Correct answers to E12: (i) "∀ x ∈ Z , x ∈ Q ∖ N \forall x \in \mathbb{Z},\ x \in \mathbb{Q} \setminus \mathbb{N} ∀ x ∈ Z , x ∈ Q ∖ N " — counterexample x = 1 x = 1 x = 1 , because 1 ∈ N 1 \in \mathbb{N} 1 ∈ N . (ii) ”( x + y ) n = x n + y n (x + y)^n = x^n + y^n ( x + y ) n = x n + y n for all n ∈ N n \in \mathbb{N} n ∈ N , x , y ∈ Z x, y \in \mathbb{Z} x , y ∈ Z ” — take n = 2 n = 2 n = 2 , x = 1 x = 1 x = 1 , y = 1 y = 1 y = 1 : ( 1 + 1 ) 2 = 4 (1 + 1)^2 = 4 ( 1 + 1 ) 2 = 4 but 1 2 + 1 2 = 2 1^2 + 1^2 = 2 1 2 + 1 2 = 2 . (iii) ”f : N → N f: \mathbb{N} \to \mathbb{N} f : N → N is one-one iff onto” — f ( n ) = n + 10 f(n) = n + 10 f ( n ) = n + 10 is one-one but not onto (nothing maps to 1). E13: vacuous — “if n ∈ N n \in \mathbb{N} n ∈ N and n < 1 n < 1 n < 1 , then n = 100 n = 100 n = 100 ”; trivial — “if n ∈ N n \in \mathbb{N} n ∈ N , then n 2 + 1 > 0 n^2 + 1 > 0 n 2 + 1 > 0 ”.
Key takeaways
A counterexample disproves a “for all” statement; for p → q p \to q p → q it must make p p p true and q q q false.
To disprove p ↔ q p \leftrightarrow q p ↔ q , show one direction fails.
Vacuous proof: the hypothesis is always false. Trivial proof: the conclusion is always true.
Many true small cases never prove a general statement.
Practice questions Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 1 · multiple choice Which value is a counterexample to “for every integer n n n , if n n n is odd, then n n n is prime”?
Check answer
Show answer Answer: C. n = 15 n = 15 n = 15
15 is odd (hypothesis true) and 15 = 3 × 5 15 = 3 \times 5 15 = 3 × 5 is not prime (conclusion false). n = 4 n = 4 n = 4 is tempting because it is not prime, but it is not odd, so the hypothesis fails.
Question 2 · multiple choice Which value of n n n shows that ”n 2 + n + 41 n^2 + n + 41 n 2 + n + 41 is prime for every natural number n n n ” is false?
Check answer
Show answer Answer: D. n = 40 n = 40 n = 40
40 2 + 40 + 41 = 1681 = 41 2 40^2 + 40 + 41 = 1681 = 41^2 4 0 2 + 40 + 41 = 1681 = 4 1 2 , which is not prime. For n = 1 , 10 , 39 n = 1, 10, 39 n = 1 , 10 , 39 the values (43, 151, 1601) are prime, so they are not counterexamples.
Question 3 · multiple choice How many counterexamples are needed to disprove ∀ x P ( x ) \forall x\, P(x) ∀ x P ( x ) ?
A One B Two C Infinitely many D As many as there are elements in the domain
Check answer
Show answer Answer: A. One
One x 0 x_0 x 0 with P ( x 0 ) P(x_0) P ( x 0 ) false proves ∃ x ¬ P ( x ) \exists x\, \neg P(x) ∃ x ¬ P ( x ) , the negation. Option 4 describes what is needed to prove ∀ x ¬ P ( x ) \forall x\, \neg P(x) ∀ x ¬ P ( x ) , which is a different claim.
Question 4 · multiple choice “If n n n is a natural number with n 2 < 0 n^2 < 0 n 2 < 0 , then n = 5 n = 5 n = 5 .” This statement is:
Check answer
Show answer Answer: B. true by a vacuous proof
No natural number has n 2 < 0 n^2 < 0 n 2 < 0 , so the hypothesis is always false and the conditional is vacuously true. A trivial proof would need the conclusion n = 5 n = 5 n = 5 to be always true, which it is not.
Question 5 · multiple choice Which pair disproves ”a 2 = b 2 ⇒ a = b a^2 = b^2 \Rightarrow a = b a 2 = b 2 ⇒ a = b for all real a , b a, b a , b ”?
Check answer
Show answer Answer: B. a = 3 a = 3 a = 3 , b = − 3 b = -3 b = − 3
3 2 = ( − 3 ) 2 = 9 3^2 = (-3)^2 = 9 3 2 = ( − 3 ) 2 = 9 (hypothesis true) but 3 ≠ − 3 3 \neq -3 3 = − 3 (conclusion false). Option 3 fails because 0 2 ≠ 1 2 0^2 \neq 1^2 0 2 = 1 2 , so the hypothesis is false.
Question 6 · short answer
Disprove by counterexample: “For all integers a a a and b b b , if a ∣ b 2 a \mid b^2 a ∣ b 2 then a ∣ b a \mid b a ∣ b .”
Show worked answer Take a = 4 a = 4 a = 4 and b = 2 b = 2 b = 2 . Then b 2 = 4 b^2 = 4 b 2 = 4 and 4 ∣ 4 4 \mid 4 4 ∣ 4 , so the hypothesis a ∣ b 2 a \mid b^2 a ∣ b 2 is true. But 4 ∤ 2 4 \nmid 2 4 ∤ 2 (2 is not 4 times an integer), so the conclusion a ∣ b a \mid b a ∣ b is false. Hence the statement is false.