{"slug": "google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems", "title": "Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems", "summary": "Google DeepMind published formal-papers on GitHub, an open Lean 4 collection of machine-checked mathematical and computer science formalizations built on PaperLib, a shared library layered atop Mathlib, TauCeti, cslib, and cslib-frontier. The README states the content was AI generated and warns readers to expect mistakes, and it documents megatheorems — unproved but statement-visible axioms declared when missing theory would otherwise block formalization, checkable via commands such as `lake exe axioms --root Papers`. Finished papers are split into formal-papers-YYYY repositories (2026 back through historical buckets plus pre-1500), and DeepMind plans to delete PaperLib modules once Mathlib absorbs them.", "body_md": "**Google DeepMind published [formal-papers on GitHub](https://github.com/google-deepmind/formal-papers?ref=explainx)**, an **open Lean 4 collection** of **machine-checked mathematical and computer science formalizations** built on **PaperLib**, a **shared library** atop **[Mathlib](https://github.com/leanprover-community/mathlib4?ref=explainx)**, **TauCeti**, **cslib**, and **cslib-frontier**. The **[README](https://github.com/google-deepmind/formal-papers/blob/main/README.md?ref=explainx)** says content was **AI generated**, warns readers to **expect mistakes**, and documents **megatheorems**: **unproved but statement-visible axioms** when missing theory would otherwise block formalization.\n\n## Why PaperLib exists\n\nFormalizing a **research paper** often needs **lemma infrastructure** absent from **Mathlib**. DeepMind centralizes that backlog in **PaperLib**, then splits **finished papers** into **`formal-papers-YYYY`** repositories (2026 back through historical buckets, plus **pre-1500**).\n\nPaperLib is **broader and less curated** than upstream libraries. Maintainers plan to **delete PaperLib modules** when **Mathlib** absorbs them.\n\n## Megatheorems and axiom honesty\n\nFormal verification seal: puzzle pieces fitting with a green check\n\nWhen a paper needs a **famous theorem** whose proof requires **large missing libraries**, PaperLib can declare a **megatheorem**: a **tagged statement** backed by a **private axiom** visible to **Lean's kernel**. Dependents pick up **megatheorem_corollary** tags.\n\nTools:\n\n- `lake exe axioms --root Papers`\n- `lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem`\n- `#print axioms` via`lake env lean --stdin`\n\nEach paper package records dependencies in **`formalization.yaml`**. When someone **later proves** the megatheorem, the **axiom drops** automatically for **downstream theorems**.\n\nThat design matters after **[Opus Lean CPython bugs post](https://explainx.ai/blog/opus-5-5-cpython-lean-formalization-418-bugs-2026)** and **[AlphaProof Signal verification](https://explainx.ai/blog/google-deepmind-alphaproof-code-signal-protocol-formal-verification-2026)** taught readers to ask **what exactly was checked**.\n\n## Expect mistakes: README guardrails\n\nDeepMind repeats four cautions:\n\n1. **Kernel-checked proofs** do not stop**wrong statements** .\n2. **Megatheorem misformulations** slip past proof checking.\n3. **Per-paper README notes** document**translation discrepancies** ; they are not accusations against original authors.\n4. **Formalized version** may not be the**latest arXiv v** .\n\nTreat artifacts as **experimental research**, not **homework answers**.\n\n## Quickstart commands\n\nMath proof chalkboard: node chain ending in a green check\n\nPrerequisites: **git 2.25+**, **curl**, **elan**.\n\nExample from README for **arXiv:2407.14091** in **formal-papers-2024**:\n\n- `git clone --filter=blob:none --sparse https://github.com/google-deepmind/formal-papers-2024`\n- `git sparse-checkout set arxiv/2407.14091`\n- `lake exe cache get`\n- `lake build`\n\nOptional **linters**: `lake exe runLinter`, `lake exe module-system`.\n\nFor **PaperLib search**, clone **formal-papers**, run `bash scripts/bootstrap.sh`, then `python3 scripts/search_paper_lib.py --topics Analysis`.\n\n## Relation to OpenAI's December topology drop\n\nOpenAI's **[exotic four-spheres preprint](https://explainx.ai/blog/openai-exotic-four-spheres-khovanov-smooth-poincare-december-2026)** ships **PDF plus LaTeX**. DeepMind's release ships **executable Lean** with **axiom reports**. Teams building **AI-for-science** pipelines should plan for **both modalities** in review queues.\n\n## Relation to prior DeepMind formal posts\n\nexplainx.ai already covered **[AlphaProof code verification](https://explainx.ai/blog/google-deepmind-alphaproof-code-signal-protocol-formal-verification-2026)** and **[Hadwiger Gemini Lean proof](https://explainx.ai/blog/google-hadwiger-conjecture-gemini-4-lean-proof-december-2026)**. **formal-papers** is the **library layer** those efforts can **feed**, similar in spirit to **[Anthropic lattice Lean papers](https://explainx.ai/blog/anthropic-lattice-papers-lean-formal-math-github-november-2026)**.\n\n## Repository layout and year-split packages\n\nThe **main repo** holds **PaperLib/** lemmas and **annotations/** metadata using **literature-links** conventions. **Per-year repos** (`formal-papers-2026`, `formal-papers-2025`, down to **historical buckets**) host **individual Lake packages** so you **sparse-checkout** only what you need.\n\nThat split keeps **git clone** sizes manageable when **Mathlib cache** already consumes **gigabytes**. It mirrors how **[Left to Solve](https://explainx.ai/blog/left-to-solve-ai-agents-open-math-lean-erdos-november-2026)** ships **challenge lists** separate from **proof attempts**.\n\n## Tooling beyond `lake build`\n\nREADME documents:\n\n- **`lake exe runLinter`** for**style and sorry checks** configured strict\n- **`lake exe module-system`** for**Lean 4 module graph hygiene**\n- **`scripts/search_paper_lib.py`** for**topic and carrier grep**\n\nFor **CI**, you can wire **`lake exe axioms`** into **GitHub Actions** and **fail** when **unexpected axioms** appear in **new PRs**. That pattern helped **[Certik TensorLean](https://explainx.ai/blog/certik-tensorlean-66-gpu-kernel-bugs-flashattention-deepgemm-december-2026)** cultures adapt to **kernel verification**; formal math benefits similarly.\n\n## AGENTS.md and contributor workflow\n\n**CONTRIBUTING.md** plus **`.agents/skills/formalize`** hint DeepMind expects **agent-assisted** formalization with **human review**. If you contribute:\n\n1. Pick a **permissively licensed** paper.\n2. Open a **discrepancy issue** when**informal statements** do not match**Lean** .\n3. Prefer **proving megatheorems** over**adding invisible axioms** when**Mathlib** catches up.\n\n## Risk disclosure for downstream ML papers\n\nTeams citing **PaperLib lemmas** in **NeurIPS-style proofs** should attach **`formalization.yaml` axiom lists** as **supplementary material**, the same way **[CLIP benchmarks](https://explainx.ai/blog/fantasticml-benchmark-48-tasks-agents-beat-human-sota-fable-5-2-opus-5-5-december-2026)** attach **eval scripts**.\n\n## What to run before you cite a lemma\n\n1. **Sparse-checkout** only the**arXiv ID** you need.\n2. Run **`lake exe axioms`** and store the output beside your**internal memo** .\n3. Read the **paper README discrepancy** section before you tweet**theorem X formalized** .\n4. File **GitHub issues** using the**Report Discrepancy** template if you find**statement bugs** .\n\n## Example workflow for one arXiv paper\n\nSuppose you care about **arXiv:2407.14091** (README quickstart example).\n\n1. **Sparse clone**`formal-papers-2024` and** checkout** only that directory.\n2. Run **`lake exe cache get`** to pull**Mathlib** artifacts.\n3. **`lake build`** the package; capture**warnings** as**errors** because**sorry** is disallowed.\n4. **`lake exe axioms --module`** on the**main theorem** file; save output in your**paper notes** .\n5. Read **paper README discrepancies** before citing**lemma names** in**slides** .\n\nIf **axioms** include **megatheorem** tags, **link** the **formalization.yaml** hash in your **internal wiki** so teammates know **which literature results** were **assumed**.\n\n## How PaperLib relates to Mathlib growth\n\nMathlib maintainers **merge** community lemmas on **schedules** DeepMind does **not control**. **PaperLib** is an **incubator**: faster **AI formalization**, **higher mistake rate**, **eventually** **upstreamed** or **deleted**.\n\nThat mirrors **industry data lakes** beside **warehouses**. Teach **interns** the difference so they **do not** treat **PaperLib** as **Mathlib** quality **by default**.\n\n## Comparison with Opus CPython formalization\n\n**Anthropic Opus** **[CPython Lean project](https://explainx.ai/blog/opus-5-5-cpython-lean-formalization-418-bugs-2026)** found **hundreds** of **implementation bugs** because **code** was **messy** but **executable**. **PaperLib** targets **published math**, where **mistakes** are **logical misstatements**, not **off-by-one C bugs**.\n\nBoth show **formal methods** returning **value** when **automation** scales **review bandwidth**.\n\n## Licensing and what is not redistributed\n\nREADME repeats: **only permissively licensed works** are formalized; **PDFs** stay with **publishers**. **Lawyers** should confirm **your institution** can **run Lean** on **derivative formalizations** before **shipping product features** that **embed theorem text**.\n\n## Failure modes the README foreshadows\n\n| Failure | Symptom | Mitigation | \n|---|---|---|\n| Misstated definition | Kernel proves wrong theorem | Read discrepancy notes | \n| Megatheorem drift | Hidden axiom in corollary chain | `lake exe axioms` | \n| Wrong paper version | Formalized v1 not v3 arXiv | Check README version note | \n| Overclaimed correctness | Press says proved | Quote README **Expect Mistakes** | \n\nTeaching **junior engineers** to read **failure tables** before **tweet threads** is part of **[formal methods literacy](https://explainx.ai/blog/certik-tensorlean-66-gpu-kernel-bugs-flashattention-deepgemm-december-2026)** now that **labs ship math** like **models**.\n\n## Why DeepMind open-sourced now\n\n**Top labs** compete on **trust** as much as **benchmarks**. After **[Gemini Cohen-Lenstra](https://explainx.ai/blog/google-deepmind-gemini-4-cohen-lenstra-cogentic-december-2026)** and **[cell biology models](https://explainx.ai/blog/google-cellgemma-open-cancer-car-t-prediction-december-2026)**, **PaperLib** signals **long-horizon investment** in **checkable science**, not **one-off demos**.\n\n**Stars** on **day one** are **noise**; **watch** **issue tracker** velocity and **Mathlib PRs** **cherry-picking** **PaperLib lemmas**.\n\n## Bootstrap and Python search script\n\nThe README **`scripts/bootstrap.sh`** prepares **local tooling**; **` search_paper_lib.py --carriers`** helps when you **forgot Mathlib module paths**. Require **Python 3.10+** in **CI images** alongside **elan**.\n\nIf **`lake exe cache get`** fails behind **corporate proxies**, mirror **cache** tarballs per **Lean community docs** before **blocking** **formal-papers** pilots on **IT tickets**.\n\n## Formal-papers versus formal-papers-2026\n\nThe **year repos** will accumulate **December** uploads faster than **this overview post** updates. Subscribe to **GitHub releases** on **`formal-papers-2026`** if you **formalize current arXiv** work; stay on **` formal-papers` root** if you **extend PaperLib** itself.\n\n## Annotating PaperLib with literature-links\n\nThe **annotations/PaperLib/** tree uses **literature-links** metadata so **formalized lemmas** trace to **DOI** and **arXiv** records. When you **browse** a **carrier** (for example **LeibnizAlgebra** in the README search example), you are **navigating** both **Lean names** and **bibliographic graph edges**.\n\n**Product managers** building **citation widgets** can **mirror** that **separation**: **human-readable reference**, **machine-checked artifact**, **explicit axiom debt**.\n\n## When to fork versus upstream\n\nIf your **company formalizes** **trade-secret** **algorithms**, **do not** open **PaperLib PRs** with **proprietary lemmas**. **Fork privately**, run the **same tooling**, and **contribute** only **sanitized** **megatheorems** after **legal review**.\n\nPublic **formal-papers** is for **published science**, not **unreleased model architectures**.\n\n## Deep dive on megatheorem_corollary tagging\n\nDependents marked **megatheorem_corollary** inherit **visibility** into **which literature results** were **assumed**. When **Mathlib** eventually **proves** the **parent megatheorem**, **Lean** **rebuilds** **corollaries** without **manual grep** across **hundreds** of files.\n\nThat is **technical debt tracking** **mathematicians** understand as **conditional results**, automated the way **software teams** track **open work items linked to issues**.\n\n## githooks and CI hints\n\nThe repo ships **`.githooks`** and **`.github`** workflow stubs so **contributors** run **axiom audits** before **push**. If you **vendor** **PaperLib** lemmas into a **product**, **vendor** the **same hooks** or **reimplement** them in **your monorepo** **lint** stage.\n\n**Lake** **`warn.sorry = true`** with **` warningAsError`** means **partial proofs** **fail CI**, aligning **formal-papers** with **production** **strictness** rather than **notebook** **culture**.\n\n## Reading list for new formal engineers\n\n1. **Lean 4 theorem proving** basics on**leanprover community** pages.\n2. **Mathlib style guide** for**naming** .\n3. **This README****Expect Mistakes** section.\n4. explainx **[Opus CPython bugs](https://explainx.ai/blog/opus-5-5-cpython-lean-formalization-418-bugs-2026)** for**scale reference** .\n5. **[Left to Solve](https://explainx.ai/blog/left-to-solve-ai-agents-open-math-lean-erdos-november-2026)** for**agent loops** .\n\n**Apache-2.0** licensing lets you **experiment commercially** with **PaperLib** code, but **theorem text** is **not** a **patent grant** on **underlying math**. Keep **lawyers** in the loop when **shipping** **formal verification** features to **paying customers**. Document **axiom debt** in **SOC2** packets the same way you document **third-party OSS** licenses. **Security reviewers** increasingly ask **what you proved** versus **what you assumed** when **AI writes proofs**.\n\n**Issue templates** on **GitHub** separate **PaperLib bugs** from **paper-specific discrepancies** so triage stays **fast**. When you file, paste **`lake exe axioms` output** and the **`formalization.yaml` hash** if present. Screenshots without **axiom lists** slow maintainers down. **Good bug reports** read like **compiler output**, not **marketing blurbs**. Attach **Lean version** from **lean-toolchain** too.", "url": "https://wpnews.pro/news/google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems", "canonical_source": "https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026?utm_source=rss&utm_medium=feed&utm_campaign=blog", "published_at": "2026-12-05 00:00:00+00:00", "updated_at": "2026-12-05 02:50:30.945129+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-research", "large-language-models", "developer-tools"], "entities": ["Google DeepMind", "Lean 4", "PaperLib", "Mathlib", "TauCeti", "cslib", "GitHub", "OpenAI"], "also_reported_by": [], "takeaway": "DeepMind's formal-papers ships executable Lean 4 with megatheorems declared as private axioms visible to Lean's kernel, and `lake exe axioms --root Papers` reports them so downstream theorems automatically drop the axiom once the megatheorem is proved.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems", "markdown": "https://wpnews.pro/news/google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems.md", "text": "https://wpnews.pro/news/google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems.txt", "jsonld": "https://wpnews.pro/news/google-deepmind-formal-papers-lean-4-paperlib-and-megatheorems.jsonld"}}