coq-community/coq-ext-lib

A library of Coq definitions, theorems, and tactics. [maintainers=@gmalecha,@liyishuai]

135

stars

246

commits

Rocq Prover

primary language

Apr 28, 2026

updated

coq-community.org/coq-ext-lib/
coq
coq-ci
coq-platform
library
programming
Browse cluster: Rocq Proof Assistant & Type Theory

README

coq-ext-lib

Docker CI Contributing Code of Conduct Zulip coqdoc

A collection of theories and plugins that may be useful in other Coq developments.

Meta

  • Author(s):
    • Gregory Malecha (initial)
  • Rocq-community maintainer(s):
  • License: BSD 2-Clause "Simplified" License
  • Compatible Rocq/Coq versions: Coq 8.11 or later or 8.9
  • Additional dependencies: none
  • Rocq/Coq namespace: ExtLib
  • Related publication(s): none

Building and installation instructions

The easiest way to install the latest released version of coq-ext-lib is via OPAM:

opam repo add rocq-released https://rocq-prover.org/opam/released
opam install coq-ext-lib

To instead build and install manually, you need to make sure that all the libraries this development depends on are installed. The easiest way to do that is still to rely on opam:

git clone --recurse-submodules https://github.com/coq-community/coq-ext-lib.git
cd coq-ext-lib
opam repo add rocq-released https://rocq-prover.org/opam/released
opam install --deps-only .
make theories  # or make -j <number-of-cores-on-your-machine> theories
make install

Ideas

  • Embrace new features, e.g. universe polymorphism, primitive projections, etc.
  • Use modules for controlling namespaces.
  • Use first-class abstractions where appropriate, e.g. type classes, canonical structures, etc.
    • The library is mostly built around type clases
  • Notations should be hidden by modules that are explicitly opened.
    • This avoids clashes between precedence.
    • TB: Actually, this does not completely avoid clashes, if we have to open two modules at the same time (for instance, I often need to open Equality, to get dependent destruction, which conflicts with the rest of my development)
    • TB: I like the idea of having to prefix operations by the name of the module (e.g., DList.fold, DList.map, DList.T), and yet to benefit from the support of notations, without opening this module. I implement that by having a module DList that contains the operations, inside the file DList. The notations live in the file DList, and I do Require Import DList everywhere...
  • Avoid the use of the 'core' hint database.
  • Avoid the use of dependent functions, e.g. dependendent decidable equality, in favor of their boolen counter-parts. Use type-classes to expose the proofs.

File Structure

  • theories/
    • Base directory to the provided theories

Contributors

(top 30 of 31)

gmalecha

60 commits

liyishuai

54 commits

davdar

24 commits

Lysxia

14 commits

coq-community/coq-ext-lib

A library of Coq definitions, theorems, and tactics. [maintainers=@gmalecha,@liyishuai]

135

stars

246

commits

Rocq Prover

primary language

Apr 28, 2026

updated

coq-community.org/coq-ext-lib/
coq
coq-ci
coq-platform
library
programming
Browse cluster: Rocq Proof Assistant & Type Theory

README

coq-ext-lib

Docker CI Contributing Code of Conduct Zulip coqdoc

A collection of theories and plugins that may be useful in other Coq developments.

Meta

  • Author(s):
    • Gregory Malecha (initial)
  • Rocq-community maintainer(s):
  • License: BSD 2-Clause "Simplified" License
  • Compatible Rocq/Coq versions: Coq 8.11 or later or 8.9
  • Additional dependencies: none
  • Rocq/Coq namespace: ExtLib
  • Related publication(s): none

Building and installation instructions

The easiest way to install the latest released version of coq-ext-lib is via OPAM:

opam repo add rocq-released https://rocq-prover.org/opam/released
opam install coq-ext-lib

To instead build and install manually, you need to make sure that all the libraries this development depends on are installed. The easiest way to do that is still to rely on opam:

git clone --recurse-submodules https://github.com/coq-community/coq-ext-lib.git
cd coq-ext-lib
opam repo add rocq-released https://rocq-prover.org/opam/released
opam install --deps-only .
make theories  # or make -j <number-of-cores-on-your-machine> theories
make install

Ideas

  • Embrace new features, e.g. universe polymorphism, primitive projections, etc.
  • Use modules for controlling namespaces.
  • Use first-class abstractions where appropriate, e.g. type classes, canonical structures, etc.
    • The library is mostly built around type clases
  • Notations should be hidden by modules that are explicitly opened.
    • This avoids clashes between precedence.
    • TB: Actually, this does not completely avoid clashes, if we have to open two modules at the same time (for instance, I often need to open Equality, to get dependent destruction, which conflicts with the rest of my development)
    • TB: I like the idea of having to prefix operations by the name of the module (e.g., DList.fold, DList.map, DList.T), and yet to benefit from the support of notations, without opening this module. I implement that by having a module DList that contains the operations, inside the file DList. The notations live in the file DList, and I do Require Import DList everywhere...
  • Avoid the use of the 'core' hint database.
  • Avoid the use of dependent functions, e.g. dependendent decidable equality, in favor of their boolen counter-parts. Use type-classes to expose the proofs.

File Structure

  • theories/
    • Base directory to the provided theories

Contributors

(top 30 of 31)

gmalecha

60 commits

liyishuai

54 commits

davdar

24 commits

Lysxia

14 commits

Languages

Rocq Prover

99.4%