Proof by Cases

Suppose you want to prove that for every integer nn, the number n2+nn^2 + n is even. There is no single algebraic trick that handles all integers uniformly in an obvious way. But every integer is either even or odd. Each of those two possibilities can be checked separately. This is the essence of proof by cases: split the universe of possibilities into finitely many pieces that together cover everything. Then prove the desired conclusion separately in each piece. Proof by cases matters because many true statements do not have a single uniform argument. The reasoning genuinely differs depending on which "kind" of object you are looking at. Rather than being a weakness, this is often the most natural and transparent way to argue. The proof mirrors the structure of the problem itself. It exposes exactly why the claim is true in each regime. It is one of the most heavily used techniques in all of mathematics. It appears everywhere from elementary number theory and inequalities to geometry, combinatorics, and computer science correctness proofs. The subtlety in proof by cases is entirely logical, not computational. You must be certain that your cases are exhaustive — that they really do cover every possibility, with nothing left out. A proof by cases with a gap in its case list is not a partial proof. It is simply an invalid proof, because there could be an object satisfying none of the listed cases for which the conclusion fails. Cases need not be mutually exclusive (they are allowed to overlap). But they must jointly exhaust all possibilities. This article gives the precise logical justification for proof by cases via a tautology of propositional logic. It states and proves the general theorem. It works through two substantial examples with genuinely asymmetric case splits. It also shows via a counterexample exactly what goes wrong when the case list is not exhaustive. It builds on Direct Proof and prepares the ground for Proof of Biconditionals, where cases often appear in disguise as the two directions of an "if and only if."

Key takeaways
  • Proof by cases proves P⇒QP \Rightarrow Q by splitting PP's hypotheses into cases C1,C2,…,CnC_1, C_2, \dots, C_n that jointly cover all possibilities.
  • You then prove Ci⇒QC_i \Rightarrow Q separately for each ii; the cases need not be mutually exclusive, only exhaustive.
  • The logical justification is the tautology [(C1∨⋯∨Cn)∧(C1⇒Q)∧⋯∧(Cn⇒Q)]⇒Q\big[(C_1 \lor \cdots \lor C_n) \land (C_1 \Rightarrow Q) \land \cdots \land (C_n \Rightarrow Q)\big] \Rightarrow Q.
  • The single most common error is an incomplete case split — silently assuming a case exists that covers everything when it does not.
  • Cases can be nested (sub-cases inside a case) and can come from a known dichotomy (even/odd, positive/negative/zero) or from casework you construct yourself.
  • Key idea: to prove something true in general, prove it true in every possible situation, and be certain no situation was left out.

Where this lives today

Proof by cases is not a niche technique confined to introductory courses — it is load-bearing machinery across mathematics and its applications.

  • Number theory: Countless divisibility and modular-arithmetic proofs (as in Example 1) split on residues mod kk; Fermat's Little Theorem, quadratic reciprocity proofs, and classical Diophantine arguments all lean on exhaustive residue-class casework.
  • Real analysis and inequalities: Absolute value arguments (Example 2), the triangle inequality, and epsilon-delta proofs frequently split on the sign or relative size of quantities.
  • Geometry: Classical synthetic proofs split on whether points are collinear, whether angles are acute/right/obtuse, or whether a configuration is convex — genuinely different sub-arguments per case.
  • Computer science and formal verification: Correctness proofs of algorithms routinely case-split on branches of an `if`/`else` statement or the outcome of a comparison; type-checking rules in programming language theory are proved sound by structural induction combined with case analysis on syntactic form.
  • Discrete mathematics and combinatorics: The pigeonhole principle and many counting arguments proceed by exhaustively partitioning a finite set into cases and bounding or counting each separately.
  • Cryptography: Security proofs for protocols frequently perform case analysis on adversarial strategies, showing that no matter which of finitely many attack patterns is attempted, a bound on success probability holds.
  • Statistics and probability: The law of total probability, P(A)=∑iP(A∣Ci)P(Ci)P(A) = \sum_i P(A \mid C_i)P(C_i) for an exhaustive partition {Ci}\{C_i\} of the sample space, is the probabilistic incarnation of exactly the same exhaustiveness principle used here.

