一句话:用 LLM 从证明语料中挖掘可复用符号 tactic 并集成到符号证明器,从而提升自动定理证明能力。
自动定理证明对安全攸关系统的形式验证至关重要,但现有基于学习的方法多把大语言模型训练成端到端证明器,系统资源开销大且不透明;传统符号证明器虽高效,却难以从数据中自动改进。本文提出 LLM2Ltac,其核心思想是不把 LLM 当作端到端证明器,而是当作智能合成器:给定形式证明语料,让 LLM 识别其中潜在的证明策略并将其形式化为可复用的 tactic,再对 tactic 的有效性与泛化性进行验证,最后集成进符号证明器,使证明过程无需承担 LLM 的运行时开销。作者在 Rocq 8.20.0 上实现该工具,从标准库的 11,725 个定理中挖掘 tactic,并在 CompCert、Coq-Art、Ext-Lib 与 VFA 四个真实验证项目的 6,199 个定理上评估:挖掘出的 tactic 使 CoqHammer 多证明 23.87% 的定理;将改进后的 CoqHammer 与 Claude Code 结合,整体可证明定理数提升 9.90%。
Automated theorem proving is essential for the formal verification of safety-critical systems. As the corpus of formal proofs grows, a natural paradigm is to learn from existing proofs. However, current learning-based approaches predominantly train Large Language Models (LLMs) as end-to-end provers, which yields resource-intensive, opaque systems. Conversely, while traditional symbolic provers are computationally efficient, how to automatically improve these solvers from data remains an open challenge. This paper bridges this gap by proposing LLM2Ltac, a novel approach that leverages the reasoning power of LLMs not as end-to-end provers, but as intelligent synthesizers to mine purely symbolic tactics from data. Given a corpus of formal proofs, LLM2Ltac asks an LLM to identify latent proof strategies and formalize them into reusable tactics. These tactics are verified for validity and generalizability, and finally integrated into symbolic provers to enhance their automated proving capabilities without the runtime cost of LLMs. We implement LLM2Ltac on Rocq 8.20.0 and mine tactics from 11,725 theorems in the standard library. We evaluate our approach on 6,199 theorems from four large real-world verification projects, namely, CompCert, Coq-Art, Ext-Lib, and VFA. Results show that the mined tactics improve CoqHammer to prove 23.87% more theorems, and when integrating the improved CoqHammer with Claude Code, the overall proved theorems increases by 9.90%, indicating the effectiveness of LLM2Ltac.