NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Automatic Textbook Formalization

Fabian Gloeckle, Ahmad Rammal, Charles Arnal, Remi Munos, Vivien Cabannes, Gabriel Synnaeve, Amaury Hayat

NeurIPS page · OpenReview · Open on the map

Category: LLM Agents, Evals & Benchmarks › Software Engineering Benchmarks · Type: new method · Keywords: textbook formalization, multi-agent AI systems, proof assistants, Lean formalization, automated mathematics, parallel code generation

Areas: Code & Coding Agents › Code Verification › Verified code generation; AI Agents › Agent Benchmarking › Agentic code and proof generation

Summary

Automatic Textbook Formalization is an AI system that automatically formalizes a graduate-level textbook into Lean code using 30K parallel agents, achieving a 130K-line formalization in one week.

Explained to a 5-year-old

A bunch of smart robots read a big math book and turn its ideas into a special computer language that a math checker can understand. They work together really fast, finishing the whole book in just a week. The result is a huge collection of computer instructions that can be used to prove math facts.

Explained to a 5-year-old, longer

Imagine you have a super-big math textbook with lots of tricky problems. Usually, it takes many grown-up mathematicians years to write the solutions in a special language that computers can check. In this project, a huge team of AI helpers works like a swarm of ants: each ant reads a tiny part of the book, writes down the steps in that special language, and then they all share their work. They use a shared notebook so they don’t overwrite each other. After just one week, they have written out 130,000 lines of those steps, which is enough to check almost the whole book. The cost of running all those helpers is about the same as paying a few human experts, so it’s cheap. Finally, the researchers give everyone the code and the finished book so anyone can use it.

For a technical reader

The system uses a large number of parallel AI agents that collaborate on a shared code base via version control to formalize textbook content into Lean. It processes a 500+ page graduate textbook in a single week, producing 130K lines of code and 5900 declarations. The inference cost is comparable to or lower than human expert salaries, and the code and resulting formalization are released open-source.

Problem

Translating a multi-hundred-page graduate textbook into a formal proof assistant such as Lean is a time-consuming, labor-intensive task that currently requires many human experts. Existing approaches have only handled small or undergraduate texts, leaving a gap for large-scale formalization.

Method

The approach employs many AI agents working simultaneously on a shared repository to parse and formalize textbook material into Lean. It uses version control to coordinate parallel edits and produces a large, coherent formalization.

Results

It generated 130K lines of code and 5900 Lean declarations within a week using 30K parallel agents, and its inference cost matches or undercuts the estimated salaries of a human expert team.

Contributions

The paper demonstrates a scalable multi-agent system for large-scale textbook formalization, achieving a graduate-level textbook formalization that is orders of magnitude larger than prior work. It also releases the code and resulting Lean formalization as open-source for the community.

Practical relevance

The system enables rapid, cost-effective formalization of advanced textbooks, making complex mathematics more accessible to automated verification tools.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction