Lean for Bio · the Delphi FRO

Lean as the
gate to
a law.

Every claim: proved, tested, or marked unknown.
A graph of source-cited claims about living things. Mathematical claims are proved in Lean 4, empirical ones are tested against public data, and the laws that come out are versioned, mutation-tested, human-accepted and queryable by any MCP client.
For the Lean team · November 2026
leanprover/lean4:v4.35.0 · Mathlib v4.35.0 · counts built 6 Nov 2026 from the repository
Where it stands02
Proofs, laws, versions, mutants

A proof is of one reading of a model. It is silent about organisms.

So the thing we built around Lean is not a theorem library. It is a gate: what a statement must survive before anyone here may call it a law, and a registry that remembers every law it was wrong about.

97theorems: 73 machine-checked in Lean 4, 24 proved in the literature. 49 of the Lean ones are Thompson’s On Growth and Form, in 11 modules.
61laws in the registry: 36 accepted, 13 candidate, 7 proposed, 3 contested, 2 retired.
7immutable law sets, current 1.6.0. 4 superseded law versions kept compiled.
17/17statement mutants rejected by the compiler; 10/10 unmodified controls accepted.
Counts from docs/claims.json, lean/registry/ and lean/mutations.json at build time (6 Nov 2026). 2,026 claims in the graph; 310 are mathematical statements.
Why formalize at all03
One sentence, two theorems

Fisher’s fundamental theorem is proved in one reading and false in the other.

Formalizing forces the question the English never had to answer: which statement? Every mathematical claim carries a formalization tag before anyone writes Lean, so a module is written against a known reading.

partial-changeThe partial rate of change in mean fitness attributable to natural selection, holding average effects and environment fixed, equals V_A(w)/w̄ (Price 1972, Ewens 1989).proved
total-changeThe total rate of change in mean fitness equals V_A(w)/w̄.false under dominance, epistasis, frequency dependence or environmental change
88one
a single agreed formalization
13several
non-equivalent readings, each with its own status
14identity
true by the model’s own bookkeeping, uninformative about organisms
100contingent
a dataset can touch it
194untagged
of 310 mathematical claims
Okasha (BJPS 59, 2008) distinguishes the readings; Price (1972) and Ewens (1989) prove the partial-change one. Readings and statuses read from docs/claims.json (fisher-ftns, tags several, contingent).
Laws are versioned, never deleted04
Semantic versioning for theorems

A measured zebrafish broke a law. The fix is a proved weakening.

The Fick aerobic ceiling (E3) was pinned by five law sets when a published MO₂max came in at about twice what it allowed. v1 stays compiled; a Lean theorem shows every animal inside v1 is inside v2.

E3 @ 1.0.0 · superseded, still compiledEfficiency, cardiac output and arterial O2 lie in the measured teleost ranges

eta <= 0.15, oxycaloric <= 19.35 J/ml, cardiac output <= 0.075 ml/s and arterial O2 <= 0.21 ml/ml imply an aerobic ceiling of at most 0.0458 W.

→
E3 @ 2.0.0 · accepted · Delphi.Empirical.aerobicCeilingV2_leEfficiency and O2 delivery lie in the ranges the cited sources support (widened after measured zebrafish)

eta <= 0.23, oxycaloric <= 19.35 J/ml and O2 delivery Q*Ca <= 0.0187 ml O2/s (1600 mg O2 kg^-1 h^-1 at 0.06 kg) imply an aerobic ceiling of at most 0.0833 W.

Delphi.Empirical.TeleostAerobic.toV2: every animal inside the v1 ranges is inside the v2 ranges
1.0.01.1.01.2.01.3.01.4.01.5.01.6.0Each law set is an immutable file pinning every law’s version, content hash, status and kind. A verdict computed against an older set reproduces exactly.
Mathlib has no notion of a theorem being wrong about the world and surviving. Here that is the normal case, so the registry carries it. Source for v2: Palstra et al. 2010 (PMC3013094), Gladman and Askew 2024. lean/registry/CHANGELOG.md 1.6.0 · physics/FICK-CEILING-CHECK.md.
Contradiction, compiled05
An observation against a law

A fish was recorded deeper than the law allows. Lean holds the contradiction.

No teleost below about 8200 m (osmolyte cap; contested). The law goes to contested, not deleted, and the conflict is itself a theorem.

The observationa fish recorded at 8336 m depth

Pseudoliparis sp. indet. 1 (snailfish, Liparidae), Izu-Ogasawara Trench

Jamieson AJ, Swanborn DJB, Bond T, Cundy MC, Fujiwara Y, Lindsay D, Stott MS, Kitazato H (2026); PMID 41822858

8336 - 8200 = 136 m below the law's stated cap (146 m below the 8190 m line of the witness); the law may survive as an approximate ceiling, not as a hard limit

The Lean statement · Delphi.Perturb.no_teleost_below
(O : Delphi.Perturb.OsmolyteDepthCap) (hreg : O.osm 8336 ≤ O.sw) : False

compiled 2026-11-01 with lake env lean; axioms propext, Classical.choice, Quot.sound only

Fails once: the same file at 8100 m (inside the cap) is rejected (unsolved goals), so the contradiction comes from the observed depth, not from the proof script

