Learn · Interactive book
budding
The Concrete Discrete Math of Real Systems
The discrete mathematics a working engineer already uses — recovered one surprising connection at a time, from the conditional and the loop to the merge, the machine, and the limits of computation.
You already know more discrete mathematics than you think. You know that two ways of grouping an average can disagree, that a dependency cycle is different from a long dependency chain, and that testing a few cases does not prove a loop correct. This book starts with those working intuitions, lets you make a short prediction, and then reveals the name, law, proof, and engineering limit of the structure you were already using.
The objective is not familiarity at the bottom of the page. It is durable recognition: weeks later, in a system the book never mentioned, you should be able to say “this is that structure again” and know which law settles the question.
The companion Retrieval Route schedules one-day, one-week, and one-month reconstruction, discrimination, and transfer. Use it after a chapter; re-reading is not the review task.
Apply the structures to interfaces
The main route isolates one mathematical idea at a time. Two companion lessons recombine them at the boundary where interface bugs appear:
- A Component Is a Small Mathematical System maps products, sum types, partial orders, monoids, lattices, automata, canonical forms, codecs, and fixed points to component contracts and regression tests.
- An Effect Is a Request fills the route's deliberate pure-evaluator gap: effect values, capability interpreters, cancellation ownership, resource budgets, and deterministic simulation.
Read the manuscript
The manuscript now spans the complete twenty-four-chapter route. Each chapter is linked below in reader order; revision will keep tightening the proofs, evaluators, and spaced-review paths without changing the dependency chain.
- A Policy Fits on a Tiny Table — truth tables, Boolean algebra, implication, and why a four-line machine can settle an ambiguous policy. New manuscript chapter.
- Two Small Symbols Change the Promise — quantifier order, mechanical negation, and how a specification computes the exact shape of its own failure. New manuscript chapter.
- One Broken Case Ends “Always” — counterexamples, shrinking, contradiction, and the precise difference between finding a bug and proving one cannot exist. New manuscript chapter.
- The Loop That Proves Forever — induction as a loop invariant, recursion as descent, and proof cases generated by a data type's own constructors. New manuscript chapter.
- The List Writes Its Own Missing Entry — Cantor's diagonal construction, unequal infinities, and the counterexample every proposed enumeration writes against itself. New manuscript chapter.
- Too Many Pigeons, Not Enough Holes — the pigeonhole principle, impossible injective encodings, occupancy bounds, and the one identity question separating permutations from combinations. New manuscript chapter.
- Count It Twice, Then Pay It Back — complements, inclusion–exclusion, indicator variables, linearity of expectation, and why 23 people are already a birthday-collision crowd. New manuscript chapter.
- The Algorithm Calls a Smaller Copy of Itself — recurrences as executable equations, memoization as shared identity, merge-sort trees, and the difference between eventual growth and today's crossover. New manuscript chapter.
- Every Settings Screen Hides a Space — products, bijections, equivalence classes, partial orders, and constraints as regions. New manuscript chapter, revised from the earlier configuration essay.
- One Edit Casts a Shadow — reachability, cycles, trees, and content-addressed dependency graphs.
- Fold It Here or There; the Answer Stays Put — monoids, homomorphisms, and the three freedoms required for convergent merging.
- One Answer Shrinks the Remaining Question — tries, residual languages, and partial evaluation.
- Midnight Is Zero Again — congruence, modular rings, inverses, schedules, and check digits.
- Enough Distance Heals a Message — Hamming distance, parity checks, syndromes, and error-correction bounds.
- A Handful of Flags Remembers a Story — finite state, Mealy and Moore output, product machines, and minimization.
- A Smaller Language Buys an Answer — undecidability, reductions, and the guarantees purchased by restricted languages.
- Contradictions Teach the Search — SAT certificates, propagation, learned clauses, and NP-completeness.
- Ask the Questions in the Right Order — canonical decision diagrams and the two round-trip laws.
- Categories Emerge When the Questions Alternate — object–attribute closure and concept lattices.
- What Cannot Be Compared Can Run Together — chains, antichains, and optimal dependency layering.
- Every Machine Is Built from Shuffles and Resets — reversible groups, irreversible resets, and finite-machine decomposition.
- Stop When the Next Step Changes Nothing — recursive rules, least fixed points, and delta evaluation.
- Read the Package Without Opening It — information lower bounds, rank/select, and succinct trees.
- The Forest Learns Which Trees Are One — dynamic equivalence, union by rank, path compression, and the book's closing transfer.
The complete route
The route is a dependency chain of insights, not a filing cabinet of topics. Each chapter closes by creating the concrete question the next one answers.
Book I — The License
Saying Exactly What You Mean
Earning the Right to Say “Always”
Counting Without Listing
Book II — The Structures
Things That Do Not Compare
Machines and Their Limits
Beyond the Syllabus
How each chapter works
Every chapter repeats one productive rhythm. It pays off the previous question and retrieves an older idea. It presents a scene before a definition. You make a brief commitment; then a worked contrast shows where the initial model breaks. Only then does the notation arrive, followed by the theorem and its proof. Support fades through completion, discrimination, and transfer. The chapter ends with an evaluator that accepts your input, states its bounds, and exposes a failure rather than hiding it.
That rhythm serves two different kinds of speed. Local momentum makes a chapter difficult to leave halfway through. Spaced retrieval makes its idea difficult to lose a week later. The book optimizes for both, but when they conflict, durable transfer wins.