lean 4 formalization

Encoding mathematical definitions, axioms, and computational subclaims in the Lean 4 proof assistant and mechanically verifying full proofs and constructions so informal reasoning becomes machine-checkable and reproducible.

lean4formalization

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Existing infrastructure struggles to meet the demands of AI-driven mathematical research for Lean 4, particularly in high-throughput processing, scalable verification, multi-version support, and request-level isolation. This work proposes the first cloud-native Lean 4 service platform, which uniquely enables high concurrency, per-request isolation, and coexistence of multiple Lean 4 and Mathlib versions. The platform integrates 14 metaprogramming tools—including proof checking, semantic source code manipulation, deterministic repair, and lemma extraction—and provides seamless access via HTTP API, Python SDK, CLI, and a web UI, eliminating the need for local deployment. Already publicly deployed, it has processed over 500 million requests and powered Axiom Math’s perfect score in the 2025 Putnam Competition, thereby addressing a critical gap in scalable theorem-proving infrastructure.

AI for mathematicsLean 4proof verification

This study presents the first systematic evaluation of state-of-the-art large language models’ ability to generate formally verifiable proofs in graduate-level mathematics, including analysis, algebra, probability, and logic. The authors construct a private benchmark that pairs natural language mathematical problems with their formalized statements in Lean 4 and employ an agent-based framework to automatically assess whether model-generated proofs are accepted by the Lean 4 proof checker. Experimental results show that the best base model achieves an accuracy of 33.5%, while other models exhibit substantially lower performance. The work further provides a detailed empirical analysis of tool usage, failure modes, reasoning costs, and latency, offering valuable insights into the current capabilities and limitations of large language models in formal mathematical reasoning.

AI modelsformal verificationgraduate-level mathematics

Translating Informal Proofs into Formal Proofs Using a Chain of States

Dec 11, 2025
ZW
Ziyu Wang
🏛️ Peking University

This work addresses the automatic translation of informal natural-language mathematical proofs into formal Lean 4 proofs—a task hindered by poor alignment between informal reasoning and structured verification languages, as well as weak controllability. We propose the novel “Chain of States” (CoS) intermediate representation, the first to explicitly decouple proof-structure modeling from tactic generation. CoS enables staged state extraction and structured tactic synthesis, and we further develop an interactive formalization framework alongside a domain-specific training dataset. Evaluated on multiple mathematical benchmarks, our approach significantly outperforms prior methods, achieving substantial gains in proof success rate. Results demonstrate that CoS effectively improves formalization accuracy and verifiability under limited computational budgets, validating its design principles and practical efficacy.

Bridging the gap between informal and formal proof structuresGenerating formal tactics via an intermediate Chain of States representationTranslating informal proofs into formal Lean4 proofs

This work addresses a critical gap in existing mathematical formalization benchmarks, which predominantly focus on propositional verification while neglecting the evaluation of explicit solution construction—such as numerical values or algorithms—particularly in applied mathematics. To bridge this gap, the authors propose a construct-and-verify workflow framework that requires agents to first generate concrete solutions and then formally prove their correctness. Building upon this framework, they introduce AMBER, a novel benchmark for applied mathematical reasoning spanning convex analysis, optimization, numerical linear algebra, and high-dimensional probability. Implemented in Lean 4, this benchmark enables the first systematic evaluation of large language models on constructive tasks, revealing that general-purpose reasoning models significantly outperform specialized theorem provers, the latter suffering from “tactic overfitting” that limits their generalization. The study further underscores the pivotal role of instruction-following capability in multi-task formal reasoning.

applied mathematicsbenchmarkconstruction-verification

LeanTutor: A Formally-Verified AI Tutor for Mathematical Proofs

Jun 10, 2025
MP
Manooshree Patel
🏛️ University of California, Berkeley

This work introduces the first mathematical proof tutoring system that achieves closed-loop integration of large language models (LLMs) with the Lean theorem prover, addressing critical pedagogical gaps in formal proof education—including natural-language interaction, error localization, correct step generation, and explanatory feedback. Methodologically, it combines automated formalization, Lean compilation-based verification, LLM-driven candidate tactic generation, heuristic proof search, and pedagogically-aware natural-language feedback generation grounded in formal proof context. Its core contribution is a bidirectional LLM–Lean collaboration: Lean ensures formal correctness and reliability, while the LLM enables real-time, instructionally grounded error correction and intuitive explanation. Evaluated on PeanoBench, the system achieves a 57% formalization rate for correct proof steps and a 30% error-step localization rate; its natural-language prompts significantly outperform existing baselines in both accuracy and relevance.

