Home

Awesome

Overview

The Coq proof assistant provides a formal language to write mathematical definitions, executable algorithms, and theorems, together with an environment for semi-interactive development of machine-checked proofs.

The Coq Platform is a distribution of Coq together with a selection of libraries and plugins. The main goal of the Coq Platform is to provide a distribution for developing and teaching with Coq that is:

See the Charter for more on the Platform concept, and CEP 52 for more on how the Platform is related to the Coq release cycle.

The Coq Platform is based on the OCaml package manager opam and provides a set of scripts to compile and/or install opam, Coq and the platform contents on macOS, Windows and many Linux distributions in a reliable way with consistent results. In addition pre-compiled binary packages or installers are provided for macOS and Windows (Docker is in preparation). Note that snap for Linux is no longer supported (the maintenance effort was too high).

The Coq Platform supports installing several versions of Coq - also in parallel, e.g., for porting developments from one version of Coq to another. For the previous release version of Coq, Coq Platform provides extended and updated package picks which are as much as possible compatible to the pick of the latest release version of Coq. For this reason for some Coq versions several different package picks are provided.

The table below contains links to the README files for the supported versions of Coq and libraries. Each README file contains a list of included packages with detailed information for each package.

If you have questions on the Coq Platform, please contact us on zulip chat Coq-Platform & users

Installation

The Coq platform is the recommended way to install Coq for both beginners and experts. Beginners are encouraged to use one of the binary installers. Experienced users are advised to run the scripts provided by the Coq platform to install from sources as this will allow them to install additional packages with opam. Please refer to the ReadMe file for your operating system, which contains information on both methods respectively.

Additional information

<details><summary><font size="+1">Licenses</font></summary>

The Coq Platform setup scripts and the selection of package recipes and patches are licensed Creative Commons CC0. This license does not apply to the packages installed by the Coq Platform. The README files linked above provide license information for each package. This information is also available as .CSV files here doc. Please note that the license information is obtained from opam. The Coq Platform team does no double check this information.

</details> <details><summary><font size="+1">Release notes / changelog</font></summary>

Changes in 2024.10.0

Changes in 2023.11.0

ATTENTION:

Please see the Pick Readme 8.18~2023.11 and Pick Readme 8.18~mc2 for details on the package list.

Changes in 2023.03.0

Please see the Pick Readme for details on the package list.

Changes in 2022.09.1

Please see the Pick Readme for details on the final package list.

Changes in 2022.09.0

Please see the Pick Readme for details on new and updated packages.

Note on coq-quickchick: QuickChick requires an OCaml compiler to run. The binary installers for Coq Platform do not provide OCaml, so QuickChick does not work with the binary installers for macOS, Windows and Snap. It is recommended to use the "compile from sources" method if you want to use QuickChick. An alternative method is to install OCaml by other means and have it in the PATH, but this method is not supported by the Coq Platform team. We plan to add an OCaml compiler to the binary installers in the next release.

Note on coq-serapi: Installed versions (not compiled from sources versions) of serapi tools might require a --coqlib=$(coqc -where) or equivalent option to run.

Changes in 2022.04.0 / 2022.04.1

Please see the Pick Readme for details on new and updated packages.

Note on macOS: CoqIDE was previously wrapped in a shell script to set the environment, which had the effect that it could not access the documents folder. This script has been replaced with a simple C program, so this should work now.

Note on coq-flocq: there is a new version 4.0 for coq-flocq which is not compatible with the previous 3.X versions. Since some packages are not yet compatible with Flocq 4.0, notably coq-compcert, the 2022.04 picks contain both, coq-flocq.4.0.0 and coq-flocq.3.4.3. Since one cannot install two version of one package, a new package called coq-flocq3 has been added which uses Flocq3 rather than Flocq as logical path. This way Flocq 3.X can be selected by using Flocq3 in the Require commands and Flocq 4.X can be selected by using Flocq in the Require commands. The package coq-compcert has been patched to require Flocq3. For convenience the proof automation packages used for float proofs, coq-gappa and coq-interval are also available in a Flocq 3.X and Flocq 4.X variant. The Flocq 4.X variants have the usual logical path, the 3.X variants use the logical paths IntervalFlocq3 and GappaFlocq3.

Note on coq-quickchick: QuickChick requires an OCaml compiler to run. The binary installers for Coq Platform do not provide OCaml, so QuickChick does not work with the binary installers for macOS, Windows and Snap. It is recommended to use the "compile from sources" method if you want to use QuickChick. An alternative method is to install OCaml by other means and have it in the PATH, but this method is not supported by the Coq Platform team. We plan to add an OCaml compiler to the binary installers in the next release.

Changes in 2022.01.0

Changes in 2021.09.0

Changes in 2021.02.2

Changes in 2021.02.1

</details> <details><summary><font size="+1">Maintaining an installation</font></summary>

It is not recommended to opam upgrade a Coq Platform opam switch, although this is possible. The Coq Platform script does not pin any packages - not even Coq. It just requests to install a specific version, so opam upgrade might change a lot of packages and you end up with something which is no longer an "official" Coq Platform.

Instead it is recommended to wait for the next release of Coq Platform and install it, which will create a new opam switch - or if you use a binary installer on macOS or Windows, you can choose a different installation folder. This also has the advantage that you still have the Coq Platform version you have been working with so far available, which is useful in case you need to port some proofs from the older to the new version - which might happen. You can remove the opam switch or uninstall an installed Coq Platform as soon as you no longer need it.

In general the Coq Platform team recommends to use the concept of opam switches generously. If you want to do experiments, create a new switch following the instructions for creating Coq Platform package pick variants below. You can easily switch between opam switches and do tests. Also if you follow the package pick variants approach, you can easily share your setup with other people just by sharing the Coq Platform package pick file you created. A Coq Platform switch requires between 1 and 3 GByte of disk space. The current Coq 8.13.2 distribution requires 2.3 GByte on macOS.

</details> <details><summary><font size="+1">Features of the Coq Platform</font></summary> </details> <details><summary><font size="+1">Using different Coq versions in parallel</font></summary>

Especially for porting projects from an older to a newer version of Coq, Coq Platform supports to install several Coq versions in parallel. You can also use a Coq version from a previous version of Coq Platform in parallel with a Coq version from a newer version of Coq Platform. Each Coq version you install via the Coq Platform scripts will create a separate opam switch.

You can list the available switches with:

~$ opam switch
#  switch                        compiler                                              description
   CP.2024.10.0~8.12             ocaml-base-compiler.4.10.2                            Coq 8.12.2 (released Dec 2020) with the first package pick from Dec 2020
   CP.2024.10.0~8.13~2021.02     ocaml-base-compiler.4.10.2                            Coq 8.13.2 (released Apr 2021) with the first package pick from Feb 2021
   CP.2024.10.0~8.13~2021.09     ocaml-base-compiler.4.10.2                            Coq 8.13.2 (released Apr 2021) with an extended package pick from Sep 2021
   CP.2024.10.0~8.13~2022.01     ocaml-base-compiler.4.10.2                            Coq 8.13.2 (released Apr 2021) with an updated package pick from Jan 2022
   CP.2024.10.0~8.14~2022.01     ocaml-option-flambda.1,ocaml-variants.4.12.1+options  Coq 8.14.1 (released Nov 2021) with the first package pick from Jan 2022
   CP.2024.10.0~8.14~2022.04     ocaml-option-flambda.1,ocaml-variants.4.12.1+options  Coq 8.14.1 (released Nov 2021) with an updated package pick from Apr 2022
   CP.2024.10.0~8.15~2022.04     ocaml-option-flambda.1,ocaml-variants.4.13.1+options  Coq 8.15.2 (released Jun 2022) with the first package pick from Apr 2022
   CP.2024.10.0~8.15~2022.09     ocaml-option-flambda.1,ocaml-variants.4.13.1+options  Coq 8.15.2 (released Jun 2022) with an updated package pick from Sep 2022
   CP.2024.10.0~8.16~2022.09     ocaml-option-flambda.1,ocaml-variants.4.13.1+options  Coq 8.16.1 (released Nov 2022) with the first package pick from Sep 2022
   CP.2024.10.0~8.16~2023.08     ocaml-option-flambda.1,ocaml-variants.4.14.1+options  Coq 8.16.1 (released Nov 2022) with an updated package pick from from Aug 2023
   CP.2024.10.0~8.17~2023.08     ocaml-option-flambda.1,ocaml-variants.4.14.1+options  Coq 8.17.1 (released Jun 2023) with the first package pick from Aug 2023
   CP.2024.10.0~8.18~2023.11     ocaml-option-flambda.1,ocaml-variants.4.14.1+options  Coq 8.18.0 (released Sep 2023) with the first package pick from Nov 2023
   CP.2024.10.0~8.18~mc2         ocaml-option-flambda.1,ocaml-variants.4.14.1+options  Coq 8.18.0 (released Sep 2023) with a package pick based on mathcomp 2.1
