DeepMind's formal-papers: The Missing-Lemma Layer for Machine-Checked Math

· Research Papers · Lean 4 · Formal Verification · Theorem Proving · PaperLib · Mathlib

DeepMind open-sourced formal-papers: 3,966 Lean 4 formalizations of 2026 papers on a 55,000-module PaperLib of theory Mathlib lacks, plus a tagged megatheorem mechanism that keeps every unproved pillar visible to Lean's axiom audit.

DeepMind's formal-papers: The Missing-Lemma Layer for Machine-Checked Math

3,966 Lean 4 formalizations of 2026 papers, one 55,000-module library, and an axiom tag the kernel can audit

Executive takeaway: formal-papers is not a proof dump, it is a supply-chain fix. Every formalization needs background theory that Mathlib never had; PaperLib centralizes that backlog, and each work ships a formalization.yaml naming the literature it claims to formalize.

The sharp design is the megatheorem: when a paper leans on a published result nobody has formalized, PaperLib states it as a tagged declaration backed by a private axiom. The kernel still sees it, so lake exe axioms and #print axioms show exactly which pillars a theorem stands on — and when a pillar is later proved, every downstream result drops the dependency.

A blackboard-style montage of calculus, geometry and field-theory equations: the informal layer that formal-papers has to translate into Lean 4.
A blackboard-style montage of calculus, geometry and field-theory equations: the informal layer that formal-papers has to translate into Lean 4.

google-deepmind/formal-papers on GitHub

1 · What Actually Shipped

Not a monolith: one shared library plus 42 time-sharded repositories

Works are split by publication period, from formal-papers-pre1500 to formal-papers-2026. Each is its own Lake package with a pinned lean-toolchain (v4.36.0 in the current library) and a source record.

One Library, 42 Publication Buckets

A firehose for 2023-2026, a trickle before that

Counting arxiv/<id>/ directories per repo: 3,966 works in 2026, 3,937 in 2025, 3,945 in 2024, 3,936 in 2023 — all within 30 of 3,940, which reads like a 4,000-per-year ingestion budget — then 3,425 in 2022, 774 in 2020, 148 in 2015, 2 in 2005.

Treat the four newest figures as floors: GitHub truncates those trees, so the true counts are at least these. The historical buckets are scaffolding more than scholarship.

PaperLib: 55,000+ Modules of Missing The

Broader and less curated than Mathlib, by design

At HEAD the main repo holds PaperLib/ and little else: 61,835 files, of which 55,173 are .lean (both floors, truncated tree). The weighting is lopsided: Analysis 18,993 files, Combinatorics 8,531, Geometry 5,206, AlgebraicGeometry 3,467, Algebra 3,378.

The maintenance promise is deletion. As Mathlib, TauCeti, cslib and cslib-frontier absorb a topic, the PaperLib copy is meant to go. Right direction for a staging area; the hard part is sustaining it.

DimensionMathlibPaperLibPer-paper package
Curationreviewed PRs, 772 contributorsAI-generated, agent-reviewedone work, one build
Scale298,277 theorems, 142,906 defs55,173+ .lean files~3,900 per year bucket
Scopecanonical, textbook-generaltextbook-general, paper-driventhat paper's own results
Axiom policystandard Lean axiomsstandard + tagged megatheoremsinherits PaperLib

The Bibliographic Ledger

Machine-readable provenance, one YAML per work

formalization.yaml (schema v0.4) is the join key back to the literature graph: arXiv ID and version, DOI, licence, author_endorsement: not-contacted, automation.methods: autonomous with Gemini 4, review.status: agent-reviewed, sorry_count: 0.

The README also points to annotations/PaperLib/ in the Mathlib Initiative's literature-links format, which maps a quoted passage to a Lean declaration with relations such as exactMatch. At the 5 Dec 2026 HEAD that directory is absent from the tree and there is no .gitmodules: the passage-level ledger is documented, not yet shipped.

A library aisle: the informal literature graph that formalization.yaml and literature-links try to wire to Lean declarations.
A library aisle: the informal literature graph that formalization.yaml and literature-links try to wire to Lean declarations.

