Algebraic reasoning makes software design and correctness more precise by examining the values an operation denotes and the relationships among them. A design earns simplicity when those relationships can be clearly described; otherwise, keep investigating its semantics. section 7.0
Express operations as equations and check the properties that should hold for every relevant state:
- Associativity permits regrouping: (a + (b + c)) = ((a + b) + c), and can support parallel computation. section 7.12
- Commutativity makes argument order irrelevant: a + b = b + a. section 7.12
- Comparator ordering relies on reflexivity, antisymmetry, and transitivity; recognizing an order can simplify a problem. section 7.12
- Monotonicity checks whether a function preserves ordering, such as a1 ≤ b1 and a2 ≤ b2 implying a1 + a2 ≤ b1 + b2. section 7.12
From examples to all states
A conventional test checks one chosen state. Randomized testing instead asks whether an operation behaves correctly for all states the randomizer can generate. That shift applies algebraic reasoning to testing and can produce a more robust, trustworthy test suite. section 11.5
Figure 11.8 The denotative view of the world. Every data type holds a set of states we should explore

Explore the denotative view: each data type represents a set of states, and randomized tests aim to exercise that state space. section 11.5
