15–18 min read Proofs & Induction Lesson 12 / 32
Part 2 — Discrete Mathematics

Lesson 14.12 — Mathematical Proof and Induction

Can testing a few test cases ever guarantee that software will work correctly for all inputs? Why did Edsger Dijkstra declare that "Testing can show the presence of bugs, but never their absence"? How can the domino effect rigorously prove mathematical claims across an infinite domain? The bedrock of software reliability and algorithm correctness is Mathematical Proof and Induction.

1 Introduction: How Can We Guarantee Truth?

Suppose you have written a program designed to compute the sum of the first \(n\) positive integers for any positive integer \(n\):

// Test Case Verification
✓ n = 5:   1 + 2 + 3 + 4 + 5 = 15 (Correct)
✓ n = 10:  1 + 2 + ... + 10 = 55 (Correct)
✓ n = 100: 1 + 2 + ... + 100 = 5050 (Correct)

Even if you test a thousand more numbers and find that every single one succeeds, does passing those specific inputs prove that the program will execute correctly for all infinitely many positive integers?

The Fundamental Truth of Computer Science:

Testing empirical examples can never guarantee that a universal rule holds across all cases. Because the domain of natural numbers is infinite (\(\infty\)), even a billion successful test cases amount to virtually zero percent of all possibilities.

To establish that a mathematical statement or algorithmic routine holds universally without exception, we rely on Mathematical Proof.

What is a Mathematical Proof?

A Mathematical Proof is a rigorous deductive argument that establishes the absolute truth of a proposition using logic, formal definitions, established axioms, and valid rules of inference.

Proof is far from an abstract theoretical exercise. In computer science, mathematical proof provides the essential foundation for algorithm correctness, software verification, cryptographic security guarantees, distributed consensus protocols, and buffer-overflow prevention.

2 What is a Mathematical Proof and Why is it Essential?

The power of proof lies in replacing empirical trial-and-error with universal deductive reasoning.

A Concrete Problem: The Sum of Two Even Numbers

Consider the claim: "The sum of any two even integers is always even."
Let us test a few arbitrary numbers:

  • 2 + 4 = 6  (Even)
  • 8 + 10 = 18  (Even)
  • 12 + 16 = 28  (Even)

Every example yields an even number. But these are isolated points. To prove that the sum of any two even numbers is even, we must present an algebraic argument that holds universally.

Formal Direct Proof

Let \(a\) and \(b\) be any two arbitrary even integers.
By the definition of an even integer, there exist integers \(m, n \in \mathbb{Z}\) such that:

\(a = 2m\)  and  \(b = 2n\)

Now compute their sum:

\(a + b = 2m + 2n = 2(m + n)\)

Since integers are closed under addition (\(m + n = k \in \mathbb{Z}\)), we have:

\(a + b = 2k\)

Because \(a + b\) can be factored as \(2 \times (\text{an integer})\), it is divisible by 2 and therefore even by definition. Thus, the sum of any two even integers is always even. \(\blacksquare\)

Unbounded Domains

Manual testing over infinite sets is impossible. Proof establishes universal validity across all inputs instantaneously.

Algorithm Correctness

Mathematical proofs guarantee that sorting routines, search trees, and dynamic programming algorithms always yield correct answers.

Mission-Critical Safety

In aerospace flight software, pacemaker firmware, cryptography, and smart contracts, bugs are unacceptable—proof is the only guarantee.

3 Mathematical Terminology: Statements, Theorems, and Lemmas

Before mastering proof techniques, we must establish standard mathematical terminology:

1. Mathematical Statement (Proposition)

Atomic Unit

A declarative sentence that is either unequivocally True or False, but not both.
Examples: \(2 + 3 = 5\) (True statement); \(2 + 3 = 6\) (False statement). But "\(x > 5\)" is not a statement until \(x\) is assigned a value (it is a predicate).

2. Axiom / Postulate

Self-Evident Truth

A foundational assumption accepted as true without proof, serving as the starting ground for further reasoning.
Examples: Peano Axioms, or Euclid's postulate that a straight line can be drawn between any two points.

3. Theorem

Proven Proposition

A major mathematical statement that has been formally established as true through rigorous logical proof.
Examples: Pythagorean Theorem (\(a^2 + b^2 = c^2\)), Fermat's Little Theorem.

4. Lemma

Stepping Stone

A minor proven proposition used as a intermediate stepping stone to prove a larger, more significant theorem.
Example: Euclid's Lemma (if a prime \(p\) divides \(ab\), then \(p\) must divide \(a\) or \(b\)).

5. Corollary

Direct Consequence

A proposition that follows almost immediately as a natural, direct consequence from an already proven theorem.

6. Conjecture

Unproven Hypothesis

A statement believed to be true based on extensive numerical observations, but lacking formal mathematical proof.
Example: Goldbach's Conjecture (every even integer \(> 2\) can be expressed as the sum of two primes, e.g. \(10 = 3 + 7\)). Verified computationally for trillions of numbers, but still unproven!

4 Direct Proof

Direct Proof is the most straightforward proof technique. To prove a conditional statement of the form \(P \implies Q\):

  1. Assume that premise \(P\) (Hypothesis) is True.
  2. Apply definitions, axioms, and logical rules of algebra step-by-step.
  3. Deduce directly that conclusion \(Q\) must be True.

Example 1: Sum of Two Odd Numbers is Even

Theorem: If \(a\) and \(b\) are odd integers, then their sum \(a + b\) is an even integer.

Step 1 (Premise): Assume \(a\) and \(b\) are odd integers.
Step 2 (Apply Definition): By definition of odd integers, there exist integers \(m, n \in \mathbb{Z}\) such that:
\(a = 2m + 1\)  and  \(b = 2n + 1\)
Step 3 (Algebraic Sum):
\(a + b = (2m + 1) + (2n + 1) = 2m + 2n + 2 = 2(m + n + 1)\)
Step 4 (Conclusion): Let \(k = m + n + 1\). Since \(m, n \in \mathbb{Z}\), \(k\) is an integer. Thus \(a + b = 2k\), which is divisible by 2.
✓ Proved: The sum of two odd integers is always even. \(\blacksquare\)

Example 2: The Square of an Odd Number is Odd

Theorem: If \(n\) is an odd integer, then \(n^2\) is an odd integer.

Step 1: Let \(n\) be odd \(\implies n = 2k + 1\) for some \(k \in \mathbb{Z}\).
Step 2: Square both sides:
\(n^2 = (2k + 1)^2 = 4k^2 + 4k + 1 = 2(2k^2 + 2k) + 1\)
Step 3: Let \(p = 2k^2 + 2k\). Since \(k \in \mathbb{Z}\), \(p \in \mathbb{Z}\). Thus:
\(n^2 = 2p + 1\)
✓ Since \(n^2\) is expressed as \(2p + 1\), it is odd by definition. \(\blacksquare\)

5 Proof by Contrapositive

Frequently, attempting to prove a statement \(P \implies Q\) directly leads to cumbersome algebraic hurdles (such as fractions or square roots). In such cases, we leverage an equivalence of formal logic:

\(P \implies Q \quad \equiv \quad \neg Q \implies \neg P\)   (Contrapositive Equivalence)

A conditional proposition and its contrapositive are logically identical. Therefore, proving \(\neg Q \implies \neg P\) is completely equivalent to proving \(P \implies Q\).

Theorem: If \(n^2\) is odd, then \(n\) is odd

Why is direct proof difficult? Assuming \(n^2 = 2k + 1\) yields \(n = \sqrt{2k+1}\). Proving that this square root is an integer and odd requires unnecessary complexity.

Step 1 (Form the Contrapositive):
Original: \(P\) (\(n^2\) is odd) \(\implies Q\) (\(n\) is odd).
Contrapositive: \(\neg Q\) (\(n\) is even) \(\implies \neg P\) (\(n^2\) is even).
Step 2 (Premise of Contrapositive): Assume \(\neg Q\) is true; that is, \(n\) is an even integer.
Step 3 (Deduction): By definition, \(n = 2k\) for some \(k \in \mathbb{Z}\).
\(n^2 = (2k)^2 = 4k^2 = 2(2k^2)\)
Let \(m = 2k^2 \in \mathbb{Z}\). Then \(n^2 = 2m\), which is an even integer!
Step 4 (Conclusion): We have proven that if \(n\) is even, then \(n^2\) is even (\(\neg Q \implies \neg P\)). Since the contrapositive is true, the original theorem \(P \implies Q\) is established! \(\blacksquare\)

Warning: Contrapositive vs. Converse Trap

Original Statement: \(P \implies Q\)
• Contrapositive: \(\neg Q \implies \neg P\) (Always logically equivalent to the original statement).
• Converse: \(Q \implies P\) (NOT logically equivalent).
Example: "If a number is divisible by 4, it is even" is True. But its converse "If a number is even, it is divisible by 4" is False (e.g. 6 is even, but \(4 \nmid 6\)). Proving the converse does not prove the original theorem!

6 Proof by Contradiction (Reductio ad Absurdum)

Proof by Contradiction is one of mathematics\' most elegant strategies. The mathematician G. H. Hardy called it "one of a mathematician\'s finest weapons."

How It Works:

  1. To prove proposition \(P\), we assume its negation \(\neg P\) is True.
  2. We follow rigorous logical steps derived from this assumption.
  3. We reach a logical impossibility or contradiction (e.g. \(0 = 1\), a number being both even and odd, or a violation of an established axiom).
  4. Because our deductive steps were sound, the contradiction proves that our initial assumption (\(\neg P\)) was false.
  5. Therefore, proposition \(P\) must be True!

Classic Masterpiece: \(\sqrt{2}\) is an Irrational Number

In the 5th century BCE, the Pythagoreans believed all quantities could be expressed as ratios of integers (\(a/b\)). Hippasus famously proved that \(\sqrt{2}\) cannot be represented as any integer fraction.

Step-by-Step Proof
Step 1 (Assumption of Negation):
Assume that \(\sqrt{2}\) is a rational number.
Step 2 (Fraction Representation):
By definition of rational numbers, there exist integers \(a\) and \(b\) (\(b \ne 0\)) such that:
\(\sqrt{2} = \frac{a}{b}\)
We assume the fraction is in lowest terms; that is, \(a\) and \(b\) are coprime (\(\gcd(a, b) = 1\)) and share no common factors other than 1.
Step 3 (Square Both Sides):
\(2 = \frac{a^2}{b^2} \implies a^2 = 2b^2\)
Step 4 (\(a\) is Even):
Because \(a^2 = 2 \times b^2\), \(a^2\) is an even integer. From our earlier lemma, if \(a^2\) is even, then \(a\) itself must be even.
Therefore, there exists an integer \(k\) such that:
\(a = 2k\)
Step 5 (\(b\) is Even):
Substitute \(a = 2k\) back into the Step 3 equation:
\((2k)^2 = 2b^2 \implies 4k^2 = 2b^2 \implies b^2 = 2k^2\)
Because \(b^2 = 2 \times k^2\), \(b^2\) is an even integer! Consequently, \(b\) must also be even!
Step 6 (The Contradiction):
We have deduced that both \(a\) and \(b\) are even, meaning they both share a common factor of at least 2.
However, in Step 2 we assumed that \(a\) and \(b\) were coprime (\(\gcd(a, b) = 1\)), sharing no common factors!
✓ This is an explicit contradiction. Hence our initial assumption that \(\sqrt{2}\) is rational is false. Therefore, \(\sqrt{2}\) is irrational. \(\blacksquare\)

In Computer Science, Alan Turing\'s proof of the Halting Problem (that no general algorithm can decide whether arbitrary programs will halt) was demonstrated using exactly this strategy of proof by contradiction.

7 Counterexamples: Disproving Universal Claims

When evaluating a universal claim of the form "For all \(x\), \(P(x)\) is true" (\(\forall x P(x)\)), disproving it does not require building an elaborate theory. Finding just one single Counterexample is sufficient to falsify the entire claim!

Claim 1: "All prime numbers are odd"

Counterexample: The number \(2\).
2 is a prime number (factors are only 1 and 2), but 2 is an even integer.
✗ One counterexample (2) disproves the universal claim!

Claim 2: Euler's Prime Generating Polynomial

Claim: \(P(n) = n^2 - n + 41\) always generates prime numbers.
For \(n = 1 \to 41\), \(n = 2 \to 43\), up to \(n = 40 \to 1601\), all 40 outputs are prime!
Yet at \(n = 41\): \(41^2 - 41 + 41 = 41^2 = 1681\), which is divisible by 41 (composite).
✗ 40 consecutive successes still failed to prove truth!

The Golden Rule: A single counterexample is sufficient to disprove a universal claim. But even millions of positive examples can never prove a universal claim—only mathematical proof can.