Developing an AI tutor for teaching math proofs using LeanFormally verifying student-written proofs and providing correctionsGenerating pedagogically effective natural language feedback for errors

Latest Papers

What's happening recently
View more

This work addresses the challenge of subtle errors in mathematical reasoning by large language models through a novel multi-agent framework built upon general-purpose code-oriented large language models. The framework employs a coordinator to dynamically orchestrate a customized pipeline for automatically formalizing research-level mathematical theorems in Lean 4. Its key innovation lies in the ability to dynamically extend type definitions and verify auxiliary lemmas without introducing additional axioms. The approach successfully formalizes the core theorems of five STOC papers—two of which rely solely on the Lean kernel—and produces machine-verified proofs for 32 problems on PutnamBench. All formalizations have been expert-reviewed and are publicly released.

autoformalizationformal verificationLean 4

Existing formal mathematical benchmarks predominantly focus on Olympiad-style problems and algebra, with limited coverage of computational and applied mathematics. This work introduces CAM-Bench, the first systematic benchmark comprising 1,000 Lean 4 proof goals derived from exercises in classical textbooks, spanning optimization, numerical linear algebra, and numerical analysis. Through a pipeline involving dependency recovery, context normalization, formal translation, and semantic alignment verification, the original problems are transformed into self-contained theorems with complete contextual information. CAM-Bench not only fills a critical gap in the landscape of formal mathematical reasoning benchmarks but also exposes characteristic failure modes of large language models, particularly in handling local assumptions, invoking foundational theorems, and conducting long-horizon logical reasoning.

applied mathematicsbenchmarkcomputational mathematics

This work addresses the high computational cost in formal theorem proving caused by scarce verification data and excessively long reasoning traces. To this end, the authors propose a family of efficient Lean theorem provers featuring several key innovations: a novel diffusion-based Lean proof generation architecture, an Augmented Lean Formalization (ALF) data augmentation strategy, curriculum-based supervised fine-tuning with difficulty stratification, and a dynamic reasoning filtering mechanism. These components are integrated within an 8k-token context window that unifies autoregressive and diffusion-based generation paradigms. Experimental results demonstrate that their 4B-parameter model achieves 86.1% accuracy on MiniF2F-Test—surpassing DeepSeek-Prover-V2-671B (82.4%) despite using only 1/167 of its parameters—while their 32B model attains state-of-the-art performance among open-source systems at 93.0%, successfully solving 93 problems from the PutnamBench benchmark.

compute efficiencyformal theorem provingLean

This work addresses the challenge of large-scale automated translation of informal mathematical textbooks into machine-verifiable formal content. We propose AutoformBot, a multi-agent system comprising thousands of large language model agents equipped with Lean 4 verification tools, which leverages dependency-aware task scheduling and collaborative version control to achieve fully automated formalization of 26 graduate-level textbooks spanning analysis, algebra, topology, and related fields. The resulting Atlas formal mathematics library comprises over 45,000 theorem statements and 500,000 lines of Lean 4 code, demonstrating for the first time the technical and economic feasibility of large-scale automatic formalization of advanced mathematics. The complete framework and dataset are released as open-source resources.

autoformalizationformal verificationlarge-scale

This work proposes a systematic formalization of all published mathematical knowledge into a machine-verifiable, continuously evolving structured knowledge base, addressing the challenges of scalability and organization. Taking dilatations of categories in categorical algebra as the first case study, the project integrates interactive theorem proving, dependent type theory, and category theory to frame the complete formalization of mathematics as a universal reasoning benchmark. By constructing a formal prototype of category dilatations, the study demonstrates the feasibility of this approach in expressing complex algebraic structures, thereby establishing both an architectural foundation and a practical pathway toward a large-scale, interconnected, and extensible database of formalized mathematics.

benchmarkformalizationinteractive theorem proving

Hot Scholars

JA

Jeremy Avigad

Professor of Philosophy and Mathematical Sciences, Carnegie Mellon University
Mathematical logicproof theoryphilosophy of mathematicsformal verification
CB

Clark Barrett

Stanford University
Formal MethodsSatisfiability Modulo TheoriesAutomated ReasoningVerification
SS

Stefan Szeider

Professor, Head of Algorithms and Complexity Group, TU Wien, Vienna, Austria
AlgorithmsComplexitySatisfiabilityParameterized Complexity
FM

Fabrizio Montesi

Professor of Computer Science, University of Southern Denmark
Choreographic ProgrammingMicroservicesConcurrency TheoryProgramming Languages