Recent changes
Version 8.20
Summary of changes
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.
We highlight some of the most impactful changes here:
A lot of work went into reducing the size of the bytecode segment, which in turn means that .vo files might now be considerably smaller.
A new version of the docker-keeper compiler to build and maintain Docker images of Coq.
Notable breaking changes:
Syntactic global references passed through the
usingclauses ofauto-like tactics are now handled as plain references rather than interpreted terms. In particular, their typeclass arguments will not be inferred. In general, the previous behaviour can be emulated by replacingauto using foowithpose proof foo; auto.Argument order for the Ltac2 combinators
List.fold_left2andList.fold_right2changed to be the same as in OCaml.
Importing a module containing a mutable Ltac2 definition does not undo its mutations. ReplaceLtac2 mutable foo := some_expr.withLtac2 mutable foo := some_expr. Ltac2 Set foo := some_expr.to recover the previous behaviour.Some renaming in the standard library. Deprecations are provided for a smooth transition.
See the Changes in 8.20.0 section below for the detailed list of changes, including potentially breaking changes marked with Changed. Coq's reference manual for 8.20, documentation of the 8.20 standard library and developer documentation of the 8.20 ML API are also available.
Théo Zimmermann with help from Ali Caglayan and Jason Gross maintained coqbot used to run Coq's CI and other pull request management tasks.
Jason Gross maintained the bug minimizer and its automatic use through coqbot.
Erik Martin-Dorel maintained the Coq Docker images and the docker-keeper compiler used to build and keep those images up to date (note that the tool is not Coq specific). Cyril Cohen, Vincent Laporte, Pierre Roux and Théo Zimmermann maintained the Nix toolbox used by many Coq projects for continuous integration.
Ali Caglayan, Emilio Jesús Gallego Arias, Rudi Grinberg and Rodolphe Lepigre maintained the Dune build system for OCaml and Coq used to build Coq itself and many Coq projects.
The opam repository for Coq packages has been maintained by Guillaume Claret, Guillaume Melquiond, Karl Palmskog and Enrico Tassi with contributions from many users. A list of packages is available on the Coq website.
Coq 8.20 was made possible thanks to the following reviewers: Frédéric Besson, Lasse Blaauwbroek, Ali Caglayan, Cyril Cohen, Andrej Dudenhefner, Andres Erbsen, Jim Fehrle, Emilio Jesús Gallego Arias, Gaëtan Gilbert, Jason Gross, Hugo Herbelin, Ralf Jung, Jan-Oliver Kaiser, Chantal Keller, Olivier Laurent, Rodolphe Lepigre, Yishuai Li, Ralph Matthes, Guillaume Melquiond, Pierre-Marie Pédrot, Karl Palmskog, Clément Pit-Claudel, Pierre Rousselin, Pierre Roux, Michael Soegtrop, soukouki, Matthieu Sozeau, Nicolas Tabareau, Enrico Tassi, Niels van der Weide, Nickolai Zeldovich and Théo Zimmermann. See the Coq Team face book page for more details on Coq's development team.
The 59 contributors to the 8.20 version are: Timur Aminev, Frédéric Besson, Lasse Blaauwbroek, Björn Brandenburg, Ali Caglayan, Nikolaos Chatzikonstantinou, Sylvain Chiron, chluebi, Cyril Cohen, Anton Danilkin, Louise Dubois de Prisque, Andrej Dudenhefner, Maxime Dénès, Andres Erbsen, Jim Fehrle, Davide Fissore, Andreas Florath, Yannick Forster, Mario Frank, Gaëtan Gilbert, Georges Gonthier, Jason Gross, Stefan Haan, Hugo Herbelin, Lennart Jablonka, Emilio Jesús Gallego Arias, Ralf Jung, Jan-Oliver Kaiser, Evgenii Kosogorov, Rodolphe Lepigre, Yann Leray, David M. Cooke, Erik Martin-Dorel, Guillaume Melquiond, Guillaume Munch-Maccagnoni, Karl Palmskog, Julien Puydt, Pierre-Marie Pédrot, Ramkumar Ramachandra, Pierre Rousselin, Pierre Roux, Kazuhiko Sakaguchi, Bernhard Schommer, Remy Seassau, Matthieu Sozeau, Enrico Tassi, Romain Tetley, Laurent Théry, Alexey Trilis, Oliver Turner, Quentin Vermande, Li-yao Xia and Théo Zimmermann,
The Coq community at large helped improve this new version via the GitHub issue and pull request system, the coq-club@inria.fr mailing list, the Discourse forum and the Coq Zulip chat.
Version 8.20's development spanned 7 months from the release of Coq 8.19.0 (9 months since the branch for 8.19.0). Pierre Roux and Guillaume Melquiond are the release managers of Coq 8.20. This release is the result of 470 merged PRs, closing 113 issues.
Changes in 8.20.0
Kernel
Changed: The guard checker now recognizes uniform parameters of a fixpoint and treats their instances as constant over the recursive call (#17986, grants #16040, by Hugo Herbelin).
Added: A mechanism to add user-defined rewrite rules to Coq's reduction mechanisms; see chapter User-defined rewrite rules (#18038, by Yann Leray).
Added: Support for primitive strings in terms (#18973, by Rodolphe Lepigre).
Specification language, type inference
Changed: warnings
future-coercion-class-constructorandfuture-coercion-class-fieldabout:>inClassas errors by default. This offers a last opportunity to replace:>with::(available since Coq 8.18) to declare typeclass instances before making:>consistently declare coercions in all records in next version. To adapt huge codebases, you can try this script or the one below. But beware that both are incomplete.#!/bin/awk -f BEGIN { startclass = 0; inclass = 0; indefclass = 0; # definitionalclasses (single field, without { ... }) } { if ($0 ~ "[ ]*Class") { startclass = 1; } if (startclass == 1 && $0 ~ ":=") { inclass = 1; indefclass = 1; } if (startclass == 1 && $0 ~ ":=.*{") { indefclass = 0; } if (inclass == 1) startclass = 0; if (inclass == 1 && $0 ~ ":>") { if ($0 ~ "{ .*:>") { # first field on a single line sub("{ ", "{ #[global] "); } else if ($0 ~ ":=.*:>") { # definitional classes on a single line sub(":= ", ":= #[global] "); } else if ($0 ~ "^ ") { sub(" ", " #[global] "); } else { $0 = "#[global] " $0; } sub(":>", "::") } print $0; if ($0 ~ ".*}[.]" || indefclass == 1 && $0 ~ "[.]$") inclass = 0; }
(#18590, by Pierre Roux).
Changed: Mutually-proved theorems with statements in different coinductive types now supported (#18743, by Hugo Herbelin).
Added:
CoFixpointsupports attributesbypass_guard,clearbody,deprecatedandwarn(#18754, by Hugo Herbelin).Added:
Program Fixpointwithmeasureorwf(see Program Fixpoint) now supports thewhereclause for notations, thelocalandclearbodyattributes, as well as non-atomic conclusions (#18834, by Hugo Herbelin, fixes in particular #13812 and #14841).Fixed: Anomaly on the absence of remaining obligations of some name now an error (#18873, fixes #3889, by Hugo Herbelin).
Fixed: Universe polymorphic
Program's obligations are now generalized only over the universe variables that effectively occur in the obligation (#18915, fixes #11766 and #11988, by Hugo Herbelin).Fixed: Anomaly
assertion failedin pattern-matching compilation, withProgram Modeor with let-ins in the arity of an inductive type (#18921, fixes #5777 and #11030 and #11586, by Hugo Herbelin).Fixed: Support for
Program-style pattern-matching on more than one argument in an inductive family (#18929, fixes #1956 and #5777, by Hugo Herbelin).Fixed: anomaly with obligations in the binders of a
measure- orwf-basedProgram Fixpoint(#18958, fixes #18920, by Hugo Herbelin).Fixed: Incorrect registration of universe names attached to a primitive polymorphic constant (#19100, fixes #19099, by Hugo Herbelin).
Notations
Changed: an
only printinginterpretation of a notation with a specific format does no longer change the printing rule of other interpretations of the notation; to globally change the default printing rule of all interpretations of a notation, useReserved Notationinstead (#16329, fixes #16262, by Hugo Herbelin).Changed: levels of
Reserved Notationnow default to levels of previous notations with longest common prefix, if any. This helps to factorize notations with common prefixes (#19149, by Pierre Roux).Added:
closed-notation-not-level-0andpostfix-notation-not-level-1warnings about closed and postfix notations at unusual levels (#18588, by Pierre Roux).Added:
notation-incompatible-prefixwarning when two notation definitions have incompatible prefixes (#19049, by Pierre Roux).Fixed: Notations for applied constants equipped with multiple signatures of implicit arguments were not correctly inserting as many maximal implicit arguments as they should have (#18445, by Hugo Herbelin).
Fixed: Add support for printing notations applied to extra arguments in custom entries, thus eliminating an anomaly (#18447, fixes #18342, by Hugo Herbelin).
Tactics
Changed: When using
Z.to_euclidean_division_equations,niacan now relateZ.div/Z.modulotoZ.quot/Z.rema bit better, by virtue of being noticing when there are two equations of the formx = y * q₁ + _andx = y * q₂ + _(or minor variations thereof), suggesting thatq₁ = q₂. Users can replaceZ.to_euclidean_division_equationswithlet flags := Z.euclidean_division_equations_flags.default_with Z.euclidean_division_equations_flags.find_duplicate_quotients false in Z.to_euclidean_division_equations_with flagsor, usingImport Z.euclidean_division_equations_flags., withZ.to_euclidean_division_equations_with ltac:(default_with find_duplicate_quotients false)(#17934, by Jason Gross).Changed: The opacity/transparency of primitive projections is now attached to the projections themselves, not the compatibility constants, and compatibility constants are always considered transparent (#18327, fixes #18281, by Jan-Oliver Kaiser and Rodolphe Lepigre).
Changed: Tactic
intro zon an existential variable goal forces the resolution of the existential variable into a goalforall z:?T, ?P, which becomes?Pin contextz:?Tafter introduction. The existential variable?Pitself is now defined in a context where the variable of type?Tis also namedz, as specified byintroinstead ofxas it was conventionally the case before (#18395, by Hugo Herbelin).Changed: syntactic global references passed through the
usingclauses ofauto-like tactics are now handled as plain references rather than interpreted terms. In particular, their typeclass arguments will not be inferred. In general, the previous behaviour can be emulated by replacingauto using foowithpose proof foo; auto(#18909, by Pierre-Marie Pédrot).Changed: Use Coqlib's
Registermechanism for the generalized rewriting tactic and make the (C)RelationClasses/(C)Morphisms independent of therewritetactic to ease maintainance. (#19115, by Matthieu Sozeau).Removed: the
clearmodifier which was deprecated since 8.17 (#18887, by Pierre-Marie Pédrot).Removed: the
cutrewritetactic, which was deprecated since Coq 8.5 (#19027, by Pierre-Marie Pédrot).Deprecated: non-reference hints in
usingclauses ofauto-like tactics (#19006, by Pierre-Marie Pédrot).Deprecated: the
gintuitiontactic, which used to be undocumented until Coq 8.16 (#19129, by Pierre-Marie Pédrot).Added: When using
Z.to_euclidean_division_equations, you can now pose equations of the formx = y * qusingZ.divide(#17927, by Evgenii Kosogorov).Added: support for
Nat.doubleandNat.div2tozifyandlia(#18729, by Andres Erbsen).Added: the
replacetactic now accepts->and<-to specify the direction of the replacement when used with awithclause (#19060, fixes #13480, by Pierre-Marie Pédrot).Fixed: The name of a cofixpoint globally defined with a name is now systematically reused by
simplafter reduction, even when the named cofixpoint is mutually defined or defined in a section (#18576, fixes #4056, by Hugo Herbelin).Fixed: The reduction of primitive projections of cofixpoints by
simplis now implemented (#18577, fixes #7982, by Hugo Herbelin).Fixed: Support for refolding reduced global mutual fixpoints/cofixpoints with parameters in
cbn(#18601, fixes part of #4056, by Hugo Herbelin).Fixed:
cbnwas leaving behind unnamable constants when refolding mutual fixpoints/cofixpoints from aliased modules (#18616, fixes #17897, by Hugo Herbelin).Fixed:
cbvof primitive projections applied to a tuple now ignoresbetalike it does forcbn,lazyandsimpl(#18618, fixes #9086, by Hugo Herbelin).
Ltac language
Added: In
rewrite_strat,rewstrategynow supports the fixpoint operatorfix ident := rewstrategy1(#18094, fixes #13702, by Jason Gross and Gaëtan Gilbert).Fixed:
rewrite_stratnow works inside module functors (#18094, fixes #18463, by Jason Gross).
Ltac2 language
Changed: recursive
letand non mutable projections of syntactic values are considered syntactic values (#18411, by Gaëtan Gilbert).Changed: Ltac2 are typechecked at declaration time by default. This should produce better errors when a notation argument does not have the expected type (e.g. wrong branch type in
match! goal). In the previous behaviour of typechecking, only the expansion result can be recovered usingLtac2 Typed Notations. We believe there are no real use cases for this, please report if you have any (#18432, fixes #17477, by Gaëtan Gilbert).Changed: argument order for the Ltac2 combinators
List.fold_left2andList.fold_right2changed to be the same as in OCaml (#18706, by Gaëtan Gilbert).Changed:
Importing a module containing a mutable Ltac2 definition does not undo its mutations. ReplaceLtac2 mutable foo := some_expr.withLtac2 mutable foo := some_expr. Ltac2 Set foo := some_expr.to recover the previous behaviour (#18713, by Gaëtan Gilbert).Changed: the
usingclause argument ofauto-like tactics in Ltac2 now take a globalreferencerather than arbitraryconstr(#18940, by Pierre-Marie Pédrot).Deprecated:
Ltac2.Constr.Pretype.Flags.open_constr_flagswhose name is misleading as it runs typeclass inference unlikeopen_constr:()(#18765, by Gaëtan Gilbert).Added:
fstandsndinLtac2.Init(#18370, by Gaëtan Gilbert).Added:
Ltac2.Ltac1.of_pretermandto_preterm(#18551, by Gaëtan Gilbert).Added:
of_intro_patternandto_intro_patterninLtac2.Ltac1(#18558, by Gaëtan Gilbert).Added: basic APIs in
Ltac2.Ltac1to produce slightly more informative errors when failing to convert a Ltac1 value to some Ltac2 type (#18558, by Gaëtan Gilbert).Added: APIs
Ltac2.Control.unshelveandLtac2.Notations.unshelve(#18604, by Gaëtan Gilbert).Added: warning on unused Ltac2 variables (except when starting with
_) (#18641, by Gaëtan Gilbert).Added:
Ltac2.Control.numgoals(#18690, by Gaëtan Gilbert).Added:
intropatternandintropatternsnotation scopes support views (foo%bar) (#18757, by Gaëtan Gilbert).Added: open recursion combinators in
Ltac2.Constr.Unsafe(#18764, by Gaëtan Gilbert).Added: APIs in
Ltac2.Constr.Pretype.Flagsto customize pretyping flags. (#18765, by Gaëtan Gilbert).Added:
abstractattribute forLtac2 Typeto turn types abstract at the end of the current module (#18766, fixes #18656, by Gaëtan Gilbert).Added: APIs in
Ltac2.Messageto interact with the boxing system of the pretty printer (#18988, by Gaëtan Gilbert).Added:
Automatic Proposition Inductives,Dependent Proposition Eliminatorsandwarning when automatically lowering an inductive declared with Type to Prop(#18989, by Gaëtan Gilbert).Added:
String.sub(#19204, by Rodolphe Lepigre).Fixed:
Ltac2.Control.new_goalremoves the new goal from the shelf and future goals (#19141, fixes #19138, by Gaëtan Gilbert).
SSReflect
Changed: ssreflect no longer relies on the recovery mechanism of the parsing engine, this can slightly change the parsing priorities in rare occurences, for instance when combining
unshelveand=>(#18224, by Pierre Roux).Changed: notations
_.1and_.2are now defined in the prelude at level 1 rather than inssrfunat level 2 (#18224, by Pierre Roux).Changed: The
havetactic generates a proof term containing an opaque constant, as it did up to PR #15121 included in Coq 8.16.0. See the varianthave @Hto generate a (transparent) let-in instead (Generating let in context entries with have). (#18449, fixes #18017, by Enrico Tassi).Deprecated: The
fun_scopenotation scope declared inssrfun.vis deprecated. Usefunction_scopeinstead (#18374, by Kazuhiko Sakaguchi).Fixed: handling of primitive projections in ssrewrite (#19213, fixes #19229, by Pierre Roux, Kazuhiko Sakaguchi, Enrico Tassi and Quentin Vermande).
Commands and options
Changed: the default reversibility status of most coercions. The refman states that
By default coercions are not reversible except for Record fields specified using
:>.The previous code was making way too many coercion reversible by default. The new behavior should be closer from the spec in the doc (#18705, by Pierre Roux).
Changed: focus commands such as
1:{and goal selection for query commands such as1: Checkdo not needClassic(Ltac1) proof mode to function. In particular they function in Ltac2 mode (#18707, fixes #18351, by Gaëtan Gilbert).Changed: inductives declared with
: Typeor no annotation and automatically put inPropare not declared template polymorphic (#18867, by Gaëtan Gilbert).Changed: Clarify the warning about use of
Let,Variable,HypothesisandContextoutside sections and make it an error by default (#18880, by Pierre Roux).Changed: The "fragile-hint-constr" warning is now an error by default, as the corresponding feature will be removed in a later version (#18895, by Pierre-Marie Pédrot).
Changed:
Schemeautomatically registers the resulting schemes in theRegister Schemedatabase (#19016, fixes #3132, by Gaëtan Gilbert).Changed:
Typeclasses TransparentandTypeclasses Opaquedefault locality outside section is nowexport(#19069, by Gaëtan Gilbert).Deprecated: The
Cdcommand. Instead use the command line option-output-directory(see Command line options) or, for extraction,Extraction Output Directory(#17403, by Ali Caglayan and Hugo Herbelin).Added:
warnattribute generalizing the deprecation machinery to other forms of comments (#18248, by Hugo Herbelin and Pierre Roux).Added:
Register Schemeto add entries to the scheme database used by some tactics (#18299, by Gaëtan Gilbert).Added:
Printreferencenow shows the implicit arguments of areferencedirectly on the type ofreference, using{...}and[...]markers for respectively maximally-inserted and non-maximally-inserted implicit arguments, asAboutdoes (#18444, by Hugo Herbelin).Added:
import_categoriessupports categoryoptionscontrolling Flags, Options and Tables (#18536, by Gaëtan Gilbert).Added: When a name is a projection,
AboutandPrintnow indicate it (#18725, by Hugo Herbelin).Added:
Hint Projectionscommand that sets the transparency flag for projections for the specified hint databases (#18785, by Jan-Oliver Kaiser and Rodolphe Lepigre).Added:
Searchnow admits theis:Fixpointandis:CoFixpointlogical kinds to search for constants defined with theFixpointandCoFixpointkeywords (#18983, by Pierre Rousselin).Added: The
Includecommand can now include module types with awithclause (with_declaration) to instantiate some parameters (#19144, by Pierre Rousselin).Fixed: Fixes missing implicit arguments coming after a
->in the main type printed byPrintandAbout(#18442, fixes #15020, by Hugo Herbelin).Fixed:
Cumulativity Weak Constraintscan unify universes toSetwhenUniverse Minimization ToSetis enabled (#18458, by Gaëtan Gilbert).Fixed:
Searchwith modifieris:Schemerestricted the search to inductive types which have schemes instead of the schemes themselves. For instanceSearch nat is:Schemewith just the prelude loaded would returnlei.e. the only inductive type whose type mentionsnat(#18537, fixes #18298, by Gaëtan Gilbert).Fixed:
Searchnow searches also in included module types (#18662, fixes #18657, by Hugo Herbelin).Fixed:
EvalandDefinitionwith:= Evalwork without needing to load the Ltac plugin (#18852, fixes #12948, by Gaëtan Gilbert).Fixed:
Schemedeclares non-recursive schemes forscheme_typeCaseandElimination(#19017, fixes #10816, by Gaëtan Gilbert).Fixed:
Cumulativity Weak Constraintshad its meaning flipped since 8.12 (#19201, by Gaëtan Gilbert).
Command-line tools
Changed: signal
SIGINTinterrupts the process with " "user interrupt" error instead of aborting. This is intended to produce better messages when interrupting Coq (#18716, by Gaëtan Gilbert).Added: Command line option
-output-directory dirto set the default output directory for extraction,RedirectandPrint Universes(#17392, fixes #8649, by Hugo Herbelin).Fixed: coqdoc links to section variables introduced with
Context(#18527, fixes #18516, by Pierre Roux).
CoqIDE
Changed: Find/replace UI was improved: margins, icons for found/not found (#18523, fixes #11024, by Sylvain Chiron).
Changed: The default key binding modifier for the Navigation menu was changed to Alt on non-macOS systems. The previous default, Ctrl, hid some conventional cursor movement bindings such as Ctrl-Left, Ctrl-Right, Ctrl-Home and Ctrl-End. The new default generally has no effect if you've previously installed Coq on your system. See Shortcuts to change the default.
The Edit/Undo key binding was changed from Ctrl-U to Ctrl-Z to be more consistent with common conventions.
View/Previous TabandView/Next Tabwere changed fromAlt-Left/RighttoCtrl-PgUp/PgDn(Cmd-PgUp/PgDnon macOS). To change key bindings on your system (e.g. back to Ctrl-U), see Key bindings (#18717, by Sylvain Chiron).Changed: Changing modifiers for the View menu only applies to toggleable items; View/Show Proof was changed to Shift-F2 (#18717, by Sylvain Chiron).
Added: Edit/Select All and Navigation/Fully Check menu items (#18717, fixes #16141, by Sylvain Chiron).
Fixed: Opening a file with drag and drop now works correctly (fixed regression) (#18524, fixes #3977, by Sylvain Chiron).
Fixed: Incorrect highlight locations and line numbers for errors and warnings, especially in the presence of unicode characters. This updates the XML protocol (#19040, fixes #18682, by Hugo Herbelin).
Fixed: Show tooltips for syntax errors (#19153, fixes #19152, by Jim Fehrle).
Standard library
Changed: names of "push" lemmas for
List.lengthto follow the same convention as push lemmas for other operations. For example,app_lengthbecamelength_app. The standard library was migrated using the following script:find theories -name '*.v' | xargs sed -i -E ' s/\<app_length\>/length_app/g; s/\<rev_length\>/length_rev/g; s/\<map_length\>/length_map/g; s/\<fold_left_length\>/fold_left_S_O/g; s/\<split_length_l\>/length_fst_split/g; s/\<split_length_r\>/length_snd_split/g; s/\<combine_length\>/length_combine/g; s/\<prod_length\>/length_prod/g; s/\<firstn_length\>/length_firstn/g; s/\<skipn_length\>/length_skipn/g; s/\<seq_length\>/length_seq/g; s/\<concat_length\>/length_concat/g; s/\<flat_map_length\>/length_flat_map/g; s/\<list_power_length\>/length_list_power/g; '
(#18564, by Andres Erbsen).
Changed:
Coq.CRelationClasses.arrow,Coq.CRelationClasses.iffTandCoq.CRelationClasses.flipare nowTypeclasses Opaque(#18910, by Pierre-Marie Pédrot).Removed: The library files
Coq.NArith.Ndigits,Coq.NArith.Ndist, andCoq.Strings.ByteVectorwhich were deprecated since 8.19 (#18936, by Andres Erbsen).Deprecated: The library files
Coq.Numbers.Integer.Binary.ZBinaryCoq.Numbers.Integer.NatPairs.ZNatPairsCoq.Numbers.Natural.Binary.NBinary
have been deprecated. Users should require
Coq.Arith.PeanoNatorCoq.Arith.NArith.BinNatif they want implementations of natural numbers andCoq.Arith.ZArith.BinIntif they want an implementation of integers (#18500, by Pierre Rousselin).Deprecated: The library file
Coq.Numbers.NatInt.NZPropertiesis deprecated. Users can requireCoq.Numbers.NatInt.NZMulOrderinstead and replace the moduleNZProperties.NZPropwithNZMulOrder.NZMulOrderProp(#18501, by Pierre Rousselin).Deprecated: The library file
Coq.Arith.Bool_nathas been deprecated (#18538, by Pierre Rousselin).Deprecated: The library file
Coq.Numbers.NatInt.NZDomainis deprecated (#18539, by Pierre Rousselin).Deprecated: The library files
Coq.Numbers.Integers.Abstract.ZDivEuclandCoq.ZArith.Zeuclidare deprecated (#18544, by Pierre Rousselin).Deprecated: The library files
Coq.Numbers.Natural.Abstract.NIsoandCoq.Numbers.Natural.Abstract.NDefOpsare deprecated (#18668, by Pierre Rousselin).Deprecated:
Bool.Bvector. Users are encouraged to considerlist boolinstead. Please open an issue if you would like to keep usingBvector. (#18947, by Andres Erbsen).Added: A warning on
Vector.tto make its new users aware that using this dependently typed representation of fixed-length lists is more technically difficult, compared to bundling lists with a proof of their length. This is not a deprecation and there is no intent to remove it from the standard library. Use option-w -stdlib-vectorto silence the warning (#18032, by Pierre Roux, reviewed by Andres Erbsen, Jim Fehrle, Emilio Jesús Gallego Arias, Gaëtan Gilbert, Hugo Herbelin, Olivier Laurent, Yishuai Li, Pierre-Marie Pédrot and Michael Soegtrop).Added: lemmas
NoDup_app,NoDup_iff_ForallOrdPairs,NoDup_map_NoDup_ForallPairsandNoDup_concat(#18172, by Stefan Haani and Andrej Dudenhefner).Added: lemmas
In_iff_nth_errornth_error_app,nth_error_cons_0,nth_error_cons_succ,nth_error_rev,nth_error_firstn,nth_error_skipn,hd_error_skipn,nth_error_seq(#18563, by Andres Erbsen)Added: to
NandNatlemmasstrong_induction_le,binary_induction,strong_induction_le,even_even,odd_even,odd_odd,even_odd,b2n_le_1,testbit_odd_succ',testbit_even_succ',testbit_div2,div2_0,div2_1,div2_le_mono,div2_even,div2_odd',le_div2_diag_l,div2_le_upper_bound,div2_le_lower_bound,lt_div2_diag_l,le_div2,lt_div2,div2_decr,land_even_l,land_even_r,land_odd_l,land_odd_r,land_even_even,land_odd_even,land_even_odd,land_odd_odd,land_le_l,land_le_r,ldiff_even_l,ldiff_odd_l,ldiff_even_r,ldiff_odd_r,ldiff_even_even,ldiff_odd_even,ldiff_even_odd,ldiff_odd_odd,ldiff_le_l,shiftl_lower_bound,shiftr_upper_bound,ones_0,ones_succ,pow_lower_bound(#18628, by Pierre Rousselin).Fixed:
Z.euclidean_division_equations_cleanuphas been reordered so thatzify(andlia,nia, etc) are no longer as slow when the context contains many assumptions of the form0 <= ... < ...(#18818, fixes #18770, by Jason Gross).
Infrastructure and dependencies
Changed: Bump minimal Dune version required to build Coq to 3.6.1 (#18359, by Emilio Jesus Gallego Arias).
Removed: Support for
.viofiles and for.vio2votransformation has been removed, compilation to.vosis the supported method for quick compilation now (#18424, fixes #4007 and #4013 and #4123 and #5308 and #5223 and #6720 and #8402 and #9637 and #11471 and #18380, by Emilio Jesus Gallego Arias).Added: The
coq-docopam / Dune package will now build and install Coq's documentation (#17808, by Emilio Jesus Gallego Arias).Added: Coq is now compatible with
memprof-limitsinterruption methods. This means that Coq will be recompiled when the library is installed / removed from an OPAM switch. (#18906, fixes #17760, by Emilio Jesus Gallego Arias).Added: ability to exit from
Drop.in Coq toplevel by a simpleCtrl + D, without leaving the OCaml toplevel on the stack. Also add a custom OCaml toplevel directory#gowhich does the same action asgo (), but with a more native syntax (#18771, by Anton Danilkin).
Extraction
Added: Extension for OCaml extraction: Commands to extract foreign function calls to C (external) and ML function exposition (Callback.register) for calling being able to call them by C functions (#18270, fixes #18212, by Mario Frank).
Fixed: Wrongly self-referencing extraction of primitive projections to OCaml in functors (#17321, fixes #16288, by Hugo Herbelin). Note that OCaml wrappers assuming that the applicative syntax of projections is provided may have to use the dot notation instead.
Version 8.19
Summary of changes
Coq version 8.19 extends the kernel universe polymorphism to
polymorphism over sorts (e.g. Prop, SProp) along with a few new
features, a host of improvements to the notation system, the Ltac2
standard library, and the removal of some standard library files after
a long deprecation period.
We highlight some of the most impactful changes here:
Sort polymorphism makes it possible to share common constructs over
TypePropandSProp.The notation
term%_scopeto set a scope only temporarily (in addition toterm%scopefor opening a scope applying to all subterms).
lazy,simpl,cbnandcbvand the associatedEvalandevalreductions learned to do head reduction when given flaghead.New Ltac2 APIs, improved Ltac2
exactand dynamic building of Ltac2 term patterns.New performance evaluation facilities:
Instructionsto count CPU instructions used by a command (Linux only) and Profiling system to produce trace files.New command
Attributesto assign attributes such asdeprecatedto a library file.
Notable breaking changes:
replacewithby tacdoes not automatically attempt to solve the generated equality subgoal using the hypotheses. Useby first [assumption | symmetry;assumption | tac]if you need the previous behaviour.Removed old deprecated files from the standard library.
See the Changes in 8.19.0 section below for the detailed list of changes, including potentially breaking changes marked with Changed. Coq's reference manual for 8.19, documentation of the 8.19 standard library and developer documentation of the 8.19 ML API are also available.
Maxime Dénès and Thierry Martinez with support from Erik Martin-Dorel and Théo Zimmermann moved the CI away from gitlab.com to use Inria supported runner machines through gitlab.inria.fr.
Théo Zimmermann with help from Ali Caglayan and Jason Gross maintained coqbot used to run Coq's CI and other pull request management tasks.
Jason Gross maintained the bug minimizer and its automatic use through coqbot.
Jaime Arias and Erik Martin-Dorel maintained the Coq Docker images and Cyril Cohen, Vincent Laporte, Pierre Roux and Théo Zimmermann maintained the Nix toolbox used by many Coq projects for continuous integration.
Ali Caglayan, Emilio Jesús Gallego Arias, Rudi Grinberg and Rodolphe Lepigre maintained the Dune build system for OCaml and Coq used to build Coq itself and many Coq projects.
The opam repository for Coq packages has been maintained by Guillaume Claret, Guillaume Melquiond, Karl Palmskog and Enrico Tassi with contributions from many users. A list of packages is available on the Coq website.
Our current maintainers are 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, Guillaume Melquiond, Pierre-Marie Pédrot, Clément Pit-Claudel, Pierre Roux, Kazuhiko Sakaguchi, Vincent Semeria, Michael Soegtrop, Arnaud Spiwack, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov, Li-yao Xia and Théo Zimmermann. See the Coq Team face book page for more details.
The 40 contributors to the 8.19 version are: quarkcool, Khalid Abdullah, Tanaka Akira, Isaac van Bakel, Frédéric Besson, Lasse Blaauwbroek, Ana Borges, Ali Caglayan, Nikolaos Chatzikonstantinou, Maxime Dénès, Andrej Dudenhefner, Andres Erbsen, Jim Fehrle, Gaëtan Gilbert, Jason Gross, Stefan Haan, Hugo Herbelin, Emilio Jesús Gallego Arias, Pierre Jouvelot, Ralf Jung, Jan-Oliver Kaiser, Robbert Krebbers, Jean-Christophe Léchenet, Rodolphe Lepigre, Yann Leray, Yishuai Li, Guillaume Melquiond, Guillaume Munch-Maccagnoni, Sotaro Okada, Karl Palmskog, Pierre-Marie Pédrot, Jim Portegies, Pierre Rousselin, Pierre Roux, Michael Soegtrop, David Swasey, Enrico Tassi, Shengyi Wang and Théo Zimmermann.
The Coq community at large helped improve this new version via the GitHub issue and pull request system, the coq-club@inria.fr mailing list, the Discourse forum and the Coq Zulip chat.
Version 8.19's development spanned 4 months from the release of Coq 8.18.0 (6 months since the branch for 8.18.0). Gaëtan Gilbert and Matthieu Sozeau are the release managers of Coq 8.19. This release is the result of 285 merged PRs, closing 70 issues.
Changes in 8.19.0
Kernel
Added: Sort polymorphism makes it possible to share common constructs over
TypePropandSProp(#17836, #18331, by Gaëtan Gilbert).Fixed: Primitives being incorrectly considered convertible to anything by module subtyping (#18507, fixes #18503, by Gaëtan Gilbert).
Specification language, type inference
Changed:
term_forall_or_fun,term_let,term_fix,term_cofixandterm_iffromtermat level 200 toterm10at level 10. This is a first step towards getting rid of the recovery mechanism of camlp5/coqpp. The impact will mostly be limited to rare cases of additional parentheses around the above (#18014, by Hugo Herbelin).Changed: Declarations of the form
(id := body)inContextoutside a section in aModule Typedo not any more try to declare a class instance. Assumptions whose type is a class and declared usingContextoutside a section in aModule Typeare now declared as global, instead of local (#18254, by Hugo Herbelin).Fixed: Anomaly in the presence of duplicate variables within a disjunctive pattern (#17857 and #18005, fixes #17854 and #18004, by Hugo Herbelin).
Fixed: Printing of constructors and of
inclause ofmatchnow respects thePrinting ImplicitandPrinting Allflags (#18176, fixes #18163, by Hugo Herbelin).Fixed: Wrong shift of argument names when using
Argumentsin nested sections (#18393, fixes #12755 and #18392, by Hugo Herbelin).
Notations
Changed: More informative message when a notation cannot be intepreted as a reference (#18104, addresses #18096, by Hugo Herbelin).
Changed: In casts like
term : twheretis bound to some scopet_scope, viaBind Scope, thetermis now interpreted in scopet_scope. In particular whentisTypethetermis interpreted intype_scopeand whentis a product thetermis interpreted infun_scope(#6134, fixes #14959, by Hugo Herbelin, reviewed by Maxime Dénès, Jim Fehrle, Emilio Gallego, Gaëtan Gilbert, Jason Gross, Pierre-Marie Pédrot, Pierre Roux, Bas Spitters and Théo Zimmermann).Added: the notation
term%_scopeto set a scope only temporarily (in addition toterm%scopefor opening a scope applying to all subterms) (#14928, fixes #11486 and #12157 and #14305, by Hugo Herbelin, reviewed by Pierre Roux).Removed the ability to declare scopes whose name starts with
_(would be ambiguous with the new%_scopenotation) (#14928, by Pierre Roux, reviewed by Hugo Herbelin).Deprecated the notation
term%scopeinArgumentscommand. In a few version, we'll make it an error and in next version give it the same semantics as in terms (i.e., deep scope opening for all subterms rather than just temporary opening) (#14928, fixes #11486 and #12157 and #14305, by Hugo Herbelin, reviewed by Pierre Roux).Added: Quoted strings can be used as tokens in notations; double quotes can be used in symbols in
only printingnotations; see Basic notations for details (#17123, by Hugo Herbelin).Added: Parsing support for notations with recursive binders involving not only variables bound by
funorforallbut also byletormatch(#17856, fixes #17845, by Hugo Herbelin).Added: Declaring more than once the level of a notation variable is now an error (#17988, fixes #17985, by Hugo Herbelin).
Fixed: Various bugs and limitations to using custom binders in non-recursive and recursive notations (#17115, fixes parts of #17094, by Hugo Herbelin).
Fixed: An invalid case of eta-expansion in notation pretty-printer (#17841, fixes #15221, by Hugo Herbelin).
Fixed:
Printing Parenthesesnow works also when an explicit level is set for the right-hand side of a right-open notation (#17844, fixes #15322, by Hugo Herbelin).Fixed: anomaly when a notation variable denoting a binder occurs nested more than once in a recursive pattern (#17861, fixes #17860, by Hugo Herbelin).
Fixed: Anomaly when trying to disable a non-existent custom notation (#17891, fixes #17782, by Hugo Herbelin).
Fixed: appropriate error instead of anomaly in the presence of notations with constructors applied to too many arguments in pattern-matching (#17892, fixes #17071, by Hugo Herbelin).
Fixed: support constructors with parameters in number or string notations for patterns (#17902, fixes #11237, by Hugo Herbelin).
Fixed: Chains of entry coercions possibly printed in the wrong order depending on the order in which they were declared (#18230, fixes #18223, by Hugo Herbelin).
Tactics
Changed:
open_constrin Ltac1 and Ltac2 does not perform evar normalization. Normalization may be recovered usinglet c := open_constr:(...) in constr:(c)if necessary for performance (#17704, by Gaëtan Gilbert).Changed:
abstractnow supports existential variables (#17745, by Gaëtan Gilbert).Changed: instances declared with
Typeclasses Unique Instancesdo not allow backtracking even when the goal contains evars (#17789, fixes #6714, by Jan-Oliver Kaiser).Changed: In
rewrite_strat, the syntax for thechoicestrategy has changed slightly. You may need to add parentheses around its arguments (one such case found in our continuous integration tests) (#17832, by Hugo Herbelin, Jim Fehrle and Jason Gross).Changed:
replacewithby tacdoes not automatically attempt to solve the generated equality subgoal using the hypotheses. Useby first [assumption | symmetry;assumption | tac]if you need the previous behaviour (#17964, fixes #17959, by Gaëtan Gilbert).Changed:
Z.euclidean_division_equations_cleanupnow breaks up hypotheses of the form0 <= _ < _for better cleanup inzify(#17984, by Jason Gross).Changed:
simplnow refolds applied constants unfolding to reducible fixpoints into the original constant even when this constant would become partially applied (#17991, by Hugo Herbelin).Added: Ltac2 tactic
Std.resolve_tcto resolve typeclass evars appearing in a given term (#13071, by Gaëtan Gilbert and Maxime Dénès).Added:
lazy,simpl,cbnandcbvand the associatedEvalandevalreductions learned to do head reduction when given flaghead(egEval lazy head in (fun x => Some ((fun y => y) x)) 0producesSome ((fun y => y) 0)) (#17503, by Gaëtan Gilbert;cbvcase added in #18190, by Hugo Herbelin).Fixed: ensure that opaque primitive projections are correctly handled by "Evarconv" unification (#17788, fixes #17774, by Rodolphe Lepigre).
Fixed: Useless duplications with
Hint CutandHint Mode(#17887, fixes #17417, by Hugo Herbelin).Fixed:
zify/Z.euclidean_division_equations_cleanupnow no longer instantiates dependent hypotheses. This will by necessity makeZ.to_euclidean_division_equationsa bit weaker, but the previous behavior was overly sensitive to hypothesis ordering. See #17935 for a recipe to recapture the power of the previous behavior in a more robust albeit slower way (#17935, fixes #17936, by Jason Gross).Fixed:
simplnow working on reducible named mutual fixpoints with parameters (#17993, fixes #12521 and part of #3488, by Hugo Herbelin).Fixed: support for reasoning up to polymorphic universe variables in
congruenceandf_equal(#18106, fixes #5481 and #9979, by Hugo Herbelin).Fixed: Only run zify saturation on existing hypotheses of the goal (#18152, fixes #18151, by Frédéric Besson and Rodolphe Lepigre).
Fixed: A stack overflow due to a non-tail recursive function in
lia(#18159, fixes #18158, by Jan-Oliver Kaiser and Rodolphe Lepigre).Fixed: Apply substitution in Case stack node for cbv reify (#18195, fixes #18194, by Yann Leray).
Fixed: Anomaly of
simplon partially applied named mutual fixpoints (#18243, fixes #18239, by Hugo Herbelin).Changed:
simpltries to reduce named mutual fixpoints also when they return functions (#18243, by Hugo Herbelin).
Ltac language
Ltac2 language
Changed:
Array.empty,Message.Format.stopandPattern.empty_contextare not thunked (#17534, by Gaëtan Gilbert).Changed: Ltac2
exactandeexactelaborate their argument using the type of the goal as expected type, instead of elaborating with no expected type then unifying the resulting type with the goal (#18157, fixes #12827, by Gaëtan Gilbert).Changed: argument order for the Ltac2 combinators
List.fold_leftList.fold_rightandArray.fold_rightchanged to be the same as in OCaml (#18197, fixes #16485, by Gaëtan Gilbert).Changed:
Ltac2.Std.red_flagsadded fieldrStrengthto support head-only reduction (#18273, fixes #18209, by Gaëtan Gilbert).Added: Ltac2 supports pattern quotations when building
patternvalues. This allows building dynamic patterns, egLtac2 eq_pattern a b := pattern:($pattern:a = $pattern:b)(#17667, by Gaëtan Gilbert).Added: new standard library modules
Ltac2.UnificationandLtac2.TransparentStateproviding access to "Evarconv" unification, including the configuration of the transparency state (#17777, by Rodolphe Lepigre).Added:
Ltac2.Constr.is_float,Ltac2.Constr.is_uint63,Ltac2.Constr.is_array(#17894, by Jason Gross).Added: new Ltac2 standard library modules
Ltac2.Ref,Ltac2.LazyandLtac2.RedFlagsAdded: new Ltac2 standard library functions to
Ltac2.Control,Ltac2.Array, andLtac2.List(#18095, fixes #10112, by Rodolphe Lepigre).Added: Support for the
setoid_rewritetactic (#18102, by quarkcool).Added:
Ltac2 GlobalizeandLtac2 Checkuseful to investigate the expansion of Ltac2 notations (#18139, by Gaëtan Gilbert).Added: A new flag
Ltac2 In Ltac1 Profiling(unset by default) to control whether Ltac2 stack frames are included in Ltac profiles (#18293, by Rodolphe Lepigre).Added:
Ltac2.Message.Format.ikfprintfuseful to implement conditional printing efficiently (i.e. without building an unused message when not printing) (#18311, fixes #18292, by Gaëtan Gilbert).Fixed: Ltac2 mutable references are not considered values anymore (#18082, by Gaëtan Gilbert).
Commands and options
Changed:
LetwithQedproduces an opaque side definition instead of being treated as a transparentletafter the section is closed. The previous behaviour can be recovered usingclearbodyandDefined(#17576, by Gaëtan Gilbert).Changed: automatic lowering of record types to
Propnow matches the behavior for inductives: no lowering when universe polymorphism is on, more lowering with recursive records (#17795, fixes #17801 and #17796 and #17801 and #17805, by Gaëtan Gilbert).Added:
Extraction Output Directoryoption for specifying the directory in which extracted files are written (#16126, fixes #9148, by Ali Caglayan).Added:
-profilecommand line argument andPROFILEvariable incoq_makefileto control a new Profiling system (#17702, by Gaëtan Gilbert).Added: new command modifier
Instructionsthat executes the given command and displays the number of CPU instructions it took to execute it. This command is currently only supported on Linux systems, but it does not fail on other systems, where it simply shows an error message instead of the count. (#17744, by Rodolphe Lepigre).Added: support for instruction counts to the
-profileoption. (#17744, by Rodolphe Lepigre).Added: New command
Attributesto assign attributes such asdeprecatedto a library file (#18193, fixes #8032, by Hugo Herbelin).Fixed: Anomaly with
Searchin the context of a goal (#17987, fixes #17963, by Hugo Herbelin).Fixed: The printer for
Guardedwas possibly raising an anomaly in the presence of existential variables (#18008, fixes #18006, by Hugo Herbelin).
Command-line tools
Changed: Add a
coqdepoption-wto adjust warnings and allow turning then into errors like the correspondingcoqcoption (#17946, fixes #10156, by David Swasey and Rodolphe Lepigre).Fixed: properly delayed variable expansion when
coq_makefileuses the combined rule for.voand.globtargets, i.e. on GNU Make 4.4 and later. (#18077, fixes #18076, by Gaëtan Gilbert).Fixed: Spurious
coqdepwarnings due to missing path normalization for plugins (#18165, by Rodolphe Lepigre).Fixed: Regression in option
--externalofcoqdoc, whose two arguments were inadvertently swapped (#18448, fixes #18434, by Hugo Herbelin).
Standard library
Changed: reimplemented
Ncring_tacreification (used bynsatz,cring, but notring) in Ltac instead of typeclasses (#18325, by Gaëtan Gilbert).Removed:
Numbers.Cyclic.ZModulofrom the standard library. This file was deprecated in 8.17 and has no known use cases. It is retained in the test suite to ensure consistency ofCyclicAxioms(#17258, by Andres Erbsen).Removed:
ZArith.Zdigitsin favor ofZ.testbit(#18025, by Andres Erbsen).Removed: long deprecated files in
Arith:Div2.v,Even.v,Gt.v,Le.v,Lt.v,Max.v,Minus.v,Min.v,Mult.v,Plus.v,Arith_prebase.v(#18164, by Pierre Rousselin).Deprecated:
NArith.NdigitsandNArith.Ndistdue to disuse. For most uses ofNdigits,N.testbitand similar functions seem more desirable. If you would like to continue using these files, please consider volunteering to maintain them, within stdlib or otherwise (#17732, by Andres Erbsen).Deprecated:
Strings.ByteVectorin favor ofInit.Byte(#18022, by Andres Erbsen).Deprecated:
Numbers.NaryFunctionsdue to disuse. If you are interested in continuting to use this module, please consider volunteering to maintain it, in stdlib or otherwise (#18026, by Andres Erbsen).Added: Lemma
cardinal_Add_Insays that inserting an existing key with a new value doesn't change the size of a map, lemmaAdd_transpose_neqkeysays that unequal keys can be inserted into a map in any order (#12096, by Isaac van Bakel and Jean-Christophe Léchenet).Added: lemmas
app_eq_cons,app_inj_pivotandrev_inj(#17787, by Stefan Haan, with help of Olivier Laurent).Added:
unfold_nth_error,nth_error_nil,nth_error_cons,nth_error_O,nth_error_StoCoq.Lists.List(#17998, by Jason Gross).Added:
Reflexive,Symmetric,Transitive,Antisymmetric,Asymmetricinstances forRle,Rge,Rlt,Rgt(#18059, by Jason Gross).
Extraction
Changes in 8.19.1
Kernel
Fixed: incorrect abstraction of sort variables for opaque constants leading to an inconsistency (#18596 and #18630, fixes #18594, by Gaëtan Gilbert).
Fixed: memory corruption with
vm_compute(rare but more likely with OCaml 5.1) (#18599, by Guillaume Melquiond).
Notations
Changed:
Found no matching notation to enable or disableis a warning instead of an error (#18670, by Pierre Roux).
Tactics
Ltac2 language
Infrastructure and dependencies
Fixed: missing
conf-dependencies of the opam packages:coq-coredepends onconf-linux-libc-devwhen compiled on linux, andcoqdepends onconf-python-3andconf-timeto run the test suite (#18565, by Gaëtan Gilbert).Fixed: avoid comitting symlinks to git which caused build failures on some Windows setups (#18550, fixes #18548, by Gaëtan Gilbert).
Changes in 8.19.2
Specification language, type inference
Notations
Tactics
Ltac2 language
Fixed: anomalies when using Ltac2 in VsCoq due to incorrect state handling of Ltac2 notations (#19096, fixes coq-community/vscoq#772, by Gaëtan Gilbert)
Commands and options
CoqIDE
Infrastructure and dependencies
Fixed: compatibility with OCaml versions where
effectis a keyword (#18863, by Remy Seassau)Added: Coq is now compatible with
memprof-limitsinterruption methods. This means that Coq will be recompiled when the library is installed / removed from an OPAM switch. (#18906, fixes #17760, by Emilio Jesus Gallego Arias).
Version 8.18
Summary of changes
Coq version 8.18 integrates two soundness fixes to the Coq kernel along with a host of improvements. We highlight a few impactful changes:
the default locality of
HintandInstancecommands was switched toexport.the universe unification algorithm can now delay the commitment to a sort (the algorithm used to pick
Type). Thanks to this feature manyPropandSPropannotations can be now omitted.Ltac2 supports array literals, maps and sets of primitive datatypes such as names (of constants, inductive types, etc) and fine-grained control over profiling.
The warning system offers new categories, enabling finer (de)activation of specific warnings. This should be particularly useful to handle deprecations.
Many new lemmas useful for teaching analysis with Coq are now part of the standard library about real numbers.
The
#[deprecated]attribute can now be applied to definitions.
The 41 contributors to the 8.18 version are: Reynald Affeldt, Tanaka Akira, Matthieu Baty, Yves Bertot, Lasse Blaauwbroek, Ana Borges, Kate Deplaix, Ali Caglayan, Cyril Cohen, Maxime Dénès, Andrej Dudenhefner, Andres Erbsen, Jim Fehrle, Yannick Forster, Paolo G. Giarrusso, Gaëtan Gilbert, Jason Gross, Samuel Gruetter, Stefan Haan, Hugo Herbelin, Yoshihiro Imai, Emilio Jesús Gallego Arias, Olivier Laurent, Meven Lennon-Bertrand, Rodolphe Lepigre, Yishuai Li, Guillaume Melquiond, Karl Palmskog, Pierre-Marie Pédrot, Stefan Radziuk, Ramkumar Ramachandra, Pierre Rousselin, Pierre Roux, Julin Shaji, Kazuhiko Sakaguchi, Weng Shiwei, Michael Soegtrop, Matthieu Sozeau, Enrico Tassi, Hao Yang, Théo Zimmermann.
We are very grateful to the Coq community for their help in creating 8.18 in the 6 months since the release of Coq 8.17.0. Maxime Dénès and Enrico Tassi were the release managers.
Changes in 8.18.0
Kernel
Changed: the
bad-relevancewarning is now an error by default (#17172, by Pierre-Marie Pédrot).Fixed: the kernel now checks that case elimination of private inductive types (cf
private(matching)) is not used outside their defining module. Previously this was only checked in elaboration and the check could be avoided through some tactics, breaking consistency in the presence of axioms which rely on the elimination restriction to be consistent (#17452, fixes #9608, by Gaëtan Gilbert).Fixed: a bug enabling
native_computeto yield arbitrary floating-point values (#17872, fixes #17871, by Guillaume Melquiond and Pierre Roux, bug found by Jason Gross).
Specification language, type inference
Changed: enhance the universe unification algorithm, which is now able to delay the definition of a sort. This allows omitting some explicit
PropandSPropannotations when writing terms. Some minor backwards compatibility issues can arise in rare cases, which can be solved with more explicit sort annotations (#16903, by Pierre-Marie Pédrot).Changed: match compilation for primitive record avoids producing an encoding overhead for matches that are equivalent to a primitive projection (#17008, by Gaëtan Gilbert).
Added: volatile casts
term :> typewhich do not leave a trace in the elaborated term. They are used byPrinting Match All Subtermsto display otherwise hidden subterms of match constructs (#16992, fixes #16918, by Gaëtan Gilbert).Added: when printing uninterpreted terms (for instance through
Print LtaconLtac foo := exact some_term), extensions to the term language (for instance Solving existential variables using tactics) are now printed correctly instead of as holes (_) (#17221, by Gaëtan Gilbert).Added: Support for the
local,globalandexportlocality attributes for the single "field" of definitional typeclasses when using the:>and::syntaxes for coercion and substructures (#17754, fixes #17451, by Pierre Roux).Added: a hook in the coercion mechanism to enable programming coercions in external metalanguages such as Ltac, Ltac2, Elpi or OCaml plugins (#17794, by Pierre Roux).
Fixed: canonical instance matching
matchterms (#17206, fixes #17079, by Gaëtan Gilbert).Fixed: universe constraint inference in module subtyping can trigger constant unfoldings (#17305, fixes #17303, by Gaëtan Gilbert).
Notations
Removed: The
'[='keyword.'[='tokens in notation definitions should be replaced with the pair of tokens'[' '='. If compatibility with Coq < 8.18 is needed, replace[=in uses of the notation with an added space ([ =) (#16788, fixes #16785, by Pierre Roux).Added: Support for
Printing Parenthesesin custom notations (#17117, by Hugo Herbelin).Added: Improve printing of reverse coercions. When a term
xis elaborated tox'through a reverse coercion, return the termreverse_coercion x' xthat is convertible tox'but displayedxthanks to the coercionreverse_coercion(#17484, by Pierre Roux).Fixed: Add support to parse a recursive pattern as a sequence of terms in a recursive notation even when this recursive pattern is used in position of binders; it was formerly raising an anomaly (#16937, fixes #12467, by Hugo Herbelin).
Fixed: Improved ability to print notations involving anonymous binders (#17050, by Hugo Herbelin).
Fixed: anomaly with notations abbreviating a local variable or record field name (#17217, fixes #14975, by Hugo Herbelin).
Fixed: Ensure in all cases that a parsing rule is declared when the
only parsingflag is given (#17318, fixes #17316, by Hugo Herbelin).Fixed: In
Number Notation, "abstract after N" was applied when number >= N. Now it is applied when number > N (#17478, by Jim Fehrle).
Tactics
Changed: in the fringe case where the
withclause of a call tospecializedepends on a variable bound in the type, the tactic will now fail instead of silently producing a shelved evar (#17322, by Pierre-Marie Pédrot).Changed: extensions to the term syntax through generic arguments (typically
ltac:(),ltac2:()or ltac2's$) produce errors when used in term patterns (for instance patterns used to filter hints) instead of being treated as holes (_) (#17352, by Gaëtan Gilbert).Changed: the
casetactic and its variants always generate a pattern-matching node, regardless of their argument. In particular, they are now guaranteed to generate as many goals as there are constructors in the inductive type. Previously, they used to reduce to the corresponding branch when the argument βι-normalized to a constructor, resulting in a single goal (#17541, by Pierre-Marie Pédrot).Changed:
injectioncontinues working using sigma types whenEqdep_dechas not been required even if an equality scheme was found, instead of failing (#17670, by Gaëtan Gilbert).Changed: the unification heuristics for implicit arguments of the
casetactic. We unconditionally recommend usingdestructinstead, and even more so in case of incompatibility (#17564, by Pierre-Marie Pédrot).Removed: the no-argument form of the
instantiatetactic, deprecated since 8.16 (#16910, by Pierre-Marie Pédrot).Removed: undocumented tactics
hresolve_coreandhget_evar(#17035, by Gaëtan Gilbert).Deprecated: the
elimtypeandcasetypetactics (#16904, by Pierre-Marie Pédrot).Deprecated:
revert dependent, which is a misleadingly named alias ofgeneralize dependent(#17669, by Gaëtan Gilbert).Fixed: The
simpltactic now respects thesimpl neverflag even when the subject function is referred to through another definition (#13448, fixes #13428, by Yves Bertot).Fixed: unification is less sensitive to whether a subterm is an indirection through a defined existential variable or a direct term node. This results in less constant unfoldings in rare cases (#16960, by Gaëtan Gilbert).
Fixed: untypable proof states generated by setoid_rewrite, which may cause some backwards-incompatibilities (#17304, fixes #17295, by Lasse Blaauwbroek).
Fixed: intropatterns destructing a term whose type is a product cannot silently create shelved evars anymore. Instead, it fails with an unsolvable variable. This can be fixed in a backwards compatible way by using the e-variant of the parent tactic (#17564, by Pierre-Marie Pédrot).
Fixed: the
field_simplifytactic, so that it no longer introduces side-conditions when working on a hypothesis (#17591, by Guillaume Melquiond).Fixed: the
tautotactic and its variants now try to match types up to universe unification. This makes them compatible with universe-polymorphic code (#8905, fixes #4721 and #5351, by Pierre-Marie Pédrot).
Ltac2 language
Added: Support for parsing Ltac2 array literals
[| ... |](#16859, fixes #13976, by Samuel Gruetter).Added: Finite set and map APIs for identifier, string, int, constant, inductive and constructor keys (#17347, c.f. #16409, by Gaëtan Gilbert).
Added: Ltac2 preterm antiquotation
$preterm:(#17359, fixes #13977, by Gaëtan Gilbert).Added:
Ltac Profilingalso profiles Ltac2 tactics. Ltac2 also provides tacticsstart_profilingstop_profilingandshow_profilefor finer grained control (#17371, fixes #10111, by Gaëtan Gilbert).Added: primitives to build and compare values in
Ltac2.Init.cast(#17468, by Gaëtan Gilbert).Added: It is possible to define 0-argument externals (#17475, by Gaëtan Gilbert).
Added: Ltac2 quotations ltac2val:(ltac2 tactic) in Ltac1 which produce Ltac1 values (as opposed to
ltac2:()quotations which are only useful for their side effects) (#17575, by Gaëtan Gilbert).Fixed: nested notations involving Term Antiquotations (#17232, fixes #15864, by Gaëtan Gilbert).
Fixed: Parsing level of
byclause of Ltac2'sassert(#17508, fixes #17491, by Samuel Gruetter).Fixed:
multi_match!,multi_match! goaland the underlyingLtac2.Pattern.multi_match0andLtac2.Pattern.multi_goal_match0now preserve exceptions from backtracking after a branch succeeded instead of replacing them withMatch_failure(e.g.multi_match! constr:(tt) with tt => () end; Control.zero Not_foundnow fails withNot_foundinstead ofMatch_failure) (#17597, fixes #17594, by Gaëtan Gilbert).
Commands and options
Changed: the default locality of
HintandInstancecommands was switched toexport(#16258, by Pierre-Marie Pédrot).Changed: warning
non-primitive-recordis now in categoryrecordsinstead ofrecord. This was the only use ofrecordbut the plural version is also used bycannot-define-projectionfuture-coercion-class-constructorandfuture-coercion-class-field. (#16989, by Gaëtan Gilbert).Changed:
Evalprints information about existential variables likeCheck(#17274, by Gaëtan Gilbert).Changed: The names of deprecation warnings now depend on the version in which they were introduced, using their "since" field. This enables deprecation warnings to be selectively enabled, disabled, or treated as an error, according to the version number provided in the
deprecatedattribute (#17489, fixes #16287, by Pierre Roux, reviewed by Ali Caglayan, Théo Zimmermann and Gaëtan Gilbert).Changed: warnings can now have multiple categories allowing for finer user control on which warning to enable, disable or treat as an error (#17585, by Gaëtan Gilbert).
Changed:
Template polymorphicinductive types are not implicitly added to theKeep Equalitiestable anymore when defined. This may change the behavior of equality-related tactics on such types (#17718, by Pierre-Marie Pédrot).Changed:
Warningsandwarningsnow emit a warning when trying to enable an unknown warning (there is still no warning when disabling an unknown warning as this behavior is useful for compatibility, or when enabling an unknown warning through the command line-was the warning may be in a yet to be loaded plugin) (#17747, by Gaëtan Gilbert).Removed: the flag
Apply With Renamingwhich was deprecated since 8.15 (#16909, by Pierre-Marie Pédrot).Removed: the
Typeclasses Filtered Unificationflag, deprecated since 8.16 (#16911, by Pierre-Marie Pédrot).Removed:
programattribute is not accepted anymore with commandsAdd Relation,Add Parametric Relation,Add Setoid,Add Parametric Setoid,Add Morphism,Add Parametric Morphism,Declare Morphism. Previously, it was accepted but ignored (#17042, by Théo Zimmermann).Removed: the
Elaboration StrictProp CumulativityandCumulative SPropflags. These flags became counterproductive after the introduction of sort variables in unification (#17114, fixes #17108, by Pierre-Marie Pédrot).Removed: The
Add LoadPath,Add Rec LoadPath,Add ML Path, andRemove LoadPathcommands have been removed following deprecation. Users are encouraged to use the existing mechanisms incoq_makefileorduneto configure workspaces of Coq theories (#17394, by Emilio Jesus Gallego Arias).Deprecated:
Exportmodifier forSet. Use attributeexportinstead (#17333, by Gaëtan Gilbert).Deprecated: the
nonuniformattribute, now subsumed bywarningswith "-uniform-inheritance" (#17716, by Pierre Roux).Deprecated: Using
QedwithLet. End the proof withDefinedand useclearbodyinstead to get the same behavior (#17544, by Gaëtan Gilbert).Added:
Aboutnow prints information when a constant or inductive is syntactically equal to another through module aliasing (#16796, by Gaëtan Gilbert).Added:
Final Obligationcommand (#16817, by Gaëtan Gilbert).Added: The
deprecatedattribute is now supported for definition-like constructions (#16890, fixes #12266, by Maxime Dénès and Gaëtan Gilbert).Added: attributes
warningsand aliaswarningto set warnings locally for a command (#16902, fixes #15893, by Gaëtan Gilbert).Added: flag
Printing Unfolded Projection As Match(off by default) to be able to distinguish unfolded and folded primitive projections (#16994, by Gaëtan Gilbert).Added: option
-time-file, liketimebut outputting to a file (#17430, by Gaëtan Gilbert).Added:
Validate Proofruns the type checker on the current proof, complementary withGuardedwhich runs the guard checker (#17467, by Gaëtan Gilbert).Added:
clearbodyforLetto clear the body of a let-in in an interactive proof without kernel enforcement. (This is the behavior that was previously provided by usingQed, which is now deprecated forLets.) (#17544, by Gaëtan Gilbert).Added: option
-time-file, liketimebut outputting to a file (#17430, by Gaëtan Gilbert).Fixed: universe monomorphic inductives and records do not ignore
Universe Minimization ToSet(#17285, fixes #13927, by Gaëtan Gilbert).
Command-line tools
Changed: Do not pass the
-rectypesflag by default incoq_makefilewhen compiling OCaml code, since it is no longer required by Coq. To re-enable passing the flag, putCAMLFLAGS+=-rectypesin the local makefile, e.g.,CoqMakefile.local(see CoqMakefile.local) (#17038, by Karl Palmskog with help from Gaëtan Gilbert).Changed: disable inclusion of variable binders in coqdoc indexes by default, and provide a new coqdoc option
--binder-indexfor including them (#17045, fixes #13155, by Karl Palmskog).Added:
coqdochandles multiple links to the same source. For example when declaring an inductive typetall occurences oftitself and its elimination principles liket_indpoint to its declaration (#17118, by Enrico Tassi).Added: Command line options
-require lib(replacing-load-vernac-object lib) and-require-from root librespectively equivalent to vernacular commandsRequire libandFrom root Require lib(#17364, by Hugo Herbelin).Added:
coqtimelog2htmlcommand-line tool used to render the timing files produced with-time(which is passed bycoq_makefilewhen environment variableTIMINGis defined) (#17411, by Gaëtan Gilbert).Fixed:
coq_makefileavoids generating a command containing all files to install in a make rule, which could surpass the maximum single argument size in some developments (#17697, fixes #17721, by Gaëtan Gilbert).
CoqIDE
Changed: XML Protocol now sends (and expects) full Coq locations, including line and column information. This makes some IDE operations (such as UTF-8 decoding) more efficient. Clients of the XML protocol can just ignore the new fields if they are not useful for them (#17382, fixes #17023, by Emilio Jesus Gallego Arias).
Standard library
Changed: implementation of
Vector.nthto follow OCaml and compute strict subterms (#16731, fixes #16738, by Andrej Dudenhefner).Changed: drop the unnecessary second assumption
NoDup l'fromset_diff_nodupinListSet.v, with-compat 8.17providing the old version ofset_diff_nodupfor compatibility (#16926, by Karl Palmskog with help from Traian Florin Şerbănuţă and Andres Erbsen).Changed: Moved instances from
DecidableClassto files that prove the relevant decidability facts:Bool,PeanoNat, andBinInt(#17021, by Andres Erbsen).Changed:
Hint Externbtauto.Algebra.boollocality fromglobaltoexport(#17281, by Andres Erbsen).Changed:
xorbto a simpler definition (#17427, by Guillaume Melquiond).Changed lemmas in
Reals/RIneq.vcompleteness_weakrenamed asupper_bound_thm,le_epsilonrenamed asRle_epsilon,Rplus_eq_R0renamed asRplus_eq_0,Req_EM_Trenamed asReq_dec_T,Rinv_r_simpl_mrenamed asRmult_inv_r_id_m,Rinv_r_simpl_lrenamed asRmult_inv_r_id_l,Rinv_r_simpl_rrenamed asRmult_inv_m_id_r,tech_Rgt_minusrenamed asRgt_minus_pos,tech_Rplusrenamed asRplus_le_lt_0_neq_0,IZR_POS_xImodified with2instead of1 + 1,IZR_POS_xOmodified with2instead of1 + 1,Rge_reflmodified with>=instead of<=
(#17036, by Pierre Rousselin, reviewer Laurent Théry).
Removed:
Datatypes.prod_curry,Datatypes.prod_uncurry,Datatypes.prodT_curry,Datatypes.prodT_uncurry,Combinators.prod_curry_uncurry,Combinators.prod_uncurry_curry,Bool.leb,Bool.leb_implb,List.skipn_none,Zdiv.Z_div_mod_eq,Zdiv.div_Zdiv,Zdiv.mod_Zmod,FloatOps.frexp,FloatOps.ldexp,FloatLemmas.frexp_spec,FloatLemmas.ldexp_spec,RList.Rlist,Rlist.cons,Rlist.nil,RList.Rlength,Rtrigo_calc.cos3PI4,Rtrigo_calc.sin3PI4,MSetRBT.filter_appafter deprecation for at least two Coq versions (#16920, by Olivier Laurent).Deprecated:
List.app_nil_end,List.app_assoc_reverse,List.ass_app,List.app_ass(#16920, by Olivier Laurent).Deprecated:
Coq.Lists.List.Forall2_refl(Coq.Lists.List.Forall2_nilhas the same type) (#17646, by Gaëtan Gilbert).Deprecated:
ZArith.Zdigitsin favor ofZ.testbit. If you are aware of a use case of this module and would be interested in a drop-in replacement, please comment on the PR with information about the context that would benefit from such functinality (#17733, by Andres Erbsen).Deprecated: Deprecation warnings are now generated for
Numbers.Cyclic.Int31.Cyclic31,NNumbers.Cyclic.Int31.Int31, andNNumbers.Cyclic.Int31.Ring31. These modules have been deprecated since Coq 8.10. The modules underNumbers.Cyclic.Int63remain available (#17734, by Andres Erbsen).Deprecated lemmas in
Reals/RIneq.vinser_trans_R,IZR_neq,double,double_var,Rinv_mult_simpl,Rle_Rinv,Rlt_Rminus,Rminus_eq_0,Rminus_gt_0_lt,Ropp_div,Ropp_minus_distr',Rplus_sqr_eq_0_l,sum_inequa_Rle_lt_depr,S_O_plus_INR_depr,single_z_r_R1_depr,tech_single_z_r_R1_depr,(#17036, by Pierre Rousselin, reviewer Laurent Théry).
Added: lemmas
L_inj,R_inj,L_R_neq,case_L_R,case_L_R'toFin.v, andnil_spec,nth_append_L,nth_append_R,In_nth,nth_replace_eq,nth_replace_neq,replace_append_L,replace_append_R,append_const,map_append,map2_ext,append_inj,In_cons_iff,Forall_cons_iff,Forall_map,Forall_append,Forall_nth,Forall2_nth,Forall2_append,map_shiftin,fold_right_shiftin,In_shiftin,Forall_shiftin,rev_nil,rev_cons,rev_shiftin,rev_rev,map_rev,fold_left_rev_right,In_rev,Forall_revtoVectorSpec.v(#16765, closes #6459, by Andrej Dudenhefner).Added: lemmas
iter_swap_gen,iter_swap,iter_succ,iter_succ_r,iter_add,iter_ind,iter_rect,iter_invariantforNat.iter(#17013, by Stefan Haan with help from Jason Gross).Added: module
Zbitwisewith basic relationships between bitwise and arithmetic operations on integers (#17022, by Andres Erbsen).Added: lemmas
forallb_filter,forallb_filter_id,partition_as_filter,filter_length,filter_length_leandfilter_length_forallb(#17027, by Stefan Haan with help from Olivier Laurent and Andres Erbsen).Added: lemmas in
Reals/RIneq.v:eq_IZR_contrapositive,INR_0,INR_1,INR_archimed,INR_unbounded,IPR_2_xH,IPR_2_xI,IPR_2_xO,IPR_eq,IPR_ge_1,IPR_gt_0,IPR_IPR_2,IPR_le,IPR_lt,IPR_not_1,IPR_xH,IPR_xI,IPR_xO,le_IPR,lt_1_IPR,lt_IPR,minus_IPR,mult_IPR,not_1_IPR,not_IPR,plus_IPR,pow_IPR,Rdiv_0_l,Rdiv_0_r,Rdiv_1_l,Rdiv_1_r,Rdiv_def,Rdiv_diag_eq,Rdiv_diag,Rdiv_diag_uniq,Rdiv_eq_compat_l,Rdiv_eq_compat_r,Rdiv_eq_reg_l,Rdiv_eq_reg_r,Rdiv_mult_distr,Rdiv_mult_l_l,Rdiv_mult_l_r,Rdiv_mult_r_l,Rdiv_mult_r_r,Rdiv_neg_neg,Rdiv_neg_pos,Rdiv_opp_l,Rdiv_pos_cases,Rdiv_pos_neg,Rdiv_pos_pos,Rexists_between,Rge_gt_or_eq_dec,Rge_gt_or_eq,Rge_lt_dec,Rge_lt_dec,Rgt_le_dec,Rgt_minus_pos,Rgt_or_le,Rgt_or_not_gt,Rinv_0_lt_contravar,Rinv_eq_compat,Rinv_eq_reg,Rinv_lt_0_contravar,Rinv_neg,Rinv_pos,Rle_gt_dec,Rle_half_plus,Rle_lt_or_eq,Rle_or_gt,Rle_or_not_le,Rlt_0_2,Rlt_0_minus,Rlt_ge_dec,Rlt_half_plus,Rlt_minus_0,Rlt_or_ge,Rlt_or_not_lt,Rminus_def,Rminus_diag,Rminus_eq_compat_l,Rminus_eq_compat_r,Rminus_plus_distr,Rminus_plus_l_l,Rminus_plus_l_r,Rminus_plus_r_l,Rminus_plus_r_r,Rmult_div_assoc,Rmult_div_l,Rmult_div_r,Rmult_div_swap,Rmult_gt_reg_r,Rmult_inv_l,Rmult_inv_m_id_r,Rmult_inv_r,Rmult_inv_r_id_l,Rmult_inv_r_id_m,Rmult_inv_r_uniq,Rmult_neg_cases,Rmult_neg_neg,Rmult_neg_pos,Rmult_pos_cases,Rmult_pos_neg,Rmult_pos_pos,Ropp_div_distr_l,Ropp_eq_reg,Ropp_neg,Ropp_pos,Rplus_0_l_uniq,Rplus_eq_0,Rplus_ge_reg_r,Rplus_gt_reg_r,Rplus_minus_assoc,Rplus_minus_l,Rplus_minus_r,Rplus_minus_swap,Rplus_neg_lt,Rplus_neg_neg,Rplus_neg_npos,Rplus_nneg_ge,Rplus_nneg_nneg,Rplus_nneg_pos,Rplus_npos_le,Rplus_npos_neg,Rplus_npos_npos,Rplus_pos_gt,Rplus_pos_nneg,Rplus_pos_pos,Rsqr_deflemmas in
Reals/R_Ifp.v:Int_part_spec,Rplus_Int_part_frac_part,Int_part_frac_part_spec(#17036, by Pierre Rousselin, reviewer Laurent Théry).
Added: lemmas
concat_length,flat_map_length,flat_map_constant_length,list_power_lengthtoLists.List(#17082, by Stefan Haan with help from Olivier Laurent).
Infrastructure and dependencies
Extraction
Version 8.17
Summary of changes
Coq version 8.17 integrates a soundness fix to the Coq kernel along with a few new features and a host of improvements to the Ltac2 language and libraries. We highlight some of the most impactful changes here:
Fixed a logical inconsistency due to
vm_computein presence of side-effects in the enviroment (e.g. usingBackorFail).It is now possible to dynamically enable or disable notations.
Support multiple scopes in
ArgumentsandBind Scope.The tactics chapter of the manual has many improvements in presentation and wording. The documented grammar is semi-automatically checked for consistency with the implementation.
Fixes to the
autoandeautotactics, to respect hint priorities and the documented use ofsimple apply. This is a potentially breaking change.New Ltac2 APIs, deep pattern-matching with
asclauses and handling of literals, support for record types and preterms.Move from
:>to::syntax for declaring typeclass fields as instances, fixing a confusion with declaration of coercions.Standard library improvements.
While Coq supports OCaml 5, users are likely to experience slowdowns ranging from +10% to +50% compared to OCaml 4. Moreover, the
native_computemachinery is not available when Coq is compiled with OCaml 5. Therefore, OCaml 5 support should still be considered experimental and not production-ready.
See the Changes in 8.17.0 section below for the detailed list of changes, including potentially breaking changes marked with Changed. Coq's reference manual for 8.17, documentation of the 8.17 standard library and developer documentation of the 8.17 ML API are also available.
Ali Caglayan, Emilio Jesús Gallego Arias, Gaëtan Gilbert and Théo Zimmermann worked on maintaining and improving the continuous integration system and package building infrastructure.
Erik Martin-Dorel has maintained the Coq Docker images that are used in many Coq projects for continuous integration.
Maxime Dénès, Paolo G. Giarrusso, Huỳnh Trần Khanh, and Laurent Théry have maintained the VsCoq extension for VS Code.
The opam repository for Coq packages has been maintained by Guillaume Claret, Karl Palmskog, Matthieu Sozeau and Enrico Tassi with contributions from many users. A list of packages is available at https://coq.inria.fr/opam/www/.
The Coq Platform has been maintained by Michael Soegtrop, with help from Karl Palmskog, Pierre Roux, Enrico Tassi and Théo Zimmermann.
Our current maintainers are Yves Bertot, Frédéric Besson, Ana Borges, Ali Caglayan, Tej Chajed, Cyril Cohen, Pierre Corbineau, Pierre Courtieu, Maxime Dénès, 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, Guillaume Melquiond, Pierre-Marie Pédrot, Clément Pit-Claudel, Pierre Roux, Kazuhiko Sakaguchi, Vincent Semeria, Michael Soegtrop, Arnaud Spiwack, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov, Li-yao Xia and Théo Zimmermann. See the Coq Team face book page for more details.
The 45 contributors to the 8.17 version are: Reynald Affeldt, Tanaka Akira, Lasse Blaauwbroek, Stephan Boyer, Ali Caglayan, Cyril Cohen, Maxime Dénès, Andrej Dudenhefner, Andres Erbsen, František Farka, Jim Fehrle, Paolo G. Giarrusso, Gaëtan Gilbert, Jason Gross, Alban Gruin, Stefan Haan, Hugo Herbelin, Wolf Honore, Bodo Igler, Jerry James, Emilio Jesús Gallego Arias, Ralf Jung, Jan-Oliver Kaiser, Wojciech Karpiel, Chantal Keller, Thomas Klausner, Olivier Laurent, Yishuai Li, Guillaume Melquiond, Karl Palmskog, Sudha Parimala, Pierre-Marie Pédrot, Valentin Robert, Pierre Roux, Julin S, Dmitry Shachnev, Michael Soegtrop, Matthieu Sozeau, Naveen Srinivasan, Sergei Stepanenko, Karolina Surma, Enrico Tassi, Li-yao Xia and Théo Zimmermann.
The Coq community at large helped improve this new version via the GitHub issue and pull request system, the coq-club@inria.fr mailing list, the Discourse forum and the Coq Zulip chat.
Version 8.17's development spanned 5 months from the release of Coq 8.16.0. Théo Zimmermann is the release manager of Coq 8.17. This release is the result of 414 merged PRs, closing 105 issues.
Changes in 8.17.0
Kernel
Fixed: inconsistency linked to
vm_compute. The fix removes a vulnerable cache, thus it may result in slowdowns whenvm_computeis used repeatedly, if you encounter such slowdowns please report your use case (#16958, fixes #16957, by Gaëtan Gilbert).Fixed: Unexpected anomaly when checking termination of fixpoints containing
matchexpressions with inaccessible branches (#17116, fixes #17073, by Hugo Herbelin).
Specification language, type inference
Changed:
Unused variablewarning triggers even when catching a single case. This warning used to be triggered only when the unused variable was catching at least two cases (#16135, by Pierre Roux).Fixed: Pattern-matching clauses were possibly lost when matching over a constructor from a singleton inductive type in the presence of implicit coercions (#17138, fixes #17137, by Hugo Herbelin).
Fixed: Possible anomaly when using syntax
term.(proj)with projections defined in sections (#17174, fixes #17173, by Hugo Herbelin).
Notations
Changed: When multiple tokens match the beginning of a sequence of characters, the longest matching token not cutting a subsequence of contiguous letters in the middle is used. Previously, this was only the longest matching token. See lexical conventions for details and examples (#16322, fixes #4712, by Hugo Herbelin).
Added:
Enable NotationandDisable Notationcommands to enable or disable previously defined notations (#12324 and #16945, by Hugo Herbelin and Pierre Roux, extending previous work by Lionel Rieg, review by Jim Fehrle).Added: Support for multiple scopes in the
Argumentscommand (#16472, by Pierre Roux, review by Jim Fehrle, Hugo Herbelin and Enrico Tassi).Added: Attributes
add_topandadd_bottomto bind multiple scopes through theBind Scopecommand (#16472, by Pierre Roux, review by Jim Fehrle, Hugo Herbelin and Enrico Tassi).
Tactics
Changed: Documentation in the tactics chapter to give the current correct syntax, consolidate tactic variants for each tactic into a single, unified description for each tactic and many wording improvements. With this change, following similar changes to other chapters in previous releases, the correctness of documented syntax is assured by semi-automated tooling in all chapters except SSReflect (#15015, #16498, and #16659, by Jim Fehrle, reviewed by Théo Zimmermann, with help from many others).
Changed:
eautorespects priorities ofExternhints (#16289, fixes #5163 and #16282, by Andrej Dudenhefner).Changed: less discrepancies between
autohint evaluation andsimple apply,exacttactics (#16293, fixes #16062 and #16323, by Andrej Dudenhefner).Removed:
absurd_hyptactic, that was marked as obsolete 15 years ago. Usecontradictinstead (#16670, by Théo Zimmermann).Removed: the undocumented
progress_evarstactical (#16843, by Théo Zimmermann).Deprecated: the default
intuition_solver(seeintuition) now outputs warningintuition-auto-with-starif it solves a goal withauto with *that was not solved with justauto. In a future version it will be changed to justauto. Useintuition taclocally orLtac Tauto.intuition_solver ::= tacglobally to silence the warning in a forward-compatible way with your choice of tactictac(auto,auto with *,auto withyour prefered databases, or any other tactic) (#16026, by Gaëtan Gilbert).Deprecated:
>clear modifier that could be used in some tactics likeapplyandrewritebut was never documented. Open an issue if you actually depend on this feature (#16407, by Théo Zimmermann).Fixed:
autonow properly updates local hypotheses after hint application (#16302, fixes #15814 and #6332, by Andrej Dudenhefner).Fixed: Make the behavior of
destruct ... using ...more powerful and more similar todestruct ...(#16605, by Lasse Blaauwbroek).Fixed: typeclass inference sometimes caused remaining holes to fail to be detected (#16743, fixes #5239, by Gaëtan Gilbert).
Ltac language
Changed:
Ltacredefinitions (with::=) now respectlocal(#16106, by Gaëtan Gilbert).Changed: In
match goal,match goal with hyp := body : typ |- _is syntax sugar formatch goal with hyp := [ body ] : typ |- _i.e. it matchestypwith the type of the hypothesis rather than matching the body as a cast term. This transformation used to be done with any kind of cast (e.g. VM cast<:) and is now done only for default casts:(#16764, by Gaëtan Gilbert).
Ltac2 language
Changed:
Ltac2.Boolnotations are now in a moduleLtac2.Bool.BoolNotations(exported by default), so that these notations can be imported separately (#16536, by Jason Gross).Changed:
Constr.in_contextenforces that theconstrpassed to it is a type (#16547, fixes #16540, by Gaëtan Gilbert).Changed: goal matching functions from
Ltac2.Pattern(matches_goal,lazy_goal_match0,multi_goal_match0andone_goal_match0) have changed types to support matching hypothesis bodies (#16655, by Gaëtan Gilbert).Added: Deep pattern matching for Ltac2 (#16023, by Gaëtan Gilbert).
Added: patterns for Ltac2 matches:
as, records and literal integers and strings (#16179, by Gaëtan Gilbert).Added: APIs for working with strings:
Message.to_string,String.concat,cat,equal,compare,is_empty(#16217, by Gaëtan Gilbert).Added:
Ltac2.Constr.Unsafe.liftn(#16413, by Jason Gross).Added:
Ltac2.Constr.Unsafe.closedn,Ltac2.Constr.Unsafe.is_closed,Ltac2.Constr.Unsafe.occur_between,Ltac2.Constr.Unsafe.occurn(#16414, by Jason Gross).Added:
Ltac2.List.equal(#16429, by Jason Gross).Added:
Print Ltac2,Print Ltac2 SignaturesandLocatecan now find Ltac2 definitions (#16466, fixes #16418 and #16415, by Gaëtan Gilbert).Added:
Ltac2.Array.for_all2andLtac2.Array.equal(#16535, by Jason Gross).Added:
Ltac2.Constant.equal,Ltac2.Constant.t,Ltac2.Constructor.equal,Ltac2.Constructor.t,Ltac2.Evar.equal,Ltac2.Evar.t,Ltac2.Float.equal,Ltac2.Float.t,Ltac2.Meta.equal,Ltac2.Meta.t,Ltac2.Proj.equal,Ltac2.Proj.t,Ltac2.Uint63.equal,Ltac2.Uint63.t,Ltac2.Char.equal,Ltac2.Char.compare,Ltac2.Constr.Unsafe.Case.equal(#16537, by Jason Gross).Added:
Ltac2.Option.equal(#16538, by Jason Gross).Added: syntax for Ltac2 record update
{ foo with field := bar }(#16552, fixes #10117, by Gaëtan Gilbert).Added: Ltac2 record expressions support punning, i.e.
{ foo; M.bar }is equivalent to{ foo := foo; M.bar := bar }(#16556, by Gaëtan Gilbert).Added:
match! goalsupport for matching hypothesis bodies (#16655, fixes #12803, by Gaëtan Gilbert).Added: quotation and syntax class for preterms (#16740, by Gaëtan Gilbert).
SSReflect
Added: port the additions made to
ssrfun.vandssrbool.vin math-comp PR #872 and PR #874, namely definitionsoliftandpred_oappas well as lemmasall_sig2_cond,compA,obindEapp,omapEbind,omapEapp,omap_comp,oapp_comp,olift_comp,ocan_comp,eqbLR,eqbRL,can_in_pcan,pcan_in_inj,in_inj_comp,can_in_comp,pcan_in_compandocan_in_comp(#16158, by Pierre Roux).
Commands and options
Changed: commands which set tactic options (currently
Firstorder SolverandObligation Tactic, as well as any defined by third party plugins) now supportexportlocality. Note that such commands usingglobalwithoutexportor using no explicit locality outside sections apply their effects when any module containing it (recursively) is imported. This will change in a future version. (#15274, fixes #15072, by Gaëtan Gilbert).Changed:
HintandInstancecommands with no locality attribute are deprecated. Previous versions generated a warning, but this version generates an error by default. This includes allHintcommands described in Creating Hints,Hint Rewrite, andInstance. As mentioned in the error, please add an explicit locality to the hint command. The default was #[global], but we recommend using #[export] where possible (#16004, fixes #13394, by Ali Caglayan).Changed: Transparent obligations generated by
Programdo not produce an implicitHint Unfoldanymore (#16340, by Pierre-Marie Pédrot).Changed:
Print Typeclassesreplaces the undocumentedPrint TypeClassescommand which displays the list of typeclasses (#16690, fixes #16686, by Ali Caglayan).Changed: The -async-proofs-tac-j command line option now accepts the argument 0, which makes
parblock interpreted without spawning any new process (#16837, by Pierre-Marie Pédrot).Removed: the
Program Namingflag, which was introduced as an immediately deprecated option in Coq 8.16 (#16519, by Pierre-Marie Pédrot).Removed: undocumented and broken
Solve Obligationcommand (theSolve Obligationscommand is untouched) (#16842, by Théo Zimmermann).Deprecated
:>syntax, to declare fields of Typeclasses as instances, since it is now replaced by::(seeof_type_inst). This will allow, in a future release, making:>declare Implicit Coercions as it does in record definitions (#16230, fixes #16224, by Pierre Roux, reviewed by Ali Caglayan, Jim Fehrle, Gaëtan Gilbert and Pierre-Marie Pédrot).Added: An improved description of
Proof usingand section variables (#16168, by Jim Fehrle).Added:
::syntax (seeof_type_inst) to declare fields of records as typeclass instances (#16230, fixes #16224, by Pierre Roux, reviewed by Ali Caglayan, Jim Fehrle, Gaëtan Gilbert and Pierre-Marie Pédrot).Added: The
Print Keywordscommand, which prints all the currently-defined parser keywords and tokens (#16438, fixes #16375, by Gaëtan Gilbert).Added:
Print Grammarcan print arbitrary nonterminals or the whole grammar instead of a small adhoc list of nonterminals (#16440, by Gaëtan Gilbert).Fixed:
Fast Name Printingflag no longer causes variable name capture when displaying a goal (#16395, fixes #14141, by Wojciech Karpiel).Fixed:
vm_computeignored thebytecode-compilercommand line flag (#16931, fixes #16929, by Gaëtan Gilbert).Fixed: The
Proof Modecommand now gives an error if the specified proof mode doesn't exist. The command was not previously documented (#16981, fixes #16602, by Jim Fehrle).Fixed: Backtracking over grammar modifications from plugins (such as added commands) (#17069, fixes #12575, by Gaëtan Gilbert).
Fixed: Anomaly instead of regular error on unsupported applied
fixinFunction(#17113, fixes #17110, by Hugo Herbelin).
Command-line tools
Added: New documentation section Coq configuration basics covering use cases such as setting up Coq with opam, where/how to set up source code for your projects and use of _CoqProject (#15888, by Jim Fehrle).
Added: In _CoqProject files, expand paths that are directories to include appropriate files in (sub)directories (#16308, by Jim Fehrle).
Fixed: issues when using
coq_makefileto build targets requiring both.voand.globfiles (typically documentation targets), wheremakewould run multiplecoqcprocesses on the same source file with racy behaviour (only fixed when using amakesupporting "grouped targets" such as GNU Make 4.3) (#16757, by Gaëtan Gilbert).Fixed: Properly process legacy attributes such as
GlobalandPolymorphicin coqdoc to avoid omissions when using the-g(Gallina only) option (#17090, fixes #15933, by Karl Palmskog).
Standard library
Changed: Class
SaturateinZifyCLasses.v,PResnow also takes operands (#16355, by František Farka on behalf of BedRock Systems, Inc.).Changed: For uniformity of naming and ease of remembering,
R_distand theorems mentioningR_distin their name become available with spellingRdist(#16874, by Hugo Herbelin).Removed: from
NatandNsuperfluous lemmasrs_rs',rs'_rs'',rbase,A'A_right,ls_ls',ls'_ls'',rs'_rs'',lbase,A'A_left, and also redundant non-negativity assumptions ingcd_unique,gcd_unique_alt,divide_gcd_iff, andgcd_mul_diag_l(#16203, by Andrej Dudenhefner).Deprecated: notation
_ ~= _forJMeqinCoq.Program.Equality(#16436, by Gaëtan Gilbert).Deprecated: lemma
Finite_altinFinFun.v, which is a weaker version of the newly added lemmaFinite_dec(#16489, fixes #16479, by Bodo Igler, with help from Olivier Laurent).Deprecated:
Zmod,Zdiv_eucl_POS,Zmod_POS_bound,Zmod_pos_bound, andZmod_neg_boundinZArith.Zdiv(#16892, by Andres Erbsen).Deprecated:
Cyclic.ZModulo.ZModulobecause there have been no known use cases for this module and because it does not implementZ/nZfor arbitrarynas one might expect based on the name. The same construction will remain a part of the Coq test suite to ensure consistency ofCyclicAxioms(#16914, by Andres Erbsen).Added: lemmas
Permutation_incl_cons_inv_r,Permutation_pigeonhole,Permutation_pigeonhole_reltoPermutation.v, andForall2_cons_iff,Forall2_length,Forall2_impl,Forall2_flip,Forall_Exists_exists_Forall2toList.v(#15986, by Andrej Dudenhefner, with help from Dominique Larchey-Wendling and Olivier Laurent).Added: modules
Nat.Div0andNat.Lcm0inPeanoNat, andN.Div0andN.Lcm0inBinNatcontaining lemmas regardingdivandmod, which take into accountn div 0 = 0andn mod 0 = n. Strictly weaker lemmas are deprecated, and will be removed in the future. After the weaker lemmas are removed, the modulesDiv0andLcm0will be deprecated, and their contents included directly intoNatandN. Locally, you can useModule Nat := Nat.Div0.orModule Nat := Nat.Lcm0.to approximate this inclusion (#16203, fixes #16186, by Andrej Dudenhefner).Added: lemma
measure_inductioninNatandNanalogous toWf_nat.induction_ltof1, which is compatible with theusingclause for theinductiontactic (#16203, by Andrej Dudenhefner).Added: three lemmata related to finiteness and decidability of equality:
Listing_decidable_eq,Finite_dectoFinFun.vand lemmaNoDup_list_decidabletoListDec.v(#16489, fixes #16479, by Bodo Igler, with help from Olivier Laurent and Andrej Dudenhefner).Added: lemma
not_NoDuptoListDec.vandNoDup_app_remove_l,NoDup_app_remove_rtoList.v(#16588, by Stefan Haan with a lot of help from Olivier Laurent and Ali Caglayan).Added: the
skipn_skipnlemma inLists/List.v(#16632, by Stephan Boyer).Added: lemmas
nth_error_ext,map_repeat,rev_repeattoList.v, andto_list_nil_iff,to_list_injtoVectorSpec.v(#16756, by Stefan Haan).Added: transparent
extgcdto replace opaqueeuclid,euclid_rec,Euclid, andEuclid_introinZnumtheory. Deprecated compatibility wrappers are provided (#16915, by Andres Erbsen).
Infrastructure and dependencies
Changed: Coq is now built entirely using the Dune build system. Packagers and users that build Coq manually must use the new build instructions in the documentation (#15560, by Ali Caglayan, Emilio Jesus Gallego Arias, and Rudi Grinberg).
Changed: Coq is not compiled with OCaml's
-rectypesoption anymore. This means plugins which do not exploit it can also stop passing it to OCaml (#16007, by Gaëtan Gilbert).Changed: Building Coq now requires Dune >= 2.9 (#16118, by Emilio Jesus Gallego Arias).
Changed: Coq Makefile targets
pretty-timed,make-pretty-timed,make-pretty-timed-before,make-pretty-timed-after,print-pretty-timed,print-pretty-timed-diff,print-pretty-single-time-diffnow generate more readable timing tables when absolute paths are used in_CoqProject/ the arguments tocoq_makefile, by stripping off the absolute prefix (#16268, by Jason Gross).Changed: Coq's configure script now defaults to
-native-compiler no. Previously, the default was-native-compiler ondemand, except on Windows. The behavior for users installing through opam does not change, i.e., it is-native-compiler noif thecoq-nativepackage is not installed, and-native-compiler yesotherwise (#16997, by Théo Zimmermann).Removed: the
-coqideswitch toconfigurein Coq's build infrastructure (it stopped controlling what got compiled in the move to dune) (#16512, by Gaëtan Gilbert).Removed: the
-nomacintegrationconfigure flag for CoqIDE. Now CoqIDE will always build with the proper platform-specific integration if available (#16531, by Emilio Jesus Gallego Arias).Added: Coq now supports OCaml 5; note that OCaml 5 is not compatible with Coq's native reduction machine (#15494, #16925, #16947, #16959, #16988, #16991, #16996, #16997, #16999, #17010, and #17015 by Emilio Jesus Gallego Arias, Gaëtan Gilbert, Guillaume Melquiond, Pierre-Marie Pédrot, and others).
Added: OCaml 4.14 is now officially supported (#15867, by Gaëtan Gilbert).
Miscellaneous
Changed: Module names are now added to the loadpath in alphabetical order for each (sub-)directory. Previously they were added in the order of the directory entries (as shown by "ls -U") (#16725, by Jim Fehrle).
Changes in 8.17.1
A variety of bug fixes and improvements to error messages, including:
Fixed: in some cases, coqdep emitted incorrect paths for META files which prevented dune builds for plugins from working correctly (#17270, fixes #16571, by Rodolphe Lepigre).
Fixed: Shadowing of record fields in extraction to OCaml (#17324, fixes #12813 and #14843 and #16677, by Hugo Herbelin).
Fixed: an impossible to turn off debug message "backtracking and redoing byextend on ..." (#17495, fixes #17488, by Gaëtan Gilbert).
Fixed: major memory regression affecting MathComp 2 (#17743, by Enrico Tassi and Pierre Roux).
Version 8.16
Summary of changes
Coq version 8.16 integrates changes to the Coq kernel and performance improvements along with a few new features. We highlight some of the most impactful changes here:
The guard checker (see
Guarded) now ensures strong normalization under any reduction strategy.Irrelevant terms (in the
SPropsort) are now squashed to a dummy value during conversion, fixing a subject reduction issue and making proof conversion faster.Introduction of reversible coercions, which allow coercions relying on meta-level resolution such as type-classes or canonical structures. Also allow coercions that do not fullfill the uniform inheritance condition.
Generalized rewriting support for rewriting with
Type-valued relations and inTypecontexts, using theClasses.CMorphismslibrary.Added the boolean equality scheme command for decidable inductive types.
Added a Print Notation command.
Incompatibilities in name generation for Program obligations,
eautotreatment of tactic failure levels, use ofidentin notations, parsing of module expressions.Standard library reorganization and deprecations.
Improve the treatment of standard library numbers by
Extraction.
See the Changes in 8.16.0 section below for the detailed list of changes, including potentially breaking changes marked with Changed. Coq's reference manual for 8.16, documentation of the 8.16 standard library and developer documentation of the 8.16 ML API are also available.
Ali Caglayan, Emilio Jesús Gallego Arias, Gaëtan Gilbert and Théo Zimmermann worked on maintaining and improving the continuous integration system and package building infrastructure.
Erik Martin-Dorel has maintained the Coq Docker images that are used in many Coq projects for continuous integration.
The opam repository for Coq packages has been maintained by Guillaume Claret, Karl Palmskog, Matthieu Sozeau and Enrico Tassi with contributions from many users. A list of packages is available at https://coq.inria.fr/opam/www/.
The Coq Platform has been maintained by Michael Soegtrop, with help from Karl Palmskog, Enrico Tassi and Théo Zimmermann.
Our current maintainers are Yves Bertot, Frédéric Besson, Ana Borges, Ali Caglayan, Tej Chajed, Cyril Cohen, Pierre Corbineau, Pierre Courtieu, Maxime Dénès, 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, Guillaume Melquiond, Pierre-Marie Pédrot, Clément Pit-Claudel, Pierre Roux, Kazuhiko Sakaguchi, Vincent Semeria, Michael Soegtrop, Arnaud Spiwack, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov, Li-yao Xia and Théo Zimmermann. See the Coq Team face book page for more details.
The 57 contributors to the 8.16 versions are Tanaka Akira, Frédéric Besson, Martin Bodin, Ana Borges, Ali Caglayan, Minki Cho, Cyril Cohen, Juan Conejero, "stop-cran", Adrian Dapprich, Maxime Dénès, Stéphane Desarzens, Christian Doczkal, Andrej Dudenhefner, Andres Erbsen, Jim Fehrle, Emilio Jesús Gallego Arias, Attila Gáspár, Paolo G. Giarrusso, Gaëtan Gilbert, Rudi Grinberg, Jason Gross, Hugo Herbelin, Wolf Honore, Jasper Hugunin, Bart Jacobs, Pierre Jouvelot, Ralf Jung, Grant Jurgensen, Jan-Oliver Kaiser, Wojciech Karpiel, Thomas Klausner, Ethan Kuefner, Fabian Kunze, Olivier Laurent, Yishuai Li, Erik Martin-Dorel, Guillaume Melquiond, Jean-Francois Monin, Pierre-Marie Pédrot, Rudy Peterson, Clément Pit-Claudel, Seth Poulsen, Ramkumar Ramachandra, Pierre Roux, Takafumi Saikawa, Kazuhiko Sakaguchi, Gabriel Scherer, Vincent Semeria, Kartik Singhal, Michael Soegtrop, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov, Li-yao Xia and Théo Zimmermann.
The Coq community at large helped improve this new version via the GitHub issue and pull request system, the coq-club@inria.fr mailing list, the Discourse forum and the Coq Zulip chat.
Version 8.16's development spanned 6 months from the release of Coq 8.15.0. Pierre-Marie Pédrot is the release manager of Coq 8.16. This release is the result of 356 merged PRs, closing 99 issues.
Changes in 8.16.0
Kernel
Changed: Fixpoints are now expected to be guarded even in subterms erasable by reduction, thus getting rid of an artificial obstacle preventing to lift the assumption of weak normalization of Coq to an assumption of strong normalization; for instance (barring implementation bugs) termination of the type-checking algorithm of Coq is now restored (of course, as usual, up to the assumption of the consistency of set theory and type theory, i.e., equivalently, up to the weak normalization of type theory, a "physical" assumption, which has not been contradicted for decades and which specialists commonly believe to be a truth) (#15434, incidentally fixes the complexity issue #5702, by Hugo Herbelin).
Changed: Flag
Unset Guard Checkingnevertheless requires fixpoints to have an argument marked as decreasing in a type which is inductive (#15668, fixes #15621, by Hugo Herbelin).Removed: Template polymorphism is now forbidden for mutual inductive types (#15965, by Gaëtan Gilbert).
Fixed: Inlining of non-logical objects (notations, hints, ...) was missing when applying a functor returning one of its arguments as e.g. in
Module F (E:T) := E(#15412, fixes #15403, by Hugo Herbelin).Fixed: We introduce a new irrelevant term in the reduction machine. It is used to shortcut computation of terms living in a strict proposition, and behaves as an exception. This restores subject reduction, and also makes conversion of large terms in SProp cheap (#15575, fixes #14015, by Pierre-Marie Pédrot).
Fixed: performance blowups while inferring variance information for Cumulative, NonCumulative inductive types (#15662, fixes #11741, by Gaëtan Gilbert).
Specification language, type inference
Added: New clause
as identto theRecordcommand to specify the name of the main argument to use by default in the type of projections (#14563, by Hugo Herbelin).Added: Reversible coercions are coercions which cannot be represented by a regular coercion (a Gallina function) but rather a meta procedure, such as type class inference or canonical structure resolution (#15693, by Cyril Cohen, Pierre Roux, Enrico Tassi, reviewed by Ali Caglayan, Jim Fehrle and Gaëtan Gilbert).
Added: support for coercions not fulfilling the uniform inheritance condition, allowing more freedom for the parameters that are now inferred using unification, canonical structures or typeclasses (#15789, fixes #2828, #4593, #3115, #5222, #9696 and #8540, by Pierre Roux, reviewed by Ali Caglayan, Enrico Tassi, Kazuhiko Sakaguchi and Jim Fehrle).
Fixed: interpretation of
{struct}fixpoint annotations when the principal argument comes from an implicit generalization (#15581, fixes #13157, by Gaëtan Gilbert).
Notations
Removed:
_inidententries in notations, which was deprecated in favor ofnamein 8.13. When you see messages likeError: Notation "[ rel _ _ : _ | _ ]" is already defined at level 0 with arguments name, name, constr, constr while it is now required to be at level 0 with arguments ident, ident, constr, constr.
replace
identwithnamein theNotationcommand. To ease the change, you can fix thedeprecated-ident-entrywarnings in Coq 8.15 (or 8.14 or 8.13). The warning can be turned into an error with-arg -w -arg +deprecated-ident-entryin the_CoqProjectfile (#15754, by Pierre Roux).Added: When defining a recursive notation referring to another recursive notation, expressions of the form
x .. ycan be used where a sequence of binders is expected (#15291, grants #7911, by Hugo Herbelin).Fixed: Coercions are disabled when typechecking parsers and printers of
Number Notation(#15884, fixes #15843, by Pierre Roux).
Tactics
Changed: The
RewriteRelationtype class is now used to declare relations inferable by thesetoid_rewritetactic to constructProperinstances. This can break developments that relied on existingReflexiveinstances to infer relations. The fix is to simply add a (backwards compatible)RewriteRelationdeclaration for the relation. This change allows to set stricter modes on the relation type classesReflexive,Symmetric, etc. (#13969, fixes #7916, by Matthieu Sozeau).Changed: The
setoid_rewritetactic can now properly recognize homogeneous relations applied to types in different universes (#14138, fixes #13618, by Matthieu Sozeau).Changed: The
eautotactic does not propagate internal Ltac failures with level > 0 anymore. Any failure caused by a hint now behaves as if it were a level 0 error (#15215, fixes #15214, by Pierre-Marie Pédrot).Changed:
rewritewhen used to rewrite in multiple hypotheses (egrewrite foo in H,H') requires that the term (foo) does not depend on the hypotheses it rewrites. When usingrewrite in *, this means we only rewrite in hypotheses which do not appear in the term (#15426, fixes #3051 and #15448, by Gaëtan Gilbert).Changed: When it fails,
assert_succeedsfails with the argument tactic's original error instead ofTactic failure: <tactic closure> fails.(#15728, fixes #10970, by Gaëtan Gilbert).Deprecated: the
instantiatetactic without arguments. Since the move to the monadic tactic engine in 8.5, it was behaving as the identity (#15277, by Pierre-Marie Pédrot).Added: generalized rewriting now supports rewriting with (possibly polymorphic) relations valued in
Type. UseClasses.CMorphismsinstead ofClasses.Morphismsto declareProperinstances forrewrite(orsetoid_rewrite) to use when rewriting withTypevalued relations (#14137, fixes #4632, #5384, #5521, #6278, #7675, #8739, #11011, #12240, and #15279, by Matthieu Sozeau helped by Ali Caglayan).Added: Tactics to obtain a micromega cone expression (aka witness) from an already reified goal. Using those tactics, the user can develop their own micromega tactics for their own types, using their own parsers (#15921, by Pierre Roux, reviewed by Frédéric Besson and Jim Fehrle).
Fixed:
typeclasses eautoused with multiple hint databases respects priority differences for hints from separate databases (#15289, fixes #5304, by Gaëtan Gilbert).Fixed:
cbnhas better support for combiningsimpl nomatch,!and/specifiers (c.f.Arguments) (#15657, fixes #3989 and #15206, by Gaëtan Gilbert).
Tactic language
Changed: Ltac
matchdoes not fail when the term to match contains an unfolded primitive projection (#15559, fixes #15554, by Gaëtan Gilbert).Added:
Ltac2understandstoplevel_selectorand obeysDefault Goal Selector. Note thatpar:is buggy when combined withabstract. UnlikeLtac1evenpar: abstract tacis not properly treated (#15378, by Gaëtan Gilbert).Added: Ltac2
Intfunctionsdiv,mod,asr,lsl,lsr,land,lor,lxorandlnot(#15637, by Michael Soegtrop).Fixed: Ltac2
applyandeapplynot unifying with implicit arguments; unification inconsistent withexactandeexact(#15741, by Ramkumar Ramachandra).
SSReflect
Commands and options
Changed:
Modulenow only allows parentheses around module arguments. For instance,Module M := (F X).is now a parsing error (#15355, by Gaëtan Gilbert).Changed:
Failno longer catches anomalies, which it has done since Coq version 8.11. Now it only catches user errors (#15366, by Hugo Herbelin).Changed: Program Definition in universe monomorphic mode does not accept non-extensible universe declarations (#15424, fixes #15410, by Gaëtan Gilbert).
Changed: The algorithm for name generation of anonymous variables for
Programsubproofs is now the same as the one used in the general case. This can create incompatibilities in scripts relying on such autogenerated names. The old scheme can be reactivated using the deprecated flagProgram Naming(#15442, by Pierre-Marie Pédrot).Removed:
Universal Lemma Under Conjunctionflag, that was deprecated in 8.15 (#15268, by Théo Zimmermann).Removed:
Abortno longer takes anidentas an argument (it has been ignored since 8.5) (#15669, by Gaëtan Gilbert).Removed:
Simplexflag, that was deprecated in 8.14.liaandlrawill always use the simplex solver (that was already the default behaviour) (#15690, by Frédéric Besson).Deprecated:
Add LoadPathandAdd Rec LoadPath. If this command is an important feature for you, please open an issue onGitHub <https://github.com/coq/coq/issues>and explain your workflow (#15652, by Gaëtan Gilbert).Deprecated: the
Typeclasses Filtered Unificationflag. Due to a buggy implementation, it is unlikely this is used in the wild (#15752, by Pierre-Marie Pédrot).Added:
Scheme Boolean Equalitycommand to generate the boolean equality for an inductive type whose equality is decidable. It is useful when Coq is able to generate the boolean equality but isn't powerful enough to prove the decidability of equality (unlikeScheme Equality, which tries to prove the decidability of the type) (#15526, by Hugo Herbelin).Added: New more extensive algorithm based on the "parametricity" translation for canonically generating Boolean equalities associated to a decidable inductive type (#15527, by Hugo Herbelin).
Added:
From … Dependencycommand to declare a dependency of a.vfile on an external file. Thecoqdeptool generates build dependencies accordingly (#15650, fixes #15600, by Enrico Tassi).Added:
Print Notationcommand that prints the level and associativity of a given notation definition string (#15683, fixes #14907 and #4436 and #7730, by Ali Caglayan and Ana Borges, with help from Emilio Jesus Gallego Arias).Added: a warning when trying to deprecate a definition (#15760, by Pierre Roux).
Added: A deprecation warning that the
Class >syntax, which currently does nothing, will in the future declare coercions as it does when used inRecordcommands (#15802, by Pierre Roux, reviewed by Gaëtan Gilbert, Ali Caglayan, Jason Gross, Jim Fehrle and Théo Zimmermann).Added: the
nonuniformboolean attribute that silences the non-uniform-inheritance warning when user needs to declare such a coercion on purpose (#15853, by Pierre Roux, reviewed by Gaëtan Gilbert and Jim Fehrle).Added: All commands which can import modules (e.g.
Module Import M.,Module F (Import X : T).,Require Import M., etc) now supportimport_categories.Require ImportandRequire Exportalso supportfiltered_import(#15945, fixes #14872, by Gaëtan Gilbert).Fixed: Make
Require Import M.equivalent toRequire M. Import M.(#15347, fixes #3556, by Maxime Dénès).
Command-line tools
Added: coq_makefile variable
COQPLUGININSTALLto configure the installation of ML plugins (#15788, by Cyril Cohen and Enrico Tassi).Added: Added
-bytecode-compiler yesnoflag forcoqchkenablingvm_computeduring checks, which is off by default (#15886, by Ali Caglayan).Fixed:
coqdocconfused by the presence of commandLoadin a file (#15511, fixes #15497, by Hugo Herbelin).
CoqIDE
Added: Documentation of editing failed async mode proofs, how to configure key bindings and various previously undocumented details (#16070, by Jim Fehrle).
Standard library
Changed: the
signaturescope ofClasses.CMorphismsintosignatureT(#15446, by Olivier Laurent).Changed: the locality of typeclass instances
Permutation_app'andPermutation_consfromglobaltoexport(#15597, fixes #15596, by Gaëtan Gilbert).Removed:
Int63, which was deprecated in favor ofUint63in 8.14 (#15754, by Pierre Roux).Deprecated: some obsolete files from the
Arithpart of the standard library (Div2,Even,Gt,Le,Lt,Max,Min,Minus,Mult,NPeano,Plus). ImportArith_baseinstead of these files. References to items in the deprecated files should be replaced with references toPeanoNat.Natas suggested by the warning messages. Concerning the definitions of parity properties (even and odd), it is recommended to useNat.EvenandNat.Odd. If an inductive definition of parity is required, the mutually inductiveNat.Even_altandNat.Odd_altcan be used. However, induction principles forNat.OddandNat.Evenare available asNat.Even_Odd_indandNat.Odd_Even_ind. The equivalence between the non-inductive and mutually inductive definitions of parity can be found inNat.Even_alt_EvenandNat.Odd_alt_Odd. AllHintdeclarations in thearithdatabase have been moved toArith_prebaseandArith_base. To use the results about Peano arithmetic, we recommend importingPeanoNat(orArith_baseto base it on thearithhint database) and using theNatmodule.Arith_prebasehas been introduced temporarily to ensure compatibility, but it will be removed at the end of the deprecation phase, e.g. in 8.18. Its use is thus discouraged (#14736, #15411, by Olivier Laurent, with help of Karl Palmskog).Deprecated:
identityinductive (replaced by the equivalenteq).Init.Logic_Typeis removed (the only remaining definitionnotTis moved toInit.Logic) (#15256, by Olivier Laurent).Deprecated:
P_Rmin: use more generalRmin_caseinstead (#15388, fixes #15382, by Olivier Laurent).Added: lemma
count_occ_rev(#15397, by Olivier Laurent).Added:
Nat.EvenTandNat.OddT(almost the same asNat.EvenandNat.Oddbut with output inType. Decidability of parity (with outputType) is providedEvenT_OddT_decas well as induction principlesNat.EvenT_OddT_rectandNat.OddT_EvenT_rect(with outputType) (#15427, by Olivier Laurent).Added: Added a proof of
sin x < xfor positivexandx < sin xfor negativex(#15599, by stop-cran).Added: decidability typeclass instances for Z.le, Z.lt, Z.ge and Z.gt, added lemmas Z.geb_ge and Z.gtb_gt (#15620, by Michael Soegtrop).
Added: lemmas
Rinv_inv,Rinv_mult,Rinv_opp,Rinv_div,Rdiv_opp_r,Rsqr_div',Rsqr_inv',sqrt_inv,Rabs_inv,pow_inv,powerRZ_inv',powerRZ_neg',powerRZ_mult,cv_infty_cv_0, which are variants of existing lemmas, but without any hypothesis (#15644, by Guillaume Melquiond).Added: a Leibniz equality test for primitive floats (#15719, by Pierre Roux, reviewed by Guillaume Melquiond).
Added: support for primitive floats in Scheme Boolean Equality (#15719, by Pierre Roux, reviewed by Hugo Herbelin).
Added: lemma
le_add_ltoNAddOrder.v. UseNat.le_add_las replacement for the deprecatedPlus.le_plus_r(#16184, by Andrej Dudenhefner).
Infrastructure and dependencies
Changed: Bumped lablgtk3 lower bound to 3.1.2 (#15947, by Pierre-Marie Pédrot).
Changed: Load plugins using findlib. This requires projects built with
coq_makefileto either provide a hand writtenMETAfile or use the-generate-meta-for-packageoption when applicable. As a consequenceDeclare ML Modulenow uses plugin names according tofindlib, e.g.coq-aac-tactics.plugin.coqdepaccepts-m METAand uses the file to resolve plugin names to actual file names (#15220, fixes #7698, by Enrico Tassi).Changed: Minimum supported zarith version is now 1.11 (#15483 and #16005 and #16030, closes #15496, by Gaëtan Gilbert and Théo Zimmermann and Jason Gross).
Changed: Bump the minimum OCaml version to 4.09.0. As a consequence the minimum supported ocamlfind version is now 1.8.1 (#15947 and #16046, fixes #14260 and #16015, by Pierre-Marie Pédrot and Théo Zimmermann).
Extraction
Changed:
ExtrOCamlInt63no longer extractscomparisontointin OCaml; the extraction ofUint63.compareandSint63.comparewas also adapted accordingly (#15294, fixes #15280, by Li-yao Xia).Changed: Extraction from
natto OCamlintuses Stdlib instead of Pervasives (#15333, by Rudy Nicolo Peterson).Changed: The empty inductive type is now extracted to OCaml empty type available since OCaml 4.07 (#15967, by Pierre Roux).
Added: More extraction definitions for division and comparison of Z and N (#15098, by Li-yao Xia).
Fixed: Type
intin filesNumber.v,Decimal.vandHexadecimal.vhave been renamed tosigned_int(together with a compatibility aliasint) so that they can be used in extraction without conflicting with OCaml'sinttype (#13460, fixes #7017 and #13288, by Hugo Herbelin).
Changes in 8.16.1
Kernel
Fixed: conversion of Prod values in the native compiler (#16651, fixes #16645, by Pierre-Marie Pédrot).
Fixed: Coq 8.16.0 missed
SPropcheck for opaque names in conversion (#16768, fixes #16752, by Hugo Herbelin).Fixed: Pass the correct environment to compute η-expansion of cofixpoints in VM and native compilation (#16845, fixes #16831, by Pierre-Marie Pédrot).
Fixed: inconsistency with conversion of primitive arrays, and associated incomplete strong normalization of primitive arrays with
lazy(#16850, fixes #16829, by Gaëtan Gilbert, reported by Maxime Buyse and Andres Erbsen).
Commands and options
Fixed:
Print Assumptionstreats opaque definitions with missing proofs (as found in.vosfiles, see Compiled interfaces (produced using -vos)) as axioms instead of ignoring them (#16434, fixes #16411, by Gaëtan Gilbert).
CoqIDE
Version 8.15
Summary of changes
Coq version 8.15 integrates many bug fixes, deprecations and cleanups as well as a few new features. We highlight some of the most impactful changes here:
The
apply withtactic no longer renames arguments unless compatibility flagApply With Renamingis set.Improvements to the
autotactic family, fixing theHint Unfoldbehavior, and generalizing the use of discrimination nets.The
typeclasses eautotactic has a new best_effort option allowing it to return partial solutions to a proof search problem, depending on the mode declarations associated to each constraint. This mode is used by typeclass resolution during type inference to provide more precise error messages.Many commands and options were deprecated or removed after deprecation and more consistently support locality attributes.
The
Importcommand is extended withimport_categoriesto select the components of a module to import or not, including features such as hints, coercions, and notations.A visual Ltac debugger is now available in CoqIDE.
See the Changes in 8.15.0 section below for the detailed list of changes, including potentially breaking changes marked with Changed. Coq's reference manual for 8.15, documentation of the 8.15 standard library and developer documentation of the 8.15 ML API are also available.
Emilio Jesús Gallego Arias, Gaëtan Gilbert, Michael Soegtrop and Théo Zimmermann worked on maintaining and improving the continuous integration system and package building infrastructure.
Erik Martin-Dorel has maintained the Coq Docker images that are used in many Coq projects for continuous integration.
The opam repository for Coq packages has been maintained by Guillaume Claret, Karl Palmskog, Matthieu Sozeau and Enrico Tassi with contributions from many users. A list of packages is available at https://coq.inria.fr/opam/www/.
The Coq Platform has been maintained by Michael Soegtrop and Enrico Tassi.
Our current maintainers are Yves Bertot, Frédéric Besson, Ali Caglayan, Tej Chajed, Cyril Cohen, Pierre Corbineau, Pierre Courtieu, Maxime Dénès, 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, Guillaume Melquiond, Pierre-Marie Pédrot, Clément Pit-Claudel, Pierre Roux, Kazuhiko Sakaguchi, Vincent Semeria, Michael Soegtrop, Arnaud Spiwack, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov, Li-yao Xia and Théo Zimmermann. See the Coq Team face book page for more details.
The 41 contributors to this version are Tanaka Akira, Frédéric Besson, Juan Conejero, Ali Caglayan, Cyril Cohen, Adrian Dapprich, Maxime Dénès, Stéphane Desarzens, Christian Doczkal, Andrej Dudenhefner, Jim Fehrle, Emilio Jesús Gallego Arias, Attila Gáspár, Gaëtan Gilbert, Jason Gross, Hugo Herbelin, Jasper Hugunin, Bart Jacobs, Ralf Jung, Grant Jurgensen, Jan-Oliver Kaiser, Wojciech Karpiel, Fabian Kunze, Olivier Laurent, Yishuai Li, Erik Martin-Dorel, Guillaume Melquiond, Jean-Francois Monin, Pierre-Marie Pédrot, Rudy Peterson, Clément Pit-Claudel, Seth Poulsen, Pierre Roux, Takafumi Saikawa, Kazuhiko Sakaguchi, Michael Soegtrop, Matthieu Sozeau, Enrico Tassi, Laurent Théry, Anton Trunov and Théo Zimmerman.
The Coq community at large helped improve the design of this new version via the GitHub issue and pull request system, the Coq development mailing list coqdev@inria.fr, the coq-club@inria.fr mailing list, the Discourse forum and the Coq Zulip chat.
Version 8.15's development spanned 3 months from the release of Coq 8.14.0. Gaëtan Gilbert is the release manager of Coq 8.15. This release is the result of 384 merged PRs, closing 143 issues.