winget install --id=Coq.CoqPlatform -e
The Coq platform is a distribution of the Coq proof assistant together with a selection of Coq libraries. It provides a set of scripts to compile and install OPAM, Coq, Coq libraries and Coq plugins on MacOS, Windows and many Linux distributions in a reliable way with consistent results.
We are currently preparing a release, which has the effect that some links already refer to the new tag, even though this does not exist as yet.
In case you experience dead links, please replace 2023.11.0
with 2023.03.0
.
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, Windows and snap for Linux (Docker is in preparation).
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
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.
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.
<cygroot>/opam
instead of <cygroot>/home/<user>/.opam
<cygroot>/platform
instead of <cygroot>/home/<user>/platform
C:\bin\cygwin_coq_platform
or C:\bin\cygw32_coq_platform
ATTENTION:
Please see the Pick Readme 8.18~2023.11 and Pick Readme 8.18~mc2 for details on the package list.
Please see the Pick Readme for details on the package list.
Please see the Pick Readme for details on the final package list.
coq-shell.command
file one can copy e.g. to the desktop - see macOS for detailscoq-shell.bat
file is installed and added to the start menu - see Windowscoq-env.sh
file on macOS and Linux/Snap to be used with eval
- see macOS and Linux for detailscoq-itauto.8.16.0
to the "full" levelcoq-mathcomp-algebra-tactics
from "extended" to "full" level after update to 1.0.0
coq-mathcomp-word.1.1
to the "full" levelcoq-metacoq.1.1+8.16
to the "extended" levelcoq-fiat-crypto.0.0.15
to the "extended" levelcoq-bedrock2.0.0.3
to the "extended" levelcoq-bedrock2-compiler.0.0.3
to the "extended" levelcoq-rupicola.0.0.5
to the "extended" levelcoq-coqutil.0.0.2
to the "extended" levelcoq-rewriter.0.0.6
to the "extended" levelcoq-riscv.0.0.2
to the "extended" levelPlease 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.
coq-ott
and ott
to the "full" levelcoq-relation-algebra
to the "full" levelcoq-mathcomp-algebra-tactics
to the "extended" levelcoq-extructures
to the "extended" levelPlease 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.
coq-hammer
(not on Windows) including the provers z3
and eprover
coq-coqprime-generator
including gmp-ecm
coq-hott
The Homotopy Type Theory libraryIt 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.
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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.0~8.18~2023.11
You can select the opam switch for just the current shell with e.g.:
eval $(opam config env --set-switch --switch CP.2023.11.0~8.18~2023.11)
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.
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.
C:\<your_coq_platform_cygwin_path>\cygwin.bat
.opam switch
which will show the list of available switches:
~$ opam switch
# switch compiler description
CP.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.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.2023.11.0~dev ocaml-option-flambda.1,ocaml-variants.4.12.1+options Coq dev (latest master of all packages) ```
opam switch CP.2023.11.0~8.18~2023.11
eval $(opam env)
opam list --all | grep "some keyword"
.opam show "package"
.opam install "package"
.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 folder.
For details, especially on creating custom installers for macOS, Linux/Snap and Windows see Customized Installers.