Summary (Overview)
- First autonomous multi-agent formalization of a research-level theorem in theoretical physics: the fundamental theorem of matrix-product states (FT-MPS), verified in the Lean 4 proof assistant.
- Team of six specialized LLM agents (orchestrator, proof writer, library scout, simplifier, blueprint synchronizer, reviewer) coordinated via a shared mathematical blueprint and persistent memory, with only intermittent human oversight.
- Novel proof discovery: The system autonomously proved the injective case of FT-MPS via the Skolem-Noether theorem, an approach not standard in the literature.
- Extensive library development: Produced TNLean, a Lean 4 tensor-network library of ~227,000 lines, including quantum information infrastructure (completely positive maps, quantum Perron-Frobenius theory, quantum Wielandt bound).
- Physical application: Extended the formalization to symmetry-protected topological (SPT) phases, proving a cohomological invariant theorem for injective symmetric MPS.
Introduction and Theoretical Foundation
Background
Proof assistants (e.g., Lean 4, Coq) verify mathematical arguments step-by-step. While AI systems have automated proofs for competition problems and isolated lemmas, research-level formalizations (e.g., Liquid Tensor Experiment, Fermat's Last Theorem) have remained primarily human-led efforts requiring months or years of expert work.
Key challenge: Theoretical physics results often lack the mathematical rigor of pure mathematics, requiring formalization to "fill in" informal reasoning with rigorous, machine-checkable statements.
The Fundamental Theorem of Matrix-Product States (FT-MPS)
A translationally invariant matrix-product state (MPS) on sites with periodic boundary conditions is parameterized by a rank-3 tensor :
where and (the space of complex matrices). Here is the local Hilbert-space dimension and is the bond dimension.
Key definitions:
- Transfer operator: defined by
- Normal tensor: is normal if has spectral radius 1 and a unique eigenvalue with
- Canonical form (CF): where and are normal tensors
Theorem 1 (Fundamental Theorem of MPS, equal case): Let and be two tensors in CF. Then and generate the same MPV family, for every , if and only if there exists an invertible matrix such that for all :
Methodology
Multi-Agent Architecture
The system (built on TeXRA software) employs six specialized agent roles:
| Agent | Function | Model Tier |
|---|---|---|
| Orchestrator | Assigns tasks, combines results, manages workflow | Most capable |
| Proof Writer (lean) | Constructs Lean proofs, responds to type-checking feedback | Most capable, most expensive |
| Library Scout (leanSearch) | Surveys Mathlib for existing lemmas and results | Inexpensive |
| Simplifier (leanSimplifier) | Refactors code, extracts reusable strategies, retires failed attempts | Inexpensive |
| Blueprint Synchronizer (leanBlueprint) | Keeps blueprint prose aligned with Lean declarations | Inexpensive |
| Reviewer | Automated cross-checking of claims against literature | Runs automatically |
Coordination Patterns
Three recurring orchestration patterns:
- Parallel dispatch (Fig. 4a): Independent subtasks dispatched to workers on disjoint scopes
- Scout-then-prove (Fig. 4b): Inexpensive scout surveys library, emits design memo; expensive prover invoked only after feasible route identified
- Review-repair cycles (Fig. 4c): Reviewer flags issues, fixer applies patches; loop terminates on acceptance or after 5 iterations
Blueprint and Persistent Memory
- Blueprint: A human-readable mathematical specification linking definitions, theorem statements, and dependencies to Lean code. Serves as the interface between literature and formalization.
- Persistent memory: Records scouting results, proof strategies, counterexamples, and technique notes across sessions (bounded working periods).
- Human oversight: Strategic only (not tactical) — the supervisor reviews the blueprint, sets mathematical intent, but never writes Lean code or chooses proof tactics.
Empirical Validation / Results
Formalization Scale
- Core development: ~62,000 lines of code, 2,300 declarations, 233 files
- Full TNLean library: ~227,000 lines
- Blueprint: 12 chapters, 150 pages
- Cost: 5,548 for FT-MPS alone)
- Verification: Every step of the FT-MPS proof chain verified with no remaining
sorrymarkers
Key Findings on Challenges
1. Weakening of theorems: The agents initially proved FT-MPS under a "doubly stochastic gauge" assumption (requiring both unital and trace-preserving transfer operators simultaneously, which is impossible for generic MPS tensors). This produced a formally correct but narrower theorem.
2. Finite vs. asymptotic limits: Early attempts replaced finite- MPV comparisons with asymptotic norm comparisons, which proved statements with wrong hypotheses. The correct proof keeps comparisons at fixed finite .
3. Edge cases: Proof assistants require explicit handling of edge cases (, ) that carry no physical meaning; adding assumptions and removed large irrelevant proof branches.
4. Blueprint-Lean misalignment: Several reviews found discrepancies where Lean statements were correct but blueprint prose had drifted.
Novel Proof Route
The injective case of FT-MPS was proven via the Skolem-Noether theorem (about automorphisms of central simple algebras), leveraging Mathlib's existing ring-theory library. This is not the standard approach in the MPS literature.
Physical Application: SPT Phases
Theorem 2 (A cohomological invariant from injective symmetric MPS): Let be an injective MPS tensor of bond dimension , and an onsite linear representation of a finite group . Define . If is invariant under (i.e., for all , ), then for each there is an invertible matrix , unique up to a nonzero scalar, such that:
With , the maps form a projective representation with 2-cocycle . The cohomology class is unchanged by rescaling gauges and depends only on the symmetric tensor with on-site action .
Theoretical and Practical Implications
For Autoformalization
- Mathematical intent is the main bottleneck: The paper demonstrates that "enforcing the correct mathematical intent" — not individual lemma proofs — is the primary challenge in large-scale autoformalization. Lean checks proofs but not statement choices.
- Definitions are more dangerous than proofs: Confirms Buzzard's warning in a concrete setting; incorrect definitions propagate errors through hundreds of downstream lemmas.
- Context window constraints: No LLM context window can hold source literature + blueprint + growing formal library simultaneously, necessitating the multi-agent split with persistent memory.
- Blueprint as essential infrastructure: Review and blueprint synchronization are not auxiliary but central to correctness at scale.
For Physics
- TNLean library provides verified infrastructure for tensor-network theory, quantum information (CP maps, Perron-Frobenius theory), and quantum many-body physics.
- SPT classification: The formalization of the cohomological invariant connects FT-MPS to the classification of 1D bosonic SPT phases, with natural extensions to parent Hamiltonians and gapped paths.
Cost-Effectiveness
The recorded cost of 5,548) represents a significant reduction compared to traditional human-led formalization efforts spanning months or years.
Conclusion
This work demonstrates that a team of specialized AI agents, coordinated through a shared blueprint with sporadic human supervision, can autonomously formalize research-level theorems in theoretical physics. The FT-MPS formalization succeeded with:
- Novel proof discovery (Skolem-Noether route for injective case)
- Extensive library development (TNLean, ~227,000 lines)
- Physical applications (SPT phase classification)
Key insight: The main bottleneck is not proof search but enforcing mathematical intent — ensuring the formalized statement matches the intended theorem. This requires blueprint review, automated cross-checking, and strategic human oversight.
Future directions:
- Formalization of FT-MPS with boundaries, higher-dimensional tensor-network states, parent Hamiltonians, matrix-product operators
- Larger targets: low individual degree test, MIP = RE theorem
- The released technique notes and distilled memory files are project-independent and can seed other autoformalization efforts
Related papers
- Agent Lightning v1.0: Towards Harnessed Agentic RL
Agent Lightning enables harnessed agentic RL with rollout-level advantage and normalization, boosting coding agents on SWE-bench Verified from 41.8% to 56.4% using only ~6K examples.
- MidTool: Mid-training Data Synthesis for Agentic Tool Use
MidTool introduces the first open mid-training pipeline and 20.3B-token corpus for general tool use, nearly doubling downstream agentic task performance across benchmarks and model scales.
- EvoMem: Memory-Augmented Evolution for Code Optimization
EvoMem's persistent memory of successful mutation strategies yields a 6.40% average performance gain and 5.93x speedup in LLM-based evolutionary code search.