Rocq in Teaching & Research

With its deep mathematical roots, Rocq has always had strong ties to academia. It is taught in universities around the world, and has accrued an ever growing body of research.

Top Universities Teach Rocq

Cornell University

Cornell University is a private, statutory, Ivy League and land-grant research university in Ithaca, New York.

Formal Verification

Lecture Notes

Video Recordings

Aarhus University

Aarhus University is a public research university with its main campus located in Aarhus, Denmark. It is the second largest and second oldest university in Denmark.

Formal Software Verification

EPFL

The École Polytechnique Fédérale de Lausanne (EPFL) is a public research university in Lausanne, Switzerland. Founded in 1969 with the mission to "train talented engineers in Switzerland", it is inspired by the École Centrale Paris.

Interactive theorem proving

Université Paris Cité

Université Paris Cité is a multidisciplinary research university in Paris, France, known for its strong emphasis on innovation, international collaboration, and a broad range of academic programs across sciences, humanities, and social sciences.

Proof assistants

UPenn

The University of Pennsylvania (commonly known as Penn or UPenn) is a private Ivy League research university in Philadelphia, Pennsylvania, United States.

Software Foundations

Many more academic institutions teach Rocq!

Research Papers

Understand the theoretical foundations of the Rocq Prover and its Platform packages

Correct and Complete Type Checking and Certified Erasure for Coq, in Coq

Coq is built around a well-delimited kernel that performs type checking for definitions in a variant of the Calculus of Inductive Constructions (CIC). Although the metatheory of CIC is very stable and reliable, the correctness of its implementation in Coq is less clear. Indeed, implementing an efficient type checker for CIC is a rather complex task, and many parts of the code rely on implicit invariants which can easily be broken by further evolution of the code. Therefore, on average, one critical bug has been found every year in Coq. This paper presents the first implementation of a type checker for the kernel of Coq (without the module system, template polymorphism and η-conversion), which is proven sound and complete in Coq with respect to its formal specification. Note that because of Gödel’s second incompleteness theorem, there is no hope to prove completely the soundness of the specification of Coq inside Coq (in particular strong normalization), but it is possible to prove the correctness and completeness of the implementation assuming soundness of the specification, thus moving from a trusted code base (TCB) to a trusted theory base (TTB) paradigm. Our work is based on the MetaCoq project which provides meta-programming facilities to work with terms and declarations at the level of the kernel. We verify a relatively efficient type checker based on the specification of the typing relation of the Polymorphic, Cumulative Calculus of Inductive Constructions (PCUIC) at the basis of Coq. It is worth mentioning that during the verification process, we have found a source of incompleteness in Coq’s official type checker, which has then been fixed in Coq 8.14 thanks to our work. In addition to the kernel implementation, another essential feature of Coq is the so-called extraction mechanism: the production of executable code in functional languages from Coq definitions. We present a verified version of this subtle type and proof erasure step, therefore enabling the verified extraction of a safe type checker for Coq in the future.

Matthieu Sozeau, Yannick Forster, Meven Lennon-Bertrand, Jakob Botsch Nielsen, Nicolas Tabareau, Théo Winterhalter

JACM
type-checker

The Coq Proof Assistant Version 8.20.0

Coq version 8.20 adds a new rewrite rule mechanism along with a few new features, a host of improvements to the virtual machine, the notation system, Ltac2 and the standard library.

Yves Bertot, Frédéric Besson, Ana Borges, Ali Caglayan, Tej Chajed, Cyril Cohen, Pierre Corbineau, Pierre Courtieu, Andres Erbsen, Jim Fehrle, Julien Forest, Emilio Jesús Gallego Arias, Gaëtan Gilbert, Georges Gonthier, Benjamin Grégoire, Jason Gross, Hugo Herbelin, Vincent Laporte, Olivier Laurent, Assia Mahboubi, Kenji Maillard, Erik Martin-Dorel, Guillaume Melquiond, Pierre-Marie Pédrot, Clément Pit-Claudel, Pierre Roux, Kazuhiko Sakaguchi, Vincent Semeria, Michael Soegtrop, Matthieu Sozeau, Arnaud Spiwack, Nicolas Tabareau, Enrico Tassi, Laurent Théry, Anton Trunov, Xia Li-yao, Théo Zimmermann

Release

Trocq: Proof Transfer for Free, With or Without Univalence

In interactive theorem proving, a range of different representations may be available for a single mathematical concept, and some proofs may rely on several representations. Without automated support such as proof transfer, theorems available with different representations cannot be combined, without light to major manual input from the user. Tools with such a purpose exist, but in proof assistants based on dependent type theory, it still requires human effort to prove transfer, whereas it is obvious and often left implicit on paper. This paper presents Trocq, a new proof transfer framework, based on a generalization of the univalent parametricity translation, thanks to a new formulation of type equivalence. This translation takes care to avoid dependency on the axiom of univalence for transfers in a delimited class of statements, and may be used with relations that are not necessarily isomorphisms. We motivate and apply our framework on a set of examples designed to show that it unifies several existing proof transfer tools. The article also discusses an implementation of this translation for the Coq proof assistant, in the Coq-Elpi metalanguage.

Cyril Cohen, Enzo Crance, Assia Mahboubi

ESOP
Proof Transfer

Recommended Books

RECOMMENDED BOOK

Software Foundations: Separation Logic Foundations (Volume 6)

Intermediate

Separation Logic Foundations is an in-depth introduction to separation logic—a practical approach to modular verification of imperative programs—and how to build program verification tools on top of it.

RECOMMENDED BOOK

Software Foundations: Verified Functional Algorithms (Volume 3)

Intermediate

Verified Functional Algorithms shows how a variety of fundamental data structures can be specified and mechanically verified.

View all books (12)

Industry

Curious about How Rocq is Used in Industry?

Go to our success stories to see how businesses use Rocq.