Lean Finder: Semantic Search for Mathlib That Understands User Intents
Jialin Lu, Kye Emond, Kaiyu Yang, Swarat Chaudhuri, Weiran Sun, Wuyang Chen
Abstract
We present Lean Finder, a semantic search engine for Lean and mathlib that understands and aligns with the intents of mathematicians. Progress in formal theorem proving is often hindered by the difficulty of locating relevant theorems and the steep learning curve of the Lean 4 language, making advancement slow and labor-intensive. Existing Lean search engines, though helpful, rely primarily on informalizations (natural language translation of the formal statements), while largely overlooking the mismatch with real-world user queries. In contrast, we propose a user-centered semantic search tailored to the needs of mathematicians. Our approach begins by analyzing and clustering the semantics of public Lean discussions, then fine-tuning text embeddings on synthesized queries that emulate user intents. We further align Lean Finder with mathematicians' preferences using diverse feedback signals, encoding it with a rich awareness of their goals from multiple perspectives. Evaluations on real-world queries, informalized statements, and proof states demonstrate that our Lean Finder achieves over 30% relative improvement compared to previous search engines and GPT-4o. In addition, Lean Finder is compatible with LLM-based theorem provers, bridging retrieval with formal reasoning. Lean Finder is available at: https://leanfinder. github.io .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7a12eeef-2779-4626-a104-be7b18aa7a05Cited by top-tier papers1
Ask how each one uses itBuilds on17
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Chatbot Arena: An Open Platform for Evaluating LLMs by Human PreferenceWei-Lin Chiang, Lianmin Zheng, Ying Sheng, Anastasios Nikolas Angelopoulos et al.ICML 2024 · 1,212 citations
- Autoformalization with Large Language ModelsYuhuai Wu, Albert Qiaochu Jiang, Wenda Li, Markus N. Rabe et al.NeurIPS 2022 · 364 citations
- miniF2F: a cross-system benchmark for formal Olympiad-level mathematicsKunhao Zheng, Jesse Michael Han, Stanislas PoluICLR 2022 · 342 citations
Related papers
- ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint EmbeddingsPrithwish Jana, Kaan Kale, Ahmet Ege Tanriverdi, Cruise Song et al.ICLR 2026 · 19 citations
- FormalML: A Benchmark for Evaluating Formal Subgoal Completion in Machine Learning TheoryXiao-Wen Yang, Zihao Zhang, Jianuo Cao, Zhi Zhou et al.ICLR 2026 · 8 citations
- ImProver: Agent-Based Automated Proof OptimizationRiyaz Ahuja, Jeremy Avigad, Prasad Tetali, Sean WelleckICLR 2025
- DRIFT: Decompose, Retrieve, Illustrate, then Formalize TheoremsMeiru Zhang, Philipp Borchert, Milan Gritta, Gerasimos LampourasICLR 2026 · 8 citations
- CriticLean: Critic-Guided Reinforcement Learning for Mathematical FormalizationZhongyuan Peng, Yifan Yao, Kaijing Ma, Shuyue Guo et al.ACL 2026 · 15 citations
