130k Lines of Formal Topology in Two Weeks: Simple and Cheap Autoformalization for Everyone?
#LLMs

130k Lines of Formal Topology in Two Weeks: Simple and Cheap Autoformalization for Everyone?

Tech Essays Reporter
6 min read

A groundbreaking project has demonstrated that large-scale mathematical formalization can be achieved rapidly and inexpensively using large language models and existing proof checkers.

The landscape of formal mathematics is experiencing a seismic shift. What once required years of painstaking human effort by specialized mathematicians can now be accomplished in weeks at minimal cost, thanks to the convergence of large language models and automated proof checking systems. A remarkable project led by Josef Urban has demonstrated this transformation by autoformalizing approximately 130,000 lines of general topology from Munkres' textbook in just two weeks, at a total cost of around $100 in LLM subscription fees.

This achievement represents more than just impressive numbers. It signals a fundamental change in how we might approach the formalization of mathematical knowledge. The project, which began in November 2025 and had produced 160,000 lines of formalized topology by January 4, 2026, tackled material from a comprehensive textbook containing 241 pages across seven chapters and 39 sections. The speed and scale of this accomplishment are unprecedented in the history of interactive theorem proving.

The technical approach employed is deceptively simple, yet profoundly effective. The system creates a feedback loop between a large language model and a proof checker, with the LLM generating formal proofs that are immediately validated by the checker. This creates a continuous cycle of generation and verification that rapidly produces correct formal mathematics. The LLM used was primarily ChatGPT (version 5.2) or Claude Sonnet (4.5), accessed through their respective command-line interfaces, Codex and Claude Code.

The proof checker chosen for this project was Chad Brown's Megalodon, a higher-order set theory system that provides the logical foundation for the formalization. The core library consisted of Brown's formalization of basic set theory and surreal numbers, including the real numbers. This foundation proved sufficient to support the formalization of complex topological concepts and proofs.

Among the notable achievements of this project are several substantial formal proofs. The system produced a 3,000-line proof of Urysohn's lemma, a 2,000-line proof of Urysohn's Metrization theorem, and over 10,000 lines dedicated to the Tietze extension theorem. In total, the project has formalized over 1,500 lemmas and theorems from general topology. These are not trivial results but fundamental theorems that form the backbone of modern topology.

The implications of this work extend far beyond topology. The approach demonstrates that formal mathematics can be produced at scale without requiring specialized knowledge of interactive theorem provers (ITPs) or extensive libraries. The setup is accessible to anyone with access to modern LLMs and a proof checker, suggesting that formal mathematics could become ubiquitous across various domains of mathematics and computer science.

This democratization of formal mathematics could have profound consequences for mathematical practice. Currently, formal verification is limited to specialized projects and research initiatives due to the high cost and expertise required. If formalization becomes as simple and cheap as this project suggests, we might see a future where mathematical proofs are routinely formalized, creating a vast corpus of verified mathematics accessible to all.

The choice of Megalodon as the proof checker is particularly interesting. Unlike mainstream proof assistants such as Coq, Lean, or Isabelle, Megalodon is relatively unknown in the broader theorem proving community. Yet it proved entirely adequate for this ambitious project, suggesting that the choice of proof assistant may matter less than previously thought when combined with powerful LLMs capable of generating proofs in various logical frameworks.

Several factors contributed to the success of this approach. First, the feedback loop between LLM and proof checker ensures that only valid formal proofs are retained, eliminating the problem of hallucinated mathematics that can plague LLM-generated content. Second, the use of a reasonably fast proof checker allows for rapid iteration, enabling the LLM to learn from its mistakes and improve its proof generation over time. Third, the simplicity of the setup means that the barrier to entry for formal mathematics is dramatically lowered.

The cost-effectiveness of this approach cannot be overstated. At approximately $100 for 130,000 lines of formal mathematics, the cost per line is negligible. This compares favorably to traditional formal mathematics projects, which often require years of work by multiple researchers and can cost hundreds of thousands or even millions of dollars. The speed is equally impressive, with the majority of the work completed in just two weeks.

Looking forward, this project suggests that 2026 could indeed be the year when formal mathematics becomes commonplace. The combination of accessible LLMs, existing proof checkers, and simple feedback mechanisms creates a powerful toolchain that anyone can use. This could lead to an explosion of formal mathematics across various fields, from pure mathematics to computer science and beyond.

The broader implications for mathematical practice are significant. If formal proofs become routine, mathematicians may begin to write their papers with formalization in mind, knowing that their work can be easily and cheaply verified. This could lead to higher standards of rigor and greater confidence in mathematical results. Additionally, the vast corpus of formal mathematics that could be generated would provide an unprecedented resource for education, research, and automated theorem proving.

However, challenges remain. While the approach works well for textbook mathematics, which is well-structured and follows established patterns, it remains to be seen how well it will handle more creative or exploratory mathematics. Additionally, the quality of the formal proofs generated, while verified correct, may not always match the elegance or insight of human-generated proofs. These are areas where further research and development will be needed.

The success of this project also raises questions about the future role of human mathematicians in formal verification. If LLMs can generate formal proofs quickly and cheaply, what becomes the role of human formalizers? The answer likely lies in guidance and curation rather than direct proof generation. Humans will still be needed to identify important theorems to formalize, to guide the formalization process, and to ensure that the formal mathematics serves its intended purpose.

In conclusion, the project described by Josef Urban represents a watershed moment in the history of formal mathematics. By demonstrating that large-scale formalization can be achieved rapidly, inexpensively, and with simple tools, it opens the door to a future where formal mathematics is ubiquitous. This future promises greater rigor in mathematical practice, more accessible verified mathematics, and new possibilities for mathematical research and education. As we move into 2026, we may indeed be witnessing the beginning of an era where autoformalization becomes simple and cheap for everyone.

For those interested in exploring this approach further, the project provides a template that can be adapted to various proof assistants and mathematical domains. The key ingredients are an LLM with strong mathematical capabilities, a proof checker with a suitable foundation, and a feedback mechanism that allows for rapid iteration and learning. With these components in place, the barriers to formal mathematics are dramatically reduced, potentially transforming how we create, verify, and share mathematical knowledge.

Comments

Loading comments...