arXiv:2611.08849cs.HCNov 2026

Manuscript Offprint

arXiv:2611.08849

Lea: An Agent Backbone for Mathematician-Controlled Formalization in Lean

Shaswat Patel, Daniel Aarao Reis Arturi, Kevin Gomez, Jaume de Dios Pont, Jorge Poco, Eduardo V. Teixeira, Sam Westrick, Claudio Silva, Chinmay Hegde

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Agentic systems now formalize research-level mathematics in Lean, but they are built for autonomy: the mathematician states a target and inspects a result. The alternative, a general-purpose coding harness, is domain-neutral and must be assembled into a formalization workspace before any mathematics begins. Mathematicians, however, report wanting to keep high-level control over how an argument is decomposed and established. We present Lea, a Lean-specific agent backbone for mathematician-facing software rather than a single interface. Lea exposes runs, sessions, and typed events through one application-neutral API, and ships with Lean tooling (blueprints, LSP, Loogle, SafeVerify) already wired. We report two applications built on it: LeaChat, a web client for interactive proof authoring, and LeaOverleaf, which formalizes theorems annotated directly in an Overleaf document; a session begun in either continues in the other. In a case study, a mathematician outlined a proof of the Durfee square generating function in a few natural-language messages, and Lea produced a complete Lean development from Mathlib alone, following the intended decomposition closely and requiring substantive correction at a single point. Lea and both applications are released as open source so that further mathematician-facing tools can be built on the same backbone.

1 Introduction

Agentic systems have begun to formalize research-level mathematics in Lean [7]. Two families dominate. Autonomous provers [1, 3, 10, 11, 14, 17, 19] search proof space with domain-specific training and now reach olympiad level. Coding-agent harnesses wrap a general-purpose agent such as Claude Code or Codex with Lean tools, skills, and MCP servers: Numina-Lean-Agent [12] pairs Claude Code with an MCP server exposing the Lean LSP and Mathlib retrieval and solved all twelve Putnam 2025 problems; LeanMarathon [22] coordinates four Codex agents over an evolving proof DAG under CI checks and proved 258 lemmas across seven research-level targets. Both families show that long-horizon formalization is within reach, but in both the unit of interaction is an autonomous run. LeanMarathon confines human involvement to redesigning the harness between runs; Numina-Lean-Agent lets an expert revise a Markdown blueprint between invocations. The mathematician sits at the endpoints of the process.

That is not how mathematicians say they want to work. In a recent mixed-methods study of formalization workflows [6], 81.7% of surveyed students and researchers preferred full or partial human

*Equal contribution. Code available at:https://github.com/VIDA-NYU/Lea

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: The 6th Workshop on Mathematical Reasoning and AI.

Figure

Figure 1: (a) Existing systems are autonomy-first provers or general-purpose harnesses. (b) Lea makes the run itself the surface the mathematician acts on. (c) One application-neutral service boundary carries every client; Lean tooling ships wired, while skills, sub-agent roles, tools, and MCP servers remain user-editable.

control over formalization, and 66.7% wished to retain high-level strategic control while delegating mechanical work; six of seven participants in the accompanying user study combined several AI tools rather than relying on one. Earlier work found that mathematical correctness and perceived helpfulness diverge when mathematicians interact with language models, motivating systems in which users can inspect and correct model behavior [5]. The autonomy-first systems report the consequences themselves: Numina-Lean-Agent finds its own output overly result-oriented and in need of expert simplification [12], and LeanMarathon reports a run that, with the required Mathlib theory absent, produced an artifact passing every structural check while establishing nothing mathematically [22].

We present Lea, a Lean-specific agent backbone for mathematician-facing software (Figure 1). Relative to the systems above, Lea differs in four ways: the mathematician can intervene while a run is in progress rather than only between runs; the project blueprint persists across runs and is exposed as a dependency graph; Lean tooling (LSP, Logole, blueprints, and kernel-replay verification with SafeVerify [9]) ships wired rather than assembled per project; and the agent and project state are reachable through one application-neutral API, so several front ends can share a formalization. Our contributions are:

  • An agent backbone (§2). One API exposes runs, sessions, and typed events, with no client-specific route. Multi-agent orchestration, persistent blueprints, and the Lean tools that recent harnesses integrated separately for benchmarking [8, 12, 22, 23] are part of the system, and skills, sub-agent roles, tools, and MCP servers are user-editable without touching agent code.

  • Two applications on that backbone (§3). LeaChat is a web client for interactive proof authoring. LeaOverleaf turns annotations in a LaTeX document into blueprint nodes, writes each node's formalization status back into the document, and fingerprints every formalized statement so that edits to the paper or to the Lean import graph invalidate exactly the affected results. The two share sessions, transcripts, and usage accounting.

  • A case study (§4). From a natural-language outline of the Durfee square generating function, Lea produced a complete Lean proof across three sessions and 38 sub-agent invocations with 28 human messages, one of which required substantive correction.

References (19)