8 Mathematical Induction

The most indispensable proof technique in Computer Science and Discrete Mathematics is Mathematical Induction (PMI). When a proposition or algorithmic property must be proven for all natural numbers \(n = 1, 2, 3, \dots, \infty\), mathematical induction is the gold standard.

The Domino Analogy

Imagine an infinite line of dominoes standing upright:

Condition 1: Base Case
The First Domino Falls
We establish that \(P(1)\) is True.
Condition 2: Inductive Step
Each Fall Triggers the Next
If domino \(k\) falls, domino \(k+1\) must fall.
Inevitable Outcome
All Dominoes Fall
\(P(n)\) is proven for all \(n \ge 1\)!

The Two Essential Pillars of Mathematical Induction:

1
Base Case: Prove that the statement is true for the lowest boundary value (usually \(n = 1\), or problem-specific minimum \(n_0\)). That is, establish \(P(1)\).
2
Inductive Step:
  • Inductive Hypothesis: Assume that the statement holds for an arbitrary integer \(n = k\) (\(P(k)\) is True).
  • Deduction: Under this hypothesis, prove algebraically that the statement must hold for the successor \(n = k + 1\) (\(P(k+1)\) is True).
That is, prove: \(P(k) \implies P(k+1)\).

9 Proving a Formula with Induction: Sum of Integers

Let us prove the formula for the sum of the first \(n\) positive integers: \(\sum_{i=1}^n i = \frac{n(n+1)}{2}\).

Proposition \(P(n)\): \(1 + 2 + 3 + \dots + n = \frac{n(n+1)}{2}\)
Step 1: Base Case (\(n = 1\))
Left-Hand Side (LHS) \(= 1\)
Right-Hand Side (RHS) \(= \frac{1(1 + 1)}{2} = \frac{2}{2} = 1\)
Since LHS \(=\) RHS, \(P(1)\) is True.
Step 2: Inductive Hypothesis (\(n = k\))
Assume the formula holds for \(n = k\). That is:
\(1 + 2 + 3 + \dots + k = \frac{k(k+1)}{2}\)   [Equation 1]
Step 3: Inductive Step (\(n = k + 1\))
We must now prove that the formula holds for \(n = k + 1\):
\(1 + 2 + \dots + k + (k+1) = \frac{(k+1)((k+1)+1)}{2} = \frac{(k+1)(k+2)}{2}\)
Start with the LHS:
LHS \(= \underbrace{1 + 2 + \dots + k}_{\text{By Equation 1}} + (k+1)\)
Substitute the Inductive Hypothesis:
\(= \frac{k(k+1)}{2} + (k+1)\)
Factor out \((k+1)\):
\(= (k+1) \left(\frac{k}{2} + 1\right) = (k+1) \left(\frac{k+2}{2}\right) = \frac{(k+1)(k+2)}{2} = \text{RHS}\)
✓ Therefore, \(P(k) \implies P(k+1)\). By Mathematical Induction, the formula is true for all positive integers \(n \ge 1\). \(\blacksquare\)

10 Proving Divisibility with Mathematical Induction

Mathematical induction is equally potent for proving number-theoretic divisibility properties and inequalities.

Theorem: For all \(n \ge 1\), \(7^n - 1\) is divisible by 6 (\(6 \mid (7^n - 1)\))

Step 1 (Base Case, \(n = 1\)):
\(7^1 - 1 = 7 - 1 = 6\). Since 6 is divisible by 6, the statement holds for \(n = 1\).
Step 2 (Inductive Hypothesis, \(n = k\)):
Assume \(7^k - 1\) is divisible by 6. That is, there exists an integer \(m \in \mathbb{Z}\) such that:
\(7^k - 1 = 6m \implies 7^k = 6m + 1\)
Step 3 (Inductive Step, \(n = k + 1\)):
We must show that \(7^{k+1} - 1\) is divisible by 6.
By exponent laws:
\(7^{k+1} - 1 = 7 \cdot 7^k - 1\)
Substitute \(7^k = 6m + 1\):
\(= 7(6m + 1) - 1 = 42m + 7 - 1 = 42m + 6 = 6(7m + 1)\)
Since \(m \in \mathbb{Z}\), \(7m + 1\) is an integer. Thus \(7^{k+1} - 1\) is factored as \(6 \times (\text{an integer})\), which is divisible by 6!
✓ Both Base Case and Inductive Step are established. Therefore, \(6 \mid (7^n - 1)\) for all \(n \in \mathbb{N}\). \(\blacksquare\)

