A Coq plugin that embeds the Elpi λProlog interpreter to define new commands and tactics for theorem proving.
Rocq-Elpi is a Coq plugin that embeds the Elpi λProlog interpreter, enabling users to define new commands and tactics in Elpi for extending Coq's capabilities. It solves the problem of writing complex meta-programs in Coq by providing a logic programming environment that natively handles binders and unification variables. The plugin integrates Coq's primitives and supports syntax quotations for seamless interaction between Coq and Elpi code.
Coq users and developers who need to create custom proof automation, implement domain-specific tactics, or conduct research on proof engineering and meta-programming within the Coq ecosystem.
Developers choose Rocq-Elpi for its powerful embedding of λProlog, which simplifies manipulation of Coq's abstract syntax trees with binders, and its comprehensive API that exposes Coq's internals, enabling advanced extensions not easily achievable with native Coq or Ltac.
Rocq plugin embedding Elpi
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates the Elpi interpreter directly into Coq, enabling logic programming over Coq's abstract syntax for advanced meta-programming, as highlighted in the project description.
Uses Higher-Order Abstract Syntax to represent Coq terms, simplifying manipulation of binders and variables without manual scoping, a core feature for meta-programming.
Exposes Coq primitives for environment access, constant definition, and type class management via APIs documented in coq-builtin.elpi, enabling deep integration.
Supports quotations and anti-quotations for Coq syntax within Elpi code, improving readability by allowing mixed notation like `{{ nat -> lp:X }}`.
The README explicitly lists unsupported features like mutual inductive types, cofixpoints, and primitive arrays, limiting its use for full Coq developments.
Editor support is uneven; for example, Proof General does not handle quotations correctly, requiring workarounds or alternative editors like VSRocq.
Requires familiarity with both Elpi (λProlog) and Coq's internals, plus understanding phase separation (synterp vs interp), making it inaccessible for casual users.