mathlib-initiative/literature-links

2 · Megatheorems: An Auditable Axiom Esc

The interesting engineering is not the proofs, it is the accounting

Modern analysis hits pillars nobody has formalized: Brezis-Nirenberg degree theory, bubble-tree compactness, Topping-Wirtinger rigidity. Refusing to proceed stalls the paper; axiomatizing quietly is how formalization projects lose trust. PaperLib takes a third path.

The megatheorem Command

A tagged declaration, backed by a private axiom the kernel still sees

Real code from PaperLib/Analysis/PDE/EricksenLeslie/Megatheorems.lean. The command expands to a declaration plus a private axiom named <thm>.megatheoremAx, tagged @[megatheorem]; transitive dependents inside PaperLib must carry @[megatheorem_corollary].

megatheorem topping_wirtinger_tension_rigidity :
    ∃ ε₀ > (0 : ℝ), ∃ C > (0 : ℝ),
      ∀ d τ : Vec3 → Vec3, HasWeakSphereTension d τ →
        (sphereHolEnergy d < ε₀ → sphereHolEnergy d ≤ C * sphereL2NormSq τ) ∧
        (sphereAntiHolEnergy d < ε₀ → sphereAntiHolEnergy d ≤ C * sphereL2NormSq τ)

What the Policy Actually Permits

Four ways to punt; only one survives review

AGENTS.md is unusually explicit: megatheorems only for deep, cited, peer-reviewed results (journal, monograph, refereed conference), atomic under 8 conjuncts, never the target paper's own theorems, never open conjectures, never arXiv-only preprints. Unrefereed claims must be plain Prop hypotheses.

Escape hatchWhat the kernel seesAxiom auditPolicy
sorrysorryAxrejectednever
raw axiomnamed axiomrejectedforbidden in PaperLib
Prop hypothesisan assumption, not a claimpasses, visible in the signatureopen conjectures, preprints
megatheoremprivate megatheoremAxallowed, tagged, traceablepublished results only

Where the Axioms Actually Live

Seven files, all in analysis

Every Megatheorems.lean module in PaperLib sits under PaperLib/Analysis/: universal discretization, Riemann-surface approximation, curved bilinear Hilbert transforms, inner-function regularity, Ericksen-Leslie PDE, and two Stokes-Oseen exterior modules. Combinatorics, algebra and geometry carry none.

I sampled 280 formalization.yaml files across the 2015, 2022 and 2026 buckets: all 280 listed exactly propext, Classical.choice, Quot.sound. That is weak evidence, not proof — the field is stamped at release time, so run lake exe axioms yourself before citing anything.

3 · Benchmarks & Landscape

The real comparison is against Mathlib, and against a six-million-line proof

Mathlib Is Still the Floor

298,277 theorems, 142,906 definitions, 772 contributors

Numbers from the Mathlib statistics page on 3 Dec 2026. PaperLib does not compete with that; it fills the gap under individual papers. If a lemma belongs upstream, the stated goal is to delete it from PaperLib.

So the honest framing is not that DeepMind built a rival to Mathlib. It built the overflow tank, and committed to draining it.

Mathlib statistics, updated 2026-12-03

AlphaProof Code Is the Downstream Consum

Six million lines of Lean on Signal's cryptographic core

In November 2026 DeepMind reported verifying compiled Signal protocol code: over six million lines of Lean generated by Gemini Carbon agents in four weeks instead of years, human review focused on 1% of the codebase, and two deliberately reintroduced historical bugs both caught by machine-checked proofs of insecurity. That is the workload this lemma layer feeds.

Note the asymmetry: Signal's proofs are tied to one code snapshot. formal-papers aims at reusable, citation-linked mathematics — slower, and much less demo-friendly.

Source code under syntax highlighting: the artifact that AlphaProof Code turns into Lean theorems, and the artifact lean4 ultimately checks.
Source code under syntax highlighting: the artifact that AlphaProof Code turns into Lean theorems, and the artifact lean4 ultimately checks.

Introducing AlphaProof Code (DeepMind, Nov 2026)

The Numbers Nobody Published

No hours per paper, no cost per theorem, no defect rate

