28,000 papers spanning 20 years! Google is using AI to re-examine the entire mathematical legacy of humanity.
Yesterday, OpenAI's public mathematics repository openai/math received a wave of updates.
Today, Google DeepMind uploaded a total of 42 repositories on Github, with timestamps ranging from "pre-1500" all the way to "2026", containing Lean 4 formalized code for nearly 28,000 mathematics and computer science papers.
Every definition, lemma, and theorem in each paper has been translated line by line by AI into the Lean language, and verified step by step by the computer.
This project named "Formal Papers" is probably the largest-scale mathematics formalization project to date.
When a certain theorem in a paper fails to pass verification in Lean, the AI will construct a specific counterexample to prove that the original statement is problematic, and then provide a corrected version.
Formal Papers consists of a core library called PaperLib and 42 sub-repositories grouped by chronological order. Built on the community-maintained Mathlib, PaperLib also integrates open-source libraries such as TauCeti and cslib, containing more than 85,000 Lean files in total. Each formalized paper is an independent Lean project that does not use sorry placeholders during compilation, which means every step of derivation has been machine-checked by the Lean kernel.
The distribution of papers is highly concentrated in recent years. More than 90% of the formalization efforts cover papers published after 2021, and the 2026 repository alone includes nearly 5,500 papers. The earliest actual included paper can be traced back to 2004.
For comparison, the mathematical achievements released by OpenAI in October included 722 papers, less than half of which came with Lean code. The volume of content released by Google DeepMind at one time is nearly 40 times that of the former.
How to Enable AI to Carry Out Large-Scale Formal Verification
Lean is a language that has almost paranoiac requirements for precision. When human mathematicians write papers, they are used to omitting "obvious" assumptions and taking certain conventions for granted, and reviewers usually do not nitpick on these points. But Lean will not let go of any logical gap. When AI translates a paper into Lean, all omitted assumptions, ambiguous definitions, and imprecise derivation steps will be exposed.
In the 2023 repository, more than 3,800 of the 4,127 formalized papers come with Formalization Notes.
Let's look at a specific example. In a 2022 preprint on dynamic reasoning of Bayesian learning, the AI marked two "repairable mathematical discrepancies". First, the paper repeatedly takes the minimum value over an estimator space, but does not assume that this minimum value exists. When the space is an unbounded infinite set, the minimum value may not be attainable. The AI constructed a simple loss function in Lean as a counterexample to prove that the minimum value may indeed not exist, then reformulated the affected conclusions using infimum and completed the proof.
Second, the overview section of the paper introduces different probability kernels for each round of reasoning, but the subsequent proofs implicitly use the same one. The AI wrote a two-round counterexample to illustrate that this switch requires explicit assumptions.
Let's look at another 2022 paper on extremal sequences of Jacobi symbols. The AI marked three statement discrepancies, each with a specific counterexample in Lean. For example, Theorems 3.1 and 3.2 omit necessary and sufficient conditions in the case of n ≡ 3 (mod 4). The AI constructed a counterexample [-1, -1] when n = 91 = 7 × 13, proving that this sequence satisfies the D-extremal condition but does not meet the sufficient and necessary classification claimed in the paper.
None of these problems affect the core conclusions of the paper, and most of them are "conventional" issues such as unwritten implicit assumptions and inconsistent symbol usage. A careful reviewer might choose to overlook these, but there is no such thing as "conventional practice" for Lean.
The technical design of Formal Papers includes two key nodes, PaperLib and Megatheorem.
The most labor-intensive work in formalizing a mathematical paper in Lean is often not the proof itself, but supplementing the background theories that the paper relies on.
As the largest shared mathematics library in the Lean community, Mathlib currently only covers a small part of modern mathematical research. In the past, when formalizing a new paper, researchers often had to build the missing theoretical foundation from scratch, leading to a large amount of duplicated work. This time, Google DeepMind collected the background theories accumulated during the formalization of nearly 28,000 papers, and built a brand new shared mathematics library — PaperLib.
On the basis of Mathlib, it adds a layer of broader but relatively less refined mathematical theories. In the future, no matter humans or AI, who want to formally verify a new mathematical result, can directly call the existing theories in it without building everything from scratch.
DeepMind stated that as upstream mathematics libraries such as Mathlib continue to improve, the corresponding content in PaperLib will be phased out gradually.
This means that the formalization results of 28,000 papers are not only a large-scale inspection of existing mathematical knowledge, but also a set of reusable infrastructure left for future mathematical research.
The other key design is the "megatheorem" mechanism. For those famous theorems whose proofs require a large number of not-yet-formalized theories, Formal Papers declares them as labeled axioms marked with @[megatheorem].
The Lean toolchain can accurately track which papers depend on which megatheorems. Once a certain megatheorem is formally proven in the future, the relevant axiom will be removed, and downstream dependencies will take effect automatically.
Rather than waiting for all basic theories to be perfectly formalized before starting work, it is better to treat known conclusions as axioms, mark the dependencies clearly, and make large-scale formalization possible. However, if the statement of a megatheorem is incorrect, Lean's proof check cannot capture it, and the error will propagate down along the dependency chain.
An Auditor That Needs to Be Audited
Planning to carry out comprehensive formalization on the timeline from "pre-1500" to "2026", AI can completely rewrite the ceiling of formalization scale.
Formalizing a major mathematical theorem is a huge project. In 2005, Georges Gonthier completed the formalization of the four-color theorem, which took several years. The team led by Kevin Buzzard spent years formalizing the core components of Fermat's Last Theorem. A common saying in the Lean community is that translating one page of a mathematical paper into Lean takes about a week.
Now, Google DeepMind's AI has translated nearly 28,000 papers in a few months. Even if these translations are not perfect, even if the megatheorem mechanism means that part of the foundation is not completely reliable, this magnitude itself redefines the boundary of "possibility".
AI is becoming a new role in mathematical peer review. The Formalization Notes of Formal Papers are essentially an automated peer review report. It checks line by line whether the definitions, assumptions, and derivations in the paper hold under strict logic, and constructs counterexamples and provides corrections when encountering problems.
Will this change the process of mathematical publication? Since 2026, there has been a significant abnormal increase in the number of mathematics submissions on arXiv, and it is still unclear how much of this comes from AI generation. Terence Tao has publicly stated that if the authors of a paper cannot clearly explain their results, the paper should not be published. 25 Fields Medal winners jointly warned that the practice of AI laboratories competing to solve famous mathematical problems is inconsistent with the real goal of mathematical research.
In this context, an AI system that can batch review the logical rigor of papers is also an AI system that can batch produce formalized papers. Tool and threat, two sides of the same coin.
PaperLib may have more long-term value than the formalization of a single paper. If PaperLib continues to grow and maintains its quality, it will become a new type of mathematical infrastructure. In the future, whether humans or AI want to formalize a new paper, a large amount of background theory will already be in place. This lowers the entry threshold of the entire field, and also allows the achievements between AI mathematical systems to be reused with each other.
Handing over hundreds of years of accumulated human mathematical knowledge to AI for re-inspection does not mean that AI has become the arbiter of mathematical truth.
Google DeepMind specially placed a reminder in a prominent position of the project: Formalization Notes should not be regarded as accusations that the original papers have errors.
After all, Lean can strictly verify the logic of a proof, but cannot judge whether the AI accurately understands the original intention of the paper's author. A misinterpretation of a definition or an omission of an implicit condition may make the formal verification deviate from the problem to be studied. Therefore, Google DeepMind has also set up feedback channels for each repository, inviting original paper authors and the mathematics community to participate in this work together.
In the past, the accumulation and verification of mathematical knowledge mainly relied on generations of mathematicians. Today, AI makes large-scale, systematic retrospective of existing mathematical achievements possible, and mathematicians can also continuously correct AI's understanding of mathematics in this process.
28,000 papers are just the beginning. When the cost of re-examining existing knowledge is greatly reduced, humans may also discover some brand new conclusions from those mathematical results that have long been familiar.
This article is from the WeChat official account "Machine Heart", and is published by 36Kr with authorization.