{"slug": "collection-of-ai-checked-math-and-cs-formalizations-in-lean-4", "title": "Collection of AI-checked math and CS formalizations in Lean 4", "summary": "Google DeepMind published Formal Papers, an open collection of AI-generated, machine-checked mathematical and computer science formalizations in Lean 4 built on PaperLib, a shared library of reusable definitions, structures and theorems layered over Mathlib, TauCeti, cslib and cslib-frontier. PaperLib states well-known theorems whose proofs would require substantial missing theory as \"megatheorem\" declarations backed by private Lean axioms tagged @[megatheorem], with dependencies tracked per paper via `lake exe axioms` and `#print axioms` and recorded in formalization.yaml. DeepMind warns that proofs are kernel-checked without `sorry` but definitions and theorem statements can still misstate or oversimplify the intended mathematics, and that megatheorem misformulations are not caught by proof checking, so the repositories should be treated as experimental research artifacts.", "body_md": "**Formal Papers** is an open collection of machine-checked mathematical and computer science formalizations in **Lean 4**, built on **PaperLib**, a shared library of reusable definitions, structures, and theorems.\n\nFormalizing a research paper often requires developing background theory not yet available in Mathlib or other shared libraries. We are sharing these AI-generated formalizations and **PaperLib** to reduce that burden. PaperLib builds on [Mathlib](https://github.com/leanprover-community/mathlib4), [TauCeti](https://github.com/TauCetiProject/TauCeti), [cslib](https://github.com/leanprover/cslib), and [cslib-frontier](https://github.com/cslib-community/cslib-frontier): it is broader and less curated. Over time, we will remove material from PaperLib as the upstream libraries expand to cover it.\n\nWhen a paper invokes a well-known theorem whose proof would require substantial missing theory, PaperLib states it as a **megatheorem**: a tagged declaration backed by a private Lean axiom (`@[megatheorem]`, with transitive PaperLib dependents tagged `@[megatheorem_corollary]`). Because the backing axiom is visible to Lean's kernel, `lake exe axioms` and `#print axioms` track exact dependencies per paper (recorded automatically in `formalization.yaml`). When a megatheorem is later proved, its axiom is discharged and downstream theorems automatically drop the dependency.\n\nThe Lean formalizations, documentation, and per-paper notes in this project were generated autonomously by AI systems, and **we expect there to be mistakes**:\n\n- Although proofs are checked by the Lean 4 kernel (without `sorry` ), definitions and theorem statements can still misstate, oversimplify, specialize, or otherwise diverge from the intended informal mathematics.\n- Megatheorem declarations are unproved formal statements of results from the literature, so any misformulation in a megatheorem statement is not caught by proof checking and could affect downstream results that depend on it.\n- Formalization notes in each paper's README.md record discrepancies encountered when translating a paper's informal statements into Lean 4. These frequently stem from omitted standing conventions, implicit domain assumptions, or informal-to-formal translation mistakes by the AI, and should **not** be read as claims of errors in the source papers.\n- If a work exists in multiple versions, we may not have formalized the most up-to-date version.\n\nPlease treat all contents of these repositories as experimental research artifacts, and verify definitions, statements, and axiom dependencies carefully before relying on them. If you see mistakes or have any suggestions, please [file an issue](https://github.com/google-deepmind/formal-papers/issues).\n\n**Prerequisites:** `git` (`>= 2.25`), `curl`, and [` elan`](https://github.com/leanprover/elan):\n\n```\ncurl https://elan.lean-lang.org/elan-init.sh -sSf | sh\n```\n\nYou do not need to clone `formal-papers`. Sparse-checkout just the paper you want from its year/period repository (for example, `arXiv:2407.14091` in [`formal-papers-2024`](https://github.com/google-deepmind/formal-papers-2024)):\n\n```\ngit clone --filter=blob:none --sparse https://github.com/google-deepmind/formal-papers-2024\ncd formal-papers-2024\ngit sparse-checkout set arxiv/2407.14091\ncd arxiv/2407.14091\n\n# Download prebuilt Mathlib, TauCeti, and PaperLib caches, then compile\n# (`lakefile.toml` enables `warn.sorry = true` and `warningAsError = true`)\nlake exe cache get\nlake build\n```\n\n## Optional axiom, linter, and module-system checks\n\n```\n# Audit duplicate declarations & axioms across the paper (verified PaperLib megatheorems allowed)\nlake exe axioms --root Papers\nlake exe axioms --module Papers.arxiv_2407_14091.MainTheorem\n\n# Inspect a single theorem's axioms directly\nprintf 'import Papers.arxiv_2407_14091.MainTheorem\\n#print axioms Papers.arxiv_2407_14091.minDegreeAt_le_choose_of_sized_intersecting\\n' | lake env lean --stdin\n\n# Run Lean linters and `module` opt-in check\nlake exe runLinter --no-build Papers.arxiv_2407_14091.MainTheorem\nlake exe module-system Papers.arxiv_2407_14091.MainTheorem\n```\n\nClone this repository if you want to search PaperLib or build a library module (`python3 >= 3.10` required for the search script):\n\n```\ngit clone --filter=blob:none https://github.com/google-deepmind/formal-papers\ncd formal-papers && bash scripts/bootstrap.sh\n# Optional: `lake exe cache get` also downloads the prebuilt PaperLib cache\n\npython3 scripts/search_paper_lib.py --carriers LeibnizAlgebra\npython3 scripts/search_paper_lib.py --topics Analysis\nlake build --no-ansi -q PaperLib.Analysis.SpecialFunctions.AbelIteration.Basic\n```\n\nSee [`CONTRIBUTING.md`](https://github.com/google-deepmind/formal-papers/blob/main/CONTRIBUTING.md).\n\nThis repo ([formal-papers](https://github.com/google-deepmind/formal-papers)): The shared Lean 4 library (`PaperLib/`) and its bibliographic annotations (` annotations/PaperLib/`, using [literature-links](https://github.com/mathlib-initiative/literature-links)).\n\n## Separate repositories by publication period containing the formalized works.\n\nEach work is a standalone Lake package with its own [`formalization.yaml`](https://github.com/mathlib-initiative/formalization.yaml).\n\nIf you find a bug, formalization discrepancy, misformulated `megatheorem`, citation or attribution error, or outdated paper version, or if you have author feedback or suggestions, please open a GitHub issue:\n\n- **Paper-specific discrepancies and author notes:** file an issue in that work's`formal-papers-<period>` repository using its**Report Discrepancy / Author Note** issue template, or open a[discrepancy report in `formal-papers`](https://github.com/google-deepmind/formal-papers/issues/new?template=discrepancy-report.yml) if you are unsure where it belongs.\n- **`PaperLib`, tooling, build/cache bugs, or general feedback:** open an issue in[`formal-papers`](https://github.com/google-deepmind/formal-papers/issues) .\n\nIncluding the source work (`arXiv` ID or DOI), repository path, and affected Lean module or declaration name helps us triage quickly. Pull requests fixing issues are also welcome; see [`CONTRIBUTING.md`](https://github.com/google-deepmind/formal-papers/blob/main/CONTRIBUTING.md).\n\nAll code and documentation in `formal-papers` and `formal-papers-<period>` are licensed under the [Apache License, Version 2.0](https://github.com/google-deepmind/formal-papers/blob/main/LICENSE). We only publish formalizations of permissively licensed works (such as CC BY, CC0, MIT, Apache-2.0, or public domain), and do not redistribute the works themselves.\n\nThis is not an officially supported Google product.", "url": "https://wpnews.pro/news/collection-of-ai-checked-math-and-cs-formalizations-in-lean-4", "canonical_source": "https://github.com/google-deepmind/formal-papers", "published_at": "2026-12-05 18:38:28+00:00", "updated_at": "2026-12-05 19:15:28.255567+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-research", "ai-tools", "developer-tools"], "entities": ["Google DeepMind", "Lean 4", "PaperLib", "Mathlib", "TauCeti", "cslib", "cslib-frontier", "Formal Papers"], "also_reported_by": [], "takeaway": "PaperLib's @[megatheorem] declarations let formalizations cite unproved literature results as tagged private axioms that `lake exe axioms` and `#print axioms` trace per paper, and downstream theorems automatically drop the dependency once the axiom is discharged.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/collection-of-ai-checked-math-and-cs-formalizations-in-lean-4", "markdown": "https://wpnews.pro/news/collection-of-ai-checked-math-and-cs-formalizations-in-lean-4.md", "text": "https://wpnews.pro/news/collection-of-ai-checked-math-and-cs-formalizations-in-lean-4.txt", "jsonld": "https://wpnews.pro/news/collection-of-ai-checked-math-and-cs-formalizations-in-lean-4.jsonld"}}