arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.13137cs.IRcs.AI
收藏

LeanSearch v2:用于Lean 4定理证明的全局前提检索

LeanSearch v2: Global Premise Retrieval for Lean 4 Theorem Proving

School of Mathematical Sciences, Peking University(北京大学数学科学学院);IQuest Research(IQuest研究院);Research Institute for Mathematical Sciences, Kyoto University(京都大学数学研究所);Westlake Institute for Advanced Study, Westlake University(西湖研究所在线高级研究院);Beijing International Center for Mathematical Research and the New Cornerstone Science Laboratory, Peking University(北京国际数学研究中心和新基石科学实验室,北京大学);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心);Center for Intelligent Computing, Great Bay Institute for Advanced Study, Great Bay University(智能计算中心,Great Bay高级研究院,Great Bay大学);Zhongguancun Academy(中关村学院)

Guoxiong Gao, Zeming Sun, Jiedong Jiang, Yutong Wang, Jingda Xu, Peihao Wu, Bryan Dai, Bin Dong

AI总结:

LeanSearch v2通过两级检索系统实现全局前提检索,其标准模式在无需领域微调的情况下达到SOTA单查询检索效果,推理模式通过迭代草图-检索-反思循环提高前提检索准确率,实验表明其在证明成功率上优于现有方法。

摘要:

在Lean 4中证明定理往往需要识别一组分散的库引理,其联合使用可实现简洁证明——这一任务我们称为全局前提检索。现有工具解决相邻问题:语义搜索引擎寻找匹配查询的单个声明,而前提选择系统逐个战术步骤预测有用引理。二者均无法恢复整个定理所需的所有前提。我们提出LeanSearch v2,一种双模式检索系统。其标准模式应用了一个层级非正式化的Mathlib语料库,并采用嵌入-重排序流水线,实现了无需领域特定微调的SOTA单查询检索(nDCG@10为0.62,优于次优系统0.53)。其推理模式基于标准模式作为检索基础,通过迭代草图-检索-反思循环实现全局前提检索。在69个研究级Mathlib定理基准测试中,推理模式在10个检索候选中恢复46.1%的真实前提组,优于强推理检索系统(38.0%)和前提选择基线(9.3%)。在受控下游评估中,用LeanSearch v2替代其他检索器可获得最高证明成功率(20% vs. 16% for the next-best system and 4% without retrieval),证实检索质量可传播至证明生成。我们已开源所有代码、数据和基准。代码和数据:https://github.com/frenzymath/LeanSearch-v2。标准模式通过API公开访问:https://leansearch.net/。

英文摘要:

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/ .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