AIで開発する

Lean theorem prover and the rise of practical autoformalization in 2026

Mathematicians are using the Lean theorem prover to verify complex proofs. In 2026, AI-driven autoformalization turned manual transcription into a practical reality.

Textbooks turning into code representing autoformalization
この記事用に生成されたイラスト

この記事は英語版のみ利用可能です。

Mathematicians are increasingly turning to the Lean theorem prover to ensure the absolute reliability of mathematical proofs. By late spring 2025, researchers began achieving significant milestones in autoformalization, where artificial intelligence translates paper proofs into machine-checkable code. This shift marks a transition from labor-intensive manual verification to AI-assisted formalization, fundamentally changing how mathematical consistency is maintained in science and civilization.

What happened

Formal proof involves exhaustively checking mathematical arguments at the level of foundational logic. While theoretically possible by hand, the sheer volume of steps requires computer assistance. Software systems known as proof assistants or interactive theorem provers handle this task. Notable examples include Automath, HOL Light, Isabelle, Metamath, Mizar, and Coq, which was renamed Rocq last year. Among these, Lean has become the most popular choice for mathematicians. Developed by Leo de Moura at Microsoft in 2013, Lean was released as open-source software, allowing widespread adoption. Jeremy Avigad, director of Carnegie Mellon’s NSF institute ICARM, was an early adopter, running a seminar in 2015 that helped spark community interest.

The ecosystem around Lean grew significantly with the creation of mathlib, a massive library of formalized mathematics. Started in 2017 by Mario Carneiro and Johannes Hölzl, mathlib now contains nearly 300,000 theorems, over 100,000 definitions, and 2.5 million lines of code contributed by more than 700 individuals. This library allows mathematicians to cite existing results, such as the Cauchy-Schwarz inequality, without reproving them. Recent high-profile formalizations completed this year include the Navier-Stokes forced blowup, sphere packing in 8 and 24 dimensions, and Fermat’s Last Theorem. These projects have brought widespread awareness to the potential of formal verification.

Autoformalization, the use of AI to convert paper proofs into formal code, has moved from a theoretical dream to a practical reality in 2026. Previously, formalizing a single major result like the Kepler conjecture required approximately 20 human work-years and produced 500,000 lines of proof scripts. Now, AI systems can read PDFs or TeX files and output formal proofs. Milestones in late 2025 and early 2026 demonstrated rapid progress. In September 2025, Math Inc. achieved a quasi-autoformalization of the prime number theorem, though it still required human guidance when the AI stalled. By January 2026, J. Urban published an arXiv preprint detailing the autoformalization of large sections of Munkres’s topology textbook, generating 130,000 lines of code in just two weeks.

Further advances followed quickly. In March 2026, shortly after announcing the formalization of sphere packing in 8 dimensions, Math Inc. announced the autoformalization of the 24-dimensional sphere packing problem based on Viazovska’s proof. This project initially generated about 500,000 source lines of code, which were later reduced to 200,000 lines through code pruning. By May 2026, a team at Meta/Facebook Research completed the ATLAS project, autoformalizing large portions of 26 mathematical textbooks. These developments indicate that AI is now capable of handling substantial mathematical formalization tasks with minimal human intervention.

How it works

Autoformalization relies on artificial intelligence to interpret natural language mathematical texts and translate them into the strict logical syntax required by proof assistants like Lean. The AI reads input files, such as PDFs or TeX documents, and attempts to construct a formal proof step-by-step. In earlier stages, this process was "quasi-automatic," meaning humans had to provide guidance whenever the system encountered difficulties. As models improved, the need for human intervention decreased, allowing for the rapid generation of large codebases. The resulting code can then be optimized or "golfed" to reduce its size while maintaining correctness, as seen in the reduction of the 24-dimensional sphere packing proof from 500,000 to 200,000 lines.

Key details

  • Lean was developed by Leo de Moura at Microsoft in 2013 and released as open-source software.
  • The mathlib library for Lean contains nearly 300,000 theorems and 2.5 million lines of code from over 700 contributors.
  • Autoformalization became a practical reality in 2026, with significant milestones achieved between late 2025 and May 2026.
  • Math Inc. autoformalized the 24-dimensional sphere packing problem, generating 500,000 lines of code that were pruned to 200,000.
  • Meta/Facebook Research’s ATLAS project autoformalized large parts of 26 mathematical textbooks by May 2026.
  • Previous manual formalization efforts, such as the Kepler conjecture, required about 20 human work-years to complete.

Why it matters

For software engineers and technical leads, the rise of autoformalization signals a shift in how complex logical systems are verified. The ability of AI to translate informal mathematical reasoning into rigorous, machine-checkable code suggests similar techniques could be applied to software specification and verification. This reduces the burden of manual proof writing, which has historically been a bottleneck in ensuring system reliability. As tools like Lean mature and integrate with AI, they offer a pathway to higher assurance in critical systems, from cryptographic protocols to safety-critical infrastructure.

The scale of recent achievements demonstrates that AI can handle non-trivial mathematical structures. The completion of formalizations for Fermat’s Last Theorem and high-dimensional sphere packing shows that these tools are no longer limited to simple exercises. For developers building products that rely on mathematical correctness, understanding these workflows provides insight into future tooling. The integration of AI into formal methods may soon allow for automated verification of complex algorithms, reducing errors and increasing confidence in deployed systems.

What you can do

  • Explore the Lean theorem prover and its documentation to understand the basics of formal verification.
  • Review the mathlib library to see examples of formalized mathematical definitions and theorems.
  • Study recent arXiv preprints on autoformalization to understand current AI capabilities and limitations.
  • Experiment with converting small mathematical proofs into Lean code to gain hands-on experience.
  • Follow developments from groups like Math Inc. and Meta Research to stay updated on tooling improvements.
  • Consider how formal verification principles could be applied to your own software development lifecycle.

Bytechapストアのツール

$89

DocBento

すべてのスキャンを読み取り、ページ出典を提示して回答するセルフホスト型ドキュメント管理システム。

ライブデモ

続きを読む

すべての記事