ARTFEED — Contemporary Art Intelligence

LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving

other · 2026-05-14

LeanSearch v2 is a dual-mode retrieval framework designed for global premise retrieval in Lean 4 theorem proving. Its standard mode leverages a hierarchy-informalized Mathlib corpus along with an embedding-reranker pipeline, achieving a leading performance in single-query retrieval (nDCG@10 of 0.62, surpassing the next-best system at 0.53) without requiring domain-specific fine-tuning. Meanwhile, the reasoning mode focuses on global premise retrieval through iterative sketch-retrieve-reflect cycles. This system effectively identifies a dispersed collection of library lemmas for succinct proofs, an area inadequately addressed by existing tools such as semantic search engines and premise-selection systems. For evaluation, a benchmark consisting of 69 queries related to research-level Mathlib theorems was utilized.

Key facts

  • LeanSearch v2 is a two-mode retrieval system for Lean 4 theorem proving.
  • Standard mode uses a hierarchy-informalized Mathlib corpus with an embedding-reranker pipeline.
  • Achieves nDCG@10 of 0.62 vs. 0.53 for the next-best system.
  • No domain-specific fine-tuning required.
  • Reasoning mode uses iterative sketch-retrieve-reflect cycles.
  • Addresses global premise retrieval for entire theorems.
  • Existing tools only find individual declarations or predict lemmas step-by-step.
  • Evaluated on a 69-query benchmark of research-level Mathlib theorems.

Entities

Institutions

  • arXiv
  • Mathlib

Sources