LeanFlow Automates Mathematical Paper Formalization with LLM Agents

Lazar Milikic, Simon Guilloud, Khanh Nguyen, Viktor Kuncak· July 24, 2026 View original

Summary

LeanFlow is an LLM agent system designed to translate mathematical papers into buildable Lean projects, demonstrating efficiency and completion within budget constraints across various mathematical domains.

This paper introduces LeanFlow, an AI agent system powered by large language models (LLMs) specifically engineered to automate the formalization of mathematical papers. The system's primary function is to convert complex mathematical texts into executable Lean projects, a formal proof assistant. The research investigates how different runtime mechanisms influence the completion, auditability, and efficiency of this document-to-project formalization process. The study involved case studies on two previously unformalized mathematical papers, one in number theory and another in measure theory. Using models like Kimi2.6 and GPT5.5, the researchers performed ablations on the model, proof-workflow, and toolset, meticulously tracking task outcomes, API calls, and token usage. Results showed that with Kimi2.6, the full LeanFlow workflow successfully completed both document-level projects within a 2000-call budget, while variants without a queue hit the budget limit. With GPT5.5, all document-level variants completed, and the full workflow consistently demonstrated the lowest or tied-lowest input-token cost for both source papers. Complementary evaluations on benchmarks like the PFR slice of RLM25 and ICML 2026 AI for Math TCS challenge projects further validated LeanFlow's capabilities, achieving 75.7% BEq+ and solving all five challenge projects with GPT5.5.

Why it matters

Automating the formalization of mathematical proofs can significantly accelerate research and development in fields requiring high-assurance software, formal verification, and complex algorithmic design, reducing human error and increasing reliability.

How to implement this in your domain

  1. 1Explore LeanFlow's architecture for potential application in automating formal verification tasks within software development.
  2. 2Investigate using LLM agent systems for translating complex specifications or documentation into formal, verifiable code or proofs.
  3. 3Pilot LeanFlow or similar autoformalization tools in a research or advanced engineering context to validate mathematical algorithms.
  4. 4Consider the implications of such systems for improving the reliability and correctness of critical software components.

Who benefits

Software EngineeringAerospaceCybersecurityResearch & AcademiaFinance

Key takeaways

  • LeanFlow is an LLM agent system that automates the formalization of mathematical papers into Lean projects.
  • It demonstrates efficient completion of complex formalization tasks within budget constraints.
  • The system performs well across different mathematical domains and with various LLMs.
  • This technology could significantly enhance formal verification and high-assurance software development.

Original post by Lazar Milikic, Simon Guilloud, Khanh Nguyen, Viktor Kuncak

"arXiv:2607.20503v1 Announce Type: new Abstract: We present and evaluate LeanFlow, an LLM agent system specialized for translating mathematical papers into buildable Lean projects. Recent verifier-in-the-loop systems show that large formal artifacts can be produced, but it remains…"

View on X

Originally posted by Lazar Milikic, Simon Guilloud, Khanh Nguyen, Viktor Kuncak on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses