MerLean

AI-assisted workflows for Lean 4 autoformalization, theorem proving, and machine-checked verification.

About MerLean

MerLean began as a bidirectional autoformalization pipeline: it extracts mathematical statements from LaTeX, formalizes them into Lean 4 code built on Mathlib, and translates the result back into human-readable LaTeX for semantic review.

The newer MerLean-Prover work extends that stack into end-to-end Lean theorem proving. A simple recursive looping harness closes 10/23 FormalQualBench problems and 12/12 on a Putnam 2025 slice, without fine-tuning or theorem-specific scaffolding.

2,050+
Lean Declarations
10/23
FormalQualBench
12/12
Putnam 2025 Slice

MerLean-Prover Results

MerLean-Prover uses three agent types around a recursive proof-plan loop: planning, focused artifact checking, and Lean compile / repair. The proof assistant remains the judge; each closed proof passes the Lean kernel and axiom audit described in the paper.

FormalQualBench closure rate
System Solved / 23
MerLean-Prover (ours) 10
OpenGauss8
Aristotle*6
Claude Code (Skills)5
Codex5
opencode (Opus)5
Claude Code4
Claude Code (MCP)3
Codex (Skills + MCP)3

† Nine solves close within the 4-hour budget; one extended run closes in 4h40m. *Aristotle results are reported but unvalidated in the benchmark source.

Putnam 2025 wall-clock time (minutes)
Prob. Arist. Seed 1.5 Axiom NLA Ours
A130601109727
A260301803031
A3301201654444
A418024010716938
A5----5182040235
A6602402598925
B115054027055161
B2253606514255
B34030433016
B4--12011230853
B54202402548843
B618018049479761
Solved10/1211/1212/1212/1212/12
Total----25773889789

Comparison columns are reproduced from Numina-Lean-Agent Table 3. Bold cells in the paper mark fastest solves; here they are highlighted.

Cite

@article{ren2026merlean, title = {MerLean: An Agentic Framework for Autoformalization in Quantum Computation}, author = {Ren, Yuanjie and Li, Jinzheng and Qi, Yidi}, journal = {arXiv preprint arXiv:2602.16554}, year = {2026}, eprint = {2602.16554}, archivePrefix = {arXiv}, primaryClass = {cs.LO}, doi = {10.48550/arXiv.2602.16554} } @misc{li2026merleanproverrecursiveloopingharness, title = {MerLean-Prover: A Recursive Looping Harness for End-to-End Lean 4 Theorem Proving}, author = {Jinzheng Li and Zeru Zhu and Yuanjie Ren}, year = {2026}, eprint = {2605.26959}, archivePrefix = {arXiv}, primaryClass = {cs.LO}, url = {https://arxiv.org/abs/2605.26959} }

Publications

Research papers from the MerLean project.

arXiv 2026
MerLean-Prover: A Recursive Looping Harness for End-to-End Lean 4 Theorem Proving
Jinzheng Li*, Zeru Zhu*, Yuanjie Ren*
arXiv preprint arXiv:2605.26959 · cs.LO

* Equal contribution.

arXiv 2026
MerLean: An Agentic Framework for Autoformalization in Quantum Computation
Yuanjie Ren*, Jinzheng Li*, Yidi Qi*
arXiv preprint arXiv:2602.16554 · cs.LO

Videos

Demos and presentations showcasing MerLean in action.

MerLean Product Demo (1080p)

A three-minute walkthrough of the MerLean workflow, from research artifact ingestion to machine-checked Lean output and interactive exploration. Open the video directly.

Blog

Updates on autoformalization, Lean 4, and quantum computation.

Examples

Browse the formalization output produced by MerLean.

Fault-Tolerant Quantum Computation

Formalization of Low-overhead fault-tolerant quantum computation by gauging logical operators. Covers stabilizer formalism, Pauli algebra, transversal gates, gauging graphs, and fault-tolerant measurement — 1,450 Lean declarations from 48 statements.

Balanced Product Quantum Codes

Formalization of Balanced Product Quantum Codes. Covers chain complexes, cohomology, CSS & LDPC codes, expander graphs, Cayley graphs, and the LPS construction.