Lean also caught a physics conventionperturb-pressure 1.0.0 → 2.0.0 (candidate)

v1 fixed the gradient at 1 atm per 10 m. In sea water it is 10053 Pa/m, so v1 called a correct Boyle volume violated by 0.5 to 1 percent.

v2 takes surface pressure, water density and gravity as named hypotheses; v1 is the instance oneAtmPer10m. v1 is superseded, not deleted.

lean/registry/CHANGELOG.md 1.4.0
The proof script is not the evidence; the fact that the same file is rejected at 8100 m is. Law statement: Under the osmolyte hypothesis (teleost internal osmolality rises linearly with depth via TMAO and cannot exceed seawater), no teleost lives deeper than the isosmotic depth, at most 8200 m. Jamieson et al. 2026 is a secondhand record of the 2023 primary, not fetched. lean/registry/lean/P3bContested.lean.
Adversarial acceptance06
What a law must survive

propose.mjs never auto-accepts. A person does, by role, and cuts a law set.

01A sourced claim

DOI, PMID or dataset id that resolves, and the quoted sentence it came from.

02Named hypotheses, never axiom

Empirical premises are a structure with a source per field.

03Standard axioms only

#print axioms shows propext, Classical.choice, Quot.sound; no sorry, admit, native_decide.

04A non-vacuity witness

A declaration showing the hypotheses can be satisfied. A law nothing satisfies is refused.

05A mutation test

Every relation in the statement is flipped (< > ≤ ≥ =); every mutant must fail to compile. Record: 17/17 rejected, 10/10 controls accepted.

06A scope

Taxa, life stages, ranges and a basis sentence. Outside its scope a law says nothing.

07Joint consistency

Shared quantities are checked against the accepted laws of the current set; a proved contradiction makes it contested.

08Exposed everywhere

check-exposed.mjs: registry, MCP tools, both CLIs, static API. Pre-commit hook and CI.

09Human acceptance, by role

Then release.mjs cuts an immutable law set. The proposer’s agent never approves its own law.

4reviewed by a person (human:* role)29grandfathered: in force before the registry existed, no per-law review3carried forward after a version change, pending review61law files in all; the rest are candidates or proposals with no approval yet
The mutation gate is the part worth stealing: a theorem that still compiles when you flip its inequality was never saying anything. lean/mutations.json · CONTRIBUTING-LEANBIO.md.
Every law on every surface07
Agents query laws; nobody pastes them

One loader, 8 MCP tools, a CLI, a static mirror. A hook fails if any law is missing from any of them.

8 tools · mcp/server.mjs
lean_changeslean_checklean_law_getlean_laws_listlean_lawset_getlean_proposelean_source_statuslean_verify

lean_propose runs a Lean build on submitted text, so it is local stdio only. lean_verify re-checks a design against every accepted constraint.

Live demo · three minutes

01  lean_laws_list against the hosted server from Cursor or Claude Code

02  lean_law_get fisher-ftns: the two readings

03  open P3bContested.lean: the False and #print axioms

04  flip one inequality in a *_rules_out lemma, run lake env lean, watch it fail

check-exposed.mjs · at build time
9 failures

eliminating lemmas no constraint or law maps to: Delphi.Empirical.weight_ratio_rules_out, Delphi.Genotype.claimed_substitutions_rules_out, Delphi.Genotype.too_little_time_rules_out, Delphi.Genotype.haldane_rules_out, Delphi.Hydro.closed_bladder_rules_out, Delphi.Perturb.thermal_rules_out, Delphi.Perturb.thermal_power_rules_out, Delphi.Perturb.wind_glide_rules_out, Delphi.Perturb.energy_rules_out

The rule, enforced: any new law, constraint or eliminating lemma lands in the registry, the MCP tools, the CLI and the static API in the same change. claude mcp add --transport http delphisci https://delphisci-mcp.fly.dev/mcp
Not done · asks08
Targets, not claims

What is not done, and what we would ask you.

Not done
  • 5 registry laws have a Lean module but their claim records still say proof: literature, so the claim graph undercounts Lean. A linkage task with a broken variant each, not new proof work.
    fisher-ftnskimura-fixation-probabilitykimura-substitution-ratemaynardsmith-hitchhikingmaynardsmith-twofold-cost
  • check-exposed.mjs reports 9 failures at build time.
  • 3 law versions carry carried-forward-pending-review; 29 were grandfathered in without per-law review.
  • Only 94 of 310 mathematical claims have organism data. 194 are still untagged. The debate layer that would rule a reading provable, empirical or ill-posed is designed, not built.
Asks
  • 01Is a versioned, retire-not-delete law registry with a mutation gate a pattern the Lean community would want as a reusable convention, beside Mathlib rather than in it?
  • 02lean_propose runs Lean on submitted text and is local-only. Is there a sandboxed-check path you would recommend for a hosted server?
  • 03Empirical premises are structures with sourced fields, not typeclasses. Does that scale to hundreds of laws sharing quantities?
  • 04A biology blueprint: is the blueprint tooling the right home for “which reading of this 1917 sentence did we prove”?
Lean for Bio · the Delphi FRO · delphibio.org · github.com/fractastical/delphi · lean/registry/README.md · CONTRIBUTING-LEANBIO.md