← All papers

A metaprogramming framework for formal verification

Gabriel Ebner, Sebastian Ullrich, Jared Roesch, Jeremy Avigad, Leonardo de Moura

cs.LO Sep 1, 2017 · v1
Introduces Lean's tactic framework enabling user-defined proof automation in Lean itself.
This paper describes the metaprogramming framework of the Lean theorem prover, which allows users to write custom proof automation, decision procedures, and tactics in the same language used for formal verification. The framework provides a monadic interface to the elaborator and type-checker, enabling reflective tactics and program transformations within a single unified environment.

Users of theorem provers need to write custom proof automation, decision procedures, and tactics, but doing so in a separate metalanguage creates friction and limits expressiveness.

The paper describes the metaprogramming framework of the Lean theorem prover, which provides a monadic interface to the elaborator and type-checker. Users write custom tactics and program transformations in the same language used for formal verification, enabling reflective tactics within a single unified environment.

The framework enables users to implement custom proof automation and decision procedures directly in Lean, supporting reflective tactics and program transformations without leaving the verification language.