Ask the tutor: How does proof by cases combine with proving the two directions of a biconditional, as in Proof of Biconditionals?

DefinitionProof by Cases

Let PP be a hypothesis (or the domain of discourse under consideration) and let QQ be the statement to be proved. A proof by cases for the claim P⇒QP \Rightarrow Q consists of: 1. A finite list of statements C1,C2,…,CnC_1, C_2, \dots, C_n, called the cases. 2. A proof of the exhaustiveness claim

P⇒(C1∨C2∨⋯∨Cn),P \Rightarrow (C_1 \lor C_2 \lor \cdots \lor C_n),

i.e. a proof that whenever PP holds, at least one of the cases C1,…,CnC_1, \dots, C_n holds. 3. For each i=1,…,ni = 1, \dots, n, a direct proof of Ci⇒QC_i \Rightarrow Q. The cases C1,…,CnC_1, \dots, C_n are not required to be pairwise mutually exclusive; the same object may satisfy several CiC_i at once. What is required — and is the only thing that can invalidate the proof — is that the disjunction C1∨⋯∨CnC_1 \lor \cdots \lor C_n is guaranteed whenever PP holds.

Intuition

Think of the hypothesis PP as describing a set of objects (all integers, all real numbers, all triangles) about which you want to prove QQ. A case split C1,…,CnC_1, \dots, C_n partitions — or at least covers — this set into regions. Proof by cases says: if you can show the region boundary lines are drawn so that every object falls into at least one region, and if QQ holds throughout each region separately, then QQ holds everywhere. The picture below shows this as a covering of a number line: the integers are covered by "even" and "odd," two overlapping-free but jointly exhaustive regions, and separately one might instead cover the reals by three overlapping regions "negative," "zero," "positive" used in an inequality argument.

Figure
Two case splits: a partition of the integers, and an overlap-free partition by sign
Case split 1: parity of an integer n -2-10 1234 ● even: C₁ ● odd: C₂ C₁ ∨ C₂ covers ℤ, C₁ ∧ C₂ never happens Case split 2: sign of a real x 0 x < 0 : C₁ x = 0 : C₂ x > 0 : C₃

The essential logical content is a disjunction elimination pattern from propositional logic: if you know A∨BA \lor B, and you know both A⇒QA \Rightarrow Q and B⇒QB \Rightarrow Q, then you may conclude QQ regardless of which of A,BA, B actually holds — because in either case QQ follows. This is exactly how "or" is used on the left-hand side of an implication, and it generalizes immediately from two cases to any finite number of cases.

TheoremValidity of Proof by Cases

Let P,Q,C1,…,CnP, Q, C_1, \dots, C_n be statements (propositional formulas, or predicates over a common domain, all possibly depending on a free variable). Suppose: 1. (Exhaustiveness) P⇒(C1∨C2∨⋯∨Cn)P \Rightarrow (C_1 \lor C_2 \lor \cdots \lor C_n) is true. 2. (Case adequacy) For each i∈{1,…,n}i \in \{1, \dots, n\}, the implication Ci⇒QC_i \Rightarrow Q is true. Then P⇒QP \Rightarrow Q is true.

Proof

We argue at the level of propositional logic, treating P,Q,C1,…,CnP, Q, C_1, \dots, C_n as propositions (if they are predicates with a free variable xx ranging over a domain DD, fix an arbitrary x∈Dx \in D and apply the argument below to the resulting propositions; since xx was arbitrary this yields the claim for all x∈Dx \in D, which is the standard technique of Universal Generalization).

Step 1: A propositional tautology. We claim that the formula

Φ:=[(C1∨C2∨⋯∨Cn)∧(C1⇒Q)∧(C2⇒Q)∧⋯∧(Cn⇒Q)]⇒Q\Phi := \Big[\big(C_1 \lor C_2 \lor \cdots \lor C_n\big) \land (C_1 \Rightarrow Q) \land (C_2 \Rightarrow Q) \land \cdots \land (C_n \Rightarrow Q)\Big] \Rightarrow Q

