A Transfer Tactic for Lean

📅 2026-09-26
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the absence of cross-type generalized rewriting (transfer) tactics in Lean by introducing generalized rewriting to the system for the first time, thereby bridging a gap in its three-level rewriting hierarchy. Methodologically, we construct a family of transfer tactics based on functional relator patterns and a labeled rule base, evaluating them against the Mathlib test suite. Experimental results demonstrate that the proposed tactics successfully close 112 out of 178 porting tests, confirming their significant practical value in theorem-scarce domains. Furthermore, the evaluation reveals mixed performance characteristics and inherent limitations under specific design assumptions, offering insights for future refinement of automated proof transfer mechanisms within interactive theorem provers.
📝 Abstract
Rewriting in proof assistants spans a strict hierarchy. Equational rewriting substitutes based on extensional equality; subequational rewriting substitutes based on homogeneous relations such as $\leq$ or $\subseteq$, justified by monotonicity lemmas; and generalized rewriting relates different operations across different types, justified by transfer rules. All three are specializations of one schema, the function relator $(R \Rightarrow S)\,f\,g$. Lean 4's rw and Mathlib's grw/gcongr implement the first two levels, but the third has had no Lean implementation. We present one: a transfer tactic family over a tagged rule database, benchmarked using Mathlib's own test suites, of which 112 of 178 ported tests close through the transfer engine. An evaluation of the design's three motivating hypotheses returns a mixed result: generality holds, authoring effort wins in its amortized form (averaged per use), but on dependency footprint, transfer only ties a mature library and loses on coercions. This shows that transfer's value is concentrated on transferring into domains where few theorems exist.
Problem

Research questions and friction points this paper is trying to address.

generalized rewriting
transfer tactic
Lean 4
proof assistants
Innovation

Methods, ideas, or system contributions that make the work stand out.

Transfer Tactic
Generalized Rewriting
Lean 4
Function Relator
Proof Assistant
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.