The Natural Number Lab
Build a complete elementary arithmetic theory in Lean. Define addition, develop multiplication and powers, construct an order relation, and finish with divisibility arguments. The reference proofs use explicit inductions, witnesses and multi-step calc chains rather than hiding the mathematics in one-line automation.
Sign in to track your progress
- Addition world5 lessons
- Addition from recursionStart from zero and successor, then prove the first identity by induction.15 min
- Move a successor across additionProve the equation the recursive definition does not compute for you.16 min
- Addition commutesCombine the first two lemmas in a structured induction.18 min
- Addition associatesControl three nested unfolds and expose the induction hypothesis.18 min
- Cancel a common tailRewrite inside a hypothesis and recover equality of the starting values.20 min
- Multiplication world5 lessons
- Zero times everythingRebuild the left-zero law directly from multiplication recursion.14 min
- Move a successor through multiplicationExpose recursive products, then finish the visible arithmetic.18 min
- Multiplication distributesProve distributivity one successor at a time without a broad simplifier.20 min
- Multiplication commutesPair left and right recursion laws in the induction step.18 min
- Multiplication associatesUse distributivity as a local step inside a larger induction.22 min
- Power world2 lessons
- Adding exponentsProve that exponent addition becomes multiplication of powers.20 min
- Powers of a productInduct, then commute the middle factors with a controlled normalization.22 min
- Order world3 lessons
- Order as a gapDefine an order relation with an existential witness and prove reflexivity.14 min
- Compose two gapsBuild a transitivity witness and document the route with calc.20 min
- Two directions force equalityExpose hidden gaps and derive antisymmetry from their equations.18 min
- Divisibility world3 lessons
- Compose divisibility witnessesMultiply two quotient witnesses and associate the resulting product.20 min
- A divisor of a sumAdd quotient witnesses and factor the common divisor.18 min
- Finale: chain, add and factorSynthesize three hypotheses in a long, readable divisibility proof.25 min