is a tautology, i.e. true under every truth assignment to the propositional variables C1,…,Cn,QC_1, \dots, C_n, Q. To see this, suppose for contradiction that some truth assignment makes Φ\Phi false. Since Φ\Phi is an implication, this forces its antecedent to be true and its consequent QQ to be false. The antecedent being true means, by definition of conjunction, that all of the following hold simultaneously:

C1∨C2∨⋯∨Cnis true,Ci⇒Q is true for every i=1,…,n.C_1 \lor C_2 \lor \cdots \lor C_n \quad \text{is true}, \qquad C_i \Rightarrow Q \ \text{is true for every } i = 1, \dots, n.

Since C1∨⋯∨CnC_1 \lor \cdots \lor C_n is true, by definition of disjunction at least one disjunct is true; say CkC_k is true for some particular index kk. But we also have Ck⇒QC_k \Rightarrow Q true. An implication A⇒BA \Rightarrow B is true and AA is true forces BB true (this is the modus ponens tautology [(A⇒B)∧A]⇒B\big[(A \Rightarrow B) \land A\big] \Rightarrow B, itself checked directly by the truth table: the only row making (A⇒B)∧A(A \Rightarrow B) \land A true is A=T,B=TA = T, B = T, in which case BB is indeed true). Applying this with A=CkA = C_k, B=QB = Q, we conclude QQ is true. This contradicts our assumption that QQ is false. Hence no truth assignment makes Φ\Phi false, so Φ\Phi is a tautology. ■\quad\blacksquare (this establishes Step 1)

Step 2: Chaining with PP. By hypothesis (1), P⇒(C1∨⋯∨Cn)P \Rightarrow (C_1 \lor \cdots \lor C_n) is true, and by hypothesis (2), each Ci⇒QC_i \Rightarrow Q is true. Fix any truth assignment for which PP is true. Since P⇒(C1∨⋯∨Cn)P \Rightarrow (C_1 \lor \cdots \lor C_n) is true and PP is true, modus ponens gives that C1∨⋯∨CnC_1 \lor \cdots \lor C_n is true. Combined with the truth of each Ci⇒QC_i \Rightarrow Q, the antecedent of Φ\Phi from Step 1 is true. Since Φ\Phi is a tautology it is true under this assignment, so (as Φ\Phi is an implication whose antecedent is true) its consequent QQ must be true as well, again by modus ponens. We have shown: whenever PP is true, QQ is true. This is precisely the statement that P⇒QP \Rightarrow Q is true. ■\blacksquare

Remark on the proof technique. The argument used here is a direct semantic verification (truth-table style case analysis on the truth values of the propositional variables themselves) to establish a tautology, followed by two applications of modus ponens. No result depending on proof by cases was used, so the argument is non-circular; it rests only on the basic definitions of ∧,∨,⇒\land, \lor, \Rightarrow and the modus ponens tautology, which is checked directly from the four-row truth table of ⇒\Rightarrow.

∎
CorollaryTwo-case form

If P⇒(C1∨C2)P \Rightarrow (C_1 \lor C_2), C1⇒QC_1 \Rightarrow Q, and C2⇒QC_2 \Rightarrow Q are all true, then P⇒QP \Rightarrow Q is true. In particular, taking C1C_1 to be any statement and C2=¬C1C_2 = \lnot C_1 (so that C1∨C2C_1 \lor C_2 is the tautology "law of excluded middle," automatically satisfying exhaustiveness for any PP), we get: if C1⇒QC_1 \Rightarrow Q and ¬C1⇒Q\lnot C_1 \Rightarrow Q, then QQ is true outright. This is the common pattern "either C1C_1 holds or it doesn't; either way QQ follows."

Worked examples

