{"id":179227,"topic":"ai","source":"explainx.ai","title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","url_hash":"cfdaef50c223459f160b1caea2fc2966d32c07ee","author":"","summary":"<a href=\"https://news.google.com/rss/articles/CBMiigFBVV95cUxPVF9FTElhTlRCU0RFYl83cGpuNmNnREVlbFpFdkIxbDJCRkFOQjRmbVBaeEJQWXUxaXN6TDQ2ZlFtTGFPX3B0X3VPVngxZ0FjOWZWaWdjaEJaYW9KRGY3TUlxdVdUY1d1UW52bEVTc1NNYkpPamU4ZnpBWWF6UHZqQlNmWjhlOEdfa0E?oc=5\" target=\"_blank\">Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems</a>&nbsp;&nbsp;<font color=\"#6f6f6f\">explainx.ai</font>","content":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.\nWhy PaperLib exists\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).\nPaperLib is broader and less curated than upstream libraries. Maintainers plan to delete PaperLib modules when Mathlib absorbs them.\nMegatheorems and axiom honesty\nFormal verification seal: puzzle pieces fitting with a green check\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.\nTools:\n- lake exe axioms --root Papers\n- lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n- #print axiomsvia- lake env lean --stdin\nEach paper package records dependencies in formalization.yaml. When someone later proves the megatheorem, the axiom drops automatically for downstream theorems.\nThat design matters after Opus Lean CPython bugs post and AlphaProof Signal verification taught readers to ask what exactly was checked.\nExpect mistakes: README guardrails\nDeepMind repeats four cautions:\n- Kernel-checked proofs do not stop wrong statements.\n- Megatheorem misformulations slip past proof checking.\n- Per-paper README notes document translation discrepancies; they are not accusations against original authors.\n- Formalized version may not be the latest arXiv v.\nTreat artifacts as experimental research, not homework answers.\nQuickstart commands\nMath proof chalkboard: node chain ending in a green check\nPrerequisites: git 2.25+, curl, elan.\nExample from README for arXiv:2407.14091 in formal-papers-2024:\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\nOptional linters: lake exe runLinter, lake exe module-system.\nFor PaperLib search, clone formal-papers, run bash scripts/bootstrap.sh, then python3 scripts/search_paper_lib.py --topics Analysis.\nRelation to OpenAI's December topology drop\nOpenAI's exotic four-spheres preprint 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.\nRelation to prior DeepMind formal posts\nexplainx.ai already covered AlphaProof code verification and Hadwiger Gemini Lean proof. formal-papers is the library layer those efforts can feed, similar in spirit to Anthropic lattice Lean papers.\nRepository layout and year-split packages\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.\nThat split keeps git clone sizes manageable when Mathlib cache already consumes gigabytes. It mirrors how Left to Solve ships challenge lists separate from proof attempts.\nTooling beyond lake build\nREADME documents:\n- lake exe runLinterfor style and sorry checks configured strict\n- lake exe module-systemfor Lean 4 module graph hygiene\n- scripts/search_paper_lib.pyfor topic and carrier grep\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 cultures adapt to kernel verification; formal math benefits similarly.\nAGENTS.md and contributor workflow\nCONTRIBUTING.md plus .agents/skills/formalize hint DeepMind expects agent-assisted formalization with human review. If you contribute:\n- Pick a permissively licensed paper.\n- Open a discrepancy issue when informal statements do not match Lean.\n- Prefer proving megatheorems over adding invisible axioms when Mathlib catches up.\nRisk disclosure for downstream ML papers\nTeams citing PaperLib lemmas in NeurIPS-style proofs should attach formalization.yaml axiom lists as supplementary material, the same way CLIP benchmarks attach eval scripts.\nWhat to run before you cite a lemma\n- Sparse-checkout only the arXiv ID you need.\n- Run lake exe axiomsand store the output beside your internal memo.\n- Read the paper README discrepancy section before you tweet theorem X formalized.\n- File GitHub issues using the Report Discrepancy template if you find statement bugs.\nExample workflow for one arXiv paper\nSuppose you care about arXiv:2407.14091 (README quickstart example).\n- Sparse clone formal-papers-2024and checkout only that directory.\n- Run lake exe cache getto pull Mathlib artifacts.\n- lake buildthe package; capture warnings as errors because sorry is disallowed.\n- lake exe axioms --moduleon the main theorem file; save output in your paper notes.\n- Read paper README discrepancies before citing lemma names in slides.\nIf axioms include megatheorem tags, link the formalization.yaml hash in your internal wiki so teammates know which literature results were assumed.\nHow PaperLib relates to Mathlib growth\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.\nThat mirrors industry data lakes beside warehouses. Teach interns the difference so they do not treat PaperLib as Mathlib quality by default.\nComparison with Opus CPython formalization\nAnthropic Opus CPython Lean project 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.\nBoth show formal methods returning value when automation scales review bandwidth.\nLicensing and what is not redistributed\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.\nFailure modes the README foreshadows\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 | \nTeaching junior engineers to read failure tables before tweet threads is part of formal methods literacy now that labs ship math like models.\nWhy DeepMind open-sourced now\nTop labs compete on trust as much as benchmarks. After Gemini Cohen-Lenstra and cell biology models, PaperLib signals long-horizon investment in checkable science, not one-off demos.\nStars on day one are noise; watch issue tracker velocity and Mathlib PRs cherry-picking PaperLib lemmas.\nBootstrap and Python search script\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.\nIf lake exe cache get fails behind corporate proxies, mirror cache tarballs per Lean community docs before blocking formal-papers pilots on IT tickets.\nFormal-papers versus formal-papers-2026\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.\nAnnotating PaperLib with literature-links\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.\nProduct managers building citation widgets can mirror that separation: human-readable reference, machine-checked artifact, explicit axiom debt.\nWhen to fork versus upstream\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.\nPublic formal-papers is for published science, not unreleased model architectures.\nDeep dive on megatheorem_corollary tagging\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.\nThat is technical debt tracking mathematicians understand as conditional results, automated the way software teams track open work items linked to issues.\ngithooks and CI hints\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.\nLake warn.sorry = true with warningAsError means partial proofs fail CI, aligning formal-papers with production strictness rather than notebook culture.\nReading list for new formal engineers\n- Lean 4 theorem proving basics on leanprover community pages.\n- Mathlib style guide for naming.\n- This README Expect Mistakes section.\n- explainx Opus CPython bugs for scale reference.\n- Left to Solve for agent loops.\nApache-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.\nIssue 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.","image_url":"https://explainx.ai/images/blog-library/signal-vs-noise-clean-line-in-static.webp","lang":"en","published_at":"2026-12-05T00:00:00+00:00","fetched_at":"2026-12-05T13:15:15+00:00","status":"read","starred":0,"extract_state":"ok","summary_auto":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.","cluster_id":null,"extract_retries":0,"extract_error":null,"item_type":"news","ref_id":null,"refs_json":null,"doi":null,"arxiv_id":null,"paper_version":null,"sources_json":null,"relevance_score":null,"relevance_method":null,"cited_by":null,"contract_version":"news_item.v1","format_contract_version":"news_item_formats.v1","dedup_url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}},"news_item":{"id":179227,"canonical_url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","source_url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","source_name":"explainx.ai","author":null,"published_at":"2026-12-05T00:00:00+00:00","locale":"en","topic":"ai","tags":[],"rss_summary":"<a href=\"https://news.google.com/rss/articles/CBMiigFBVV95cUxPVF9FTElhTlRCU0RFYl83cGpuNmNnREVlbFpFdkIxbDJCRkFOQjRmbVBaeEJQWXUxaXN6TDQ2ZlFtTGFPX3B0X3VPVngxZ0FjOWZWaWdjaEJaYW9KRGY3TUlxdVdUY1d1UW52bEVTc1NNYkpPamU4ZnpBWWF6UHZqQlNmWjhlOEdfa0E?oc=5\" target=\"_blank\">Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems</a>&nbsp;&nbsp;<font color=\"#6f6f6f\">explainx.ai</font>","full_text":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.\nWhy PaperLib exists\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).\nPaperLib is broader and less curated than upstream libraries. Maintainers plan to delete PaperLib modules when Mathlib absorbs them.\nMegatheorems and axiom honesty\nFormal verification seal: puzzle pieces fitting with a green check\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.\nTools:\n- lake exe axioms --root Papers\n- lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n- #print axiomsvia- lake env lean --stdin\nEach paper package records dependencies in formalization.yaml. When someone later proves the megatheorem, the axiom drops automatically for downstream theorems.\nThat design matters after Opus Lean CPython bugs post and AlphaProof Signal verification taught readers to ask what exactly was checked.\nExpect mistakes: README guardrails\nDeepMind repeats four cautions:\n- Kernel-checked proofs do not stop wrong statements.\n- Megatheorem misformulations slip past proof checking.\n- Per-paper README notes document translation discrepancies; they are not accusations against original authors.\n- Formalized version may not be the latest arXiv v.\nTreat artifacts as experimental research, not homework answers.\nQuickstart commands\nMath proof chalkboard: node chain ending in a green check\nPrerequisites: git 2.25+, curl, elan.\nExample from README for arXiv:2407.14091 in formal-papers-2024:\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\nOptional linters: lake exe runLinter, lake exe module-system.\nFor PaperLib search, clone formal-papers, run bash scripts/bootstrap.sh, then python3 scripts/search_paper_lib.py --topics Analysis.\nRelation to OpenAI's December topology drop\nOpenAI's exotic four-spheres preprint 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.\nRelation to prior DeepMind formal posts\nexplainx.ai already covered AlphaProof code verification and Hadwiger Gemini Lean proof. formal-papers is the library layer those efforts can feed, similar in spirit to Anthropic lattice Lean papers.\nRepository layout and year-split packages\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.\nThat split keeps git clone sizes manageable when Mathlib cache already consumes gigabytes. It mirrors how Left to Solve ships challenge lists separate from proof attempts.\nTooling beyond lake build\nREADME documents:\n- lake exe runLinterfor style and sorry checks configured strict\n- lake exe module-systemfor Lean 4 module graph hygiene\n- scripts/search_paper_lib.pyfor topic and carrier grep\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 cultures adapt to kernel verification; formal math benefits similarly.\nAGENTS.md and contributor workflow\nCONTRIBUTING.md plus .agents/skills/formalize hint DeepMind expects agent-assisted formalization with human review. If you contribute:\n- Pick a permissively licensed paper.\n- Open a discrepancy issue when informal statements do not match Lean.\n- Prefer proving megatheorems over adding invisible axioms when Mathlib catches up.\nRisk disclosure for downstream ML papers\nTeams citing PaperLib lemmas in NeurIPS-style proofs should attach formalization.yaml axiom lists as supplementary material, the same way CLIP benchmarks attach eval scripts.\nWhat to run before you cite a lemma\n- Sparse-checkout only the arXiv ID you need.\n- Run lake exe axiomsand store the output beside your internal memo.\n- Read the paper README discrepancy section before you tweet theorem X formalized.\n- File GitHub issues using the Report Discrepancy template if you find statement bugs.\nExample workflow for one arXiv paper\nSuppose you care about arXiv:2407.14091 (README quickstart example).\n- Sparse clone formal-papers-2024and checkout only that directory.\n- Run lake exe cache getto pull Mathlib artifacts.\n- lake buildthe package; capture warnings as errors because sorry is disallowed.\n- lake exe axioms --moduleon the main theorem file; save output in your paper notes.\n- Read paper README discrepancies before citing lemma names in slides.\nIf axioms include megatheorem tags, link the formalization.yaml hash in your internal wiki so teammates know which literature results were assumed.\nHow PaperLib relates to Mathlib growth\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.\nThat mirrors industry data lakes beside warehouses. Teach interns the difference so they do not treat PaperLib as Mathlib quality by default.\nComparison with Opus CPython formalization\nAnthropic Opus CPython Lean project 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.\nBoth show formal methods returning value when automation scales review bandwidth.\nLicensing and what is not redistributed\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.\nFailure modes the README foreshadows\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 | \nTeaching junior engineers to read failure tables before tweet threads is part of formal methods literacy now that labs ship math like models.\nWhy DeepMind open-sourced now\nTop labs compete on trust as much as benchmarks. After Gemini Cohen-Lenstra and cell biology models, PaperLib signals long-horizon investment in checkable science, not one-off demos.\nStars on day one are noise; watch issue tracker velocity and Mathlib PRs cherry-picking PaperLib lemmas.\nBootstrap and Python search script\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.\nIf lake exe cache get fails behind corporate proxies, mirror cache tarballs per Lean community docs before blocking formal-papers pilots on IT tickets.\nFormal-papers versus formal-papers-2026\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.\nAnnotating PaperLib with literature-links\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.\nProduct managers building citation widgets can mirror that separation: human-readable reference, machine-checked artifact, explicit axiom debt.\nWhen to fork versus upstream\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.\nPublic formal-papers is for published science, not unreleased model architectures.\nDeep dive on megatheorem_corollary tagging\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.\nThat is technical debt tracking mathematicians understand as conditional results, automated the way software teams track open work items linked to issues.\ngithooks and CI hints\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.\nLake warn.sorry = true with warningAsError means partial proofs fail CI, aligning formal-papers with production strictness rather than notebook culture.\nReading list for new formal engineers\n- Lean 4 theorem proving basics on leanprover community pages.\n- Mathlib style guide for naming.\n- This README Expect Mistakes section.\n- explainx Opus CPython bugs for scale reference.\n- Left to Solve for agent loops.\nApache-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.\nIssue 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.","excerpt":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.","extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 10566 characters.","diagnostics_url":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}}},"display_formats":["compact","card","full","digest_section","json"]},"daily_stack_record":{"title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.","source":"explainx.ai","date":"2026-12-05T00:00:00+00:00","content":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.\nWhy PaperLib exists\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).\nPaperLib is broader and less curated than upstream libraries. Maintainers plan to delete PaperLib modules when Mathlib absorbs them.\nMegatheorems and axiom honesty\nFormal verification seal: puzzle pieces fitting with a green check\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.\nTools:\n- lake exe axioms --root Papers\n- lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n- #print axiomsvia- lake env lean --stdin\nEach paper package records dependencies in formalization.yaml. When someone later proves the megatheorem, the axiom drops automatically for downstream theorems.\nThat design matters after Opus Lean CPython bugs post and AlphaProof Signal verification taught readers to ask what exactly was checked.\nExpect mistakes: README guardrails\nDeepMind repeats four cautions:\n- Kernel-checked proofs do not stop wrong statements.\n- Megatheorem misformulations slip past proof checking.\n- Per-paper README notes document translation discrepancies; they are not accusations against original authors.\n- Formalized version may not be the latest arXiv v.\nTreat artifacts as experimental research, not homework answers.\nQuickstart commands\nMath proof chalkboard: node chain ending in a green check\nPrerequisites: git 2.25+, curl, elan.\nExample from README for arXiv:2407.14091 in formal-papers-2024:\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\nOptional linters: lake exe runLinter, lake exe module-system.\nFor PaperLib search, clone formal-papers, run bash scripts/bootstrap.sh, then python3 scripts/search_paper_lib.py --topics Analysis.\nRelation to OpenAI's December topology drop\nOpenAI's exotic four-spheres preprint 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.\nRelation to prior DeepMind formal posts\nexplainx.ai already covered AlphaProof code verification and Hadwiger Gemini Lean proof. formal-papers is the library layer those efforts can feed, similar in spirit to Anthropic lattice Lean papers.\nRepository layout and year-split packages\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.\nThat split keeps git clone sizes manageable when Mathlib cache already consumes gigabytes. It mirrors how Left to Solve ships challenge lists separate from proof attempts.\nTooling beyond lake build\nREADME documents:\n- lake exe runLinterfor style and sorry checks configured strict\n- lake exe module-systemfor Lean 4 module graph hygiene\n- scripts/search_paper_lib.pyfor topic and carrier grep\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 cultures adapt to kernel verification; formal math benefits similarly.\nAGENTS.md and contributor workflow\nCONTRIBUTING.md plus .agents/skills/formalize hint DeepMind expects agent-assisted formalization with human review. If you contribute:\n- Pick a permissively licensed paper.\n- Open a discrepancy issue when informal statements do not match Lean.\n- Prefer proving megatheorems over adding invisible axioms when Mathlib catches up.\nRisk disclosure for downstream ML papers\nTeams citing PaperLib lemmas in NeurIPS-style proofs should attach formalization.yaml axiom lists as supplementary material, the same way CLIP benchmarks attach eval scripts.\nWhat to run before you cite a lemma\n- Sparse-checkout only the arXiv ID you need.\n- Run lake exe axiomsand store the output beside your internal memo.\n- Read the paper README discrepancy section before you tweet theorem X formalized.\n- File GitHub issues using the Report Discrepancy template if you find statement bugs.\nExample workflow for one arXiv paper\nSuppose you care about arXiv:2407.14091 (README quickstart example).\n- Sparse clone formal-papers-2024and checkout only that directory.\n- Run lake exe cache getto pull Mathlib artifacts.\n- lake buildthe package; capture warnings as errors because sorry is disallowed.\n- lake exe axioms --moduleon the main theorem file; save output in your paper notes.\n- Read paper README discrepancies before citing lemma names in slides.\nIf axioms include megatheorem tags, link the formalization.yaml hash in your internal wiki so teammates know which literature results were assumed.\nHow PaperLib relates to Mathlib growth\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.\nThat mirrors industry data lakes beside warehouses. Teach interns the difference so they do not treat PaperLib as Mathlib quality by default.\nComparison with Opus CPython formalization\nAnthropic Opus CPython Lean project 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.\nBoth show formal methods returning value when automation scales review bandwidth.\nLicensing and what is not redistributed\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.\nFailure modes the README foreshadows\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 | \nTeaching junior engineers to read failure tables before tweet threads is part of formal methods literacy now that labs ship math like models.\nWhy DeepMind open-sourced now\nTop labs compete on trust as much as benchmarks. After Gemini Cohen-Lenstra and cell biology models, PaperLib signals long-horizon investment in checkable science, not one-off demos.\nStars on day one are noise; watch issue tracker velocity and Mathlib PRs cherry-picking PaperLib lemmas.\nBootstrap and Python search script\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.\nIf lake exe cache get fails behind corporate proxies, mirror cache tarballs per Lean community docs before blocking formal-papers pilots on IT tickets.\nFormal-papers versus formal-papers-2026\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.\nAnnotating PaperLib with literature-links\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.\nProduct managers building citation widgets can mirror that separation: human-readable reference, machine-checked artifact, explicit axiom debt.\nWhen to fork versus upstream\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.\nPublic formal-papers is for published science, not unreleased model architectures.\nDeep dive on megatheorem_corollary tagging\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.\nThat is technical debt tracking mathematicians understand as conditional results, automated the way software teams track open work items linked to issues.\ngithooks and CI hints\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.\nLake warn.sorry = true with warningAsError means partial proofs fail CI, aligning formal-papers with production strictness rather than notebook culture.\nReading list for new formal engineers\n- Lean 4 theorem proving basics on leanprover community pages.\n- Mathlib style guide for naming.\n- This README Expect Mistakes section.\n- explainx Opus CPython bugs for scale reference.\n- Left to Solve for agent loops.\nApache-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.\nIssue 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.","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 10566 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}},"tags":[]},"fallback_formats":["markdown","json","html"],"actions":{"read":"/item/179227","export_markdown":"/api/items/179227/export?format=markdown","export_json":"/api/items/179227/export?format=json","diagnose":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026"},"formats":{"full":{"id":179227,"title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","source":"explainx.ai","author":null,"published_at":"2026-12-05T00:00:00+00:00","locale":"en","topic":"ai","tags":[],"excerpt":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.","full_text":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.\nWhy PaperLib exists\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).\nPaperLib is broader and less curated than upstream libraries. Maintainers plan to delete PaperLib modules when Mathlib absorbs them.\nMegatheorems and axiom honesty\nFormal verification seal: puzzle pieces fitting with a green check\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.\nTools:\n- lake exe axioms --root Papers\n- lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n- #print axiomsvia- lake env lean --stdin\nEach paper package records dependencies in formalization.yaml. When someone later proves the megatheorem, the axiom drops automatically for downstream theorems.\nThat design matters after Opus Lean CPython bugs post and AlphaProof Signal verification taught readers to ask what exactly was checked.\nExpect mistakes: README guardrails\nDeepMind repeats four cautions:\n- Kernel-checked proofs do not stop wrong statements.\n- Megatheorem misformulations slip past proof checking.\n- Per-paper README notes document translation discrepancies; they are not accusations against original authors.\n- Formalized version may not be the latest arXiv v.\nTreat artifacts as experimental research, not homework answers.\nQuickstart commands\nMath proof chalkboard: node chain ending in a green check\nPrerequisites: git 2.25+, curl, elan.\nExample from README for arXiv:2407.14091 in formal-papers-2024:\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\nOptional linters: lake exe runLinter, lake exe module-system.\nFor PaperLib search, clone formal-papers, run bash scripts/bootstrap.sh, then python3 scripts/search_paper_lib.py --topics Analysis.\nRelation to OpenAI's December topology drop\nOpenAI's exotic four-spheres preprint 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.\nRelation to prior DeepMind formal posts\nexplainx.ai already covered AlphaProof code verification and Hadwiger Gemini Lean proof. formal-papers is the library layer those efforts can feed, similar in spirit to Anthropic lattice Lean papers.\nRepository layout and year-split packages\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.\nThat split keeps git clone sizes manageable when Mathlib cache already consumes gigabytes. It mirrors how Left to Solve ships challenge lists separate from proof attempts.\nTooling beyond lake build\nREADME documents:\n- lake exe runLinterfor style and sorry checks configured strict\n- lake exe module-systemfor Lean 4 module graph hygiene\n- scripts/search_paper_lib.pyfor topic and carrier grep\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 cultures adapt to kernel verification; formal math benefits similarly.\nAGENTS.md and contributor workflow\nCONTRIBUTING.md plus .agents/skills/formalize hint DeepMind expects agent-assisted formalization with human review. If you contribute:\n- Pick a permissively licensed paper.\n- Open a discrepancy issue when informal statements do not match Lean.\n- Prefer proving megatheorems over adding invisible axioms when Mathlib catches up.\nRisk disclosure for downstream ML papers\nTeams citing PaperLib lemmas in NeurIPS-style proofs should attach formalization.yaml axiom lists as supplementary material, the same way CLIP benchmarks attach eval scripts.\nWhat to run before you cite a lemma\n- Sparse-checkout only the arXiv ID you need.\n- Run lake exe axiomsand store the output beside your internal memo.\n- Read the paper README discrepancy section before you tweet theorem X formalized.\n- File GitHub issues using the Report Discrepancy template if you find statement bugs.\nExample workflow for one arXiv paper\nSuppose you care about arXiv:2407.14091 (README quickstart example).\n- Sparse clone formal-papers-2024and checkout only that directory.\n- Run lake exe cache getto pull Mathlib artifacts.\n- lake buildthe package; capture warnings as errors because sorry is disallowed.\n- lake exe axioms --moduleon the main theorem file; save output in your paper notes.\n- Read paper README discrepancies before citing lemma names in slides.\nIf axioms include megatheorem tags, link the formalization.yaml hash in your internal wiki so teammates know which literature results were assumed.\nHow PaperLib relates to Mathlib growth\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.\nThat mirrors industry data lakes beside warehouses. Teach interns the difference so they do not treat PaperLib as Mathlib quality by default.\nComparison with Opus CPython formalization\nAnthropic Opus CPython Lean project 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.\nBoth show formal methods returning value when automation scales review bandwidth.\nLicensing and what is not redistributed\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.\nFailure modes the README foreshadows\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 | \nTeaching junior engineers to read failure tables before tweet threads is part of formal methods literacy now that labs ship math like models.\nWhy DeepMind open-sourced now\nTop labs compete on trust as much as benchmarks. After Gemini Cohen-Lenstra and cell biology models, PaperLib signals long-horizon investment in checkable science, not one-off demos.\nStars on day one are noise; watch issue tracker velocity and Mathlib PRs cherry-picking PaperLib lemmas.\nBootstrap and Python search script\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.\nIf lake exe cache get fails behind corporate proxies, mirror cache tarballs per Lean community docs before blocking formal-papers pilots on IT tickets.\nFormal-papers versus formal-papers-2026\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.\nAnnotating PaperLib with literature-links\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.\nProduct managers building citation widgets can mirror that separation: human-readable reference, machine-checked artifact, explicit axiom debt.\nWhen to fork versus upstream\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.\nPublic formal-papers is for published science, not unreleased model architectures.\nDeep dive on megatheorem_corollary tagging\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.\nThat is technical debt tracking mathematicians understand as conditional results, automated the way software teams track open work items linked to issues.\ngithooks and CI hints\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.\nLake warn.sorry = true with warningAsError means partial proofs fail CI, aligning formal-papers with production strictness rather than notebook culture.\nReading list for new formal engineers\n- Lean 4 theorem proving basics on leanprover community pages.\n- Mathlib style guide for naming.\n- This README Expect Mistakes section.\n- explainx Opus CPython bugs for scale reference.\n- Left to Solve for agent loops.\nApache-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.\nIssue 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.","reading_time_min":7,"extraction":{"state":"ok","confidence":0.9,"error":null,"explanation":"High confidence: full text extraction produced 10566 characters.","diagnostics_url":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}}},"quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}},"actions":{"read":"/item/179227","export_markdown":"/api/items/179227/export?format=markdown","export_json":"/api/items/179227/export?format=json","diagnose":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026"}},"digest":{"id":179227,"title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","source":"explainx.ai","topic":"ai","published_at":"2026-12-05T00:00:00+00:00","excerpt":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README says content was AI generated, warns…","quality_bucket":"high","quality_reason":"High confidence: full text extraction produced 10566 characters.","reading_time_min":7,"cluster_id":null},"card":{"display_title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","subtitle":"explainx.ai · 2026-12-05","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 atop Mathlib, TauCeti, cslib, and…","badges":["quality:high"],"links":{"read":"/item/179227","original":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","diagnose":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026"},"quality_warning":null},"export":{"title":"Google DeepMind formal-papers: Lean 4 PaperLib and Megatheorems - explainx.ai","url":"https://explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.","source":"explainx.ai","date":"2026-12-05T00:00:00+00:00","content":"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 atop Mathlib, TauCeti, cslib, and cslib-frontier. The README 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.\nWhy PaperLib exists\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).\nPaperLib is broader and less curated than upstream libraries. Maintainers plan to delete PaperLib modules when Mathlib absorbs them.\nMegatheorems and axiom honesty\nFormal verification seal: puzzle pieces fitting with a green check\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.\nTools:\n- lake exe axioms --root Papers\n- lake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n- #print axiomsvia- lake env lean --stdin\nEach paper package records dependencies in formalization.yaml. When someone later proves the megatheorem, the axiom drops automatically for downstream theorems.\nThat design matters after Opus Lean CPython bugs post and AlphaProof Signal verification taught readers to ask what exactly was checked.\nExpect mistakes: README guardrails\nDeepMind repeats four cautions:\n- Kernel-checked proofs do not stop wrong statements.\n- Megatheorem misformulations slip past proof checking.\n- Per-paper README notes document translation discrepancies; they are not accusations against original authors.\n- Formalized version may not be the latest arXiv v.\nTreat artifacts as experimental research, not homework answers.\nQuickstart commands\nMath proof chalkboard: node chain ending in a green check\nPrerequisites: git 2.25+, curl, elan.\nExample from README for arXiv:2407.14091 in formal-papers-2024:\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\nOptional linters: lake exe runLinter, lake exe module-system.\nFor PaperLib search, clone formal-papers, run bash scripts/bootstrap.sh, then python3 scripts/search_paper_lib.py --topics Analysis.\nRelation to OpenAI's December topology drop\nOpenAI's exotic four-spheres preprint 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.\nRelation to prior DeepMind formal posts\nexplainx.ai already covered AlphaProof code verification and Hadwiger Gemini Lean proof. formal-papers is the library layer those efforts can feed, similar in spirit to Anthropic lattice Lean papers.\nRepository layout and year-split packages\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.\nThat split keeps git clone sizes manageable when Mathlib cache already consumes gigabytes. It mirrors how Left to Solve ships challenge lists separate from proof attempts.\nTooling beyond lake build\nREADME documents:\n- lake exe runLinterfor style and sorry checks configured strict\n- lake exe module-systemfor Lean 4 module graph hygiene\n- scripts/search_paper_lib.pyfor topic and carrier grep\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 cultures adapt to kernel verification; formal math benefits similarly.\nAGENTS.md and contributor workflow\nCONTRIBUTING.md plus .agents/skills/formalize hint DeepMind expects agent-assisted formalization with human review. If you contribute:\n- Pick a permissively licensed paper.\n- Open a discrepancy issue when informal statements do not match Lean.\n- Prefer proving megatheorems over adding invisible axioms when Mathlib catches up.\nRisk disclosure for downstream ML papers\nTeams citing PaperLib lemmas in NeurIPS-style proofs should attach formalization.yaml axiom lists as supplementary material, the same way CLIP benchmarks attach eval scripts.\nWhat to run before you cite a lemma\n- Sparse-checkout only the arXiv ID you need.\n- Run lake exe axiomsand store the output beside your internal memo.\n- Read the paper README discrepancy section before you tweet theorem X formalized.\n- File GitHub issues using the Report Discrepancy template if you find statement bugs.\nExample workflow for one arXiv paper\nSuppose you care about arXiv:2407.14091 (README quickstart example).\n- Sparse clone formal-papers-2024and checkout only that directory.\n- Run lake exe cache getto pull Mathlib artifacts.\n- lake buildthe package; capture warnings as errors because sorry is disallowed.\n- lake exe axioms --moduleon the main theorem file; save output in your paper notes.\n- Read paper README discrepancies before citing lemma names in slides.\nIf axioms include megatheorem tags, link the formalization.yaml hash in your internal wiki so teammates know which literature results were assumed.\nHow PaperLib relates to Mathlib growth\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.\nThat mirrors industry data lakes beside warehouses. Teach interns the difference so they do not treat PaperLib as Mathlib quality by default.\nComparison with Opus CPython formalization\nAnthropic Opus CPython Lean project 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.\nBoth show formal methods returning value when automation scales review bandwidth.\nLicensing and what is not redistributed\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.\nFailure modes the README foreshadows\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 | \nTeaching junior engineers to read failure tables before tweet threads is part of formal methods literacy now that labs ship math like models.\nWhy DeepMind open-sourced now\nTop labs compete on trust as much as benchmarks. After Gemini Cohen-Lenstra and cell biology models, PaperLib signals long-horizon investment in checkable science, not one-off demos.\nStars on day one are noise; watch issue tracker velocity and Mathlib PRs cherry-picking PaperLib lemmas.\nBootstrap and Python search script\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.\nIf lake exe cache get fails behind corporate proxies, mirror cache tarballs per Lean community docs before blocking formal-papers pilots on IT tickets.\nFormal-papers versus formal-papers-2026\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.\nAnnotating PaperLib with literature-links\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.\nProduct managers building citation widgets can mirror that separation: human-readable reference, machine-checked artifact, explicit axiom debt.\nWhen to fork versus upstream\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.\nPublic formal-papers is for published science, not unreleased model architectures.\nDeep dive on megatheorem_corollary tagging\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.\nThat is technical debt tracking mathematicians understand as conditional results, automated the way software teams track open work items linked to issues.\ngithooks and CI hints\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.\nLake warn.sorry = true with warningAsError means partial proofs fail CI, aligning formal-papers with production strictness rather than notebook culture.\nReading list for new formal engineers\n- Lean 4 theorem proving basics on leanprover community pages.\n- Mathlib style guide for naming.\n- This README Expect Mistakes section.\n- explainx Opus CPython bugs for scale reference.\n- Left to Solve for agent loops.\nApache-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.\nIssue 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.","confidence":0.9,"diagnostics_url":"/api/diagnose?url=https%3A//explainx.ai/blog/google-deepmind-formal-papers-paperlib-lean-december-2026","quality_bucket":"high","failure_kind":"none","retryable":false,"quality_reason":"High confidence: full text extraction produced 10566 characters.","quality_profile":{"profile_version":"extraction_quality.v2","bucket":"high","confidence":0.9,"failure_kind":"none","retryable":false,"retry_after_attempts":0,"reason":"High confidence: full text extraction produced 10566 characters.","operator_guidance":{"severity":"ok","recommended_action":"trust_full_text","next_step":"Use the extracted full text as the primary article source.","operator_label":"Ready","can_retry":false,"can_use_summary":false,"diagnostics_required":false},"content_depth":{"contract_version":"content_depth.v1","category":"full_text","label":"Full text","has_full_text":true,"has_summary":true,"content_length":10566,"summary_length":429,"usable_text_length":10566,"source_field":"content"},"legacy_collapsed":false,"signals":{"extract_state":"ok","extract_error":null,"extract_retries":0,"content_length":10566,"summary_length":429}},"tags":[],"format_contract_version":"news_item_formats.v1"}}}