aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore18
-rw-r--r--.gitlab-ci.yml23
-rw-r--r--Makefile.build10
-rw-r--r--Makefile.ci2
-rw-r--r--Makefile.ide58
-rw-r--r--Makefile.install4
-rw-r--r--Makefile.make10
-rw-r--r--configure.ml8
-rw-r--r--dev/build/windows/ReadMe.txt2
-rwxr-xr-xdev/build/windows/makecoq_mingw.sh12
-rwxr-xr-xdev/ci/ci-fiat_crypto.sh4
-rwxr-xr-xdev/ci/ci-fiat_crypto_ocaml.sh8
-rw-r--r--dev/include_printers1
-rwxr-xr-xdev/tools/make-changelog.sh8
-rw-r--r--dev/top_printers.dbg1
-rw-r--r--dev/top_printers.ml1
-rw-r--r--dev/top_printers.mli1
-rw-r--r--doc/changelog/02-specification-language/10202-master+fix8011-stronger-check-on-typability-ltac-env.rst7
-rw-r--r--doc/changelog/02-specification-language/11098-master+arguments-supports-anonymous-implicit.rst8
-rw-r--r--doc/changelog/02-specification-language/11235-non_maximal_implicit.rst6
-rw-r--r--doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst5
-rw-r--r--doc/changelog/02-specification-language/11368-trailing_implicit_error.rst6
-rw-r--r--doc/changelog/02-specification-language/11579-inductive-params.rst7
-rw-r--r--doc/changelog/02-specification-language/11600-uniform-syntax.rst5
-rw-r--r--doc/changelog/02-specification-language/12121-master+fix11903-warn-non-truly-fixpoint.rst5
-rw-r--r--doc/changelog/02-specification-language/12323-master+fix12322-anomaly-implicit-binder-factorization.rst4
-rw-r--r--doc/changelog/02-specification-language/12422-master+fix-12418-cases-anomaly.rst5
-rw-r--r--doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst6
-rw-r--r--doc/changelog/03-notations/11113-remove-compat.rst4
-rw-r--r--doc/changelog/03-notations/11120-master+refactoring-application-printing.rst17
-rw-r--r--doc/changelog/03-notations/11172-master+coercion-notation-interleaved-printing.rst3
-rw-r--r--doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst4
-rw-r--r--doc/changelog/03-notations/11602-master+support-only-parsing-where-clause.rst6
-rw-r--r--doc/changelog/03-notations/11650-parensNew.rst4
-rw-r--r--doc/changelog/03-notations/11848-nicer-decimal-printing.rst5
-rw-r--r--doc/changelog/03-notations/11948-hexadecimal.rst12
-rw-r--r--doc/changelog/03-notations/11986-float-low-level-printing.rst4
-rw-r--r--doc/changelog/03-notations/12163-fix-12159.rst11
-rw-r--r--doc/changelog/03-notations/8808-master+support-binder+term-in-abbrev.rst4
-rw-r--r--doc/changelog/04-tactics/10760-more-rapply.rst8
-rw-r--r--doc/changelog/04-tactics/10998-zify-complements.rst8
-rw-r--r--doc/changelog/04-tactics/11018-lia-in-auto-with-zarith.rst7
-rw-r--r--doc/changelog/04-tactics/11025-nativecompute-timing.rst11
-rw-r--r--doc/changelog/04-tactics/11288-omega+depr.rst6
-rw-r--r--doc/changelog/04-tactics/11362-micromega-fix-11191.rst8
-rw-r--r--doc/changelog/04-tactics/11370-zify-elim-let.rst3
-rw-r--r--doc/changelog/04-tactics/11429-zify-optimisation.rst3
-rw-r--r--doc/changelog/04-tactics/11474-lia-bug-fix-11436.rst9
-rw-r--r--doc/changelog/04-tactics/11522-master+pose-proof-wo-as-syntax.rst6
-rw-r--r--doc/changelog/04-tactics/11760-firstorder-leaf.rst9
-rw-r--r--doc/changelog/04-tactics/11877-master+deprecated-_eqn.rst5
-rw-r--r--doc/changelog/04-tactics/11883-fix-autounfold.rst13
-rw-r--r--doc/changelog/04-tactics/11976-deprecate-omega.rst5
-rw-r--r--doc/changelog/04-tactics/12023-master+fixing-empty-Ltac-v-file.rst6
-rw-r--r--doc/changelog/04-tactics/12129-add-with-strategy.rst4
-rw-r--r--doc/changelog/04-tactics/12146-master+fix10812-subst-failure-section-variables.rst9
-rw-r--r--doc/changelog/04-tactics/12213-zify-Nat.rst3
-rw-r--r--doc/changelog/04-tactics/12256-unfold-dyn-check.rst4
-rw-r--r--doc/changelog/04-tactics/12326-fix11761-functional-induction-throws-unrecoverable-error.rst13
-rw-r--r--doc/changelog/04-tactics/12366-fix-exists.rst7
-rw-r--r--doc/changelog/04-tactics/12399-rm-prolog.rst4
-rw-r--r--doc/changelog/05-tactic-language/10343-issue-10342-ltac2-standard-library.rst4
-rw-r--r--doc/changelog/05-tactic-language/11503-ltac2-rebind-with-value.rst6
-rw-r--r--doc/changelog/05-tactic-language/11740-ltac2-enough.rst4
-rw-r--r--doc/changelog/05-tactic-language/11882-master+ltac2-fresh-in-context.rst6
-rw-r--r--doc/changelog/05-tactic-language/11981-ltac2-eval-notations.rst4
-rw-r--r--doc/changelog/05-tactic-language/12197-ltacprof-multi-success.rst8
-rw-r--r--doc/changelog/05-tactic-language/12254-wit-ref-dyn.rst5
-rw-r--r--doc/changelog/06-ssreflect/8855-master+more-search-options.rst11
-rw-r--r--doc/changelog/07-commands-and-options/07791-deprecate-hint-constr.rst5
-rw-r--r--doc/changelog/07-commands-and-options/10747-canonical-better-message.rst5
-rw-r--r--doc/changelog/07-commands-and-options/11162-local-cs.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11164-let-cs.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11185-remove-typeclasses-axioms-instances.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11258-coherence.rst10
-rw-r--r--doc/changelog/07-commands-and-options/11534-let-with-annotations.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11546-rm-uncheck-template.rst5
-rw-r--r--doc/changelog/07-commands-and-options/11618-loadpath+split_ml_handling.rst9
-rw-r--r--doc/changelog/07-commands-and-options/11663-remove-polymorphic-unqualified.rst6
-rw-r--r--doc/changelog/07-commands-and-options/11665-cumulative-attr.rst11
-rw-r--r--doc/changelog/07-commands-and-options/11746-remove-chapter.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11795-print_implicit_args.rst5
-rw-r--r--doc/changelog/07-commands-and-options/11812-export-hint-globality.rst5
-rw-r--r--doc/changelog/07-commands-and-options/11828-obligations+depr_hide_obligation.rst9
-rw-r--r--doc/changelog/07-commands-and-options/11944-rm-searchabout-cmd.rst3
-rw-r--r--doc/changelog/07-commands-and-options/11972-fix-require-in-section.rst5
-rw-r--r--doc/changelog/07-commands-and-options/12034-cumul-sprop.rst5
-rw-r--r--doc/changelog/07-commands-and-options/12295-master+fix12234-show-proof.rst4
-rw-r--r--doc/changelog/07-commands-and-options/12296-master+fix12234-show-proof-proper.rst5
-rw-r--r--doc/changelog/07-commands-and-options/12358-redirect_printing_params.rst5
-rw-r--r--doc/changelog/07-commands-and-options/8855-master+more-search-options.rst9
-rw-r--r--doc/changelog/08-tools/10592-coqdoc-details.rst5
-rw-r--r--doc/changelog/08-tools/11302-better-timing-scripts-options.rst35
-rw-r--r--doc/changelog/08-tools/11409-mltop+deprecate_use.rst5
-rw-r--r--doc/changelog/08-tools/11523-coqdep+refactor2.rst10
-rw-r--r--doc/changelog/08-tools/11606-memory-in-timing-scripts.rst25
-rw-r--r--doc/changelog/08-tools/11617-toplevel+boot.rst5
-rw-r--r--doc/changelog/08-tools/11851-coqc-flags-fix.rst9
-rw-r--r--doc/changelog/08-tools/12005-remove-deprecated-coqtop-options.rst5
-rw-r--r--doc/changelog/08-tools/12006-issue5632.rst4
-rw-r--r--doc/changelog/08-tools/12026-master+coqdoc-self-linked-defs-wish7093.rst4
-rw-r--r--doc/changelog/08-tools/12027-master+fix3415-coqdoc-record.rst5
-rw-r--r--doc/changelog/08-tools/12033-master+coqdoc-fix7697-passing-binders-location.rst5
-rw-r--r--doc/changelog/08-tools/12037-coqdoc-preformatted.rst6
-rw-r--r--doc/changelog/08-tools/12076-fix-5030.rst4
-rw-r--r--doc/changelog/08-tools/12091-master+coqdoc-css-target.rst4
-rw-r--r--doc/changelog/08-tools/12126-adjust-timed-name.rst8
-rw-r--r--doc/changelog/08-tools/12211-time-ocaml.rst5
-rw-r--r--doc/changelog/08-tools/12368-fix-missing-newline-time-file-maker.rst4
-rw-r--r--doc/changelog/08-tools/12389-coq_makefile.rst5
-rw-r--r--doc/changelog/08-tools/12410-add-fixes.rst4
-rw-r--r--doc/changelog/09-coqide/11414-remove-ide-tactic-menu.rst4
-rw-r--r--doc/changelog/09-coqide/11415-remove-ide-revert-all-buffers.rst4
-rw-r--r--doc/changelog/10-standard-library/11127-trunk.rst2
-rw-r--r--doc/changelog/10-standard-library/11240-rew-dependent.rst5
-rw-r--r--doc/changelog/10-standard-library/11249-ollibs-list-changelog.rst18
-rw-r--r--doc/changelog/10-standard-library/11335-ollibs-wfnat-changelog.rst4
-rw-r--r--doc/changelog/10-standard-library/11350-list.rst5
-rw-r--r--doc/changelog/10-standard-library/11404-removeRList.rst15
-rw-r--r--doc/changelog/10-standard-library/11686-fix-int-notations.rst6
-rw-r--r--doc/changelog/10-standard-library/11725-cleanup-reals.rst6
-rw-r--r--doc/changelog/10-standard-library/1185-sort.rst5
-rw-r--r--doc/changelog/10-standard-library/11880-iter.rst8
-rw-r--r--doc/changelog/10-standard-library/11891-fix-order-notations.rst10
-rw-r--r--doc/changelog/10-standard-library/11909-fix-≡-level.rst7
-rw-r--r--doc/changelog/10-standard-library/11946-ollibs-permutation.rst10
-rw-r--r--doc/changelog/10-standard-library/11957-signotations.rst4
-rw-r--r--doc/changelog/10-standard-library/11992-no-reexports.rst4
-rw-r--r--doc/changelog/10-standard-library/12008-ollibs-bool.rst5
-rw-r--r--doc/changelog/10-standard-library/12014-ollibs-vector.rst10
-rw-r--r--doc/changelog/10-standard-library/12018-master+implb-characterization.rst19
-rw-r--r--doc/changelog/10-standard-library/12031-ollibs-cpermutation.rst4
-rw-r--r--doc/changelog/10-standard-library/12044-issue-12015.rst10
-rw-r--r--doc/changelog/10-standard-library/12073-split-nsatz.rst11
-rw-r--r--doc/changelog/10-standard-library/12119-issue12119.rst5
-rw-r--r--doc/changelog/10-standard-library/12121-master+fix11903-warn-non-truly-fixpoint.rst5
-rw-r--r--doc/changelog/10-standard-library/12162-bool-leb.rst4
-rw-r--r--doc/changelog/10-standard-library/12263-fix-haskell-extraction.rst9
-rw-r--r--doc/changelog/10-standard-library/12287-zero-of-Q.rst4
-rw-r--r--doc/changelog/10-standard-library/12288-constructive-experimental.rst7
-rw-r--r--doc/changelog/10-standard-library/9803-reals.rst14
-rw-r--r--doc/changelog/11-infrastructure-and-dependencies/11245-bye+py2.rst4
-rw-r--r--doc/changelog/11-infrastructure-and-dependencies/12224-gdef_alias.rst6
-rw-r--r--doc/changelog/12-misc/10486-native-string-extraction.rst7
-rw-r--r--doc/changelog/12-misc/11755-exn+tclfail.rst4
-rw-r--r--doc/sphinx/changes.rst971
-rwxr-xr-xdoc/sphinx/conf.py9
-rw-r--r--doc/sphinx/dune2
-rw-r--r--doc/sphinx/language/core/basic.rst2
-rw-r--r--doc/sphinx/practical-tools/utilities.rst4
-rw-r--r--doc/sphinx/using/tools/coqdoc.rst6
-rw-r--r--ide/coq_icon.rc1
-rw-r--r--ide/coqide/FAQ (renamed from ide/FAQ)0
-rw-r--r--ide/coqide/MacOS/Info.plist.template (renamed from ide/MacOS/Info.plist.template)0
-rw-r--r--ide/coqide/MacOS/coqfile.icns (renamed from ide/MacOS/coqfile.icns)bin234599 -> 234599 bytes
-rw-r--r--ide/coqide/MacOS/coqide.icns (renamed from ide/MacOS/coqide.icns)bin326632 -> 326632 bytes
-rw-r--r--ide/coqide/Make (renamed from ide/Make)0
-rw-r--r--ide/coqide/config_lexer.mli (renamed from ide/config_lexer.mli)0
-rw-r--r--ide/coqide/config_lexer.mll (renamed from ide/config_lexer.mll)0
-rw-r--r--ide/coqide/configwin.ml (renamed from ide/configwin.ml)0
-rw-r--r--ide/coqide/configwin.mli (renamed from ide/configwin.mli)0
-rw-r--r--ide/coqide/configwin_ihm.ml (renamed from ide/configwin_ihm.ml)0
-rw-r--r--ide/coqide/configwin_ihm.mli (renamed from ide/configwin_ihm.mli)0
-rw-r--r--ide/coqide/configwin_messages.ml (renamed from ide/configwin_messages.ml)0
-rw-r--r--ide/coqide/configwin_types.ml (renamed from ide/configwin_types.ml)0
-rw-r--r--ide/coqide/coq-ssreflect.lang (renamed from ide/coq-ssreflect.lang)0
-rw-r--r--ide/coqide/coq.ico (renamed from ide/coq.ico)bin11326 -> 11326 bytes
-rw-r--r--ide/coqide/coq.lang (renamed from ide/coq.lang)0
-rw-r--r--ide/coqide/coq.ml (renamed from ide/coq.ml)0
-rw-r--r--ide/coqide/coq.mli (renamed from ide/coq.mli)0
-rw-r--r--ide/coqide/coq.png (renamed from ide/coq.png)bin12907 -> 12907 bytes
-rw-r--r--ide/coqide/coq2.ico (renamed from ide/coq2.ico)bin4710 -> 4710 bytes
-rw-r--r--ide/coqide/coqOps.ml (renamed from ide/coqOps.ml)0
-rw-r--r--ide/coqide/coqOps.mli (renamed from ide/coqOps.mli)0
-rw-r--r--ide/coqide/coq_commands.ml (renamed from ide/coq_commands.ml)0
-rw-r--r--ide/coqide/coq_commands.mli (renamed from ide/coq_commands.mli)0
-rw-r--r--ide/coqide/coq_icon.rc1
-rw-r--r--ide/coqide/coq_lex.mli (renamed from ide/coq_lex.mli)0
-rw-r--r--ide/coqide/coq_lex.mll (renamed from ide/coq_lex.mll)0
-rw-r--r--ide/coqide/coq_style.xml (renamed from ide/coq_style.xml)0
-rw-r--r--ide/coqide/coqide.ml (renamed from ide/coqide.ml)0
-rw-r--r--ide/coqide/coqide.mli (renamed from ide/coqide.mli)0
-rw-r--r--ide/coqide/coqide_QUARTZ.ml.in (renamed from ide/coqide_QUARTZ.ml.in)0
-rw-r--r--ide/coqide/coqide_WIN32.ml.in (renamed from ide/coqide_WIN32.ml.in)0
-rw-r--r--ide/coqide/coqide_X11.ml.in (renamed from ide/coqide_X11.ml.in)0
-rw-r--r--ide/coqide/coqide_main.ml (renamed from ide/coqide_main.ml)0
-rw-r--r--ide/coqide/coqide_main.mli (renamed from ide/coqide_main.mli)0
-rw-r--r--ide/coqide/coqide_os_specific.mli (renamed from ide/coqide_os_specific.mli)0
-rw-r--r--ide/coqide/coqide_ui.ml (renamed from ide/coqide_ui.ml)0
-rw-r--r--ide/coqide/coqide_ui.mli (renamed from ide/coqide_ui.mli)0
-rw-r--r--ide/coqide/default_bindings_src.ml (renamed from ide/default_bindings_src.ml)0
-rw-r--r--ide/coqide/document.ml (renamed from ide/document.ml)0
-rw-r--r--ide/coqide/document.mli (renamed from ide/document.mli)0
-rw-r--r--ide/coqide/dune (renamed from ide/dune)0
-rw-r--r--ide/coqide/fake_ide.ml (renamed from ide/fake_ide.ml)0
-rw-r--r--ide/coqide/fileOps.ml (renamed from ide/fileOps.ml)0
-rw-r--r--ide/coqide/fileOps.mli (renamed from ide/fileOps.mli)0
-rw-r--r--ide/coqide/gtk_parsing.ml (renamed from ide/gtk_parsing.ml)0
-rw-r--r--ide/coqide/gtk_parsing.mli (renamed from ide/gtk_parsing.mli)0
-rw-r--r--ide/coqide/ide.mllib (renamed from ide/ide.mllib)0
-rw-r--r--ide/coqide/ide_common.mllib (renamed from ide/ide_common.mllib)0
-rw-r--r--ide/coqide/ide_win32_stubs.c (renamed from ide/ide_win32_stubs.c)0
-rw-r--r--ide/coqide/idetop.ml (renamed from ide/idetop.ml)0
-rw-r--r--ide/coqide/ideutils.ml (renamed from ide/ideutils.ml)0
-rw-r--r--ide/coqide/ideutils.mli (renamed from ide/ideutils.mli)0
-rw-r--r--ide/coqide/macos_prehook.ml (renamed from ide/macos_prehook.ml)0
-rw-r--r--ide/coqide/macos_prehook.mli (renamed from ide/macos_prehook.mli)0
-rw-r--r--ide/coqide/microPG.ml (renamed from ide/microPG.ml)0
-rw-r--r--ide/coqide/microPG.mli (renamed from ide/microPG.mli)0
-rw-r--r--ide/coqide/minilib.ml (renamed from ide/minilib.ml)0
-rw-r--r--ide/coqide/minilib.mli (renamed from ide/minilib.mli)0
-rw-r--r--ide/coqide/preferences.ml (renamed from ide/preferences.ml)0
-rw-r--r--ide/coqide/preferences.mli (renamed from ide/preferences.mli)0
-rw-r--r--ide/coqide/protocol/dune (renamed from ide/protocol/dune)0
-rw-r--r--ide/coqide/protocol/ideprotocol.mllib (renamed from ide/protocol/ideprotocol.mllib)0
-rw-r--r--ide/coqide/protocol/interface.ml (renamed from ide/protocol/interface.ml)0
-rw-r--r--ide/coqide/protocol/richpp.ml (renamed from ide/protocol/richpp.ml)0
-rw-r--r--ide/coqide/protocol/richpp.mli (renamed from ide/protocol/richpp.mli)0
-rw-r--r--ide/coqide/protocol/serialize.ml (renamed from ide/protocol/serialize.ml)0
-rw-r--r--ide/coqide/protocol/serialize.mli (renamed from ide/protocol/serialize.mli)0
-rw-r--r--ide/coqide/protocol/xml_lexer.mli (renamed from ide/protocol/xml_lexer.mli)0
-rw-r--r--ide/coqide/protocol/xml_lexer.mll (renamed from ide/protocol/xml_lexer.mll)0
-rw-r--r--ide/coqide/protocol/xml_parser.ml (renamed from ide/protocol/xml_parser.ml)0
-rw-r--r--ide/coqide/protocol/xml_parser.mli (renamed from ide/protocol/xml_parser.mli)0
-rw-r--r--ide/coqide/protocol/xml_printer.ml (renamed from ide/protocol/xml_printer.ml)0
-rw-r--r--ide/coqide/protocol/xml_printer.mli (renamed from ide/protocol/xml_printer.mli)0
-rw-r--r--ide/coqide/protocol/xmlprotocol.ml (renamed from ide/protocol/xmlprotocol.ml)0
-rw-r--r--ide/coqide/protocol/xmlprotocol.mli (renamed from ide/protocol/xmlprotocol.mli)0
-rw-r--r--ide/coqide/sentence.ml (renamed from ide/sentence.ml)0
-rw-r--r--ide/coqide/sentence.mli (renamed from ide/sentence.mli)0
-rw-r--r--ide/coqide/session.ml (renamed from ide/session.ml)0
-rw-r--r--ide/coqide/session.mli (renamed from ide/session.mli)0
-rw-r--r--ide/coqide/tags.ml (renamed from ide/tags.ml)0
-rw-r--r--ide/coqide/tags.mli (renamed from ide/tags.mli)0
-rw-r--r--ide/coqide/unicode_bindings.ml (renamed from ide/unicode_bindings.ml)0
-rw-r--r--ide/coqide/unicode_bindings.mli (renamed from ide/unicode_bindings.mli)0
-rw-r--r--ide/coqide/utf8_convert.mli (renamed from ide/utf8_convert.mli)0
-rw-r--r--ide/coqide/utf8_convert.mll (renamed from ide/utf8_convert.mll)0
-rw-r--r--ide/coqide/wg_Command.ml (renamed from ide/wg_Command.ml)0
-rw-r--r--ide/coqide/wg_Command.mli (renamed from ide/wg_Command.mli)0
-rw-r--r--ide/coqide/wg_Completion.ml (renamed from ide/wg_Completion.ml)0
-rw-r--r--ide/coqide/wg_Completion.mli (renamed from ide/wg_Completion.mli)0
-rw-r--r--ide/coqide/wg_Detachable.ml (renamed from ide/wg_Detachable.ml)0
-rw-r--r--ide/coqide/wg_Detachable.mli (renamed from ide/wg_Detachable.mli)0
-rw-r--r--ide/coqide/wg_Find.ml (renamed from ide/wg_Find.ml)0
-rw-r--r--ide/coqide/wg_Find.mli (renamed from ide/wg_Find.mli)0
-rw-r--r--ide/coqide/wg_MessageView.ml (renamed from ide/wg_MessageView.ml)0
-rw-r--r--ide/coqide/wg_MessageView.mli (renamed from ide/wg_MessageView.mli)0
-rw-r--r--ide/coqide/wg_Notebook.ml (renamed from ide/wg_Notebook.ml)0
-rw-r--r--ide/coqide/wg_Notebook.mli (renamed from ide/wg_Notebook.mli)0
-rw-r--r--ide/coqide/wg_ProofView.ml (renamed from ide/wg_ProofView.ml)0
-rw-r--r--ide/coqide/wg_ProofView.mli (renamed from ide/wg_ProofView.mli)0
-rw-r--r--ide/coqide/wg_RoutedMessageViews.ml (renamed from ide/wg_RoutedMessageViews.ml)0
-rw-r--r--ide/coqide/wg_RoutedMessageViews.mli (renamed from ide/wg_RoutedMessageViews.mli)0
-rw-r--r--ide/coqide/wg_ScriptView.ml (renamed from ide/wg_ScriptView.ml)0
-rw-r--r--ide/coqide/wg_ScriptView.mli (renamed from ide/wg_ScriptView.mli)0
-rw-r--r--ide/coqide/wg_Segment.ml (renamed from ide/wg_Segment.ml)0
-rw-r--r--ide/coqide/wg_Segment.mli (renamed from ide/wg_Segment.mli)0
-rw-r--r--plugins/ltac/g_auto.mlg5
-rw-r--r--plugins/ssrsearch/g_search.mlg2
-rw-r--r--pretyping/cases.ml2
-rw-r--r--pretyping/evarconv.ml21
-rw-r--r--pretyping/reductionops.ml552
-rw-r--r--pretyping/reductionops.mli48
-rw-r--r--pretyping/unification.ml2
-rw-r--r--stm/asyncTaskQueue.ml18
-rw-r--r--tactics/cbn.ml797
-rw-r--r--tactics/cbn.mli13
-rw-r--r--tactics/eauto.ml204
-rw-r--r--tactics/eauto.mli2
-rw-r--r--tactics/redexpr.ml6
-rw-r--r--tactics/tactics.mllib1
-rw-r--r--test-suite/bugs/closed/bug_12418.v29
-rwxr-xr-xtest-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/run.sh10
-rw-r--r--test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-after.log.in58
-rw-r--r--test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-before.log.in40
-rw-r--r--test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-both.log.expected5
-rwxr-xr-xtest-suite/coq-makefile/timing/precomputed-time-tests/run.sh1
-rw-r--r--test-suite/output/ErrorLocation_12152_1.v1
-rw-r--r--test-suite/output/ErrorLocation_12152_2.v1
-rw-r--r--test-suite/output/ErrorLocation_12255.v1
-rw-r--r--tools/CoqMakefile.in30
-rw-r--r--tools/TimeFileMaker.py4
-rw-r--r--toplevel/usage.ml4
-rw-r--r--user-contrib/Ltac2/g_ltac2.mlg2
-rw-r--r--vernac/comAssumption.ml3
-rw-r--r--vernac/comFixpoint.ml2
-rw-r--r--vernac/declare.ml137
-rw-r--r--vernac/declare.mli24
-rw-r--r--vernac/mltop.ml3
-rw-r--r--vernac/obligations.mli1
-rw-r--r--vernac/vernacentries.ml7
292 files changed, 2410 insertions, 1653 deletions
diff --git a/.gitignore b/.gitignore
index adbf9dd189..0c7a8f70f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,14 +121,14 @@ doc/unreleased.rst
coqpp/coqpp_lex.ml
dev/ocamlweb-doc/lex.ml
-ide/coq_lex.ml
-ide/config_lexer.ml
-ide/utf8_convert.ml
+ide/coqide/coq_lex.ml
+ide/coqide/config_lexer.ml
+ide/coqide/utf8_convert.ml
tools/coqwc.ml
tools/coqdep_lexer.ml
tools/ocamllibdep.ml
tools/coqdoc/cpretty.ml
-ide/protocol/xml_lexer.ml
+ide/coqide/protocol/xml_lexer.ml
# .mly files
@@ -143,7 +143,7 @@ plugins/ltac/coretactics.ml
plugins/ltac/extratactics.ml
plugins/ltac/extraargs.ml
plugins/ltac/profile_ltac_tactics.ml
-ide/coqide_os_specific.ml
+ide/coqide/coqide_os_specific.ml
plugins/ssrmatching/ssrmatching.ml
plugins/ssr/ssrparser.ml
plugins/ssr/ssrvernac.ml
@@ -155,9 +155,9 @@ kernel/byterun/coq_jumptbl.h
kernel/genOpcodeFiles.exe
kernel/copcodes.ml
kernel/uint63.ml
-ide/default.bindings
-ide/default_bindings_src.exe
-ide/index_urls.txt
+ide/coqide/default.bindings
+ide/coqide/default_bindings_src.exe
+ide/coqide/index_urls.txt
.lia.cache
.nia.cache
@@ -187,4 +187,4 @@ META.coq
*.install
!Makefile.install
-ide/coqide.keys
+ide/coqide/coqide.keys
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4ec1fd951f..5e36034554 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ stages:
- stage-2 # Only dependencies in stage 1
- stage-3 # Only dependencies in stage 1 and 2
- stage-4 # Only dependencies in stage 1, 2 and 3
+ - stage-5 # Only dependencies in stage 1, 2, 3, and 4
- deploy
# When a job has no dependencies, it goes to stage 1. Otherwise, we
@@ -704,12 +705,13 @@ library:ci-engine_bench:
library:ci-fcsl_pcm:
extends: .ci-template
-# We cannot use flambda due to
-# https://github.com/ocaml/ocaml/issues/7842, see
-# https://github.com/coq/coq/pull/11916#issuecomment-609977375
library:ci-fiat_crypto:
- extends: .ci-template
+ extends: .ci-template-flambda
stage: stage-4
+ artifacts:
+ name: "$CI_JOB_NAME"
+ paths:
+ - _build_ci
needs:
- build:edge+flambda
- library:ci-coqprime
@@ -720,6 +722,19 @@ library:ci-fiat_crypto:
- library:ci-coqprime
- plugin:ci-rewriter
+# We cannot use flambda due to
+# https://github.com/ocaml/ocaml/issues/7842, see
+# https://github.com/coq/coq/pull/11916#issuecomment-609977375
+library:ci-fiat_crypto_ocaml:
+ extends: .ci-template
+ stage: stage-5
+ needs:
+ - build:edge+flambda
+ - library:ci-fiat_crypto
+ dependencies:
+ - build:edge+flambda
+ - library:ci-fiat_crypto
+
library:ci-flocq:
extends: .ci-template-flambda
artifacts:
diff --git a/Makefile.build b/Makefile.build
index 3140df4cee..7806dce79c 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -254,7 +254,7 @@ OCAMLOPT = $(TIMER) $(OCAMLFIND) opt $(CAMLFLAGS)
BYTEFLAGS=$(CAMLDEBUG) $(USERFLAGS)
OPTFLAGS=$(CAMLDEBUGOPT) $(CAMLTIMEPROF) $(USERFLAGS) $(FLAMBDA_FLAGS)
-DEPFLAGS=$(LOCALINCLUDES) -map gramlib/.pack/gramlib.ml $(if $(filter plugins/% user-contrib/%,$@),, -I ide -I ide/protocol)
+DEPFLAGS=$(LOCALINCLUDES) -map gramlib/.pack/gramlib.ml $(if $(filter plugins/% user-contrib/%,$@),, -I ide/coqide -I ide/coqide/protocol)
# On MacOS, the binaries are signed, except our private ones
ifeq ($(shell which codesign > /dev/null 2>&1 && echo $(ARCH)),Darwin)
@@ -555,15 +555,15 @@ $(COQWORKMGRBYTE): $(COQWORKMGRCMO)
# fake_ide : for debugging or test-suite purpose, a fake ide simulating
# a connection to coqidetop
-FAKEIDECMO:=config/config.cma clib/clib.cma lib/lib.cma ide/protocol/ideprotocol.cma ide/document.cmo ide/fake_ide.cmo
+FAKEIDECMO:=config/config.cma clib/clib.cma lib/lib.cma ide/coqide/protocol/ideprotocol.cma ide/coqide/document.cmo ide/coqide/fake_ide.cmo
$(FAKEIDE): $(call bestobj, $(FAKEIDECMO)) | $(IDETOPEXE)
$(SHOW)'OCAMLBEST -o $@'
- $(HIDE)$(call bestocaml, -I ide -I ide/protocol -package str -package dynlink)
+ $(HIDE)$(call bestocaml, -I ide/coqide -I ide/coqide/protocol -package str -package dynlink)
$(FAKEIDEBYTE): $(FAKEIDECMO) | $(IDETOPBYTE)
$(SHOW)'OCAMLC -o $@'
- $(HIDE)$(call ocamlbyte, -I ide -package str,unix,threads)
+ $(HIDE)$(call ocamlbyte, -I ide/coqide -package str,unix,threads)
# votour: a small vo explorer (based on the checker)
@@ -692,7 +692,7 @@ kernel/kernel.cmxa: kernel/kernel.mllib
$(SHOW)'OCAMLOPT -pack -o $@'
$(HIDE)$(OCAMLOPT) $(MLINCLUDES) $(OPTFLAGS) -pack -o $@ $(filter-out %.mlpack, $^)
-COND_IDEFLAGS=$(if $(filter ide/fake_ide% tools/coq_makefile%,$<), -I ide -I ide/protocol,)
+COND_IDEFLAGS=$(if $(filter ide/coqide/fake_ide% tools/coq_makefile%,$<), -I ide/coqide -I ide/coqide/protocol,)
COND_PRINTERFLAGS=$(if $(filter dev/%,$<), -I dev,)
COND_GRAMFLAGS=$(if $(filter gramlib/.pack/%,$<),-no-alias-deps -w -49,) $(if $(filter gramlib/.pack/gramlib__%,$<),-open Gramlib,)
diff --git a/Makefile.ci b/Makefile.ci
index 9b7008f765..9231fa6fed 100644
--- a/Makefile.ci
+++ b/Makefile.ci
@@ -28,6 +28,7 @@ CI_TARGETS= \
ci-equations \
ci-fcsl_pcm \
ci-fiat_crypto \
+ ci-fiat_crypto_ocaml \
ci-fiat_parsers \
ci-flocq \
ci-geocoq \
@@ -72,6 +73,7 @@ ci-corn: ci-math_classes
ci-mtac2: ci-unicoq
ci-fiat_crypto: ci-coqprime ci-rewriter
+ci-fiat_crypto_ocaml: ci-fiat_crypto
ci-simple_io: ci-ext_lib
ci-quickchick: ci-ext_lib ci-simple_io
diff --git a/Makefile.ide b/Makefile.ide
index ef9d67d4ec..640ee7b188 100644
--- a/Makefile.ide
+++ b/Makefile.ide
@@ -13,13 +13,13 @@
## NB: For the moment, the build system of CoqIDE is part of
## the one of Coq. In particular, this Makefile.ide is included in
## Makefile.build. Please ensure that the rules define here are
-## indeed specific to files of the form ide/*
+## indeed specific to files of the form ide/coqide/*
## Coqide-related variables set by ./configure in config/Makefile
#HASCOQIDE : opt / byte / no
#IDEFLAGS : some extra cma, for instance
-#IDEOPTCDEPS : on windows, ide/ide_win32_stubs.o ide/coq_icon.o
+#IDEOPTCDEPS : on windows, ide/coqide/ide_win32_stubs.o ide/coqide/coq_icon.o
#IDECDEPS
#IDECDEPSFLAGS
#IDEINT : X11 / QUARTZ / WIN32
@@ -34,11 +34,11 @@ COQIDEINAPP:=$(COQIDEAPP)/Contents/MacOS/coqide
## CoqIDE source directory and files
# Note : for just building bin/coqide, we could only consider
-# config, lib, ide and ide/utils. But the coqidetop plugin (the
+# config, lib, ide/coqide and ide/coqide/utils. But the coqidetop plugin (the
# one that will be loaded by coqidetop) refers to some
# core modules of coq, for instance printing/*.
-IDESRCDIRS:= $(CORESRCDIRS) ide ide/protocol
+IDESRCDIRS:= $(CORESRCDIRS) ide/coqide ide/coqide/protocol
ifeq ($(HASCOQIDE),no)
COQIDEFLAGS=$(addprefix -I , $(IDESRCDIRS))
@@ -46,20 +46,20 @@ else
COQIDEFLAGS=$(addprefix -I , $(IDESRCDIRS)) -package lablgtk3-sourceview3
endif
-IDEDEPS:=config/config.cma clib/clib.cma lib/lib.cma ide/protocol/ideprotocol.cma
-IDECMA:=ide/ide.cma
+IDEDEPS:=config/config.cma clib/clib.cma lib/lib.cma ide/coqide/protocol/ideprotocol.cma
+IDECMA:=ide/coqide/ide.cma
IDETOPEXE=bin/coqidetop$(EXE)
IDETOP=bin/coqidetop.opt$(EXE)
IDETOPBYTE=bin/coqidetop.byte$(EXE)
-LINKIDE:=$(IDEDEPS) $(IDECDEPS) $(IDECMA) ide/coqide_os_specific.cmo ide/coqide_main.mli ide/coqide_main.ml
-LINKIDEOPT:=$(IDEOPTCDEPS) $(patsubst %.cma,%.cmxa,$(IDEDEPS:.cmo=.cmx)) $(IDECMA:.cma=.cmxa) ide/coqide_os_specific.cmx ide/coqide_main.mli ide/coqide_main.ml
+LINKIDE:=$(IDEDEPS) $(IDECDEPS) $(IDECMA) ide/coqide/coqide_os_specific.cmo ide/coqide/coqide_main.mli ide/coqide/coqide_main.ml
+LINKIDEOPT:=$(IDEOPTCDEPS) $(patsubst %.cma,%.cmxa,$(IDEDEPS:.cmo=.cmx)) $(IDECMA:.cma=.cmxa) ide/coqide/coqide_os_specific.cmx ide/coqide/coqide_main.mli ide/coqide/coqide_main.ml
-IDEBINDINGS:=ide/default.bindings
-IDEBINDINGSSRC:=ide/default_bindings_src.ml
-IDEBINDINGSEXE:=ide/default_bindings_src.exe
+IDEBINDINGS:=ide/coqide/default.bindings
+IDEBINDINGSSRC:=ide/coqide/default_bindings_src.ml
+IDEBINDINGSEXE:=ide/coqide/default_bindings_src.exe
-IDEFILES=$(wildcard ide/*.lang) ide/coq_style.xml ide/coq.png $(IDEBINDINGS)
+IDEFILES=$(wildcard ide/coqide/*.lang) ide/coqide/coq_style.xml ide/coqide/coq.png $(IDEBINDINGS)
## GTK for Coqide MacOS bundle
@@ -118,49 +118,49 @@ $(COQIDEBYTE): $(LINKIDE)
$(HIDE)$(OCAMLC) $(COQIDEFLAGS) $(BYTEFLAGS) -o $@ \
-linkpkg -package str,unix,threads,lablgtk3-sourceview3 $(IDEFLAGS) $(IDECDEPSFLAGS) $^
-ide/coqide_os_specific.ml: ide/coqide_$(IDEINT).ml.in config/Makefile
+ide/coqide/coqide_os_specific.ml: ide/coqide/coqide_$(IDEINT).ml.in config/Makefile
rm -f $@ && cp $< $@ && chmod a-w $@
-ide/%.cmi: ide/%.mli
+ide/coqide/%.cmi: ide/coqide/%.mli
$(SHOW)'OCAMLC $<'
$(HIDE)$(OCAMLC) $(COQIDEFLAGS) $(BYTEFLAGS) -c $<
-ide/%.cmo: ide/%.ml
+ide/coqide/%.cmo: ide/coqide/%.ml
$(SHOW)'OCAMLC $<'
$(HIDE)$(OCAMLC) $(COQIDEFLAGS) $(BYTEFLAGS) -c $<
-ide/%.cmx: ide/%.ml
+ide/coqide/%.cmx: ide/coqide/%.ml
$(SHOW)'OCAMLOPT $<'
$(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -c $<
# We need to compile this file without -safe-string due mess with
# lablgtk API. Other option is to require lablgtk >= 3.0.0
-ide/ideutils.cmo: ide/ideutils.ml
+ide/coqide/ideutils.cmo: ide/coqide/ideutils.ml
$(SHOW)'OCAMLC $<'
$(HIDE)$(filter-out -safe-string,$(OCAMLC)) $(COQIDEFLAGS) $(BYTEFLAGS) -c $<
-ide/ideutils.cmx: ide/ideutils.ml
+ide/coqide/ideutils.cmx: ide/coqide/ideutils.ml
$(SHOW)'OCAMLOPT $<'
$(HIDE)$(filter-out -safe-string,$(OCAMLOPT)) $(COQIDEFLAGS) $(filter-out -safe-string,$(OPTFLAGS)) -c $<
-IDETOPCMA:=ide/ide_common.cma
+IDETOPCMA:=ide/coqide/ide_common.cma
IDETOPCMX:=$(IDETOPCMA:.cma=.cmxa)
# Special rule for coqidetop
$(IDETOPEXE): $(IDETOP:.opt=.$(BEST))
rm -f $@ && cp $< $@
-$(IDETOP): ide/idetop.ml $(LINKCMX) $(LIBCOQRUN) $(IDETOPCMX)
+$(IDETOP): ide/coqide/idetop.ml $(LINKCMX) $(LIBCOQRUN) $(IDETOPCMX)
$(SHOW)'COQMKTOP -o $@'
- $(HIDE)$(OCAMLOPT) -linkall -linkpkg $(MLINCLUDES) -I ide -I ide/protocol/ \
+ $(HIDE)$(OCAMLOPT) -linkall -linkpkg $(MLINCLUDES) -I ide/coqide -I ide/coqide/protocol/ \
$(SYSMOD) \
$(LINKCMX) $(IDETOPCMX) $(OPTFLAGS) $(LINKMETADATA) $< -o $@
$(STRIP_HIDE) $@
$(CODESIGN_HIDE) $@
-$(IDETOPBYTE): ide/idetop.ml $(LINKCMO) $(LIBCOQRUN) $(IDETOPCMA)
+$(IDETOPBYTE): ide/coqide/idetop.ml $(LINKCMO) $(LIBCOQRUN) $(IDETOPCMA)
$(SHOW)'COQMKTOP -o $@'
- $(HIDE)$(OCAMLC) -linkall -linkpkg $(MLINCLUDES) -I ide -I ide/protocol/ \
+ $(HIDE)$(OCAMLC) -linkall -linkpkg $(MLINCLUDES) -I ide/coqide -I ide/coqide/protocol/ \
-I kernel/byterun/ -cclib -lcoqrun $(VMBYTEFLAGS) \
$(SYSMOD) \
$(LINKCMO) $(IDETOPCMA) $(BYTEFLAGS) $< -o $@
@@ -219,12 +219,12 @@ endif
install-ide-files: #Please update $(COQIDEAPP)/Contents/Resources/ at the same time
$(MKDIR) $(FULLDATADIR)
- $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $(IDEBINDINGS) $(FULLDATADIR)
+ $(INSTALLLIB) ide/coqide/coq.png ide/coqide/*.lang ide/coqide/coq_style.xml $(IDEBINDINGS) $(FULLDATADIR)
$(MKDIR) $(FULLCONFIGDIR)
install-ide-info:
$(MKDIR) $(FULLDOCDIR)
- $(INSTALLLIB) ide/FAQ $(FULLDOCDIR)/FAQ-CoqIde
+ $(INSTALLLIB) ide/coqide/FAQ $(FULLDOCDIR)/FAQ-CoqIde
###########################################################################
# CoqIde MacOS special targets
@@ -235,10 +235,10 @@ install-ide-info:
$(COQIDEAPP)/Contents:
rm -rdf $@
$(MKDIR) $@
- sed -e "s/VERSION/$(VERSION4MACOS)/g" ide/MacOS/Info.plist.template > $@/Info.plist
+ sed -e "s/VERSION/$(VERSION4MACOS)/g" ide/coqide/MacOS/Info.plist.template > $@/Info.plist
$(MKDIR) "$@/MacOS"
-$(COQIDEINAPP): ide/macos_prehook.cmx $(LINKIDEOPT) | $(COQIDEAPP)/Contents
+$(COQIDEINAPP): ide/coqide/macos_prehook.cmx $(LINKIDEOPT) | $(COQIDEAPP)/Contents
$(SHOW)'OCAMLOPT -o $@'
$(HIDE)$(OCAMLOPT) $(COQIDEFLAGS) $(OPTFLAGS) -o $@ \
-linkpkg -package str,unix,threads,lablgtk3-sourceview3 $(IDEFLAGS:.cma=.cmxa) $^
@@ -246,7 +246,7 @@ $(COQIDEINAPP): ide/macos_prehook.cmx $(LINKIDEOPT) | $(COQIDEAPP)/Contents
$(COQIDEAPP)/Contents/Resources/share: $(COQIDEAPP)/Contents
$(MKDIR) $@/coq/
- $(INSTALLLIB) ide/coq.png ide/*.lang ide/coq_style.xml $(IDEBINDINGS) $@/coq/
+ $(INSTALLLIB) ide/coqide/coq.png ide/coqide/*.lang ide/coqide/coq_style.xml $(IDEBINDINGS) $@/coq/
$(MKDIR) $@/gtksourceview-3.0/{language-specs,styles}
$(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-3.0/language-specs/{def.lang,language2.rng} $@/gtksourceview-3.0/language-specs/
$(INSTALLLIB) "$(SOURCEVIEWSHARE)/"gtksourceview-3.0/styles/{styles.rng,classic.xml} $@/gtksourceview-3.0/styles/
@@ -287,7 +287,7 @@ $(COQIDEAPP)/Contents/Resources/lib: $(COQIDEAPP)/Contents/Resources/immodules $
done
$(COQIDEAPP)/Contents/Resources:$(COQIDEAPP)/Contents/Resources/etc $(COQIDEAPP)/Contents/Resources/share
- $(INSTALLLIB) ide/MacOS/*.icns $@
+ $(INSTALLLIB) ide/coqide/MacOS/*.icns $@
$(COQIDEAPP):$(COQIDEAPP)/Contents/Resources
$(CODESIGN_HIDE) $@
diff --git a/Makefile.install b/Makefile.install
index cc0888d8e4..4977bb38e1 100644
--- a/Makefile.install
+++ b/Makefile.install
@@ -91,12 +91,12 @@ install-tools:
# - the ones corresponding to packed plugins
INSTALLCMI = $(sort \
- $(filter-out checker/% ide/% tools/%, $(MLIFILES:.mli=.cmi)) \
+ $(filter-out checker/% ide/coqide/% tools/%, $(MLIFILES:.mli=.cmi)) \
$(GRAMMLIFILES:.mli=.cmi) gramlib/.pack/gramlib.cmi \
$(foreach lib,$(CORECMA), $(addsuffix .cmi,$($(lib:.cma=_MLLIB_DEPENDENCIES))))) \
$(PLUGINS:.cmo=.cmi)
-INSTALLCMX = $(sort $(filter-out checker/% ide/% tools/% dev/% \
+INSTALLCMX = $(sort $(filter-out checker/% ide/coqide/% tools/% dev/% \
configure.cmx toplevel/coqtop_byte_bin.cmx plugins/extraction/big.cmx, \
$(GRAMMLFILES:.ml=.cmx) $(MLFILES:.ml=.cmx)))
diff --git a/Makefile.make b/Makefile.make
index 2a0a58756c..7191738612 100644
--- a/Makefile.make
+++ b/Makefile.make
@@ -107,7 +107,7 @@ GRAMMLIFILES := $(addsuffix .mli, $(GRAMFILES))
GENGRAMMLFILES := $(GRAMMLFILES) gramlib/.pack/gramlib.ml # why is gramlib.ml not in GRAMMLFILES?
GENMLGFILES:= $(MLGFILES:.mlg=.ml)
-GENMLFILES:=$(LEXFILES:.mll=.ml) $(YACCFILES:.mly=.ml) $(GENMLGFILES) $(GENGRAMMLFILES) ide/coqide_os_specific.ml kernel/copcodes.ml kernel/uint63.ml
+GENMLFILES:=$(LEXFILES:.mll=.ml) $(YACCFILES:.mly=.ml) $(GENMLGFILES) $(GENGRAMMLFILES) ide/coqide/coqide_os_specific.ml kernel/copcodes.ml kernel/uint63.ml
GENMLIFILES:=$(GRAMMLIFILES)
GENHFILES:=kernel/byterun/coq_instruct.h kernel/byterun/coq_jumptbl.h
GENFILES:=$(GENMLFILES) $(GENMLIFILES) $(GENHFILES) kernel/genOpcodeFiles.exe
@@ -262,10 +262,10 @@ optclean:
clean-ide:
rm -f $(COQIDECMO) $(COQIDECMX) $(COQIDECMO:.cmo=.cmi) $(COQIDEBYTE) $(COQIDE)
- rm -f ide/input_method_lexer.ml
- rm -f ide/highlight.ml ide/config_lexer.ml ide/config_parser.mli ide/config_parser.ml
- rm -f ide/utf8_convert.ml
- rm -f ide/default.bindings ide/default_bindings_src.exe
+ rm -f ide/coqide/input_method_lexer.ml
+ rm -f ide/coqide/highlight.ml ide/coqide/config_lexer.ml ide/coqide/config_parser.mli ide/coqide/config_parser.ml
+ rm -f ide/coqide/utf8_convert.ml
+ rm -f ide/coqide/default.bindings ide/coqide/default_bindings_src.exe
rm -rf $(COQIDEAPP)
mlgclean:
diff --git a/configure.ml b/configure.ml
index 9cfa9d409e..c05844198b 100644
--- a/configure.ml
+++ b/configure.ml
@@ -81,7 +81,7 @@ let read_lines_and_close fd =
(** Run some unix command and read the first line of its output.
We avoid Unix.open_process and its non-fully-portable /bin/sh,
especially when it comes to quoting the filenames.
- See open_process_pid in ide/coq.ml for more details.
+ See open_process_pid in ide/coqide/coq.ml for more details.
Error messages:
- if err=StdErr, any error message goes in the stderr of our script.
- if err=StdOut, we merge stderr and stdout (just as 2>&1).
@@ -784,7 +784,7 @@ let coqide_flags () =
idearchdef := "QUARTZ"
end
| "opt", "win32" ->
- idearchfile := "ide/ide_win32_stubs.o ide/coq_icon.o";
+ idearchfile := "ide/coqide/ide_win32_stubs.o ide/coqide/coq_icon.o";
idecdepsflags := "-custom";
idearchflags := "-ccopt '-subsystem windows'";
idearchdef := "WIN32"
@@ -847,9 +847,9 @@ let install = [
"COQLIBINSTALL", "the Coq library", !prefs.libdir,
Relative "lib", Relative "lib/coq", Relative "";
"CONFIGDIR", "the Coqide configuration files", !prefs.configdir,
- Relative "config", Absolute "/etc/xdg/coq", Relative "ide";
+ Relative "config", Absolute "/etc/xdg/coq", Relative "ide/coqide";
"DATADIR", "the Coqide data files", !prefs.datadir,
- Relative "share", Relative "share/coq", Relative "ide";
+ Relative "share", Relative "share/coq", Relative "ide/coqide";
"MANDIR", "the Coq man pages", !prefs.mandir,
Relative "man", Relative "share/man", Relative "man";
"DOCDIR", "the Coq documentation", !prefs.docdir,
diff --git a/dev/build/windows/ReadMe.txt b/dev/build/windows/ReadMe.txt
index 052014824f..f34bbea4e9 100644
--- a/dev/build/windows/ReadMe.txt
+++ b/dev/build/windows/ReadMe.txt
@@ -423,7 +423,7 @@ Binary file ./bin/ocpp5.exe matches
Binary file ./lib/config/coq_config.cmo matches
Binary file ./lib/config/coq_config.o matches
Binary file ./lib/grammar/grammar.cma matches
-Binary file ./lib/ide/ide_win32_stubs.o matches
+Binary file ./lib/ide/coqide/ide_win32_stubs.o matches
Binary file ./lib/lib/clib.a matches
Binary file ./lib/lib/clib.cma matches
Binary file ./lib/libcoqrun.a matches
diff --git a/dev/build/windows/makecoq_mingw.sh b/dev/build/windows/makecoq_mingw.sh
index 963b0e6387..ba552ab302 100755
--- a/dev/build/windows/makecoq_mingw.sh
+++ b/dev/build/windows/makecoq_mingw.sh
@@ -1303,11 +1303,11 @@ function copy_coq_gtk {
install -D -T "$PREFIXMINGW/share/glib-2.0/schemas/gschemas.compiled" "$PREFIXCOQ/share/glib-2.0/schemas/gschemas.compiled"
install_glob "$PREFIXMINGW/share/gtksourceview-3.0/language-specs" '*' "$PREFIXCOQ/share/gtksourceview-3.0/language-specs"
- install -D -T "ide/coq.lang" "$PREFIXCOQ/share/gtksourceview-3.0/language-specs/coq.lang"
- install -D -T "ide/coq-ssreflect.lang" "$PREFIXCOQ/share/gtksourceview-3.0/language-specs/coq-ssreflect.lang"
+ install -D -T "ide/coqide/coq.lang" "$PREFIXCOQ/share/gtksourceview-3.0/language-specs/coq.lang"
+ install -D -T "ide/coqide/coq-ssreflect.lang" "$PREFIXCOQ/share/gtksourceview-3.0/language-specs/coq-ssreflect.lang"
install_glob "$PREFIXMINGW/share/gtksourceview-3.0/styles" '*' "$PREFIXCOQ/share/gtksourceview-3.0/styles"
- install -D -T "ide/coq_style.xml" "$PREFIXCOQ/share/gtksourceview-3.0/styles/coq_style.xml"
+ install -D -T "ide/coqide/coq_style.xml" "$PREFIXCOQ/share/gtksourceview-3.0/styles/coq_style.xml"
install_rec "$PREFIXMINGW/share/themes" '*' "$PREFIXCOQ/share/themes"
@@ -1340,8 +1340,8 @@ function copy_coq_gtk {
# COQSHARE="$PREFIXCOQ/share/"
# fi
- # mkdir -p "$PREFIXCOQ/ide"
- # mv "$COQSHARE"*.png "$PREFIXCOQ/ide"
+ # mkdir -p "$PREFIXCOQ/ide/coqide"
+ # mv "$COQSHARE"*.png "$PREFIXCOQ/ide/coqide"
# rmdir "$PREFIXCOQ/share/coq" || true
fi
}
@@ -1598,7 +1598,7 @@ function make_coq_installer {
cp ../patches/ReplaceInFile.nsh dev/nsis
VERSION=$(grep '^VERSION=' config/Makefile | cut -d = -f 2 | tr -d '\r')
cd dev/nsis
- logn nsis-installer "$NSIS" -DVERSION="$VERSION" -DARCH="$ARCH" -DCOQ_SRC_PATH="$PREFIXCOQ" -DCOQ_ICON=..\\..\\ide\\coq.ico -DCOQ_ADDONS="$COQ_ADDONS" coq_new.nsi
+ logn nsis-installer "$NSIS" -DVERSION="$VERSION" -DARCH="$ARCH" -DCOQ_SRC_PATH="$PREFIXCOQ" -DCOQ_ICON=..\\..\\ide\\coqide\\coq.ico -DCOQ_ADDONS="$COQ_ADDONS" coq_new.nsi
build_post
fi
diff --git a/dev/ci/ci-fiat_crypto.sh b/dev/ci/ci-fiat_crypto.sh
index 811fefda35..3ecdb32a51 100755
--- a/dev/ci/ci-fiat_crypto.sh
+++ b/dev/ci/ci-fiat_crypto.sh
@@ -15,8 +15,8 @@ fiat_crypto_CI_STACKSIZE=32768
# bedrock2, so we use the pinned version of bedrock2, but the external
# version of other developments
fiat_crypto_CI_MAKE_ARGS="EXTERNAL_REWRITER=1 EXTERNAL_COQPRIME=1"
-fiat_crypto_CI_TARGETS1="${fiat_crypto_CI_MAKE_ARGS} standalone-ocaml c-files rust-files printlite lite"
-fiat_crypto_CI_TARGETS2="${fiat_crypto_CI_MAKE_ARGS} all"
+fiat_crypto_CI_TARGETS1="${fiat_crypto_CI_MAKE_ARGS} pre-standalone-extracted printlite lite"
+fiat_crypto_CI_TARGETS2="${fiat_crypto_CI_MAKE_ARGS} all-except-compiled"
( cd "${CI_BUILD_DIR}/fiat_crypto" && git submodule update --init --recursive && \
ulimit -s ${fiat_crypto_CI_STACKSIZE} && \
diff --git a/dev/ci/ci-fiat_crypto_ocaml.sh b/dev/ci/ci-fiat_crypto_ocaml.sh
new file mode 100755
index 0000000000..20d3deb14f
--- /dev/null
+++ b/dev/ci/ci-fiat_crypto_ocaml.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+ci_dir="$(dirname "$0")"
+. "${ci_dir}/ci-common.sh"
+
+fiat_crypto_CI_MAKE_ARGS="EXTERNAL_REWRITER=1 EXTERNAL_COQPRIME=1"
+
+( cd "${CI_BUILD_DIR}/fiat_crypto" && make ${fiat_crypto_CI_MAKE_ARGS} standalone-ocaml lite-generated-files )
diff --git a/dev/include_printers b/dev/include_printers
index d077075eeb..30529b5fd6 100644
--- a/dev/include_printers
+++ b/dev/include_printers
@@ -27,7 +27,6 @@
#install_printer (* id set *) ppidset;;
#install_printer (* int set *) ppintset;;
-#install_printer (* Reductionops stcak of unfolded constants *) pp_cst_stack_t;;
#install_printer (* Reductionops machine stack *) pp_stack_t;;
(*#install_printer (* hint_db *) print_hint_db;;*)
diff --git a/dev/tools/make-changelog.sh b/dev/tools/make-changelog.sh
index e1aed4560d..de58527cca 100755
--- a/dev/tools/make-changelog.sh
+++ b/dev/tools/make-changelog.sh
@@ -25,11 +25,17 @@ case "$type_first_letter" in
exit 1;;
esac
+printf "Fixes? (space separated list of bug numbers)\n"
+read -r fixes_list
+
+fixes_string="$(echo $fixes_list | sed 's/ /~ and /g; s,\([0-9]\+\),`#\1 <https://github.com/coq/coq/issues/\1>`_,g' | tr '~' '\n')"
+if [ ! -z "$fixes_string" ]; then fixes_string="$(printf '\n fixes %s,' "$fixes_string")"; fi
+
# shellcheck disable=SC2016
# the ` are regular strings, this is intended
# use %s for the leading - to avoid looking like an option (not sure
# if necessary but doesn't hurt)
-printf '%s **%s:**\n Bla bla\n (`#%s <https://github.com/coq/coq/pull/%s>`_,\n by %s).' - "$type_full" "$PR" "$PR" "$(git config user.name)" > "$where"
+printf '%s **%s:**\n Bla bla\n (`#%s <https://github.com/coq/coq/pull/%s>`_,%s\n by %s).' - "$type_full" "$PR" "$PR" "$fixes_string" "$(git config user.name)" > "$where"
printf "Name of created changelog file:\n"
printf "$where\n"
diff --git a/dev/top_printers.dbg b/dev/top_printers.dbg
index 06db787488..63071bba72 100644
--- a/dev/top_printers.dbg
+++ b/dev/top_printers.dbg
@@ -46,7 +46,6 @@ install_printer Top_printers.pp_idpred
install_printer Top_printers.pp_cpred
install_printer Top_printers.pp_transparent_state
install_printer Top_printers.pp_stack_t
-install_printer Top_printers.pp_cst_stack_t
install_printer Top_printers.pp_state_t
install_printer Top_printers.ppmetas
install_printer Top_printers.ppevm
diff --git a/dev/top_printers.ml b/dev/top_printers.ml
index 00050a89e1..bca1eb5754 100644
--- a/dev/top_printers.ml
+++ b/dev/top_printers.ml
@@ -169,7 +169,6 @@ let pp_idpred s = pp (pr_idpred s)
let pp_cpred s = pp (pr_cpred s)
let pp_transparent_state s = pp (pr_transparent_state s)
let pp_stack_t n = pp (Reductionops.Stack.pr (EConstr.of_constr %> pr_econstr) n)
-let pp_cst_stack_t n = pp (Reductionops.Cst_stack.pr Global.(env()) Evd.empty n)
let pp_state_t n = pp (Reductionops.pr_state Global.(env()) Evd.empty n)
(* proof printers *)
diff --git a/dev/top_printers.mli b/dev/top_printers.mli
index c826391cac..65eab8daa3 100644
--- a/dev/top_printers.mli
+++ b/dev/top_printers.mli
@@ -106,7 +106,6 @@ val pp_cpred : Names.Cpred.t -> unit
val pp_transparent_state : TransparentState.t -> unit
val pp_stack_t : Constr.t Reductionops.Stack.t -> unit
-val pp_cst_stack_t : Reductionops.Cst_stack.t -> unit
val pp_state_t : Reductionops.state -> unit
val ppmetas : Evd.Metaset.t -> unit
diff --git a/doc/changelog/02-specification-language/10202-master+fix8011-stronger-check-on-typability-ltac-env.rst b/doc/changelog/02-specification-language/10202-master+fix8011-stronger-check-on-typability-ltac-env.rst
deleted file mode 100644
index 57bce7e4f6..0000000000
--- a/doc/changelog/02-specification-language/10202-master+fix8011-stronger-check-on-typability-ltac-env.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Changed:**
- Warn when manual implicit arguments are used in unexpected positions
- of a term (e.g. in `Check id (forall {x}, x)`) or when a implicit
- argument name is shadowed (e.g. in `Check fun f : forall {x:nat}
- {x}, nat => f`)
- (`#10202 <https://github.com/coq/coq/pull/10202>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/02-specification-language/11098-master+arguments-supports-anonymous-implicit.rst b/doc/changelog/02-specification-language/11098-master+arguments-supports-anonymous-implicit.rst
deleted file mode 100644
index 70c57c718f..0000000000
--- a/doc/changelog/02-specification-language/11098-master+arguments-supports-anonymous-implicit.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Added:**
- :cmd:`Arguments` now supports setting
- implicit an anonymous argument, as e.g. in :g:`Arguments id {A} {_}`.
- (`#11098 <https://github.com/coq/coq/pull/11098>`_,
- by Hugo Herbelin, fixes `#4696
- <https://github.com/coq/coq/pull/4696>`_, `#5173
- <https://github.com/coq/coq/pull/5173>`_, `#9098
- <https://github.com/coq/coq/pull/9098>`_).
diff --git a/doc/changelog/02-specification-language/11235-non_maximal_implicit.rst b/doc/changelog/02-specification-language/11235-non_maximal_implicit.rst
deleted file mode 100644
index 768ef68339..0000000000
--- a/doc/changelog/02-specification-language/11235-non_maximal_implicit.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Added:**
- Syntax for non-maximal implicit arguments in definitions and terms using
- square brackets. The syntax is ``[x : A]``, ``[x]``, ```[A]``
- to be consistent with the command :cmd:`Arguments`.
- (`#11235 <https://github.com/coq/coq/pull/11235>`_,
- by SimonBoulier).
diff --git a/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst b/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst
deleted file mode 100644
index 51818c666b..0000000000
--- a/doc/changelog/02-specification-language/11261-master+implicit-type-used-printing.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- :cmd:`Implicit Types` are now taken into account for printing. To inhibit it,
- unset the :flag:`Printing Use Implicit Types` flag
- (`#11261 <https://github.com/coq/coq/pull/11261>`_,
- by Hugo Herbelin, granting `#10366 <https://github.com/coq/coq/pull/10366>`_).
diff --git a/doc/changelog/02-specification-language/11368-trailing_implicit_error.rst b/doc/changelog/02-specification-language/11368-trailing_implicit_error.rst
deleted file mode 100644
index 66139f76e1..0000000000
--- a/doc/changelog/02-specification-language/11368-trailing_implicit_error.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Changed:**
- The warning raised when a trailing implicit is declared to be non-maximally
- inserted (with the command :cmd:`Arguments`) has been turned into an error.
- This was deprecated since Coq 8.10
- (`#11368 <https://github.com/coq/coq/pull/11368>`_,
- by SimonBoulier).
diff --git a/doc/changelog/02-specification-language/11579-inductive-params.rst b/doc/changelog/02-specification-language/11579-inductive-params.rst
deleted file mode 100644
index 28bc8e9592..0000000000
--- a/doc/changelog/02-specification-language/11579-inductive-params.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Fixed:**
- More robust and expressive treatment of implicit inductive
- parameters in inductive declarations (`#11579
- <https://github.com/coq/coq/pull/11579>`_, by Maxime Dénès, Gaëtan
- Gilbert and Jasper Hugunin; fixes `#7253
- <https://github.com/coq/coq/pull/7253>`_ and `#11585
- <https://github.com/coq/coq/pull/11585>`_)
diff --git a/doc/changelog/02-specification-language/11600-uniform-syntax.rst b/doc/changelog/02-specification-language/11600-uniform-syntax.rst
deleted file mode 100644
index b95bad2eb8..0000000000
--- a/doc/changelog/02-specification-language/11600-uniform-syntax.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- New syntax :g:`Inductive Acc A R | x : Prop := ...` to specify which
- parameters of an inductive are uniform.
- See :ref:`parametrized-inductive-types`
- (`#11600 <https://github.com/coq/coq/pull/11600>`_, by Gaëtan Gilbert).
diff --git a/doc/changelog/02-specification-language/12121-master+fix11903-warn-non-truly-fixpoint.rst b/doc/changelog/02-specification-language/12121-master+fix11903-warn-non-truly-fixpoint.rst
deleted file mode 100644
index d69a94205f..0000000000
--- a/doc/changelog/02-specification-language/12121-master+fix11903-warn-non-truly-fixpoint.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- New warning on using :cmd:`Fixpoint` or :cmd:`CoFixpoint` for
- definitions which are not recursive
- (`#12121 <https://github.com/coq/coq/pull/12121>`_,
- by Hugo Herbelin)
diff --git a/doc/changelog/02-specification-language/12323-master+fix12322-anomaly-implicit-binder-factorization.rst b/doc/changelog/02-specification-language/12323-master+fix12322-anomaly-implicit-binder-factorization.rst
deleted file mode 100644
index e5ec865b15..0000000000
--- a/doc/changelog/02-specification-language/12323-master+fix12322-anomaly-implicit-binder-factorization.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Fixed:**
- Anomaly possibly raised when printing binders with implicit types
- (`#12323 <https://github.com/coq/coq/pull/12323>`_,
- by Hugo Herbelin; fixes `#12322 <https://github.com/coq/coq/pull/12322>`_).
diff --git a/doc/changelog/02-specification-language/12422-master+fix-12418-cases-anomaly.rst b/doc/changelog/02-specification-language/12422-master+fix-12418-cases-anomaly.rst
new file mode 100644
index 0000000000..8f126c5b6f
--- /dev/null
+++ b/doc/changelog/02-specification-language/12422-master+fix-12418-cases-anomaly.rst
@@ -0,0 +1,5 @@
+- **Fixed:**
+ Case of an anomaly in trying to infer the return clause of an ill-typed :g:`match`
+ (`#12422 <https://github.com/coq/coq/pull/12422>`_,
+ fixes `#12418 <https://github.com/coq/coq/pull/12418>`_,
+ by Hugo Herbelin).
diff --git a/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst b/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst
deleted file mode 100644
index a8d4fc6ed2..0000000000
--- a/doc/changelog/03-notations/10832-master+fix6082-7766-overriding-notation-format.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Fixed:**
- Different interpretations in different scopes of the same notation
- string can now be associated to different printing formats (`#10832
- <https://github.com/coq/coq/pull/10832>`_, by Hugo Herbelin,
- fixes `#6092 <https://github.com/coq/coq/issues/6092>`_
- and `#7766 <https://github.com/coq/coq/issues/7766>`_).
diff --git a/doc/changelog/03-notations/11113-remove-compat.rst b/doc/changelog/03-notations/11113-remove-compat.rst
deleted file mode 100644
index 3bcdd3dd6f..0000000000
--- a/doc/changelog/03-notations/11113-remove-compat.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Removed:** deprecated ``compat`` modifier of :cmd:`Notation`
- and :cmd:`Infix` commands
- (`#11113 <https://github.com/coq/coq/pull/11113>`_,
- by Théo Zimmermann, with help from Jason Gross).
diff --git a/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst b/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst
deleted file mode 100644
index eeb4c755f6..0000000000
--- a/doc/changelog/03-notations/11120-master+refactoring-application-printing.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-- **Fixed:** Parsing and printing consistently handle inheritance of implicit
- arguments in notations. With the exception of notations of
- the form :n:`Notation @string := @@qualid` and :n:`Notation @ident := @@qualid` which
- inhibit implicit arguments, all notations binding a partially
- applied constant, as e.g. in :n:`Notation @string := (@qualid {+ @arg })`,
- or :n:`Notation @string := (@@qualid {+ @arg })`, or
- :n:`Notation @ident := (@qualid {+ @arg })`, or :n:`Notation @ident
- := (@@qualid {+ @arg })`, inherit the remaining implicit arguments
- (`#11120 <https://github.com/coq/coq/pull/11120>`_, by Hugo
- Herbelin, fixing `#4690 <https://github.com/coq/coq/pull/4690>`_ and
- `#11091 <https://github.com/coq/coq/pull/11091>`_).
-
-- **Changed:** Notation scopes are now always inherited in
- notations binding a partially applied constant, including for
- notations binding an expression of the form :n:`@@qualid`. The latter was
- not the case beforehand
- (part of `#11120 <https://github.com/coq/coq/pull/11120>`_).
diff --git a/doc/changelog/03-notations/11172-master+coercion-notation-interleaved-printing.rst b/doc/changelog/03-notations/11172-master+coercion-notation-interleaved-printing.rst
deleted file mode 100644
index f377b53ae2..0000000000
--- a/doc/changelog/03-notations/11172-master+coercion-notation-interleaved-printing.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Changed:**
- The printing algorithm now interleaves search for notations and removal of coercions
- (`#11172 <https://github.com/coq/coq/pull/11172>`_, by Hugo Herbelin).
diff --git a/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst b/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst
deleted file mode 100644
index 1d94cbf21b..0000000000
--- a/doc/changelog/03-notations/11590-master+fix9741-only-printing-does-not-reserve-keyword.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Fixed:**
- Notations in onlyprinting mode do not uselessly reserve parsing keywords
- (`#11590 <https://github.com/coq/coq/pull/11590>`_,
- by Hugo Herbelin, fixes `#9741 <https://github.com/coq/coq/pull/9741>`_).
diff --git a/doc/changelog/03-notations/11602-master+support-only-parsing-where-clause.rst b/doc/changelog/03-notations/11602-master+support-only-parsing-where-clause.rst
deleted file mode 100644
index 1d30d16664..0000000000
--- a/doc/changelog/03-notations/11602-master+support-only-parsing-where-clause.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Added:**
- Notations declared with the ``where`` clause in the declaration of
- inductive types, coinductive types, record fields, fixpoints and
- cofixpoints now support the ``only parsing`` modifier
- (`#11602 <https://github.com/coq/coq/pull/11602>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/03-notations/11650-parensNew.rst b/doc/changelog/03-notations/11650-parensNew.rst
deleted file mode 100644
index f52a720428..0000000000
--- a/doc/changelog/03-notations/11650-parensNew.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- added the :flag:`Printing Parentheses` flag to print parentheses even when implied by associativity or precedence.
- (`#11650 <https://github.com/coq/coq/pull/11650>`_,
- by Hugo Herbelin and Abhishek Anand).
diff --git a/doc/changelog/03-notations/11848-nicer-decimal-printing.rst b/doc/changelog/03-notations/11848-nicer-decimal-printing.rst
deleted file mode 100644
index 1d3a390f36..0000000000
--- a/doc/changelog/03-notations/11848-nicer-decimal-printing.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- Nicer printing for decimal constants in R and Q.
- 1.5 is now printed 1.5 rather than 15e-1.
- (`#11848 <https://github.com/coq/coq/pull/11848>`_,
- by Pierre Roux).
diff --git a/doc/changelog/03-notations/11948-hexadecimal.rst b/doc/changelog/03-notations/11948-hexadecimal.rst
deleted file mode 100644
index e4b76d238c..0000000000
--- a/doc/changelog/03-notations/11948-hexadecimal.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-- **Added:**
- Numeral notations now parse hexadecimal constants such as ``0x2a``
- or ``0xb.2ap-2``. Parsers added for :g:`nat`, :g:`positive`, :g:`Z`,
- :g:`N`, :g:`Q`, :g:`R`, primitive integers and primitive floats
- (`#11948 <https://github.com/coq/coq/pull/11948>`_,
- by Pierre Roux).
-- **Deprecated:**
- Numeral Notation on ``Decimal.uint``, ``Decimal.int`` and
- ``Decimal.decimal`` are replaced respectively by numeral notations
- on ``Numeral.uint``, ``Numeral.int`` and ``Numeral.numeral``
- (`#11948 <https://github.com/coq/coq/pull/11948>`_,
- by Pierre Roux).
diff --git a/doc/changelog/03-notations/11986-float-low-level-printing.rst b/doc/changelog/03-notations/11986-float-low-level-printing.rst
index f3d85cadc6..aba74891c6 100644
--- a/doc/changelog/03-notations/11986-float-low-level-printing.rst
+++ b/doc/changelog/03-notations/11986-float-low-level-printing.rst
@@ -1,5 +1,5 @@
- **Added:**
- Add flag ``Printing Float`` to print primitive floats as hexadecimal
- instead of decimal values. This is included in ``Set Printing All``.
+ :flag:`Printing Float` flag to print primitive floats as hexadecimal
+ instead of decimal values. This is included in the :flag:`Printing All` flag
(`#11986 <https://github.com/coq/coq/pull/11986>`_,
by Pierre Roux).
diff --git a/doc/changelog/03-notations/12163-fix-12159.rst b/doc/changelog/03-notations/12163-fix-12159.rst
deleted file mode 100644
index 978ed561dd..0000000000
--- a/doc/changelog/03-notations/12163-fix-12159.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-- **Fixed:**
- Numeral Notations now play better with multiple scopes for the same
- inductive type. Previously, when multiple numeral notations were defined
- for the same inductive, only the last one was considered for
- printing. Now, among the notations that are usable for printing and either
- have a scope delimiter or are open, the selection is made according
- to the order of open scopes, or according to the last defined
- notation if no appropriate scope is open
- (`#12163 <https://github.com/coq/coq/pull/12163>`_,
- fixes `#12159 <https://github.com/coq/coq/pull/12159>`_,
- by Pierre Roux, review by Hugo Herbelin and Jason Gross).
diff --git a/doc/changelog/03-notations/8808-master+support-binder+term-in-abbrev.rst b/doc/changelog/03-notations/8808-master+support-binder+term-in-abbrev.rst
deleted file mode 100644
index e1fcfb78c4..0000000000
--- a/doc/changelog/03-notations/8808-master+support-binder+term-in-abbrev.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Abbreviations support arguments occurring both in term and binder position
- (`#8808 <https://github.com/coq/coq/pull/8808>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/04-tactics/10760-more-rapply.rst b/doc/changelog/04-tactics/10760-more-rapply.rst
deleted file mode 100644
index 32cd9b7135..0000000000
--- a/doc/changelog/04-tactics/10760-more-rapply.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Changed:**
- The tactic :tacn:`rapply` in :g:`Coq.Program.Tactics` now handles
- arbitrary numbers of underscores and takes in a :g:`uconstr`. In
- rare cases where users were relying on :tacn:`rapply` inserting
- exactly 15 underscores and no more, due to the lemma having a
- completely unspecified codomain (and thus allowing for any number of
- underscores), the tactic will now instead loop (`#10760
- <https://github.com/coq/coq/pull/10760>`_, by Jason Gross).
diff --git a/doc/changelog/04-tactics/10998-zify-complements.rst b/doc/changelog/04-tactics/10998-zify-complements.rst
deleted file mode 100644
index ba4d10590f..0000000000
--- a/doc/changelog/04-tactics/10998-zify-complements.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Added:**
- The :tacn:`zify` tactic is now aware of `Pos.pred_double`, `Pos.pred_N`,
- `Pos.of_nat`, `Pos.add_carry`, `Pos.pow`, `Pos.square`, `Z.pow`, `Z.double`,
- `Z.pred_double`, `Z.succ_double`, `Z.square`, `Z.div2`, and `Z.quot2`.
- Injections for internal definitions in module `ZifyBool` (`isZero` and `isLeZero`)
- are also added to help users to declare new :tacn:`zify` class instances using
- Micromega tactics
- (`#10998 <https://github.com/coq/coq/pull/10998>`_, by Kazuhiko Sakaguchi).
diff --git a/doc/changelog/04-tactics/11018-lia-in-auto-with-zarith.rst b/doc/changelog/04-tactics/11018-lia-in-auto-with-zarith.rst
deleted file mode 100644
index d510416990..0000000000
--- a/doc/changelog/04-tactics/11018-lia-in-auto-with-zarith.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Changed:** The :g:`auto with zarith` tactic and variations (including :tacn:`intuition`)
- may now call the :tacn:`lia` tactic instead of :tacn:`omega`
- (when the `Omega` module is loaded);
- more goals may be automatically solved,
- fewer section variables will be captured spuriously
- (`#11018 <https://github.com/coq/coq/pull/11018>`_,
- by Vincent Laporte).
diff --git a/doc/changelog/04-tactics/11025-nativecompute-timing.rst b/doc/changelog/04-tactics/11025-nativecompute-timing.rst
deleted file mode 100644
index cb77457c31..0000000000
--- a/doc/changelog/04-tactics/11025-nativecompute-timing.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-- **Changed:** The :flag:`NativeCompute Timing` flag causes calls to
- :tacn:`native_compute` (as well as kernel calls to the native
- compiler) to emit separate timing information about conversion to
- native code, compilation, execution, and reification. It replaces
- the timing information previously emitted when the `-debug` flag was
- set, and allows more fine-grained timing of the native compiler
- (`#11025 <https://github.com/coq/coq/pull/11025>`_, by Jason Gross).
- Additionally, the timing information now uses real time rather than
- user time (Fixes `#11962
- <https://github.com/coq/coq/issues/11962>`_, `#11963
- <https://github.com/coq/coq/pull/11963>`_, by Jason Gross)
diff --git a/doc/changelog/04-tactics/11288-omega+depr.rst b/doc/changelog/04-tactics/11288-omega+depr.rst
deleted file mode 100644
index 3a2d421967..0000000000
--- a/doc/changelog/04-tactics/11288-omega+depr.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Removed:**
- The undocumented ``omega with`` tactic variant has been removed,
- using :tacn:`lia` is the recommended replacement, although the old semantics
- of ``omega with *`` can also be recovered with ``zify; omega``
- (`#11288 <https://github.com/coq/coq/pull/11288>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/04-tactics/11362-micromega-fix-11191.rst b/doc/changelog/04-tactics/11362-micromega-fix-11191.rst
deleted file mode 100644
index 20d48929f2..0000000000
--- a/doc/changelog/04-tactics/11362-micromega-fix-11191.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Fixed:**
- :tacn:`zify` now handles :g:`Z.pow_pos` by default.
- In Coq 8.11, this was the case only when loading module
- :g:`ZifyPow` because this triggered a regression of :tacn:`lia`.
- The regression is now fixed, and the module kept only for compatibility
- (`#11362 <https://github.com/coq/coq/pull/11362>`_,
- fixes `#11191 <https://github.com/coq/coq/issues/11191>`_,
- by Frédéric Besson).
diff --git a/doc/changelog/04-tactics/11370-zify-elim-let.rst b/doc/changelog/04-tactics/11370-zify-elim-let.rst
deleted file mode 100644
index 944dde99b8..0000000000
--- a/doc/changelog/04-tactics/11370-zify-elim-let.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Changed:**
- Improve the efficiency of `PreOmega.elim_let` using an iterator implemented in OCaml
- (`#11370 <https://github.com/coq/coq/pull/11370>`_, by Frédéric Besson).
diff --git a/doc/changelog/04-tactics/11429-zify-optimisation.rst b/doc/changelog/04-tactics/11429-zify-optimisation.rst
deleted file mode 100644
index 25927f9182..0000000000
--- a/doc/changelog/04-tactics/11429-zify-optimisation.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Changed:**
- Improve the efficiency of :tacn:`zify` by rewritting the remaining Ltac code in OCaml
- (`#11429 <https://github.com/coq/coq/pull/11429>`_, by Frédéric Besson).
diff --git a/doc/changelog/04-tactics/11474-lia-bug-fix-11436.rst b/doc/changelog/04-tactics/11474-lia-bug-fix-11436.rst
deleted file mode 100644
index 52a2b2f0f6..0000000000
--- a/doc/changelog/04-tactics/11474-lia-bug-fix-11436.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Added:**
- :cmd:`Show Lia Profile` prints some statistics about :tacn:`lia` calls
- (`#11474 <https://github.com/coq/coq/pull/11474>`_, by Frédéric Besson).
-
-- **Fixed:**
- Efficiency regression of :tacn:`lia`
- (`#11474 <https://github.com/coq/coq/pull/11474>`_,
- fixes `#11436 <https://github.com/coq/coq/issues/11436>`_,
- by Frédéric Besson).
diff --git a/doc/changelog/04-tactics/11522-master+pose-proof-wo-as-syntax.rst b/doc/changelog/04-tactics/11522-master+pose-proof-wo-as-syntax.rst
deleted file mode 100644
index 3dd103b115..0000000000
--- a/doc/changelog/04-tactics/11522-master+pose-proof-wo-as-syntax.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Added:**
- Syntax :n:`pose proof (@ident:=@term)` as an
- alternative to :n:`pose proof @term as @ident`, following the model of
- :n:`pose (@ident:=@term)`. See documentation of :tacn:`pose proof`
- (`#11522 <https://github.com/coq/coq/pull/11522>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/04-tactics/11760-firstorder-leaf.rst b/doc/changelog/04-tactics/11760-firstorder-leaf.rst
deleted file mode 100644
index e6e4b827e5..0000000000
--- a/doc/changelog/04-tactics/11760-firstorder-leaf.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Changed:**
- The default tactic used by :g:`firstorder` is
- :g:`auto with core` instead of :g:`auto with *`;
- see :ref:`decisionprocedures` for details;
- old behavior can be reset by using the `-compat 8.12` command-line flag;
- to ease the migration of legacy code, the default solver can be set to `debug auto with *`
- with `Set Firstorder Solver debug auto with *`
- (`#11760 <https://github.com/coq/coq/pull/11760>`_,
- by Vincent Laporte).
diff --git a/doc/changelog/04-tactics/11877-master+deprecated-_eqn.rst b/doc/changelog/04-tactics/11877-master+deprecated-_eqn.rst
deleted file mode 100644
index 827d484b28..0000000000
--- a/doc/changelog/04-tactics/11877-master+deprecated-_eqn.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Removed:**
- Deprecated syntax `_eqn` for :tacn:`destruct` and :tacn:`remember`.
- Use `eqn:` syntax instead
- (`#11877 <https://github.com/coq/coq/pull/11877>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/04-tactics/11883-fix-autounfold.rst b/doc/changelog/04-tactics/11883-fix-autounfold.rst
deleted file mode 100644
index 83ff177380..0000000000
--- a/doc/changelog/04-tactics/11883-fix-autounfold.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-- **Fixed:**
- The behavior of :tacn:`autounfold` no longer depends on the names of terms and modules
- (`#11883 <https://github.com/coq/coq/pull/11883>`_,
- fixes `#7812 <https://github.com/coq/coq/issues/7812>`_,
- by Attila Gáspár).
-- **Changed:**
- `at` clauses can no longer be used with :tacn:`autounfold`. Since they had no effect, it is safe to remove them
- (`#11883 <https://github.com/coq/coq/pull/11883>`_,
- by Attila Gáspár).
-- **Changed:**
- :tacn:`autounfold` no longer fails when the :cmd:`Opaque` command is used on constants in the hint databases
- (`#11883 <https://github.com/coq/coq/pull/11883>`_,
- by Attila Gáspár).
diff --git a/doc/changelog/04-tactics/11976-deprecate-omega.rst b/doc/changelog/04-tactics/11976-deprecate-omega.rst
deleted file mode 100644
index 59c9612d17..0000000000
--- a/doc/changelog/04-tactics/11976-deprecate-omega.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Deprecated:**
- The :tacn:`omega` tactic is deprecated;
- use :tacn:`lia` from the :ref:`Micromega <micromega>` plugin instead
- (`#11976 <https://github.com/coq/coq/pull/11976>`_,
- by Vincent Laporte).
diff --git a/doc/changelog/04-tactics/12023-master+fixing-empty-Ltac-v-file.rst b/doc/changelog/04-tactics/12023-master+fixing-empty-Ltac-v-file.rst
deleted file mode 100644
index f10208e9b2..0000000000
--- a/doc/changelog/04-tactics/12023-master+fixing-empty-Ltac-v-file.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Changed:**
- Tactics with qualified name of the form ``Coq.Init.Notations`` are
- now qualified with prefix ``Coq.Init.Ltac``; users of the -noinit
- option should now import Coq.Init.Ltac if they want to use Ltac
- (`#12023 <https://github.com/coq/coq/pull/12023>`_,
- by Hugo Herbelin; minor source of incompatibilities).
diff --git a/doc/changelog/04-tactics/12129-add-with-strategy.rst b/doc/changelog/04-tactics/12129-add-with-strategy.rst
deleted file mode 100644
index 68558c0cf4..0000000000
--- a/doc/changelog/04-tactics/12129-add-with-strategy.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- New tactical :tacn:`with_strategy` added which behaves like the
- command :cmd:`Strategy`, with effects local to the given tactic
- (`#12129 <https://github.com/coq/coq/pull/12129>`_, by Jason Gross).
diff --git a/doc/changelog/04-tactics/12146-master+fix10812-subst-failure-section-variables.rst b/doc/changelog/04-tactics/12146-master+fix10812-subst-failure-section-variables.rst
deleted file mode 100644
index 055006d3b4..0000000000
--- a/doc/changelog/04-tactics/12146-master+fix10812-subst-failure-section-variables.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Changed:**
- Tactic :tacn:`subst` :n:`@ident` now fails over a section variable which is
- indirectly dependent in the goal; the incompatibility can generally
- be fixed by first clearing the hypotheses causing an indirect
- dependency, as reported by the error message, or by using :tacn:`rewrite` :n:`in *`
- instead; similarly, :tacn:`subst` has no more effect on such variables
- (`#12146 <https://github.com/coq/coq/pull/12146>`_,
- by Hugo Herbelin; fixes `#10812 <https://github.com/coq/coq/pull/10812>`_;
- fixes `#12139 <https://github.com/coq/coq/pull/12139>`_).
diff --git a/doc/changelog/04-tactics/12213-zify-Nat.rst b/doc/changelog/04-tactics/12213-zify-Nat.rst
deleted file mode 100644
index 8b744cd193..0000000000
--- a/doc/changelog/04-tactics/12213-zify-Nat.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Added:**
- The :tacn:`zify` tactic is now aware of `Nat.le`, `Nat.lt` and `Nat.eq`
- (`#12213 <https://github.com/coq/coq/pull/12213>`_, by Frédéric Besson; fixes `#12210 <https://github.com/coq/coq/issues/12210>`_).
diff --git a/doc/changelog/04-tactics/12256-unfold-dyn-check.rst b/doc/changelog/04-tactics/12256-unfold-dyn-check.rst
deleted file mode 100644
index c2f7065f4c..0000000000
--- a/doc/changelog/04-tactics/12256-unfold-dyn-check.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Changed:**
- The check that unfold arguments were indeed unfoldable has been moved to runtime
- (`#12256 <https://github.com/coq/coq/pull/12256>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/04-tactics/12326-fix11761-functional-induction-throws-unrecoverable-error.rst b/doc/changelog/04-tactics/12326-fix11761-functional-induction-throws-unrecoverable-error.rst
deleted file mode 100644
index 2402321fad..0000000000
--- a/doc/changelog/04-tactics/12326-fix11761-functional-induction-throws-unrecoverable-error.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-- **Fixed:**
- Wrong type error in tactic :tacn:`functional induction`.
- (`#12326 <https://github.com/coq/coq/pull/12326>`_,
- by Pierre Courtieu,
- fixes `#11761 <https://github.com/coq/coq/issues/11761>`_,
- reported by Lasse Blaauwbroek).
-- **Changed**
- When the tactic :tacn:`functional induction` :n:`c__1 c__2 ... c__n` is used
- with no parenthesis around :n:`c__1 c__2 ... c__n`, :n:`c__1 c__2 ... c__n` is now
- read as one sinlge applicative term. In particular implicit
- arguments should be omitted. Rare source of incompatibility
- (`#12326 <https://github.com/coq/coq/pull/12326>`_,
- by Pierre Courtieu).
diff --git a/doc/changelog/04-tactics/12366-fix-exists.rst b/doc/changelog/04-tactics/12366-fix-exists.rst
deleted file mode 100644
index 6d976ff562..0000000000
--- a/doc/changelog/04-tactics/12366-fix-exists.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Changed:**
- When using :tacn:`exists` or :tacn:`eexists` with multiple arguments,
- the evaluation of arguments and applications of constructors are now interleaved.
- This improves unification in some cases
- (`#12366 <https://github.com/coq/coq/pull/12366>`_,
- fixes `#12365 <https://github.com/coq/coq/issues/12365>`_,
- by Attila Gáspár).
diff --git a/doc/changelog/04-tactics/12399-rm-prolog.rst b/doc/changelog/04-tactics/12399-rm-prolog.rst
new file mode 100644
index 0000000000..afde7db370
--- /dev/null
+++ b/doc/changelog/04-tactics/12399-rm-prolog.rst
@@ -0,0 +1,4 @@
+- **Removed:**
+ The deprecated and undocumented "prolog" tactic was removed
+ (`#12399 <https://github.com/coq/coq/pull/12399>`_,
+ by Pierre-Marie Pédrot).
diff --git a/doc/changelog/05-tactic-language/10343-issue-10342-ltac2-standard-library.rst b/doc/changelog/05-tactic-language/10343-issue-10342-ltac2-standard-library.rst
deleted file mode 100644
index e8233b9d13..0000000000
--- a/doc/changelog/05-tactic-language/10343-issue-10342-ltac2-standard-library.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- An array library for Ltac2 (as compatible as possible with OCaml standard library)
- (`#10343 <https://github.com/coq/coq/pull/10343>`_,
- by Michael Soegtrop).
diff --git a/doc/changelog/05-tactic-language/11503-ltac2-rebind-with-value.rst b/doc/changelog/05-tactic-language/11503-ltac2-rebind-with-value.rst
deleted file mode 100644
index 0dd0fed4e2..0000000000
--- a/doc/changelog/05-tactic-language/11503-ltac2-rebind-with-value.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Added:**
- The Ltac2 rebinding command :cmd:`Ltac2 Set` has been extended with the ability to
- give a name to the old value so as to be able to reuse it inside the
- new one
- (`#11503 <https://github.com/coq/coq/pull/11503>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/05-tactic-language/11740-ltac2-enough.rst b/doc/changelog/05-tactic-language/11740-ltac2-enough.rst
deleted file mode 100644
index 5d3671bce1..0000000000
--- a/doc/changelog/05-tactic-language/11740-ltac2-enough.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Ltac2 notations for :tacn:`enough` and :tacn:`eenough`
- (`#11740 <https://github.com/coq/coq/pull/11740>`_,
- by Michael Soegtrop).
diff --git a/doc/changelog/05-tactic-language/11882-master+ltac2-fresh-in-context.rst b/doc/changelog/05-tactic-language/11882-master+ltac2-fresh-in-context.rst
deleted file mode 100644
index 47e7be4d0e..0000000000
--- a/doc/changelog/05-tactic-language/11882-master+ltac2-fresh-in-context.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Added:**
- New Ltac2 function ``Fresh.Free.of_goal`` to return the list of
- names of declarations of the current goal; new Ltac2 function
- ``Fresh.in_goal`` to return a variable fresh in the current goal
- (`#11882 <https://github.com/coq/coq/pull/11882>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/05-tactic-language/11981-ltac2-eval-notations.rst b/doc/changelog/05-tactic-language/11981-ltac2-eval-notations.rst
deleted file mode 100644
index 2f8d92fae5..0000000000
--- a/doc/changelog/05-tactic-language/11981-ltac2-eval-notations.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Ltac2 notations for reductions in terms: :n:`eval @red_expr in @ltac2_term`
- (`#11981 <https://github.com/coq/coq/pull/11981>`_,
- by Michael Soegtrop).
diff --git a/doc/changelog/05-tactic-language/12197-ltacprof-multi-success.rst b/doc/changelog/05-tactic-language/12197-ltacprof-multi-success.rst
deleted file mode 100644
index b90c8e7a1f..0000000000
--- a/doc/changelog/05-tactic-language/12197-ltacprof-multi-success.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Fixed:**
- The :flag:`Ltac Profiling` machinery now correctly handles
- backtracking into multi-success tactics. The call-counts of some
- tactics are unfortunately inflated by 1, as some tactics are
- implicitly implemented as :g:`tac + fail`, which has two
- entry-points rather than one (Fixes `#12196
- <https://github.com/coq/coq/issues/12196>`_, `#12197
- <https://github.com/coq/coq/pull/12197>`_, by Jason Gross).
diff --git a/doc/changelog/05-tactic-language/12254-wit-ref-dyn.rst b/doc/changelog/05-tactic-language/12254-wit-ref-dyn.rst
deleted file mode 100644
index 69632fd202..0000000000
--- a/doc/changelog/05-tactic-language/12254-wit-ref-dyn.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- The "reference" tactic generic argument now accepts arbitrary
- variables of the goal context
- (`#12254 <https://github.com/coq/coq/pull/12254>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/06-ssreflect/8855-master+more-search-options.rst b/doc/changelog/06-ssreflect/8855-master+more-search-options.rst
deleted file mode 100644
index 2fdacfd82a..0000000000
--- a/doc/changelog/06-ssreflect/8855-master+more-search-options.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-- **Changed:** The :cmd:`Search (ssreflect)` command that used to be
- available when loading the `ssreflect` plugin has been moved to a
- separate plugin that needs to be loaded separately: `ssrsearch`
- (part of `#8855 <https://github.com/coq/coq/pull/8855>`_, fixes
- `#12253 <https://github.com/coq/coq/issues/12253>`_, by Théo
- Zimmermann).
-
-- **Deprecated:** :cmd:`Search (ssreflect)` (available through
- `Require ssrsearch.`) in favor of the `headconcl:` clause of
- :cmd:`Search` (part of `#8855
- <https://github.com/coq/coq/pull/8855>`_, by Théo Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/07791-deprecate-hint-constr.rst b/doc/changelog/07-commands-and-options/07791-deprecate-hint-constr.rst
deleted file mode 100644
index b627fdbcc9..0000000000
--- a/doc/changelog/07-commands-and-options/07791-deprecate-hint-constr.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Deprecated:**
- Deprecated the declaration of arbitrary terms as hints. Global
- references are now preferred
- (`#7791 <https://github.com/coq/coq/pull/7791>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/07-commands-and-options/10747-canonical-better-message.rst b/doc/changelog/07-commands-and-options/10747-canonical-better-message.rst
deleted file mode 100644
index b263de017b..0000000000
--- a/doc/changelog/07-commands-and-options/10747-canonical-better-message.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- The :cmd:`Print Canonical Projections` command can now take constants and
- prints only the unification rules that involve or are synthesized from given
- constants (`#10747 <https://github.com/coq/coq/pull/10747>`_,
- by Kazuhiko Sakaguchi).
diff --git a/doc/changelog/07-commands-and-options/11162-local-cs.rst b/doc/changelog/07-commands-and-options/11162-local-cs.rst
deleted file mode 100644
index b89e047153..0000000000
--- a/doc/changelog/07-commands-and-options/11162-local-cs.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Added:** Handle the :attr:`local` attribute in :cmd:`Canonical
- Structure` declarations (`#11162
- <https://github.com/coq/coq/pull/11162>`_, by Enrico Tassi).
diff --git a/doc/changelog/07-commands-and-options/11164-let-cs.rst b/doc/changelog/07-commands-and-options/11164-let-cs.rst
deleted file mode 100644
index 2bdc8052c6..0000000000
--- a/doc/changelog/07-commands-and-options/11164-let-cs.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Added:** A section variable introduced with :cmd:`Let` can be
- declared as a :cmd:`Canonical Structure` (`#11164
- <https://github.com/coq/coq/pull/11164>`_, by Enrico Tassi).
diff --git a/doc/changelog/07-commands-and-options/11185-remove-typeclasses-axioms-instances.rst b/doc/changelog/07-commands-and-options/11185-remove-typeclasses-axioms-instances.rst
deleted file mode 100644
index 9fc09c4189..0000000000
--- a/doc/changelog/07-commands-and-options/11185-remove-typeclasses-axioms-instances.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Removed:** ``Typeclasses Axioms Are Instances`` flag, deprecated since 8.10.
- Use :cmd:`Declare Instance` for axioms which should be instances
- (`#11185 <https://github.com/coq/coq/pull/11185>`_, by Théo Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/11258-coherence.rst b/doc/changelog/07-commands-and-options/11258-coherence.rst
deleted file mode 100644
index f04a120417..0000000000
--- a/doc/changelog/07-commands-and-options/11258-coherence.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Changed:**
- The :cmd:`Coercion` command has been improved to check the coherence of the
- inheritance graph. It checks whether a circular inheritance path of `C >-> C`
- is convertible with the identity function or not, then report it as an
- ambiguous path if it is not. The new mechanism does not report ambiguous
- paths that are redundant with others. For example, checking the ambiguity of
- `[f; g]` and `[f'; g]` is redundant with that of `[f]` and `[f']` thus will
- not be reported
- (`#11258 <https://github.com/coq/coq/pull/11258>`_,
- by Kazuhiko Sakaguchi).
diff --git a/doc/changelog/07-commands-and-options/11534-let-with-annotations.rst b/doc/changelog/07-commands-and-options/11534-let-with-annotations.rst
deleted file mode 100644
index 7bcbb9a8e3..0000000000
--- a/doc/changelog/07-commands-and-options/11534-let-with-annotations.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Added:** Support for universe bindings and universe contrainsts in
- :cmd:`Let` definitions (`#11534
- <https://github.com/coq/coq/pull/11534>`_, by Théo Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/11546-rm-uncheck-template.rst b/doc/changelog/07-commands-and-options/11546-rm-uncheck-template.rst
deleted file mode 100644
index d134aeae8b..0000000000
--- a/doc/changelog/07-commands-and-options/11546-rm-uncheck-template.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Removed:** Deprecated unsound compatibility ``Template Check``
- flag that was introduced in 8.10 to help users gradually move their
- template polymorphic inductive type definitions outside sections
- (`#11546 <https://github.com/coq/coq/pull/11546>`_, by Pierre-Marie
- Pédrot).
diff --git a/doc/changelog/07-commands-and-options/11618-loadpath+split_ml_handling.rst b/doc/changelog/07-commands-and-options/11618-loadpath+split_ml_handling.rst
deleted file mode 100644
index 99f2d22d11..0000000000
--- a/doc/changelog/07-commands-and-options/11618-loadpath+split_ml_handling.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Removed:**
- Recursive OCaml loadpaths are not supported anymore; the command
- ``Add Rec ML Path`` has been removed; :cmd:`Add ML Path` is now the
- preferred one. We have also dropped support for the non-qualified
- version of the :cmd:`Add LoadPath` command, that is to say,
- the ``Add LoadPath dir`` version; now,
- you must always specify a prefix now using ``Add Loadpath dir as Prefix``
- (`#11618 <https://github.com/coq/coq/pull/11618>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/07-commands-and-options/11663-remove-polymorphic-unqualified.rst b/doc/changelog/07-commands-and-options/11663-remove-polymorphic-unqualified.rst
deleted file mode 100644
index 419d683037..0000000000
--- a/doc/changelog/07-commands-and-options/11663-remove-polymorphic-unqualified.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Removed:**
- Unqualified ``polymorphic``, ``monomorphic``, ``template``,
- ``notemplate`` attributes (they were deprecated since Coq 8.10).
- Use :attr:`universes(polymorphic)`, :attr:`universes(monomorphic)`,
- :attr:`universes(template)` and :attr:`universes(notemplate)` instead
- (`#11663 <https://github.com/coq/coq/pull/11663>`_, by Théo Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/11665-cumulative-attr.rst b/doc/changelog/07-commands-and-options/11665-cumulative-attr.rst
deleted file mode 100644
index 7b690da68d..0000000000
--- a/doc/changelog/07-commands-and-options/11665-cumulative-attr.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-- **Added:**
- New attributes supported when defining an inductive type
- :attr:`universes(cumulative)`, :attr:`universes(noncumulative)` and
- :attr:`private(matching)`, which correspond to legacy attributes
- ``Cumulative``, ``NonCumulative``, and the so far undocumented
- ``Private`` (`#11665 <https://github.com/coq/coq/pull/11665>`_, by
- Théo Zimmermann).
-
-- **Changed:** :term:`Legacy attributes <attribute>` can now be passed
- in any order (`#11665 <https://github.com/coq/coq/pull/11665>`_, by
- Théo Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/11746-remove-chapter.rst b/doc/changelog/07-commands-and-options/11746-remove-chapter.rst
deleted file mode 100644
index 0316432b0a..0000000000
--- a/doc/changelog/07-commands-and-options/11746-remove-chapter.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Removed:** undocumented ``Chapter`` command. Use :cmd:`Section`
- instead (`#11746 <https://github.com/coq/coq/pull/11746>`_, by Théo
- Zimmermann).
diff --git a/doc/changelog/07-commands-and-options/11795-print_implicit_args.rst b/doc/changelog/07-commands-and-options/11795-print_implicit_args.rst
deleted file mode 100644
index 5b0cdb5914..0000000000
--- a/doc/changelog/07-commands-and-options/11795-print_implicit_args.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- Several commands (`Search`, `About`, ...) now print the implicit arguments
- in brackets when printing types.
- (`#11795 <https://github.com/coq/coq/pull/11795>`_,
- by SimonBoulier).
diff --git a/doc/changelog/07-commands-and-options/11812-export-hint-globality.rst b/doc/changelog/07-commands-and-options/11812-export-hint-globality.rst
deleted file mode 100644
index 9341eebb58..0000000000
--- a/doc/changelog/07-commands-and-options/11812-export-hint-globality.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- the :cmd:`Hint` commands now accept the :attr:`export` locality as
- an attribute, allowing to make import-scoped hints
- (`#11812 <https://github.com/coq/coq/pull/11812>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/07-commands-and-options/11828-obligations+depr_hide_obligation.rst b/doc/changelog/07-commands-and-options/11828-obligations+depr_hide_obligation.rst
deleted file mode 100644
index 5ab2941446..0000000000
--- a/doc/changelog/07-commands-and-options/11828-obligations+depr_hide_obligation.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Deprecated:**
- Option :flag:`Hide Obligations` has been deprecated
- (`#11828 <https://github.com/coq/coq/pull/11828>`_,
- by Emilio Jesus Gallego Arias).
-
-- **Removed:**
- Deprecated option ``Shrink Obligations`` has been removed
- (`#11828 <https://github.com/coq/coq/pull/11828>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/07-commands-and-options/11944-rm-searchabout-cmd.rst b/doc/changelog/07-commands-and-options/11944-rm-searchabout-cmd.rst
deleted file mode 100644
index e409c638bb..0000000000
--- a/doc/changelog/07-commands-and-options/11944-rm-searchabout-cmd.rst
+++ /dev/null
@@ -1,3 +0,0 @@
-- **Removed:** Removed SearchAbout command that was deprecated in 8.5.
- Use :cmd:`Search` instead.
- (`#11944 <https://github.com/coq/coq/pull/11944>`_, by Jim Fehrle).
diff --git a/doc/changelog/07-commands-and-options/11972-fix-require-in-section.rst b/doc/changelog/07-commands-and-options/11972-fix-require-in-section.rst
new file mode 100644
index 0000000000..7e34c4a0ff
--- /dev/null
+++ b/doc/changelog/07-commands-and-options/11972-fix-require-in-section.rst
@@ -0,0 +1,5 @@
+- **Changed:** The warning when using :cmd:`Require` inside a section
+ moved from the ``deprecated`` category to the ``fragile`` category,
+ because there is no plan to remove the functionality at this time.
+ (`#11972 <https://github.com/coq/coq/pull/11972>`_, by Gaëtan
+ Gilbert).
diff --git a/doc/changelog/07-commands-and-options/12034-cumul-sprop.rst b/doc/changelog/07-commands-and-options/12034-cumul-sprop.rst
deleted file mode 100644
index ad7cf44482..0000000000
--- a/doc/changelog/07-commands-and-options/12034-cumul-sprop.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- Added :flag:`Cumulative StrictProp` to control cumulativity of
- |SProp| and deprecated now redundant command line
- ``--cumulative-sprop`` (`#12034
- <https://github.com/coq/coq/pull/12034>`_, by Gaëtan Gilbert).
diff --git a/doc/changelog/07-commands-and-options/12295-master+fix12234-show-proof.rst b/doc/changelog/07-commands-and-options/12295-master+fix12234-show-proof.rst
deleted file mode 100644
index 259253ec79..0000000000
--- a/doc/changelog/07-commands-and-options/12295-master+fix12234-show-proof.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Fixed:**
- A printing bug in the presence of elimination principles with local definitions
- (`#12295 <https://github.com/coq/coq/pull/12295>`_,
- by Hugo Herbelin; fixes `#12233 <https://github.com/coq/coq/pull/12233>`_).
diff --git a/doc/changelog/07-commands-and-options/12296-master+fix12234-show-proof-proper.rst b/doc/changelog/07-commands-and-options/12296-master+fix12234-show-proof-proper.rst
deleted file mode 100644
index dc71a27eb8..0000000000
--- a/doc/changelog/07-commands-and-options/12296-master+fix12234-show-proof-proper.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Fixed:**
- Anomalies with :cmd:`Show Proof`
- (`#12296 <https://github.com/coq/coq/pull/12296>`_,
- by Hugo Herbelin; fixes
- `#12234 <https://github.com/coq/coq/pull/12234>`_).
diff --git a/doc/changelog/07-commands-and-options/12358-redirect_printing_params.rst b/doc/changelog/07-commands-and-options/12358-redirect_printing_params.rst
deleted file mode 100644
index 5b35090d7e..0000000000
--- a/doc/changelog/07-commands-and-options/12358-redirect_printing_params.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- :cmd:Redirect now obeys the :opt:`Printing Width` and
- :opt:`Printing Depth` flags.
- (`#12358 <https://github.com/coq/coq/pull/12358>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/07-commands-and-options/8855-master+more-search-options.rst b/doc/changelog/07-commands-and-options/8855-master+more-search-options.rst
deleted file mode 100644
index cd993bf356..0000000000
--- a/doc/changelog/07-commands-and-options/8855-master+more-search-options.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Added:** Support for new clauses `hyp:`, `headhyp:`, `concl:`,
- `headconcl:`, `head:` and `is:` in :cmd:`Search`. Support for
- complex search queries combining disjunctions, conjunctions and
- negations (`#8855 <https://github.com/coq/coq/pull/8855>`_, by Hugo
- Herbelin, with ideas from Cyril Cohen and help from Théo
- Zimmermann).
-- **Deprecated:** :cmd:`SearchHead` in favor of the new `headconcl:`
- clause of :cmd:`Search` (part of `#8855
- <https://github.com/coq/coq/pull/8855>`_, by Théo Zimmermann).
diff --git a/doc/changelog/08-tools/10592-coqdoc-details.rst b/doc/changelog/08-tools/10592-coqdoc-details.rst
deleted file mode 100644
index c5bdc1dbb0..0000000000
--- a/doc/changelog/08-tools/10592-coqdoc-details.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- A new documentation environment ``details`` to make certain portion
- of a Coq document foldable. See :ref:`coqdoc`
- (`#10592 <https://github.com/coq/coq/pull/10592>`_,
- by Thomas Letan).
diff --git a/doc/changelog/08-tools/11302-better-timing-scripts-options.rst b/doc/changelog/08-tools/11302-better-timing-scripts-options.rst
deleted file mode 100644
index 3b20bbf75d..0000000000
--- a/doc/changelog/08-tools/11302-better-timing-scripts-options.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-- **Added:**
- The ``make-both-single-timing-files.py`` script now accepts a
- ``--fuzz=N`` parameter on the command line which determines how many
- characters two lines may be offset in the "before" and "after"
- timing logs while still being considered the same line. When
- invoking this script via the ``print-pretty-single-time-diff``
- target in a ``Makefile`` made by ``coq_makefile``, you can set this
- argument by passing ``TIMING_FUZZ=N`` to ``make`` (`#11302
- <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
-
-- **Added:**
- The ``make-one-time-file.py`` and ``make-both-time-files.py``
- scripts now accept a ``--real`` parameter on the command line to
- print real times rather than user times in the tables. The
- ``make-both-single-timing-files.py`` script accepts a ``--user``
- parameter to use user times. When invoking these scripts via the
- ``print-pretty-timed`` or ``print-pretty-timed-diff`` or
- ``print-pretty-single-time-diff`` targets in a ``Makefile`` made by
- ``coq_makefile``, you can set this argument by passing
- ``TIMING_REAL=1`` (to pass ``--real``) or ``TIMING_REAL=0`` (to pass
- ``--user``) to ``make`` (`#11302
- <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
-
-- **Added:**
- Coq's build system now supports both ``TIMING_FUZZ``,
- ``TIMING_SORT_BY``, and ``TIMING_REAL`` just like a ``Makefile``
- made by ``coq_makefile`` (`#11302
- <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
-
-- **Fixed:**
- The various timing targets for Coq's standard library now correctly
- display and label the "before" and "after" columns, rather than
- mixing them up (`#11302 <https://github.com/coq/coq/pull/11302>`_
- fixes `#11301 <https://github.com/coq/coq/issues/11301>`_, by Jason
- Gross).
diff --git a/doc/changelog/08-tools/11409-mltop+deprecate_use.rst b/doc/changelog/08-tools/11409-mltop+deprecate_use.rst
deleted file mode 100644
index f4f110ed67..0000000000
--- a/doc/changelog/08-tools/11409-mltop+deprecate_use.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Removed:**
- The `-load-ml-source` and `-load-ml-object` command line options
- have been removed; their use was very limited, you can achieve the same adding
- additional object files in the linking step or using a plugin
- (`#11409 <https://github.com/coq/coq/pull/11409>`_, by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/08-tools/11523-coqdep+refactor2.rst b/doc/changelog/08-tools/11523-coqdep+refactor2.rst
deleted file mode 100644
index 3f93d60926..0000000000
--- a/doc/changelog/08-tools/11523-coqdep+refactor2.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Changed:**
- Internal options and behavior of ``coqdep`` have changed. ``coqdep``
- no longer works as a replacement for ``ocamldep``, thus ``.ml``
- files are not supported as input. Also, several deprecated options
- have been removed: ``-w``, ``-D``, ``-mldep``, ``-prefix``,
- ``-slash``, and ``-dumpbox``. Passing ``-boot`` to ``coqdep`` will
- not load any path by default now, ``-R/-Q`` should be used instead
- (`#11523 <https://github.com/coq/coq/pull/11523>`_ and
- `#11589 <https://github.com/coq/coq/pull/11589>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/08-tools/11606-memory-in-timing-scripts.rst b/doc/changelog/08-tools/11606-memory-in-timing-scripts.rst
deleted file mode 100644
index e09c6ef3a3..0000000000
--- a/doc/changelog/08-tools/11606-memory-in-timing-scripts.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-- **Added:**
- The ``make-one-time-file.py`` and ``make-both-time-files.py``
- scripts now include peak memory usage information in the tables (can
- be turned off by the ``--no-include-mem`` command-line parameter),
- and a ``--sort-by-mem`` parameter to sort the tables by memory
- rather than time. When invoking these scripts via the
- ``print-pretty-timed`` or ``print-pretty-timed-diff`` targets in a
- ``Makefile`` made by ``coq_makefile``, you can set this argument by
- passing ``TIMING_INCLUDE_MEM=0`` (to pass ``--no-include-mem``) and
- ``TIMING_SORT_BY_MEM=1`` (to pass ``--sort-by-mem``) to ``make``
- (`#11606 <https://github.com/coq/coq/pull/11606>`_, by Jason Gross).
-
-- **Added:**
- Coq's build system now supports both ``TIMING_INCLUDE_MEM`` and
- ``TIMING_SORT_BY_MEM`` just like a ``Makefile`` made by
- ``coq_makefile`` (`#11606 <https://github.com/coq/coq/pull/11606>`_,
- by Jason Gross).
-
-- **Changed:**
- The sorting order of the timing script ``make-both-time-files.py``
- and the target ``print-pretty-timed-diff`` is now deterministic even
- when the sorting order is ``absolute`` or ``diff``; previously the
- relative ordering of two files with identical times was
- non-deterministic (`#11606
- <https://github.com/coq/coq/pull/11606>`_, by Jason Gross).
diff --git a/doc/changelog/08-tools/11617-toplevel+boot.rst b/doc/changelog/08-tools/11617-toplevel+boot.rst
deleted file mode 100644
index 49dd0ee2d8..0000000000
--- a/doc/changelog/08-tools/11617-toplevel+boot.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- New ``coqc`` / ``coqtop`` option ``-boot`` that will not bind the
- `Coq` library prefix by default
- (`#11617 <https://github.com/coq/coq/pull/11617>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/08-tools/11851-coqc-flags-fix.rst b/doc/changelog/08-tools/11851-coqc-flags-fix.rst
deleted file mode 100644
index ff736641b4..0000000000
--- a/doc/changelog/08-tools/11851-coqc-flags-fix.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Changed:**
- The order in which the require flags `-ri`, `-re`, `-rfrom`, etc.
- and the option flags `-set`, `-unset` are given now matters. In
- particular, it is now possible to interleave the loading of plugins
- and the setting of options by choosing the right order for these
- flags. The load flags `-l` and `-lv` are still processed afterward
- for now (`#11851 <https://github.com/coq/coq/pull/11851>`_ and
- `#12097 <https://github.com/coq/coq/pull/12097>`_,
- by Lasse Blaauwbroek).
diff --git a/doc/changelog/08-tools/12005-remove-deprecated-coqtop-options.rst b/doc/changelog/08-tools/12005-remove-deprecated-coqtop-options.rst
deleted file mode 100644
index affb685fcb..0000000000
--- a/doc/changelog/08-tools/12005-remove-deprecated-coqtop-options.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Removed:**
- Confusingly-named and deprecated since 8.11 `-require` option.
- Use the equivalent `-require-import` instead
- (`#12005 <https://github.com/coq/coq/pull/12005>`_,
- by Théo Zimmermann).
diff --git a/doc/changelog/08-tools/12006-issue5632.rst b/doc/changelog/08-tools/12006-issue5632.rst
deleted file mode 100644
index 162d56b1b6..0000000000
--- a/doc/changelog/08-tools/12006-issue5632.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- ``Makefile`` generated by ``coq_makefile`` erases ``.lia.cache`` and ``.nia.cache`` by ``make cleanall``.
- (`#12006 <https://github.com/coq/coq/pull/12006>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/08-tools/12026-master+coqdoc-self-linked-defs-wish7093.rst b/doc/changelog/08-tools/12026-master+coqdoc-self-linked-defs-wish7093.rst
deleted file mode 100644
index 5c4ef82b8b..0000000000
--- a/doc/changelog/08-tools/12026-master+coqdoc-self-linked-defs-wish7093.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Definitions in coqdoc link to themselves, giving access in html to their own url
- (`#12026 <https://github.com/coq/coq/pull/12026>`_,
- by Hugo Herbelin; granting `#7093 <https://github.com/coq/coq/pull/7093>`_).
diff --git a/doc/changelog/08-tools/12027-master+fix3415-coqdoc-record.rst b/doc/changelog/08-tools/12027-master+fix3415-coqdoc-record.rst
deleted file mode 100644
index ae9b69e592..0000000000
--- a/doc/changelog/08-tools/12027-master+fix3415-coqdoc-record.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Fixed:**
- Fields of a record tuple now link in coqdoc to their definition
- (`#12027 <https://github.com/coq/coq/pull/12027>`_, fixes
- `#3415 <https://github.com/coq/coq/issues/3415>`_,
- by Hugo Herbelin; ).
diff --git a/doc/changelog/08-tools/12033-master+coqdoc-fix7697-passing-binders-location.rst b/doc/changelog/08-tools/12033-master+coqdoc-fix7697-passing-binders-location.rst
deleted file mode 100644
index af0d28305a..0000000000
--- a/doc/changelog/08-tools/12033-master+coqdoc-fix7697-passing-binders-location.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- Add hyperlinks on bound variables for coqdoc
- (`#12033 <https://github.com/coq/coq/pull/12033>`_,
- by Hugo Herbelin; it incidentally fixes
- `#7697 <https://github.com/coq/coq/pull/7697>`_).
diff --git a/doc/changelog/08-tools/12037-coqdoc-preformatted.rst b/doc/changelog/08-tools/12037-coqdoc-preformatted.rst
deleted file mode 100644
index bf65719516..0000000000
--- a/doc/changelog/08-tools/12037-coqdoc-preformatted.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Fixed:**
- ``coqdoc`` now reports the location of a mismatched opening ``[[`` instead of
- throwing an uninformative exception.
- (`#12037 <https://github.com/coq/coq/pull/12037>`_,
- fixes `#9670 <https://github.com/coq/coq/issues/9670>`_,
- by Lysxia).
diff --git a/doc/changelog/08-tools/12076-fix-5030.rst b/doc/changelog/08-tools/12076-fix-5030.rst
deleted file mode 100644
index afb59b1cde..0000000000
--- a/doc/changelog/08-tools/12076-fix-5030.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Fixed:**
- Fix #5030 (coqchk reports names from opaque modules as axioms)
- (`#12076 <https://github.com/coq/coq/pull/12076>`_,
- by Pierre Roux).
diff --git a/doc/changelog/08-tools/12091-master+coqdoc-css-target.rst b/doc/changelog/08-tools/12091-master+coqdoc-css-target.rst
deleted file mode 100644
index f6af5d40e8..0000000000
--- a/doc/changelog/08-tools/12091-master+coqdoc-css-target.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- ``Coqdoc``: Highlighting of the exact position of the target of links
- (`#12091 <https://github.com/coq/coq/pull/12091>`_,
- by Hugo Herbelin).
diff --git a/doc/changelog/08-tools/12126-adjust-timed-name.rst b/doc/changelog/08-tools/12126-adjust-timed-name.rst
deleted file mode 100644
index c305b384d9..0000000000
--- a/doc/changelog/08-tools/12126-adjust-timed-name.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Changed:**
- The output of ``make TIMED=1`` (and therefore the timing targets
- such as ``print-pretty-timed`` and ``print-pretty-timed-diff``) now
- displays the full name of the output file being built, rather than
- the stem of the rule (which was usually the filename without the
- extension, but in general could be anything for user-defined rules
- involving ``%``) (`#12126
- <https://github.com/coq/coq/pull/12126>`_, by Jason Gross).
diff --git a/doc/changelog/08-tools/12211-time-ocaml.rst b/doc/changelog/08-tools/12211-time-ocaml.rst
deleted file mode 100644
index 7ff68cc495..0000000000
--- a/doc/changelog/08-tools/12211-time-ocaml.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- When passing ``TIMED=1`` to ``make`` with either Coq's own makefile
- or a ``coq_makefile``\-made makefile, timing information is now
- printed for OCaml files as well (`#12211
- <https://github.com/coq/coq/pull/12211>`_, by Jason Gross).
diff --git a/doc/changelog/08-tools/12368-fix-missing-newline-time-file-maker.rst b/doc/changelog/08-tools/12368-fix-missing-newline-time-file-maker.rst
deleted file mode 100644
index 8a43f5af94..0000000000
--- a/doc/changelog/08-tools/12368-fix-missing-newline-time-file-maker.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Changed:**
- The pretty-timed scripts and targets now print a newline at the end of their
- tables, rather than creating text with no trailing newline (`#12368
- <https://github.com/coq/coq/pull/12368>`_, by Jason Gross).
diff --git a/doc/changelog/08-tools/12389-coq_makefile.rst b/doc/changelog/08-tools/12389-coq_makefile.rst
new file mode 100644
index 0000000000..74e3a68170
--- /dev/null
+++ b/doc/changelog/08-tools/12389-coq_makefile.rst
@@ -0,0 +1,5 @@
+- **Changed:**
+ Adding the possibility in coq_makefile to directly set the installation folders,
+ through the :n:`COQLIBINSTALL` and :n:`COQDOCINSTALL` variables.
+ See :ref:`coqmakefilelocal`.
+ (`#12389 <https://github.com/coq/coq/pull/12389>`_, by Martin Bodin, review of Enrico Tassi).
diff --git a/doc/changelog/08-tools/12410-add-fixes.rst b/doc/changelog/08-tools/12410-add-fixes.rst
new file mode 100644
index 0000000000..f4c41dc3c3
--- /dev/null
+++ b/doc/changelog/08-tools/12410-add-fixes.rst
@@ -0,0 +1,4 @@
+- **Changed:**
+ ``dev/tools/make-changelog.sh`` now asks for a list of bugs fixed by the PR
+ (`#12410 <https://github.com/coq/coq/pull/12410>`_, fixes `#12386
+ <https://github.com/coq/coq/issues/12386>`_, by Jason Gross).
diff --git a/doc/changelog/09-coqide/11414-remove-ide-tactic-menu.rst b/doc/changelog/09-coqide/11414-remove-ide-tactic-menu.rst
deleted file mode 100644
index 49ac16eee9..0000000000
--- a/doc/changelog/09-coqide/11414-remove-ide-tactic-menu.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Removed:**
- "Tactic" menu from CoqIDE which had been unmaintained for a number of years
- (`#11414 <https://github.com/coq/coq/pull/11414>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/09-coqide/11415-remove-ide-revert-all-buffers.rst b/doc/changelog/09-coqide/11415-remove-ide-revert-all-buffers.rst
deleted file mode 100644
index 9d22a858f1..0000000000
--- a/doc/changelog/09-coqide/11415-remove-ide-revert-all-buffers.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Removed:**
- "Revert all buffers" command from CoqIDE which had been broken for a long time
- (`#11415 <https://github.com/coq/coq/pull/11415>`_,
- by Pierre-Marie Pédrot).
diff --git a/doc/changelog/10-standard-library/11127-trunk.rst b/doc/changelog/10-standard-library/11127-trunk.rst
deleted file mode 100644
index 3f461397ae..0000000000
--- a/doc/changelog/10-standard-library/11127-trunk.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-- **Added:** Theorem :g:`bezout_comm` for natural numbers
- (`#11127 <https://github.com/coq/coq/pull/11127>`_, by Daniel de Rauglaudre).
diff --git a/doc/changelog/10-standard-library/11240-rew-dependent.rst b/doc/changelog/10-standard-library/11240-rew-dependent.rst
deleted file mode 100644
index e9daab0c2c..0000000000
--- a/doc/changelog/10-standard-library/11240-rew-dependent.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added**
- Added :g:`rew dependent` notations for the dependent version of
- :g:`rew` in :g:`Coq.Init.Logic.EqNotations` to improve the display
- and parsing of :g:`match` statements on :g:`Logic.eq` (`#11240
- <https://github.com/coq/coq/pull/11240>`_, by Jason Gross).
diff --git a/doc/changelog/10-standard-library/11249-ollibs-list-changelog.rst b/doc/changelog/10-standard-library/11249-ollibs-list-changelog.rst
deleted file mode 100644
index be54e45808..0000000000
--- a/doc/changelog/10-standard-library/11249-ollibs-list-changelog.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-- **Added:**
- lemmas about lists:
-
- - properties of ``In``: ``in_elt``, ``in_elt_inv``
- - properties of ``nth``: ``app_nth2_plus``, ``nth_middle``, ``nth_ext``
- - properties of ``last``: ``last_last``, ``removelast_last``
- - properties of ``remove``: ``remove_cons``, ``remove_app``, ``notin_remove``, ``in_remove``, ``in_in_remove``, ``remove_remove_comm``, ``remove_remove_eq``, ``remove_length_le``, ``remove_length_lt``
- - properties of ``concat``: ``in_concat``, ``remove_concat``
- - properties of ``map`` and ``flat_map``: ``map_last``, ``map_eq_cons``, ``map_eq_app``, ``flat_map_app``, ``flat_map_ext``, ``nth_nth_nth_map``
- - properties of ``incl``: ``incl_nil_l``, ``incl_l_nil``, ``incl_cons_inv``, ``incl_app_app``, ``incl_app_inv``, ``remove_incl``, ``incl_map``, ``incl_filter``, ``incl_Forall_in_iff``
- - properties of ``NoDup`` and ``nodup``: ``NoDup_rev``, ``NoDup_filter``, ``nodup_incl``
- - properties of ``Exists`` and ``Forall``: ``Exists_nth``, ``Exists_app``, ``Exists_rev``, ``Exists_fold_right``, ``incl_Exists``, ``Forall_nth``, ``Forall_app``, ``Forall_elt``, ``Forall_rev``, ``Forall_fold_right``, ``incl_Forall``, ``map_ext_Forall``, ``Exists_or``, ``Exists_or_inv``, ``Forall_and``, ``Forall_and_inv``, ``exists_Forall``, ``Forall_image``, ``concat_nil_Forall``, ``in_flat_map_Exists``, ``notin_flat_map_Forall``
- - properties of ``repeat``: ``repeat_cons``, ``repeat_to_concat``
- - definitions and properties of ``list_sum`` and ``list_max``: ``list_sum_app``, ``list_max_app``, ``list_max_le``, ``list_max_lt``
- - misc: ``elt_eq_unit``, ``last_length``, ``rev_eq_app``, ``removelast_firstn_len``, ``cons_seq``, ``seq_S``
-
- (`#11249 <https://github.com/coq/coq/pull/11249>`_, `#12237 <https://github.com/coq/coq/pull/12237>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/11335-ollibs-wfnat-changelog.rst b/doc/changelog/10-standard-library/11335-ollibs-wfnat-changelog.rst
deleted file mode 100644
index 0eb3eefde5..0000000000
--- a/doc/changelog/10-standard-library/11335-ollibs-wfnat-changelog.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Well-founded induction principles for `nat`: ``lt_wf_rect1``, ``lt_wf_rect``, ``gt_wf_rect``, ``lt_wf_double_rect``
- (`#11335 <https://github.com/coq/coq/pull/11335>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/11350-list.rst b/doc/changelog/10-standard-library/11350-list.rst
deleted file mode 100644
index 52c2517161..0000000000
--- a/doc/changelog/10-standard-library/11350-list.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- ``remove'`` and ``count_occ'`` over lists,
- alternatives to ``remove`` and ``count_occ`` based on ``filter``
- (`#11350 <https://github.com/coq/coq/pull/11350>`_,
- by Yishuai Li).
diff --git a/doc/changelog/10-standard-library/11404-removeRList.rst b/doc/changelog/10-standard-library/11404-removeRList.rst
deleted file mode 100644
index 88e22d128c..0000000000
--- a/doc/changelog/10-standard-library/11404-removeRList.rst
+++ /dev/null
@@ -1,15 +0,0 @@
-- **Removed:**
- Type `RList` has been removed. All uses have been replaced by `list R`.
- Functions from `RList` named `In`, `Rlength`, `cons_Rlist`, `app_Rlist`
- have also been removed as they are essentially the same as `In`, `length`,
- `app`, and `map` from `List`, modulo the following changes:
-
- - `RList.In x (RList.cons a l)` used to be convertible to
- `(x = a) \\/ RList.In x l`,
- but `List.In x (a :: l)` is convertible to
- `(a = x) \\/ List.In l`.
- The equality is reversed.
- - `app_Rlist` and `List.map` take arguments in different order.
-
- (`#11404 <https://github.com/coq/coq/pull/11404>`_,
- by Yves Bertot).
diff --git a/doc/changelog/10-standard-library/11686-fix-int-notations.rst b/doc/changelog/10-standard-library/11686-fix-int-notations.rst
deleted file mode 100644
index 4959a9f9b1..0000000000
--- a/doc/changelog/10-standard-library/11686-fix-int-notations.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Changed:**
- Notations :n:`[|@term|]` and :n:`[||@term||]` for morphisms from 63-bit
- integers to :g:`Z` and :g:`zn2z int` have been removed in favor of
- :n:`φ(@term)` and :n:`Φ(@term)` respectively. These notations were
- breaking Ltac parsing (`#11686 <https://github.com/coq/coq/pull/11686>`_,
- by Maxime Dénès).
diff --git a/doc/changelog/10-standard-library/11725-cleanup-reals.rst b/doc/changelog/10-standard-library/11725-cleanup-reals.rst
deleted file mode 100644
index 02ee7e6c70..0000000000
--- a/doc/changelog/10-standard-library/11725-cleanup-reals.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Changed:**
- Use implicit arguments for ``ConstructiveReals``. Move ``ConstructiveReals``
- into new directory ``Abstract``. Remove imports of implementations inside
- those ``Abstract`` files. Move implementation by means of Cauchy sequences in new directory ``Cauchy``.
- (`#11725 <https://github.com/coq/coq/pull/11725>`_,
- by Vincent Semeria).
diff --git a/doc/changelog/10-standard-library/1185-sort.rst b/doc/changelog/10-standard-library/1185-sort.rst
deleted file mode 100644
index edb5ee3ac4..0000000000
--- a/doc/changelog/10-standard-library/1185-sort.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- The names of ``Sorted_sort`` and ``LocallySorted_sort`` in ``Coq.Sorting.MergeSort``
- have been swapped to appropriately reflect their meanings
- (`#1185 <https://github.com/coq/coq/pull/1185>`_,
- by Lysxia).
diff --git a/doc/changelog/10-standard-library/11880-iter.rst b/doc/changelog/10-standard-library/11880-iter.rst
deleted file mode 100644
index be4e44ce4c..0000000000
--- a/doc/changelog/10-standard-library/11880-iter.rst
+++ /dev/null
@@ -1,8 +0,0 @@
-- **Added:**
- Facts about ``N.iter`` and ``Pos.iter``:
-
- - ``N.iter_swap_gen``, ``N.iter_swap``, ``N.iter_succ``, ``N.iter_succ_r``, ``N.iter_add``, ``N.iter_ind``, ``N.iter_invariant``;
- - ``Pos.iter_succ_r``, ``Pos.iter_ind``.
-
- (`#11880 <https://github.com/coq/coq/pull/11880>`_,
- by Lysxia).
diff --git a/doc/changelog/10-standard-library/11891-fix-order-notations.rst b/doc/changelog/10-standard-library/11891-fix-order-notations.rst
deleted file mode 100644
index d58d26244a..0000000000
--- a/doc/changelog/10-standard-library/11891-fix-order-notations.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Changed:**
- Notations :g:`<=?` and :g:`<?` from ``Coq.Structures.Orders`` and
- ``Coq.Sorting.Mergesort.NatOrder`` are now at level 70 rather than
- 35, so as to be compatible with the notations defined everywhere
- else in the standard library. This may require re-parenthesizing
- some expressions. These notations were breaking the ability to
- import modules from the standard library that were otherwise
- compatible (fixes `#11890
- <https://github.com/coq/coq/issues/11890>`_, `#11891
- <https://github.com/coq/coq/pull/11891>`_, by Jason Gross).
diff --git a/doc/changelog/10-standard-library/11909-fix-≡-level.rst b/doc/changelog/10-standard-library/11909-fix-≡-level.rst
deleted file mode 100644
index 96551be537..0000000000
--- a/doc/changelog/10-standard-library/11909-fix-≡-level.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Changed:**
- The level of :g:`≡` in ``Coq.Numbers.Cyclic.Int63.Int63`` is now 70,
- no associativity, in line with :g:`=`. Note that this is a minor
- incompatibility with developments that declare their own :g:`≡`
- notation and import ``Int63`` (fixes `#11905
- <https://github.com/coq/coq/issues/11905>`_, `#11909
- <https://github.com/coq/coq/pull/11909>`_, by Jason Gross).
diff --git a/doc/changelog/10-standard-library/11946-ollibs-permutation.rst b/doc/changelog/10-standard-library/11946-ollibs-permutation.rst
deleted file mode 100644
index 626677d31a..0000000000
--- a/doc/changelog/10-standard-library/11946-ollibs-permutation.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Added:**
- Facts about ``Permutation``:
-
- - structure: ``Permutation_refl'``, ``Permutation_morph_transp``
- - compatibilities: ``Permutation_app_rot``, ``Permutation_app_swap_app``, ``Permutation_app_middle``, ``Permutation_middle2``, ``Permutation_elt``, ``Permutation_Forall``, ``Permutation_Exists``, ``Permutation_Forall2``, ``Permutation_flat_map``, ``Permutation_list_sum``, ``Permutation_list_max``
- - inversions: ``Permutation_app_inv_m``, ``Permutation_vs_elt_inv``, ``Permutation_vs_cons_inv``, ``Permutation_vs_cons_cons_inv``, ``Permutation_map_inv``, ``Permutation_image``, ``Permutation_elt_map_inv``
- - length-preserving definition by means of transpositions ``Permutation_transp`` with associated properties: ``Permutation_transp_sym``, ``Permutation_transp_equiv``, ``Permutation_transp_cons``, ``Permutation_Permutation_transp``, ``Permutation_ind_transp``
-
- (`#11946 <https://github.com/coq/coq/pull/11946>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/11957-signotations.rst b/doc/changelog/10-standard-library/11957-signotations.rst
deleted file mode 100644
index fc5d434274..0000000000
--- a/doc/changelog/10-standard-library/11957-signotations.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- notations for sigma types: ``{ x & P & Q }``, ``{ ' pat & P }``, ``{ ' pat & P & Q }``
- (`#11957 <https://github.com/coq/coq/pull/11957>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/11992-no-reexports.rst b/doc/changelog/10-standard-library/11992-no-reexports.rst
deleted file mode 100644
index 3f46bfd501..0000000000
--- a/doc/changelog/10-standard-library/11992-no-reexports.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Changed:**
- No longer re-export ``ListNotations`` from ``Program`` (``Program.Syntax``)
- (`#11992 <https://github.com/coq/coq/pull/11992>`_,
- by Antonio Nikishaev).
diff --git a/doc/changelog/10-standard-library/12008-ollibs-bool.rst b/doc/changelog/10-standard-library/12008-ollibs-bool.rst
deleted file mode 100644
index 42e5eb96eb..0000000000
--- a/doc/changelog/10-standard-library/12008-ollibs-bool.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Added:**
- Order relations ``lt`` and ``compare`` added in ``Bool.Bool``.
- Order properties for ``bool`` added in ``Bool.BoolOrder`` as well as two modules ``Bool_as_OT`` and ``Bool_as_DT`` in ``Structures.OrdersEx``
- (`#12008 <https://github.com/coq/coq/pull/12008>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/12014-ollibs-vector.rst b/doc/changelog/10-standard-library/12014-ollibs-vector.rst
deleted file mode 100644
index 87625dd23b..0000000000
--- a/doc/changelog/10-standard-library/12014-ollibs-vector.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Added:**
- Properties of some operations on vectors:
-
- - ``nth_order``: ``nth_order_hd``, ``nth_order_tl``, ``nth_order_ext``
- - ``replace``: ``nth_order_replace_eq``, ``nth_order_replace_neq``, ``replace_id``, ``replace_replace_eq``, ``replace_replace_neq``
- - ``map``: ``map_id``, ``map_map``, ``map_ext_in``, ``map_ext``
- - ``Forall`` and ``Forall2``: ``Forall_impl``, ``Forall_forall``, ``Forall_nth_order``, ``Forall2_nth_order``
-
- (`#12014 <https://github.com/coq/coq/pull/12014>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/12018-master+implb-characterization.rst b/doc/changelog/10-standard-library/12018-master+implb-characterization.rst
deleted file mode 100644
index 4b0abdfa3b..0000000000
--- a/doc/changelog/10-standard-library/12018-master+implb-characterization.rst
+++ /dev/null
@@ -1,19 +0,0 @@
-- **Added:**
- Added lemmas
- :g:`orb_negb_l`,
- :g:`andb_negb_l`,
- :g:`implb_true_iff`,
- :g:`implb_false_iff`,
- :g:`implb_true_r`,
- :g:`implb_false_r`,
- :g:`implb_true_l`,
- :g:`implb_false_l`,
- :g:`implb_same`,
- :g:`implb_contrapositive`,
- :g:`implb_negb`,
- :g:`implb_curry`,
- :g:`implb_andb_distrib_r`,
- :g:`implb_orb_distrib_r`,
- :g:`implb_orb_distrib_l` in library :g:`Bool`
- (`#12018 <https://github.com/coq/coq/pull/12018>`_,`
- by Hugo Herbelin).`
diff --git a/doc/changelog/10-standard-library/12031-ollibs-cpermutation.rst b/doc/changelog/10-standard-library/12031-ollibs-cpermutation.rst
deleted file mode 100644
index 95b4cce2f7..0000000000
--- a/doc/changelog/10-standard-library/12031-ollibs-cpermutation.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Definition and properties of cyclic permutations / circular shifts: ``CPermutation``
- (`#12031 <https://github.com/coq/coq/pull/12031>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/12044-issue-12015.rst b/doc/changelog/10-standard-library/12044-issue-12015.rst
deleted file mode 100644
index 166fc80fb0..0000000000
--- a/doc/changelog/10-standard-library/12044-issue-12015.rst
+++ /dev/null
@@ -1,10 +0,0 @@
-- **Fixed:**
- Rewrote ``Structures.OrderedTypeEx.String_as_OT.compare``
- to avoid huge proof terms
- (Fixes `#12015 <https://github.com/coq/coq/issues/12015>`_,
- `#12044 <https://github.com/coq/coq/pull/12044>`_,
- by formalize.eth (formalize@protonmail.com)).
-- **Added:**
- Added ``Structures.OrderedTypeEx.Ascii_as_OT``
- (`#12044 <https://github.com/coq/coq/pull/12044>`_,
- by formalize.eth (formalize@protonmail.com)).
diff --git a/doc/changelog/10-standard-library/12073-split-nsatz.rst b/doc/changelog/10-standard-library/12073-split-nsatz.rst
deleted file mode 100644
index bc3c24e441..0000000000
--- a/doc/changelog/10-standard-library/12073-split-nsatz.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-- **Changed:**
- It is now possible to import the :g:`nsatz` machinery without
- transitively depending on the axioms of the real numbers nor of
- classical logic by loading ``Coq.nsatz.NsatzTactic`` rather than
- ``Coq.nsatz.Nsatz``. Note that some constants have changed kernel
- names, living in ``Coq.nsatz.NsatzTactic`` rather than
- ``Coq.nsatz.Nsatz``; this might cause minor incompatibilities that
- can be fixed by actually running :g:`Import Nsatz` rather than
- relying on absolute names (fixes `#5445
- <https://github.com/coq/coq/issues/5445>`_, `#12073
- <https://github.com/coq/coq/pull/12073>`_, by Jason Gross).
diff --git a/doc/changelog/10-standard-library/12119-issue12119.rst b/doc/changelog/10-standard-library/12119-issue12119.rst
deleted file mode 100644
index 42672b1465..0000000000
--- a/doc/changelog/10-standard-library/12119-issue12119.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Changed:**
- new lemma ``NoDup_incl_NoDup`` in ``List.v``
- to remove useless hypothesis `NoDup l'` in ``Sorting.Permutation.NoDup_Permutation_bis``
- (`#12119 <https://github.com/coq/coq/pull/12119>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/12121-master+fix11903-warn-non-truly-fixpoint.rst b/doc/changelog/10-standard-library/12121-master+fix11903-warn-non-truly-fixpoint.rst
deleted file mode 100644
index f22fff0736..0000000000
--- a/doc/changelog/10-standard-library/12121-master+fix11903-warn-non-truly-fixpoint.rst
+++ /dev/null
@@ -1,5 +0,0 @@
-- **Fixed:**
- :cmd:`Fixpoint`\s of the standard library without a recursive call turned
- into ordinary :cmd:`Definition`\s
- (`#12121 <https://github.com/coq/coq/pull/12121>`_,
- by Hugo Herbelin; fixes `#11903 <https://github.com/coq/coq/pull/11903>`_).
diff --git a/doc/changelog/10-standard-library/12162-bool-leb.rst b/doc/changelog/10-standard-library/12162-bool-leb.rst
deleted file mode 100644
index 6a4070a82e..0000000000
--- a/doc/changelog/10-standard-library/12162-bool-leb.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Deprecated:**
- ``Bool.leb`` in favor of ``Bool.le``. The definition of ``Bool.le`` is made local to avoid conflicts with ``Nat.le``. As a consequence, previous calls to ``leb`` based on importing ``Bool`` should now be qualified into ``Bool.le`` even if ``Bool`` is imported.
- (`#12162 <https://github.com/coq/coq/pull/12162>`_,
- by Olivier Laurent).
diff --git a/doc/changelog/10-standard-library/12263-fix-haskell-extraction.rst b/doc/changelog/10-standard-library/12263-fix-haskell-extraction.rst
deleted file mode 100644
index c80a070181..0000000000
--- a/doc/changelog/10-standard-library/12263-fix-haskell-extraction.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-- **Fixed:**
- In Haskell extraction with ``ExtrHaskellString``, equality comparisons on
- strings and characters are now guaranteed to be uniquely well-typed, even in
- very polymorphic contexts under ``unsafeCoerce``; this is achieved by adding
- type annotations to the extracted code, and by making ``ExtrHaskellString``
- export ``ExtrHaskellBasic`` (`#12263
- <https://github.com/coq/coq/pull/12263>`_, fixes `#12257
- <https://github.com/coq/coq/issues/12257>`_ and `#12258
- <https://github.com/coq/coq/issues/12258>`_, by Jason Gross).
diff --git a/doc/changelog/10-standard-library/12287-zero-of-Q.rst b/doc/changelog/10-standard-library/12287-zero-of-Q.rst
deleted file mode 100644
index ba2c74379b..0000000000
--- a/doc/changelog/10-standard-library/12287-zero-of-Q.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Changed:**
- Replace `CRzero` and `CRone` by `CR_of_Q 0` and `CR_of_Q 1` in `ConstructiveReals`
- (`#12287 <https://github.com/coq/coq/pull/12287>`_,
- by Vincent Semeria).
diff --git a/doc/changelog/10-standard-library/12288-constructive-experimental.rst b/doc/changelog/10-standard-library/12288-constructive-experimental.rst
deleted file mode 100644
index ec9b66bd7a..0000000000
--- a/doc/changelog/10-standard-library/12288-constructive-experimental.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Changed:**
- Split files `ConstructiveMinMax` and `ConstructivePower`.
-
- .. warning:: The constructive reals modules are marked as experimental.
-
- (`#12288 <https://github.com/coq/coq/pull/12288>`_,
- by Vincent Semeria).
diff --git a/doc/changelog/10-standard-library/9803-reals.rst b/doc/changelog/10-standard-library/9803-reals.rst
deleted file mode 100644
index 86c5e45bc1..0000000000
--- a/doc/changelog/10-standard-library/9803-reals.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-- **Changed:**
- Cleanup of names in the Reals theory: replaced `tan_is_inj` with `tan_inj` and replaced `atan_right_inv` with `tan_atan` -
- compatibility notations are provided. Moved various auxiliary lemmas from `Ratan.v` to more appropriate places.
- (`#9803 <https://github.com/coq/coq/pull/9803>`_,
- by Laurent Théry and Michael Soegtrop).
-
-- **Added:** to the Reals theory:
- inverse trigonometric functions `asin` and `acos` with lemmas for the derivatives, bounds and special values of these functions;
- an extensive set of identities between trigonometric functions and their inverse functions;
- lemmas for the injectivity of sine and cosine;
- lemmas on the derivative of the inverse of decreasing functions and on the derivative of horizontally mirrored functions;
- various generic auxiliary lemmas and definitions for Rsqr, sqrt, posreal an others.
- (`#9803 <https://github.com/coq/coq/pull/9803>`_,
- by Laurent Théry and Michael Soegtrop).
diff --git a/doc/changelog/11-infrastructure-and-dependencies/11245-bye+py2.rst b/doc/changelog/11-infrastructure-and-dependencies/11245-bye+py2.rst
deleted file mode 100644
index dc76178e0d..0000000000
--- a/doc/changelog/11-infrastructure-and-dependencies/11245-bye+py2.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Removed:**
- Python 2 is not longer required in any part of the codebase
- (`#11245 <https://github.com/coq/coq/pull/11245>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/changelog/11-infrastructure-and-dependencies/12224-gdef_alias.rst b/doc/changelog/11-infrastructure-and-dependencies/12224-gdef_alias.rst
deleted file mode 100644
index 35a618ea8d..0000000000
--- a/doc/changelog/11-infrastructure-and-dependencies/12224-gdef_alias.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-- **Changed:**
- Minimal versions of dependencies for building the reference manual:
- now requires Sphinx 2.3.1+, sphinx_rtd_theme 0.4.3+ and
- sphinxcontrib-bibtex 0.4.2+
- (`#12224 <https://github.com/coq/coq/pull/12224>`_,
- by Jim Fehrle and Théo Zimmermann).
diff --git a/doc/changelog/12-misc/10486-native-string-extraction.rst b/doc/changelog/12-misc/10486-native-string-extraction.rst
deleted file mode 100644
index 0636e303c4..0000000000
--- a/doc/changelog/12-misc/10486-native-string-extraction.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-- **Added:**
- Support for better extraction of strings in OCaml and Haskell:
- `ExtOcamlNativeString` provides bindings from the Coq `String` type to
- the OCaml `string` type, and string literals can be extracted to literals,
- both in OCaml and Haskell (`#10486
- <https://github.com/coq/coq/pull/10486>`_, by Xavier Leroy, with help from
- Maxime Dénès, review by Hugo Herbelin).
diff --git a/doc/changelog/12-misc/11755-exn+tclfail.rst b/doc/changelog/12-misc/11755-exn+tclfail.rst
deleted file mode 100644
index 800cc09e01..0000000000
--- a/doc/changelog/12-misc/11755-exn+tclfail.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-- **Added:**
- Backtrace information for tactics has been improved
- (`#11755 <https://github.com/coq/coq/pull/11755>`_,
- by Emilio Jesus Gallego Arias).
diff --git a/doc/sphinx/changes.rst b/doc/sphinx/changes.rst
index 363148e2a0..72f0fdf4c5 100644
--- a/doc/sphinx/changes.rst
+++ b/doc/sphinx/changes.rst
@@ -8,6 +8,977 @@ Recent changes
.. include:: ../unreleased.rst
+Version 8.12
+------------
+
+Summary of changes
+~~~~~~~~~~~~~~~~~~
+
+Changes in 8.12+beta1
+~~~~~~~~~~~~~~~~~~~~~
+
+.. contents::
+ :local:
+
+Specification language, type inference
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- **Changed:**
+ The deprecation warning raised since Coq 8.10 when a trailing
+ implicit is declared to be non-maximally inserted (with the command
+ :cmd:`Arguments`) has been turned into an error
+ (`#11368 <https://github.com/coq/coq/pull/11368>`_,
+ by SimonBoulier).
+- **Added:**
+ Warn when manual implicit arguments are used in unexpected positions
+ of a term (e.g. in `Check id (forall {x}, x)`) or when an implicit
+ argument name is shadowed (e.g. in `Check fun f : forall {x:nat}
+ {x}, nat => f`)
+ (`#10202 <https://github.com/coq/coq/pull/10202>`_,
+ by Hugo Herbelin).
+- **Added:**
+ :cmd:`Arguments` now supports setting
+ implicit an anonymous argument, as e.g. in `Arguments id {A} {_}`
+ (`#11098 <https://github.com/coq/coq/pull/11098>`_,
+ by Hugo Herbelin, fixes `#4696
+ <https://github.com/coq/coq/pull/4696>`_, `#5173
+ <https://github.com/coq/coq/pull/5173>`_, `#9098
+ <https://github.com/coq/coq/pull/9098>`_).
+- **Added:**
+ Syntax for non-maximal implicit arguments in definitions and terms using
+ square brackets. The syntax is ``[x : A]``, ``[x]``, ```[A]``
+ to be consistent with the command :cmd:`Arguments`
+ (`#11235 <https://github.com/coq/coq/pull/11235>`_,
+ by SimonBoulier).
+- **Added:**
+ :cmd:`Implicit Types` are now taken into account for printing. To inhibit it,
+ unset the :flag:`Printing Use Implicit Types` flag
+ (`#11261 <https://github.com/coq/coq/pull/11261>`_,
+ by Hugo Herbelin, granting `#10366 <https://github.com/coq/coq/pull/10366>`_).
+- **Added:**
+ New syntax :cmd:`Inductive` :n:`@ident {* @binder } | {* @binder } := ...`
+ to specify which parameters of an inductive type are uniform.
+ See :ref:`parametrized-inductive-types`
+ (`#11600 <https://github.com/coq/coq/pull/11600>`_, by Gaëtan Gilbert).
+- **Added:**
+ Warn when using :cmd:`Fixpoint` or :cmd:`CoFixpoint` for
+ definitions which are not recursive
+ (`#12121 <https://github.com/coq/coq/pull/12121>`_,
+ by Hugo Herbelin).
+- **Fixed:**
+ More robust and expressive treatment of implicit inductive
+ parameters in inductive declarations (`#11579
+ <https://github.com/coq/coq/pull/11579>`_, by Maxime Dénès, Gaëtan
+ Gilbert and Jasper Hugunin; fixes `#7253
+ <https://github.com/coq/coq/pull/7253>`_ and `#11585
+ <https://github.com/coq/coq/pull/11585>`_).
+- **Fixed:**
+ Anomaly which could be raised when printing binders with implicit types
+ (`#12323 <https://github.com/coq/coq/pull/12323>`_,
+ by Hugo Herbelin; fixes `#12322 <https://github.com/coq/coq/pull/12322>`_).
+
+Notations
+^^^^^^^^^
+
+- **Changed:** Notation scopes are now always inherited in
+ notations binding a partially applied constant, including for
+ notations binding an expression of the form :n:`@@qualid`. The latter was
+ not the case beforehand
+ (part of `#11120 <https://github.com/coq/coq/pull/11120>`_).
+- **Changed:**
+ The printing algorithm now interleaves search for notations and removal of coercions
+ (`#11172 <https://github.com/coq/coq/pull/11172>`_, by Hugo Herbelin).
+- **Changed:**
+ Nicer printing for decimal constants in R and Q.
+ 1.5 is now printed 1.5 rather than 15e-1
+ (`#11848 <https://github.com/coq/coq/pull/11848>`_,
+ by Pierre Roux).
+- **Removed:** deprecated ``compat`` modifier of :cmd:`Notation`
+ and :cmd:`Infix` commands. Use the :attr:`deprecated` attribute instead
+ (`#11113 <https://github.com/coq/coq/pull/11113>`_,
+ by Théo Zimmermann, with help from Jason Gross).
+- **Deprecated:**
+ Numeral Notation on ``Decimal.uint``, ``Decimal.int`` and
+ ``Decimal.decimal`` are replaced respectively by numeral notations
+ on ``Numeral.uint``, ``Numeral.int`` and ``Numeral.numeral``
+ (`#11948 <https://github.com/coq/coq/pull/11948>`_,
+ by Pierre Roux).
+- **Added:**
+ Notations declared with the ``where`` clause in the declaration of
+ inductive types, coinductive types, record fields, fixpoints and
+ cofixpoints now support the ``only parsing`` modifier
+ (`#11602 <https://github.com/coq/coq/pull/11602>`_,
+ by Hugo Herbelin).
+- **Added:**
+ :flag:`Printing Parentheses` flag to print parentheses even when
+ implied by associativity or precedence
+ (`#11650 <https://github.com/coq/coq/pull/11650>`_,
+ by Hugo Herbelin and Abhishek Anand).
+- **Added:**
+ Numeral notations now parse hexadecimal constants such as ``0x2a``
+ or ``0xb.2ap-2``. Parsers added for :g:`nat`, :g:`positive`, :g:`Z`,
+ :g:`N`, :g:`Q`, :g:`R`, primitive integers and primitive floats
+ (`#11948 <https://github.com/coq/coq/pull/11948>`_,
+ by Pierre Roux).
+- **Added:**
+ Abbreviations support arguments occurring both in term and binder position
+ (`#8808 <https://github.com/coq/coq/pull/8808>`_,
+ by Hugo Herbelin).
+- **Fixed:**
+ Different interpretations in different scopes of the same notation
+ string can now be associated to different printing formats (`#10832
+ <https://github.com/coq/coq/pull/10832>`_, by Hugo Herbelin,
+ fixes `#6092 <https://github.com/coq/coq/issues/6092>`_
+ and `#7766 <https://github.com/coq/coq/issues/7766>`_).
+- **Fixed:** Parsing and printing consistently handle inheritance of implicit
+ arguments in notations. With the exception of notations of
+ the form :n:`Notation @string := @@qualid` and :n:`Notation @ident := @@qualid` which
+ inhibit implicit arguments, all notations binding a partially
+ applied constant, as e.g. in :n:`Notation @string := (@qualid {+ @arg })`,
+ or :n:`Notation @string := (@@qualid {+ @arg })`, or
+ :n:`Notation @ident := (@qualid {+ @arg })`, or :n:`Notation @ident
+ := (@@qualid {+ @arg })`, inherit the remaining implicit arguments
+ (`#11120 <https://github.com/coq/coq/pull/11120>`_, by Hugo
+ Herbelin, fixing `#4690 <https://github.com/coq/coq/pull/4690>`_ and
+ `#11091 <https://github.com/coq/coq/pull/11091>`_).
+- **Fixed:**
+ Notations in ``only printing`` mode do not uselessly reserve parsing keywords
+ (`#11590 <https://github.com/coq/coq/pull/11590>`_,
+ by Hugo Herbelin, fixes `#9741 <https://github.com/coq/coq/pull/9741>`_).
+- **Fixed:**
+ Numeral Notations now play better with multiple scopes for the same
+ inductive type. Previously, when multiple numeral notations were defined
+ for the same inductive, only the last one was considered for
+ printing. Now, among the notations that are usable for printing and either
+ have a scope delimiter or are open, the selection is made according
+ to the order of open scopes, or according to the last defined
+ notation if no appropriate scope is open
+ (`#12163 <https://github.com/coq/coq/pull/12163>`_,
+ fixes `#12159 <https://github.com/coq/coq/pull/12159>`_,
+ by Pierre Roux, review by Hugo Herbelin and Jason Gross).
+
+Tactics
+^^^^^^^
+
+- **Changed:**
+ The :tacn:`rapply` tactic in :g:`Coq.Program.Tactics` now handles
+ arbitrary numbers of underscores and takes in a :g:`uconstr`. In
+ rare cases where users were relying on :tacn:`rapply` inserting
+ exactly 15 underscores and no more, due to the lemma having a
+ completely unspecified codomain (and thus allowing for any number of
+ underscores), the tactic will now loop instead (`#10760
+ <https://github.com/coq/coq/pull/10760>`_, by Jason Gross).
+- **Changed:**
+ The :g:`auto with zarith` tactic and variations (including
+ :tacn:`intuition`) may now call :tacn:`lia` instead of :tacn:`omega`
+ (when the `Omega` module is loaded); more goals may be automatically
+ solved, fewer section variables will be captured spuriously
+ (`#11018 <https://github.com/coq/coq/pull/11018>`_,
+ by Vincent Laporte).
+- **Changed:**
+ The new :flag:`NativeCompute Timing` flag causes calls to
+ :tacn:`native_compute` (as well as kernel calls to the native
+ compiler) to emit separate timing information about conversion to
+ native code, compilation, execution, and reification. It replaces
+ the timing information previously emitted when the `-debug`
+ command-line flag was set, and allows more fine-grained timing of
+ the native compiler
+ (`#11025 <https://github.com/coq/coq/pull/11025>`_, by Jason Gross).
+ Additionally, the timing information now uses real time rather than
+ user time (fixes `#11962
+ <https://github.com/coq/coq/issues/11962>`_, `#11963
+ <https://github.com/coq/coq/pull/11963>`_, by Jason Gross)
+- **Changed:**
+ Improve the efficiency of `PreOmega.elim_let` using an iterator implemented in OCaml
+ (`#11370 <https://github.com/coq/coq/pull/11370>`_, by Frédéric Besson).
+- **Changed:**
+ Improve the efficiency of :tacn:`zify` by rewritting the remaining Ltac code in OCaml
+ (`#11429 <https://github.com/coq/coq/pull/11429>`_, by Frédéric Besson).
+- **Changed:**
+ Backtrace information for tactics has been improved
+ (`#11755 <https://github.com/coq/coq/pull/11755>`_,
+ by Emilio Jesus Gallego Arias).
+- **Changed:**
+ The default tactic used by :g:`firstorder` is
+ :g:`auto with core` instead of :g:`auto with *`;
+ see :ref:`decisionprocedures` for details;
+ old behavior can be reset by using the `-compat 8.12` command-line flag;
+ to ease the migration of legacy code, the default solver can be set to `debug auto with *`
+ with `Set Firstorder Solver debug auto with *`
+ (`#11760 <https://github.com/coq/coq/pull/11760>`_,
+ by Vincent Laporte).
+- **Changed:**
+ :tacn:`autounfold` no longer fails when the :cmd:`Opaque`
+ command is used on constants in the hint databases
+ (`#11883 <https://github.com/coq/coq/pull/11883>`_,
+ by Attila Gáspár).
+- **Changed:**
+ Tactics with qualified name of the form ``Coq.Init.Notations`` are
+ now qualified with prefix ``Coq.Init.Ltac``; users of the ``-noinit``
+ option should now import ``Coq.Init.Ltac`` if they want to use Ltac
+ (`#12023 <https://github.com/coq/coq/pull/12023>`_,
+ by Hugo Herbelin; minor source of incompatibilities).
+- **Changed:**
+ Tactic :tacn:`subst` :n:`@ident` now fails over a section variable which is
+ indirectly dependent in the goal; the incompatibility can generally
+ be fixed by first clearing the hypotheses causing an indirect
+ dependency, as reported by the error message, or by using :tacn:`rewrite` :n:`... in *`
+ instead; similarly, :tacn:`subst` has no more effect on such variables
+ (`#12146 <https://github.com/coq/coq/pull/12146>`_,
+ by Hugo Herbelin; fixes `#10812 <https://github.com/coq/coq/pull/10812>`_
+ and `#12139 <https://github.com/coq/coq/pull/12139>`_).
+- **Changed:**
+ The check that :tacn:`unfold` arguments were indeed unfoldable has been moved to runtime
+ (`#12256 <https://github.com/coq/coq/pull/12256>`_,
+ by Pierre-Marie Pédrot; fixes
+ `#5764 <https://github.com/coq/coq/issues/5764>`_,
+ `#5159 <https://github.com/coq/coq/issues/5159>`_,
+ `#4925 <https://github.com/coq/coq/issues/4925>`_
+ and `#11727 <https://github.com/coq/coq/issues/11727>`_).
+- **Changed**
+ When the tactic :tacn:`functional induction` :n:`c__1 c__2 ... c__n` is used
+ with no parenthesis around :n:`c__1 c__2 ... c__n`, :n:`c__1 c__2 ... c__n` is now
+ read as one single applicative term. In particular implicit
+ arguments should be omitted. Rare source of incompatibility
+ (`#12326 <https://github.com/coq/coq/pull/12326>`_,
+ by Pierre Courtieu).
+- **Changed:**
+ When using :tacn:`exists` or :tacn:`eexists` with multiple arguments,
+ the evaluation of arguments and applications of constructors are now interleaved.
+ This improves unification in some cases
+ (`#12366 <https://github.com/coq/coq/pull/12366>`_,
+ fixes `#12365 <https://github.com/coq/coq/issues/12365>`_,
+ by Attila Gáspár).
+- **Removed:**
+ Undocumented ``omega with``. Using :tacn:`lia` is the recommended
+ replacement, although the old semantics of ``omega with *`` can also
+ be recovered with ``zify; omega``
+ (`#11288 <https://github.com/coq/coq/pull/11288>`_,
+ by Emilio Jesus Gallego Arias).
+- **Removed:**
+ Deprecated syntax `_eqn` for :tacn:`destruct` and :tacn:`remember`.
+ Use `eqn:` syntax instead
+ (`#11877 <https://github.com/coq/coq/pull/11877>`_,
+ by Hugo Herbelin).
+- **Removed:**
+ `at` clauses can no longer be used with :tacn:`autounfold`.
+ Since they had no effect, it is safe to remove them
+ (`#11883 <https://github.com/coq/coq/pull/11883>`_,
+ by Attila Gáspár).
+- **Deprecated:**
+ The :tacn:`omega` tactic is deprecated;
+ use :tacn:`lia` from the :ref:`Micromega <micromega>` plugin instead
+ (`#11976 <https://github.com/coq/coq/pull/11976>`_,
+ by Vincent Laporte).
+- **Added:**
+ The :tacn:`zify` tactic is now aware of `Pos.pred_double`, `Pos.pred_N`,
+ `Pos.of_nat`, `Pos.add_carry`, `Pos.pow`, `Pos.square`, `Z.pow`, `Z.double`,
+ `Z.pred_double`, `Z.succ_double`, `Z.square`, `Z.div2`, and `Z.quot2`.
+ Injections for internal definitions in module `ZifyBool` (`isZero` and `isLeZero`)
+ are also added to help users to declare new :tacn:`zify` class instances using
+ Micromega tactics
+ (`#10998 <https://github.com/coq/coq/pull/10998>`_, by Kazuhiko Sakaguchi).
+- **Added:**
+ :cmd:`Show Lia Profile` prints some statistics about :tacn:`lia` calls
+ (`#11474 <https://github.com/coq/coq/pull/11474>`_, by Frédéric Besson).
+- **Added:**
+ Syntax :tacn:`pose proof` :n:`(@ident:=@term)` as an alternative to
+ :tacn:`pose proof` :n:`@term as @ident`, following the model of
+ :tacn:`pose` :n:`(@ident:=@term)`
+ (`#11522 <https://github.com/coq/coq/pull/11522>`_,
+ by Hugo Herbelin).
+- **Added:**
+ New tactical :tacn:`with_strategy` which behaves like the command
+ :cmd:`Strategy`, with effects local to the given tactic
+ (`#12129 <https://github.com/coq/coq/pull/12129>`_, by Jason Gross).
+- **Added:**
+ The :tacn:`zify` tactic is now aware of `Nat.le`, `Nat.lt` and `Nat.eq`
+ (`#12213 <https://github.com/coq/coq/pull/12213>`_, by Frédéric Besson;
+ fixes `#12210 <https://github.com/coq/coq/issues/12210>`_).
+- **Fixed:**
+ :tacn:`zify` now handles :g:`Z.pow_pos` by default.
+ In Coq 8.11, this was the case only when loading module
+ :g:`ZifyPow` because this triggered a regression of :tacn:`lia`.
+ The regression is now fixed, and the module kept only for compatibility
+ (`#11362 <https://github.com/coq/coq/pull/11362>`_,
+ fixes `#11191 <https://github.com/coq/coq/issues/11191>`_,
+ by Frédéric Besson).
+- **Fixed:**
+ Efficiency regression of :tacn:`lia`
+ (`#11474 <https://github.com/coq/coq/pull/11474>`_,
+ fixes `#11436 <https://github.com/coq/coq/issues/11436>`_,
+ by Frédéric Besson).
+- **Fixed:**
+ The behavior of :tacn:`autounfold` no longer depends on the names of terms and modules
+ (`#11883 <https://github.com/coq/coq/pull/11883>`_,
+ fixes `#7812 <https://github.com/coq/coq/issues/7812>`_,
+ by Attila Gáspár).
+- **Fixed:**
+ Wrong type error in tactic :tacn:`functional induction`
+ (`#12326 <https://github.com/coq/coq/pull/12326>`_,
+ by Pierre Courtieu,
+ fixes `#11761 <https://github.com/coq/coq/issues/11761>`_,
+ reported by Lasse Blaauwbroek).
+
+Tactic language
+^^^^^^^^^^^^^^^
+
+- **Changed:**
+ The "reference" tactic generic argument now accepts arbitrary
+ variables of the goal context
+ (`#12254 <https://github.com/coq/coq/pull/12254>`_,
+ by Pierre-Marie Pédrot).
+- **Added:**
+ An array library for Ltac2 (as compatible as possible with OCaml standard library)
+ (`#10343 <https://github.com/coq/coq/pull/10343>`_,
+ by Michael Soegtrop).
+- **Added:**
+ The Ltac2 rebinding command :cmd:`Ltac2 Set` has been extended with the ability to
+ give a name to the old value so as to be able to reuse it inside the
+ new one
+ (`#11503 <https://github.com/coq/coq/pull/11503>`_,
+ by Pierre-Marie Pédrot).
+- **Added:**
+ Ltac2 notations for :tacn:`enough` and :tacn:`eenough`
+ (`#11740 <https://github.com/coq/coq/pull/11740>`_,
+ by Michael Soegtrop).
+- **Added:**
+ New Ltac2 function ``Fresh.Free.of_goal`` to return the list of
+ names of declarations of the current goal; new Ltac2 function
+ ``Fresh.in_goal`` to return a variable fresh in the current goal
+ (`#11882 <https://github.com/coq/coq/pull/11882>`_,
+ by Hugo Herbelin).
+- **Added:**
+ Ltac2 notations for reductions in terms: :n:`eval @red_expr in @ltac2_term`
+ (`#11981 <https://github.com/coq/coq/pull/11981>`_,
+ by Michael Soegtrop).
+- **Fixed:**
+ The :flag:`Ltac Profiling` machinery now correctly handles
+ backtracking into multi-success tactics. The call-counts of some
+ tactics are unfortunately inflated by 1, as some tactics are
+ implicitly implemented as :g:`tac + fail`, which has two
+ entry-points rather than one (fixes `#12196
+ <https://github.com/coq/coq/issues/12196>`_, `#12197
+ <https://github.com/coq/coq/pull/12197>`_, by Jason Gross).
+
+SSReflect
+^^^^^^^^^
+
+- **Changed:** The :cmd:`Search (ssreflect)` command that used to be
+ available when loading the `ssreflect` plugin has been moved to a
+ separate plugin that needs to be loaded separately: `ssrsearch`
+ (part of `#8855 <https://github.com/coq/coq/pull/8855>`_, fixes
+ `#12253 <https://github.com/coq/coq/issues/12253>`_, by Théo
+ Zimmermann).
+- **Deprecated:** :cmd:`Search (ssreflect)` (available through
+ `Require ssrsearch.`) in favor of the `headconcl:` clause of
+ :cmd:`Search` (part of `#8855
+ <https://github.com/coq/coq/pull/8855>`_, by Théo Zimmermann).
+
+Flags, options and attributes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- **Changed:** :term:`Legacy attributes <attribute>` can now be passed
+ in any order (`#11665 <https://github.com/coq/coq/pull/11665>`_, by
+ Théo Zimmermann).
+- **Removed:** ``Typeclasses Axioms Are Instances`` flag, deprecated since 8.10.
+ Use :cmd:`Declare Instance` for axioms which should be instances
+ (`#11185 <https://github.com/coq/coq/pull/11185>`_, by Théo Zimmermann).
+- **Removed:** Deprecated unsound compatibility ``Template Check``
+ flag that was introduced in 8.10 to help users gradually move their
+ template polymorphic inductive type definitions outside sections
+ (`#11546 <https://github.com/coq/coq/pull/11546>`_, by Pierre-Marie
+ Pédrot).
+- **Removed:**
+ Deprecated ``Shrink Obligations`` flag
+ (`#11828 <https://github.com/coq/coq/pull/11828>`_,
+ by Emilio Jesus Gallego Arias).
+- **Removed:**
+ Unqualified ``polymorphic``, ``monomorphic``, ``template``,
+ ``notemplate`` attributes (they were deprecated since Coq 8.10).
+ Use :attr:`universes(polymorphic)`, :attr:`universes(monomorphic)`,
+ :attr:`universes(template)` and :attr:`universes(notemplate)` instead
+ (`#11663 <https://github.com/coq/coq/pull/11663>`_, by Théo Zimmermann).
+- **Deprecated:**
+ :flag:`Hide Obligations` flag
+ (`#11828 <https://github.com/coq/coq/pull/11828>`_,
+ by Emilio Jesus Gallego Arias).
+- **Added:** Handle the :attr:`local` attribute in :cmd:`Canonical
+ Structure` declarations (`#11162
+ <https://github.com/coq/coq/pull/11162>`_, by Enrico Tassi).
+- **Added:**
+ New attributes supported when defining an inductive type
+ :attr:`universes(cumulative)`, :attr:`universes(noncumulative)` and
+ :attr:`private(matching)`, which correspond to legacy attributes
+ ``Cumulative``, ``NonCumulative``, and the previously undocumented
+ ``Private`` (`#11665 <https://github.com/coq/coq/pull/11665>`_, by
+ Théo Zimmermann).
+- **Added:**
+ The :cmd:`Hint` commands now accept the :attr:`export` locality as
+ an attribute, allowing to make import-scoped hints
+ (`#11812 <https://github.com/coq/coq/pull/11812>`_,
+ by Pierre-Marie Pédrot).
+- **Added:**
+ :flag:`Cumulative StrictProp` to control cumulativity of |SProp|
+ (`#12034 <https://github.com/coq/coq/pull/12034>`_, by Gaëtan
+ Gilbert).
+
+Commands
+^^^^^^^^
+
+- **Changed:**
+ The :cmd:`Coercion` command has been improved to check the coherence of the
+ inheritance graph. It checks whether a circular inheritance path of `C >-> C`
+ is convertible with the identity function or not, then report it as an
+ ambiguous path if it is not. The new mechanism does not report ambiguous
+ paths that are redundant with others. For example, checking the ambiguity of
+ `[f; g]` and `[f'; g]` is redundant with that of `[f]` and `[f']` thus will
+ not be reported
+ (`#11258 <https://github.com/coq/coq/pull/11258>`_,
+ by Kazuhiko Sakaguchi).
+- **Changed:**
+ Several commands (:cmd:`Search`, :cmd:`About`, ...) now print the
+ implicit arguments in brackets when printing types (`#11795
+ <https://github.com/coq/coq/pull/11795>`_, by Simon Boulier).
+- **Changed:**
+ :cmd:`Redirect` now obeys the :opt:`Printing Width` and
+ :opt:`Printing Depth` options
+ (`#12358 <https://github.com/coq/coq/pull/12358>`_,
+ by Emilio Jesus Gallego Arias).
+- **Removed:**
+ Recursive OCaml loadpaths are not supported anymore; the command
+ ``Add Rec ML Path`` has been removed; :cmd:`Add ML Path` is now the
+ preferred one. We have also dropped support for the non-qualified
+ version of the :cmd:`Add LoadPath` command, that is to say,
+ the ``Add LoadPath dir`` version; now,
+ you must always specify a prefix now using ``Add Loadpath dir as Prefix``
+ (`#11618 <https://github.com/coq/coq/pull/11618>`_,
+ by Emilio Jesus Gallego Arias).
+- **Removed:** undocumented ``Chapter`` command. Use :cmd:`Section`
+ instead (`#11746 <https://github.com/coq/coq/pull/11746>`_, by Théo
+ Zimmermann).
+- **Removed:** ``SearchAbout`` command that was deprecated since 8.5.
+ Use :cmd:`Search` instead
+ (`#11944 <https://github.com/coq/coq/pull/11944>`_, by Jim Fehrle).
+- **Deprecated:**
+ Declaration of arbitrary terms as hints. Global references are now
+ preferred (`#7791 <https://github.com/coq/coq/pull/7791>`_, by
+ Pierre-Marie Pédrot).
+- **Deprecated:** :cmd:`SearchHead` in favor of the new `headconcl:`
+ clause of :cmd:`Search` (part of `#8855
+ <https://github.com/coq/coq/pull/8855>`_, by Théo Zimmermann).
+- **Added:**
+ :cmd:`Print Canonical Projections` can now take constants as
+ arguments and prints only the unification rules that involve or are
+ synthesized from the given constants (`#10747
+ <https://github.com/coq/coq/pull/10747>`_, by Kazuhiko Sakaguchi).
+- **Added:** A section variable introduced with :cmd:`Let` can be
+ declared as a :cmd:`Canonical Structure` (`#11164
+ <https://github.com/coq/coq/pull/11164>`_, by Enrico Tassi).
+- **Added:** Support for universe bindings and universe contrainsts in
+ :cmd:`Let` definitions (`#11534
+ <https://github.com/coq/coq/pull/11534>`_, by Théo Zimmermann).
+- **Added:** Support for new clauses `hyp:`, `headhyp:`, `concl:`,
+ `headconcl:`, `head:` and `is:` in :cmd:`Search`. Support for
+ complex search queries combining disjunctions, conjunctions and
+ negations (`#8855 <https://github.com/coq/coq/pull/8855>`_, by Hugo
+ Herbelin, with ideas from Cyril Cohen and help from Théo
+ Zimmermann).
+- **Fixed:**
+ A printing bug in the presence of elimination principles with local definitions
+ (`#12295 <https://github.com/coq/coq/pull/12295>`_,
+ by Hugo Herbelin; fixes `#12233 <https://github.com/coq/coq/pull/12233>`_).
+- **Fixed:**
+ Anomalies with :cmd:`Show Proof`
+ (`#12296 <https://github.com/coq/coq/pull/12296>`_,
+ by Hugo Herbelin; fixes
+ `#12234 <https://github.com/coq/coq/pull/12234>`_).
+
+Tools
+^^^^^
+
+- **Changed:**
+ Internal options and behavior of ``coqdep``. ``coqdep``
+ no longer works as a replacement for ``ocamldep``, thus ``.ml``
+ files are not supported as input. Also, several deprecated options
+ have been removed: ``-w``, ``-D``, ``-mldep``, ``-prefix``,
+ ``-slash``, and ``-dumpbox``. Passing ``-boot`` to ``coqdep`` will
+ not load any path by default now, ``-R/-Q`` should be used instead
+ (`#11523 <https://github.com/coq/coq/pull/11523>`_ and
+ `#11589 <https://github.com/coq/coq/pull/11589>`_,
+ by Emilio Jesus Gallego Arias).
+- **Changed:**
+ The order in which the require flags `-ri`, `-re`, `-rfrom`, etc.
+ and the option flags `-set`, `-unset` are given now matters. In
+ particular, it is now possible to interleave the loading of plugins
+ and the setting of options by choosing the right order for these
+ flags. The load flags `-l` and `-lv` are still processed afterward
+ for now (`#11851 <https://github.com/coq/coq/pull/11851>`_ and
+ `#12097 <https://github.com/coq/coq/pull/12097>`_,
+ by Lasse Blaauwbroek).
+- **Changed:**
+ The ``cleanall`` target of a makefile generated by ``coq_makefile``
+ now erases ``.lia.cache`` and ``.nia.cache`` (`#12006
+ <https://github.com/coq/coq/pull/12006>`_, by Olivier Laurent).
+- **Changed:**
+ The output of ``make TIMED=1`` (and therefore the timing targets
+ such as ``print-pretty-timed`` and ``print-pretty-timed-diff``) now
+ displays the full name of the output file being built, rather than
+ the stem of the rule (which was usually the filename without the
+ extension, but in general could be anything for user-defined rules
+ involving ``%``) (`#12126
+ <https://github.com/coq/coq/pull/12126>`_, by Jason Gross).
+- **Changed:**
+ When passing ``TIMED=1`` to ``make`` with either Coq's own makefile
+ or a ``coq_makefile``\-made makefile, timing information is now
+ printed for OCaml files as well (`#12211
+ <https://github.com/coq/coq/pull/12211>`_, by Jason Gross).
+- **Changed:**
+ The pretty-timed scripts and targets now print a newline at the end of their
+ tables, rather than creating text with no trailing newline (`#12368
+ <https://github.com/coq/coq/pull/12368>`_, by Jason Gross).
+- **Removed:**
+ The `-load-ml-source` and `-load-ml-object` command-line options
+ have been removed; their use was very limited, you can achieve the same adding
+ additional object files in the linking step or using a plugin
+ (`#11409 <https://github.com/coq/coq/pull/11409>`_, by Emilio Jesus Gallego Arias).
+- **Removed:**
+ The confusingly-named `-require` command-line option, which was
+ deprecated since 8.11. Use the equivalent `-require-import` / `-ri`
+ options instead
+ (`#12005 <https://github.com/coq/coq/pull/12005>`_,
+ by Théo Zimmermann).
+- **Deprecated:**
+ ``-cumulative-sprop`` command-line flag in favor of the new
+ :flag:`Cumulative StrictProp` flag (`#12034
+ <https://github.com/coq/coq/pull/12034>`_, by Gaëtan Gilbert).
+- **Added:**
+ A new documentation environment ``details`` to make certain portion
+ of a Coq document foldable. See :ref:`coqdoc-hide-show`
+ (`#10592 <https://github.com/coq/coq/pull/10592>`_,
+ by Thomas Letan).
+- **Added:**
+ The ``make-both-single-timing-files.py`` script now accepts a
+ ``--fuzz=N`` parameter on the command line which determines how many
+ characters two lines may be offset in the "before" and "after"
+ timing logs while still being considered the same line. When
+ invoking this script via the ``print-pretty-single-time-diff``
+ target in a ``Makefile`` made by ``coq_makefile``, you can set this
+ argument by passing ``TIMING_FUZZ=N`` to ``make`` (`#11302
+ <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
+- **Added:**
+ The ``make-one-time-file.py`` and ``make-both-time-files.py``
+ scripts now accept a ``--real`` parameter on the command line to
+ print real times rather than user times in the tables. The
+ ``make-both-single-timing-files.py`` script accepts a ``--user``
+ parameter to use user times. When invoking these scripts via the
+ ``print-pretty-timed`` or ``print-pretty-timed-diff`` or
+ ``print-pretty-single-time-diff`` targets in a ``Makefile`` made by
+ ``coq_makefile``, you can set this argument by passing
+ ``TIMING_REAL=1`` (to pass ``--real``) or ``TIMING_REAL=0`` (to pass
+ ``--user``) to ``make`` (`#11302
+ <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
+- **Added:**
+ Coq's build system now supports both ``TIMING_FUZZ``,
+ ``TIMING_SORT_BY``, and ``TIMING_REAL`` just like a ``Makefile``
+ made by ``coq_makefile`` (`#11302
+ <https://github.com/coq/coq/pull/11302>`_, by Jason Gross).
+- **Added:**
+ The ``make-one-time-file.py`` and ``make-both-time-files.py``
+ scripts now include peak memory usage information in the tables (can
+ be turned off by the ``--no-include-mem`` command-line parameter),
+ and a ``--sort-by-mem`` parameter to sort the tables by memory
+ rather than time. When invoking these scripts via the
+ ``print-pretty-timed`` or ``print-pretty-timed-diff`` targets in a
+ ``Makefile`` made by ``coq_makefile``, you can set this argument by
+ passing ``TIMING_INCLUDE_MEM=0`` (to pass ``--no-include-mem``) and
+ ``TIMING_SORT_BY_MEM=1`` (to pass ``--sort-by-mem``) to ``make``
+ (`#11606 <https://github.com/coq/coq/pull/11606>`_, by Jason Gross).
+- **Added:**
+ Coq's build system now supports both ``TIMING_INCLUDE_MEM`` and
+ ``TIMING_SORT_BY_MEM`` just like a ``Makefile`` made by
+ ``coq_makefile`` (`#11606 <https://github.com/coq/coq/pull/11606>`_,
+ by Jason Gross).
+- **Added:**
+ New ``coqc`` / ``coqtop`` option ``-boot`` that will not bind the
+ `Coq` library prefix by default
+ (`#11617 <https://github.com/coq/coq/pull/11617>`_,
+ by Emilio Jesus Gallego Arias).
+- **Added:**
+ Definitions in coqdoc link to themselves, giving access in html to their own url
+ (`#12026 <https://github.com/coq/coq/pull/12026>`_,
+ by Hugo Herbelin; granting `#7093 <https://github.com/coq/coq/pull/7093>`_).
+- **Added:**
+ Hyperlinks on bound variables in coqdoc
+ (`#12033 <https://github.com/coq/coq/pull/12033>`_,
+ by Hugo Herbelin; it incidentally fixes
+ `#7697 <https://github.com/coq/coq/pull/7697>`_).
+- **Added:**
+ Highlighting of link targets in coqdoc
+ (`#12091 <https://github.com/coq/coq/pull/12091>`_,
+ by Hugo Herbelin).
+- **Fixed:**
+ The various timing targets for Coq's standard library now correctly
+ display and label the "before" and "after" columns, rather than
+ mixing them up (`#11302 <https://github.com/coq/coq/pull/11302>`_
+ fixes `#11301 <https://github.com/coq/coq/issues/11301>`_, by Jason
+ Gross).
+- **Fixed:**
+ The sorting order of the timing script ``make-both-time-files.py``
+ and the target ``print-pretty-timed-diff`` is now deterministic even
+ when the sorting order is ``absolute`` or ``diff``; previously the
+ relative ordering of two files with identical times was
+ non-deterministic (`#11606
+ <https://github.com/coq/coq/pull/11606>`_, by Jason Gross).
+- **Fixed:**
+ Fields of a record tuple now link in coqdoc to their definition
+ (`#12027 <https://github.com/coq/coq/pull/12027>`_, fixes
+ `#3415 <https://github.com/coq/coq/issues/3415>`_,
+ by Hugo Herbelin).
+- **Fixed:**
+ ``coqdoc`` now reports the location of a mismatched opening ``[[``
+ instead of throwing an uninformative exception
+ (`#12037 <https://github.com/coq/coq/pull/12037>`_,
+ fixes `#9670 <https://github.com/coq/coq/issues/9670>`_,
+ by Xia Li-yao).
+- **Fixed:**
+ coqchk incorrectly reporting names from opaque modules as axioms
+ (`#12076 <https://github.com/coq/coq/pull/12076>`_,
+ by Pierre Roux; fixes `#5030 <https://github.com/coq/coq/issues/5030>`_).
+- **Fixed:**
+ coq_makefile-generated ``Makefile``\s ``pretty-timed-diff`` target
+ no longer raises Python exceptions in the rare corner case where the
+ log of times contains no files (`#12388
+ <https://github.com/coq/coq/pull/12388>`_, fixes `#12387
+ <https://github.com/coq/coq/pull/12387>`_, by Jason Gross).
+
+CoqIDE
+^^^^^^
+
+- **Removed:**
+ "Tactic" menu from CoqIDE which had been unmaintained for a number of years
+ (`#11414 <https://github.com/coq/coq/pull/11414>`_,
+ by Pierre-Marie Pédrot).
+- **Removed:**
+ "Revert all buffers" command from CoqIDE which had been broken for a long time
+ (`#11415 <https://github.com/coq/coq/pull/11415>`_,
+ by Pierre-Marie Pédrot).
+
+Standard library
+^^^^^^^^^^^^^^^^
+
+- **Changed:**
+ Notations :n:`[|@term|]` and :n:`[||@term||]` for morphisms from 63-bit
+ integers to :g:`Z` and :g:`zn2z int` have been removed in favor of
+ :n:`φ(@term)` and :n:`Φ(@term)` respectively. These notations were
+ breaking Ltac parsing (`#11686 <https://github.com/coq/coq/pull/11686>`_,
+ by Maxime Dénès).
+- **Changed:**
+ The names of ``Sorted_sort`` and ``LocallySorted_sort`` in ``Coq.Sorting.MergeSort``
+ have been swapped to appropriately reflect their meanings
+ (`#11885 <https://github.com/coq/coq/pull/11885>`_,
+ by Lysxia).
+- **Changed:**
+ Notations :g:`<=?` and :g:`<?` from ``Coq.Structures.Orders`` and
+ ``Coq.Sorting.Mergesort.NatOrder`` are now at level 70 rather than
+ 35, so as to be compatible with the notations defined everywhere
+ else in the standard library. This may require re-parenthesizing
+ some expressions. These notations were breaking the ability to
+ import modules from the standard library that were otherwise
+ compatible (fixes `#11890
+ <https://github.com/coq/coq/issues/11890>`_, `#11891
+ <https://github.com/coq/coq/pull/11891>`_, by Jason Gross).
+- **Changed:**
+ The level of :g:`≡` in ``Coq.Numbers.Cyclic.Int63.Int63`` is now 70,
+ no associativity, in line with :g:`=`. Note that this is a minor
+ incompatibility with developments that declare their own :g:`≡`
+ notation and import ``Int63`` (fixes `#11905
+ <https://github.com/coq/coq/issues/11905>`_, `#11909
+ <https://github.com/coq/coq/pull/11909>`_, by Jason Gross).
+- **Changed:**
+ No longer re-export ``ListNotations`` from ``Program`` (``Program.Syntax``)
+ (`#11992 <https://github.com/coq/coq/pull/11992>`_,
+ by Antonio Nikishaev).
+- **Changed:**
+ It is now possible to import the :g:`nsatz` machinery without
+ transitively depending on the axioms of the real numbers nor of
+ classical logic by loading ``Coq.nsatz.NsatzTactic`` rather than
+ ``Coq.nsatz.Nsatz``. Note that some constants have changed kernel
+ names, living in ``Coq.nsatz.NsatzTactic`` rather than
+ ``Coq.nsatz.Nsatz``; this might cause minor incompatibilities that
+ can be fixed by actually running :g:`Import Nsatz` rather than
+ relying on absolute names (`#12073
+ <https://github.com/coq/coq/pull/12073>`_, by Jason Gross; fixes
+ `#5445 <https://github.com/coq/coq/issues/5445>`_).
+- **Changed:**
+ new lemma ``NoDup_incl_NoDup`` in ``List.v``
+ to remove useless hypothesis `NoDup l'` in ``Sorting.Permutation.NoDup_Permutation_bis``
+ (`#12120 <https://github.com/coq/coq/pull/12119>`_,
+ by Olivier Laurent).
+- **Changed:**
+ :cmd:`Fixpoints <Fixpoint>` of the standard library without a recursive call turned
+ into ordinary :cmd:`Definitions <Definition>`
+ (`#12121 <https://github.com/coq/coq/pull/12121>`_,
+ by Hugo Herbelin; fixes `#11903 <https://github.com/coq/coq/pull/11903>`_).
+- **Deprecated:**
+ ``Bool.leb`` in favor of ``Bool.le``. The definition of ``Bool.le``
+ is made local to avoid conflicts with ``Nat.le``. As a consequence,
+ previous calls to ``leb`` based on importing ``Bool`` should now be
+ qualified into ``Bool.le`` even if ``Bool`` is imported
+ (`#12162 <https://github.com/coq/coq/pull/12162>`_,
+ by Olivier Laurent).
+- **Added:** Theorem :g:`bezout_comm` for natural numbers
+ (`#11127 <https://github.com/coq/coq/pull/11127>`_, by Daniel de Rauglaudre).
+- **Added**
+ :g:`rew dependent` notations for the dependent version of
+ :g:`rew` in :g:`Coq.Init.Logic.EqNotations` to improve the display
+ and parsing of :g:`match` statements on :g:`Logic.eq` (`#11240
+ <https://github.com/coq/coq/pull/11240>`_, by Jason Gross).
+- **Added:**
+ Lemmas about lists:
+
+ - properties of ``In``: ``in_elt``, ``in_elt_inv``
+ - properties of ``nth``: ``app_nth2_plus``, ``nth_middle``, ``nth_ext``
+ - properties of ``last``: ``last_last``, ``removelast_last``
+ - properties of ``remove``: ``remove_cons``, ``remove_app``, ``notin_remove``, ``in_remove``, ``in_in_remove``, ``remove_remove_comm``, ``remove_remove_eq``, ``remove_length_le``, ``remove_length_lt``
+ - properties of ``concat``: ``in_concat``, ``remove_concat``
+ - properties of ``map`` and ``flat_map``: ``map_last``, ``map_eq_cons``, ``map_eq_app``, ``flat_map_app``, ``flat_map_ext``, ``nth_nth_nth_map``
+ - properties of ``incl``: ``incl_nil_l``, ``incl_l_nil``, ``incl_cons_inv``, ``incl_app_app``, ``incl_app_inv``, ``remove_incl``, ``incl_map``, ``incl_filter``, ``incl_Forall_in_iff``
+ - properties of ``NoDup`` and ``nodup``: ``NoDup_rev``, ``NoDup_filter``, ``nodup_incl``
+ - properties of ``Exists`` and ``Forall``: ``Exists_nth``, ``Exists_app``, ``Exists_rev``, ``Exists_fold_right``, ``incl_Exists``, ``Forall_nth``, ``Forall_app``, ``Forall_elt``, ``Forall_rev``, ``Forall_fold_right``, ``incl_Forall``, ``map_ext_Forall``, ``Exists_or``, ``Exists_or_inv``, ``Forall_and``, ``Forall_and_inv``, ``exists_Forall``, ``Forall_image``, ``concat_nil_Forall``, ``in_flat_map_Exists``, ``notin_flat_map_Forall``
+ - properties of ``repeat``: ``repeat_cons``, ``repeat_to_concat``
+ - definitions and properties of ``list_sum`` and ``list_max``: ``list_sum_app``, ``list_max_app``, ``list_max_le``, ``list_max_lt``
+ - misc: ``elt_eq_unit``, ``last_length``, ``rev_eq_app``, ``removelast_firstn_len``, ``cons_seq``, ``seq_S``
+
+ (`#11249 <https://github.com/coq/coq/pull/11249>`_, `#12237 <https://github.com/coq/coq/pull/12237>`_,
+ by Olivier Laurent).
+- **Added:**
+ Well-founded induction principles for `nat`: ``lt_wf_rect1``, ``lt_wf_rect``, ``gt_wf_rect``, ``lt_wf_double_rect``
+ (`#11335 <https://github.com/coq/coq/pull/11335>`_,
+ by Olivier Laurent).
+- **Added:**
+ ``remove'`` and ``count_occ'`` over lists,
+ alternatives to ``remove`` and ``count_occ`` based on ``filter``
+ (`#11350 <https://github.com/coq/coq/pull/11350>`_,
+ by Yishuai Li).
+- **Added:**
+ Facts about ``N.iter`` and ``Pos.iter``:
+
+ - ``N.iter_swap_gen``, ``N.iter_swap``, ``N.iter_succ``, ``N.iter_succ_r``, ``N.iter_add``, ``N.iter_ind``, ``N.iter_invariant``;
+ - ``Pos.iter_succ_r``, ``Pos.iter_ind``.
+
+ (`#11880 <https://github.com/coq/coq/pull/11880>`_,
+ by Lysxia).
+- **Added:**
+ Facts about ``Permutation``:
+
+ - structure: ``Permutation_refl'``, ``Permutation_morph_transp``
+ - compatibilities: ``Permutation_app_rot``, ``Permutation_app_swap_app``, ``Permutation_app_middle``, ``Permutation_middle2``, ``Permutation_elt``, ``Permutation_Forall``, ``Permutation_Exists``, ``Permutation_Forall2``, ``Permutation_flat_map``, ``Permutation_list_sum``, ``Permutation_list_max``
+ - inversions: ``Permutation_app_inv_m``, ``Permutation_vs_elt_inv``, ``Permutation_vs_cons_inv``, ``Permutation_vs_cons_cons_inv``, ``Permutation_map_inv``, ``Permutation_image``, ``Permutation_elt_map_inv``
+ - length-preserving definition by means of transpositions ``Permutation_transp`` with associated properties: ``Permutation_transp_sym``, ``Permutation_transp_equiv``, ``Permutation_transp_cons``, ``Permutation_Permutation_transp``, ``Permutation_ind_transp``
+
+ (`#11946 <https://github.com/coq/coq/pull/11946>`_,
+ by Olivier Laurent).
+- **Added:**
+ Notations for sigma types: ``{ x & P & Q }``, ``{ ' pat & P }``, ``{ ' pat & P & Q }``
+ (`#11957 <https://github.com/coq/coq/pull/11957>`_,
+ by Olivier Laurent).
+- **Added:**
+ Order relations ``lt`` and ``compare`` added in ``Bool.Bool``.
+ Order properties for ``bool`` added in ``Bool.BoolOrder`` as well as two modules ``Bool_as_OT`` and ``Bool_as_DT`` in ``Structures.OrdersEx``
+ (`#12008 <https://github.com/coq/coq/pull/12008>`_,
+ by Olivier Laurent).
+- **Added:**
+ Properties of some operations on vectors:
+
+ - ``nth_order``: ``nth_order_hd``, ``nth_order_tl``, ``nth_order_ext``
+ - ``replace``: ``nth_order_replace_eq``, ``nth_order_replace_neq``, ``replace_id``, ``replace_replace_eq``, ``replace_replace_neq``
+ - ``map``: ``map_id``, ``map_map``, ``map_ext_in``, ``map_ext``
+ - ``Forall`` and ``Forall2``: ``Forall_impl``, ``Forall_forall``, ``Forall_nth_order``, ``Forall2_nth_order``
+
+ (`#12014 <https://github.com/coq/coq/pull/12014>`_,
+ by Olivier Laurent).
+- **Added:**
+ Lemmas
+ :g:`orb_negb_l`,
+ :g:`andb_negb_l`,
+ :g:`implb_true_iff`,
+ :g:`implb_false_iff`,
+ :g:`implb_true_r`,
+ :g:`implb_false_r`,
+ :g:`implb_true_l`,
+ :g:`implb_false_l`,
+ :g:`implb_same`,
+ :g:`implb_contrapositive`,
+ :g:`implb_negb`,
+ :g:`implb_curry`,
+ :g:`implb_andb_distrib_r`,
+ :g:`implb_orb_distrib_r`,
+ :g:`implb_orb_distrib_l` in library :g:`Bool`
+ (`#12018 <https://github.com/coq/coq/pull/12018>`_,
+ by Hugo Herbelin).
+- **Added:**
+ Definition and properties of cyclic permutations / circular shifts: ``CPermutation``
+ (`#12031 <https://github.com/coq/coq/pull/12031>`_,
+ by Olivier Laurent).
+- **Added:**
+ ``Structures.OrderedTypeEx.Ascii_as_OT``
+ (`#12044 <https://github.com/coq/coq/pull/12044>`_,
+ by formalize.eth (formalize@protonmail.com)).
+- **Fixed:**
+ Rewrote ``Structures.OrderedTypeEx.String_as_OT.compare``
+ to avoid huge proof terms
+ (`#12044 <https://github.com/coq/coq/pull/12044>`_,
+ by formalize.eth (formalize@protonmail.com);
+ fixes `#12015 <https://github.com/coq/coq/issues/12015>`_).
+
+Reals library
+^^^^^^^^^^^^^
+
+- **Changed:**
+ Cleanup of names in the Reals theory: replaced `tan_is_inj` with
+ `tan_inj` and replaced `atan_right_inv` with `tan_atan` -
+ compatibility notations are provided. Moved various auxiliary lemmas
+ from `Ratan.v` to more appropriate places
+ (`#9803 <https://github.com/coq/coq/pull/9803>`_,
+ by Laurent Théry and Michael Soegtrop).
+- **Changed:**
+ Replace `CRzero` and `CRone` by `CR_of_Q 0` and `CR_of_Q 1` in
+ `ConstructiveReals`. Use implicit arguments for
+ `ConstructiveReals`. Move `ConstructiveReals` into new directory
+ `Abstract`. Remove imports of implementations inside those
+ `Abstract` files. Move implementation by means of Cauchy sequences
+ in new directory `Cauchy`. Split files `ConstructiveMinMax` and
+ `ConstructivePower`.
+
+ .. warning:: The constructive reals modules are marked as experimental.
+
+ (`#11725 <https://github.com/coq/coq/pull/11725>`_,
+ `#12287 <https://github.com/coq/coq/pull/12287>`_
+ and `#12288 <https://github.com/coq/coq/pull/12288>`_,
+ by Vincent Semeria).
+- **Removed:**
+ Type `RList` has been removed. All uses have been replaced by `list R`.
+ Functions from `RList` named `In`, `Rlength`, `cons_Rlist`, `app_Rlist`
+ have also been removed as they are essentially the same as `In`, `length`,
+ `app`, and `map` from `List`, modulo the following changes:
+
+ - `RList.In x (RList.cons a l)` used to be convertible to
+ `(x = a) \\/ RList.In x l`,
+ but `List.In x (a :: l)` is convertible to
+ `(a = x) \\/ List.In l`.
+ The equality is reversed.
+ - `app_Rlist` and `List.map` take arguments in different order.
+
+ (`#11404 <https://github.com/coq/coq/pull/11404>`_,
+ by Yves Bertot).
+- **Added:**
+ inverse trigonometric functions `asin` and `acos` with lemmas for
+ the derivatives, bounds and special values of these functions; an
+ extensive set of identities between trigonometric functions and
+ their inverse functions; lemmas for the injectivity of sine and
+ cosine; lemmas on the derivative of the inverse of decreasing
+ functions and on the derivative of horizontally mirrored functions;
+ various generic auxiliary lemmas and definitions for `Rsqr`, `sqrt`,
+ `posreal` and others
+ (`#9803 <https://github.com/coq/coq/pull/9803>`_,
+ by Laurent Théry and Michael Soegtrop).
+
+Extraction
+^^^^^^^^^^
+
+- **Added:**
+ Support for better extraction of strings in OCaml and Haskell:
+ `ExtOcamlNativeString` provides bindings from the Coq `String` type to
+ the OCaml `string` type, and string literals can be extracted to literals,
+ both in OCaml and Haskell (`#10486
+ <https://github.com/coq/coq/pull/10486>`_, by Xavier Leroy, with help from
+ Maxime Dénès, review by Hugo Herbelin).
+- **Fixed:**
+ In Haskell extraction with ``ExtrHaskellString``, equality comparisons on
+ strings and characters are now guaranteed to be uniquely well-typed, even in
+ very polymorphic contexts under ``unsafeCoerce``; this is achieved by adding
+ type annotations to the extracted code, and by making ``ExtrHaskellString``
+ export ``ExtrHaskellBasic`` (`#12263
+ <https://github.com/coq/coq/pull/12263>`_, by Jason Gross, fixes `#12257
+ <https://github.com/coq/coq/issues/12257>`_ and `#12258
+ <https://github.com/coq/coq/issues/12258>`_).
+
+Reference manual
+^^^^^^^^^^^^^^^^
+
+- **Changed:**
+ The reference manual has been restructured to get a more logical
+ organization. In the new version, there are fewer top-level
+ chapters, and, in the HTML format, chapters are split into smaller
+ pages. This is still a work in progress and further restructuring
+ is expected in the next versions of Coq
+ (`CEP#43 <https://github.com/coq/ceps/pull/43>`_, implemented in
+ `#11601 <https://github.com/coq/coq/pull/11601>`_,
+ `#11871 <https://github.com/coq/coq/pull/11871>`_,
+ `#11914 <https://github.com/coq/coq/pull/11914>`_,
+ `#12148 <https://github.com/coq/coq/pull/12148>`_,
+ `#12172 <https://github.com/coq/coq/pull/12172>`_,
+ `#12239 <https://github.com/coq/coq/pull/12239>`_
+ and `#12330 <https://github.com/coq/coq/pull/12330>`_,
+ effort inspired by Matthieu Sozeau, led by Théo Zimmermann, with
+ help and reviews of Jim Fehrle, Clément Pit-Claudel and others).
+- **Changed:**
+ Most of the grammar is now presented using the notation mechanism
+ that has been used to present commands and tactics since Coq 8.8 and
+ which is documented in :ref:`syntax-conventions`
+ (`#11183 <https://github.com/coq/coq/pull/11183>`_,
+ `#11314 <https://github.com/coq/coq/pull/11314>`_,
+ `#11423 <https://github.com/coq/coq/pull/11423>`_,
+ `#11705 <https://github.com/coq/coq/pull/11705>`_,
+ `#11718 <https://github.com/coq/coq/pull/11718>`_,
+ `#11720 <https://github.com/coq/coq/pull/11720>`_
+ and `#11961 <https://github.com/coq/coq/pull/11961>`_, by Jim
+ Fehrle, reviewed by Théo Zimmermann).
+- **Added:**
+ A glossary of terms and an index of attributes
+ (`#11869 <https://github.com/coq/coq/pull/11869>`_,
+ `#12150 <https://github.com/coq/coq/pull/12150>`_
+ and `#12224 <https://github.com/coq/coq/pull/12224>`_,
+ by Jim Fehrle and Théo Zimmermann,
+ reviewed by Clément Pit-Claudel)
+- **Added:**
+ A selector that allows switching between versions of the reference
+ manual (`#12286 <https://github.com/coq/coq/pull/12286>`_, by
+ Clément Pit-Claudel).
+- **Fixed:**
+ Most of the documented syntax has been thoroughly updated to make it
+ accurate and easily understood. This was done using a
+ semi-automated `doc_grammar` tool introduced for this purpose and
+ through significant revisions to the text
+ (`#9884 <https://github.com/coq/coq/pull/9884>`_,
+ `#10614 <https://github.com/coq/coq/pull/10614>`_,
+ `#11314 <https://github.com/coq/coq/pull/11314>`_,
+ `#11423 <https://github.com/coq/coq/pull/11423>`_,
+ `#11705 <https://github.com/coq/coq/pull/11705>`_,
+ `#11718 <https://github.com/coq/coq/pull/11718>`_,
+ `#11720 <https://github.com/coq/coq/pull/11720>`_
+ `#11797 <https://github.com/coq/coq/pull/11797>`_,
+ `#11913 <https://github.com/coq/coq/pull/11913>`_,
+ `#11958 <https://github.com/coq/coq/pull/11958>`_
+ `#11960 <https://github.com/coq/coq/pull/11960>`_
+ and `#11961 <https://github.com/coq/coq/pull/11961>`_, by Jim
+ Fehrle, reviewed by Théo Zimmermann).
+
+Infrastructure and dependencies
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- **Changed:**
+ Minimal versions of dependencies for building the reference manual:
+ now requires Sphinx 2.3.1+, sphinx_rtd_theme 0.4.3+ and
+ sphinxcontrib-bibtex 0.4.2+
+ (`#12224 <https://github.com/coq/coq/pull/12224>`_,
+ by Jim Fehrle and Théo Zimmermann).
+- **Removed:**
+ Python 2 is no longer required in any part of the codebase
+ (`#11245 <https://github.com/coq/coq/pull/11245>`_,
+ by Emilio Jesus Gallego Arias).
+
Version 8.11
------------
diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py
index 9a6fd2272b..99762c7a0e 100755
--- a/doc/sphinx/conf.py
+++ b/doc/sphinx/conf.py
@@ -214,11 +214,12 @@ html_context = {
'conf_py_path': '/doc/sphinx/',
# Versions and downloads listed in the versions menu (see _templates/versions.html)
'versions': [
- ("master", "https://coq.github.io/doc/master/refman/"),
+ ("dev", "https://coq.github.io/doc/master/refman/"),
("stable", "https://coq.inria.fr/distrib/current/refman/"),
- ("v8.11", "https://coq.github.io/doc/v8.11/refman/"),
- ("v8.10", "https://coq.github.io/doc/v8.10/refman/"),
- ("v8.9", "https://coq.github.io/doc/v8.9/refman/"),
+ ("v8.12", "https://coq.github.io/doc/v8.12/refman/"),
+ ("8.11", "https://coq.inria.fr/distrib/V8.11.2/refman/"),
+ ("8.10", "https://coq.inria.fr/distrib/V8.10.2/refman/"),
+ ("8.9", "https://coq.inria.fr/distrib/V8.9.1/refman/"),
("8.8", "https://coq.inria.fr/distrib/V8.8.2/refman/"),
("8.7", "https://coq.inria.fr/distrib/V8.7.2/refman/"),
("8.6", "https://coq.inria.fr/distrib/V8.6.1/refman/"),
diff --git a/doc/sphinx/dune b/doc/sphinx/dune
index b788fbbeed..31f28635fe 100644
--- a/doc/sphinx/dune
+++ b/doc/sphinx/dune
@@ -1,4 +1,4 @@
-(dirs :standard _static)
+(dirs :standard _static _templates)
(rule
(targets README.gen.rst)
diff --git a/doc/sphinx/language/core/basic.rst b/doc/sphinx/language/core/basic.rst
index 68900aa0be..8918e87180 100644
--- a/doc/sphinx/language/core/basic.rst
+++ b/doc/sphinx/language/core/basic.rst
@@ -15,6 +15,8 @@ settings that |Coq| provides.
Syntax and lexical conventions
------------------------------
+.. _syntax-conventions:
+
Syntax conventions
~~~~~~~~~~~~~~~~~~
diff --git a/doc/sphinx/practical-tools/utilities.rst b/doc/sphinx/practical-tools/utilities.rst
index 408f8fc3ec..33ebbce640 100644
--- a/doc/sphinx/practical-tools/utilities.rst
+++ b/doc/sphinx/practical-tools/utilities.rst
@@ -170,6 +170,10 @@ Here we describe only few of them.
override the flags passed to ``coqdoc``. By default ``-interpolate -utf8``.
:COQDOCEXTRAFLAGS:
extend the flags passed to ``coqdoc``
+:COQLIBINSTALL, COQDOCINSTALL:
+ specify where the Coq libraries and documentation will be installed.
+ By default a combination of ``$(DESTDIR)`` (if defined) with
+ ``$(COQLIB)/user-contrib`` and ``$(DOCDIR)/user-contrib``.
**Rule extension**
diff --git a/doc/sphinx/using/tools/coqdoc.rst b/doc/sphinx/using/tools/coqdoc.rst
index b4b14fb392..f872c1b2e3 100644
--- a/doc/sphinx/using/tools/coqdoc.rst
+++ b/doc/sphinx/using/tools/coqdoc.rst
@@ -220,8 +220,10 @@ Identifiers from the |Coq| standard library are linked to the Coq website
using command line options ``--no-externals`` and ``--coqlib``; see below.
-Hiding / Showing parts of the source.
-+++++++++++++++++++++++++++++++++++++
+.. _coqdoc-hide-show:
+
+Hiding / Showing parts of the source
+++++++++++++++++++++++++++++++++++++
Some parts of the source can be hidden using command line options ``-g``
and ``-l`` (see below), or using such comments:
diff --git a/ide/coq_icon.rc b/ide/coq_icon.rc
deleted file mode 100644
index f873e7de11..0000000000
--- a/ide/coq_icon.rc
+++ /dev/null
@@ -1 +0,0 @@
-large ICON ide/coq.ico
diff --git a/ide/FAQ b/ide/coqide/FAQ
index c8b0a5d328..c8b0a5d328 100644
--- a/ide/FAQ
+++ b/ide/coqide/FAQ
diff --git a/ide/MacOS/Info.plist.template b/ide/coqide/MacOS/Info.plist.template
index e4fb0e5980..e4fb0e5980 100644
--- a/ide/MacOS/Info.plist.template
+++ b/ide/coqide/MacOS/Info.plist.template
diff --git a/ide/MacOS/coqfile.icns b/ide/coqide/MacOS/coqfile.icns
index 107e70431d..107e70431d 100644
--- a/ide/MacOS/coqfile.icns
+++ b/ide/coqide/MacOS/coqfile.icns
Binary files differ
diff --git a/ide/MacOS/coqide.icns b/ide/coqide/MacOS/coqide.icns
index 92bdfe773f..92bdfe773f 100644
--- a/ide/MacOS/coqide.icns
+++ b/ide/coqide/MacOS/coqide.icns
Binary files differ
diff --git a/ide/Make b/ide/coqide/Make
index c0881ca392..c0881ca392 100644
--- a/ide/Make
+++ b/ide/coqide/Make
diff --git a/ide/config_lexer.mli b/ide/coqide/config_lexer.mli
index 196192d5be..196192d5be 100644
--- a/ide/config_lexer.mli
+++ b/ide/coqide/config_lexer.mli
diff --git a/ide/config_lexer.mll b/ide/coqide/config_lexer.mll
index 4ef9a1fafd..4ef9a1fafd 100644
--- a/ide/config_lexer.mll
+++ b/ide/coqide/config_lexer.mll
diff --git a/ide/configwin.ml b/ide/coqide/configwin.ml
index 79a1eae880..79a1eae880 100644
--- a/ide/configwin.ml
+++ b/ide/coqide/configwin.ml
diff --git a/ide/configwin.mli b/ide/coqide/configwin.mli
index b5c3e74aec..b5c3e74aec 100644
--- a/ide/configwin.mli
+++ b/ide/coqide/configwin.mli
diff --git a/ide/configwin_ihm.ml b/ide/coqide/configwin_ihm.ml
index e768131dcf..e768131dcf 100644
--- a/ide/configwin_ihm.ml
+++ b/ide/coqide/configwin_ihm.ml
diff --git a/ide/configwin_ihm.mli b/ide/coqide/configwin_ihm.mli
index ce6cd4d7c1..ce6cd4d7c1 100644
--- a/ide/configwin_ihm.mli
+++ b/ide/coqide/configwin_ihm.mli
diff --git a/ide/configwin_messages.ml b/ide/coqide/configwin_messages.ml
index de1b4721d0..de1b4721d0 100644
--- a/ide/configwin_messages.ml
+++ b/ide/coqide/configwin_messages.ml
diff --git a/ide/configwin_types.ml b/ide/coqide/configwin_types.ml
index 711eccd08e..711eccd08e 100644
--- a/ide/configwin_types.ml
+++ b/ide/coqide/configwin_types.ml
diff --git a/ide/coq-ssreflect.lang b/ide/coqide/coq-ssreflect.lang
index fc7bc64a68..fc7bc64a68 100644
--- a/ide/coq-ssreflect.lang
+++ b/ide/coqide/coq-ssreflect.lang
diff --git a/ide/coq.ico b/ide/coqide/coq.ico
index 94ce897d17..94ce897d17 100644
--- a/ide/coq.ico
+++ b/ide/coqide/coq.ico
Binary files differ
diff --git a/ide/coq.lang b/ide/coqide/coq.lang
index e9eab48de7..e9eab48de7 100644
--- a/ide/coq.lang
+++ b/ide/coqide/coq.lang
diff --git a/ide/coq.ml b/ide/coqide/coq.ml
index 57cdccce6d..57cdccce6d 100644
--- a/ide/coq.ml
+++ b/ide/coqide/coq.ml
diff --git a/ide/coq.mli b/ide/coqide/coq.mli
index 82df36c91c..82df36c91c 100644
--- a/ide/coq.mli
+++ b/ide/coqide/coq.mli
diff --git a/ide/coq.png b/ide/coqide/coq.png
index 136bfdd5fe..136bfdd5fe 100644
--- a/ide/coq.png
+++ b/ide/coqide/coq.png
Binary files differ
diff --git a/ide/coq2.ico b/ide/coqide/coq2.ico
index bc1732fd99..bc1732fd99 100644
--- a/ide/coq2.ico
+++ b/ide/coqide/coq2.ico
Binary files differ
diff --git a/ide/coqOps.ml b/ide/coqide/coqOps.ml
index 29ea3ce9ea..29ea3ce9ea 100644
--- a/ide/coqOps.ml
+++ b/ide/coqide/coqOps.ml
diff --git a/ide/coqOps.mli b/ide/coqide/coqOps.mli
index 3a4678ae9c..3a4678ae9c 100644
--- a/ide/coqOps.mli
+++ b/ide/coqide/coqOps.mli
diff --git a/ide/coq_commands.ml b/ide/coqide/coq_commands.ml
index 711986c2b2..711986c2b2 100644
--- a/ide/coq_commands.ml
+++ b/ide/coqide/coq_commands.ml
diff --git a/ide/coq_commands.mli b/ide/coqide/coq_commands.mli
index 4fa30bbe46..4fa30bbe46 100644
--- a/ide/coq_commands.mli
+++ b/ide/coqide/coq_commands.mli
diff --git a/ide/coqide/coq_icon.rc b/ide/coqide/coq_icon.rc
new file mode 100644
index 0000000000..3e8b8aaecc
--- /dev/null
+++ b/ide/coqide/coq_icon.rc
@@ -0,0 +1 @@
+large ICON ide/coqide/coq.ico
diff --git a/ide/coq_lex.mli b/ide/coqide/coq_lex.mli
index 142dd6e92c..142dd6e92c 100644
--- a/ide/coq_lex.mli
+++ b/ide/coqide/coq_lex.mli
diff --git a/ide/coq_lex.mll b/ide/coqide/coq_lex.mll
index fe9f108a94..fe9f108a94 100644
--- a/ide/coq_lex.mll
+++ b/ide/coqide/coq_lex.mll
diff --git a/ide/coq_style.xml b/ide/coqide/coq_style.xml
index 67631d3462..67631d3462 100644
--- a/ide/coq_style.xml
+++ b/ide/coqide/coq_style.xml
diff --git a/ide/coqide.ml b/ide/coqide/coqide.ml
index ab2a17798e..ab2a17798e 100644
--- a/ide/coqide.ml
+++ b/ide/coqide/coqide.ml
diff --git a/ide/coqide.mli b/ide/coqide/coqide.mli
index ac92afed1f..ac92afed1f 100644
--- a/ide/coqide.mli
+++ b/ide/coqide/coqide.mli
diff --git a/ide/coqide_QUARTZ.ml.in b/ide/coqide/coqide_QUARTZ.ml.in
index fe35906bdc..fe35906bdc 100644
--- a/ide/coqide_QUARTZ.ml.in
+++ b/ide/coqide/coqide_QUARTZ.ml.in
diff --git a/ide/coqide_WIN32.ml.in b/ide/coqide/coqide_WIN32.ml.in
index be8aab9e49..be8aab9e49 100644
--- a/ide/coqide_WIN32.ml.in
+++ b/ide/coqide/coqide_WIN32.ml.in
diff --git a/ide/coqide_X11.ml.in b/ide/coqide/coqide_X11.ml.in
index 76cd880ddc..76cd880ddc 100644
--- a/ide/coqide_X11.ml.in
+++ b/ide/coqide/coqide_X11.ml.in
diff --git a/ide/coqide_main.ml b/ide/coqide/coqide_main.ml
index 0812e00960..0812e00960 100644
--- a/ide/coqide_main.ml
+++ b/ide/coqide/coqide_main.ml
diff --git a/ide/coqide_main.mli b/ide/coqide/coqide_main.mli
index eeb4eb64bd..eeb4eb64bd 100644
--- a/ide/coqide_main.mli
+++ b/ide/coqide/coqide_main.mli
diff --git a/ide/coqide_os_specific.mli b/ide/coqide/coqide_os_specific.mli
index b86800dd50..b86800dd50 100644
--- a/ide/coqide_os_specific.mli
+++ b/ide/coqide/coqide_os_specific.mli
diff --git a/ide/coqide_ui.ml b/ide/coqide/coqide_ui.ml
index e9ff1bbba1..e9ff1bbba1 100644
--- a/ide/coqide_ui.ml
+++ b/ide/coqide/coqide_ui.ml
diff --git a/ide/coqide_ui.mli b/ide/coqide/coqide_ui.mli
index 9e4606072d..9e4606072d 100644
--- a/ide/coqide_ui.mli
+++ b/ide/coqide/coqide_ui.mli
diff --git a/ide/default_bindings_src.ml b/ide/coqide/default_bindings_src.ml
index a69a7c2aba..a69a7c2aba 100644
--- a/ide/default_bindings_src.ml
+++ b/ide/coqide/default_bindings_src.ml
diff --git a/ide/document.ml b/ide/coqide/document.ml
index 096c4940fa..096c4940fa 100644
--- a/ide/document.ml
+++ b/ide/coqide/document.ml
diff --git a/ide/document.mli b/ide/coqide/document.mli
index b7f23115f6..b7f23115f6 100644
--- a/ide/document.mli
+++ b/ide/coqide/document.mli
diff --git a/ide/dune b/ide/coqide/dune
index 12bad7ebc4..12bad7ebc4 100644
--- a/ide/dune
+++ b/ide/coqide/dune
diff --git a/ide/fake_ide.ml b/ide/coqide/fake_ide.ml
index e1736a5fe0..e1736a5fe0 100644
--- a/ide/fake_ide.ml
+++ b/ide/coqide/fake_ide.ml
diff --git a/ide/fileOps.ml b/ide/coqide/fileOps.ml
index 0ac14167e5..0ac14167e5 100644
--- a/ide/fileOps.ml
+++ b/ide/coqide/fileOps.ml
diff --git a/ide/fileOps.mli b/ide/coqide/fileOps.mli
index cf8084af5c..cf8084af5c 100644
--- a/ide/fileOps.mli
+++ b/ide/coqide/fileOps.mli
diff --git a/ide/gtk_parsing.ml b/ide/coqide/gtk_parsing.ml
index decd24d407..decd24d407 100644
--- a/ide/gtk_parsing.ml
+++ b/ide/coqide/gtk_parsing.ml
diff --git a/ide/gtk_parsing.mli b/ide/coqide/gtk_parsing.mli
index 501afde8ac..501afde8ac 100644
--- a/ide/gtk_parsing.mli
+++ b/ide/coqide/gtk_parsing.mli
diff --git a/ide/ide.mllib b/ide/coqide/ide.mllib
index f8e8ff48d6..f8e8ff48d6 100644
--- a/ide/ide.mllib
+++ b/ide/coqide/ide.mllib
diff --git a/ide/ide_common.mllib b/ide/coqide/ide_common.mllib
index 050c282ef6..050c282ef6 100644
--- a/ide/ide_common.mllib
+++ b/ide/coqide/ide_common.mllib
diff --git a/ide/ide_win32_stubs.c b/ide/coqide/ide_win32_stubs.c
index f430c9f2b6..f430c9f2b6 100644
--- a/ide/ide_win32_stubs.c
+++ b/ide/coqide/ide_win32_stubs.c
diff --git a/ide/idetop.ml b/ide/coqide/idetop.ml
index bd99cbed1b..bd99cbed1b 100644
--- a/ide/idetop.ml
+++ b/ide/coqide/idetop.ml
diff --git a/ide/ideutils.ml b/ide/coqide/ideutils.ml
index 482cecc1f8..482cecc1f8 100644
--- a/ide/ideutils.ml
+++ b/ide/coqide/ideutils.ml
diff --git a/ide/ideutils.mli b/ide/coqide/ideutils.mli
index 9a17eb1402..9a17eb1402 100644
--- a/ide/ideutils.mli
+++ b/ide/coqide/ideutils.mli
diff --git a/ide/macos_prehook.ml b/ide/coqide/macos_prehook.ml
index dc8fd0e85d..dc8fd0e85d 100644
--- a/ide/macos_prehook.ml
+++ b/ide/coqide/macos_prehook.ml
diff --git a/ide/macos_prehook.mli b/ide/coqide/macos_prehook.mli
index eeb4eb64bd..eeb4eb64bd 100644
--- a/ide/macos_prehook.mli
+++ b/ide/coqide/macos_prehook.mli
diff --git a/ide/microPG.ml b/ide/coqide/microPG.ml
index 5a4871b70a..5a4871b70a 100644
--- a/ide/microPG.ml
+++ b/ide/coqide/microPG.ml
diff --git a/ide/microPG.mli b/ide/coqide/microPG.mli
index f79a52f0ef..f79a52f0ef 100644
--- a/ide/microPG.mli
+++ b/ide/coqide/microPG.mli
diff --git a/ide/minilib.ml b/ide/coqide/minilib.ml
index cb7a590bd6..cb7a590bd6 100644
--- a/ide/minilib.ml
+++ b/ide/coqide/minilib.ml
diff --git a/ide/minilib.mli b/ide/coqide/minilib.mli
index 1c3be00817..1c3be00817 100644
--- a/ide/minilib.mli
+++ b/ide/coqide/minilib.mli
diff --git a/ide/preferences.ml b/ide/coqide/preferences.ml
index 5a77f4ebcf..5a77f4ebcf 100644
--- a/ide/preferences.ml
+++ b/ide/coqide/preferences.ml
diff --git a/ide/preferences.mli b/ide/coqide/preferences.mli
index 895d7a7876..895d7a7876 100644
--- a/ide/preferences.mli
+++ b/ide/coqide/preferences.mli
diff --git a/ide/protocol/dune b/ide/coqide/protocol/dune
index 801ceb20ec..801ceb20ec 100644
--- a/ide/protocol/dune
+++ b/ide/coqide/protocol/dune
diff --git a/ide/protocol/ideprotocol.mllib b/ide/coqide/protocol/ideprotocol.mllib
index 8317a08681..8317a08681 100644
--- a/ide/protocol/ideprotocol.mllib
+++ b/ide/coqide/protocol/ideprotocol.mllib
diff --git a/ide/protocol/interface.ml b/ide/coqide/protocol/interface.ml
index 646012dcaa..646012dcaa 100644
--- a/ide/protocol/interface.ml
+++ b/ide/coqide/protocol/interface.ml
diff --git a/ide/protocol/richpp.ml b/ide/coqide/protocol/richpp.ml
index 7aa38792fc..7aa38792fc 100644
--- a/ide/protocol/richpp.ml
+++ b/ide/coqide/protocol/richpp.ml
diff --git a/ide/protocol/richpp.mli b/ide/coqide/protocol/richpp.mli
index 3b83e7b15c..3b83e7b15c 100644
--- a/ide/protocol/richpp.mli
+++ b/ide/coqide/protocol/richpp.mli
diff --git a/ide/protocol/serialize.ml b/ide/coqide/protocol/serialize.ml
index bdbec5b30f..bdbec5b30f 100644
--- a/ide/protocol/serialize.ml
+++ b/ide/coqide/protocol/serialize.ml
diff --git a/ide/protocol/serialize.mli b/ide/coqide/protocol/serialize.mli
index 5d88defe55..5d88defe55 100644
--- a/ide/protocol/serialize.mli
+++ b/ide/coqide/protocol/serialize.mli
diff --git a/ide/protocol/xml_lexer.mli b/ide/coqide/protocol/xml_lexer.mli
index 920de9f9c3..920de9f9c3 100644
--- a/ide/protocol/xml_lexer.mli
+++ b/ide/coqide/protocol/xml_lexer.mli
diff --git a/ide/protocol/xml_lexer.mll b/ide/coqide/protocol/xml_lexer.mll
index e8bf7e16ae..e8bf7e16ae 100644
--- a/ide/protocol/xml_lexer.mll
+++ b/ide/coqide/protocol/xml_lexer.mll
diff --git a/ide/protocol/xml_parser.ml b/ide/coqide/protocol/xml_parser.ml
index 8db3f9e8ba..8db3f9e8ba 100644
--- a/ide/protocol/xml_parser.ml
+++ b/ide/coqide/protocol/xml_parser.ml
diff --git a/ide/protocol/xml_parser.mli b/ide/coqide/protocol/xml_parser.mli
index ac2eab352f..ac2eab352f 100644
--- a/ide/protocol/xml_parser.mli
+++ b/ide/coqide/protocol/xml_parser.mli
diff --git a/ide/protocol/xml_printer.ml b/ide/coqide/protocol/xml_printer.ml
index f526618a6e..f526618a6e 100644
--- a/ide/protocol/xml_printer.ml
+++ b/ide/coqide/protocol/xml_printer.ml
diff --git a/ide/protocol/xml_printer.mli b/ide/coqide/protocol/xml_printer.mli
index e60e3392ed..e60e3392ed 100644
--- a/ide/protocol/xml_printer.mli
+++ b/ide/coqide/protocol/xml_printer.mli
diff --git a/ide/protocol/xmlprotocol.ml b/ide/coqide/protocol/xmlprotocol.ml
index 6cb0cec008..6cb0cec008 100644
--- a/ide/protocol/xmlprotocol.ml
+++ b/ide/coqide/protocol/xmlprotocol.ml
diff --git a/ide/protocol/xmlprotocol.mli b/ide/coqide/protocol/xmlprotocol.mli
index 44584d44d7..44584d44d7 100644
--- a/ide/protocol/xmlprotocol.mli
+++ b/ide/coqide/protocol/xmlprotocol.mli
diff --git a/ide/sentence.ml b/ide/coqide/sentence.ml
index 2e00342473..2e00342473 100644
--- a/ide/sentence.ml
+++ b/ide/coqide/sentence.ml
diff --git a/ide/sentence.mli b/ide/coqide/sentence.mli
index adaa7c5d2f..adaa7c5d2f 100644
--- a/ide/sentence.mli
+++ b/ide/coqide/sentence.mli
diff --git a/ide/session.ml b/ide/coqide/session.ml
index 09391b7f50..09391b7f50 100644
--- a/ide/session.ml
+++ b/ide/coqide/session.ml
diff --git a/ide/session.mli b/ide/coqide/session.mli
index 9c0a8760c3..9c0a8760c3 100644
--- a/ide/session.mli
+++ b/ide/coqide/session.mli
diff --git a/ide/tags.ml b/ide/coqide/tags.ml
index 82e63e84a5..82e63e84a5 100644
--- a/ide/tags.ml
+++ b/ide/coqide/tags.ml
diff --git a/ide/tags.mli b/ide/coqide/tags.mli
index 61109c6d60..61109c6d60 100644
--- a/ide/tags.mli
+++ b/ide/coqide/tags.mli
diff --git a/ide/unicode_bindings.ml b/ide/coqide/unicode_bindings.ml
index 39d58825df..39d58825df 100644
--- a/ide/unicode_bindings.ml
+++ b/ide/coqide/unicode_bindings.ml
diff --git a/ide/unicode_bindings.mli b/ide/coqide/unicode_bindings.mli
index 30c6d91fa0..30c6d91fa0 100644
--- a/ide/unicode_bindings.mli
+++ b/ide/coqide/unicode_bindings.mli
diff --git a/ide/utf8_convert.mli b/ide/coqide/utf8_convert.mli
index f1d8aedecb..f1d8aedecb 100644
--- a/ide/utf8_convert.mli
+++ b/ide/coqide/utf8_convert.mli
diff --git a/ide/utf8_convert.mll b/ide/coqide/utf8_convert.mll
index db02bd8116..db02bd8116 100644
--- a/ide/utf8_convert.mll
+++ b/ide/coqide/utf8_convert.mll
diff --git a/ide/wg_Command.ml b/ide/coqide/wg_Command.ml
index 30924adc4a..30924adc4a 100644
--- a/ide/wg_Command.ml
+++ b/ide/coqide/wg_Command.ml
diff --git a/ide/wg_Command.mli b/ide/coqide/wg_Command.mli
index e2854cc6d5..e2854cc6d5 100644
--- a/ide/wg_Command.mli
+++ b/ide/coqide/wg_Command.mli
diff --git a/ide/wg_Completion.ml b/ide/coqide/wg_Completion.ml
index cc24e71386..cc24e71386 100644
--- a/ide/wg_Completion.ml
+++ b/ide/coqide/wg_Completion.ml
diff --git a/ide/wg_Completion.mli b/ide/coqide/wg_Completion.mli
index 8bb34fbbca..8bb34fbbca 100644
--- a/ide/wg_Completion.mli
+++ b/ide/coqide/wg_Completion.mli
diff --git a/ide/wg_Detachable.ml b/ide/coqide/wg_Detachable.ml
index efb10293bd..efb10293bd 100644
--- a/ide/wg_Detachable.ml
+++ b/ide/coqide/wg_Detachable.ml
diff --git a/ide/wg_Detachable.mli b/ide/coqide/wg_Detachable.mli
index 09b4ac732d..09b4ac732d 100644
--- a/ide/wg_Detachable.mli
+++ b/ide/coqide/wg_Detachable.mli
diff --git a/ide/wg_Find.ml b/ide/coqide/wg_Find.ml
index 7e89191bd1..7e89191bd1 100644
--- a/ide/wg_Find.ml
+++ b/ide/coqide/wg_Find.ml
diff --git a/ide/wg_Find.mli b/ide/coqide/wg_Find.mli
index 2a26230a6a..2a26230a6a 100644
--- a/ide/wg_Find.mli
+++ b/ide/coqide/wg_Find.mli
diff --git a/ide/wg_MessageView.ml b/ide/coqide/wg_MessageView.ml
index 6e22172d05..6e22172d05 100644
--- a/ide/wg_MessageView.ml
+++ b/ide/coqide/wg_MessageView.ml
diff --git a/ide/wg_MessageView.mli b/ide/coqide/wg_MessageView.mli
index 054dd0e571..054dd0e571 100644
--- a/ide/wg_MessageView.mli
+++ b/ide/coqide/wg_MessageView.mli
diff --git a/ide/wg_Notebook.ml b/ide/coqide/wg_Notebook.ml
index 9662880210..9662880210 100644
--- a/ide/wg_Notebook.ml
+++ b/ide/coqide/wg_Notebook.ml
diff --git a/ide/wg_Notebook.mli b/ide/coqide/wg_Notebook.mli
index d3907f43ad..d3907f43ad 100644
--- a/ide/wg_Notebook.mli
+++ b/ide/coqide/wg_Notebook.mli
diff --git a/ide/wg_ProofView.ml b/ide/coqide/wg_ProofView.ml
index 1de63953af..1de63953af 100644
--- a/ide/wg_ProofView.ml
+++ b/ide/coqide/wg_ProofView.ml
diff --git a/ide/wg_ProofView.mli b/ide/coqide/wg_ProofView.mli
index 8217f72066..8217f72066 100644
--- a/ide/wg_ProofView.mli
+++ b/ide/coqide/wg_ProofView.mli
diff --git a/ide/wg_RoutedMessageViews.ml b/ide/coqide/wg_RoutedMessageViews.ml
index f141343c5d..f141343c5d 100644
--- a/ide/wg_RoutedMessageViews.ml
+++ b/ide/coqide/wg_RoutedMessageViews.ml
diff --git a/ide/wg_RoutedMessageViews.mli b/ide/coqide/wg_RoutedMessageViews.mli
index bf9893852a..bf9893852a 100644
--- a/ide/wg_RoutedMessageViews.mli
+++ b/ide/coqide/wg_RoutedMessageViews.mli
diff --git a/ide/wg_ScriptView.ml b/ide/coqide/wg_ScriptView.ml
index 62d58a5f23..62d58a5f23 100644
--- a/ide/wg_ScriptView.ml
+++ b/ide/coqide/wg_ScriptView.ml
diff --git a/ide/wg_ScriptView.mli b/ide/coqide/wg_ScriptView.mli
index 849c308941..849c308941 100644
--- a/ide/wg_ScriptView.mli
+++ b/ide/coqide/wg_ScriptView.mli
diff --git a/ide/wg_Segment.ml b/ide/coqide/wg_Segment.ml
index f115da662e..f115da662e 100644
--- a/ide/wg_Segment.ml
+++ b/ide/coqide/wg_Segment.ml
diff --git a/ide/wg_Segment.mli b/ide/coqide/wg_Segment.mli
index 9464b596e5..9464b596e5 100644
--- a/ide/wg_Segment.mli
+++ b/ide/coqide/wg_Segment.mli
diff --git a/plugins/ltac/g_auto.mlg b/plugins/ltac/g_auto.mlg
index b4527694ae..2e72ceae5a 100644
--- a/plugins/ltac/g_auto.mlg
+++ b/plugins/ltac/g_auto.mlg
@@ -114,11 +114,6 @@ END
(** Eauto *)
-TACTIC EXTEND prolog DEPRECATED { Deprecation.make ~note:"Use eauto instead" () }
-| [ "prolog" "[" uconstr_list(l) "]" int_or_var(n) ] ->
- { Eauto.prolog_tac (eval_uconstrs ist l) n }
-END
-
{
let make_depth n = snd (Eauto.make_dimension n None)
diff --git a/plugins/ssrsearch/g_search.mlg b/plugins/ssrsearch/g_search.mlg
index 6d68cc13ab..f5cbf2005b 100644
--- a/plugins/ssrsearch/g_search.mlg
+++ b/plugins/ssrsearch/g_search.mlg
@@ -2,6 +2,8 @@
(* Main prefilter *)
+DECLARE PLUGIN "ssrsearch_plugin"
+
{
module CoqConstr = Constr
diff --git a/pretyping/cases.ml b/pretyping/cases.ml
index 5e3fb9dae3..25353b7c12 100644
--- a/pretyping/cases.ml
+++ b/pretyping/cases.ml
@@ -1716,7 +1716,7 @@ let abstract_tycon ?loc env sigma subst tycon extenv t =
let flags = (default_flags_of TransparentState.full) in
match solve_simple_eqn evar_unify flags !!env sigma (None,ev,substl inst ev') with
| Success evd -> evdref := evd
- | UnifFailure _ -> assert false
+ | UnifFailure _ -> evdref := add_conv_pb (Reduction.CONV,!!env,substl inst ev',t) sigma
end;
ev'
| _ ->
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml
index 36dc01e272..366203faeb 100644
--- a/pretyping/evarconv.ml
+++ b/pretyping/evarconv.ml
@@ -382,19 +382,19 @@ let ise_stack2 no_app env evd f sk1 sk2 =
else None, x in
match sk1, sk2 with
| [], [] -> None, Success i
- | Stack.Case (_,t1,c1,_)::q1, Stack.Case (_,t2,c2,_)::q2 ->
+ | Stack.Case (_,t1,c1)::q1, Stack.Case (_,t2,c2)::q2 ->
(match f env i CONV t1 t2 with
| Success i' ->
(match ise_array2 i' (fun ii -> f env ii CONV) c1 c2 with
| Success i'' -> ise_stack2 true i'' q1 q2
| UnifFailure _ as x -> fail x)
| UnifFailure _ as x -> fail x)
- | Stack.Proj (p1,_)::q1, Stack.Proj (p2,_)::q2 ->
+ | Stack.Proj (p1)::q1, Stack.Proj (p2)::q2 ->
if Projection.Repr.equal (Projection.repr p1) (Projection.repr p2)
then ise_stack2 true i q1 q2
else fail (UnifFailure (i, NotSameHead))
- | Stack.Fix (((li1, i1),(_,tys1,bds1 as recdef1)),a1,_)::q1,
- Stack.Fix (((li2, i2),(_,tys2,bds2)),a2,_)::q2 ->
+ | Stack.Fix (((li1, i1),(_,tys1,bds1 as recdef1)),a1)::q1,
+ Stack.Fix (((li2, i2),(_,tys2,bds2)),a2)::q2 ->
if Int.equal i1 i2 && Array.equal Int.equal li1 li2 then
match ise_and i [
(fun i -> ise_array2 i (fun ii -> f env ii CONV) tys1 tys2);
@@ -417,13 +417,13 @@ let exact_ise_stack2 env evd f sk1 sk2 =
let rec ise_stack2 i sk1 sk2 =
match sk1, sk2 with
| [], [] -> Success i
- | Stack.Case (_,t1,c1,_)::q1, Stack.Case (_,t2,c2,_)::q2 ->
+ | Stack.Case (_,t1,c1)::q1, Stack.Case (_,t2,c2)::q2 ->
ise_and i [
(fun i -> ise_stack2 i q1 q2);
(fun i -> ise_array2 i (fun ii -> f env ii CONV) c1 c2);
(fun i -> f env i CONV t1 t2)]
- | Stack.Fix (((li1, i1),(_,tys1,bds1 as recdef1)),a1,_)::q1,
- Stack.Fix (((li2, i2),(_,tys2,bds2)),a2,_)::q2 ->
+ | Stack.Fix (((li1, i1),(_,tys1,bds1 as recdef1)),a1)::q1,
+ Stack.Fix (((li2, i2),(_,tys2,bds2)),a2)::q2 ->
if Int.equal i1 i2 && Array.equal Int.equal li1 li2 then
ise_and i [
(fun i -> ise_stack2 i q1 q2);
@@ -431,7 +431,7 @@ let exact_ise_stack2 env evd f sk1 sk2 =
(fun i -> ise_array2 i (fun ii -> f (push_rec_types recdef1 env) ii CONV) bds1 bds2);
(fun i -> ise_stack2 i a1 a2)]
else UnifFailure (i,NotSameHead)
- | Stack.Proj (p1,_)::q1, Stack.Proj (p2,_)::q2 ->
+ | Stack.Proj (p1)::q1, Stack.Proj (p2)::q2 ->
if Projection.Repr.equal (Projection.repr p1) (Projection.repr p2)
then ise_stack2 i q1 q2
else (UnifFailure (i, NotSameHead))
@@ -556,9 +556,8 @@ and evar_eqappr_x ?(rhs_is_already_stuck = false) flags env evd pbty
let env' = push_rel (RelDecl.LocalAssum (na,c)) env in
let out1 = whd_betaiota_deltazeta_for_iota_state
flags.open_ts env' evd (c'1, Stack.empty) in
- let out2, _ = whd_nored_state env' evd
- (lift 1 (Stack.zip evd (term', sk')), Stack.append_app [|EConstr.mkRel 1|] Stack.empty),
- Cst_stack.empty in
+ let out2 = whd_nored_state env' evd
+ (lift 1 (Stack.zip evd (term', sk')), Stack.append_app [|EConstr.mkRel 1|] Stack.empty) in
if onleft then evar_eqappr_x flags env' evd CONV out1 out2
else evar_eqappr_x flags env' evd CONV out2 out1
in
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml
index 15bf9667b3..8ab040b3b1 100644
--- a/pretyping/reductionops.ml
+++ b/pretyping/reductionops.ml
@@ -24,11 +24,7 @@ open Context.Rel.Declaration
exception Elimconst
(** This module implements a call by name reduction used by (at
- least) evarconv unification and cbn tactic.
-
- It has an ability to "refold" constants by storing constants and
- their parameters in its stack.
-*)
+ least) evarconv unification. *)
(** Support for reduction effects *)
@@ -174,71 +170,6 @@ module ReductionBehaviour = struct
end
-(** Machinery about stack of unfolded constants *)
-module Cst_stack = struct
- open EConstr
-
-(** constant * params * args
-
-- constant applied to params = term in head applied to args
-- there is at most one arguments with an empty list of args, it must be the first.
-- in args, the int represents the indice of the first arg to consider *)
- type t = (constr * constr list * (int * constr array) list) list
-
- let empty = []
- let is_empty = CList.is_empty
-
- let drop_useless = function
- | _ :: ((_,_,[])::_ as q) -> q
- | l -> l
-
- let add_param h cst_l =
- let append2cst = function
- | (c,params,[]) -> (c, h::params, [])
- | (c,params,((i,t)::q)) when i = pred (Array.length t) ->
- (c, params, q)
- | (c,params,(i,t)::q) ->
- (c, params, (succ i,t)::q)
- in
- drop_useless (List.map append2cst cst_l)
-
- let add_args cl =
- List.map (fun (a,b,args) -> (a,b,(0,cl)::args))
-
- let add_cst cst = function
- | (_,_,[]) :: q as l -> l
- | l -> (cst,[],[])::l
-
- let best_cst = function
- | (cst,params,[])::_ -> Some(cst,params)
- | _ -> None
-
- let reference sigma t = match best_cst t with
- | Some (c, _) when isConst sigma c -> Some (fst (destConst sigma c))
- | _ -> None
-
- (** [best_replace d cst_l c] makes the best replacement for [d]
- by [cst_l] in [c] *)
- let best_replace sigma d cst_l c =
- let reconstruct_head = List.fold_left
- (fun t (i,args) -> mkApp (t,Array.sub args i (Array.length args - i))) in
- List.fold_right
- (fun (cst,params,args) t -> Termops.replace_term sigma
- (reconstruct_head d args)
- (applist (cst, List.rev params))
- t) cst_l c
-
- let pr env sigma l =
- let open Pp in
- let p_c c = Termops.Internal.print_constr_env env sigma c in
- prlist_with_sep pr_semicolon
- (fun (c,params,args) ->
- hov 1 (str"(" ++ p_c c ++ str ")" ++ spc () ++ pr_sequence p_c params ++ spc () ++ str "(args:" ++
- pr_sequence (fun (i,el) -> prvect_with_sep spc p_c (Array.sub el i (Array.length el - i))) args ++
- str ")")) l
-end
-
-
(** The type of (machine) stacks (= lambda-bar-calculus' contexts) *)
module Stack :
sig
@@ -246,17 +177,12 @@ sig
type 'a app_node
val pr_app_node : ('a -> Pp.t) -> 'a app_node -> Pp.t
- type cst_member =
- | Cst_const of pconstant
- | Cst_proj of Projection.t
-
type 'a member =
| App of 'a app_node
- | Case of case_info * 'a * 'a array * Cst_stack.t
- | Proj of Projection.t * Cst_stack.t
- | Fix of ('a, 'a) pfixpoint * 'a t * Cst_stack.t
- | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red * Cst_stack.t
- | Cst of cst_member * int * int list * 'a t * Cst_stack.t
+ | Case of case_info * 'a * 'a array
+ | Proj of Projection.t
+ | Fix of ('a, 'a) pfixpoint * 'a t
+ | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red
and 'a t = 'a member list
@@ -268,8 +194,6 @@ sig
val append_app : 'a array -> 'a t -> 'a t
val decomp : 'a t -> ('a * 'a t) option
val decomp_node_last : 'a app_node -> 'a t -> ('a * 'a t)
- val equal : ('a -> 'a -> bool) -> (('a, 'a) pfixpoint -> ('a, 'a) pfixpoint -> bool)
- -> 'a t -> 'a t -> bool
val compare_shape : 'a t -> 'a t -> bool
val map : ('a -> 'a) -> 'a t -> 'a t
val fold2 : ('a -> constr -> constr -> 'a) -> 'a ->
@@ -278,14 +202,12 @@ sig
val strip_app : 'a t -> 'a t * 'a t
val strip_n_app : int -> 'a t -> ('a t * 'a * 'a t) option
val not_purely_applicative : 'a t -> bool
- val will_expose_iota : 'a t -> bool
val list_of_app_stack : constr t -> constr list option
val assign : 'a t -> int -> 'a -> 'a t
val args_size : 'a t -> int
val tail : int -> 'a t -> 'a t
val nth : 'a t -> int -> 'a
- val best_state : evar_map -> constr * constr t -> Cst_stack.t -> constr * constr t
- val zip : ?refold:bool -> evar_map -> constr * constr t -> constr
+ val zip : evar_map -> constr * constr t -> constr
val check_native_args : CPrimitives.t -> 'a t -> bool
val get_next_primitive_args : CPrimitives.args_red -> 'a t -> CPrimitives.args_red * ('a t * 'a * 'a t) option
end =
@@ -307,17 +229,12 @@ struct
)
- type cst_member =
- | Cst_const of pconstant
- | Cst_proj of Projection.t
-
type 'a member =
| App of 'a app_node
- | Case of case_info * 'a * 'a array * Cst_stack.t
- | Proj of Projection.t * Cst_stack.t
- | Fix of ('a, 'a) pfixpoint * 'a t * Cst_stack.t
- | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red * Cst_stack.t
- | Cst of cst_member * int * int list * 'a t * Cst_stack.t
+ | Case of case_info * 'a * 'a array
+ | Proj of Projection.t
+ | Fix of ('a, 'a) pfixpoint * 'a t
+ | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red
and 'a t = 'a member list
@@ -327,37 +244,22 @@ struct
let pr_c x = hov 1 (pr_c x) in
match member with
| App app -> str "ZApp" ++ pr_app_node pr_c app
- | Case (_,_,br,cst) ->
+ | Case (_,_,br) ->
str "ZCase(" ++
prvect_with_sep (pr_bar) pr_c br
++ str ")"
- | Proj (p,cst) ->
+ | Proj p ->
str "ZProj(" ++ Constant.debug_print (Projection.constant p) ++ str ")"
- | Fix (f,args,cst) ->
+ | Fix (f,args) ->
str "ZFix(" ++ Constr.debug_print_fix pr_c f
++ pr_comma () ++ pr pr_c args ++ str ")"
- | Primitive (p,c,args,kargs,cst_l) ->
+ | Primitive (p,c,args,kargs) ->
str "ZPrimitive(" ++ str (CPrimitives.to_string p)
++ pr_comma () ++ pr pr_c args ++ str ")"
- | Cst (mem,curr,remains,params,cst_l) ->
- str "ZCst(" ++ pr_cst_member pr_c mem ++ pr_comma () ++ int curr
- ++ pr_comma () ++
- prlist_with_sep pr_semicolon int remains ++
- pr_comma () ++ pr pr_c params ++ str ")"
and pr pr_c l =
let open Pp in
prlist_with_sep pr_semicolon (fun x -> hov 1 (pr_member pr_c x)) l
- and pr_cst_member pr_c c =
- let open Pp in
- match c with
- | Cst_const (c, u) ->
- if Univ.Instance.is_empty u then Constant.debug_print c
- else str"(" ++ Constant.debug_print c ++ str ", " ++
- Univ.Instance.pr Univ.Level.pr u ++ str")"
- | Cst_proj p ->
- str".(" ++ Constant.debug_print (Projection.constant p) ++ str")"
-
let empty = []
let is_empty = CList.is_empty
@@ -377,54 +279,21 @@ struct
if i < j then (l.(j), App (i,l,pred j) :: sk)
else (l.(j), sk)
- let equal f f_fix sk1 sk2 =
- let equal_cst_member x y =
- match x, y with
- | Cst_const (c1,u1), Cst_const (c2, u2) ->
- Constant.equal c1 c2 && Univ.Instance.equal u1 u2
- | Cst_proj p1, Cst_proj p2 -> Projection.repr_equal p1 p2
- | _, _ -> false
- in
- let rec equal_rec sk1 sk2 =
- match sk1,sk2 with
- | [],[] -> true
- | App a1 :: s1, App a2 :: s2 ->
- let t1,s1' = decomp_node_last a1 s1 in
- let t2,s2' = decomp_node_last a2 s2 in
- (f t1 t2) && (equal_rec s1' s2')
- | Case (_,t1,a1,_) :: s1, Case (_,t2,a2,_) :: s2 ->
- f t1 t2 && CArray.equal (fun x y -> f x y) a1 a2 && equal_rec s1 s2
- | (Proj (p,_)::s1, Proj(p2,_)::s2) ->
- Projection.Repr.equal (Projection.repr p) (Projection.repr p2)
- && equal_rec s1 s2
- | Fix (f1,s1,_) :: s1', Fix (f2,s2,_) :: s2' ->
- f_fix f1 f2
- && equal_rec (List.rev s1) (List.rev s2)
- && equal_rec s1' s2'
- | Cst (c1,curr1,remains1,params1,_)::s1', Cst (c2,curr2,remains2,params2,_)::s2' ->
- equal_cst_member c1 c2
- && equal_rec (List.rev params1) (List.rev params2)
- && equal_rec s1' s2'
- | ((App _|Case _|Proj _|Fix _|Cst _|Primitive _)::_|[]), _ -> false
- in equal_rec (List.rev sk1) (List.rev sk2)
-
let compare_shape stk1 stk2 =
let rec compare_rec bal stk1 stk2 =
match (stk1,stk2) with
([],[]) -> Int.equal bal 0
| (App (i,_,j)::s1, _) -> compare_rec (bal + j + 1 - i) s1 stk2
| (_, App (i,_,j)::s2) -> compare_rec (bal - j - 1 + i) stk1 s2
- | (Case(c1,_,_,_)::s1, Case(c2,_,_,_)::s2) ->
+ | (Case(c1,_,_)::s1, Case(c2,_,_)::s2) ->
Int.equal bal 0 (* && c1.ci_ind = c2.ci_ind *) && compare_rec 0 s1 s2
- | (Proj (p,_)::s1, Proj(p2,_)::s2) ->
+ | (Proj (p)::s1, Proj(p2)::s2) ->
Int.equal bal 0 && compare_rec 0 s1 s2
- | (Fix(_,a1,_)::s1, Fix(_,a2,_)::s2) ->
+ | (Fix(_,a1)::s1, Fix(_,a2)::s2) ->
Int.equal bal 0 && compare_rec 0 a1 a2 && compare_rec 0 s1 s2
- | (Primitive(_,_,a1,_,_)::s1, Primitive(_,_,a2,_,_)::s2) ->
+ | (Primitive(_,_,a1,_)::s1, Primitive(_,_,a2,_)::s2) ->
Int.equal bal 0 && compare_rec 0 a1 a2 && compare_rec 0 s1 s2
- | (Cst (_,_,_,p1,_)::s1, Cst (_,_,_,p2,_)::s2) ->
- Int.equal bal 0 && compare_rec 0 p1 p2 && compare_rec 0 s1 s2
- | ((Case _|Proj _|Fix _|Cst _|Primitive _) :: _ | []) ,_ -> false in
+ | ((Case _|Proj _|Fix _|Primitive _) :: _ | []) ,_ -> false in
compare_rec 0 stk1 stk2
exception IncompatibleFold2
@@ -436,32 +305,27 @@ struct
let t1,l1 = decomp_node_last n1 q1 in
let t2,l2 = decomp_node_last n2 q2 in
aux (f o t1 t2) l1 l2
- | Case (_,t1,a1,_) :: q1, Case (_,t2,a2,_) :: q2 ->
+ | Case (_,t1,a1) :: q1, Case (_,t2,a2) :: q2 ->
aux (Array.fold_left2 f (f o t1 t2) a1 a2) q1 q2
- | Proj (p1,_) :: q1, Proj (p2,_) :: q2 ->
+ | Proj (p1) :: q1, Proj (p2) :: q2 ->
aux o q1 q2
- | Fix ((_,(_,a1,b1)),s1,_) :: q1, Fix ((_,(_,a2,b2)),s2,_) :: q2 ->
+ | Fix ((_,(_,a1,b1)),s1) :: q1, Fix ((_,(_,a2,b2)),s2) :: q2 ->
let o' = aux (Array.fold_left2 f (Array.fold_left2 f o b1 b2) a1 a2) (List.rev s1) (List.rev s2) in
aux o' q1 q2
- | Cst (cst1,_,_,params1,_) :: q1, Cst (cst2,_,_,params2,_) :: q2 ->
- let o' = aux o (List.rev params1) (List.rev params2) in
- aux o' q1 q2
- | (((App _|Case _|Proj _|Fix _|Cst _|Primitive _) :: _|[]), _) ->
+ | (((App _|Case _|Proj _|Fix _|Primitive _) :: _|[]), _) ->
raise IncompatibleFold2
in aux o (List.rev sk1) (List.rev sk2)
let rec map f x = List.map (function
- | (Proj (_,_)) as e -> e
+ | (Proj (_)) as e -> e
| App (i,a,j) ->
let le = j - i + 1 in
App (0,Array.map f (Array.sub a i le), le-1)
- | Case (info,ty,br,alt) -> Case (info, f ty, Array.map f br, alt)
- | Fix ((r,(na,ty,bo)),arg,alt) ->
- Fix ((r,(na,Array.map f ty, Array.map f bo)),map f arg,alt)
- | Cst (cst,curr,remains,params,alt) ->
- Cst (cst,curr,remains,map f params,alt)
- | Primitive (p,c,args,kargs,cst_l) ->
- Primitive(p,c, map f args, kargs, cst_l)
+ | Case (info,ty,br) -> Case (info, f ty, Array.map f br)
+ | Fix ((r,(na,ty,bo)),arg) ->
+ Fix ((r,(na,Array.map f ty, Array.map f bo)),map f arg)
+ | Primitive (p,c,args,kargs) ->
+ Primitive(p,c, map f args, kargs)
) x
let append_app_list l s =
@@ -470,7 +334,7 @@ struct
let rec args_size = function
| App (i,_,j)::s -> j + 1 - i + args_size s
- | (Case _|Fix _|Proj _|Cst _|Primitive _)::_ | [] -> 0
+ | (Case _|Fix _|Proj _|Primitive _)::_ | [] -> 0
let strip_app s =
let rec aux out = function
@@ -493,13 +357,8 @@ struct
in aux n [] s
let not_purely_applicative args =
- List.exists (function (Fix _ | Case _ | Proj _ | Cst _) -> true
+ List.exists (function (Fix _ | Case _ | Proj _ ) -> true
| App _ | Primitive _ -> false) args
- let will_expose_iota args =
- List.exists
- (function (Fix (_,_,l) | Case (_,_,_,l) |
- Proj (_,l) | Cst (_,_,_,_,l)) when Cst_stack.is_empty l -> true | _ -> false)
- args
let list_of_app_stack s =
let rec aux = function
@@ -536,27 +395,7 @@ struct
| Some (_,el,_) -> el
| None -> raise Not_found
- (** This function breaks the abstraction of Cst_stack ! *)
- let best_state sigma (_,sk as s) l =
- let rec aux sk def = function
- |(cst, params, []) -> (cst, append_app_list (List.rev params) sk)
- |(cst, params, (i,t)::q) -> match decomp sk with
- | Some (el,sk') when EConstr.eq_constr sigma el t.(i) ->
- if i = pred (Array.length t)
- then aux sk' def (cst, params, q)
- else aux sk' def (cst, params, (succ i,t)::q)
- | _ -> def
- in List.fold_left (aux sk) s l
-
- let constr_of_cst_member f sk =
- match f with
- | Cst_const (c, u) -> mkConstU (c, EInstance.make u), sk
- | Cst_proj p ->
- match decomp sk with
- | Some (hd, sk) -> mkProj (p, hd), sk
- | None -> assert false
-
- let zip ?(refold=false) sigma s =
+ let zip sigma s =
let rec zip = function
| f, [] -> f
| f, (App (i,a,j) :: s) ->
@@ -564,21 +403,11 @@ struct
then a
else Array.sub a i (j - i + 1) in
zip (mkApp (f, a'), s)
- | f, (Case (ci,rt,br,cst_l)::s) when refold ->
- zip (best_state sigma (mkCase (ci,rt,f,br), s) cst_l)
- | f, (Case (ci,rt,br,_)::s) -> zip (mkCase (ci,rt,f,br), s)
- | f, (Fix (fix,st,cst_l)::s) when refold ->
- zip (best_state sigma (mkFix fix, st @ (append_app [|f|] s)) cst_l)
- | f, (Fix (fix,st,_)::s) -> zip
+ | f, (Case (ci,rt,br)::s) -> zip (mkCase (ci,rt,f,br), s)
+ | f, (Fix (fix,st)::s) -> zip
(mkFix fix, st @ (append_app [|f|] s))
- | f, (Cst (cst,_,_,params,cst_l)::s) when refold ->
- zip (best_state sigma (constr_of_cst_member cst (params @ (append_app [|f|] s))) cst_l)
- | f, (Cst (cst,_,_,params,_)::s) ->
- zip (constr_of_cst_member cst (params @ (append_app [|f|] s)))
- | f, (Proj (p,cst_l)::s) when refold ->
- zip (best_state sigma (mkProj (p,f),s) cst_l)
- | f, (Proj (p,_)::s) -> zip (mkProj (p,f),s)
- | f, (Primitive (p,c,args,kargs,cst_l)::s) ->
+ | f, (Proj (p)::s) -> zip (mkProj (p,f),s)
+ | f, (Primitive (p,c,args,kargs)::s) ->
zip (mkConstU c, args @ append_app [|f|] s)
in
zip s
@@ -656,17 +485,16 @@ let eta = CClosure.RedFlags.mkflags [CClosure.RedFlags.fETA]
(* Beta Reduction tools *)
-let apply_subst recfun env sigma refold cst_l t stack =
- let rec aux env cst_l t stack =
+let apply_subst recfun env sigma t stack =
+ let rec aux env t stack =
match (Stack.decomp stack, EConstr.kind sigma t) with
| Some (h,stacktl), Lambda (_,_,c) ->
- let cst_l' = if refold then Cst_stack.add_param h cst_l else cst_l in
- aux (h::env) cst_l' c stacktl
- | _ -> recfun sigma cst_l (substl env t, stack)
- in aux env cst_l t stack
+ aux (h::env) c stacktl
+ | _ -> recfun sigma (substl env t, stack)
+ in aux env t stack
let stacklam recfun env sigma t stack =
- apply_subst (fun _ _ s -> recfun s) env sigma false Cst_stack.empty t stack
+ apply_subst (fun _ s -> recfun s) env sigma t stack
let beta_applist sigma (c,l) =
let zip s = Stack.zip sigma s in
@@ -685,73 +513,25 @@ let reducible_mind_case sigma c = match EConstr.kind sigma c with
| Construct _ | CoFix _ -> true
| _ -> false
-(** @return c if there is a constant c whose body is bd
- @return bd else.
-
- It has only a meaning because internal representation of "Fixpoint f x
- := t" is Definition f := fix f x => t
-
- Even more fragile that we could hope because do Module M. Fixpoint
- f x := t. End M. Definition f := u. and say goodbye to any hope
- of refolding M.f this way ...
-*)
-let magically_constant_of_fixbody env sigma reference bd = function
- | Name.Anonymous -> bd
- | Name.Name id ->
- let open UnivProblem in
- let (cst_mod,_) = Constant.repr2 reference in
- let cst = Constant.make2 cst_mod (Label.of_id id) in
- if not (Environ.mem_constant cst env) then bd
- else
- let (cst, u), ctx = UnivGen.fresh_constant_instance env cst in
- match constant_opt_value_in env (cst,u) with
- | None -> bd
- | Some t ->
- let csts = EConstr.eq_constr_universes env sigma (EConstr.of_constr t) bd in
- begin match csts with
- | Some csts ->
- let subst = Set.fold (fun cst acc ->
- let l, r = match cst with
- | ULub (u, v) | UWeak (u, v) -> u, v
- | UEq (u, v) | ULe (u, v) ->
- let get u = Option.get (Universe.level u) in
- get u, get v
- in
- Univ.LMap.add l r acc)
- csts Univ.LMap.empty
- in
- let inst = Instance.subst_fn (fun u -> Univ.LMap.find u subst) u in
- mkConstU (cst, EInstance.make inst)
- | None -> bd
- end
-
-let contract_cofix ?env sigma ?reference (bodynum,(names,types,bodies as typedbodies)) =
+let contract_cofix sigma (bodynum,(names,types,bodies as typedbodies)) =
let nbodies = Array.length bodies in
let make_Fi j =
let ind = nbodies-j-1 in
if Int.equal bodynum ind then mkCoFix (ind,typedbodies)
else
let bd = mkCoFix (ind,typedbodies) in
- match env with
- | None -> bd
- | Some e ->
- match reference with
- | None -> bd
- | Some r -> magically_constant_of_fixbody e sigma r bd names.(ind).binder_name in
+ bd
+ in
let closure = List.init nbodies make_Fi in
substl closure bodies.(bodynum)
(** Similar to the "fix" case below *)
-let reduce_and_refold_cofix recfun env sigma refold cst_l cofix sk =
+let reduce_and_refold_cofix recfun env sigma cofix sk =
let raw_answer =
- let env = if refold then Some env else None in
- contract_cofix ?env sigma ?reference:(Cst_stack.reference sigma cst_l) cofix in
+ contract_cofix sigma cofix in
apply_subst
- (fun sigma x (t,sk') ->
- let t' =
- if refold then Cst_stack.best_replace sigma (mkCoFix cofix) cst_l t else t in
- recfun x (t',sk'))
- [] sigma refold Cst_stack.empty raw_answer sk
+ (fun _ (t,sk') -> recfun (t,sk'))
+ [] sigma raw_answer sk
let reduce_mind_case sigma mia =
match EConstr.kind sigma mia.mconstr with
@@ -767,19 +547,15 @@ let reduce_mind_case sigma mia =
(* contracts fix==FIX[nl;i](A1...Ak;[F1...Fk]{B1....Bk}) to produce
Bi[Fj --> FIX[nl;j](A1...Ak;[F1...Fk]{B1...Bk})] *)
-let contract_fix ?env sigma ?reference ((recindices,bodynum),(names,types,bodies as typedbodies)) =
+let contract_fix sigma ((recindices,bodynum),(names,types,bodies as typedbodies)) =
let nbodies = Array.length recindices in
let make_Fi j =
let ind = nbodies-j-1 in
if Int.equal bodynum ind then mkFix ((recindices,ind),typedbodies)
else
let bd = mkFix ((recindices,ind),typedbodies) in
- match env with
- | None -> bd
- | Some e ->
- match reference with
- | None -> bd
- | Some r -> magically_constant_of_fixbody e sigma r bd names.(ind).binder_name in
+ bd
+ in
let closure = List.init nbodies make_Fi in
substl closure bodies.(bodynum)
@@ -787,18 +563,12 @@ let contract_fix ?env sigma ?reference ((recindices,bodynum),(names,types,bodies
replace the fixpoint by the best constant from [cst_l]
Other rels are directly substituted by constants "magically found from the
context" in contract_fix *)
-let reduce_and_refold_fix recfun env sigma refold cst_l fix sk =
+let reduce_and_refold_fix recfun env sigma fix sk =
let raw_answer =
- let env = if refold then Some env else None in
- contract_fix ?env sigma ?reference:(Cst_stack.reference sigma cst_l) fix in
+ contract_fix sigma fix in
apply_subst
- (fun sigma x (t,sk') ->
- let t' =
- if refold then
- Cst_stack.best_replace sigma (mkFix fix) cst_l t
- else t
- in recfun x (t',sk'))
- [] sigma refold Cst_stack.empty raw_answer sk
+ (fun _ (t,sk') -> recfun (t,sk'))
+ [] sigma raw_answer sk
let fix_recarg ((recindices,bodynum),_) stack =
assert (0 <= bodynum && bodynum < Array.length recindices);
@@ -952,21 +722,14 @@ let debug_RAKAM =
~key:["Debug";"RAKAM"]
~value:false
-let equal_stacks sigma (x, l) (y, l') =
- let f_equal x y = eq_constr sigma x y in
- let eq_fix a b = f_equal (mkFix a) (mkFix b) in
- Stack.equal f_equal eq_fix l l' && f_equal x y
-
-let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
+let rec whd_state_gen flags env sigma =
let open Context.Named.Declaration in
- let open ReductionBehaviour in
- let rec whrec cst_l (x, stack) =
+ let rec whrec (x, stack) : state =
let () = if debug_RAKAM () then
let open Pp in
let pr c = Termops.Internal.print_constr_env env sigma c in
Feedback.msg_debug
(h 0 (str "<<" ++ pr x ++
- str "|" ++ cut () ++ Cst_stack.pr env sigma cst_l ++
str "|" ++ cut () ++ Stack.pr pr stack ++
str ">>"))
in
@@ -974,22 +737,22 @@ let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
let fold () =
let () = if debug_RAKAM () then
let open Pp in Feedback.msg_debug (str "<><><><><>") in
- ((EConstr.of_kind c0, stack),cst_l)
+ ((EConstr.of_kind c0, stack))
in
match c0 with
| Rel n when CClosure.RedFlags.red_set flags CClosure.RedFlags.fDELTA ->
(match lookup_rel n env with
- | LocalDef (_,body,_) -> whrec Cst_stack.empty (lift n body, stack)
+ | LocalDef (_,body,_) -> whrec (lift n body, stack)
| _ -> fold ())
| Var id when CClosure.RedFlags.red_set flags (CClosure.RedFlags.fVAR id) ->
(match lookup_named id env with
| LocalDef (_,body,_) ->
- whrec (if refold then Cst_stack.add_cst (mkVar id) cst_l else cst_l) (body, stack)
+ whrec (body, stack)
| _ -> fold ())
| Evar ev -> fold ()
| Meta ev ->
(match safe_meta_value sigma ev with
- | Some body -> whrec cst_l (body, stack)
+ | Some body -> whrec (body, stack)
| None -> fold ())
| Const (c,u as const) ->
reduction_effect_hook env sigma c
@@ -1000,175 +763,70 @@ let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
| body ->
begin
let body = EConstr.of_constr body in
- if not tactic_mode
- then whrec (if refold then Cst_stack.add_cst (mkConstU const) cst_l else cst_l)
- (body, stack)
- else (* Looks for ReductionBehaviour *)
- match ReductionBehaviour.get (GlobRef.ConstRef c) with
- | None -> whrec (Cst_stack.add_cst (mkConstU const) cst_l) (body, stack)
- | Some behavior ->
- begin match behavior with
- | NeverUnfold -> fold ()
- | (UnfoldWhen { nargs = Some n } |
- UnfoldWhenNoMatch { nargs = Some n } )
- when Stack.args_size stack < n ->
- fold ()
- | UnfoldWhenNoMatch { recargs } -> (* maybe unfolds *)
- let app_sk,sk = Stack.strip_app stack in
- let (tm',sk'),cst_l' =
- whrec (Cst_stack.add_cst (mkConstU const) cst_l) (body, app_sk)
- in
- let rec is_case x = match EConstr.kind sigma x with
- | Lambda (_,_, x) | LetIn (_,_,_, x) | Cast (x, _,_) -> is_case x
- | App (hd, _) -> is_case hd
- | Case _ -> true
- | _ -> false in
- if equal_stacks sigma (x, app_sk) (tm', sk')
- || Stack.will_expose_iota sk'
- || is_case tm'
- then fold ()
- else whrec cst_l' (tm', sk' @ sk)
- | UnfoldWhen { recargs } -> (* maybe unfolds *)
- begin match recargs with
- |[] -> (* if nargs has been specified *)
- (* CAUTION : the constant is NEVER refold
- (even when it hides a (co)fix) *)
- whrec cst_l (body, stack)
- |curr::remains -> match Stack.strip_n_app curr stack with
- | None -> fold ()
- | Some (bef,arg,s') ->
- whrec Cst_stack.empty
- (arg,Stack.Cst(Stack.Cst_const (fst const, u'),curr,remains,bef,cst_l)::s')
- end
- end
- end
+ whrec (body, stack)
+ end
| exception NotEvaluableConst (IsPrimitive p) when Stack.check_native_args p stack ->
let kargs = CPrimitives.kind p in
let (kargs,o) = Stack.get_next_primitive_args kargs stack in
(* Should not fail thanks to [check_native_args] *)
let (before,a,after) = Option.get o in
- whrec Cst_stack.empty (a,Stack.Primitive(p,const,before,kargs,cst_l)::after)
+ whrec (a,Stack.Primitive(p,const,before,kargs)::after)
| exception NotEvaluableConst _ -> fold ()
else fold ()
| Proj (p, c) when CClosure.RedFlags.red_projection flags p ->
- (let npars = Projection.npars p in
- if not tactic_mode then
- let stack' = (c, Stack.Proj (p, Cst_stack.empty (*cst_l*)) :: stack) in
- whrec Cst_stack.empty stack'
- else match ReductionBehaviour.get (GlobRef.ConstRef (Projection.constant p)) with
- | None ->
- let stack' = (c, Stack.Proj (p, cst_l) :: stack) in
- let stack'', csts = whrec Cst_stack.empty stack' in
- if equal_stacks sigma stack' stack'' then fold ()
- else stack'', csts
- | Some behavior ->
- begin match behavior with
- | NeverUnfold -> fold ()
- | (UnfoldWhen { nargs = Some n }
- | UnfoldWhenNoMatch { nargs = Some n })
- when Stack.args_size stack < n - (npars + 1) -> fold ()
- | UnfoldWhen { recargs }
- | UnfoldWhenNoMatch { recargs }-> (* maybe unfolds *)
- let recargs = List.map_filter (fun x ->
- let idx = x - npars in
- if idx < 0 then None else Some idx) recargs
- in
- match recargs with
- |[] -> (* if nargs has been specified *)
- (* CAUTION : the constant is NEVER refold
- (even when it hides a (co)fix) *)
- let stack' = (c, Stack.Proj (p, cst_l) :: stack) in
- whrec Cst_stack.empty(* cst_l *) stack'
- | curr::remains ->
- if curr == 0 then (* Try to reduce the record argument *)
- whrec Cst_stack.empty
- (c, Stack.Cst(Stack.Cst_proj p,curr,remains,Stack.empty,cst_l)::stack)
- else
- match Stack.strip_n_app curr stack with
- | None -> fold ()
- | Some (bef,arg,s') ->
- whrec Cst_stack.empty
- (arg,Stack.Cst(Stack.Cst_proj p,curr,remains,
- Stack.append_app [|c|] bef,cst_l)::s')
- end)
+ let stack' = (c, Stack.Proj (p) :: stack) in
+ whrec stack'
| LetIn (_,b,_,c) when CClosure.RedFlags.red_set flags CClosure.RedFlags.fZETA ->
- apply_subst (fun _ -> whrec) [b] sigma refold cst_l c stack
- | Cast (c,_,_) -> whrec cst_l (c, stack)
+ apply_subst (fun _ -> whrec) [b] sigma c stack
+ | Cast (c,_,_) -> whrec (c, stack)
| App (f,cl) ->
whrec
- (if refold then Cst_stack.add_args cl cst_l else cst_l)
(f, Stack.append_app cl stack)
| Lambda (na,t,c) ->
(match Stack.decomp stack with
| Some _ when CClosure.RedFlags.red_set flags CClosure.RedFlags.fBETA ->
- apply_subst (fun _ -> whrec) [] sigma refold cst_l x stack
+ apply_subst (fun _ -> whrec) [] sigma x stack
| None when CClosure.RedFlags.red_set flags CClosure.RedFlags.fETA ->
let env' = push_rel (LocalAssum (na, t)) env in
- let whrec' = whd_state_gen ~refold ~tactic_mode flags env' sigma in
- (match EConstr.kind sigma (Stack.zip ~refold sigma (fst (whrec' (c, Stack.empty)))) with
+ let whrec' = whd_state_gen flags env' sigma in
+ (match EConstr.kind sigma (Stack.zip sigma (whrec' (c, Stack.empty))) with
| App (f,cl) ->
let napp = Array.length cl in
if napp > 0 then
- let (x', l'),_ = whrec' (Array.last cl, Stack.empty) in
+ let (x', l') = whrec' (Array.last cl, Stack.empty) in
match EConstr.kind sigma x', l' with
| Rel 1, [] ->
let lc = Array.sub cl 0 (napp-1) in
let u = if Int.equal napp 1 then f else mkApp (f,lc) in
- if noccurn sigma 1 u then (pop u,Stack.empty),Cst_stack.empty else fold ()
+ if noccurn sigma 1 u then (pop u,Stack.empty) else fold ()
| _ -> fold ()
else fold ()
| _ -> fold ())
| _ -> fold ())
| Case (ci,p,d,lf) ->
- whrec Cst_stack.empty (d, Stack.Case (ci,p,lf,cst_l) :: stack)
+ whrec (d, Stack.Case (ci,p,lf) :: stack)
| Fix ((ri,n),_ as f) ->
(match Stack.strip_n_app ri.(n) stack with
|None -> fold ()
|Some (bef,arg,s') ->
- whrec Cst_stack.empty (arg, Stack.Fix(f,bef,cst_l)::s'))
+ whrec (arg, Stack.Fix(f,bef)::s'))
| Construct ((ind,c),u) ->
let use_match = CClosure.RedFlags.red_set flags CClosure.RedFlags.fMATCH in
let use_fix = CClosure.RedFlags.red_set flags CClosure.RedFlags.fFIX in
if use_match || use_fix then
match Stack.strip_app stack with
- |args, (Stack.Case(ci, _, lf,_)::s') when use_match ->
- whrec Cst_stack.empty (lf.(c-1), (Stack.tail ci.ci_npar args) @ s')
- |args, (Stack.Proj (p,_)::s') when use_match ->
- whrec Cst_stack.empty (Stack.nth args (Projection.npars p + Projection.arg p), s')
- |args, (Stack.Fix (f,s',cst_l)::s'') when use_fix ->
+ |args, (Stack.Case(ci, _, lf)::s') when use_match ->
+ whrec (lf.(c-1), (Stack.tail ci.ci_npar args) @ s')
+ |args, (Stack.Proj (p)::s') when use_match ->
+ whrec (Stack.nth args (Projection.npars p + Projection.arg p), s')
+ |args, (Stack.Fix (f,s')::s'') when use_fix ->
let x' = Stack.zip sigma (x, args) in
let out_sk = s' @ (Stack.append_app [|x'|] s'') in
- reduce_and_refold_fix whrec env sigma refold cst_l f out_sk
- |args, (Stack.Cst (const,curr,remains,s',cst_l) :: s'') ->
- let x' = Stack.zip sigma (x, args) in
- begin match remains with
- | [] ->
- (match const with
- | Stack.Cst_const const ->
- (match constant_opt_value_in env const with
- | None -> fold ()
- | Some body ->
- let const = (fst const, EInstance.make (snd const)) in
- let body = EConstr.of_constr body in
- whrec (if refold then Cst_stack.add_cst (mkConstU const) cst_l else cst_l)
- (body, s' @ (Stack.append_app [|x'|] s'')))
- | Stack.Cst_proj p ->
- let stack = s' @ (Stack.append_app [|x'|] s'') in
- match Stack.strip_n_app 0 stack with
- | None -> assert false
- | Some (_,arg,s'') ->
- whrec Cst_stack.empty (arg, Stack.Proj (p,cst_l) :: s''))
- | next :: remains' -> match Stack.strip_n_app (next-curr-1) s'' with
- | None -> fold ()
- | Some (bef,arg,s''') ->
- whrec Cst_stack.empty
- (arg,
- Stack.Cst (const,next,remains',s' @ (Stack.append_app [|x'|] bef),cst_l) :: s''')
- end
+ reduce_and_refold_fix whrec env sigma f out_sk
|_, (Stack.App _)::_ -> assert false
|_, _ -> fold ()
else fold ()
@@ -1177,19 +835,19 @@ let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
if CClosure.RedFlags.red_set flags CClosure.RedFlags.fCOFIX then
match Stack.strip_app stack with
|args, ((Stack.Case _ |Stack.Proj _)::s') ->
- reduce_and_refold_cofix whrec env sigma refold cst_l cofix stack
+ reduce_and_refold_cofix whrec env sigma cofix stack
|_ -> fold ()
else fold ()
| Int _ | Float _ ->
begin match Stack.strip_app stack with
- | (_, Stack.Primitive(p,kn,rargs,kargs,cst_l')::s) ->
+ | (_, Stack.Primitive(p,kn,rargs,kargs)::s) ->
let more_to_reduce = List.exists (fun k -> CPrimitives.Kwhnf = k) kargs in
if more_to_reduce then
let (kargs,o) = Stack.get_next_primitive_args kargs s in
(* Should not fail because Primitive is put on the stack only if fully applied *)
let (before,a,after) = Option.get o in
- whrec Cst_stack.empty (a,Stack.Primitive(p,kn,rargs @ Stack.append_app [|x|] before,kargs,cst_l')::after)
+ whrec (a,Stack.Primitive(p,kn,rargs @ Stack.append_app [|x|] before,kargs)::after)
else
let n = List.length kargs in
let (args,s) = Stack.strip_app s in
@@ -1199,8 +857,8 @@ let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
in
let args = Array.of_list (Option.get (Stack.list_of_app_stack (rargs @ Stack.append_app [|x|] args))) in
begin match CredNative.red_prim env sigma p args with
- | Some t -> whrec cst_l' (t,s)
- | None -> ((mkApp (mkConstU kn, args), s), cst_l)
+ | Some t -> whrec (t,s)
+ | None -> ((mkApp (mkConstU kn, args), s))
end
| _ -> fold ()
end
@@ -1208,9 +866,7 @@ let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
| Rel _ | Var _ | LetIn _ | Proj _ -> fold ()
| Sort _ | Ind _ | Prod _ -> fold ()
in
- fun xs ->
- let (s,cst_l as res) = whrec (Option.default Cst_stack.empty csts) xs in
- if tactic_mode then (Stack.best_state sigma s cst_l,Cst_stack.empty) else res
+ whrec
(** reduction machine without global env and refold machinery *)
let local_whd_state_gen flags _env sigma =
@@ -1243,15 +899,15 @@ let local_whd_state_gen flags _env sigma =
| _ -> s)
| Proj (p,c) when CClosure.RedFlags.red_projection flags p ->
- (whrec (c, Stack.Proj (p, Cst_stack.empty) :: stack))
+ (whrec (c, Stack.Proj (p) :: stack))
| Case (ci,p,d,lf) ->
- whrec (d, Stack.Case (ci,p,lf,Cst_stack.empty) :: stack)
+ whrec (d, Stack.Case (ci,p,lf) :: stack)
| Fix ((ri,n),_ as f) ->
(match Stack.strip_n_app ri.(n) stack with
|None -> s
- |Some (bef,arg,s') -> whrec (arg, Stack.Fix(f,bef,Cst_stack.empty)::s'))
+ |Some (bef,arg,s') -> whrec (arg, Stack.Fix(f,bef)::s'))
| Evar ev -> s
| Meta ev ->
@@ -1264,14 +920,14 @@ let local_whd_state_gen flags _env sigma =
let use_fix = CClosure.RedFlags.red_set flags CClosure.RedFlags.fFIX in
if use_match || use_fix then
match Stack.strip_app stack with
- |args, (Stack.Case(ci, _, lf,_)::s') when use_match ->
+ |args, (Stack.Case(ci, _, lf)::s') when use_match ->
whrec (lf.(c-1), (Stack.tail ci.ci_npar args) @ s')
- |args, (Stack.Proj (p,_) :: s') when use_match ->
+ |args, (Stack.Proj (p) :: s') when use_match ->
whrec (Stack.nth args (Projection.npars p + Projection.arg p), s')
- |args, (Stack.Fix (f,s',cst)::s'') when use_fix ->
+ |args, (Stack.Fix (f,s')::s'') when use_fix ->
let x' = Stack.zip sigma (x,args) in
whrec (contract_fix sigma f, s' @ (Stack.append_app [|x'|] s''))
- |_, (Stack.App _|Stack.Cst _)::_ -> assert false
+ |_, (Stack.App _)::_ -> assert false
|_, _ -> s
else s
@@ -1290,9 +946,7 @@ let local_whd_state_gen flags _env sigma =
whrec
let raw_whd_state_gen flags env =
- let f sigma s = fst (whd_state_gen ~refold:false
- ~tactic_mode:false
- flags env sigma s) in
+ let f sigma s = whd_state_gen flags env sigma s in
f
let stack_red_of_state_red f =
@@ -1300,11 +954,11 @@ let stack_red_of_state_red f =
f
(* Drops the Cst_stack *)
-let iterate_whd_gen refold flags env sigma s =
+let iterate_whd_gen flags env sigma s =
let rec aux t =
- let (hd,sk),_ = whd_state_gen ~refold ~tactic_mode:false flags env sigma (t,Stack.empty) in
+ let (hd,sk) = whd_state_gen flags env sigma (t,Stack.empty) in
let whd_sk = Stack.map aux sk in
- Stack.zip sigma ~refold (hd,whd_sk)
+ Stack.zip sigma (hd,whd_sk)
in aux s
let red_of_state_red f env sigma x =
@@ -1717,8 +1371,6 @@ let is_sort env sigma t =
of case/fix (heuristic used by evar_conv) *)
let whd_betaiota_deltazeta_for_iota_state ts env sigma s =
- let refold = false in
- let tactic_mode = false in
let all' = CClosure.RedFlags.red_add_transparent CClosure.all ts in
(* Unset the sharing flag to get a call-by-name reduction. This matters for
the shape of the generated term. *)
@@ -1738,7 +1390,7 @@ let whd_betaiota_deltazeta_for_iota_state ts env sigma s =
| _ -> None
in
let rec whrec s =
- let (t, stack as s), _ = whd_state_gen ~refold ~tactic_mode CClosure.betaiota env sigma s in
+ let (t, stack as s) = whd_state_gen CClosure.betaiota env sigma s in
match Stack.strip_app stack with
|args, (Stack.Case _ :: _ as stack') ->
begin match whd_opt (t, args) with
@@ -1750,13 +1402,13 @@ let whd_betaiota_deltazeta_for_iota_state ts env sigma s =
| Some (t_o, args) when isConstruct sigma t_o -> whrec (t_o, Stack.append_app args stack')
| (Some _ | None) -> s
end
- |args, (Stack.Proj (p,_) :: stack'') ->
+ |args, (Stack.Proj p :: stack'') ->
begin match whd_opt (t, args) with
| Some (t_o, args) when isConstruct sigma t_o ->
whrec (args.(Projection.npars p + Projection.arg p), stack'')
| (Some _ | None) -> s
end
- |_, ((Stack.App _|Stack.Cst _|Stack.Primitive _) :: _|[]) -> s
+ |_, ((Stack.App _|Stack.Primitive _) :: _|[]) -> s
in
whrec s
diff --git a/pretyping/reductionops.mli b/pretyping/reductionops.mli
index be91f688e7..a0cbd8ccf7 100644
--- a/pretyping/reductionops.mli
+++ b/pretyping/reductionops.mli
@@ -19,6 +19,11 @@ open Environ
exception Elimconst
+val debug_RAKAM : unit -> bool
+
+module CredNative : Primred.RedNative with
+ type elem = EConstr.t and type args = EConstr.t array and type evd = Evd.evar_map
+
(** Machinery to customize the behavior of the reduction *)
module ReductionBehaviour : sig
@@ -46,41 +51,17 @@ val set_reduction_effect : Constant.t -> effect_name -> unit
val reduction_effect_hook : Environ.env -> Evd.evar_map -> Constant.t ->
Constr.constr Lazy.t -> unit
-(** {6 Machinery about a stack of unfolded constant }
-
- cst applied to params must convertible to term of the state applied to args
-*)
-module Cst_stack : sig
- type t
- val empty : t
- val add_param : constr -> t -> t
- val add_args : constr array -> t -> t
- val add_cst : constr -> t -> t
- val best_cst : t -> (constr * constr list) option
- val best_replace : Evd.evar_map -> constr -> t -> constr -> constr
- val reference : Evd.evar_map -> t -> Constant.t option
- val pr : env -> Evd.evar_map -> t -> Pp.t
-end
-
module Stack : sig
type 'a app_node
val pr_app_node : ('a -> Pp.t) -> 'a app_node -> Pp.t
- type cst_member =
- | Cst_const of pconstant
- | Cst_proj of Projection.t
-
type 'a member =
| App of 'a app_node
- | Case of case_info * 'a * 'a array * Cst_stack.t
- | Proj of Projection.t * Cst_stack.t
- | Fix of ('a, 'a) pfixpoint * 'a t * Cst_stack.t
- | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red * Cst_stack.t
- | Cst of cst_member
- * int (* current foccussed arg *)
- * int list (* remaining args *)
- * 'a t * Cst_stack.t
+ | Case of case_info * 'a * 'a array
+ | Proj of Projection.t
+ | Fix of ('a, 'a) pfixpoint * 'a t
+ | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red
and 'a t = 'a member list
val pr : ('a -> Pp.t) -> 'a t -> Pp.t
@@ -119,8 +100,7 @@ module Stack : sig
val tail : int -> 'a t -> 'a t
val nth : 'a t -> int -> 'a
- val best_state : evar_map -> constr * constr t -> Cst_stack.t -> constr * constr t
- val zip : ?refold:bool -> evar_map -> constr * constr t -> constr
+ val zip : evar_map -> constr * constr t -> constr
end
(************************************************************************)
@@ -155,10 +135,10 @@ val stack_reduction_of_reduction :
i*)
val stacklam : (state -> 'a) -> constr list -> evar_map -> constr -> constr Stack.t -> 'a
-val whd_state_gen : ?csts:Cst_stack.t -> refold:bool -> tactic_mode:bool ->
- CClosure.RedFlags.reds -> Environ.env -> Evd.evar_map -> state -> state * Cst_stack.t
+val whd_state_gen :
+ CClosure.RedFlags.reds -> Environ.env -> Evd.evar_map -> state -> state
-val iterate_whd_gen : bool -> CClosure.RedFlags.reds ->
+val iterate_whd_gen : CClosure.RedFlags.reds ->
Environ.env -> Evd.evar_map -> constr -> constr
(** {6 Generic Optimized Reduction Function using Closures } *)
@@ -260,7 +240,7 @@ val find_conclusion : env -> evar_map -> constr -> (constr, constr, ESorts.t, EI
val is_arity : env -> evar_map -> constr -> bool
val is_sort : env -> evar_map -> types -> bool
-val contract_fix : ?env:Environ.env -> evar_map -> ?reference:Constant.t -> fixpoint -> constr
+val contract_fix : evar_map -> fixpoint -> constr
val fix_recarg : ('a, 'a) pfixpoint -> 'b Stack.t -> (int * 'b) option
(** {6 Querying the kernel conversion oracle: opaque/transparent constants } *)
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index 88eec5ea01..95b07e227e 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -487,7 +487,7 @@ let expand_table_key env = function
| RelKey _ -> None
let unfold_projection env p stk =
- let s = Stack.Proj (p, Cst_stack.empty) in
+ let s = Stack.Proj p in
s :: stk
let expand_key ts env sigma = function
diff --git a/stm/asyncTaskQueue.ml b/stm/asyncTaskQueue.ml
index 87d844edb3..a8088dae36 100644
--- a/stm/asyncTaskQueue.ml
+++ b/stm/asyncTaskQueue.ml
@@ -130,19 +130,23 @@ module Make(T : Task) () = struct
(* Options to discard: 1 argument *)
| ( "-async-proofs" | "-vio2vo" | "-o"
| "-load-vernac-source" | "-l" | "-load-vernac-source-verbose" | "-lv"
- | "-compile" | "-compile-verbose"
+ | "-require-import" | "-require-export" | "-ri" | "-re"
+ | "-load-vernac-object"
+ | "-set" | "-unset" | "-compat" | "-mangle-names" | "-diffs" | "-w"
| "-async-proofs-cache" | "-async-proofs-j" | "-async-proofs-tac-j"
| "-async-proofs-private-flags" | "-async-proofs-tactic-error-resilience"
| "-async-proofs-command-error-resilience" | "-async-proofs-delegation-threshold"
| "-async-proofs-worker-priority" | "-worker-id") :: _ :: tl ->
set_slave_opt tl
+ (* Options to discard: 2 arguments *)
+ | ( "-rifrom" | "-refrom" | "-rfrom"
+ | "-require-import-from" | "-require-export-from") :: _ :: _ :: tl ->
+ set_slave_opt tl
(* We need to pass some options with one argument *)
- | ( "-I" | "-include" | "-top" | "-topfile" | "-coqlib" | "-exclude-dir" | "-compat"
- | "-require-import" | "-require-export" | "-require-import-from" | "-require-export-from"
- | "-ri" | "-re" | "-rifrom" | "-refrom" | "-load-vernac-object"
- | "-w" | "-color" | "-init-file"
- | "-profile-ltac-cutoff" | "-main-channel" | "-control-channel" | "-mangle-names" | "-set" | "-unset"
- | "-diffs" | "-mangle-name" | "-dump-glob" | "-bytecode-compiler" | "-native-compiler" as x) :: a :: tl ->
+ | ( "-I" | "-include" | "-top" | "-topfile" | "-coqlib" | "-exclude-dir"
+ | "-color" | "-init-file"
+ | "-profile-ltac-cutoff" | "-main-channel" | "-control-channel"
+ | "-dump-glob" | "-bytecode-compiler" | "-native-compiler" as x) :: a :: tl ->
x :: a :: set_slave_opt tl
(* We need to pass some options with two arguments *)
| ( "-R" | "-Q" as x) :: a1 :: a2 :: tl ->
diff --git a/tactics/cbn.ml b/tactics/cbn.ml
new file mode 100644
index 0000000000..21e38df6db
--- /dev/null
+++ b/tactics/cbn.ml
@@ -0,0 +1,797 @@
+(************************************************************************)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2019 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
+(************************************************************************)
+
+open Util
+open Names
+open Constr
+open Context
+open Termops
+open Univ
+open Evd
+open Environ
+open EConstr
+open Vars
+open Context.Rel.Declaration
+
+(** This module implements a call by name reduction used by the cbn tactic.
+
+ It has an ability to "refold" constants by storing constants and
+ their parameters in its stack.
+*)
+
+(** Machinery to custom the behavior of the reduction *)
+module ReductionBehaviour = Reductionops.ReductionBehaviour
+
+(** Machinery about stack of unfolded constants *)
+module Cst_stack = struct
+ open EConstr
+
+(** constant * params * args
+
+- constant applied to params = term in head applied to args
+- there is at most one arguments with an empty list of args, it must be the first.
+- in args, the int represents the indice of the first arg to consider *)
+ type t = (constr * constr list * (int * constr array) list) list
+
+ let empty = []
+ let is_empty = CList.is_empty
+
+ let drop_useless = function
+ | _ :: ((_,_,[])::_ as q) -> q
+ | l -> l
+
+ let add_param h cst_l =
+ let append2cst = function
+ | (c,params,[]) -> (c, h::params, [])
+ | (c,params,((i,t)::q)) when i = pred (Array.length t) ->
+ (c, params, q)
+ | (c,params,(i,t)::q) ->
+ (c, params, (succ i,t)::q)
+ in
+ drop_useless (List.map append2cst cst_l)
+
+ let add_args cl =
+ List.map (fun (a,b,args) -> (a,b,(0,cl)::args))
+
+ let add_cst cst = function
+ | (_,_,[]) :: q as l -> l
+ | l -> (cst,[],[])::l
+
+ let best_cst = function
+ | (cst,params,[])::_ -> Some(cst,params)
+ | _ -> None
+
+ let reference sigma t = match best_cst t with
+ | Some (c, _) when isConst sigma c -> Some (fst (destConst sigma c))
+ | _ -> None
+
+ (** [best_replace d cst_l c] makes the best replacement for [d]
+ by [cst_l] in [c] *)
+ let best_replace sigma d cst_l c =
+ let reconstruct_head = List.fold_left
+ (fun t (i,args) -> mkApp (t,Array.sub args i (Array.length args - i))) in
+ List.fold_right
+ (fun (cst,params,args) t -> Termops.replace_term sigma
+ (reconstruct_head d args)
+ (applist (cst, List.rev params))
+ t) cst_l c
+
+ let pr env sigma l =
+ let open Pp in
+ let p_c c = Termops.Internal.print_constr_env env sigma c in
+ prlist_with_sep pr_semicolon
+ (fun (c,params,args) ->
+ hov 1 (str"(" ++ p_c c ++ str ")" ++ spc () ++ pr_sequence p_c params ++ spc () ++ str "(args:" ++
+ pr_sequence (fun (i,el) -> prvect_with_sep spc p_c (Array.sub el i (Array.length el - i))) args ++
+ str ")")) l
+end
+
+
+(** The type of (machine) stacks (= lambda-bar-calculus' contexts) *)
+module Stack :
+sig
+ open EConstr
+ type 'a app_node
+
+ type cst_member =
+ | Cst_const of pconstant
+ | Cst_proj of Projection.t
+
+ type 'a member =
+ | App of 'a app_node
+ | Case of case_info * 'a * 'a array * Cst_stack.t
+ | Proj of Projection.t * Cst_stack.t
+ | Fix of ('a, 'a) pfixpoint * 'a t * Cst_stack.t
+ | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red * Cst_stack.t
+ | Cst of cst_member * int * int list * 'a t * Cst_stack.t
+
+ and 'a t = 'a member list
+
+ exception IncompatibleFold2
+
+ val pr : ('a -> Pp.t) -> 'a t -> Pp.t
+ val empty : 'a t
+ val append_app : 'a array -> 'a t -> 'a t
+ val decomp : 'a t -> ('a * 'a t) option
+ val equal : ('a -> 'a -> bool) -> (('a, 'a) pfixpoint -> ('a, 'a) pfixpoint -> bool)
+ -> 'a t -> 'a t -> bool
+ val strip_app : 'a t -> 'a t * 'a t
+ val strip_n_app : int -> 'a t -> ('a t * 'a * 'a t) option
+ val will_expose_iota : 'a t -> bool
+ val list_of_app_stack : constr t -> constr list option
+ val args_size : 'a t -> int
+ val tail : int -> 'a t -> 'a t
+ val nth : 'a t -> int -> 'a
+ val best_state : evar_map -> constr * constr t -> Cst_stack.t -> constr * constr t
+ val zip : ?refold:bool -> evar_map -> constr * constr t -> constr
+ val check_native_args : CPrimitives.t -> 'a t -> bool
+ val get_next_primitive_args : CPrimitives.args_red -> 'a t -> CPrimitives.args_red * ('a t * 'a * 'a t) option
+end =
+struct
+ open EConstr
+ type 'a app_node = int * 'a array * int
+ (* first releavnt position, arguments, last relevant position *)
+
+ (*
+ Invariant that this module must ensure :
+ (behare of direct access to app_node by the rest of Reductionops)
+ - in app_node (i,_,j) i <= j
+ - There is no array realocation (outside of debug printing)
+ *)
+
+ let pr_app_node pr (i,a,j) =
+ let open Pp in surround (
+ prvect_with_sep pr_comma pr (Array.sub a i (j - i + 1))
+ )
+
+
+ type cst_member =
+ | Cst_const of pconstant
+ | Cst_proj of Projection.t
+
+ type 'a member =
+ | App of 'a app_node
+ | Case of case_info * 'a * 'a array * Cst_stack.t
+ | Proj of Projection.t * Cst_stack.t
+ | Fix of ('a, 'a) pfixpoint * 'a t * Cst_stack.t
+ | Primitive of CPrimitives.t * (Constant.t * EInstance.t) * 'a t * CPrimitives.args_red * Cst_stack.t
+ | Cst of cst_member * int * int list * 'a t * Cst_stack.t
+
+ and 'a t = 'a member list
+
+ (* Debugging printer *)
+ let rec pr_member pr_c member =
+ let open Pp in
+ let pr_c x = hov 1 (pr_c x) in
+ match member with
+ | App app -> str "ZApp" ++ pr_app_node pr_c app
+ | Case (_,_,br,cst) ->
+ str "ZCase(" ++
+ prvect_with_sep (pr_bar) pr_c br
+ ++ str ")"
+ | Proj (p,cst) ->
+ str "ZProj(" ++ Constant.debug_print (Projection.constant p) ++ str ")"
+ | Fix (f,args,cst) ->
+ str "ZFix(" ++ Constr.debug_print_fix pr_c f
+ ++ pr_comma () ++ pr pr_c args ++ str ")"
+ | Primitive (p,c,args,kargs,cst_l) ->
+ str "ZPrimitive(" ++ str (CPrimitives.to_string p)
+ ++ pr_comma () ++ pr pr_c args ++ str ")"
+ | Cst (mem,curr,remains,params,cst_l) ->
+ str "ZCst(" ++ pr_cst_member pr_c mem ++ pr_comma () ++ int curr
+ ++ pr_comma () ++
+ prlist_with_sep pr_semicolon int remains ++
+ pr_comma () ++ pr pr_c params ++ str ")"
+ and pr pr_c l =
+ let open Pp in
+ prlist_with_sep pr_semicolon (fun x -> hov 1 (pr_member pr_c x)) l
+
+ and pr_cst_member pr_c c =
+ let open Pp in
+ match c with
+ | Cst_const (c, u) ->
+ if Univ.Instance.is_empty u then Constant.debug_print c
+ else str"(" ++ Constant.debug_print c ++ str ", " ++
+ Univ.Instance.pr Univ.Level.pr u ++ str")"
+ | Cst_proj p ->
+ str".(" ++ Constant.debug_print (Projection.constant p) ++ str")"
+
+ let empty = []
+
+ let append_app v s =
+ let le = Array.length v in
+ if Int.equal le 0 then s else App (0,v,pred le) :: s
+
+ let decomp_node (i,l,j) sk =
+ if i < j then (l.(i), App (succ i,l,j) :: sk)
+ else (l.(i), sk)
+
+ let decomp = function
+ | App node::s -> Some (decomp_node node s)
+ | _ -> None
+
+ let decomp_node_last (i,l,j) sk =
+ if i < j then (l.(j), App (i,l,pred j) :: sk)
+ else (l.(j), sk)
+
+ let equal f f_fix sk1 sk2 =
+ let equal_cst_member x y =
+ match x, y with
+ | Cst_const (c1,u1), Cst_const (c2, u2) ->
+ Constant.equal c1 c2 && Univ.Instance.equal u1 u2
+ | Cst_proj p1, Cst_proj p2 -> Projection.repr_equal p1 p2
+ | _, _ -> false
+ in
+ let rec equal_rec sk1 sk2 =
+ match sk1,sk2 with
+ | [],[] -> true
+ | App a1 :: s1, App a2 :: s2 ->
+ let t1,s1' = decomp_node_last a1 s1 in
+ let t2,s2' = decomp_node_last a2 s2 in
+ (f t1 t2) && (equal_rec s1' s2')
+ | Case (_,t1,a1,_) :: s1, Case (_,t2,a2,_) :: s2 ->
+ f t1 t2 && CArray.equal (fun x y -> f x y) a1 a2 && equal_rec s1 s2
+ | (Proj (p,_)::s1, Proj(p2,_)::s2) ->
+ Projection.Repr.equal (Projection.repr p) (Projection.repr p2)
+ && equal_rec s1 s2
+ | Fix (f1,s1,_) :: s1', Fix (f2,s2,_) :: s2' ->
+ f_fix f1 f2
+ && equal_rec (List.rev s1) (List.rev s2)
+ && equal_rec s1' s2'
+ | Cst (c1,curr1,remains1,params1,_)::s1', Cst (c2,curr2,remains2,params2,_)::s2' ->
+ equal_cst_member c1 c2
+ && equal_rec (List.rev params1) (List.rev params2)
+ && equal_rec s1' s2'
+ | ((App _|Case _|Proj _|Fix _|Cst _|Primitive _)::_|[]), _ -> false
+ in equal_rec (List.rev sk1) (List.rev sk2)
+
+ exception IncompatibleFold2
+
+ let append_app_list l s =
+ let a = Array.of_list l in
+ append_app a s
+
+ let rec args_size = function
+ | App (i,_,j)::s -> j + 1 - i + args_size s
+ | (Case _|Fix _|Proj _|Cst _|Primitive _)::_ | [] -> 0
+
+ let strip_app s =
+ let rec aux out = function
+ | ( App _ as e) :: s -> aux (e :: out) s
+ | s -> List.rev out,s
+ in aux [] s
+ let strip_n_app n s =
+ let rec aux n out = function
+ | App (i,a,j) as e :: s ->
+ let nb = j - i + 1 in
+ if n >= nb then
+ aux (n - nb) (e::out) s
+ else
+ let p = i+n in
+ Some (CList.rev
+ (if Int.equal n 0 then out else App (i,a,p-1) :: out),
+ a.(p),
+ if j > p then App(succ p,a,j)::s else s)
+ | s -> None
+ in aux n [] s
+
+ let will_expose_iota args =
+ List.exists
+ (function (Fix (_,_,l) | Case (_,_,_,l) |
+ Proj (_,l) | Cst (_,_,_,_,l)) when Cst_stack.is_empty l -> true | _ -> false)
+ args
+
+ let list_of_app_stack s =
+ let rec aux = function
+ | App (i,a,j) :: s ->
+ let (args',s') = aux s in
+ let a' = Array.sub a i (j - i + 1) in
+ (Array.fold_right (fun x y -> x::y) a' args', s')
+ | s -> ([],s) in
+ let (out,s') = aux s in
+ let init = match s' with [] -> true | _ -> false in
+ Option.init init out
+
+ let tail n0 s0 =
+ let rec aux n s =
+ if Int.equal n 0 then s else
+ match s with
+ | App (i,a,j) :: s ->
+ let nb = j - i + 1 in
+ if n >= nb then
+ aux (n - nb) s
+ else
+ let p = i+n in
+ if j >= p then App(p,a,j)::s else s
+ | _ -> raise (Invalid_argument "Reductionops.Stack.tail")
+ in aux n0 s0
+
+ let nth s p =
+ match strip_n_app p s with
+ | Some (_,el,_) -> el
+ | None -> raise Not_found
+
+ (** This function breaks the abstraction of Cst_stack ! *)
+ let best_state sigma (_,sk as s) l =
+ let rec aux sk def = function
+ |(cst, params, []) -> (cst, append_app_list (List.rev params) sk)
+ |(cst, params, (i,t)::q) -> match decomp sk with
+ | Some (el,sk') when EConstr.eq_constr sigma el t.(i) ->
+ if i = pred (Array.length t)
+ then aux sk' def (cst, params, q)
+ else aux sk' def (cst, params, (succ i,t)::q)
+ | _ -> def
+ in List.fold_left (aux sk) s l
+
+ let constr_of_cst_member f sk =
+ match f with
+ | Cst_const (c, u) -> mkConstU (c, EInstance.make u), sk
+ | Cst_proj p ->
+ match decomp sk with
+ | Some (hd, sk) -> mkProj (p, hd), sk
+ | None -> assert false
+
+ let zip ?(refold=false) sigma s =
+ let rec zip = function
+ | f, [] -> f
+ | f, (App (i,a,j) :: s) ->
+ let a' = if Int.equal i 0 && Int.equal j (Array.length a - 1)
+ then a
+ else Array.sub a i (j - i + 1) in
+ zip (mkApp (f, a'), s)
+ | f, (Case (ci,rt,br,cst_l)::s) when refold ->
+ zip (best_state sigma (mkCase (ci,rt,f,br), s) cst_l)
+ | f, (Case (ci,rt,br,_)::s) -> zip (mkCase (ci,rt,f,br), s)
+ | f, (Fix (fix,st,cst_l)::s) when refold ->
+ zip (best_state sigma (mkFix fix, st @ (append_app [|f|] s)) cst_l)
+ | f, (Fix (fix,st,_)::s) -> zip
+ (mkFix fix, st @ (append_app [|f|] s))
+ | f, (Cst (cst,_,_,params,cst_l)::s) when refold ->
+ zip (best_state sigma (constr_of_cst_member cst (params @ (append_app [|f|] s))) cst_l)
+ | f, (Cst (cst,_,_,params,_)::s) ->
+ zip (constr_of_cst_member cst (params @ (append_app [|f|] s)))
+ | f, (Proj (p,cst_l)::s) when refold ->
+ zip (best_state sigma (mkProj (p,f),s) cst_l)
+ | f, (Proj (p,_)::s) -> zip (mkProj (p,f),s)
+ | f, (Primitive (p,c,args,kargs,cst_l)::s) ->
+ zip (mkConstU c, args @ append_app [|f|] s)
+ in
+ zip s
+
+ (* Check if there is enough arguments on [stk] w.r.t. arity of [op] *)
+ let check_native_args op stk =
+ let nargs = CPrimitives.arity op in
+ let rargs = args_size stk in
+ nargs <= rargs
+
+ let get_next_primitive_args kargs stk =
+ let rec nargs = function
+ | [] -> 0
+ | CPrimitives.Kwhnf :: _ -> 0
+ | _ :: s -> 1 + nargs s
+ in
+ let n = nargs kargs in
+ (List.skipn (n+1) kargs, strip_n_app n stk)
+
+end
+
+(** The type of (machine) states (= lambda-bar-calculus' cuts) *)
+
+(*************************************)
+(*** Reduction Functions Operators ***)
+(*************************************)
+
+let safe_meta_value sigma ev =
+ try Some (Evd.meta_value sigma ev)
+ with Not_found -> None
+
+(*************************************)
+(*** Reduction using bindingss ***)
+(*************************************)
+
+(* Beta Reduction tools *)
+
+let apply_subst recfun env sigma refold cst_l t stack =
+ let rec aux env cst_l t stack =
+ match (Stack.decomp stack, EConstr.kind sigma t) with
+ | Some (h,stacktl), Lambda (_,_,c) ->
+ let cst_l' = if refold then Cst_stack.add_param h cst_l else cst_l in
+ aux (h::env) cst_l' c stacktl
+ | _ -> recfun sigma cst_l (substl env t, stack)
+ in aux env cst_l t stack
+
+(* Iota reduction tools *)
+
+(** @return c if there is a constant c whose body is bd
+ @return bd else.
+
+ It has only a meaning because internal representation of "Fixpoint f x
+ := t" is Definition f := fix f x => t
+
+ Even more fragile that we could hope because do Module M. Fixpoint
+ f x := t. End M. Definition f := u. and say goodbye to any hope
+ of refolding M.f this way ...
+*)
+let magically_constant_of_fixbody env sigma reference bd = function
+ | Name.Anonymous -> bd
+ | Name.Name id ->
+ let open UnivProblem in
+ let (cst_mod,_) = Constant.repr2 reference in
+ let cst = Constant.make2 cst_mod (Label.of_id id) in
+ if not (Environ.mem_constant cst env) then bd
+ else
+ let (cst, u), ctx = UnivGen.fresh_constant_instance env cst in
+ match constant_opt_value_in env (cst,u) with
+ | None -> bd
+ | Some t ->
+ let csts = EConstr.eq_constr_universes env sigma (EConstr.of_constr t) bd in
+ begin match csts with
+ | Some csts ->
+ let subst = Set.fold (fun cst acc ->
+ let l, r = match cst with
+ | ULub (u, v) | UWeak (u, v) -> u, v
+ | UEq (u, v) | ULe (u, v) ->
+ let get u = Option.get (Universe.level u) in
+ get u, get v
+ in
+ Univ.LMap.add l r acc)
+ csts Univ.LMap.empty
+ in
+ let inst = Instance.subst_fn (fun u -> Univ.LMap.find u subst) u in
+ mkConstU (cst, EInstance.make inst)
+ | None -> bd
+ end
+
+let contract_cofix ?env sigma ?reference (bodynum,(names,types,bodies as typedbodies)) =
+ let nbodies = Array.length bodies in
+ let make_Fi j =
+ let ind = nbodies-j-1 in
+ if Int.equal bodynum ind then mkCoFix (ind,typedbodies)
+ else
+ let bd = mkCoFix (ind,typedbodies) in
+ match env with
+ | None -> bd
+ | Some e ->
+ match reference with
+ | None -> bd
+ | Some r -> magically_constant_of_fixbody e sigma r bd names.(ind).binder_name in
+ let closure = List.init nbodies make_Fi in
+ substl closure bodies.(bodynum)
+
+(** Similar to the "fix" case below *)
+let reduce_and_refold_cofix recfun env sigma refold cst_l cofix sk =
+ let raw_answer =
+ let env = if refold then Some env else None in
+ contract_cofix ?env sigma ?reference:(Cst_stack.reference sigma cst_l) cofix in
+ apply_subst
+ (fun sigma x (t,sk') ->
+ let t' =
+ if refold then Cst_stack.best_replace sigma (mkCoFix cofix) cst_l t else t in
+ recfun x (t',sk'))
+ [] sigma refold Cst_stack.empty raw_answer sk
+
+(* contracts fix==FIX[nl;i](A1...Ak;[F1...Fk]{B1....Bk}) to produce
+ Bi[Fj --> FIX[nl;j](A1...Ak;[F1...Fk]{B1...Bk})] *)
+
+let contract_fix ?env sigma ?reference ((recindices,bodynum),(names,types,bodies as typedbodies)) =
+ let nbodies = Array.length recindices in
+ let make_Fi j =
+ let ind = nbodies-j-1 in
+ if Int.equal bodynum ind then mkFix ((recindices,ind),typedbodies)
+ else
+ let bd = mkFix ((recindices,ind),typedbodies) in
+ match env with
+ | None -> bd
+ | Some e ->
+ match reference with
+ | None -> bd
+ | Some r -> magically_constant_of_fixbody e sigma r bd names.(ind).binder_name in
+ let closure = List.init nbodies make_Fi in
+ substl closure bodies.(bodynum)
+
+(** First we substitute the Rel bodynum by the fixpoint and then we try to
+ replace the fixpoint by the best constant from [cst_l]
+ Other rels are directly substituted by constants "magically found from the
+ context" in contract_fix *)
+let reduce_and_refold_fix recfun env sigma refold cst_l fix sk =
+ let raw_answer =
+ let env = if refold then Some env else None in
+ contract_fix ?env sigma ?reference:(Cst_stack.reference sigma cst_l) fix in
+ apply_subst
+ (fun sigma x (t,sk') ->
+ let t' =
+ if refold then
+ Cst_stack.best_replace sigma (mkFix fix) cst_l t
+ else t
+ in recfun x (t',sk'))
+ [] sigma refold Cst_stack.empty raw_answer sk
+
+module CredNative = Reductionops.CredNative
+
+(** Generic reduction function with environment
+
+ Here is where unfolded constant are stored in order to be
+ eventually refolded.
+
+ If tactic_mode is true, it uses ReductionBehaviour, prefers
+ refold constant instead of value and tries to infer constants
+ fix and cofix came from.
+
+ It substitutes fix and cofix by the constant they come from in
+ contract_* in any case .
+*)
+
+let debug_RAKAM = Reductionops.debug_RAKAM
+
+let equal_stacks sigma (x, l) (y, l') =
+ let f_equal x y = eq_constr sigma x y in
+ let eq_fix a b = f_equal (mkFix a) (mkFix b) in
+ Stack.equal f_equal eq_fix l l' && f_equal x y
+
+let rec whd_state_gen ?csts ~refold ~tactic_mode flags env sigma =
+ let open Context.Named.Declaration in
+ let open ReductionBehaviour in
+ let rec whrec cst_l (x, stack) =
+ let () = if debug_RAKAM () then
+ let open Pp in
+ let pr c = Termops.Internal.print_constr_env env sigma c in
+ Feedback.msg_debug
+ (h 0 (str "<<" ++ pr x ++
+ str "|" ++ cut () ++ Cst_stack.pr env sigma cst_l ++
+ str "|" ++ cut () ++ Stack.pr pr stack ++
+ str ">>"))
+ in
+ let c0 = EConstr.kind sigma x in
+ let fold () =
+ let () = if debug_RAKAM () then
+ let open Pp in Feedback.msg_debug (str "<><><><><>") in
+ ((EConstr.of_kind c0, stack),cst_l)
+ in
+ match c0 with
+ | Rel n when CClosure.RedFlags.red_set flags CClosure.RedFlags.fDELTA ->
+ (match lookup_rel n env with
+ | LocalDef (_,body,_) -> whrec Cst_stack.empty (lift n body, stack)
+ | _ -> fold ())
+ | Var id when CClosure.RedFlags.red_set flags (CClosure.RedFlags.fVAR id) ->
+ (match lookup_named id env with
+ | LocalDef (_,body,_) ->
+ whrec (if refold then Cst_stack.add_cst (mkVar id) cst_l else cst_l) (body, stack)
+ | _ -> fold ())
+ | Evar ev -> fold ()
+ | Meta ev ->
+ (match safe_meta_value sigma ev with
+ | Some body -> whrec cst_l (body, stack)
+ | None -> fold ())
+ | Const (c,u as const) ->
+ Reductionops.reduction_effect_hook env sigma c
+ (lazy (EConstr.to_constr sigma (Stack.zip sigma (x,stack))));
+ if CClosure.RedFlags.red_set flags (CClosure.RedFlags.fCONST c) then
+ let u' = EInstance.kind sigma u in
+ match constant_value_in env (c, u') with
+ | body ->
+ begin
+ let body = EConstr.of_constr body in
+ if not tactic_mode
+ then whrec (if refold then Cst_stack.add_cst (mkConstU const) cst_l else cst_l)
+ (body, stack)
+ else (* Looks for ReductionBehaviour *)
+ match ReductionBehaviour.get (GlobRef.ConstRef c) with
+ | None -> whrec (Cst_stack.add_cst (mkConstU const) cst_l) (body, stack)
+ | Some behavior ->
+ begin match behavior with
+ | NeverUnfold -> fold ()
+ | (UnfoldWhen { nargs = Some n } |
+ UnfoldWhenNoMatch { nargs = Some n } )
+ when Stack.args_size stack < n ->
+ fold ()
+ | UnfoldWhenNoMatch { recargs } -> (* maybe unfolds *)
+ let app_sk,sk = Stack.strip_app stack in
+ let (tm',sk'),cst_l' =
+ whrec (Cst_stack.add_cst (mkConstU const) cst_l) (body, app_sk)
+ in
+ let rec is_case x = match EConstr.kind sigma x with
+ | Lambda (_,_, x) | LetIn (_,_,_, x) | Cast (x, _,_) -> is_case x
+ | App (hd, _) -> is_case hd
+ | Case _ -> true
+ | _ -> false in
+ if equal_stacks sigma (x, app_sk) (tm', sk')
+ || Stack.will_expose_iota sk'
+ || is_case tm'
+ then fold ()
+ else whrec cst_l' (tm', sk' @ sk)
+ | UnfoldWhen { recargs } -> (* maybe unfolds *)
+ begin match recargs with
+ |[] -> (* if nargs has been specified *)
+ (* CAUTION : the constant is NEVER refold
+ (even when it hides a (co)fix) *)
+ whrec cst_l (body, stack)
+ |curr::remains -> match Stack.strip_n_app curr stack with
+ | None -> fold ()
+ | Some (bef,arg,s') ->
+ whrec Cst_stack.empty
+ (arg,Stack.Cst(Stack.Cst_const (fst const, u'),curr,remains,bef,cst_l)::s')
+ end
+ end
+ end
+ | exception NotEvaluableConst (IsPrimitive p) when Stack.check_native_args p stack ->
+ let kargs = CPrimitives.kind p in
+ let (kargs,o) = Stack.get_next_primitive_args kargs stack in
+ (* Should not fail thanks to [check_native_args] *)
+ let (before,a,after) = Option.get o in
+ whrec Cst_stack.empty (a,Stack.Primitive(p,const,before,kargs,cst_l)::after)
+ | exception NotEvaluableConst _ -> fold ()
+ else fold ()
+ | Proj (p, c) when CClosure.RedFlags.red_projection flags p ->
+ (let npars = Projection.npars p in
+ if not tactic_mode then
+ let stack' = (c, Stack.Proj (p, Cst_stack.empty (*cst_l*)) :: stack) in
+ whrec Cst_stack.empty stack'
+ else match ReductionBehaviour.get (GlobRef.ConstRef (Projection.constant p)) with
+ | None ->
+ let stack' = (c, Stack.Proj (p, cst_l) :: stack) in
+ let stack'', csts = whrec Cst_stack.empty stack' in
+ if equal_stacks sigma stack' stack'' then fold ()
+ else stack'', csts
+ | Some behavior ->
+ begin match behavior with
+ | NeverUnfold -> fold ()
+ | (UnfoldWhen { nargs = Some n }
+ | UnfoldWhenNoMatch { nargs = Some n })
+ when Stack.args_size stack < n - (npars + 1) -> fold ()
+ | UnfoldWhen { recargs }
+ | UnfoldWhenNoMatch { recargs }-> (* maybe unfolds *)
+ let recargs = List.map_filter (fun x ->
+ let idx = x - npars in
+ if idx < 0 then None else Some idx) recargs
+ in
+ match recargs with
+ |[] -> (* if nargs has been specified *)
+ (* CAUTION : the constant is NEVER refold
+ (even when it hides a (co)fix) *)
+ let stack' = (c, Stack.Proj (p, cst_l) :: stack) in
+ whrec Cst_stack.empty(* cst_l *) stack'
+ | curr::remains ->
+ if curr == 0 then (* Try to reduce the record argument *)
+ whrec Cst_stack.empty
+ (c, Stack.Cst(Stack.Cst_proj p,curr,remains,Stack.empty,cst_l)::stack)
+ else
+ match Stack.strip_n_app curr stack with
+ | None -> fold ()
+ | Some (bef,arg,s') ->
+ whrec Cst_stack.empty
+ (arg,Stack.Cst(Stack.Cst_proj p,curr,remains,
+ Stack.append_app [|c|] bef,cst_l)::s')
+ end)
+
+ | LetIn (_,b,_,c) when CClosure.RedFlags.red_set flags CClosure.RedFlags.fZETA ->
+ apply_subst (fun _ -> whrec) [b] sigma refold cst_l c stack
+ | Cast (c,_,_) -> whrec cst_l (c, stack)
+ | App (f,cl) ->
+ whrec
+ (if refold then Cst_stack.add_args cl cst_l else cst_l)
+ (f, Stack.append_app cl stack)
+ | Lambda (na,t,c) ->
+ (match Stack.decomp stack with
+ | Some _ when CClosure.RedFlags.red_set flags CClosure.RedFlags.fBETA ->
+ apply_subst (fun _ -> whrec) [] sigma refold cst_l x stack
+ | None when CClosure.RedFlags.red_set flags CClosure.RedFlags.fETA ->
+ let env' = push_rel (LocalAssum (na, t)) env in
+ let whrec' = whd_state_gen ~refold ~tactic_mode flags env' sigma in
+ (match EConstr.kind sigma (Stack.zip ~refold sigma (fst (whrec' (c, Stack.empty)))) with
+ | App (f,cl) ->
+ let napp = Array.length cl in
+ if napp > 0 then
+ let (x', l'),_ = whrec' (Array.last cl, Stack.empty) in
+ match EConstr.kind sigma x', l' with
+ | Rel 1, [] ->
+ let lc = Array.sub cl 0 (napp-1) in
+ let u = if Int.equal napp 1 then f else mkApp (f,lc) in
+ if noccurn sigma 1 u then (pop u,Stack.empty),Cst_stack.empty else fold ()
+ | _ -> fold ()
+ else fold ()
+ | _ -> fold ())
+ | _ -> fold ())
+
+ | Case (ci,p,d,lf) ->
+ whrec Cst_stack.empty (d, Stack.Case (ci,p,lf,cst_l) :: stack)
+
+ | Fix ((ri,n),_ as f) ->
+ (match Stack.strip_n_app ri.(n) stack with
+ |None -> fold ()
+ |Some (bef,arg,s') ->
+ whrec Cst_stack.empty (arg, Stack.Fix(f,bef,cst_l)::s'))
+
+ | Construct ((ind,c),u) ->
+ let use_match = CClosure.RedFlags.red_set flags CClosure.RedFlags.fMATCH in
+ let use_fix = CClosure.RedFlags.red_set flags CClosure.RedFlags.fFIX in
+ if use_match || use_fix then
+ match Stack.strip_app stack with
+ |args, (Stack.Case(ci, _, lf,_)::s') when use_match ->
+ whrec Cst_stack.empty (lf.(c-1), (Stack.tail ci.ci_npar args) @ s')
+ |args, (Stack.Proj (p,_)::s') when use_match ->
+ whrec Cst_stack.empty (Stack.nth args (Projection.npars p + Projection.arg p), s')
+ |args, (Stack.Fix (f,s',cst_l)::s'') when use_fix ->
+ let x' = Stack.zip sigma (x, args) in
+ let out_sk = s' @ (Stack.append_app [|x'|] s'') in
+ reduce_and_refold_fix whrec env sigma refold cst_l f out_sk
+ |args, (Stack.Cst (const,curr,remains,s',cst_l) :: s'') ->
+ let x' = Stack.zip sigma (x, args) in
+ begin match remains with
+ | [] ->
+ (match const with
+ | Stack.Cst_const const ->
+ (match constant_opt_value_in env const with
+ | None -> fold ()
+ | Some body ->
+ let const = (fst const, EInstance.make (snd const)) in
+ let body = EConstr.of_constr body in
+ whrec (if refold then Cst_stack.add_cst (mkConstU const) cst_l else cst_l)
+ (body, s' @ (Stack.append_app [|x'|] s'')))
+ | Stack.Cst_proj p ->
+ let stack = s' @ (Stack.append_app [|x'|] s'') in
+ match Stack.strip_n_app 0 stack with
+ | None -> assert false
+ | Some (_,arg,s'') ->
+ whrec Cst_stack.empty (arg, Stack.Proj (p,cst_l) :: s''))
+ | next :: remains' -> match Stack.strip_n_app (next-curr-1) s'' with
+ | None -> fold ()
+ | Some (bef,arg,s''') ->
+ whrec Cst_stack.empty
+ (arg,
+ Stack.Cst (const,next,remains',s' @ (Stack.append_app [|x'|] bef),cst_l) :: s''')
+ end
+ |_, (Stack.App _)::_ -> assert false
+ |_, _ -> fold ()
+ else fold ()
+
+ | CoFix cofix ->
+ if CClosure.RedFlags.red_set flags CClosure.RedFlags.fCOFIX then
+ match Stack.strip_app stack with
+ |args, ((Stack.Case _ |Stack.Proj _)::s') ->
+ reduce_and_refold_cofix whrec env sigma refold cst_l cofix stack
+ |_ -> fold ()
+ else fold ()
+
+ | Int _ | Float _ ->
+ begin match Stack.strip_app stack with
+ | (_, Stack.Primitive(p,kn,rargs,kargs,cst_l')::s) ->
+ let more_to_reduce = List.exists (fun k -> CPrimitives.Kwhnf = k) kargs in
+ if more_to_reduce then
+ let (kargs,o) = Stack.get_next_primitive_args kargs s in
+ (* Should not fail because Primitive is put on the stack only if fully applied *)
+ let (before,a,after) = Option.get o in
+ whrec Cst_stack.empty (a,Stack.Primitive(p,kn,rargs @ Stack.append_app [|x|] before,kargs,cst_l')::after)
+ else
+ let n = List.length kargs in
+ let (args,s) = Stack.strip_app s in
+ let (args,extra_args) =
+ try List.chop n args
+ with List.IndexOutOfRange -> (args,[]) (* FIXME probably useless *)
+ in
+ let args = Array.of_list (Option.get (Stack.list_of_app_stack (rargs @ Stack.append_app [|x|] args))) in
+ begin match CredNative.red_prim env sigma p args with
+ | Some t -> whrec cst_l' (t,s)
+ | None -> ((mkApp (mkConstU kn, args), s), cst_l)
+ end
+ | _ -> fold ()
+ end
+
+ | Rel _ | Var _ | LetIn _ | Proj _ -> fold ()
+ | Sort _ | Ind _ | Prod _ -> fold ()
+ in
+ fun xs ->
+ let (s,cst_l as res) = whrec (Option.default Cst_stack.empty csts) xs in
+ if tactic_mode then (Stack.best_state sigma s cst_l,Cst_stack.empty) else res
+
+let whd_cbn flags env sigma t =
+ let (state,_) =
+ (whd_state_gen ~refold:true ~tactic_mode:true flags env sigma (t, Stack.empty))
+ in
+ Stack.zip ~refold:true sigma state
diff --git a/tactics/cbn.mli b/tactics/cbn.mli
new file mode 100644
index 0000000000..af54771382
--- /dev/null
+++ b/tactics/cbn.mli
@@ -0,0 +1,13 @@
+(************************************************************************)
+(* * The Coq Proof Assistant / The Coq Development Team *)
+(* v * INRIA, CNRS and contributors - Copyright 1999-2019 *)
+(* <O___,, * (see CREDITS file for the list of authors) *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(* * (see LICENSE file for the text of the license) *)
+(************************************************************************)
+
+val whd_cbn :
+ CClosure.RedFlags.reds ->
+ Environ.env -> Evd.evar_map -> EConstr.constr -> EConstr.constr
diff --git a/tactics/eauto.ml b/tactics/eauto.ml
index 710e0a6808..c2eabffd44 100644
--- a/tactics/eauto.ml
+++ b/tactics/eauto.ml
@@ -59,57 +59,12 @@ let registered_e_assumption =
(* PROLOG tactic *)
(************************************************************************)
-(*s Tactics handling a list of goals. *)
-
-(* first_goal : goal list sigma -> goal sigma *)
-
-let first_goal gls =
- let gl = gls.Evd.it and sig_0 = gls.Evd.sigma in
- if List.is_empty gl then user_err Pp.(str "first_goal");
- { Evd.it = List.hd gl; Evd.sigma = sig_0; }
-
-(* tactic -> tactic_list : Apply a tactic to the first goal in the list *)
-
-let apply_tac_list tac glls =
- match glls.it with
- | (g1::rest) ->
- let pack = tac (re_sig g1 glls.sigma) in
- re_sig (pack.it @ rest) pack.sigma
- | _ -> user_err Pp.(str "apply_tac_list")
-
-let one_step l gl =
- [Proofview.V82.of_tactic Tactics.intro]
- @ (List.map (fun c -> Proofview.V82.of_tactic (Tactics.Simple.eapply c)) (List.map mkVar (pf_ids_of_hyps gl)))
- @ (List.map (fun c -> Proofview.V82.of_tactic (Tactics.Simple.eapply c)) l)
- @ (List.map (fun c -> Proofview.V82.of_tactic (assumption c)) (pf_ids_of_hyps gl))
-
-let rec prolog l n gl =
- if n <= 0 then user_err Pp.(str "prolog - failure");
- let prol = (prolog l (n-1)) in
- (tclFIRST (List.map (fun t -> (tclTHEN t prol)) (one_step l gl))) gl
-
-let prolog_tac l n =
- Proofview.V82.tactic begin fun gl ->
- let map c =
- let (sigma, c) = c (pf_env gl) (project gl) in
- (* Dropping the universe context is probably wrong *)
- let (c, _) = pf_apply (prepare_hint false) gl (sigma, c) in
- c
- in
- let l = List.map map l in
- try (prolog l n gl)
- with UserError (Some "Refiner.tclFIRST",_) ->
- user_err ~hdr:"Prolog.prolog" (str "Prolog failed.")
- end
-
open Auto
(***************************************************************************)
(* A tactic similar to Auto, but using EApply, Assumption and e_give_exact *)
(***************************************************************************)
-let priority l = List.map snd (List.filter (fun (pr,_) -> Int.equal pr 0) l)
-
let unify_e_resolve poly flags (c,clenv) =
Proofview.Goal.enter begin fun gl ->
let clenv', c = connect_hint_clenv ~poly c clenv gl in
@@ -119,7 +74,9 @@ let unify_e_resolve poly flags (c,clenv) =
(Tactics.Simple.eapply c)
end
-let hintmap_of sigma secvars hdc concl =
+let hintmap_of sigma secvars concl =
+ (* Warning: for computation sharing, we need to return a closure *)
+ let hdc = try Some (decompose_app_bound sigma concl) with Bound -> None in
match hdc with
| None -> fun db -> Hint_db.map_none ~secvars db
| Some hdc ->
@@ -150,13 +107,13 @@ let rec e_trivial_fail_db db_list local_db =
let tacl =
registered_e_assumption ::
(Tacticals.New.tclTHEN Tactics.intro next) ::
- (List.map fst (e_trivial_resolve (Tacmach.New.pf_env gl) (Tacmach.New.project gl) db_list local_db secvars (Tacmach.New.pf_concl gl)))
+ (e_trivial_resolve (Tacmach.New.pf_env gl) (Tacmach.New.project gl) db_list local_db secvars (Tacmach.New.pf_concl gl))
in
Tacticals.New.tclSOLVE tacl
end
-and e_my_find_search env sigma db_list local_db secvars hdc concl =
- let hint_of_db = hintmap_of sigma secvars hdc concl in
+and e_my_find_search env sigma db_list local_db secvars concl =
+ let hint_of_db = hintmap_of sigma secvars concl in
let hintl =
List.map_append (fun db ->
let flags = auto_flags_of_state (Hint_db.transparent_state db) in
@@ -168,35 +125,40 @@ and e_my_find_search env sigma db_list local_db secvars hdc concl =
| Unfold_nth _ -> 1
| _ -> b
in
- (b,
- let tac = function
- | Res_pf (term,cl) -> unify_resolve ~poly st (term,cl)
- | ERes_pf (term,cl) -> unify_e_resolve poly st (term,cl)
- | Give_exact (c,cl) -> e_exact poly st (c,cl)
- | Res_pf_THEN_trivial_fail (term,cl) ->
- Tacticals.New.tclTHEN (unify_e_resolve poly st (term,cl))
- (e_trivial_fail_db db_list local_db)
- | Unfold_nth c -> reduce (Unfold [AllOccurrences,c]) onConcl
- | Extern tacast -> conclPattern concl p tacast
- in
- let tac = run_hint t tac in
- (tac, lazy (pr_hint env sigma t)))
+ let tac = function
+ | Res_pf (term,cl) -> unify_resolve ~poly st (term,cl)
+ | ERes_pf (term,cl) -> unify_e_resolve poly st (term,cl)
+ | Give_exact (c,cl) -> e_exact poly st (c,cl)
+ | Res_pf_THEN_trivial_fail (term,cl) ->
+ Tacticals.New.tclTHEN (unify_e_resolve poly st (term,cl))
+ (e_trivial_fail_db db_list local_db)
+ | Unfold_nth c -> reduce (Unfold [AllOccurrences,c]) onConcl
+ | Extern tacast -> conclPattern concl p tacast
+ in
+ let tac = run_hint t tac in
+ (tac, b, lazy (pr_hint env sigma t))
in
List.map tac_of_hint hintl
and e_trivial_resolve env sigma db_list local_db secvars gl =
- let hd = try Some (decompose_app_bound sigma gl) with Bound -> None in
- try priority (e_my_find_search env sigma db_list local_db secvars hd gl)
+ let filter (tac, pr, _) = if Int.equal pr 0 then Some tac else None in
+ try List.map_filter filter (e_my_find_search env sigma db_list local_db secvars gl)
with Not_found -> []
let e_possible_resolve env sigma db_list local_db secvars gl =
- let hd = try Some (decompose_app_bound sigma gl) with Bound -> None in
- try List.map (fun (b, (tac, pp)) -> (tac, b, pp))
- (e_my_find_search env sigma db_list local_db secvars hd gl)
+ try e_my_find_search env sigma db_list local_db secvars gl
with Not_found -> []
+(*s Tactics handling a list of goals. *)
+
+(* first_goal : goal list sigma -> goal sigma *)
+
let find_first_goal gls =
- try first_goal gls with UserError _ -> assert false
+ let gl = gls.Evd.it and sig_0 = gls.Evd.sigma in
+ match gl with
+ | [] -> assert false
+ | (gl, db) :: _ ->
+ { Evd.it = gl; Evd.sigma = sig_0; }, db
(*s The following module [SearchProblem] is used to instantiate the generic
exploration functor [Explore.Make]. *)
@@ -204,10 +166,9 @@ let find_first_goal gls =
type search_state = {
priority : int;
depth : int; (*r depth of search before failing *)
- tacres : Goal.goal list sigma;
+ tacres : (Goal.goal * hint_db) list sigma;
last_tactic : Pp.t Lazy.t;
dblist : hint_db list;
- localdb : hint_db list;
prev : prev_search_state;
local_lemmas : delayed_open_constr list;
}
@@ -225,7 +186,16 @@ module SearchProblem = struct
(* let pr_ev evs ev = Printer.pr_constr_env (Evd.evar_env ev) (Evarutil.nf_evar evs ev.Evd.evar_concl) *)
- let filter_tactics glls l =
+(* tactic -> tactic_list : Apply a tactic to the first goal in the list *)
+
+ let apply_tac_list tac mkdb glls =
+ match glls.it with
+ | ((g1, db) :: rest) ->
+ let pack = tac (re_sig g1 glls.sigma) in
+ List.map (fun gl -> gl, mkdb db (re_sig gl pack.sigma)) pack.it, re_sig rest pack.sigma
+ | _ -> user_err Pp.(str "apply_tac_list")
+
+ let filter_tactics mkdb glls l =
(* let _ = Proof_trees.db_pr_goal (List.hd (sig_it glls)) in *)
(* let evars = Evarutil.nf_evars (Refiner.project glls) in *)
(* msg (str"Goal:" ++ pr_ev evars (List.hd (sig_it glls)) ++ str"\n"); *)
@@ -233,10 +203,10 @@ module SearchProblem = struct
| [] -> []
| (tac, cost, pptac) :: tacl ->
try
- let lgls = apply_tac_list (Proofview.V82.of_tactic tac) glls in
+ let ngls, lgls = apply_tac_list (Proofview.V82.of_tactic tac) mkdb glls in
(* let gl = Proof_trees.db_pr_goal (List.hd (sig_it glls)) in *)
(* msg (hov 1 (pptac ++ str" gives: \n" ++ pr_goals lgls ++ str"\n")); *)
- (lgls, cost, pptac) :: aux tacl
+ (ngls, lgls, cost, pptac) :: aux tacl
with e when CErrors.noncritical e ->
let e = Exninfo.capture e in
Refiner.catch_failerror e; aux tacl
@@ -258,63 +228,54 @@ module SearchProblem = struct
else
let ps = if s.prev == Unknown then Unknown else State s in
let lg = s.tacres in
- let nbgl = List.length (sig_it lg) in
- assert (nbgl > 0);
- let g = find_first_goal lg in
+ let g, db = find_first_goal lg in
let hyps = pf_ids_of_hyps g in
let secvars = secvars_of_hyps (pf_hyps g) in
let map_assum id = (e_give_exact (mkVar id), (-1), lazy (str "exact" ++ spc () ++ Id.print id)) in
let assumption_tacs =
let tacs = List.map map_assum hyps in
- let l = filter_tactics s.tacres tacs in
- List.map (fun (res, cost, pp) -> { depth = s.depth; priority = cost; tacres = res;
+ let mkdb db gl = assert false in (* no goal can be generated *)
+ let l = filter_tactics mkdb s.tacres tacs in
+ List.map (fun (ngl, res, cost, pp) ->
+ let () = assert (List.is_empty ngl) in
+ { depth = s.depth; priority = cost; tacres = res;
last_tactic = pp; dblist = s.dblist;
- localdb = List.tl s.localdb;
prev = ps; local_lemmas = s.local_lemmas}) l
in
let intro_tac =
- let l = filter_tactics s.tacres [Tactics.intro, (-1), lazy (str "intro")] in
+ let mkdb db gl =
+ let hintl = make_resolve_hyp (pf_env gl) (project gl) (pf_last_hyp gl) in
+ Hint_db.add_list (pf_env gl) (project gl) hintl db
+ in
+ let l = filter_tactics mkdb s.tacres [Tactics.intro, (-1), lazy (str "intro")] in
List.map
- (fun (lgls, cost, pp) ->
- let g' = first_goal lgls in
- let hintl =
- make_resolve_hyp (pf_env g') (project g') (pf_last_hyp g')
- in
- let ldb = Hint_db.add_list (pf_env g') (project g')
- hintl (List.hd s.localdb) in
+ (fun (ngls, lgls, cost, pp) ->
+ let lgls = re_sig (ngls @ lgls.it) lgls.sigma in
{ depth = s.depth; priority = cost; tacres = lgls;
last_tactic = pp; dblist = s.dblist;
- localdb = ldb :: List.tl s.localdb; prev = ps;
+ prev = ps;
local_lemmas = s.local_lemmas})
l
in
let rec_tacs =
+ let hyps = pf_hyps g in
+ let mkdb db gls =
+ let hyps' = pf_hyps gls in
+ if hyps' == hyps then db
+ else make_local_hint_db (pf_env gls) (project gls) ~ts:TransparentState.full true s.local_lemmas
+ in
let l =
let concl = Reductionops.nf_evar (project g) (pf_concl g) in
- filter_tactics s.tacres
- (e_possible_resolve (pf_env g) (project g) s.dblist (List.hd s.localdb) secvars concl)
+ filter_tactics mkdb s.tacres
+ (e_possible_resolve (pf_env g) (project g) s.dblist db secvars concl)
in
List.map
- (fun (lgls, cost, pp) ->
- let nbgl' = List.length (sig_it lgls) in
- if nbgl' < nbgl then
- { depth = s.depth; priority = cost; tacres = lgls; last_tactic = pp;
- prev = ps; dblist = s.dblist; localdb = List.tl s.localdb;
- local_lemmas = s.local_lemmas }
- else
- let newlocal =
- let hyps = pf_hyps g in
- List.map (fun gl ->
- let gls = {Evd.it = gl; sigma = lgls.Evd.sigma } in
- let hyps' = pf_hyps gls in
- if hyps' == hyps then List.hd s.localdb
- else make_local_hint_db (pf_env gls) (project gls) ~ts:TransparentState.full true s.local_lemmas)
- (List.firstn ((nbgl'-nbgl) + 1) (sig_it lgls))
- in
- { depth = pred s.depth; priority = cost; tacres = lgls;
- dblist = s.dblist; last_tactic = pp; prev = ps;
- localdb = newlocal @ List.tl s.localdb;
- local_lemmas = s.local_lemmas })
+ (fun (ngls, lgls, cost, pp) ->
+ let lgls = re_sig (ngls @ lgls.it) lgls.sigma in
+ let depth = if List.is_empty ngls then s.depth else pred s.depth in
+ { depth; priority = cost; tacres = lgls; last_tactic = pp;
+ prev = ps; dblist = s.dblist;
+ local_lemmas = s.local_lemmas })
l
in
List.sort compare (assumption_tacs @ intro_tac @ rec_tacs)
@@ -378,15 +339,15 @@ let pr_info dbg s =
let make_initial_state dbg n gl dblist localdb lems =
{ depth = n;
priority = 0;
- tacres = tclIDTAC gl;
+ tacres = re_sig [gl.it, localdb] gl.sigma;
last_tactic = lazy (mt());
dblist = dblist;
- localdb = [localdb];
prev = if dbg == Info then Init else Unknown;
local_lemmas = lems;
}
-let e_search_auto debug (in_depth,p) lems db_list gl =
+let e_search_auto debug (in_depth,p) lems db_list =
+ Proofview.V82.tactic ~nf_evars:false begin fun gl ->
let local_db = make_local_hint_db (pf_env gl) (project gl) ~ts:TransparentState.full true lems in
let d = mk_eauto_dbg debug in
let tac = match in_depth,d with
@@ -399,28 +360,29 @@ let e_search_auto debug (in_depth,p) lems db_list gl =
pr_dbg_header d;
let s = tac (make_initial_state d p gl db_list local_db lems) in
pr_info d s;
- s.tacres
+ re_sig (List.map fst s.tacres.it) s.tacres.sigma
with Not_found ->
pr_info_nop d;
- user_err Pp.(str "eauto: search failed")
+ tclIDTAC gl
+ end
(* let e_search_auto_key = CProfile.declare_profile "e_search_auto" *)
(* let e_search_auto = CProfile.profile5 e_search_auto_key e_search_auto *)
let eauto_with_bases ?(debug=Off) np lems db_list =
- Hints.wrap_hint_warning (Proofview.V82.tactic (tclTRY (e_search_auto debug np lems db_list)))
+ Hints.wrap_hint_warning (e_search_auto debug np lems db_list)
let eauto ?(debug=Off) np lems dbnames =
let db_list = make_db_list dbnames in
- tclTRY (e_search_auto debug np lems db_list)
+ e_search_auto debug np lems db_list
-let full_eauto ?(debug=Off) n lems gl =
+let full_eauto ?(debug=Off) n lems =
let db_list = current_pure_db () in
- tclTRY (e_search_auto debug n lems db_list) gl
+ e_search_auto debug n lems db_list
let gen_eauto ?(debug=Off) np lems = function
- | None -> Hints.wrap_hint_warning (Proofview.V82.tactic (full_eauto ~debug np lems))
- | Some l -> Hints.wrap_hint_warning (Proofview.V82.tactic (eauto ~debug np lems l))
+ | None -> Hints.wrap_hint_warning (full_eauto ~debug np lems)
+ | Some l -> Hints.wrap_hint_warning (eauto ~debug np lems l)
let make_depth = function
| None -> !default_search_depth
diff --git a/tactics/eauto.mli b/tactics/eauto.mli
index e6f2c1a8e2..5fb038a767 100644
--- a/tactics/eauto.mli
+++ b/tactics/eauto.mli
@@ -18,8 +18,6 @@ val registered_e_assumption : unit Proofview.tactic
val e_give_exact : ?flags:Unification.unify_flags -> constr -> unit Proofview.tactic
-val prolog_tac : delayed_open_constr list -> int -> unit Proofview.tactic
-
val gen_eauto : ?debug:debug -> bool * int -> delayed_open_constr list ->
hint_db_name list option -> unit Proofview.tactic
diff --git a/tactics/redexpr.ml b/tactics/redexpr.ml
index f681e4e99e..e000ddce74 100644
--- a/tactics/redexpr.ml
+++ b/tactics/redexpr.ml
@@ -44,11 +44,7 @@ let cbv_native env sigma c =
(warn_native_compute_disabled ();
cbv_vm env sigma c)
-let whd_cbn flags env sigma t =
- let (state,_) =
- (whd_state_gen ~refold:true ~tactic_mode:true flags env sigma (t,Reductionops.Stack.empty))
- in
- Reductionops.Stack.zip ~refold:true sigma state
+let whd_cbn = Cbn.whd_cbn
let strong_cbn flags =
strong_with_flags whd_cbn flags
diff --git a/tactics/tactics.mllib b/tactics/tactics.mllib
index 36d61feed1..88025e3fb4 100644
--- a/tactics/tactics.mllib
+++ b/tactics/tactics.mllib
@@ -9,6 +9,7 @@ Eqschemes
Elimschemes
Genredexpr
Redops
+Cbn
Redexpr
Ppred
Tactics
diff --git a/test-suite/bugs/closed/bug_12418.v b/test-suite/bugs/closed/bug_12418.v
new file mode 100644
index 0000000000..cf11ea627b
--- /dev/null
+++ b/test-suite/bugs/closed/bug_12418.v
@@ -0,0 +1,29 @@
+(* The second "match" below used to raise an anomaly *)
+
+Class Monad@{d c} (m : Type@{d} -> Type@{c}) : Type :=
+ { ret : forall {t : Type@{d}}, t -> m t }.
+
+Record state {S : Type} (t : Type) : Type := mkState { runState : t }.
+
+Global Declare Instance Monad_state : forall S, Monad (@state S).
+
+Class Cava := {
+ constant : bool -> unit;
+ constant_vec : unit;
+}.
+
+Axiom F : forall {A : Type}, (bool -> A) -> Datatypes.unit.
+
+Fail Instance T : Cava := {
+
+ constant b := match b with
+ | true => ret tt
+ | false => ret tt
+ end;
+
+ constant_vec := @F _ (fun b => match b with
+ | true => tt
+ | false => tt
+ end);
+
+}.
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/run.sh b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/run.sh
new file mode 100755
index 0000000000..4a50759bdb
--- /dev/null
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/run.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+
+set -x
+set -e
+
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+"$COQLIB"/tools/make-both-time-files.py time-of-build-after.log.in time-of-build-before.log.in time-of-build-both.log
+
+diff -u time-of-build-both.log.expected time-of-build-both.log || exit $?
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-after.log.in b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-after.log.in
new file mode 100644
index 0000000000..1031cb85c5
--- /dev/null
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-after.log.in
@@ -0,0 +1,58 @@
+./src/Rewriter/PerfTesting/Specific/make.py primes.txt
+make --no-print-directory -C rewriter
+make[2]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/deps/coqutil
+Generating Makefile.coq.all
+make -f Makefile.coq.all
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/bedrock2 noex
+Generating Makefile.coq.noex
+rm -f .coqdeps.d
+make -f Makefile.coq.noex
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C coqprime src/Coqprime/PrimalityTest/Zp.vo
+make[1]: 'src/Coqprime/PrimalityTest/Zp.vo' is up to date.
+coq_makefile -f _CoqProject INSTALLDEFAULTROOT = Crypto -o Makefile-coq
+COQ_MAKEFILE -f _CoqProject > Makefile.coq
+make --no-print-directory -C rewriter
+make[2]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/deps/coqutil
+Generating Makefile.coq.all
+make -f Makefile.coq.all
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/bedrock2 noex
+Generating Makefile.coq.noex
+rm -f .coqdeps.d
+make -f Makefile.coq.noex
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C coqprime src/Coqprime/PrimalityTest/Zp.vo
+make[1]: 'src/Coqprime/PrimalityTest/Zp.vo' is up to date.
+COQDEP VFILES
+make --no-print-directory -C rewriter
+make[2]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/deps/coqutil
+Generating Makefile.coq.all
+make -f Makefile.coq.all
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/bedrock2 noex
+Generating Makefile.coq.noex
+rm -f .coqdeps.d
+make -f Makefile.coq.noex
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C coqprime src/Coqprime/PrimalityTest/Zp.vo
+make[1]: 'src/Coqprime/PrimalityTest/Zp.vo' is up to date.
+COQC src/UnsaturatedSolinasHeuristics/Tests.v
+Finished transaction in 25.269 secs (24.869u,0.051s) (successful)
+src/UnsaturatedSolinasHeuristics/Tests.vo (real: 26.27, user: 25.97, sys: 0.27, mem: 566428 ko)
+DIFF Crypto.Fancy.Montgomery256.Prod.MontRed256
+DIFF Crypto.Fancy.Montgomery256.prod_montred256_correct
+DIFF Crypto.Fancy.Montgomery256.prod_montred256_correct.Assumptions
+DIFF Crypto.Fancy.Montgomery256.montred256
+DIFF Crypto.Fancy.Barrett256.Prod.MulMod
+DIFF Crypto.Fancy.Barrett256.prod_barrett_red256_correct
+DIFF Crypto.Fancy.Barrett256.prod_barrett_red256_correct.Assumptions
+DIFF Crypto.Fancy.Barrett256.barrett_red256
+DIFF Crypto.UnsaturatedSolinasHeuristics.Tests.get_possible_limbs
+cp -f AUTHORS fiat-rust/AUTHORS
+cp -f CONTRIBUTORS fiat-rust/CONTRIBUTORS
+cp -f LICENSE fiat-rust/LICENSE
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-before.log.in b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-before.log.in
new file mode 100644
index 0000000000..b78039b589
--- /dev/null
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-before.log.in
@@ -0,0 +1,40 @@
+./src/Rewriter/PerfTesting/Specific/make.py primes.txt
+make --no-print-directory -C rewriter
+make[2]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/deps/coqutil
+Generating Makefile.coq.all
+make -f Makefile.coq.all
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/bedrock2 noex
+Generating Makefile.coq.noex
+rm -f .coqdeps.d
+make -f Makefile.coq.noex
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C coqprime src/Coqprime/PrimalityTest/Zp.vo
+make[1]: 'src/Coqprime/PrimalityTest/Zp.vo' is up to date.
+coq_makefile -f _CoqProject INSTALLDEFAULTROOT = Crypto -o Makefile-coq
+COQ_MAKEFILE -f _CoqProject > Makefile.coq
+make --no-print-directory -C rewriter
+make[2]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/deps/coqutil
+Generating Makefile.coq.all
+make -f Makefile.coq.all
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C bedrock2/bedrock2 noex
+Generating Makefile.coq.noex
+rm -f .coqdeps.d
+make -f Makefile.coq.noex
+make[3]: Nothing to be done for 'real-all'.
+make --no-print-directory -C coqprime src/Coqprime/PrimalityTest/Zp.vo
+make[1]: 'src/Coqprime/PrimalityTest/Zp.vo' is up to date.
+DIFF Crypto.Fancy.Montgomery256.Prod.MontRed256
+DIFF Crypto.Fancy.Montgomery256.prod_montred256_correct
+DIFF Crypto.Fancy.Montgomery256.prod_montred256_correct.Assumptions
+DIFF Crypto.Fancy.Montgomery256.montred256
+DIFF Crypto.Fancy.Barrett256.Prod.MulMod
+DIFF Crypto.Fancy.Barrett256.prod_barrett_red256_correct
+DIFF Crypto.Fancy.Barrett256.prod_barrett_red256_correct.Assumptions
+DIFF Crypto.Fancy.Barrett256.barrett_red256
+cp -f AUTHORS fiat-rust/AUTHORS
+cp -f CONTRIBUTORS fiat-rust/CONTRIBUTORS
+cp -f LICENSE fiat-rust/LICENSE
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-both.log.expected b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-both.log.expected
new file mode 100644
index 0000000000..6a232623bf
--- /dev/null
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/006-zero-before/time-of-build-both.log.expected
@@ -0,0 +1,5 @@
+ After | Peak Mem | File Name | Before | Peak Mem || Change || Change (mem) | % Change | % Change (mem)
+-------------------------------------------------------------------------------------------------------------------------------------------
+0m25.96s | 566428 ko | Total Time / Peak Mem | 0m00.00s | 0 ko || +0m25.96s || 566428 ko | N/A | ∞
+-------------------------------------------------------------------------------------------------------------------------------------------
+0m25.97s | 566428 ko | UnsaturatedSolinasHeuristics/Tests.vo | N/A | N/A || +0m25.96s || 566428 ko | ∞ | ∞
diff --git a/test-suite/coq-makefile/timing/precomputed-time-tests/run.sh b/test-suite/coq-makefile/timing/precomputed-time-tests/run.sh
index 8935759705..123b272a69 100755
--- a/test-suite/coq-makefile/timing/precomputed-time-tests/run.sh
+++ b/test-suite/coq-makefile/timing/precomputed-time-tests/run.sh
@@ -12,3 +12,4 @@ export COQLIB
./003-non-utf8/run.sh
./004-per-file-fuzz/run.sh
./005-correct-diff-sorting-order-mem/run.sh
+./006-zero-before/run.sh
diff --git a/test-suite/output/ErrorLocation_12152_1.v b/test-suite/output/ErrorLocation_12152_1.v
index e63ab1cd48..709ac305e4 100644
--- a/test-suite/output/ErrorLocation_12152_1.v
+++ b/test-suite/output/ErrorLocation_12152_1.v
@@ -1,3 +1,4 @@
(* Reported in #12152 *)
Goal True.
intro H; auto.
+Abort.
diff --git a/test-suite/output/ErrorLocation_12152_2.v b/test-suite/output/ErrorLocation_12152_2.v
index 5df6bec939..29e4c910d8 100644
--- a/test-suite/output/ErrorLocation_12152_2.v
+++ b/test-suite/output/ErrorLocation_12152_2.v
@@ -1,3 +1,4 @@
(* Reported in #12152 *)
Goal True.
intros H; auto.
+Abort.
diff --git a/test-suite/output/ErrorLocation_12255.v b/test-suite/output/ErrorLocation_12255.v
index 347424b2fc..59c0e1dfc5 100644
--- a/test-suite/output/ErrorLocation_12255.v
+++ b/test-suite/output/ErrorLocation_12255.v
@@ -2,3 +2,4 @@ Ltac can_unfold x := let b := eval cbv delta [x] in x in idtac.
Definition i := O.
Goal False.
can_unfold (i>0).
+Abort.
diff --git a/tools/CoqMakefile.in b/tools/CoqMakefile.in
index a26eb9dfbe..1436da30fa 100644
--- a/tools/CoqMakefile.in
+++ b/tools/CoqMakefile.in
@@ -146,6 +146,21 @@ TIME_OF_PRETTY_BUILD_EXTRA_FILES ?= - # also output to the command line
TGTS ?=
+# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not)
+ifdef DSTROOT
+DESTDIR := $(DSTROOT)
+endif
+
+# Substitution of the path by appending $(DESTDIR) if needed.
+# The variable $(COQMF_WINDRIVE) can be needed for Cygwin environments.
+windrive_path = $(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(1)),$(1))
+destination_path = $(if $(DESTDIR),$(DESTDIR)/$(call windrive_path,$(1)),$(1))
+
+# Installation paths of libraries and documentation.
+COQLIBINSTALL ?= $(call destination_path,$(COQLIB)/user-contrib)
+COQDOCINSTALL ?= $(call destination_path,$(DOCDIR)/user-contrib)
+COQTOPINSTALL ?= $(call destination_path,$(COQLIB)/toploop) # FIXME: Unused variable?
+
########## End of parameters ##################################################
# What follows may be relevant to you only if you need to
# extend this Makefile. If so, look for 'Extension point' here and
@@ -227,17 +242,6 @@ else
TIMING_ARG=
endif
-# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not)
-ifdef DSTROOT
-DESTDIR := $(DSTROOT)
-endif
-
-concat_path = $(if $(1),$(1)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(2)),$(2)),$(2))
-
-COQLIBINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)/user-contrib)
-COQDOCINSTALL = $(call concat_path,$(DESTDIR),$(DOCDIR)/user-contrib)
-COQTOPINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)/toploop)
-
# Files #######################################################################
#
# We here define a bunch of variables about the files being part of the
@@ -577,7 +581,7 @@ uninstall::
instf="$(COQLIBINSTALL)/$$df/`basename $$f`" &&\
rm -f "$$instf" &&\
echo RM "$$instf" &&\
- (rmdir "$(call concat_path,,$(COQLIBINSTALL)/$$df/)" 2>/dev/null || true); \
+ (rmdir "$(COQLIBINSTALL)/$$df/" 2>/dev/null || true); \
done
.PHONY: uninstall
@@ -797,7 +801,7 @@ $(addsuffix .d,$(MLPACKFILES)): %.mlpack.d: %.mlpack
# projects. Note that extra options might be on the command line.
VDFILE_FLAGS:=$(if @PROJECT_FILE@,-f @PROJECT_FILE@,) $(CMDLINE_COQLIBS) $(CMDLINE_VFILES)
-$(VDFILE): $(VFILES)
+$(VDFILE): @PROJECT_FILE@ $(VFILES)
$(SHOW)'COQDEP VFILES'
$(HIDE)$(COQDEP) -vos -dyndep var $(VDFILE_FLAGS) $(redir_if_ok)
diff --git a/tools/TimeFileMaker.py b/tools/TimeFileMaker.py
index a3078af4a1..12462726e5 100644
--- a/tools/TimeFileMaker.py
+++ b/tools/TimeFileMaker.py
@@ -387,8 +387,8 @@ def make_diff_table_string(left_dict, right_dict,
total_string = 'Total' if not include_mem else 'Total Time / Peak Mem'
middle_width = max(map(len, names + [tag, total_string]))
- left_peak = max(v.get(MEM_KEY, 0) for v in left_dict.values())
- right_peak = max(v.get(MEM_KEY, 0) for v in right_dict.values())
+ left_peak = max([0] + [v.get(MEM_KEY, 0) for v in left_dict.values()])
+ right_peak = max([0] + [v.get(MEM_KEY, 0) for v in right_dict.values()])
diff_peak = left_peak - right_peak
percent_diff_peak = (format_percentage((left_peak - right_peak) / float(right_peak))
if right_peak != 0 else (INFINITY if left_peak > 0 else 'N/A'))
diff --git a/toplevel/usage.ml b/toplevel/usage.ml
index e69b21a195..732ad05b26 100644
--- a/toplevel/usage.ml
+++ b/toplevel/usage.ml
@@ -50,10 +50,10 @@ let print_usage_common co command =
\n -require-export lib, -re lib\
\n load and transitively import Coq library lib\
\n (equivalent to Require Export lib.)\
-\n -require-import-from root lib, -rifrom lib\
+\n -require-import-from root lib, -rifrom root lib\
\n load and import Coq library lib\
\n (equivalent to From root Require Import lib.)\
-\n -require-export-from root lib, -refrom lib\
+\n -require-export-from root lib, -refrom root lib\
\n load and transitively import Coq library lib\
\n (equivalent to From root Require Export lib.)\
\n\
diff --git a/user-contrib/Ltac2/g_ltac2.mlg b/user-contrib/Ltac2/g_ltac2.mlg
index 8979170026..3af39ec59a 100644
--- a/user-contrib/Ltac2/g_ltac2.mlg
+++ b/user-contrib/Ltac2/g_ltac2.mlg
@@ -8,6 +8,8 @@
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)
+DECLARE PLUGIN "ltac2_plugin"
+
{
open Pp
diff --git a/vernac/comAssumption.ml b/vernac/comAssumption.ml
index 023d76ce3b..44c30598aa 100644
--- a/vernac/comAssumption.ml
+++ b/vernac/comAssumption.ml
@@ -24,8 +24,7 @@ module RelDecl = Context.Rel.Declaration
let declare_variable is_coe ~kind typ imps impl {CAst.v=name} =
let kind = Decls.IsAssumption kind in
- let decl = Declare.SectionLocalAssum {typ; impl} in
- let () = Declare.declare_variable ~name ~kind decl in
+ let () = Declare.declare_variable ~name ~kind ~typ ~impl in
let () = Declare.assumption_message name in
let r = GlobRef.VarRef name in
let () = maybe_declare_manual_implicits true r imps in
diff --git a/vernac/comFixpoint.ml b/vernac/comFixpoint.ml
index 80ca85e9a6..0b75e7f410 100644
--- a/vernac/comFixpoint.ml
+++ b/vernac/comFixpoint.ml
@@ -285,7 +285,7 @@ let declare_fixpoint_generic ?indexes ~scope ~poly ((fixnames,fixrs,fixdefs,fixt
let fix_kind = Decls.IsDefinition fix_kind in
let _ : GlobRef.t list =
Declare.declare_mutually_recursive ~scope ~opaque:false ~kind:fix_kind ~poly ~uctx
- ~possible_indexes:indexes ~restrict_ucontext:true ~udecl ~ntns ~rec_declaration
+ ~possible_indexes:indexes ~udecl ~ntns ~rec_declaration
fixitems
in
()
diff --git a/vernac/declare.ml b/vernac/declare.ml
index c77d4909da..7de1ff4083 100644
--- a/vernac/declare.ml
+++ b/vernac/declare.ml
@@ -138,7 +138,9 @@ type 'a proof_entry = {
let default_univ_entry = Entries.Monomorphic_entry Univ.ContextSet.empty
-let definition_entry ?fix_exn ?(opaque=false) ?(inline=false) ?feedback_id ?section_vars ?types
+(** [univsbody] are universe-constraints attached to the body-only,
+ used in vio-delayed opaque constants and private poly universes *)
+let definition_entry_core ?fix_exn ?(opaque=false) ?(inline=false) ?feedback_id ?section_vars ?types
?(univs=default_univ_entry) ?(eff=Evd.empty_side_effects) ?(univsbody=Univ.ContextSet.empty) body =
{ proof_entry_body = Future.from_val ?fix_exn ((body,univsbody), eff);
proof_entry_secctx = section_vars;
@@ -148,6 +150,9 @@ let definition_entry ?fix_exn ?(opaque=false) ?(inline=false) ?feedback_id ?sect
proof_entry_feedback = feedback_id;
proof_entry_inline_code = inline}
+let definition_entry =
+ definition_entry_core ?fix_exn:None ?eff:None ?univsbody:None ?feedback_id:None ?section_vars:None
+
type proof_object =
{ name : Names.Id.t
(* [name] only used in the STM *)
@@ -173,11 +178,17 @@ let prepare_proof ~unsafe_typ { proof } =
let evd = Evd.minimize_universes evd in
let to_constr_body c =
match EConstr.to_constr_opt evd c with
- | Some p -> p
- | None -> CErrors.user_err Pp.(str "Some unresolved existential variables remain")
+ | Some p ->
+ Vars.universes_of_constr p, p
+ | None ->
+ CErrors.user_err Pp.(str "Some unresolved existential variables remain")
in
let to_constr_typ t =
- if unsafe_typ then EConstr.Unsafe.to_constr t else to_constr_body t
+ if unsafe_typ
+ then
+ let t = EConstr.Unsafe.to_constr t in
+ Vars.universes_of_constr t, t
+ else to_constr_body t
in
(* ppedrot: FIXME, this is surely wrong. There is no reason to duplicate
side-effects... This may explain why one need to uniquize side-effects
@@ -194,6 +205,40 @@ let prepare_proof ~unsafe_typ { proof } =
let proofs = List.map (fun (body, typ) -> (to_constr_body body, eff), to_constr_typ typ) initial_goals in
proofs, Evd.evar_universe_context evd
+let make_univs_deferred ~poly ~initial_euctx ~uctx ~udecl
+ (used_univs_typ, typ) (used_univs_body, body) =
+ let used_univs = Univ.LSet.union used_univs_body used_univs_typ in
+ let utyp = UState.univ_entry ~poly initial_euctx in
+ let uctx = UState.constrain_variables (fst (UState.context_set initial_euctx)) uctx in
+ (* For vi2vo compilation proofs are computed now but we need to
+ complement the univ constraints of the typ with the ones of
+ the body. So we keep the two sets distinct. *)
+ let uctx_body = UState.restrict uctx used_univs in
+ let ubody = UState.check_mono_univ_decl uctx_body udecl in
+ utyp, ubody
+
+let make_univs_private_poly ~poly ~uctx ~udecl (used_univs_typ, typ) (used_univs_body, body) =
+ let used_univs = Univ.LSet.union used_univs_body used_univs_typ in
+ let universes = UState.restrict uctx used_univs in
+ let typus = UState.restrict universes used_univs_typ in
+ let utyp = UState.check_univ_decl ~poly typus udecl in
+ let ubody = Univ.ContextSet.diff
+ (UState.context_set universes)
+ (UState.context_set typus)
+ in
+ utyp, ubody
+
+let make_univs ~poly ~uctx ~udecl (used_univs_typ, typ) (used_univs_body, body) =
+ let used_univs = Univ.LSet.union used_univs_body used_univs_typ in
+ (* Since the proof is computed now, we can simply have 1 set of
+ constraints in which we merge the ones for the body and the ones
+ for the typ. We recheck the declaration after restricting with
+ the actually used universes.
+ TODO: check if restrict is really necessary now. *)
+ let ctx = UState.restrict uctx used_univs in
+ let utyp = UState.check_univ_decl ~poly ctx udecl in
+ utyp, Univ.ContextSet.empty
+
let close_proof ~opaque ~keep_body_ucst_separate ps =
let { section_vars; proof; udecl; initial_euctx } = ps in
@@ -202,46 +247,19 @@ let close_proof ~opaque ~keep_body_ucst_separate ps =
let elist, uctx = prepare_proof ~unsafe_typ ps in
let opaque = match opaque with Opaque -> true | Transparent -> false in
- let make_entry ((body, eff), typ) =
-
- let allow_deferred =
- not poly &&
- (keep_body_ucst_separate
- || not (Safe_typing.is_empty_private_constants eff.Evd.seff_private))
- in
- let used_univs_body = Vars.universes_of_constr body in
- let used_univs_typ = Vars.universes_of_constr typ in
- let used_univs = Univ.LSet.union used_univs_body used_univs_typ in
+ let make_entry ((((_ub, body) as b), eff), ((_ut, typ) as t)) =
let utyp, ubody =
- if allow_deferred then
- let utyp = UState.univ_entry ~poly initial_euctx in
- let uctx = UState.constrain_variables (fst (UState.context_set initial_euctx)) uctx in
- (* For vi2vo compilation proofs are computed now but we need to
- complement the univ constraints of the typ with the ones of
- the body. So we keep the two sets distinct. *)
- let uctx_body = UState.restrict uctx used_univs in
- let ubody = UState.check_mono_univ_decl uctx_body udecl in
- utyp, ubody
- else if poly && opaque && private_poly_univs () then
- let universes = UState.restrict uctx used_univs in
- let typus = UState.restrict universes used_univs_typ in
- let utyp = UState.check_univ_decl ~poly typus udecl in
- let ubody = Univ.ContextSet.diff
- (UState.context_set universes)
- (UState.context_set typus)
- in
- utyp, ubody
- else
- (* Since the proof is computed now, we can simply have 1 set of
- constraints in which we merge the ones for the body and the ones
- for the typ. We recheck the declaration after restricting with
- the actually used universes.
- TODO: check if restrict is really necessary now. *)
- let ctx = UState.restrict uctx used_univs in
- let utyp = UState.check_univ_decl ~poly ctx udecl in
- utyp, Univ.ContextSet.empty
+ (* allow_deferred case *)
+ if not poly &&
+ (keep_body_ucst_separate
+ || not (Safe_typing.is_empty_private_constants eff.Evd.seff_private))
+ then make_univs_deferred ~initial_euctx ~poly ~uctx ~udecl t b
+ (* private_poly_univs case *)
+ else if poly && opaque && private_poly_univs ()
+ then make_univs_private_poly ~poly ~uctx ~udecl t b
+ else make_univs ~poly ~uctx ~udecl t b
in
- definition_entry ~opaque ?section_vars ~univs:utyp ~univsbody:ubody ~types:typ ~eff body
+ definition_entry_core ~opaque ?section_vars ~univs:utyp ~univsbody:ubody ~types:typ ~eff body
in
let entries = CList.map make_entry elist in
{ name; entries; uctx }
@@ -536,7 +554,7 @@ let objVariable : unit Libobject.Dyn.tag =
let inVariable v = Libobject.Dyn.Easy.inj v objVariable
-let declare_variable ~name ~kind d =
+let declare_variable_core ~name ~kind d =
(* Variables are distinguished by only short names *)
if Decls.variable_exists name then
raise (DeclareUniv.AlreadyDeclared (None, name));
@@ -573,6 +591,9 @@ let declare_variable ~name ~kind d =
Impargs.declare_var_implicits ~impl name;
Notation.declare_ref_arguments_scope Evd.empty (GlobRef.VarRef name)
+let declare_variable ~name ~kind ~typ ~impl =
+ declare_variable_core ~name ~kind (SectionLocalAssum { typ; impl })
+
(* Declaration messages *)
let pr_rank i = pr_nth (i+1)
@@ -734,7 +755,7 @@ let return_partial_proof { proof } =
let return_proof ps =
let p, uctx = prepare_proof ~unsafe_typ:false ps in
- List.map fst p, uctx
+ List.map (fun (((_ub, body),eff),_) -> (body,eff)) p, uctx
let update_global_env =
map_proof (fun p ->
@@ -889,13 +910,13 @@ module Hook = struct
end
(* Locality stuff *)
-let declare_entry ~name ~scope ~kind ?hook ?(obls=[]) ~impargs ~uctx entry =
+let declare_entry_core ~name ~scope ~kind ?hook ~obls ~impargs ~uctx entry =
let should_suggest = entry.proof_entry_opaque &&
Option.is_empty entry.proof_entry_secctx in
let ubind = UState.universe_binders uctx in
let dref = match scope with
| Discharge ->
- let () = declare_variable ~name ~kind (SectionLocalDef entry) in
+ let () = declare_variable_core ~name ~kind (SectionLocalDef entry) in
if should_suggest then Proof_using.suggest_variable (Global.env ()) name;
Names.GlobRef.VarRef name
| Global local ->
@@ -910,6 +931,8 @@ let declare_entry ~name ~scope ~kind ?hook ?(obls=[]) ~impargs ~uctx entry =
Option.iter (fun hook -> Hook.call ~hook { Hook.S.uctx; obls; scope; dref }) hook;
dref
+let declare_entry = declare_entry_core ~obls:[]
+
let mutual_make_bodies ~fixitems ~rec_declaration ~possible_indexes =
match possible_indexes with
| Some possible_indexes ->
@@ -936,7 +959,7 @@ module Recthm = struct
}
end
-let declare_mutually_recursive ~opaque ~scope ~kind ~poly ~uctx ~udecl ~ntns ~rec_declaration ~possible_indexes ?(restrict_ucontext=true) fixitems =
+let declare_mutually_recursive_core ~opaque ~scope ~kind ~poly ~uctx ~udecl ~ntns ~rec_declaration ~possible_indexes ?(restrict_ucontext=true) fixitems =
let vars, fixdecls, indexes =
mutual_make_bodies ~fixitems ~rec_declaration ~possible_indexes in
let uctx, univs =
@@ -962,6 +985,8 @@ let declare_mutually_recursive ~opaque ~scope ~kind ~poly ~uctx ~udecl ~ntns ~re
List.iter (Metasyntax.add_notation_interpretation (Global.env())) ntns;
csts
+let declare_mutually_recursive = declare_mutually_recursive_core ~restrict_ucontext:true
+
let warn_let_as_axiom =
CWarnings.create ~name:"let-as-axiom" ~category:"vernacular"
Pp.(fun id -> strbrk "Let definition" ++ spc () ++ Names.Id.print id ++
@@ -998,14 +1023,16 @@ let prepare_definition ?opaque ?inline ?fix_exn ~poly ~udecl ~types ~body sigma
sigma (fun nf -> nf body, Option.map nf types)
in
let univs = Evd.check_univ_decl ~poly sigma udecl in
- let entry = definition_entry ?fix_exn ?opaque ?inline ?types ~univs body in
+ let entry = definition_entry_core ?fix_exn ?opaque ?inline ?types ~univs body in
let uctx = Evd.evar_universe_context sigma in
entry, uctx
-let declare_definition ~name ~scope ~kind ~opaque ~impargs ~udecl ?hook
- ?obls ~poly ?inline ~types ~body ?fix_exn sigma =
+let declare_definition_core ~name ~scope ~kind ~opaque ~impargs ~udecl ?hook
+ ~obls ~poly ?inline ~types ~body ?fix_exn sigma =
let entry, uctx = prepare_definition ?fix_exn ~opaque ~poly ~udecl ~types ~body ?inline sigma in
- declare_entry ~name ~scope ~kind ~impargs ?obls ?hook ~uctx entry
+ declare_entry_core ~name ~scope ~kind ~impargs ~obls ?hook ~uctx entry
+
+let declare_definition = declare_definition_core ~obls:[]
let prepare_obligation ~name ~types ~body sigma =
let env = Global.env () in
@@ -1255,8 +1282,8 @@ let not_transp_msg =
++ spc ()
++ str "Use 'Defined' instead.")
-let pperror cmd = CErrors.user_err ~hdr:"Program" cmd
-let err_not_transp () = pperror not_transp_msg
+let err_not_transp () =
+ CErrors.user_err ~hdr:"Program" not_transp_msg
module ProgMap = Id.Map
@@ -1445,7 +1472,7 @@ let declare_definition prg =
let obls = List.map (fun (id, (_, c)) -> (id, c)) varsubst in
(* XXX: This is doing normalization twice *)
let kn =
- declare_definition ~name ~scope ~kind ~impargs ?hook ~obls
+ declare_definition_core ~name ~scope ~kind ~impargs ?hook ~obls
~fix_exn ~opaque ~poly ~udecl ~types ~body sigma
in
let pm = progmap_remove !State.prg_ref prg in
@@ -1531,7 +1558,7 @@ let declare_mutual_definition l =
(* Declare the recursive definitions *)
let udecl = UState.default_univ_decl in
let kns =
- declare_mutually_recursive ~scope ~opaque ~kind ~udecl ~ntns
+ declare_mutually_recursive_core ~scope ~opaque ~kind ~udecl ~ntns
~uctx:first.prg_ctx ~rec_declaration ~possible_indexes ~poly
~restrict_ucontext:false fixitems
in
diff --git a/vernac/declare.mli b/vernac/declare.mli
index 647896e2f5..ef4f8c4825 100644
--- a/vernac/declare.mli
+++ b/vernac/declare.mli
@@ -119,13 +119,6 @@ val close_proof : opaque:opacity_flag -> keep_body_ucst_separate:bool -> Proof.t
(** XXX: This is an internal, low-level API and could become scheduled
for removal from the public API, use higher-level declare APIs
instead *)
-type variable_declaration =
- | SectionLocalDef of Evd.side_effects proof_entry
- | SectionLocalAssum of { typ:types; impl:Glob_term.binding_kind; }
-
-(** XXX: This is an internal, low-level API and could become scheduled
- for removal from the public API, use higher-level declare APIs
- instead *)
type 'a constant_entry =
| DefinitionEntry of 'a proof_entry
| ParameterEntry of parameter_entry
@@ -134,7 +127,8 @@ type 'a constant_entry =
val declare_variable
: name:variable
-> kind:Decls.logical_kind
- -> variable_declaration
+ -> typ:types
+ -> impl:Glob_term.binding_kind
-> unit
(** Declaration of global constructions
@@ -144,17 +138,10 @@ val declare_variable
for removal from the public API, use higher-level declare APIs
instead *)
val definition_entry
- : ?fix_exn:Future.fix_exn
- -> ?opaque:bool
+ : ?opaque:bool
-> ?inline:bool
- -> ?feedback_id:Stateid.t
- -> ?section_vars:Id.Set.t
-> ?types:types
-> ?univs:Entries.universes_entry
- -> ?eff:Evd.side_effects
- -> ?univsbody:Univ.ContextSet.t
- (** Universe-constraints attached to the body-only, used in
- vio-delayed opaque constants and private poly universes *)
-> constr
-> Evd.side_effects proof_entry
@@ -295,7 +282,6 @@ val declare_entry
-> scope:locality
-> kind:Decls.logical_kind
-> ?hook:Hook.t
- -> ?obls:(Id.t * Constr.t) list
-> impargs:Impargs.manual_implicits
-> uctx:UState.t
-> Evd.side_effects proof_entry
@@ -315,7 +301,6 @@ val declare_definition
-> impargs:Impargs.manual_implicits
-> udecl:UState.universe_decl
-> ?hook:Hook.t
- -> ?obls:(Id.t * Constr.t) list
-> poly:bool
-> ?inline:bool
-> types:EConstr.t option
@@ -359,9 +344,6 @@ val declare_mutually_recursive
-> ntns:Vernacexpr.decl_notation list
-> rec_declaration:Constr.rec_declaration
-> possible_indexes:lemma_possible_guards option
- -> ?restrict_ucontext:bool
- (** XXX: restrict_ucontext should be always true, this seems like a
- bug in obligations, so this parameter should go away *)
-> Recthm.t list
-> Names.GlobRef.t list
diff --git a/vernac/mltop.ml b/vernac/mltop.ml
index d276a1ac35..c33b3d29f8 100644
--- a/vernac/mltop.ml
+++ b/vernac/mltop.ml
@@ -309,6 +309,9 @@ type ml_module_object = {
}
let add_module_digest m =
+ if not has_dynlink then
+ m, NoDigest
+ else
try
let file = file_of_name m in
let path, file = System.where_in_path ~warn:false !coq_mlpath_copy file in
diff --git a/vernac/obligations.mli b/vernac/obligations.mli
index 102a17b216..c21951373b 100644
--- a/vernac/obligations.mli
+++ b/vernac/obligations.mli
@@ -132,5 +132,4 @@ val show_obligations : ?msg:bool -> Names.Id.t option -> unit
val show_term : Names.Id.t option -> Pp.t
val admit_obligations : Names.Id.t option -> unit
-val explain_no_obligations : Names.Id.t option -> Pp.t
val check_program_libraries : unit -> unit
diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml
index 106fed124e..9a1d935928 100644
--- a/vernac/vernacentries.ml
+++ b/vernac/vernacentries.ml
@@ -1081,10 +1081,9 @@ let vernac_end_segment ({v=id} as lid) =
(* Libraries *)
let warn_require_in_section =
- let name = "require-in-section" in
- let category = "deprecated" in
- CWarnings.create ~name ~category
- (fun () -> strbrk "Use of “Require” inside a section is deprecated.")
+ CWarnings.create ~name:"require-in-section" ~category:"fragile"
+ (fun () -> strbrk "Use of “Require” inside a section is fragile." ++ spc() ++
+ strbrk "It is not recommended to use this functionality in finished proof scripts.")
let vernac_require from import qidl =
if Global.sections_are_opened () then warn_require_in_section ();