Example 1 (asymmetric three-way split, number theory). Claim. For every integer nn, the number n3−nn^3 - n is divisible by 66. Proof. Factor n3−n=n(n−1)(n+1)n^3 - n = n(n-1)(n+1), a product of three consecutive integers n−1,n,n+1n-1, n, n+1. We will show 6∣n(n−1)(n+1)6 \mid n(n-1)(n+1) by showing separately that 22 divides this product and that 33 divides it (and 2,32, 3 are coprime, so their product 66 divides it too — we justify this subordinate fact below). Divisibility by 22. Among any two consecutive integers, one is even. Since n−1n-1 and nn are consecutive, at least one of them is even, hence 2∣n(n−1)2 \mid n(n-1), hence 2∣n(n−1)(n+1)2 \mid n(n-1)(n+1). Divisibility by 33, by cases on n  3n \bmod 3. Every integer nn leaves remainder 00, 11, or 22 upon division by 33; this is the exhaustiveness step, justified by the division algorithm (n=3q+rn = 3q + r with r∈{0,1,2}r \in \{0,1,2\} uniquely determined). We consider the three cases.

  • Case C1C_1: n≡0(mod3)n \equiv 0 \pmod 3. Then 3∣n3 \mid n, so 3∣n(n−1)(n+1)3 \mid n(n-1)(n+1).
  • Case C2C_2: n≡1(mod3)n \equiv 1 \pmod 3. Then n−1≡0(mod3)n - 1 \equiv 0 \pmod 3, so 3∣(n−1)3 \mid (n-1), so 3∣n(n−1)(n+1)3 \mid n(n-1)(n+1).
  • Case C3C_3: n≡2(mod3)n \equiv 2 \pmod 3. Then n+1≡3≡0(mod3)n + 1 \equiv 3 \equiv 0 \pmod 3, so 3∣(n+1)3 \mid (n+1), so 3∣n(n−1)(n+1)3 \mid n(n-1)(n+1).

