[KongchangAI]
· 2 min read· 1,183 words

How to Formalize All of Mathematics? A Paradigm Shift in Progress

How to Formalize All of Mathematics? A…

Formalized mathematics, powered by AI, is moving from individual theorems to machine-verifiable coverage of entire disciplines.

The article discusses how mathematical formalization is shifting from isolated theorem proofs to covering the entire mathematical system. Traditional mathematics relies on peer review and human intuition—effective but at risk of long-undetected flaws; the core promise of formalization is that once a proof is checked step by step by a machine, there is nothing left to argue about. The combination of large AI models and proof assistants is lowering formalization costs, creating a new division of labor: humans propose ideas, AI converts them into code, machines verify, and humans review. The article identifies three major challenges: the enormous scale of knowledge coverage, the gap between formalization and mathematical intuition, and the difficulty of unifying community libraries and standards. If mathematics becomes fully formalized, mathematical knowledge will become a computable, queryable, and automatically composable resource, reshaping research, education, and patterns of discovery.

Mathematics, the most rigorous of disciplines, is undergoing a technological revolution of self-verification. Its goal: to translate the entirety of humanity's mathematical knowledge, accumulated over thousands of years, into code that computers can verify line by line.

From Isolated Breakthroughs to a Discipline-Wide Ambition

For a long time, formalized mathematics was a fragmented endeavor. Proof assistants like Lean achieved successes on individual theorems, but were far from covering the entire discipline. Now, the field is shifting from "proving a hard problem" to "rewriting the entire mathematical system."

The discussion on Hacker News around "How to Formalize All of Mathematics" has drawn widespread attention. This is no longer merely a debate over technical approaches, but a fundamental question: what is the ultimate form of mathematics—human pen-and-paper reasoning, or machine-verifiable formal proofs?

Formalized mathematics refers to rewriting mathematical definitions, theorem statements, and proofs into a formal language that computers can check step by step. It differs from numerical computation or symbolic manipulation, because its core is not about quickly producing results, but about confirming "whether each step of reasoning is valid."

A proof assistant (also called an interactive theorem prover) is the software system that supports formalized mathematics. Common examples include Lean, Coq, Isabelle/HOL, and Agda. Users must write definitions, lemmas, and proof scripts in the language prescribed by these systems, and the system determines whether a proof holds based on strict type checking or proof checking mechanisms.

Therefore, formalized mathematics is not about using computers to "more cleverly guess theorems," but about turning mathematical proofs into auditable, reproducible engineering artifacts.

Why Formalize Mathematics Now?

Proofs in traditional mathematics rely on peer review and human intuition. While effective, this approach carries hidden risks. A long-accepted proof may be found decades later to contain a flaw. Cases like the Four Color Theorem and Kepler's Conjecture have all gone through tortuous journeys from "accepted" to "contested" to "machine-verified."

The core promise of formalization is: once a proof is formalized, there is no longer anything to argue about. The computer checks each step of reasoning, and logical gaps have nowhere to hide. For mathematics, this means reliability of an unprecedented level.

More importantly, the intervention of AI has changed the rules of the game. Large language models can assist in generating proof drafts, while formalization tools serve as the final judge. This combination of "AI generation + formal verification" is dramatically lowering the marginal cost of formalization.

The reason AI generation + formal verification is taken seriously is that large language models excel at handling natural language and code drafts, but produce plausible-sounding yet incorrect reasoning. Formal verification is the opposite: it does not depend on the model's confidence level and only accepts results that pass line-by-line checking by a proof assistant.

The potential of this combination lies in the division of labor: the model proposes candidate proofs, fills in tedious steps, and translates natural language into formal language; the proof assistant determines right from wrong; and human mathematicians choose the problems, provide high-level intuition, and correct the direction. It cannot replace mathematical judgment, but it can significantly reduce the time cost of formalization, bringing more theorems onto a machine-verifiable track.

Core Challenges Facing Mathematical Formalization

The Scale Problem of Knowledge Coverage

Existing mathematical literature is vast. From Euclid's Elements to modern algebraic geometry, the number of theorems not yet formalized is staggering. Even classical results like Gödel's incompleteness theorems have long been formalized, yet the vast majority of contemporary research papers remain at the pen-and-paper stage.

The Gap Between Formalization and Mathematical Intuition

When mathematicians think, they rely on a great deal of unformalized intuition and analogy. Formalization requires making all these implicit assumptions explicit—this is both a challenge and a source of value, as it forces us to examine whether those "obvious" steps really hold.

Expressions such as "obviously," "similarly," and "without loss of generality" in mathematical papers often compress a large amount of background knowledge. Human readers can fill in the gaps using experience and context, but formalization systems do not take these implicit premises for granted.

Therefore, the formalization process is often compared to "moving an iceberg above the water": mathematicians write out only the tip of the iceberg, while formalization requires defining, proving, and connecting the submerged parts one by one. This exposes boundary conditions, special cases, and dependencies that were originally overlooked.

The value of this process is not just convincing machines—it also helps humans discover the true structure of proofs. Many formalization projects find vague or even erroneous parts of the original papers in the process.

Community Collaboration and Standardization

Different projects use different libraries and different notation systems—how can they work together? This is not just a technical problem, but also a cultural one. The mathematical community needs to build shared infrastructure and collaboration norms, much like the open-source community.

In formalized mathematics, a library refers to a collection of already-formalized definitions, theorems, and proof code. For example, Lean's mathlib is a large collaborative library aiming to cover a broad foundation of modern mathematics. Libraries across different proof assistants are usually not directly interoperable, because their underlying logic, type systems, and syntax differ.

The difficulty of standardization is not only a matter of interfaces, but also involves mathematical expression style: the same concept may have multiple equivalent definitions, and which one is chosen affects the difficulty of subsequent proofs. Thus the community needs to establish naming conventions, dependency management, version control, and contribution review mechanisms. This resembles open-source software engineering, but its object is mathematical knowledge itself.

The Accelerator Effect in the AI Era

According to recent discussions, AI tools are becoming a key driver of formalized mathematics. On one hand, models can automatically fill in trivial steps in formal proofs; on the other hand, models can extract formalizable definitions from natural language statements.

This division of labor is taking shape:

  • Human mathematicians propose conjectures and proof ideas in natural language
  • AI handles converting them into a first draft of formalized code
  • Proof assistants verify each step of logic
  • Humans review the results and correct the direction

The maturation of this pipeline could increase the speed of formalization by orders of magnitude.

The Deep Impact on the Future of Mathematics

If all of mathematics is eventually formalized, the consequences go far beyond "proofs are more reliable."

Mathematical knowledge will become a computable, queryable, and automatically composable resource. When a mathematician wants to use a theorem, they need only invoke the corresponding formalized entry, and the machine will handle all prerequisites. The patterns of mathematics education, mathematical research, and even mathematical discovery will all be reshaped.

Of course, this path will not be completed overnight. It will require the efforts of generations, the continuous improvement of the toolchain, and adjustments within mathematical culture itself. But the direction is already clear: mathematics is moving from "human-readable" to "machine-verifiable," and this transformation has only just begun.

The significance of formalized mathematics lies not in questioning the abilities of mathematicians, but in building a framework for mathematics that will never collapse.

#formalized mathematics#proof assistant#Lean#AI mathematical proof#mathlib
Share:

Related articles