ā†’  CP.2024.10.0~8.19~2024.10     ocaml-option-flambda.1,ocaml-variants.4.14.2+options  Coq 8.19.2 (released Jun 2024) with the first package pick from Oct 2024
   CP.2024.10.0~dev              ocaml-option-flambda.1,ocaml-variants.4.13.1+options  Coq dev (latest master of all packages)

You can select the opam switch for all shells with e.g.:

~$ opam switch CP.2024.10.0~8.19~2024.10

You can select the opam switch for just the current shell with e.g.:

eval $(opam config env --set-switch --switch CP.2024.10.0~8.19~2024.10)

So you can easily open two separate shell windows, select different opam switches and start e.g. two CoqIDE instances to step through the same file with two different versions of Coq.

</details> <details><summary><font size="+1">Installation of additional packages or package variants</font></summary>

CompCert and VST variants

For some packages, notably CompCert and VST (the Princeton tool-chain for verification of C code), exist various variants.

By default the 64 bit variant of CompCert and the 64 bit variant of VST are installed.

You can install the 32 bit variants in addition any time later by issuing opam install commands, e.g.

opam install coq-compcert-32.3.9
opam install coq-vst-32.2.8

Please note that since both variants can be installed in parallel, only one, the 64 bit variant, is immediately available to Coq without -Q and -R options. If you want to work with the 32 bit variants, please use these options in your Coq project:

-Q $(coqc -where)/../coq-variant/compcert32/compcert compcert
-Q $(coqc -where)/../coq-variant/VST32/VST VST

Important note: CompCert is not free / open source software, but may be used for research and evaluation purposes. Please clarify the license at CompCert License.

Installation of additional packages

ā†’ CP.2024.10.08.192024.10 ocaml-option-flambda.1,ocaml-variants.4.14.2+options Coq 8.19.2 (released Jun 2024) with the first package pick from Oct 2024 CP.2024.10.0~dev ocaml-option-flambda.1,ocaml-variants.4.13.1+options Coq dev (latest master of all packages)

- Choose the switch you want to change with this command (example):
 ```
 opam switch CP.2024.10.0~8.19~2024.10
 eval $(opam env)
 ```
- You can find packages with `opam list --all | grep "some keyword"`.
- You can show the description and further details on a package with `opam show "package"`.
- Install additional packages with `opam install "package"`.
- You can find some additional information on managing Coq installation with opam at [Install Coq with opam](https://coq.inria.fr/opam-using.html).

</details>

<details><summary><font size="+1">Creating package pick variants and customized installers</font></summary>

It is an intended use case of the Coq Platform to create custom variants, e.g.
for projects or lectures, by creating additional files in the [package_picks](package_picks)
folder.

For details, especially on creating custom installers for macOS and Windows see [Customized Installers](doc/FAQ-customized-installers.md).