In every case 3∣n(n−1)(n+1)3 \mid n(n-1)(n+1), and since C1∨C2∨C3C_1 \lor C_2 \lor C_3 is guaranteed for every integer nn, we conclude 3∣n(n−1)(n+1)3 \mid n(n-1)(n+1) always, by Proof by Cases (the theorem proved above). Combining. We now have 2∣n(n−1)(n+1)2 \mid n(n-1)(n+1) and 3∣n(n−1)(n+1)3\mid n(n-1)(n+1) for every integer nn. Since gcd⁡(2,3)=1\gcd(2,3)=1, whenever two coprime integers a,ba,b both divide an integer mm, their product abab divides mm (this is a standard consequence of unique factorization / Bézout's identity, itself provable by direct proof and not requiring proof by cases). Hence 6=2⋅36 = 2\cdot 3 divides n(n−1)(n+1)=n3−nn(n-1)(n+1) = n^3-n for every integer nn. ■\blacksquare Notice the case split here was over remainders mod 33 — a genuinely three-way, non-symmetric split — nested inside a divisibility argument that itself used a two-way parity split. This illustrates that cases can be nested: a case-by-case proof of one sub-claim (3∣⋯3\mid \cdots) sits inside a larger direct argument.

Example 2 (asymmetric split driven by absolute values, inequalities). Claim. For all real numbers xx and yy,

∣x+y∣≤∣x∣+∣y∣.|x + y| \le |x| + |y|.

Proof. We use the case split on the sign of xx and the sign of yy separately, but exploit an asymmetric shortcut rather than checking all 44 sign-combinations symmetrically, to show the method does not require a mechanically uniform grid of cases. First, a preliminary fact used repeatedly: for any real tt, we have −∣t∣≤t≤∣t∣-|t| \le t \le |t|. Indeed, if t≥0t \ge 0 then ∣t∣=t|t| = t, so t≤∣t∣t \le |t| holds with equality, and −∣t∣=−t≤0≤t-|t| = -t \le 0 \le t since t≥0t\ge 0. If t<0t < 0 then ∣t∣=−t>0|t| = -t > 0, so t<0<∣t∣t < 0 < |t|, giving t≤∣t∣t \le |t|; and −∣t∣=t≤t-|t| = t \le t, giving −∣t∣≤t-|t| \le t. Either way −∣t∣≤t≤∣t∣-|t|\le t\le |t|. (This itself was a two-case proof of a lemma.) Applying this lemma to t=xt = x and t=yt = y and adding the inequalities:

−(∣x∣+∣y∣)  =  −∣x∣−∣y∣  ≤  x+y  ≤  ∣x∣+∣y∣.-(|x|+|y|) \;=\; -|x| - |y| \;\le\; x + y \;\le\; |x| + |y|.

So x+yx+y lies between −(∣x∣+∣y∣)-(|x|+|y|) and ∣x∣+∣y∣|x|+|y|. Now we split into cases on the sign of x+yx+y — an exhaustive two-case split since every real number is ≥0\ge 0 or <0< 0.

  • Case C1C_1: x+y≥0x + y \ge 0. Then ∣x+y∣=x+y|x+y| = x+y, and we showed x+y≤∣x∣+∣y∣x + y \le |x|+|y| directly above, so ∣x+y∣≤∣x∣+∣y∣|x+y| \le |x|+|y|.
  • Case C2C_2: x+y<0x+y < 0. Then ∣x+y∣=−(x+y)|x+y| = -(x+y). From −(∣x∣+∣y∣)≤x+y-(|x|+|y|) \le x+y we get, multiplying both sides by −1-1 (which reverses the inequality), −(x+y)≤∣x∣+∣y∣-(x+y) \le |x|+|y|. Hence ∣x+y∣=−(x+y)≤∣x∣+∣y∣|x+y| = -(x+y) \le |x|+|y|.

Since C1∨C2C_1 \lor C_2 is guaranteed (every real number is nonnegative or negative — exhaustive by trichotomy of the reals) and Q:∣x+y∣≤∣x∣+∣y∣Q: |x+y|\le|x|+|y| follows in each case, we conclude ∣x+y∣≤∣x∣+∣y∣|x+y|\le|x|+|y| for all real x,yx,y. ■\blacksquare This example shows a case split reduced from a naive "four cases on signs of xx and yy" to a leaner two-case split on the sign of the sum x+yx+y, after a shared computation (the lemma) did the common work up front — a typical and desirable feature of well-organized casework: push shared reasoning before the split, and split only on what actually differs.

Counterexampledropping exhaustiveness

Consider the false claim: every integer nn satisfies n2≥nn^2 \ge n. A tempting but broken "proof by cases": split into C1:n≥1C_1: n \ge 1 and C2:n≤−1C_2: n \le -1.

  • In case C1C_1 (n≥1n\ge 1): multiplying both sides of n≥1n \ge 1 by n>0n>0 gives n2≥nn^2 \ge n. Correct.
  • In case C2C_2 (n≤−1n \le -1): here nn is negative, so n2>0>nn^2 > 0 > n, and indeed n2≥nn^2 \ge n. Correct.

Both individual case proofs are entirely valid. Yet the overall claim is false: take n=0n = 0. Then n2=0n^2 = 0 and n=0n = 0, so in fact n2≥nn^2 \ge n holds numerically for n=0n=0 too — so let's use a genuinely failing instance instead to make the logical gap bite: take the claim every integer nn satisfies n2>nn^2 > n (strict inequality) with the same two cases C1:n≥1C_1: n\ge 1, C2:n≤−1C_2: n\le -1.

  • Case C1C_1 (n≥1n \ge 1): for n=1n=1, n2=1=nn^2 = 1 = n, so n2>nn^2 > n fails. So actually even case C1C_1 was proved incorrectly if asserted carelessly (one must restrict to n≥2n\ge 2 for a strict inequality) — but set that aside and focus on the real point:

The list C1:n≥1, C2:n≤−1C_1 : n\ge 1,\ C_2: n \le -1 is not exhaustive: it omits n=0n = 0 entirely. Nothing in hypothesis (1) of the theorem — the exhaustiveness clause P⇒(C1∨C2)P \Rightarrow (C_1\lor C_2) — is satisfied, since for n=0n=0 neither C1C_1 nor C2C_2 holds. The theorem's conclusion P⇒QP\Rightarrow Q therefore simply does not follow from the two case-proofs, no matter how correct each case-proof individually is. And indeed for the strict claim n2>nn^2>n, the omitted case n=0n=0 is exactly where the overall statement fails (02=0≯00^2=0\not>0). This shows precisely why hypothesis (1), exhaustiveness, cannot be dropped or merely assumed: a proof by cases with a gap in the case list proves nothing about the missing region, and reality is free to disagree with the conclusion exactly there. The two valid sub-proofs give zero information about n=0n=0; only the (false, in this variant) exhaustiveness claim would have licensed extending the conclusion there.

Scope, edge cases & common traps

SituationWhat to checkCommon mistake
Splitting on a dichotomy (even/odd, positive/negative)The dichotomy is a genuine tautology or provable exhaustive disjunction over the domainForgetting a boundary value (e.g. omitting n=0n=0, or x=0x=0)
Splitting on remainders mod kkDivision algorithm guarantees exactly one remainder in {0,…,k−1}\{0,\dots,k-1\}Using kk cases but only checking k−1k-1 of them
Cases overlapThis is fine — the theorem never required mutual exclusivityWasting effort trying to force cases to be disjoint when unnecessary
Nested casesEach sub-case list must itself be exhaustive within its parent caseTreating a sub-case list as exhaustive globally when it was only exhaustive inside one branch
Infinitely many "cases"Proof by cases as stated is for a finite list; infinite case lists typically need Mathematical Induction insteadAttempting an infinite case-by-case argument without induction or a uniform argument

The mathematician behind it

Proof by cases has no single inventor — it is as old as deductive argument itself, embedded already in Euclid's Elements, where geometric configurations are routinely split according to whether a point lies inside, on, or outside a given figure. Its formal logical justification, however, crystallizes with the development of propositional logic.

Origins · 1 minGeorge Boole and how this was discovered
GB
George Boole
1815–1864 · founder of symbolic/algebraic logic

George Boole, a largely self-taught English mathematician and logician, developed in The Mathematical Analysis of Logic (1847) and An Investigation of the Laws of Thought (1854) an algebra for propositions in which conjunction, disjunction, and negation obey precise laws — the ancestor of the truth-table machinery used to certify tautologies like the one underlying proof by cases. Boole's algebraization of logic made it possible to verify, mechanically and exhaustively, that a disjunction-elimination pattern is universally valid rather than merely intuitively plausible.

History
- c. 300 BCE — Euclid's Elements routinely splits geometric arguments into configurational cases (e.g., propositions about triangle inequality handled according to relative side lengths).
- 1847 — George Boole publishes The Mathematical Analysis of Logic, founding symbolic algebra for propositions.
- 1854 — Boole's Laws of Thought develops Boolean algebra further, giving a rigorous algebraic footing to ∧,∨,¬\land, \lor, \lnot.
- 1879 — Gottlob Frege's Begriffsschrift introduces a formal quantificational logic in which disjunction elimination (the core of case-splitting) is given precise inferential rules.
- 1928–1930s — Hilbert–Ackermann and later Gentzen formalize natural deduction systems with an explicit "or-elimination" rule, making proof by cases a first-class, named inference rule in formal proof theory.
Do the cases in a proof by cases have to be mutually exclusive?

No. The theorem underlying proof by cases only requires that the disjunction C1∨⋯∨CnC_1 \lor \cdots \lor C_n follows from the hypothesis PP — that is, every object satisfies at least one case. It never requires that an object satisfy at most one case. If cases overlap, the proof is not weakened at all: for an object satisfying two cases, say C2C_2 and C5C_5, either sub-proof (C2⇒QC_2 \Rightarrow Q or C5⇒QC_5\Rightarrow Q) already establishes QQ for it. Mutual exclusivity is sometimes convenient for organizing a proof cleanly, but it is a stylistic choice, not a logical requirement.

How is proof by cases different from proof by contradiction or direct proof?

Direct Proof derives QQ from PP via a single unbroken chain of implications. Proof by contradiction assumes ¬Q\lnot Q (alongside PP) and derives a logical absurdity. Proof by cases is a hybrid strategy: it does not avoid direct argument, but rather organizes it — you still give a direct sub-proof of Ci⇒QC_i \Rightarrow Q inside each case, but you split the overall argument because no single uniform chain of implications from PP to QQ presents itself. Many proofs combine all three: a case split where one or more branches are themselves handled by contradiction.

Can I use proof by cases with infinitely many cases, like one case per natural number?

Not directly in the form stated here, which is built from a finite disjunction C1∨⋯∨CnC_1\lor\cdots\lor C_n and finitely many implications Ci⇒QC_i\Rightarrow Q — this is essential to the tautology-checking argument in the proof, which relies on finite conjunction and disjunction. When you want to handle infinitely many cases indexed by n∈Nn \in \mathbb{N} (e.g., "for every nn, case nn holds"), the appropriate tool is Mathematical Induction, which handles the infinite case list via a base case plus an inductive step rather than by writing out infinitely many separate arguments.

What exactly goes wrong logically if my case list is not exhaustive?

The hypothesis "(exhaustiveness) P⇒(C1∨⋯∨Cn)P \Rightarrow (C_1\lor\cdots\lor C_n)" in the theorem is simply false, so the theorem's conclusion P⇒QP\Rightarrow Q is not licensed by it at all — not "weakly supported," but entirely unproved. Concretely, there may exist an object satisfying PP but none of C1,…,CnC_1,\dots,C_n; for that object none of your case-proofs say anything, and QQ may fail for it even though it held in every case you did check. The counterexample above with C1:n≥1,C2:n≤−1C_1: n\ge1, C_2: n\le -1 omitting n=0n=0 illustrates exactly this gap.

Is it better to make cases mutually exclusive or is overlap fine to leave in for simplicity?

Both are logically fine; it is purely a matter of style and clarity. Mutually exclusive cases (like even vs. odd) often make a proof easier to read because each object falls into exactly one branch, avoiding any concern about consistency across branches. Overlapping cases (like x≥0x\ge 0 and x≤0x\le 0, which overlap at x=0x=0) are sometimes easier to state and verify, at the minor cost that an object satisfying both cases gets "proved twice," which is harmless. Choose whichever split makes each individual sub-proof cleanest.

How does proof by cases relate to the law of total probability or to programming "if/else" branches?

Both are direct structural analogues. The law of total probability, P(A)=∑iP(Ci)P(A∣Ci)P(A) = \sum_i P(C_i) P(A\mid C_i) for an exhaustive, mutually exclusive partition {Ci}\{C_i\} of the sample space, computes a global probability by combining case-by-case (conditional) probabilities — exhaustiveness of the partition is exactly what proof by cases requires of C1∨⋯∨CnC_1\lor\cdots\lor C_n. Similarly, correctness proofs for a program with branches (`if C1 ... else if C2 ... else ...`) must verify a postcondition QQ holds along every branch, and the branches are exhaustive by construction (the `else` catches everything else) — a direct computational incarnation of the same logical pattern.

Why does the proof of the underlying tautology not itself use proof by cases, avoiding circularity?

The proof of the tautology Φ\Phi in the Theorem's proof argues by reductio: assume some truth assignment falsifies Φ\Phi, derive that this assignment must make QQ both true and false, a contradiction, hence no falsifying assignment exists. This is a direct semantic argument about truth assignments and the definitions of ∧,∨,⇒\land,\lor,\Rightarrow, together with the modus ponens tautology (itself verified by an exhaustive but explicit four-row truth table, not by invoking "proof by cases" as a licensed inference rule). So the justification is built from more primitive logical facts, not from the very technique being justified — this is what makes the argument non-circular.

Before this

Where this leads