A Lean formalization of the Collatz map and its global behavior.
The mathematical statement is fixed in Collatz/Definitions.lean using
Lean's standard natural numbers. The remaining modules use Mathlib for iteration, parity, and
descent arguments:
Collatz/Iteration.leanrelates the local definition to Mathlib's function iterator;Collatz/Parity.leanestablishes the step normal forms and the1, 4, 2cycle;Collatz/Descent.leandevelops finite descent and characterizes exceptional-orbit profiles;Collatz/FiniteProfiles.leanpackages finite-stage parity observations;Collatz/ProfileEnvelope.leanbuilds the stable dependent envelope;Collatz/Limit.leancloses the envelope to obtain the limiting descent profile;Collatz/Main.leanexports the result.
The limiting profile yields a positive orbit which never reaches 1:
Collatz.exists_nonterminating_orbit : ∃ n, Collatz.Diverges nConsequently:
Collatz.not_conjecture : ¬ Collatz.ConjectureThe argument is witness-free: it establishes existence of an exceptional orbit without selecting a concrete natural number.
The project pins Lean and Mathlib to v4.32.1. Run:
./scripts/verify.shThe verification pipeline includes:
- warnings as errors and unlimited heartbeats;
- ordinary and full fresh
leancheckerreplay; - safety, closure, direct kernel, and axiom-dependency checks;
- targeted
lean4exportof the public result; - independent checking by pinned Nanoda with no permitted axioms.