Public: counts, licences, toolchain pins, axiom tags. Not public: human hours per formalization, token cost per accepted proof, or how often agent-written statements are later found wrong. Those are the numbers that decide whether this scales, and they are exactly the numbers a launch post omits.

4 · Limits, Costs & Counterarguments

A kernel-checked proof of the wrong statement is still wrong

Statements Are the Weak Link

The README says it before any critic can

Four cautions: proofs are kernel-checked without sorry, but definitions and statements can misstate, oversimplify or specialize; a misformulated megatheorem is not caught by proof checking and contaminates everything downstream; per-paper notes record translation discrepancies; the formalized version may not be the newest arXiv version.

That is the correct failure model for AI-generated formalization, and also its ceiling. Proof checking certifies derivation, not intent. Only human review of statements — or a second independent formalization — closes that gap.

One Gigabyte of Library, and Cache-or-Bu

1.03 GiB main repo; 489 MiB for the 2026 bucket alone

GitHub reports 1,080,741 KB for formal-papers and 501,071 KB for formal-papers-2026. Every quickstart assumes lake exe cache get pulls prebuilt Mathlib, TauCeti and PaperLib artifacts; the docs say explicitly never to build upstream from scratch.

Fine on a laptop with good network. For an airgapped lab, a cold CI runner, or a team pinning an old toolchain, the dependency on a binary cache is the real operational cost — and the reason the whole library is pinned to one lean-toolchain.

Macro of a motherboard: the trusted computing base underneath every claim. Lean's kernel is far smaller, but the axiom audit is the same idea.
Macro of a motherboard: the trusted computing base underneath every claim. Lean's kernel is far smaller, but the axiom audit is the same idea.

Version Drift, Consent and Coverage Bias

Permissive licences only; authors not contacted

Every sample I read carried author_endorsement: not-contacted, and the licence rule publishes only CC BY, CC0, MIT, Apache-2.0 or public-domain works. Legally clean, epistemically skewed: the corpus over-represents open-access mathematics and under-represents the paywalled literature engineers actually cite.

5 · Practical Playbook

What to do in the next hour, and who should do nothing

60-Minute Evaluation

Sparse-checkout one paper, build it, audit its axioms

No clone of the library needed. This is the documented path for arXiv:2407.14091; swap the ID for a paper in your own field.

git clone --filter=blob:none --sparse https://github.com/google-deepmind/formal-papers-2024
cd formal-papers-2024
git sparse-checkout set arxiv/2407.14091
cd arxiv/2407.14091
lake exe cache get
lake build
lake exe axioms --root Papers

Adopt, Pilot, or Wait

A blunt routing rule

  • Adopt now: formal-methods teams already shipping Lean or Isabelle artifacts who need citations for background theory; anyone auditing an AI-generated proof for smuggled axioms.
  • Pilot: ML researchers who want a statement-level skeleton of a paper before proving it — use it as a spec draft, not a certificate.
  • Wait: safety-critical certification, where agent-reviewed plus not-contacted is not an acceptable provenance chain; and teams that cannot host a Lean toolchain plus a binary cache.

Verified Sources

Primary artifacts only: the library, the governance file, the corpus, the annotation format, the downstream proof.

formal-papers: library, README, AGENTS.md

formal-papers-2026: 3,966 works

AGENTS.md: the megatheorem policy in full

中文导读:DeepMind formal-papers:为机器可验证数学补上「缺失的引理」

DeepMind 开源 formal-papers:2026 年 3,966 篇论文的 Lean 4 形式化,构建在 5.5 万模块的 PaperLib 之上,并用带标签的 megatheorem 机制让每条未证明的支柱对内核对公理的审计保持可见。

Primary Sources & References

  1. google-deepmind/formal-papers — library, README, AGENTS.md
  2. AGENTS.md — megatheorem and axiom policy
  3. google-deepmind/formal-papers-2026 — 3,966 formalized works
  4. mathlib-initiative/literature-links — passage-to-declaration annotations
  5. Introducing AlphaProof Code (DeepMind, Nov 2026)
  6. Mathlib statistics (2026-12-03)