Collection of AI-checked math and CS formalizations in Lean 4 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. 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. Formalizing 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. When 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. The Lean formalizations, documentation, and per-paper notes in this project were generated autonomously by AI systems, and we expect there to be mistakes : - 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. - 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. - 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. - If a work exists in multiple versions, we may not have formalized the most up-to-date version. Please 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 . Prerequisites: git = 2.25 , curl , and elan https://github.com/leanprover/elan : curl https://elan.lean-lang.org/elan-init.sh -sSf | sh You 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 : git clone --filter=blob:none --sparse https://github.com/google-deepmind/formal-papers-2024 cd formal-papers-2024 git sparse-checkout set arxiv/2407.14091 cd arxiv/2407.14091 Download prebuilt Mathlib, TauCeti, and PaperLib caches, then compile lakefile.toml enables warn.sorry = true and warningAsError = true lake exe cache get lake build Optional axiom, linter, and module-system checks Audit duplicate declarations & axioms across the paper verified PaperLib megatheorems allowed lake exe axioms --root Papers lake exe axioms --module Papers.arxiv 2407 14091.MainTheorem Inspect a single theorem's axioms directly printf 'import Papers.arxiv 2407 14091.MainTheorem\n print axioms Papers.arxiv 2407 14091.minDegreeAt le choose of sized intersecting\n' | lake env lean --stdin Run Lean linters and module opt-in check lake exe runLinter --no-build Papers.arxiv 2407 14091.MainTheorem lake exe module-system Papers.arxiv 2407 14091.MainTheorem Clone this repository if you want to search PaperLib or build a library module python3 = 3.10 required for the search script : git clone --filter=blob:none https://github.com/google-deepmind/formal-papers cd formal-papers && bash scripts/bootstrap.sh Optional: lake exe cache get also downloads the prebuilt PaperLib cache python3 scripts/search paper lib.py --carriers LeibnizAlgebra python3 scripts/search paper lib.py --topics Analysis lake build --no-ansi -q PaperLib.Analysis.SpecialFunctions.AbelIteration.Basic See CONTRIBUTING.md https://github.com/google-deepmind/formal-papers/blob/main/CONTRIBUTING.md . This 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 . Separate repositories by publication period containing the formalized works. Each work is a standalone Lake package with its own formalization.yaml https://github.com/mathlib-initiative/formalization.yaml . If 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: - Paper-specific discrepancies and author notes: file an issue in that work's formal-papers-