LeanExplore: A search engine for Lean 4 declarations
Not on the map. Why?
Abstract (arXiv)
The expanding Lean 4 ecosystem poses challenges for navigating its vast libraries. This paper introduces LeanExplore, a search engine for Lean 4 declarations. LeanExplore enables users to semantically search for statements, both formally and informally, across select Lean 4 packages (including Batteries, Init, Lean, Mathlib, PhysLean, and Std). This search capability is powered by a hybrid ranking strategy, integrating scores from a multi-source semantic embedding model (capturing conceptual meaning from formal Lean code, docstrings, AI-generated informal translations, and declaration titles), BM25+ for keyword-based lexical relevance, and a PageRank-based score reflecting declaration importance and interconnectedness. The search engine is accessible via a dedicated website (https://www.leanexplore.com/) and a Python API (https://github.com/justincasher/lean-explore). Furthermore, the database can be downloaded, allowing users to self-host the service. LeanExplore integrates easily with LLMs via the model context protocol (MCP), enabling users to chat with an AI assistant about Lean declarations or utilize the search engine for building theorem-proving agents. This work details LeanExplore's architecture, data processing, functionalities, and its potential to enhance Lean 4 workflows and AI-driven mathematical research
Key facts. Cited by 18 papers in the map (data through 14 Oct 2026). Builds on 15 of its 31 references that are in the map. First posted on arXiv 4 Jun 2025.
Builds on
15 of 31 references.
References · 15
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 427
- 2022Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofscited by 291
- 2022Autoformalization with Large Language Modelscited by 263
- 2024Lean Workbook: A large-scale Lean problem set formalized from natural language math problemscited by 122
- 2024Lean Copilot: Large Language Models as Copilots for Theorem Proving in Leancited by 58
- 2023LLMSTEP: LLM proofstep suggestions in Leancited by 32
- 2024A Semantic Search Engine for Mathlib4cited by 31
- 2024Proof Automation with Large Language Modelscited by 22
- 2024Pantograph: A Machine-to-Machine Interaction Interface for Advanced Theorem Proving, High Level Reasoning, and Data Extraction in Lean 4cited by 18
- 2025HybridProver: Augmenting Theorem Proving with LLM-Driven Proof Synthesis and Refinementcited by 6
Built on by
Citing papers per year: 2025: 5; 2026: 13.
18 papers.
Sort:
By area:
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,040
- 2026Beyond Benchmarks: MathArena as an Evaluation Platform for Mathematics with LLMscited by 137
- 2026LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Provingcited by 10
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theoremscited by 8
- 2025Lean Finder: Semantic Search for Mathlib That Understands User Intentscited by 8
- 2026Semantic Search over 9 Million Mathematical Theoremscited by 8
- 2026Learning to Repair Lean Proofs from Compiler Feedbackcited by 7
- 2025Automated Formalization via Conceptual Retrieval-Augmented LLMscited by 5
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Researchcited by 5
- 2025LeanCat: A Benchmark Suite for Formal Category Theory in Lean (Part I: 1-Categories)cited by 4
- 2026Matlas: A Semantic Search Engine for Mathematicscited by 3
- 2026OpenProver: Agentic and Interactive Theorem Proving with Lean 4cited by 2
6 more
- 2025G"odel's Poetrycited by 1
- 2026LAMP: Lean-based Agentic framework with MCP and Proof Repaircited by 1
- 2026MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinementcited by 0
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Provingcited by 0
- 2026Humanize Olympiad Agents: A Multi-Session Workflow for Olympiad Problem Solving with Solve, Review, Wiki, Verifycited by 0
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalizationcited by 0
- 2026Humanize Olympiad Agents: A Multi-Session Workflow for Olympiad Problem Solving with Solve, Review, Wiki, Verify9 Oct 2026
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Proving7 Oct 2026
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalization6 Oct 2026
- 2026MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinement14 Aug 2026
- 2026OpenProver: Agentic and Interactive Theorem Proving with Lean 410 Jul 2026
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Research5 Jul 2026
- 2026LAMP: Lean-based Agentic framework with MCP and Proof Repair27 Jun 2026
- 2026LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving13 May 2026
- 2026Beyond Benchmarks: MathArena as an Evaluation Platform for Mathematics with LLMs1 May 2026
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence26 Apr 2026
- 2026Matlas: A Semantic Search Engine for Mathematics19 Apr 2026
- 2026Semantic Search over 9 Million Mathematical Theorems5 Feb 2026
6 more
- 2026Learning to Repair Lean Proofs from Compiler Feedback3 Feb 2026
- 2025LeanCat: A Benchmark Suite for Formal Category Theory in Lean (Part I: 1-Categories)31 Dec 2025
- 2025G"odel's Poetry16 Dec 2025
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theorems12 Oct 2025
- 2025Lean Finder: Semantic Search for Mathlib That Understands User Intents8 Oct 2025
- 2025Automated Formalization via Conceptual Retrieval-Augmented LLMs9 Aug 2025
- 2026Learning to Repair Lean Proofs from Compiler Feedbackcited by 7
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Researchcited by 5
- 2026OpenProver: Agentic and Interactive Theorem Proving with Lean 4cited by 2
- 2026Humanize Olympiad Agents: A Multi-Session Workflow for Olympiad Problem Solving with Solve, Review, Wiki, Verifycited by 0
- 2026Humanize Olympiad Agents: A Multi-Session Workflow for Olympiad Problem Solving with Solve, Review, Wiki, Verify9 Oct 2026
- 2026OpenProver: Agentic and Interactive Theorem Proving with Lean 410 Jul 2026
- 2026MechMath Agent Team: LLM Driven Agents for Mathematical Research5 Jul 2026
- 2026Learning to Repair Lean Proofs from Compiler Feedback3 Feb 2026
- 2026LAMP: Lean-based Agentic framework with MCP and Proof Repair27 Jun 2026
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,040
- 2026Beyond Benchmarks: MathArena as an Evaluation Platform for Mathematics with LLMscited by 137
- 2026LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Provingcited by 10
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theoremscited by 8
- 2025Lean Finder: Semantic Search for Mathlib That Understands User Intentscited by 8
- 2026Semantic Search over 9 Million Mathematical Theoremscited by 8
- 2025LeanCat: A Benchmark Suite for Formal Category Theory in Lean (Part I: 1-Categories)cited by 4
- 2026Matlas: A Semantic Search Engine for Mathematicscited by 3
- 2025G"odel's Poetrycited by 1
- 2026MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinementcited by 0
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Provingcited by 0
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalizationcited by 0
- 2026Let the Library Speak: Self-Advertised Method Selection for Formal Proving7 Oct 2026
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalization6 Oct 2026
- 2026MathForm: Scaling Mathematical Autoformalization with Knowledge Retrieval and Verification-Guided Refinement14 Aug 2026
- 2026LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving13 May 2026
- 2026Beyond Benchmarks: MathArena as an Evaluation Platform for Mathematics with LLMs1 May 2026
- 2026Matlas: A Semantic Search Engine for Mathematics19 Apr 2026
- 2026Semantic Search over 9 Million Mathematical Theorems5 Feb 2026
- 2025LeanCat: A Benchmark Suite for Formal Category Theory in Lean (Part I: 1-Categories)31 Dec 2025
- 2025G"odel's Poetry16 Dec 2025
- 2025DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theorems12 Oct 2025
- 2025Lean Finder: Semantic Search for Mathlib That Understands User Intents8 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2024Herald: A Natural Language Annotated Lean 4 Dataset
- 2026Understanding Tool-Augmented Agents for Lean Formalization: A Factorial Analysis
- 2024LEAN-GitHub: Compiling GitHub LEAN repositories for a versatile LEAN prover
- 2026Type-Aware Retrieval-Augmented Generation with Dependency Closure for Solver-Executable Industrial Optimization Modeling
- 2024Process-Driven Autoformalization in Lean 4
- 2026LeanFlow: A Case Study in Workflow-Driven Lean Autoformalization
- 2024Formal Language Knowledge Corpus for Retrieval Augmented Generation
- 2025ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddings