17. Proof, invariants, and correctness
Reason about whether programs and algorithms are correct using preconditions, postconditions, loop invariants, examples, counterexamples, and small proofs. This chapter trains the habit of proving claims instead of only hoping tests pass.