arXiv:2610.40310cs.LOOct 2026

Manuscript Offprint

arXiv:2610.40310

Hammering with Vampire in Lean

Jonas Bodingbauer, Laura Kovács

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Jonas Bodingbauer ID^{ID} and Laura Kovács ID^{ID}

TU Wien, Vienna, Austria

jonas.bodingbauer@tuwien.ac.at

Abstract. We present VAMPIRE-HAMMER, a hammer for the LEAN interactive theorem prover that discharges goals using the VAMPIRE automated theorem prover and reconstructs proofs checked by the LEAN kernel. VAMPIRE-HAMMER uses the LEAN-AUTO framework to process goals and premises before dispatching them to VAMPIRE for proof search. Doing so, we rely on standard TPTP problem formats and annotated TSTP proofs that support proof reconstruction. With a 10-second budget on 196,083 eligible Mathlib theorems, VAMPIRE-HAMMER solves 21,158 problems not solved by other evaluated tools within the same budget.

Keywords: Automated reasoning · Proof reconstruction · Vampire · Lean

1 Introduction

The VAMPIRE theorem prover fully automates proof search in first- and higher-order logic, including theories and induction [1]. Its proving capabilities support interactive theorem provers (ITPs) for higher-order logics: VAMPIRE has long served as a proof hammer in Isabelle [15,5]. However, integrating automated theorem provers (ATPs), particularly VAMPIRE, as proof hammers with full reconstruction in ITPs based on dependent type theory, such as LEAN [9], remains challenging. Recent approaches translate fragments of dependent type theory into first- and higher-order logic [7,12], enabling ATPs and SMT solvers to reason about them. However, translating a goal and reconstructing an external proof are distinct challenges and not yet fully addressed by existing techniques. This tool demonstration paper addresses these challenges with the new VAMPIRE-HAMMER tool, which uses VAMPIRE as a reasoning engine for LEAN and fully reconstructs its proofs for kernel checking. Successful invocations of VAMPIRE-HAMMER thus do not require the translation procedure, the reconstruction or VAMPIRE to be trusted for proof correctness. To the best of our knowledge, VAMPIRE-HAMMER provides the first complete reasoning pipeline for (native) proof reconstruction, supporting proof extraction in both first- and higher-order logic (Figure 2). Furthermore, VAMPIRE-HAMMER provides the first hammer for LEAN in a way that the proof-search efficiency of the ATP is fully maintained and reconstruction of proof-steps is shared later between both programs in an efficient way.

Methodology. Our work builds on prior results in proof checking [13,2], producing VAMPIRE proofs in formats that can be checked by the SMT solver Z3 [10] or by LEAN. However, direct proof output alone is insufficient for a VAMPIRE-based hammer in LEAN: proof goals must (i) first be translated from dependent type theory into simply typed

Bodingbauer and Kovács

(a) Explicit proof

theorem centralSquares (h : ∀ x y : G, Commute (x*x) y) (a b c : G) : Commute (a * b * a⁻¹ * b⁻¹) c := by have factor : a * b * a⁻¹ * b⁻¹ = --... rw [factor] exact ((h a c).mul_left (h (a⁻¹ * b) c)).mul_left (h b⁻¹ c)

(b) Automatic tactic

import VampireHammer theorem centralSquares ... := by vampire

Fig. 1. (a) A LEAN goal expressing that centralSquares imply central commutators, discharged by a single VAMPIRE-HAMMER call. Here G is a group and Commute x y means xy = yx. The explicit proof factors the commutator into three squares. (b) Invoked in LEAN, VAMPIRE-HAMMER finds a proof from the centralSquares hypothesis.

higher-order logic or, where possible, into typed first-order logic to be suitable for VAMPIRE, and (ii) the resulting proof must then be reconstructed using the symbols and assumptions introduced during the translation. Our VAMPIRE-HAMMER therefore combines the LEAN-AUTO translation framework [12] with proof reconstruction in LEAN, and extends VAMPIRE with annotated TSTP proof output, providing sufficient information for efficient reconstruction 1^{1}. Together, these components provide a complete pipeline in VAMPIRE-HAMMER (Section 2): given an input LEAN proof goal, we reconstruct proof details in VAMPIRE and handle all further proof-term generation in LEAN which can then be checked by its kernel. Our work uses the TPTP syntax [14] for problem exchange and the related TSTP format for proof output. Figure 1 illustrates the use of VAMPIRE-HAMMER as a tactic (vampire) in LEAN on a group theory theorem, showing how a nontrivial proof can be replaced by a single call to VAMPIRE-HAMMER.

We evaluated VAMPIRE-HAMMER on 196,083 Mathlib [4] theorems (Section 4). Within a timeout of 10 seconds, our experiments show that VAMPIRE-HAMMER solves 21,158 problems that no other tool in the benchmark solves within the same budget. Thanks to supported TPTP/TSTP standards, VAMPIRE-HAMMER could further be extended to support other ATPs, provided that their inference rules admit similar simple reconstruction with extra annotations. Premise-selection tools, such as lean-hammer [16], complement our work and offer possible directions for future work (Section 5).