Writing Rocq proofs
SkillAI & modelsUse when a proof needs Rocq (formerly Coq), including legacy Coq codebase maintenance and migration through the Coq to Rocq rename. Not for Lean 4: use writing-lean-proofs.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Writing Rocq proofs skill
What this skill tells your AI
The instructions your AI receives, as published by outlinedriven/odin-claude-plugin in plugins/odin-formal/skills/writing-rocq-proofs/SKILL.md and read by ahel’s review.
Contract
| Field | Bound contract |
|---|---|
| Trigger | The task is to write, review, or maintain Rocq 9.x proofs, or to migrate a legacy Coq codebase through the Coq to Rocq rename. Methodology stays with proof-driven. |
| Authority | Reversible local: writes only Rocq source files, project build files such as _CoqProject and opam files inside the target project, and scoped mechanical Rocq checks; rollback is version control. No remote mutation. |
| Side effect | Local writes to .v sources, project build files, and migration edits. No remote mutation. |
| Done | The project compiles under the pinned Rocq version, and Print Assumptions on each delivered theorem lists only the axioms the project declares. |
Inputs
- Rocq 9.2.0, the current release of a monthly cadence that started with 9.0.0 in March 2025, installed with
opam install rocq-prover.9.2.0or as the Rocq Platform bundle. Docs: rocq-prover.org. - A proof environment: VsCoq (the official VS Code extension) or Proof General for Emacs, or
rocq repl. - The
.vsources and theorem statements; for a migration, the legacy Coq project. - Build facts: source files keep the
.vextension,rocq compileemits.vofiles that are specific to the compiling Rocq version, and-Q directory dirpathmaps a directory to a logical prefix soRequireresolves.
Procedure
- Pin the toolchain and open the proof loop. Install the pinned version with
opam install rocq-prover.<version>, and prove inrocq replor an editor session with VsCoq or Proof General. Compile withrocq compile file.v; for a project, generate a Makefile withrocq makefile -f _CoqProject -o CoqMakefile, where_CoqProjectlists sources and-Q/-Rmappings. Done when: the repl or editor runs against the project's pinned version and aRequireof project code resolves. - State the skeleton before proving. Write the target theorem and every helper lemma with its body closed by
Admitted, and compile: the skeleton type-checks while eachAdmittedmarks an independent work unit. Separate subgoals with focused bullets so each stays addressable. Done when: the skeleton compiles and everyAdmittedis an identified work unit. - Fill proofs one goal at a time. Introduce the context with
intros, decompose withdestructandinduction, transform withrewriteandapply, and close with a terminal step such asexactorreflexivity. Prefer structured steps over longapplychains, and close every finished proof withQed. Done when: everyAdmittedis replaced by a proof that closes withQed. - Audit the axiom footprint. Run
Print Assumptions <theorem>on each delivered theorem: it displays the axioms, parameters, and variables the theorem depends on. AnAdmittedhelper or anAxiomdeclaration appears in that output, so the kernel report is the gate, not a text search. Done when: each delivered theorem's footprint matches the declared axioms and noAdmittedremains. - Migrate a legacy Coq project. Rename the opam dependency:
coqis replaced byrocq-core, the prover ships asrocq-prover, and ported packages takerocq-*names. RewriteFrom Coq Require Import XtoFrom Stdlib Require Import X, because theCoq.*standard-library namespace becameStdlib.*in 9.0. Compile and fix each deprecation at its site: 9.1 added the modular integer arithmetic theory with about 450 lemmas and deprecates theRtautoandrtauto.Bintreeplugins. The legacycoqc,coqtop, andcoq_makefileshims still exist in 9.x; remove calls to them as the migration lands. Done when: the project builds under the pinned Rocq 9.x withrocq-*package names,Stdlibimports, and no deprecation warning on delivered files.
Failure and recovery
Compile error: fix the source at the reported span and rebuild; do not widen scope. Stuck goal: record the goal, the hypotheses, and the tactics tried, then report them; do not close a delivered theorem with Admitted. Axiom leakage: Print Assumptions names an unexpected axiom, so trace it to its Axiom declaration or Admitted proof and remove it before delivery. A dependency has no Rocq 9 port: pin the last compatible version or port the dependent module; do not fake the import. Non-convergent proof: report the stuck goal and the evidence; do not weaken the statement.
Output
.v sources that compile under the pinned Rocq version with proofs closed by Qed, delivered theorems whose Print Assumptions footprint matches the declared axioms, and for a migration, a build on rocq-* package names with Stdlib imports and no deprecation warning on delivered files.
Signals
- GitHub stars
- 35
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
writing-rocq-proofs- Source
- github.com/outlinedriven/odin-claude-plugin