LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving
Not on the map. Why?
Abstract (arXiv)
Proving theorems in Lean 4 often requires identifying a scattered set of library lemmas whose joint use enables a concise proof -- a task we call global premise retrieval. Existing tools address adjacent problems: semantic search engines find individual declarations matching a query, while premise-selection systems predict useful lemmas one tactic step at a time. Neither recovers the full premise set an entire theorem requires. We present LeanSearch v2, a two-mode retrieval system for this task. Its standard mode applies a hierarchy-informalized Mathlib corpus with an embedding-reranker pipeline, achieving state-of-the-art single-query retrieval without domain-specific fine-tuning (nDCG@10 of 0.62 vs. 0.53 for the next-best system). Its reasoning mode builds on standard mode as its retrieval substrate, targeting global premise retrieval through iterative sketch-retrieve-reflect cycles. On a 69-query benchmark of research-level Mathlib theorems, reasoning mode recovers 46.1% of ground-truth premise groups within 10 retrieved candidates, outperforming strong reasoning retrieval systems (38.0%) and premise-selection baselines (9.3%) on the same benchmark. In a controlled downstream evaluation with a fixed prover loop, replacing alternative retrievers with LeanSearch v2 yields the highest proof success (20% vs. 16% for the next-best system and 4% without retrieval), confirming that retrieval quality propagates to proof generation. We have open-sourced all code, data, and benchmarks. Code and data: https://github.com/frenzymath/LeanSearch-v2 . The standard mode is publicly available with API access at https://leansearch.net/ .
Key facts. Cited by 9 papers in the map (data through 13 Oct 2026). Builds on 30 of its 35 references that are in the map. First posted on arXiv 13 May 2026.
Builds on
30 of 35 references.
References · 30
- 2025Qwen3 Technical Reportcited by 8,510
- 2025Gemini 2.5: Pushing the Frontier with Advanced Reasoning, Multimodality, Long Context, and Next Generation Agentic Capabilitiescited by 3,714
- 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,222
- 2022MTEB: Massive Text Embedding Benchmarkcited by 630
- 2025Kimi K2: Open Agentic Intelligencecited by 544
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 420
- 2025DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decompositioncited by 280
- 2024BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrievalcited by 156
- 2021NaturalProofs: Mathematical Theorem Proving in Natural Languagecited by 81
- 2025ReasonIR: Training Retrievers for Reasoning Taskscited by 77
- 2025Rank1: Test-Time Compute for Reranking in Information Retrievalcited by 69
- 2024Herald: A Natural Language Annotated Lean 4 Datasetcited by 56
18 more
- 2025Aristotle: IMO-level Automated Theorem Provingcited by 51
- 2026Numina-Lean-Agent: An Open and General Agentic Reasoning System for Formal Mathematicscited by 45
- 2025Seed-Prover 1.5: Mastering Undergraduate-Level Theorem Proving via Learning from Experiencecited by 37
- 2025DIVER: A Multi-Stage Approach for Reasoning-intensive Information Retrievalcited by 36
- 2024A Semantic Search Engine for Mathlib4cited by 30
- 2025RaDeR: Reasoning-aware Dense Retrieval Modelscited by 27
- 2026Automated Conjecture Resolution with Formal Verificationcited by 26
- 2025FATE: A Formal Benchmark Series for Frontier Algebra of Multiple Difficulty Levelscited by 23
- 2025REAL-Prover: Retrieval Augmented Lean Prover for Mathematical Reasoningcited by 18
- 2025LeanExplore: A search engine for Lean 4 declarationscited by 14
- 2026MM-BRIGHT: A Multi-Task Multimodal Benchmark for Reasoning-Intensive Retrievalcited by 11
- 2025Lean Finder: Semantic Search for Mathlib That Understands User Intentscited by 7
- 2025Premise Selection for a Lean Hammercited by 6
- 2025Benchmarking Information Retrieval Models on Complex Retrieval Taskscited by 6
- 2025MIRB: Mathematical Information Retrieval Benchmarkcited by 5
- 2025Learning an Effective Premise Retrieval Model for Efficient Mathematical Formalizationcited by 4
- 2025GroupRank: A Groupwise Paradigm for Effective and Efficient Passage Reranking with LLMscited by 3
- 2025Combining Textual and Structural Information for Premise Selection in Leancited by 1
Built on by
Citing papers per year: 2026: 9.
9 papers.
- 2026TheoremGraph: Bridging Formal and Informal Mathematicscited by 4
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Researchcited by 4
- 2026Formalizing Numerical Analysis: An Agent Pipeline and Quality Audit Beyond Kernel Acceptancecited by 3
- 2026TreeThink: A Modular Tree Search Library for Mathematical Reasoning with LLMscited by 0
- 2026When Does Structured Knowledge Help Neural Theorem Proving?cited by 0
- 2026ProofLoom: Proof-Obligation-Driven Theory Construction for Autoformalizing Research-Level Stochastic Optimizationcited by 0
- 2026GenLimitLib: A Formal Library for Language Generation in the Limit and AI-Assisted Mathematical Researchcited by 0
- 2026Second-Order Problem Solving for Recursive Self-Improvement in Formal Verificationcited by 0
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Provingcited by 0
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Proving7 Oct 2026
- 2026Second-Order Problem Solving for Recursive Self-Improvement in Formal Verification5 Oct 2026
- 2026GenLimitLib: A Formal Library for Language Generation in the Limit and AI-Assisted Mathematical Research29 Sep 2026
- 2026ProofLoom: Proof-Obligation-Driven Theory Construction for Autoformalizing Research-Level Stochastic Optimization28 Sep 2026
- 2026When Does Structured Knowledge Help Neural Theorem Proving?28 Sep 2026
- 2026TreeThink: A Modular Tree Search Library for Mathematical Reasoning with LLMs13 Jul 2026
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Research5 Jul 2026
- 2026TheoremGraph: Bridging Formal and Informal Mathematics24 Jun 2026
- 2026Formalizing Numerical Analysis: An Agent Pipeline and Quality Audit Beyond Kernel Acceptance12 Jun 2026