11 Strong Mathematical Induction

In standard induction, we assume only the immediately preceding value \(P(k)\) to prove \(P(k+1)\). However, in computer science algorithms (such as Fibonacci \(F_n = F_{n-1} + F_{n-2}\) or Divide-and-Conquer Merge Sort where problems are halved to \(n/2\)), a single predecessor is insufficient. We need all preceding cases.

The Two Steps of Strong Induction:

1. Base Case: Establish truth for all necessary base values (often \(n = 1, 2\) or more).
2. Inductive Step: Assume that \(P(1), P(2), P(3), \dots, P(k)\) are all True. Using this cumulative foundation, prove that \(P(k+1)\) is True.

Example: Every Integer \(n \ge 2\) Can Be Factored Into Primes

This is the foundational existence clause of the Fundamental Theorem of Arithmetic.

Base Case (\(n = 2\)): 2 is prime itself, so it is trivially the product of a single prime.
Strong Inductive Hypothesis: Assume that every integer \(i\) in the range \(2 \le i \le k\) can be factored into primes.
Inductive Step (\(n = k + 1\)):
For the integer \(k + 1\), there are two mutually exclusive possibilities:
  • Case 1: \(k + 1\) is prime itself. Then the claim holds immediately.
  • Case 2: \(k + 1\) is composite. By definition of composite numbers, there exist integers \(a\) and \(b\) such that:
    \(k + 1 = a \times b\)   where \(2 \le a, b \le k\)
    Because \(a\) and \(b\) are both \(\le k\), our Strong Inductive Hypothesis applies to both! Thus, both \(a\) and \(b\) can be written as products of primes.
    Consequently, their product \(a \times b = k + 1\) must also be a product of primes!
✓ By Strong Induction, every integer \(n \ge 2\) can be factored into primes. \(\blacksquare\)

12 Mathematical Proof & Programming: Loop Invariants and Algorithm Correctness

Turing Award laureate Edsger W. Dijkstra famously noted:

"Program testing can be used to show the presence of bugs, but never to show their absence!"
— Testing can prove that bugs exist, but only mathematical proof can prove that bugs do not exist.

To formally prove that an algorithm executes correctly for all inputs, computer scientists utilize the algorithmic equivalent of induction: the Loop Invariant.

What is a Loop Invariant?

A Loop Invariant is a formal logical predicate that remains True before and after each iteration of a loop. Correctness is proven across three steps:

1. Initialization (Base Case):

The invariant is True prior to the first iteration of the loop.

2. Maintenance (Inductive Step):

If the invariant is True before an iteration, it remains True after the iteration body completes.

3. Termination:

When the loop terminates, the invariant provides the exact mathematical guarantee needed to demonstrate algorithm correctness.

Code Case Study: Array Summation

def total_sum(numbers):
    total = 0
    # Invariant: Before each iteration, total == sum(numbers[0...i-1])
    for i in range(len(numbers)):
        total += numbers[i]
        # Invariant maintained: total == sum(numbers[0...i])
    return total
• Initialization: Before the loop starts, \(i = 0\), no elements have been processed, and \(\text{total} = 0\). The sum of an empty list is 0. The invariant holds.
• Maintenance: At step \(k\), \(\text{total}\) is the sum of the first \(k\) numbers. Adding \(\text{numbers}[k]\) yields the sum of the first \(k+1\) numbers. The invariant is preserved.
• Termination: When the loop ends, \(i = n\). By the invariant, \(\text{total} = \sum_{j=0}^{n-1} \text{numbers}[j]\), which is the exact sum of the entire array. The algorithm is proven correct!
Attribute Software Testing Mathematical Proof
Goal Find bugs and defects Establish universal correctness
Input Scope Select, finite test inputs All valid inputs in domain (\(\forall n \in \mathbb{N}\))
Guarantee Cannot prove absence of defects Guarantees correctness under formal specification

13 Master Comparison Matrix and Decision Guide

A quick reference guide for choosing the optimal proof technique for any problem:

Technique Logical Basis When to Use Representative Example
Direct Proof \(P \implies Q\) When algebraic definitions connect directly to conclusions Sum of two odd integers is even
Contrapositive \(\neg Q \implies \neg P\) When direct premise introduces complex roots/fractions If \(n^2\) is odd, then \(n\) is odd
Contradiction \(\neg P \implies \bot\) When assuming falsehood quickly yields impossible conclusions \(\sqrt{2}\) is irrational; Halting Problem
Counterexample \(\exists x \, (\neg P(x))\) To disprove universal claims "All primes are odd" falsified by 2
Mathematical Induction \(P(1) \land [P(k) \implies P(k+1)]\) Sequences, series, or properties dependent on \(n \in \mathbb{N}\) \(\sum_{i=1}^n i = \frac{n(n+1)}{2}\)
Strong Induction \(\bigwedge_{i=1}^k P(i) \implies P(k+1)\) Recursive definitions depending on multiple previous steps Fundamental Theorem of Arithmetic; Merge Sort
Loop Invariant Init \(\land\) Maint \(\implies\) Term Proving correctness of iterative algorithms Binary search, insertion sort, array summation

14 8 Common Pitfalls in Mathematical Proofs

Avoid these classic traps when developing or evaluating proofs:

Pitfall 1: Mistaking Examples for Proof

"I checked 10 cases and they all worked." Euler's polynomial succeeded for 40 consecutive numbers before failing at \(n = 41\)!

Pitfall 2: Circular Reasoning (Begging the Question)

Assuming what you are trying to prove inside the proof body. A proof must derive the conclusion solely from premises and established theorems.

Pitfall 3: Confusing Contrapositive with Converse

To prove \(P \implies Q\), proving \(Q \implies P\) establishes nothing about the original theorem. You must prove \(\neg Q \implies \neg P\).

Pitfall 4: Flawed Negation in Contradiction

The negation of "all students passed" is not "all students failed"; it is "at least one student did not pass." An erroneous negation invalidates the proof.

Pitfall 5: Omitting the Base Case in Induction

Proving only the inductive step is useless if no base case triggers the cascade. The first domino must be knocked over!

Pitfall 6: Treating the Hypothesis as Fact

The inductive hypothesis \(P(k)\) is a conditional assumption for the step, not a universal established truth across all numbers.

Pitfall 7: Failing to Use the Inductive Hypothesis

If your inductive step does not explicitly substitute the equation for \(P(k)\), your induction chain is incomplete.

Pitfall 8: Ignoring Domain Bounds

Applying formulas outside their specified scope (e.g. using a natural-number induction formula for negative or fractional numbers).

Hands-on Simulation Lab

Mathematical Proof & Induction Workbench

Interactive simulators for domino induction, counterexample hunting, and loop invariants

Target Value (n): 8
Adjust slider to observe inductive cascade
Base Case P(1): ✓ Established (1 = 1)
Inductive Step: ✓ P(k) → P(k+1)
Domino Status: All Dominoes Fallen!
Gauss Sum Equation
LHS: 1+...+8 = 36 | RHS: 8(9)/2 = 36
Divisibility 7^8 - 1 = 5,764,800 (Divisible by 6)
Domino Chain Animation Preview
Because Domino 1 fell, every domino in the chain fell in sequential succession. Induction Proven ✓

16 Key Takeaways

1. Testing vs. Proof

Testing demonstrates the presence of bugs, but never their absence. Only mathematical proofs establish universal correctness across infinite domains.

2. Direct Proof

Assume premise P is True, apply algebraic definitions directly, and deduce conclusion Q.

3. Proof by Contrapositive

P → Q is logically equivalent to ¬Q → ¬P. Used when negations are simpler to analyze than premises.

4. Proof by Contradiction

Assume the negation ¬P and derive an impossible contradiction (such as √2 being rational, or the Halting Problem).

5. Counterexamples

A single counterexample is sufficient to disprove a universal claim (e.g. 2 disproves that all primes are odd).

6. The 2 Steps of Induction

Establish the Base Case P(1), then prove the Inductive Step P(k) ⇒ P(k+1) like falling dominoes.

7. Strong Induction

Assume all preceding cases P(1) through P(k) are True to establish P(k+1) for multi-branch recursive problems.

8. Loop Invariants

Initialization, Maintenance, and Termination steps prove that iterative code correctly achieves postconditions.

9. Mission-Critical Systems

Cryptographic protocols, smart contracts, and distributed consensus rely strictly on mathematical proof for zero-defect security.