← All papers
First page of Ripple: An Open, AI-Formalized Lean 4 Framework for Computing with CRNs

Ripple: An Open, AI-Formalized Lean 4 Framework for Computing with CRNs

Ho-Lin Chen, Xiang Huang

cs.LO Jul 15, 2026 · v1 cs.DC cs.ET eess.SY
Formalizes in Lean 4 the mathematics of computing reals with chemical reaction networks, including CRN-computability, Kurtz's theorem, and two Turing-completeness results.
We present Ripple, an open, AI-formalized Lean 4 framework for the mathematics of computing real numbers with chemical reaction networks (CRNs). Ripple formalizes the full ladder of models – the GPAC / CRN continuum and the CRN-computable reals, the large-population-protocol (LPP) compilation pipeline, and a continuous-time Markov chain (CTMC) layer bridged to the deterministic mean-field limit by three machine-checked versions of Kurtz's theorem, and two Turing-completeness results – the Bournez-Graça-Pouly GPAC Turing-completeness construction and the Soloveichik-Cook-Winfree-Bruck stochastic-CRN universality theorem. The development is reliable (its core constructions are verified to depend on exactly the three Mathlib foundational axioms, with no sorry); it exposed genuine, fixable gaps in published proofs (the approximate-majority convergence argument and the LPP main theorem); and it proves new results – a fully machine-checked construction of Apéry's constant ζ(3) as a CRN-computable number via its holonomic generating function, the same recipe turning the modular 1/π series of Ramanujan into a sharp open problem. The formalization was carried out predominantly by AI agents using only publicly available models, so the workflow is reproducible.

The mathematics of computing real numbers with chemical reaction networks (CRNs) spans many models and papers, with informal proofs that may leave gaps unaddressed. A machine-checked, unified foundation for this theory was lacking.

Ripple is an open Lean 4 framework formalizing the full ladder of CRN computation models: the GPAC/PIVP continuum, CRN-computable reals, the large-population-protocol compilation pipeline, and a continuous-time Markov chain layer bridged to the mean-field limit via three versions of Kurtz's theorem. It also formalizes two Turing-completeness results (Bournez-Graça-Pouly GPAC and Soloveichik-Cook-Winfree-Bruck stochastic CRN) and population-protocol majority algorithms. The development spans 920 files and 768k lines and was carried out predominantly by AI agents using publicly available models.

Core constructions depend on exactly the three standard Mathlib axioms with no sorry. Formalization exposed genuine gaps in published proofs (the approximate-majority drift inequality with an explicit n=4 counterexample, and the LPP main theorem) and produced a machine-checked construction of Apéry's constant ζ(3) as a CRN-computable number.

Figure 2: The \zeta(3) GPAC as an ODE system — the bounded eight-variable polynomial PIVP of § 7.4 , integrated (DOP853) from rational data at z_{0}=10^{-3} . (a) the projective state flows to a conifold equilibrium: the drive z relaxes to z_{1}=17-12\sqrt{2} while the bounded coordinates \alpha=A^{\prime}/A^{\prime\prime} , \beta=B^{\prime}/A^{\prime\prime} , w=1/A^{\prime\prime} , \sigma_{A}=A/A
Pillarfiles/lines/defsFormalizes
Core/15 / 7.2k / 152GPAC/PIVP, CRN pipeline
Kurtz/9 / 3.6k / 78Kurtz's mean-field theorem (3 versions)
sCRNUniv./92 / 45k / 3.4kstochastic CRN Turing completeness
BoundedUniv./214 / 161k / 3.6kGPAC Turing completeness
PopulationProtocol/435 / 303k / 8.3kmajority protocols (drift gap fixed)
Selected pillars of the Ripple framework (files / lines / defs)