Written and maintained by CASRAI Editorial Board
Published
On this page
The Coq proof assistant is now called the Rocq Prover: it is an interactive tool in which you state a mathematical theorem or a program specification in a formal language and then build a proof that a small trusted checker, the kernel, verifies. Researchers use it to machine-check proofs and to extract certified programs. This guide covers what it does, how to install it, a first proof written step by step, how to read its output, and the free alternatives.
What Coq proof assistant (now Rocq Prover) is used for in research
According to the project’s own about page, Rocq is the new name of the Coq Proof Assistant. The name “honors Inria Rocquencourt, the original site where the prover was developed”, and it alludes to the Roc bird; the project’s Core team chose it after a user poll. Anything published before the rename, including papers, theses and library documentation, uses the name Coq, and both names refer to the same system.
Rocq implements a program specification and mathematical language called Gallina, whose logical basis is a polymorphic, cumulative calculus of inductive constructions. In practice that means one language serves for definitions, statements and proofs. The system is written in OCaml and distributed under the GNU Lesser General Public Licence version 2.1. Its development began in 1984 at INRIA Rocquencourt with Coquand and Huet, and the project page says the logic was extended to the calculus of inductive constructions in 1991 by Paulin.
Two research uses
- Machine-checked mathematics. You state a theorem, construct a proof with commands called tactics, and the kernel checks the finished proof term. The about page describes this as letting users “machine-check these proofs by a relatively small certification kernel”.
- Certified programs. Rocq can extract certified programs to OCaml, Haskell or Scheme, so a program proved correct against its specification can be turned into runnable code.
The project records two recognitions for the system under its former name: the 2013 ACM Software System Award and the 2013 ACM SIGPLAN Programming Languages Software Award, and the 2022 Open Science Free Software Award in France’s Scientific and Technical category. For the wider discipline see the CASRAI guides on formal verification and formal methods.
Coq and Rocq: a naming map for citing and searching
| You are looking at | Name used | What to do |
|---|---|---|
| A paper, thesis or tutorial from before the rename | Coq | Search both names; the system is the same project. |
| The reference manual, version 9.0 | Rocq (docs.rocq-prover.org, rocq-prover.org) | Use it for current command names, such as rocq compile for batch compilation. |
| An older manual version, for example 8.9 | Hosted under both coq.inria.fr and docs.rocq-prover.org | Match the manual version to the version you actually run. |
How to install or access Coq proof assistant (Rocq Prover)
Install Rocq from the official install page at rocq-prover.org/install. The route depends on your operating system, and the page recommends the Rocq Platform binary installer for beginners on Windows and macOS. The page links the Platform 2026.07.0 release page for those installers.
| Operating system | Routes the official install page lists |
|---|---|
| Windows | Rocq Platform binary installer; or WSL or a Linux virtual machine |
| macOS | Rocq Platform binary installer; Homebrew (the page notes it lacks some external packages) |
| Linux | No Platform binary installer; Platform scripts that compile from source with opam; opam; Nix; the distribution package manager (can be outdated, check Repology); the Docker image rocq/rocq-prover on Docker Hub |
Choose an editor
The install page names VsRocq for Visual Studio Code. The language server comes through opam or the Platform (Platform 2025.01 or later), and the extension and the language server must be the same version. Check the install page for the current release before you start, because version numbers change.
How to prove a first theorem in Coq (Rocq) step by step
The worked example is the first proof from “Basics: Functional Programming in Rocq”, the opening chapter of Software Foundations Volume 1 (Logical Foundations), which states that zero plus any natural number is that number.
- Create a file with the extension .v and open it in your editor. In an interactive editor each command you send is executed and the proof state updates.
- State the theorem:
Theorem plus_O_n : ∀ n : nat, 0 + n = n.Entering a command such as Theorem puts Rocq into proof mode. - Start with
Proof.(the reference manual calls this a no-op marker and discourages relying on it, but the textbook uses it). - Introduce the variable with
intros n.The goal now has n in its local context. - Simplify with
simpl. - Close the goal with
reflexivity. - Finish with
Qed.The term built so far is sent to the kernel, which checks that it is well typed and that its type matches the statement. If the check passes, the theorem is added as an opaque constant.
The book compiles its Basics file in batch mode with rocq compile -Q . LF Basics.v. You can also test terms interactively: Check true : bool., Check negb : bool → bool. and Check S : nat → nat. display types, and Compute (next_working_day friday). evaluates an expression (in the book it returns monday).
How to read the output of Coq (Rocq)
The proof state shows goals. Each goal has a conclusion below a horizontal line and a local context above it. Only the first goal’s context is shown. For the example above, after intros n. the context holds n as a natural number and the conclusion is 0 + n = n. When you close the last goal, the state is empty and you can enter Qed.
Two facts about the interface matter. Tactics only work in proof mode, and interactive interfaces display the proof state while batch mode (rocq compile) does not. To inspect an unfinished proof term use Show Proof.; Check shows the type of a term.
How a proof ends: what each command means for trust
How you end a proof determines how much a reader can rely on it. The data table below, compiled from the Rocq 9.0 reference manual page on proof mode, compares the commands. The practical consequence for a research paper: a development that closes proofs with Qed is checked by the kernel, whereas a development that uses Admitted contains a declared axiom, so you should list any Admitted statements when you report what was verified.
Reporting a Rocq result in a paper
The sources support four things worth stating alongside a verified result. State the system and its version, using both names if you cite older work. State whether every theorem is closed with Qed. List any statement closed with Admitted, since the manual says Admitted gives up the proof and declares the initial goal as an axiom. State what is trusted: the kernel and the statements themselves. A proof that the kernel accepts shows that the statement holds; it does not show that the statement says what you meant, so the specification deserves the same review as any other definition.
Because Rocq is distributed under an open licence and the kernel is small, a reader can rerun the check. Provide the .v files and the exact install route from the table above so that others can reproduce it.
Troubleshooting Coq (Rocq)
“No focused proof (No proof-editing in progress)”
This is the message the manual gives when a proof-ending command such as Qed is used outside proof mode. Check that a Theorem or similar command was accepted before the tactics, and that you did not already end the proof.
The proof state does not appear
Batch compilation with rocq compile does not display proof state. Run the file in an interactive interface such as VsRocq to see goals.
The editor extension misbehaves
The install page requires the VsRocq extension and the language server to have identical versions. Reinstall one of them to match the other.
Old code or an old package on Linux
Distribution packages can be outdated; the install page suggests checking Repology, or using opam, Nix or the Docker image for a current version. Match the manual version (for example 9.0) to your installed version, since command names changed with the rename.
Free alternatives to Coq (Rocq Prover)
Rocq itself is open source. Other proof assistants are also free. The table states only what each project’s own site says. For background on how CASRAI treats software for formal work, see the research tools hub.
| Tool | What its own site says |
|---|---|
| Lean | “An open-source programming language and proof assistant”; a functional language that compiles to native code; Mathlib is described as a mathematical library of over a million lines of formalized mathematics (lean-lang.org). |
| Isabelle | A “generic proof assistant” with tools for proving formulas in a logical calculus; distributed for free under open-source licences; front ends Isabelle/jEdit and Isabelle/VSCode; the Archive of Formal Proofs collects examples (isabelle.in.tum.de). |
| Rocq Prover (this guide) | Gallina language; written in OCaml; LGPL 2.1; extraction to OCaml, Haskell and Scheme (rocq-prover.org). |
Sources
- About the Rocq Prover, read 2026-11-17.
- Install the Rocq Prover, read 2026-11-17.
- Rocq reference manual 9.0: proof mode, read 2026-11-17.
- Software Foundations, Volume 1: Basics, read 2026-11-17.
- Lean and Isabelle, read 2026-11-17.
Data: Rocq proof-ending commands and what each means for the result
Compares the commands that end or abandon a proof in Rocq proof mode, as defined in the Rocq 9.0 reference manual page on proof mode. Compiled by reading the manual and recording each command's stated effect.
Period covered: Rocq 9.0.
| Command | Effect stated in the manual | Resulting constant |
|---|---|---|
| Qed | Sends the proof term to the kernel, which checks it is well typed and that its type matches the statement | Opaque constant |
| Defined | Ends the proof like Qed but adds a transparent constant | Transparent constant |
| Save | Ends the proof and gives it a name | Named constant |
| Admitted | Gives up the proof and declares the initial goal as an axiom | Axiom |
| Abort | Aborts the proof | None |
Sources
- Rocq reference manual 9.0: proof mode (accessed 2026-11-17)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







