Announcement · 5 December 2026

Introducing LeanBio:
machine-checked math for biology.

LeanBio is an open Apache 2.0 library of biology laws checked line by line in Lean 4. It follows Physlib's layout and shares its exact Lean and Mathlib version, so results can move between physics and biology without a rewrite. Right now the registry holds 80 laws across 33 modules — every one pinned to a hash, and every missing data test shown out in the open.

01

Why put biology in a proof assistant?

Biology is full of math rules — how shells spiral, how wings glide, how pine cones curl, how genes spread, and how cell voltages hold a pattern. Most of those rules live in PDFs, where hidden assumptions are easy to miss.

In Lean 4, every step of a proof is checked by a small software kernel. If a theorem compiles with no sorry and only Lean's standard axioms (propext, Classical.choice, Quot.sound), the math really does follow from the stated assumptions — no skipped algebra, no silent sign error.

What a proof does — and does not — prove: a proof in LeanBio shows that a conclusion follows from a named model. It never proves that living cells or animals obey that model. That is an empirical question, checked separately by real data tests.

That split is why every module header in lean/Delphi/ lists which assumptions sit inside the proof and which are left outside, and why lean/Delphi/Audit.lean prints the axioms of every headline theorem.

02

Built to sit beside Mathlib and Physlib

Mathematics has Mathlib. Physics has Physlib. Biology did not have a shared, Apache-licensed home built to the same standard.

We designed LeanBio so it can plug directly into that ecosystem instead of starting an island:

  • Same toolchain and Mathlib pin (v4.35.0): a physics result in Physlib and a biomechanics or bioelectricity result in LeanBio compile on the same version and can share code without porting.
  • Apache 2.0 license: permissive enough for academic labs, open-source projects, and Mathlib/Physlib upstreaming without relicensing friction.
  • Clear AI rules (AI-POLICY.md): AI tools are welcome to help draft proofs, because Lean's kernel checks the logic — but human review still decides whether the formal statement actually matches the biology.
  • Versioned lifecycle, never silent deletion: every law has its own JSON file in lean/registry/ pinned to a module path and a statement hash. Laws move through proposed → candidate → accepted → contested → retired. A flawed law is retired with a record, never erased.
03

What is inside right now

80registered laws (law set 1.8.1)
33Lean 4 modules in lean/Delphi/
69engineering constraints across 43 laws
36human-accepted laws (32 candidates)

Across the registry, 48 laws are biological and 32 are physical. Every entry is also labelled by what kind of statement it is, so a proved theorem is never confused with a field observation or a known gap:

registry classcountwhat it means
theorem38Proved directly in Lean 4 from stated definitions
theorem-from-hypothesis21Proved in Lean 4 given an explicit named biological model
empirical-observation11Measured pattern recorded in the registry (not a proof)
gap6Known open area with no Lean proof yet
named-hypothesis2Named scientific hypothesis tracked for formalization
convention2Unit or modeling convention shared across laws

A few concrete examples already checked in Lean 4:

  • Cell packing & crystals: any closed 3-way mesh of pentagons and hexagons has S.pentagons = 12 (D'Arcy Thompson); a periodic crystal lattice can only have 1-, 2-, 3-, 4-, or 6-fold rotational symmetry.
  • Evolution & genetics: Maynard Smith's twofold cost of sex (odds (asexualNext q f) = 2 * odds q), Fisher's fundamental theorem, Kimura's neutral substitution rate, and Wright-Fisher fixation probability.
  • Morphogenesis & biomechanics: Turing diffusion-driven instability, plant phyllotaxis Fibonacci pairs (34/89), gliding range bounds, elastic scaling, and Timoshenko's bending-strip limits.
  • Bioelectricity: bistable membrane-voltage memory (BioelectricMemory) and, in open PRs, passive gap-junction cell networks and leaky integrate-and-fire neuron bounds.
04

Elimination certificates: catching impossible designs fast

Proving a biology equation is useful on its own. Proving an elimination certificate — a theorem named *_rules_out whose conclusion is False — lets a computer reject an impossible engineered design before running a single expensive simulation.

Last month we tested our bending plant-strip law (bilayer-curvature) against 25 finite-element simulations in CalculiX. Thin strips matched the formula within 0.0015%, and when given an impossible bending target (0.002 vs ceiling 0.0015), the Lean checker refused it in 0.112 ms with 0 simulator runs. Even better, when CalculiX widened the strip, it curled 1.300× higher — catching an unstated thin-strip assumption. We bumped bilayer-curvature to 1.1.0 with an explicit thin-strip scope and proved a second law, bilayer-curvature-wide-strip, for wide sheets.

That loop — proof catches bad design; simulator catches missing assumption; both get sharper — is what LeanBio is built for.

05

Empty slots stay visible

Because a math proof never checks whether real organisms satisfy its assumptions, delphibio.org/laws/ joins LeanBio's registry to the Delphi claim graph, pre-registered data tests, species datasets, images, and Uberon anatomy IDs. Here is how much of that bridge exists today:

connected tolawsstill empty
Literature claims3248
Pre-registered data tests1862
Resolved animal taxa1466
Attached images / plates1367
Uberon anatomy parts971

In our anatomy grounding file (lean/morphology-grounding.json), theorems reach 106 of 110 blueprint parts (4 untouched). On the laws page, every missing claim, data test, or image shows up as an empty slot — because an honest gap is a clear place for the next contributor to start.

06

Try it, contribute, and what comes next

git clone https://github.com/fractastical/leanbio.git
cd leanbio
lake build

Read CONTRIBUTING.md and AI-POLICY.md before opening a pull request. Every new law needs a clean Lean 4 proof (zero sorry, standard axioms), a deliberately broken variant that fails to compile, and a registry entry.

In progress · not done yet
  1. Make LeanBio the single upstream source for Delphi. Today this repo's loader (lib/lean-source.mjs) still reads an in-tree mirror; switching it to a pinned leanbio commit and syncing the README badge from 1.6.0 to the next law set (1.9.0) is next. lib/lean-source.mjs · lean/registry/lawsets/
  2. Review and merge the five open LeanBio pull requests: bioelectric bistable elimination constraints (BM1–BM3, #14), passive gap-junction cell networks (RC1–RC3, #15), leaky integrate-and-fire neuron bounds (NE1–NE3, #16), and the 3D PhysiCell spheroid replay checker (#17). fractastical/leanbio
  3. Connect community Lean biology libraries like Ptyche (protein folding) and lean4-phylogenetics as Lake dependencies, and harden registry witnesses. leanbio#4 · leanbio#3
  4. Fill the empty slots: link the 48 unlinked laws to literature claims and pre-register data tests for the 62 untested laws. delphibio.org/laws/

Built automatically from repository files by node scripts/site/build-blog-leanbio.mjs (law set 1.8.1; 80 laws). Also in Markdown. LeanBio repository: github.com/fractastical/leanbio (Apache 2.0).