arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.00994cs.AIcs.LGcs.LOcs.SC
收藏

面向Lean的机器学习前提选择

Machine-Learned Premise Selection for Lean

University of Warsaw(华沙大学);Czech Technical University(捷克技术大学);University of Edinburgh(爱丁堡大学);Carnegie Mellon University(卡内基梅隆大学)

Bartosz Piotrowski, Ramon Fernández Mir, Edward Ayers

AI总结:

本研究为Lean证明助手开发了基于在线训练定制随机森林的机器学习前提选择工具,直接依托Lean 4元编程特性实现,用mathlib数据训练,支持编辑器交互式调用,兼顾集成度、易用性与轻量高效性。

摘要:

我们为Lean证明助手引入了一款基于机器学习的工具,可为用户正在证明的定理推荐相关前提。该工具的设计原则为:(1)与证明助手深度集成;(2)易用且易安装;(3)采用轻量快速的实现方案。为此,我们设计了一款定制版随机森林模型,以在线方式进行训练。该模型直接在Lean中实现,这得益于Lean 4丰富且高效的元编程特性。随机森林的训练数据提取自mathlib——Lean的数学库。我们对生成训练特征与标签的多种方案进行了实验。训练完成的模型给出的建议,用户可通过suggest_premises策略调用,该策略可在交互式构建证明时于编辑器中触发。

英文摘要:

We introduce a machine-learning-based tool for the Lean proof assistant that suggests relevant premises for theorems being proved by a user. The design principles for the tool are (1) tight integration with the proof assistant, (2) ease of use and installation, (3) a lightweight and fast approach. For this purpose, we designed a custom version of the random forest model, trained in an online fashion. It is implemented directly in Lean, which was possible thanks to the rich and efficient metaprogramming features of Lean 4. The random forest is trained on data extracted from mathlib -- Lean's mathematics library. We experiment with various options for producing training features and labels. The advice from a trained model is accessible to the user via the suggest_premises tactic which can be called in an editor while constructing a proof interactively.

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

↑