Summary
Summary (Overview)
- FORMATHEORIA is an end-to-end, AI-assisted workflow for large-scale formalization of mathematics from distributed literature, specifically targeting the Classification of Finite Simple Groups (CFSG).
- The workflow coordinates source acquisition, formalization, proof construction, recursive dependency discovery, independent review, and reconciliation while preserving provenance and protecting approved declarations.
- The authors constructed a Lean formalization exceeding 994,000 lines across 850+ files with 30,298 declarations reachable from the Bender–Suzuki theorem, encompassing the Feit–Thompson Odd Order Theorem, Glauberman's Z* theorem, and the Brauer–Suzuki theorem.
- Dependency-aware parallelism reduced proof-construction wall time by 76.1% (4.2×), section-level context sharing reduced wall time by 26.5% and token consumption by 18.0%.
- The work identifies four core challenges (C1–C4): distributed sources with deep dependencies, cross-source misalignments, semantically incorrect Lean translations, and defects in mathematical sources.
Introduction and Theoretical Foundation
Background and Motivation
Formal mathematics represents definitions, statements, and proofs in languages checkable by a small trusted kernel. The Classification of Finite Simple Groups (CFSG) presents a unique challenge: its proof is distributed across a large, historically layered literature whose dependencies, definitions, conventions, and representations must be recovered and aligned during formalization.
By the Jordan–Hölder theorem, simple composition factors of a finite group are determined up to isomorphism and reordering. CFSG identifies all finite simple groups: cyclic groups of prime order, alternating groups, groups of Lie type, and sporadic groups. The proof emerged over decades from approximately one hundred mathematicians and remains dispersed across hundreds of papers and books.
Four Core Challenges
C1: Distributed sources and deep dependencies. The source corpus comprises numerous books and papers rather than a single self-contained exposition. Dependencies frequently cross source boundaries, and cited results may depend on substantial chains of earlier results.
C2: Misalignments across mathematical sources. Different sources may define the same object under different conventions, introduce extensionally equivalent formulations through distinct constructions, or use the same name for different objects.
C3: Semantically incorrect Lean translations. A Lean declaration may elaborate successfully while misrepresenting the source—omitting assumptions, mistranslating quantifiers, or strengthening/weakening conclusions. Lean's elaborator establishes well-typedness, not semantic fidelity.
C4: Defects in the mathematical sources. Sources may contain typographical errors, missing conditions, ambiguous formulations, incomplete arguments, or incorrect statements.
Comparison with Existing Work
The paper contrasts FORMATHEORIA with major formalization projects:
| Development | Formal system | Reported scale | Source organization |
|---|---|---|---|
| Mathlib | Lean | 1.9M lines (2025) | General-purpose library |
| Odd Order | Rocq | ~150K lines | One theorem from two expositions |
| Flyspeck | HOL Light & Isabelle | ~500K lines | One proof with project-specific blueprint |
| Liquid Tensor | Lean | ~90K lines | One theorem via shared blueprint |
| FORMATHEORIA | Lean | >994K lines, 850+ files | Heterogeneous literature requiring discovery |
Methodology
Formalization Model
For a source item , a formalization is a tuple:
where is a Lean context, is a Lean type, and is a Lean term satisfying:
The state is:
Workflow Components
Algorithm 1: FORMATHEORIA (simplified):
- Retrieve source material via SEARCHAGENT and OCRAGENT
- Translate via TRANSLATORAGENT
- If theorem, iteratively run PROVER
- Handle MissingDependency recursively, Conflicts via RECONCILERAGENT
- Escalate Failures to human investigation
Shared Agent Framework
The framework operates as:
where is a task prompt and is a review agent. Key features include:
- Multi-turn LLM interaction with tool use (read, edit, write, bash)
- Context compaction when token length exceeds threshold
- Review-gated termination: stop points trigger review; rejection adds diagnostic feedback to context
PROVER Procedure
The PROVER uses a directed acyclic graph with nodes having states:
PROVEAGENT attempts proofs; REFINEAGENT decomposes "TooHard" obligations into helper lemmas. Statement immutability is enforced via kernel-level declaration hashing.
Issue Classification
- Source defects: [DEF1] errors in statements, [DEF2] errors in proofs
- Source misalignments: [MAL1] equivalent but not definitionally equal formalizations, [MAL2] same name for different objects
- Incorrect translations: [INT1] unprovable incorrect translations, [INT2] translations that fail in downstream applications
Empirical Validation / Results
Scale and Structure
- 15 books/papers consulted covering 1,037 pages
- Only 3 sources (357 pages, 34.4%) were initially supplied; dependency discovery added 12 sources (680 pages, 65.6%)
- 30,298 project declarations and 186,187 edges in the Bender–Suzuki closure
- Root theorem depth: 458 (Bender–Suzuki), 430 (Feit–Thompson)
- Median depth: 2; 29.4% of declarations have depth zero; 99th percentile: 378
Source Defects and Misalignments Found
The workflow identified several mathematical issues in the literature:
-
Incompatible definitions of type I maximal subgroups [MAL1]: Bender–Glauberman requires a condition for all complements, while Peterfalvi requires only existence of one complement. Resolved via Schur–Zassenhaus equivalence bridge.
-
Typographical error in type I maximal subgroup definition [DEF1]: should be in Bender–Glauberman's condition (Iv)(c).
-
Missing condition in Peterfalvi [DEF1]: Appendix IV Lemma 2(c) requires odd, omitted from statement.
-
Error in Huppert's Theorem 8.27 [DEF1]: The divisibility condition should be and .
-
Indexing error in Higman's Lemma 11 [DEF2]: Basis should be .
Reconciliation Concentration
- 284 of 10,417 declarations (2.7%) modified by RECONCILERAGENT
- PF Part I Sections 9, 10, 13 account for 219 modifications (77.1%)
- Modification share correlates with cross-section dependency count: Pearson , Spearman (both )
Review Outcomes
- 11 of 14 PF Part I sections returned after first review (78.6%)
- 16 rejected outcomes total; 30 review rounds required
- Pilot study: 6/10 correct without review, 7/10 with binary decision, 9/10 with diagnostics, 10/10 with self-improved rubric
Ablation Results
| Experiment | Key Result |
|---|---|
| Parallel vs. Sequential | Wall time reduced 76.1% (4.2×); tokens increased 45.7% |
| Context Sharing | Wall time reduced 26.5%; total tokens reduced 18.0% |
| Review Feedback | 6/10 → 10/10 correct translations with self-improved rubric |
Comparison with Rocq Formalization
- Lean: 573,050 lines vs. Rocq: 39,163 lines in shared BG/PF Part I sections (ratio ~15:1)
- Both developments verify the Odd Order Theorem with kernel-level checks and no unauthorized axioms
- Different proof routes: Lean proves Glauberman's theorem on directly; Rocq follows Puig's theorem via BG's Appendix B
Theoretical and Practical Implications
For Formal Mathematics
The work demonstrates that large-scale formalization requires reconstructing theory, not just proving statements. The declaration dependency graph reveals a "broad shallow base connected to root theorems through a narrow but exceptionally deep backbone"—a structure that must inform workflow design.
For AI-Assisted Proof
The results show that semantic fidelity requires review beyond kernel verification. Lean's elaborator establishes well-typedness but not source fidelity. The review agent's checklist (recovering inherited context, preserving canonical data, avoiding strengthening for convenience) proved essential for translation quality.
For Mathematical Literature
The formalization effort exposed actual defects in published mathematics, including typographical errors, missing hypotheses, and incorrect statements in standard references (Huppert, Higman, Peterfalvi, Bender–Glauberman). This demonstrates formalization's value as an auditing tool for mathematical literature.
Design Principles
- Dependency-aware parallelism converts inference capacity into reduced elapsed time (4.2× speedup)
- Section-level context sharing amortizes context reconstruction costs across related tasks
- Constrained reconciliation (local, source-supported repairs) is more effective than unrestricted refactoring
- Human escalation should be reserved for cases where automated workflow cannot determine a source-based continuation
Conclusion
FORMATHEORIA successfully demonstrates that AI-assisted workflows can reconstruct mathematically significant formal theories from distributed literature by combining language-model agents with formal verification, structured review, and explicit dependency management. The completed formalization of major CFSG components—extending through Bender–Suzuki and encompassing Feit–Thompson, Glauberman Z*, and Brauer–Suzuki—represents a significant milestone toward the full formalization of the Classification of Finite Simple Groups.
Future Directions
- Continue CFSG formalization: Gorenstein–Walter theorem, Alperin–Brauer–Gorenstein theorem, Gorenstein–Harada theorem, Aschbacher–Smith work
- Dynamic scheduling: extend batch parallelism with dynamic assignment, critical-path prioritization, and interface conflict detection
- Code quality improvement: refactoring into stable abstractions, aligning with Mathlib, improving readability
- Formalization-backed knowledge base: interactive interfaces exposing definitions, provenance, dependencies, and proof structure to help mathematicians navigate CFSG's extensive prerequisites
The work establishes that the principal challenge in large-scale formalization is not proving individual statements but constructing the dependency-connected theory required to state and prove target results, with quality control requiring mechanisms beyond kernel checking alone.
Related papers
- Harness Continual Learning: Continual Adaptation Beyond Model Parameters
Harness Continual Learning enables frozen foundation models to accumulate capabilities by evolving prompts, memories, and tools around them, with guarded updates preventing harness-level forgetting.
- HarnessOpt-Bench: Evaluating LLMs at Harness Optimization
HARNESSOPT-BENCH shows optimizer model choice matters 1.8x more than coding harness choice for agent improvement, with broader search driving gains and trace reading providing no benefit.
- Dense Contexts Are Hard Contexts: Lexical Density Limits Effective Context in LLMs
Lexical density, not just length, causally degrades LLM retrieval, activating lost-in-the-middle effects at contexts far below advertised limits.