Trocq
A modular parametricity plugin for proof transfer in Coq [maintainers=@CohenCyril,@ecranceMERCE,@amahboubi,@lweqx,@MysaaJava]
Install / Use
/learn @rocq-community/TrocqREADME
Trocq
Trocq is a modular parametricity plugin for Coq. It can be used to achieve proof transfer by both translating a user goal into another, related, variant, and computing a proof that proves the corresponding implication.
The plugin features a hierarchy of structures on relations, whose instances are computed from registered user-defined proof via parametricity. This hierarchy ranges from structure-less relations to an original formulation of type equivalence. The resulting framework generalizes raw parametricity, univalent parametricity and CoqEAL, and includes them in a unified framework.
The plugin computes a parametricity translation "à la carte", by performing a fine-grained analysis of the requires properties for a given proof of relatedness. In particular, it is able to prove implications without resorting to full-blown type equivalence, allowing this way to perform proof transfer without necessarily pulling in the univalence axiom.
The plugin is implemented in Coq-Elpi and the code of the parametricity translation is fairly close to a pen-and-paper sequent-style presentation.
Meta
- Author(s):
- Samy Avrillon
- Cyril Cohen (initial)
- Enzo Crance (initial)
- Lucie Lahaye
- Assia Mahboubi (initial)
- Rocq-community maintainer(s):
- Samy Avrillon (@MysaaJava)
- Cyril Cohen (@CohenCyril)
- Enzo Crance (@ecranceMERCE)
- Lucie Lahaye (@lweqx)
- Assia Mahboubi (@amahboubi)
- License: GNU Lesser General Public License v3.0
- Compatible Rocq/Coq versions: 9.0 and 9.1
- Additional dependencies:
- Rocq/Coq namespace:
Trocq - Related publication(s):
Building and installation instructions
Trocq is still a prototype. It is not yet packaged in Opam or Nix.
There are however three ways to experiment with it, all documented in the INSTALL.md file.
Documentation
See the tutorial for concrete use cases.
In short, the plugin provides a tactic:
trocq(without arguments) which attempts to run a translation on a given goal, using the information provided by the user with the commands described below.trocq R1 R2 ...which works similarly to its argumentless counterpart except that it also uses translations associated to the relationsR1,R2... ; see below regarding how to associated translations to a relation.
And four commands:
Trocq Use tto use a translationtduring the subsequent calls to the tactictrocq.Trocq Register Univalence uto declare a univalence axiomu.Trocq Register Funext feto declare a function extensionality axiomfe.Trocq RelatedWith R t1 t2 ...to associatet1,t2, ... toR. Subsequent calls totrocq Rwill be able to use the translationst1,t2, ...Trocq Logging "off"|"info"|"debug"|"trace"to set the verbosity level.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
