aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/.csdp.cachebin236597 -> 165200 bytes
-rw-r--r--test-suite/Makefile132
-rw-r--r--test-suite/arithmetic/add.v18
-rw-r--r--test-suite/arithmetic/addc.v17
-rw-r--r--test-suite/arithmetic/addcarryc.v17
-rw-r--r--test-suite/arithmetic/addmuldiv.v12
-rw-r--r--test-suite/arithmetic/compare.v23
-rw-r--r--test-suite/arithmetic/div.v17
-rw-r--r--test-suite/arithmetic/diveucl.v17
-rw-r--r--test-suite/arithmetic/diveucl_21.v17
-rw-r--r--test-suite/arithmetic/eqb.v17
-rw-r--r--test-suite/arithmetic/head0.v23
-rw-r--r--test-suite/arithmetic/isint.v50
-rw-r--r--test-suite/arithmetic/land.v29
-rw-r--r--test-suite/arithmetic/leb.v23
-rw-r--r--test-suite/arithmetic/lor.v29
-rw-r--r--test-suite/arithmetic/lsl.v23
-rw-r--r--test-suite/arithmetic/lsr.v23
-rw-r--r--test-suite/arithmetic/ltb.v23
-rw-r--r--test-suite/arithmetic/lxor.v29
-rw-r--r--test-suite/arithmetic/mod.v17
-rw-r--r--test-suite/arithmetic/mul.v17
-rw-r--r--test-suite/arithmetic/mulc.v22
-rw-r--r--test-suite/arithmetic/primitive.v12
-rw-r--r--test-suite/arithmetic/reduction.v28
-rw-r--r--test-suite/arithmetic/sub.v17
-rw-r--r--test-suite/arithmetic/subc.v17
-rw-r--r--test-suite/arithmetic/subcarryc.v17
-rw-r--r--test-suite/arithmetic/tail0.v23
-rw-r--r--test-suite/arithmetic/unsigned.v18
-rw-r--r--test-suite/bugs/closed/HoTT_coq_056.v6
-rw-r--r--test-suite/bugs/closed/HoTT_coq_061.v2
-rw-r--r--test-suite/bugs/closed/HoTT_coq_120.v2
-rw-r--r--test-suite/bugs/closed/bug_2001.v4
-rw-r--r--test-suite/bugs/closed/bug_2830.v9
-rw-r--r--test-suite/bugs/closed/bug_3324.v4
-rw-r--r--test-suite/bugs/closed/bug_3325.v12
-rw-r--r--test-suite/bugs/closed/bug_3393.v1
-rw-r--r--test-suite/bugs/closed/bug_3422.v1
-rw-r--r--test-suite/bugs/closed/bug_3427.v2
-rw-r--r--test-suite/bugs/closed/bug_3441.v24
-rw-r--r--test-suite/bugs/closed/bug_3454.v6
-rw-r--r--test-suite/bugs/closed/bug_3468.v29
-rw-r--r--test-suite/bugs/closed/bug_3495.v2
-rw-r--r--test-suite/bugs/closed/bug_3682.v2
-rw-r--r--test-suite/bugs/closed/bug_3690.v7
-rw-r--r--test-suite/bugs/closed/bug_3956.v8
-rw-r--r--test-suite/bugs/closed/bug_4132.v2
-rw-r--r--test-suite/bugs/closed/bug_4157.v272
-rw-r--r--test-suite/bugs/closed/bug_4366.v15
-rw-r--r--test-suite/bugs/closed/bug_4498.v2
-rw-r--r--test-suite/bugs/closed/bug_4509.v11
-rw-r--r--test-suite/bugs/closed/bug_4771.v21
-rw-r--r--test-suite/bugs/closed/bug_4781.v (renamed from test-suite/bugs/opened/bug_4781.v)16
-rw-r--r--test-suite/bugs/closed/bug_4782.v4
-rw-r--r--test-suite/bugs/closed/bug_4798.v2
-rw-r--r--test-suite/bugs/closed/bug_4811.v1686
-rw-r--r--test-suite/bugs/closed/bug_4836.v2
-rw-r--r--test-suite/bugs/closed/bug_5197.v2
-rw-r--r--test-suite/bugs/closed/bug_5198.v2
-rw-r--r--test-suite/bugs/closed/bug_5401.v2
-rw-r--r--test-suite/bugs/closed/bug_6165.v (renamed from test-suite/bugs/closed/gh6165.v)0
-rw-r--r--test-suite/bugs/closed/bug_6202.v11
-rw-r--r--test-suite/bugs/closed/bug_6384.v (renamed from test-suite/bugs/closed/gh6384.v)0
-rw-r--r--test-suite/bugs/closed/bug_6385.v (renamed from test-suite/bugs/closed/gh6385.v)0
-rw-r--r--test-suite/bugs/closed/bug_6661.v2
-rw-r--r--test-suite/bugs/closed/bug_7631.v2
-rw-r--r--test-suite/bugs/closed/bug_7795.v2
-rw-r--r--test-suite/bugs/closed/bug_7811.v2
-rw-r--r--test-suite/bugs/closed/bug_7904.v13
-rw-r--r--test-suite/bugs/closed/bug_8076.v3
-rw-r--r--test-suite/bugs/closed/bug_8224.v9
-rw-r--r--test-suite/bugs/closed/bug_8364.v17
-rw-r--r--test-suite/bugs/closed/bug_8369.v3
-rw-r--r--test-suite/bugs/closed/bug_8544.v6
-rw-r--r--test-suite/bugs/closed/bug_8755.v6
-rw-r--r--test-suite/bugs/closed/bug_8785.v44
-rw-r--r--test-suite/bugs/closed/bug_8791.v9
-rw-r--r--test-suite/bugs/closed/bug_8794.v11
-rw-r--r--test-suite/bugs/closed/bug_8819.v2
-rw-r--r--test-suite/bugs/closed/bug_8848.v18
-rw-r--r--test-suite/bugs/closed/bug_8885.v8
-rw-r--r--test-suite/bugs/closed/bug_8908.v8
-rw-r--r--test-suite/bugs/closed/bug_8951.v14
-rw-r--r--test-suite/bugs/closed/bug_9014.v19
-rw-r--r--test-suite/bugs/closed/bug_9166.v11
-rw-r--r--test-suite/bugs/closed/bug_9229.v6
-rw-r--r--test-suite/bugs/closed/bug_9240.v12
-rw-r--r--test-suite/bugs/closed/bug_9268.v46
-rw-r--r--test-suite/bugs/closed/bug_9300.v6
-rw-r--r--test-suite/bugs/closed/bug_9313.v13
-rw-r--r--test-suite/bugs/closed/bug_9329.v12
-rw-r--r--test-suite/bugs/closed/bug_9363.v17
-rw-r--r--test-suite/bugs/closed/bug_9367.v12
-rw-r--r--test-suite/bugs/closed/bug_9375.v16
-rw-r--r--test-suite/bugs/closed/bug_9432.v12
-rw-r--r--test-suite/bugs/closed/bug_9451.v8
-rw-r--r--test-suite/bugs/closed/bug_9453.v7
-rw-r--r--test-suite/bugs/closed/bug_9494.v10
-rw-r--r--test-suite/bugs/closed/bug_9508.v29
-rw-r--r--test-suite/bugs/closed/bug_9526.v30
-rw-r--r--test-suite/bugs/closed/bug_9527.v1
-rw-r--r--test-suite/bugs/closed/bug_9595.v11
-rw-r--r--test-suite/bugs/closed/bug_9598.v36
-rw-r--r--test-suite/bugs/closed/bug_9631.v7
-rw-r--r--test-suite/bugs/closed/bug_9663.v2
-rw-r--r--test-suite/bugs/closed/bug_sprop_13.v7
-rw-r--r--test-suite/bugs/closed/bug_sprop_14.v26
-rw-r--r--test-suite/bugs/opened/bug_3166.v1
-rw-r--r--test-suite/bugs/opened/bug_3754.v1
-rw-r--r--test-suite/bugs/opened/bug_3890.v4
-rw-r--r--test-suite/bugs/opened/bug_3938.v1
-rw-r--r--test-suite/complexity/constructor.v1
-rw-r--r--test-suite/complexity/f_equal.v1
-rw-r--r--test-suite/complexity/injection.v1
-rw-r--r--test-suite/complexity/ring.v1
-rw-r--r--test-suite/complexity/ring2.v1
-rw-r--r--test-suite/complexity/setoid_rewrite.v1
-rw-r--r--test-suite/complexity/unification.v1
-rw-r--r--test-suite/coq-makefile/arg/_CoqProject2
-rw-r--r--test-suite/coq-makefile/camldep/_CoqProject4
-rwxr-xr-xtest-suite/coq-makefile/camldep/run.sh17
-rw-r--r--test-suite/coq-makefile/compat-subdirs/_CoqProject2
-rw-r--r--test-suite/coq-makefile/coqdoc1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/coqdoc2/_CoqProject2
-rw-r--r--test-suite/coq-makefile/emptyprefix/_CoqProject2
-rw-r--r--test-suite/coq-makefile/extend-subdirs/_CoqProject2
-rw-r--r--test-suite/coq-makefile/findlib-package/_CoqProject2
-rw-r--r--test-suite/coq-makefile/latex1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/merlin1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/mlpack1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/mlpack2/_CoqProject2
-rw-r--r--test-suite/coq-makefile/multiroot/_CoqProject2
-rw-r--r--test-suite/coq-makefile/native1/_CoqProject3
-rw-r--r--test-suite/coq-makefile/only/_CoqProject2
-rw-r--r--test-suite/coq-makefile/plugin1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/plugin2/_CoqProject2
-rw-r--r--test-suite/coq-makefile/plugin3/_CoqProject2
-rw-r--r--test-suite/coq-makefile/quick2vo/_CoqProject2
-rwxr-xr-xtest-suite/coq-makefile/template/init.sh2
-rw-r--r--test-suite/coq-makefile/template/src/test.mlg (renamed from test-suite/coq-makefile/template/src/test.ml4)8
-rw-r--r--test-suite/coq-makefile/uninstall1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/uninstall2/_CoqProject2
-rw-r--r--test-suite/coq-makefile/validate1/_CoqProject2
-rw-r--r--test-suite/coq-makefile/vio2vo/_CoqProject2
-rw-r--r--test-suite/coqchk/bug_8655.v1
-rw-r--r--test-suite/coqchk/bug_8876.v19
-rw-r--r--test-suite/coqchk/bug_8881.v23
-rw-r--r--test-suite/coqchk/bug_8937.v21
-rw-r--r--test-suite/coqchk/inductive_functor_params.v16
-rw-r--r--test-suite/coqchk/inductive_functor_squash.v15
-rw-r--r--test-suite/coqchk/inductive_functor_template.v11
-rw-r--r--test-suite/dune65
-rw-r--r--test-suite/failure/int63.v (renamed from test-suite/failure/int31.v)7
-rw-r--r--test-suite/ide/debug_ltac.fake2
-rw-r--r--test-suite/ide/join-sync.fake20
-rw-r--r--test-suite/ide/join.fake20
-rw-r--r--test-suite/ide/reopen1.fake22
-rwxr-xr-xtest-suite/misc/4722.sh6
-rwxr-xr-xtest-suite/misc/7704.sh2
-rw-r--r--test-suite/misc/aux7704.v1
-rwxr-xr-xtest-suite/misc/deps-checksum.sh2
-rwxr-xr-xtest-suite/misc/deps-order.sh6
-rwxr-xr-xtest-suite/misc/deps-utf8.sh2
-rwxr-xr-xtest-suite/misc/exitstatus.sh5
-rwxr-xr-xtest-suite/misc/poly-capture-global-univs.sh2
-rw-r--r--test-suite/misc/poly-capture-global-univs/.gitignore1
-rw-r--r--test-suite/misc/poly-capture-global-univs/_CoqProject2
-rw-r--r--test-suite/misc/poly-capture-global-univs/src/evil.ml49
-rw-r--r--test-suite/misc/poly-capture-global-univs/src/evil.mlg10
-rw-r--r--test-suite/misc/poly-capture-global-univs/src/evilImpl.ml8
-rwxr-xr-xtest-suite/misc/quick-include.sh5
-rw-r--r--test-suite/misc/quick-include/file1.v18
-rw-r--r--test-suite/misc/quick-include/file2.v6
-rw-r--r--test-suite/misc/universes/dune2
-rw-r--r--test-suite/modules/Nat.v2
-rw-r--r--test-suite/ocaml_pwd.ml7
-rw-r--r--test-suite/output-modulo-time/ltacprof_cutoff.v28
-rw-r--r--test-suite/output/Arguments.out13
-rw-r--r--test-suite/output/Arguments.v2
-rw-r--r--test-suite/output/ArgumentsScope.out14
-rw-r--r--test-suite/output/Arguments_renaming.out8
-rw-r--r--test-suite/output/Cases.v2
-rw-r--r--test-suite/output/Coercions.v4
-rw-r--r--test-suite/output/ErrorInCanonicalStructures.out3
-rw-r--r--test-suite/output/ErrorInCanonicalStructures2.out3
-rw-r--r--test-suite/output/Error_msg_diffs.out12
-rw-r--r--test-suite/output/Error_msg_diffs.v35
-rw-r--r--test-suite/output/Errors.out9
-rw-r--r--test-suite/output/Errors.v2
-rw-r--r--test-suite/output/Extraction_matchs_2413.v2
-rw-r--r--test-suite/output/Fixpoint.v2
-rw-r--r--test-suite/output/FunExt.out7
-rw-r--r--test-suite/output/FunExt.v1
-rw-r--r--test-suite/output/Inductive.out2
-rw-r--r--test-suite/output/Inductive.v2
-rw-r--r--test-suite/output/Int31Syntax.out2
-rw-r--r--test-suite/output/Int31Syntax.v3
-rw-r--r--test-suite/output/Int63Syntax.out16
-rw-r--r--test-suite/output/Int63Syntax.v12
-rw-r--r--test-suite/output/Notations.out2
-rw-r--r--test-suite/output/Notations.v6
-rw-r--r--test-suite/output/Notations2.v1
-rw-r--r--test-suite/output/Notations3.out42
-rw-r--r--test-suite/output/Notations3.v69
-rw-r--r--test-suite/output/Notations4.out58
-rw-r--r--test-suite/output/Notations4.v157
-rw-r--r--test-suite/output/PatternsInBinders.v2
-rw-r--r--test-suite/output/PrintInfos.out5
-rw-r--r--test-suite/output/PrintInfos.v2
-rw-r--r--test-suite/output/PrintUnivsSubgraph.out5
-rw-r--r--test-suite/output/PrintUnivsSubgraph.v9
-rw-r--r--test-suite/output/Projections.v2
-rw-r--r--test-suite/output/RealSyntax.v2
-rw-r--r--test-suite/output/RecognizePluginWarning.v2
-rw-r--r--test-suite/output/Record.v4
-rw-r--r--test-suite/output/RecordFieldErrors.out14
-rw-r--r--test-suite/output/RecordFieldErrors.v38
-rw-r--r--test-suite/output/Search.out59
-rw-r--r--test-suite/output/Show.v2
-rw-r--r--test-suite/output/ShowMatch.v4
-rw-r--r--test-suite/output/StringSyntax.out1086
-rw-r--r--test-suite/output/StringSyntax.v52
-rw-r--r--test-suite/output/TypeclassDebug.out1
-rw-r--r--test-suite/output/UnclosedBlocks.v1
-rw-r--r--test-suite/output/UnivBinders.out82
-rw-r--r--test-suite/output/UnivBinders.v22
-rw-r--r--test-suite/output/UsePluginWarning.v3
-rw-r--r--test-suite/output/Warnings.v2
-rw-r--r--test-suite/output/bug5778.v1
-rw-r--r--test-suite/output/bug6404.v1
-rw-r--r--test-suite/output/inference.v2
-rw-r--r--test-suite/output/ltac.v2
-rw-r--r--test-suite/output/ltac_missing_args.v2
-rw-r--r--test-suite/output/relaxed_ambiguous_paths.out33
-rw-r--r--test-suite/output/relaxed_ambiguous_paths.v109
-rw-r--r--test-suite/output/simpl.v1
-rw-r--r--test-suite/output/sint63Notation.out24
-rw-r--r--test-suite/output/sint63Notation.v37
-rw-r--r--test-suite/output/ssr_clear.out1
-rw-r--r--test-suite/output/ssr_explain_match.out1
-rw-r--r--test-suite/output/unifconstraints.v1
-rwxr-xr-xtest-suite/report.sh24
-rw-r--r--test-suite/ssr/autoclean.v4
-rw-r--r--test-suite/ssr/case_TC.v18
-rw-r--r--test-suite/ssr/case_TC2.v20
-rw-r--r--test-suite/ssr/case_TC3.v21
-rw-r--r--test-suite/ssr/elim.v2
-rw-r--r--test-suite/ssr/elim_noquant.v29
-rw-r--r--test-suite/ssr/ipat_clear_if_id.v9
-rw-r--r--test-suite/ssr/ipat_fast_any.v21
-rw-r--r--test-suite/ssr/ipat_fastid.v48
-rw-r--r--test-suite/ssr/ipat_replace.v17
-rw-r--r--test-suite/ssr/ipat_seed.v60
-rw-r--r--test-suite/ssr/ipat_tac.v38
-rw-r--r--test-suite/ssr/ipat_tmp.v22
-rw-r--r--test-suite/ssr/misc_extended.v83
-rw-r--r--test-suite/ssr/misc_tc.v30
-rw-r--r--test-suite/stm/arg_filter_1.v4
-rw-r--r--test-suite/stm/classify_set_proof_mode_9093.v9
-rw-r--r--test-suite/stm/delayed_restrict_univs_9093.v10
-rw-r--r--test-suite/success/AdvancedTypeClasses.v2
-rw-r--r--test-suite/success/Cases.v9
-rw-r--r--test-suite/success/Compat88.v4
-rw-r--r--test-suite/success/CompatCurrentFlag.v4
-rw-r--r--test-suite/success/CompatOldFlag.v4
-rw-r--r--test-suite/success/CompatOldOldFlag.v6
-rw-r--r--test-suite/success/CompatPreviousFlag.v4
-rw-r--r--test-suite/success/Fixpoint.v2
-rw-r--r--test-suite/success/Hints.v2
-rw-r--r--test-suite/success/Inductive.v2
-rw-r--r--test-suite/success/Nia.v918
-rw-r--r--test-suite/success/Notations2.v11
-rw-r--r--test-suite/success/NumeralNotations.v11
-rw-r--r--test-suite/success/Require.v5
-rw-r--r--test-suite/success/Template.v4
-rw-r--r--test-suite/success/Typeclasses.v14
-rw-r--r--test-suite/success/attribute_syntax.v6
-rw-r--r--test-suite/success/auto.v10
-rw-r--r--test-suite/success/autointros.v2
-rw-r--r--test-suite/success/bteauto.v8
-rw-r--r--test-suite/success/cumulativity.v9
-rw-r--r--test-suite/success/destruct.v2
-rw-r--r--test-suite/success/eauto.v12
-rw-r--r--test-suite/success/module_with_def_univ_poly.v31
-rw-r--r--test-suite/success/polymorphism.v18
-rw-r--r--test-suite/success/private_univs.v50
-rw-r--r--test-suite/success/setoid_test2.v4
-rw-r--r--test-suite/success/sprop.v189
-rw-r--r--test-suite/success/sprop_hcons.v52
-rw-r--r--test-suite/success/unidecls.v6
-rw-r--r--test-suite/success/univers.v2
-rwxr-xr-xtest-suite/tools/update-compat/run.sh2
-rw-r--r--test-suite/unit-tests/lib/pp_big_vect.ml14
-rw-r--r--test-suite/unit-tests/printing/proof_diffs_test.ml42
295 files changed, 5715 insertions, 2209 deletions
diff --git a/test-suite/.csdp.cache b/test-suite/.csdp.cache
index bd88c06d11..b85258505b 100644
--- a/test-suite/.csdp.cache
+++ b/test-suite/.csdp.cache
Binary files differ
diff --git a/test-suite/Makefile b/test-suite/Makefile
index 928a77cb8e..ba591ede20 100644
--- a/test-suite/Makefile
+++ b/test-suite/Makefile
@@ -34,18 +34,24 @@ include ../Makefile.common
# Default value when called from a freshly compiled Coq, but can be
# easily overridden
-LIB := ..
+
BIN := $(shell cd ..; pwd)/bin/
+COQFLAGS?=
+
+COQLIB?=
+ifeq ($(COQLIB),)
+ COQLIB := $(shell ocaml ocaml_pwd.ml ..)
+endif
+export COQLIB
-coqtop := $(BIN)coqtop -coqlib $(LIB) -boot -q -batch -test-mode -R prerequisite TestSuite
-coqc := $(BIN)coqc -coqlib $(LIB) -R prerequisite TestSuite
-coqchk := $(BIN)coqchk -coqlib $(LIB) -R prerequisite TestSuite
+coqc := $(BIN)coqc -q -R prerequisite TestSuite $(COQFLAGS)
+coqchk := $(BIN)coqchk -R prerequisite TestSuite
coqdoc := $(BIN)coqdoc
-coqtopbyte := $(BIN)coqtop.byte
+coqtop := $(BIN)coqtop -q -test-mode -R prerequisite TestSuite
+coqtopbyte := $(BIN)coqtop.byte -q
-coqtopload := $(coqtop) -async-proofs-cache force -load-vernac-source
-coqtopcompile := $(coqtop) -async-proofs-cache force -compile
-coqdep := $(BIN)coqdep -coqlib $(LIB)
+coqc_interactive := $(coqc) -test-mode -async-proofs-cache force
+coqdep := $(BIN)coqdep
VERBOSE?=
SHOW := $(if $(VERBOSE),@true,@echo)
@@ -59,10 +65,7 @@ SINGLE_QUOTE="
#" # double up on the quotes, in a comment, to appease the emacs syntax highlighter
# wrap the arguments in parens, but only if they exist
get_coq_prog_args_in_parens = $(subst $(SINGLE_QUOTE),,$(if $(call get_coq_prog_args,$(1)), ($(call get_coq_prog_args,$(1)))))
-# get the command to use with this set of arguments; if there's -compile, use coqc, else use coqtop
-has_profile_ltac_or_compile_flag = $(filter "-profile-ltac-cutoff" "-profile-ltac" "-compile",$(call get_coq_prog_args,$(1)))
-get_command_based_on_flags = $(if $(call has_profile_ltac_or_compile_flag,$(1)),$(coqtopcompile),$(coqtopload))
-
+get_set_impredicativity= $(filter "-impredicative-set",$(call get_coq_prog_args,$(1)))
bogomips:=
ifneq (,$(wildcard /proc/cpuinfo))
@@ -89,19 +92,17 @@ FAIL = >&2 echo 'FAILED $@'
# Testing subsystems
#######################################################################
-# Apart so that it can be easily skipped with overriding
+# These targets can be skipped by doing `make TARGET= test-suite`
COMPLEXITY := $(if $(bogomips),complexity)
-
BUGS := bugs/opened bugs/closed
-
INTERACTIVE := interactive
-
+UNIT_TESTS := unit-tests
VSUBSYSTEMS := prerequisite success failure $(BUGS) output \
output-modulo-time $(INTERACTIVE) micromega $(COMPLEXITY) modules stm \
- coqdoc ssr
+ coqdoc ssr arithmetic
# All subsystems
-SUBSYSTEMS := $(VSUBSYSTEMS) misc bugs ide vio coqchk coqwc coq-makefile tools unit-tests
+SUBSYSTEMS := $(VSUBSYSTEMS) misc bugs ide vio coqchk coqwc coq-makefile tools $(UNIT_TESTS)
PREREQUISITELOG = prerequisite/admit.v.log \
prerequisite/make_local.v.log prerequisite/make_notation.v.log \
@@ -118,6 +119,10 @@ PREREQUISITELOG = prerequisite/admit.v.log \
all: run
$(MAKE) report
+# do nothing
+.PHONY: noop
+noop: ;
+
run: $(SUBSYSTEMS)
bugs: $(BUGS)
@@ -175,6 +180,7 @@ summary:
$(call summary_dir, "Coqdoc tests", coqdoc); \
$(call summary_dir, "tools/ tests", tools); \
$(call summary_dir, "Unit tests", unit-tests); \
+ $(call summary_dir, "Machine arithmetic tests", arithmetic); \
nb_success=`find . -name '*.log' -exec tail -n2 '{}' \; | grep -e $(log_success) | wc -l`; \
nb_failure=`find . -name '*.log' -exec tail -n2 '{}' \; | grep -e $(log_failure) | wc -l`; \
nb_tests=`expr $$nb_success + $$nb_failure`; \
@@ -187,14 +193,6 @@ summary.log:
$(SHOW) BUILDING SUMMARY FILE
$(HIDE)$(MAKE) --quiet summary > "$@"
-# if not on travis we can get the log files (they're just there for a
-# local build, and downloadable on GitLab)
-PRINT_LOGS?=
-TRAVIS?= # special because we want to print travis_fold directives
-ifdef APPVEYOR
-PRINT_LOGS:=APPVEYOR
-endif #APPVEYOR
-
report: summary.log
$(HIDE)bash report.sh
@@ -213,7 +211,7 @@ $(addsuffix .log,$(wildcard bugs/opened/*.v)): %.v.log: %.v
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
if [ $$R = 0 ]; then \
echo $(log_success); \
echo " $<...still active"; \
@@ -235,7 +233,7 @@ $(addsuffix .log,$(wildcard bugs/closed/*.v)): %.v.log: %.v
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
if [ $$R = 0 ]; then \
echo $(log_success); \
echo " $<...Ok"; \
@@ -266,6 +264,7 @@ ifeq ($(LOCAL),true)
endif
OCAMLOPT := $(OCAMLFIND) opt $(CAMLFLAGS)
+OCAMLC := $(OCAMLFIND) ocamlc $(CAMLFLAGS)
# ML files from unit-test framework, not containing tests
UNIT_SRCFILES:=$(shell find ./unit-tests/src -name *.ml)
@@ -273,24 +272,31 @@ UNIT_ALLMLFILES:=$(shell find ./unit-tests -name *.ml)
UNIT_MLFILES:=$(filter-out $(UNIT_SRCFILES),$(UNIT_ALLMLFILES))
UNIT_LOGFILES:=$(patsubst %.ml,%.ml.log,$(UNIT_MLFILES))
-UNIT_CMXS=utest.cmx
+ifneq ($(BEST),opt)
+UNIT_LINK:=utest.cmo
+OCAMLBEST:=$(OCAMLC)
+else
+UNIT_LINK:=utest.cmx
+OCAMLBEST:=$(OCAMLOPT)
+endif
unit-tests/src/utest.cmx: unit-tests/src/utest.ml unit-tests/src/utest.cmi
$(SHOW) 'OCAMLOPT $<'
$(HIDE)$(OCAMLOPT) -c -I unit-tests/src -package oUnit $<
+unit-tests/src/utest.cmo: unit-tests/src/utest.ml unit-tests/src/utest.cmi
+ $(SHOW) 'OCAMLC $<'
+ $(HIDE)$(OCAMLC) -c -I unit-tests/src -package oUnit $<
unit-tests/src/utest.cmi: unit-tests/src/utest.mli
- $(SHOW) 'OCAMLOPT $<'
- $(HIDE)$(OCAMLOPT) -package oUnit $<
-
-$(UNIT_LOGFILES): unit-tests/src/utest.cmx
+ $(SHOW) 'OCAMLC $<'
+ $(HIDE)$(OCAMLC) -package oUnit -c $<
unit-tests: $(UNIT_LOGFILES)
# Build executable, run it to generate log file
-unit-tests/%.ml.log: unit-tests/%.ml
+unit-tests/%.ml.log: unit-tests/%.ml unit-tests/src/$(UNIT_LINK)
$(SHOW) 'TEST $<'
- $(HIDE)$(OCAMLOPT) -linkall -linkpkg -package coq.toplevel,oUnit \
- -I unit-tests/src $(UNIT_CMXS) $< -o $<.test;
+ $(HIDE)$(OCAMLBEST) -linkall -linkpkg -package coq.toplevel,oUnit \
+ -I unit-tests/src $(UNIT_LINK) $< -o $<.test;
$(HIDE)./$<.test
#######################################################################
@@ -301,7 +307,7 @@ $(addsuffix .log,$(wildcard prerequisite/*.v)): %.v.log: %.v
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
if [ $$R != 0 ]; then \
echo $(log_failure); \
echo " $<...could not be prepared" ; \
@@ -313,12 +319,12 @@ $(addsuffix .log,$(wildcard prerequisite/*.v)): %.v.log: %.v
} > "$@"
ssr: $(wildcard ssr/*.v:%.v=%.v.log)
-$(addsuffix .log,$(wildcard ssr/*.v success/*.v micromega/*.v modules/*.v)): %.v.log: %.v $(PREREQUISITELOG)
+$(addsuffix .log,$(wildcard ssr/*.v success/*.v micromega/*.v modules/*.v arithmetic/*.v)): %.v.log: %.v $(PREREQUISITELOG)
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
opts="$(if $(findstring modules/,$<),-R modules Mods)"; \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") $$opts 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") $$opts 2>&1; R=$$?; times; \
if [ $$R = 0 ]; then \
echo $(log_success); \
echo " $<...Ok"; \
@@ -328,13 +334,23 @@ $(addsuffix .log,$(wildcard ssr/*.v success/*.v micromega/*.v modules/*.v)): %.v
$(FAIL); \
fi; \
} > "$@"
+ @echo "CHECK $<"
+ $(HIDE){ \
+ opts="$(if $(findstring modules/,$<),-R modules Mods -norec Mods.$(shell basename $< .v),-I $(shell dirname $<) -norec $(shell basename $< .v))"; \
+ $(coqchk) -silent $(call get_set_impredicativity,$<) $$opts 2>&1; R=$$?; \
+ if [ $$R != 0 ]; then \
+ echo $(log_failure); \
+ echo " $<...could not be checked (Error!)" ; \
+ $(FAIL); \
+ fi; \
+ } > "$(shell dirname $<)/$(shell basename $< .v).chk.log"
stm: $(wildcard stm/*.v:%.v=%.v.log)
$(addsuffix .log,$(wildcard stm/*.v)): %.v.log: %.v
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") -async-proofs on \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") -async-proofs on \
$$opts 2>&1; R=$$?; times; \
if [ $$R = 0 ]; then \
echo $(log_success); \
@@ -345,12 +361,21 @@ $(addsuffix .log,$(wildcard stm/*.v)): %.v.log: %.v
$(FAIL); \
fi; \
} > "$@"
+ @echo "CHECK $<"
+ $(HIDE){ \
+ $(coqchk) -silent -I $(shell dirname $<) -norec $(shell basename $< .v) 2>&1; R=$$?; \
+ if [ $$R != 0 ]; then \
+ echo $(log_failure); \
+ echo " $<...could not be checked (Error!)" ; \
+ $(FAIL); \
+ fi; \
+ } > "$(shell dirname $<)/$(shell basename $< .v).chk.log"
$(addsuffix .log,$(wildcard failure/*.v)): %.v.log: %.v $(PREREQUISITELOG)
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
if [ $$R = 0 ]; then \
echo $(log_success); \
echo " $<...Ok"; \
@@ -360,13 +385,22 @@ $(addsuffix .log,$(wildcard failure/*.v)): %.v.log: %.v $(PREREQUISITELOG)
$(FAIL); \
fi; \
} > "$@"
+ @echo "CHECK $<"
+ $(HIDE){ \
+ $(coqchk) -silent -I $(shell dirname $<) -norec $(shell basename $< .v) 2>&1; R=$$?; \
+ if [ $$R != 0 ]; then \
+ echo $(log_failure); \
+ echo " $<...could not be checked (Error!)" ; \
+ $(FAIL); \
+ fi; \
+ } > "$(shell dirname $<)/$(shell basename $< .v).chk.log"
$(addsuffix .log,$(wildcard output/*.v)): %.v.log: %.v %.out $(PREREQUISITELOG)
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
output=$*.out.real; \
- $(call get_command_based_on_flags,"$<") "$<" $(call get_coq_prog_args,"$<") 2>&1 \
+ $(coqc_interactive) "$<" $(call get_coq_prog_args,"$<") 2>&1 \
| grep -v "Welcome to Coq" \
| grep -v "\[Loading ML file" \
| grep -v "Skipping rcfile loading" \
@@ -405,7 +439,7 @@ $(addsuffix .log,$(wildcard output-modulo-time/*.v)): %.v.log: %.v %.out
echo $(call log_intro,$<); \
tmpoutput=`mktemp /tmp/coqcheck.XXXXXX`; \
tmpexpected=`mktemp /tmp/coqcheck.XXXXXX`; \
- $(call get_command_based_on_flags,"$<") "$<" $(call get_coq_prog_args,"$<") 2>&1 \
+ $(coqc_interactive) "$<" $(call get_coq_prog_args,"$<") 2>&1 \
| grep -v "Welcome to Coq" \
| grep -v "\[Loading ML file" \
| grep -v "Skipping rcfile loading" \
@@ -460,7 +494,7 @@ $(addsuffix .log,$(wildcard complexity/*.v)): %.v.log: %.v $(PREREQUISITELOG)
$(HIDE){ \
echo $(call log_intro,$<); \
true "extract effective user time"; \
- res=`$(call get_command_based_on_flags,"$<") "$<" $(call get_coq_prog_args,"$<") 2>&1 | sed -n -e "s/Finished transaction in .*(\([0-9]*\.[0-9]*\)u.*)/\1/p" | head -1`; \
+ res=`$(coqc_interactive) "$<" $(call get_coq_prog_args,"$<") 2>&1 | sed -n -e "s/Finished transaction in .*(\([0-9]*\.[0-9]*\)u.*)/\1/p" | head -1`; \
R=$$?; times; \
if [ $$R != 0 ]; then \
echo $(log_failure); \
@@ -491,7 +525,7 @@ $(addsuffix .log,$(wildcard ideal-features/*.v)): %.v.log: %.v $(PREREQUISITELOG
@echo "TEST $< $(call get_coq_prog_args_in_parens,"$<")"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(coqtopcompile) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
+ $(coqc) "$<" $(call get_coq_prog_args,"$<") 2>&1; R=$$?; times; \
if [ $$R != 0 ]; then \
echo $(log_success); \
echo " $<...still wished"; \
@@ -505,7 +539,7 @@ $(addsuffix .log,$(wildcard ideal-features/*.v)): %.v.log: %.v $(PREREQUISITELOG
# Additional dependencies for module tests
$(addsuffix .log,$(wildcard modules/*.v)): %.v.log: modules/Nat.vo modules/plik.vo
modules/%.vo: modules/%.v
- $(HIDE)$(coqtop) -R modules Mods -compile $<
+ $(HIDE)$(coqc) -R modules Mods $<
#######################################################################
# Miscellaneous tests
@@ -524,7 +558,7 @@ $(patsubst %.sh,%.log,$(wildcard misc/*.sh)): %.log: %.sh $(PREREQUISITELOG)
echo $(call log_intro,$<); \
export BIN="$(BIN)"; \
export coqc="$(coqc)"; \
- export coqtop="$(coqtop)"; \
+ export coqtop="$(coqc)"; \
export coqdep="$(coqdep)"; \
export coqtopbyte="$(coqtopbyte)"; \
"$<" 2>&1; R=$$?; times; \
@@ -546,7 +580,7 @@ ide : $(patsubst %.fake,%.fake.log,$(wildcard ide/*.fake))
@echo "TEST $<"
$(HIDE){ \
echo $(call log_intro,$<); \
- $(BIN)fake_ide $< "-coqlib $(LIB) -boot -async-proofs on -async-proofs-tactic-error-resilience off -async-proofs-command-error-resilience off" 2>&1; \
+ $(BIN)fake_ide "$<" "-q -async-proofs on -async-proofs-tactic-error-resilience off -async-proofs-command-error-resilience off $(call get_coq_prog_args,"$<")" 2>&1; \
if [ $$? = 0 ]; then \
echo $(log_success); \
echo " $<...Ok"; \
@@ -565,7 +599,7 @@ vio: $(patsubst %.v,%.vio.log,$(wildcard vio/*.v))
@echo "TEST $<"
$(HIDE){ \
$(coqc) -quick -R vio vio $* 2>&1 && \
- $(coqtop) -R vio vio -vio2vo $*.vio 2>&1 && \
+ $(coqc) -R vio vio -vio2vo $*.vio 2>&1 && \
$(coqchk) -R vio vio -norec $(subst /,.,$*) 2>&1; \
if [ $$? = 0 ]; then \
echo $(log_success); \
diff --git a/test-suite/arithmetic/add.v b/test-suite/arithmetic/add.v
new file mode 100644
index 0000000000..fb7eb1d53c
--- /dev/null
+++ b/test-suite/arithmetic/add.v
@@ -0,0 +1,18 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 2 + 3 = 5).
+Check (eq_refl 5 <: 2 + 3 = 5).
+Check (eq_refl 5 <<: 2 + 3 = 5).
+
+Definition compute1 := Eval compute in 2 + 3.
+Check (eq_refl compute1 : 5 = 5).
+
+Check (eq_refl : 9223372036854775807 + 1 = 0).
+Check (eq_refl 0 <: 9223372036854775807 + 1 = 0).
+Check (eq_refl 0 <<: 9223372036854775807 + 1 = 0).
+Definition compute2 := Eval compute in 9223372036854775807 + 1.
+Check (eq_refl compute2 : 0 = 0).
diff --git a/test-suite/arithmetic/addc.v b/test-suite/arithmetic/addc.v
new file mode 100644
index 0000000000..432aec0291
--- /dev/null
+++ b/test-suite/arithmetic/addc.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 2 +c 3 = C0 5).
+Check (eq_refl (C0 5) <: 2 +c 3 = C0 5).
+Check (eq_refl (C0 5) <<: 2 +c 3 = C0 5).
+Definition compute1 := Eval compute in 2 +c 3.
+Check (eq_refl compute1 : C0 5 = C0 5).
+
+Check (eq_refl : 9223372036854775807 +c 2 = C1 1).
+Check (eq_refl (C1 1) <: 9223372036854775807 +c 2 = C1 1).
+Check (eq_refl (C1 1) <<: 9223372036854775807 +c 2 = C1 1).
+Definition compute2 := Eval compute in 9223372036854775807 +c 2.
+Check (eq_refl compute2 : C1 1 = C1 1).
diff --git a/test-suite/arithmetic/addcarryc.v b/test-suite/arithmetic/addcarryc.v
new file mode 100644
index 0000000000..a4430769ca
--- /dev/null
+++ b/test-suite/arithmetic/addcarryc.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : addcarryc 2 3 = C0 6).
+Check (eq_refl (C0 6) <: addcarryc 2 3 = C0 6).
+Check (eq_refl (C0 6) <<: addcarryc 2 3 = C0 6).
+Definition compute1 := Eval compute in addcarryc 2 3.
+Check (eq_refl compute1 : C0 6 = C0 6).
+
+Check (eq_refl : addcarryc 9223372036854775807 2 = C1 2).
+Check (eq_refl (C1 2) <: addcarryc 9223372036854775807 2 = C1 2).
+Check (eq_refl (C1 2) <<: addcarryc 9223372036854775807 2 = C1 2).
+Definition compute2 := Eval compute in addcarryc 9223372036854775807 2.
+Check (eq_refl compute2 : C1 2 = C1 2).
diff --git a/test-suite/arithmetic/addmuldiv.v b/test-suite/arithmetic/addmuldiv.v
new file mode 100644
index 0000000000..72b0164b49
--- /dev/null
+++ b/test-suite/arithmetic/addmuldiv.v
@@ -0,0 +1,12 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : addmuldiv 32 3 5629499534213120 = 12887523328).
+Check (eq_refl 12887523328 <: addmuldiv 32 3 5629499534213120 = 12887523328).
+Check (eq_refl 12887523328 <<: addmuldiv 32 3 5629499534213120 = 12887523328).
+
+Definition compute2 := Eval compute in addmuldiv 32 3 5629499534213120.
+Check (eq_refl compute2 : 12887523328 = 12887523328).
diff --git a/test-suite/arithmetic/compare.v b/test-suite/arithmetic/compare.v
new file mode 100644
index 0000000000..a8d1ea1226
--- /dev/null
+++ b/test-suite/arithmetic/compare.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 1 ?= 1 = Eq).
+Check (eq_refl Eq <: 1 ?= 1 = Eq).
+Check (eq_refl Eq <<: 1 ?= 1 = Eq).
+Definition compute1 := Eval compute in 1 ?= 1.
+Check (eq_refl compute1 : Eq = Eq).
+
+Check (eq_refl : 1 ?= 2 = Lt).
+Check (eq_refl Lt <: 1 ?= 2 = Lt).
+Check (eq_refl Lt <<: 1 ?= 2 = Lt).
+Definition compute2 := Eval compute in 1 ?= 2.
+Check (eq_refl compute2 : Lt = Lt).
+
+Check (eq_refl : 9223372036854775807 ?= 0 = Gt).
+Check (eq_refl Gt <: 9223372036854775807 ?= 0 = Gt).
+Check (eq_refl Gt <<: 9223372036854775807 ?= 0 = Gt).
+Definition compute3 := Eval compute in 9223372036854775807 ?= 0.
+Check (eq_refl compute3 : Gt = Gt).
diff --git a/test-suite/arithmetic/div.v b/test-suite/arithmetic/div.v
new file mode 100644
index 0000000000..0ee0b91580
--- /dev/null
+++ b/test-suite/arithmetic/div.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 6 / 3 = 2).
+Check (eq_refl 2 <: 6 / 3 = 2).
+Check (eq_refl 2 <<: 6 / 3 = 2).
+Definition compute1 := Eval compute in 6 / 3.
+Check (eq_refl compute1 : 2 = 2).
+
+Check (eq_refl : 3 / 2 = 1).
+Check (eq_refl 1 <: 3 / 2 = 1).
+Check (eq_refl 1 <<: 3 / 2 = 1).
+Definition compute2 := Eval compute in 3 / 2.
+Check (eq_refl compute2 : 1 = 1).
diff --git a/test-suite/arithmetic/diveucl.v b/test-suite/arithmetic/diveucl.v
new file mode 100644
index 0000000000..8f88a0f356
--- /dev/null
+++ b/test-suite/arithmetic/diveucl.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : diveucl 6 3 = (2,0)).
+Check (eq_refl (2,0) <: diveucl 6 3 = (2,0)).
+Check (eq_refl (2,0) <<: diveucl 6 3 = (2,0)).
+Definition compute1 := Eval compute in diveucl 6 3.
+Check (eq_refl compute1 : (2,0) = (2,0)).
+
+Check (eq_refl : diveucl 5 3 = (1,2)).
+Check (eq_refl (1,2) <: diveucl 5 3 = (1,2)).
+Check (eq_refl (1,2) <<: diveucl 5 3 = (1,2)).
+Definition compute2 := Eval compute in diveucl 5 3.
+Check (eq_refl compute2 : (1,2) = (1,2)).
diff --git a/test-suite/arithmetic/diveucl_21.v b/test-suite/arithmetic/diveucl_21.v
new file mode 100644
index 0000000000..7e12a08906
--- /dev/null
+++ b/test-suite/arithmetic/diveucl_21.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : diveucl_21 1 1 2 = (4611686018427387904,1)).
+Check (eq_refl (4611686018427387904,1) <: diveucl_21 1 1 2 = (4611686018427387904,1)).
+Check (eq_refl (4611686018427387904,1) <<: diveucl_21 1 1 2 = (4611686018427387904,1)).
+Definition compute1 := Eval compute in diveucl_21 1 1 2.
+Check (eq_refl compute1 : (4611686018427387904,1) = (4611686018427387904,1)).
+
+Check (eq_refl : diveucl_21 3 1 2 = (4611686018427387904, 1)).
+Check (eq_refl (4611686018427387904, 1) <: diveucl_21 3 1 2 = (4611686018427387904, 1)).
+Check (eq_refl (4611686018427387904, 1) <<: diveucl_21 3 1 2 = (4611686018427387904, 1)).
+Definition compute2 := Eval compute in diveucl_21 3 1 2.
+Check (eq_refl compute2 : (4611686018427387904, 1) = (4611686018427387904, 1)).
diff --git a/test-suite/arithmetic/eqb.v b/test-suite/arithmetic/eqb.v
new file mode 100644
index 0000000000..dcc0b71f6d
--- /dev/null
+++ b/test-suite/arithmetic/eqb.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 1 == 1 = true).
+Check (eq_refl true <: 1 == 1 = true).
+Check (eq_refl true <<: 1 == 1 = true).
+Definition compute1 := Eval compute in 1 == 1.
+Check (eq_refl compute1 : true = true).
+
+Check (eq_refl : 9223372036854775807 == 0 = false).
+Check (eq_refl false <: 9223372036854775807 == 0 = false).
+Check (eq_refl false <<: 9223372036854775807 == 0 = false).
+Definition compute2 := Eval compute in 9223372036854775807 == 0.
+Check (eq_refl compute2 : false = false).
diff --git a/test-suite/arithmetic/head0.v b/test-suite/arithmetic/head0.v
new file mode 100644
index 0000000000..f4234d2605
--- /dev/null
+++ b/test-suite/arithmetic/head0.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : head0 3 = 61).
+Check (eq_refl 61 <: head0 3 = 61).
+Check (eq_refl 61 <<: head0 3 = 61).
+Definition compute1 := Eval compute in head0 3.
+Check (eq_refl compute1 : 61 = 61).
+
+Check (eq_refl : head0 4611686018427387904 = 0).
+Check (eq_refl 0 <: head0 4611686018427387904 = 0).
+Check (eq_refl 0 <<: head0 4611686018427387904 = 0).
+Definition compute2 := Eval compute in head0 4611686018427387904.
+Check (eq_refl compute2 : 0 = 0).
+
+Check (eq_refl : head0 0 = 63).
+Check (eq_refl 63 <: head0 0 = 63).
+Check (eq_refl 63 <<: head0 0 = 63).
+Definition compute3 := Eval compute in head0 0.
+Check (eq_refl compute3 : 63 = 63).
diff --git a/test-suite/arithmetic/isint.v b/test-suite/arithmetic/isint.v
new file mode 100644
index 0000000000..c215caa878
--- /dev/null
+++ b/test-suite/arithmetic/isint.v
@@ -0,0 +1,50 @@
+(* This file tests the check that arithmetic operations use to know if their
+arguments are ground. The various test cases correspond to possible
+optimizations of these tests made by the compiler. *)
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Section test.
+
+Variable m n : int.
+
+Check (eq_refl : (fun x => x + 3) m = m + 3).
+Check (eq_refl (m + 3) <: (fun x => x + 3) m = m + 3).
+Check (eq_refl (m + 3) <<: (fun x => x + 3) m = m + 3).
+Definition compute1 := Eval compute in (fun x => x + 3) m.
+Check (eq_refl compute1 : m + 3 = m + 3).
+
+Check (eq_refl : (fun x => 3 + x) m = 3 + m).
+Check (eq_refl (3 + m) <: (fun x => 3 + x) m = 3 + m).
+Check (eq_refl (3 + m) <<: (fun x => 3 + x) m = 3 + m).
+Definition compute2 := Eval compute in (fun x => 3 + x) m.
+Check (eq_refl compute2 : 3 + m = 3 + m).
+
+Check (eq_refl : (fun x y => x + y) m n = m + n).
+Check (eq_refl (m + n) <: (fun x y => x + y) m n = m + n).
+Check (eq_refl (m + n) <<: (fun x y => x + y) m n = m + n).
+Definition compute3 := Eval compute in (fun x y => x + y) m n.
+Check (eq_refl compute3 : m + n = m + n).
+
+Check (eq_refl : (fun x y => x + y) 2 3 = 5).
+Check (eq_refl 5 <: (fun x y => x + y) 2 3 = 5).
+Check (eq_refl 5 <<: (fun x y => x + y) 2 3 = 5).
+Definition compute4 := Eval compute in (fun x y => x + y) 2 3.
+Check (eq_refl compute4 : 5 = 5).
+
+Check (eq_refl : (fun x => x + x) m = m + m).
+Check (eq_refl (m + m) <: (fun x => x + x) m = m + m).
+Check (eq_refl (m + m) <<: (fun x => x + x) m = m + m).
+Definition compute5 := Eval compute in (fun x => x + x) m.
+Check (eq_refl compute5 : m + m = m + m).
+
+Check (eq_refl : (fun x => x + x) 2 = 4).
+Check (eq_refl 4 <: (fun x => x + x) 2 = 4).
+Check (eq_refl 4 <<: (fun x => x + x) 2 = 4).
+Definition compute6 := Eval compute in (fun x => x + x) 2.
+Check (eq_refl compute6 : 4 = 4).
+
+End test.
diff --git a/test-suite/arithmetic/land.v b/test-suite/arithmetic/land.v
new file mode 100644
index 0000000000..0ea6fd90b6
--- /dev/null
+++ b/test-suite/arithmetic/land.v
@@ -0,0 +1,29 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 0 land 0 = 0).
+Check (eq_refl 0 <: 0 land 0 = 0).
+Check (eq_refl 0 <<: 0 land 0 = 0).
+Definition compute1 := Eval compute in 0 land 0.
+Check (eq_refl compute1 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 land 0 = 0).
+Check (eq_refl 0 <: 9223372036854775807 land 0 = 0).
+Check (eq_refl 0 <<: 9223372036854775807 land 0 = 0).
+Definition compute2 := Eval compute in 9223372036854775807 land 0.
+Check (eq_refl compute2 : 0 = 0).
+
+Check (eq_refl : 0 land 9223372036854775807 = 0).
+Check (eq_refl 0 <: 0 land 9223372036854775807 = 0).
+Check (eq_refl 0 <<: 0 land 9223372036854775807 = 0).
+Definition compute3 := Eval compute in 0 land 9223372036854775807.
+Check (eq_refl compute3 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 land 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 9223372036854775807 land 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 9223372036854775807 land 9223372036854775807 = 9223372036854775807).
+Definition compute4 := Eval compute in 9223372036854775807 land 9223372036854775807.
+Check (eq_refl compute4 : 9223372036854775807 = 9223372036854775807).
diff --git a/test-suite/arithmetic/leb.v b/test-suite/arithmetic/leb.v
new file mode 100644
index 0000000000..5354919978
--- /dev/null
+++ b/test-suite/arithmetic/leb.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 1 <= 1 = true).
+Check (eq_refl true <: 1 <= 1 = true).
+Check (eq_refl true <<: 1 <= 1 = true).
+Definition compute1 := Eval compute in 1 <= 1.
+Check (eq_refl compute1 : true = true).
+
+Check (eq_refl : 1 <= 2 = true).
+Check (eq_refl true <: 1 <= 2 = true).
+Check (eq_refl true <<: 1 <= 2 = true).
+Definition compute2 := Eval compute in 1 <= 2.
+Check (eq_refl compute2 : true = true).
+
+Check (eq_refl : 9223372036854775807 <= 0 = false).
+Check (eq_refl false <: 9223372036854775807 <= 0 = false).
+Check (eq_refl false <<: 9223372036854775807 <= 0 = false).
+Definition compute3 := Eval compute in 9223372036854775807 <= 0.
+Check (eq_refl compute3 : false = false).
diff --git a/test-suite/arithmetic/lor.v b/test-suite/arithmetic/lor.v
new file mode 100644
index 0000000000..9c3b85c054
--- /dev/null
+++ b/test-suite/arithmetic/lor.v
@@ -0,0 +1,29 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 0 lor 0 = 0).
+Check (eq_refl 0 <: 0 lor 0 = 0).
+Check (eq_refl 0 <<: 0 lor 0 = 0).
+Definition compute1 := Eval compute in 0 lor 0.
+Check (eq_refl compute1 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 lor 0 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 9223372036854775807 lor 0 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 9223372036854775807 lor 0 = 9223372036854775807).
+Definition compute2 := Eval compute in 9223372036854775807 lor 0.
+Check (eq_refl compute2 : 9223372036854775807 = 9223372036854775807).
+
+Check (eq_refl : 0 lor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 0 lor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 0 lor 9223372036854775807 = 9223372036854775807).
+Definition compute3 := Eval compute in 0 lor 9223372036854775807.
+Check (eq_refl compute3 : 9223372036854775807 = 9223372036854775807).
+
+Check (eq_refl : 9223372036854775807 lor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 9223372036854775807 lor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 9223372036854775807 lor 9223372036854775807 = 9223372036854775807).
+Definition compute4 := Eval compute in 9223372036854775807 lor 9223372036854775807.
+Check (eq_refl compute4 : 9223372036854775807 = 9223372036854775807).
diff --git a/test-suite/arithmetic/lsl.v b/test-suite/arithmetic/lsl.v
new file mode 100644
index 0000000000..70f3b90140
--- /dev/null
+++ b/test-suite/arithmetic/lsl.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 3 << 61 = 6917529027641081856).
+Check (eq_refl 6917529027641081856 <: 3 << 61 = 6917529027641081856).
+Check (eq_refl 6917529027641081856 <<: 3 << 61 = 6917529027641081856).
+Definition compute1 := Eval compute in 3 << 61.
+Check (eq_refl compute1 : 6917529027641081856 = 6917529027641081856).
+
+Check (eq_refl : 2 << 62 = 0).
+Check (eq_refl 0 <: 2 << 62 = 0).
+Check (eq_refl 0 <<: 2 << 62 = 0).
+Definition compute2 := Eval compute in 2 << 62.
+Check (eq_refl compute2 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 << 64 = 0).
+Check (eq_refl 0 <: 9223372036854775807 << 64 = 0).
+Check (eq_refl 0 <<: 9223372036854775807 << 64 = 0).
+Definition compute3 := Eval compute in 9223372036854775807 << 64.
+Check (eq_refl compute3 : 0 = 0).
diff --git a/test-suite/arithmetic/lsr.v b/test-suite/arithmetic/lsr.v
new file mode 100644
index 0000000000..c36c24e237
--- /dev/null
+++ b/test-suite/arithmetic/lsr.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 6917529027641081856 >> 61 = 3).
+Check (eq_refl 3 <: 6917529027641081856 >> 61 = 3).
+Check (eq_refl 3 <<: 6917529027641081856 >> 61 = 3).
+Definition compute1 := Eval compute in 6917529027641081856 >> 61.
+Check (eq_refl compute1 : 3 = 3).
+
+Check (eq_refl : 2305843009213693952 >> 62 = 0).
+Check (eq_refl 0 <: 2305843009213693952 >> 62 = 0).
+Check (eq_refl 0 <<: 2305843009213693952 >> 62 = 0).
+Definition compute2 := Eval compute in 2305843009213693952 >> 62.
+Check (eq_refl compute2 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 >> 64 = 0).
+Check (eq_refl 0 <: 9223372036854775807 >> 64 = 0).
+Check (eq_refl 0 <<: 9223372036854775807 >> 64 = 0).
+Definition compute3 := Eval compute in 9223372036854775807 >> 64.
+Check (eq_refl compute3 : 0 = 0).
diff --git a/test-suite/arithmetic/ltb.v b/test-suite/arithmetic/ltb.v
new file mode 100644
index 0000000000..7ae5ac6493
--- /dev/null
+++ b/test-suite/arithmetic/ltb.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 1 < 1 = false).
+Check (eq_refl false <: 1 < 1 = false).
+Check (eq_refl false <<: 1 < 1 = false).
+Definition compute1 := Eval compute in 1 < 1.
+Check (eq_refl compute1 : false = false).
+
+Check (eq_refl : 1 < 2 = true).
+Check (eq_refl true <: 1 < 2 = true).
+Check (eq_refl true <<: 1 < 2 = true).
+Definition compute2 := Eval compute in 1 < 2.
+Check (eq_refl compute2 : true = true).
+
+Check (eq_refl : 9223372036854775807 < 0 = false).
+Check (eq_refl false <: 9223372036854775807 < 0 = false).
+Check (eq_refl false <<: 9223372036854775807 < 0 = false).
+Definition compute3 := Eval compute in 9223372036854775807 < 0.
+Check (eq_refl compute3 : false = false).
diff --git a/test-suite/arithmetic/lxor.v b/test-suite/arithmetic/lxor.v
new file mode 100644
index 0000000000..b453fc7697
--- /dev/null
+++ b/test-suite/arithmetic/lxor.v
@@ -0,0 +1,29 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 0 lxor 0 = 0).
+Check (eq_refl 0 <: 0 lxor 0 = 0).
+Check (eq_refl 0 <<: 0 lxor 0 = 0).
+Definition compute1 := Eval compute in 0 lxor 0.
+Check (eq_refl compute1 : 0 = 0).
+
+Check (eq_refl : 9223372036854775807 lxor 0 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 9223372036854775807 lxor 0 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 9223372036854775807 lxor 0 = 9223372036854775807).
+Definition compute2 := Eval compute in 9223372036854775807 lxor 0.
+Check (eq_refl compute2 : 9223372036854775807 = 9223372036854775807).
+
+Check (eq_refl : 0 lxor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 0 lxor 9223372036854775807 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 0 lxor 9223372036854775807 = 9223372036854775807).
+Definition compute3 := Eval compute in 0 lxor 9223372036854775807.
+Check (eq_refl compute3 : 9223372036854775807 = 9223372036854775807).
+
+Check (eq_refl : 9223372036854775807 lxor 9223372036854775807 = 0).
+Check (eq_refl 0 <: 9223372036854775807 lxor 9223372036854775807 = 0).
+Check (eq_refl 0 <<: 9223372036854775807 lxor 9223372036854775807 = 0).
+Definition compute4 := Eval compute in 9223372036854775807 lxor 9223372036854775807.
+Check (eq_refl compute4 : 0 = 0).
diff --git a/test-suite/arithmetic/mod.v b/test-suite/arithmetic/mod.v
new file mode 100644
index 0000000000..5307eed493
--- /dev/null
+++ b/test-suite/arithmetic/mod.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 6 \% 3 = 0).
+Check (eq_refl 0 <: 6 \% 3 = 0).
+Check (eq_refl 0 <<: 6 \% 3 = 0).
+Definition compute1 := Eval compute in 6 \% 3.
+Check (eq_refl compute1 : 0 = 0).
+
+Check (eq_refl : 5 \% 3 = 2).
+Check (eq_refl 2 <: 5 \% 3 = 2).
+Check (eq_refl 2 <<: 5 \% 3 = 2).
+Definition compute2 := Eval compute in 5 \% 3.
+Check (eq_refl compute2 : 2 = 2).
diff --git a/test-suite/arithmetic/mul.v b/test-suite/arithmetic/mul.v
new file mode 100644
index 0000000000..9480e8cd46
--- /dev/null
+++ b/test-suite/arithmetic/mul.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 2 * 3 = 6).
+Check (eq_refl 6 <: 2 * 3 = 6).
+Check (eq_refl 6 <<: 2 * 3 = 6).
+Definition compute1 := Eval compute in 2 * 3.
+Check (eq_refl compute1 : 6 = 6).
+
+Check (eq_refl : 9223372036854775807 * 2 = 9223372036854775806).
+Check (eq_refl 9223372036854775806 <: 9223372036854775807 * 2 = 9223372036854775806).
+Check (eq_refl 9223372036854775806 <<: 9223372036854775807 * 2 = 9223372036854775806).
+Definition compute2 := Eval compute in 9223372036854775807 * 2.
+Check (eq_refl compute2 : 9223372036854775806 = 9223372036854775806).
diff --git a/test-suite/arithmetic/mulc.v b/test-suite/arithmetic/mulc.v
new file mode 100644
index 0000000000..e10855bafa
--- /dev/null
+++ b/test-suite/arithmetic/mulc.v
@@ -0,0 +1,22 @@
+Require Import Cyclic63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 2 *c 3 = WW 0 6).
+Check (eq_refl (WW 0 6) <: 2 *c 3 = WW 0 6).
+Check (eq_refl (WW 0 6) <<: 2 *c 3 = WW 0 6).
+Definition compute1 := Eval compute in 2 *c 3.
+Check (eq_refl compute1 : WW 0 6 = WW 0 6).
+
+Check (eq_refl : 9223372036854775807 *c 2 = WW 1 9223372036854775806).
+Check (eq_refl (WW 1 9223372036854775806) <: 9223372036854775807 *c 2 = WW 1 9223372036854775806).
+Check (eq_refl (WW 1 9223372036854775806) <<: 9223372036854775807 *c 2 = WW 1 9223372036854775806).
+
+Definition compute2 := Eval compute in 9223372036854775807 *c 2.
+Check (eq_refl compute2 : WW 1 9223372036854775806 = WW 1 9223372036854775806).
+
+Check (eq_refl : 0 *c 0 = W0).
+Check (eq_refl (@W0 int) <: 0 *c 0 = W0).
+Check (eq_refl (@W0 int) <<: 0 *c 0 = W0).
diff --git a/test-suite/arithmetic/primitive.v b/test-suite/arithmetic/primitive.v
new file mode 100644
index 0000000000..f62f6109e1
--- /dev/null
+++ b/test-suite/arithmetic/primitive.v
@@ -0,0 +1,12 @@
+Section S.
+ Variable A : Type.
+ Fail Primitive int : let x := A in Set := #int63_type.
+ Fail Primitive add := #int63_add.
+End S.
+
+(* [Primitive] should be forbidden in sections, otherwise its type after cooking
+will be incorrect:
+
+Check int.
+
+*)
diff --git a/test-suite/arithmetic/reduction.v b/test-suite/arithmetic/reduction.v
new file mode 100644
index 0000000000..00e067ac5a
--- /dev/null
+++ b/test-suite/arithmetic/reduction.v
@@ -0,0 +1,28 @@
+Require Import Int63.
+
+Open Scope int63_scope.
+
+Definition div_eucl_plus_one i1 i2 :=
+ let (q,r) := diveucl i1 i2 in
+ (q+1, r+1)%int63.
+
+Definition rcbn := Eval cbn in div_eucl_plus_one 3 2.
+Check (eq_refl : rcbn = (2, 2)).
+
+Definition rcbv := Eval cbv in div_eucl_plus_one 3 2.
+Check (eq_refl : rcbv = (2, 2)).
+
+Definition rvmc := Eval vm_compute in div_eucl_plus_one 3 2.
+Check (eq_refl : rvmc = (2, 2)).
+
+Definition f n m :=
+ match (n ?= 42)%int63 with
+ | Lt => (n + m)%int63
+ | _ => (2*m)%int63
+ end.
+
+Goal forall n, (n ?= 42)%int63 = Gt -> f n 256 = 512%int63.
+ intros. unfold f.
+ cbn. Undo. cbv. (* Test reductions under match clauses *)
+ rewrite H. reflexivity.
+Qed.
diff --git a/test-suite/arithmetic/sub.v b/test-suite/arithmetic/sub.v
new file mode 100644
index 0000000000..1606fd2aa1
--- /dev/null
+++ b/test-suite/arithmetic/sub.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 3 - 2 = 1).
+Check (eq_refl 1 <: 3 - 2 = 1).
+Check (eq_refl 1 <<: 3 - 2 = 1).
+Definition compute1 := Eval compute in 3 - 2.
+Check (eq_refl compute1 : 1 = 1).
+
+Check (eq_refl : 0 - 1 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <: 0 - 1 = 9223372036854775807).
+Check (eq_refl 9223372036854775807 <<: 0 - 1 = 9223372036854775807).
+Definition compute2 := Eval compute in 0 - 1.
+Check (eq_refl compute2 : 9223372036854775807 = 9223372036854775807).
diff --git a/test-suite/arithmetic/subc.v b/test-suite/arithmetic/subc.v
new file mode 100644
index 0000000000..fc4067e48b
--- /dev/null
+++ b/test-suite/arithmetic/subc.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : 3 -c 2 = C0 1).
+Check (eq_refl (C0 1) <: 3 -c 2 = C0 1).
+Check (eq_refl (C0 1) <<: 3 -c 2 = C0 1).
+Definition compute1 := Eval compute in 3 -c 2.
+Check (eq_refl compute1 : C0 1 = C0 1).
+
+Check (eq_refl : 0 -c 1 = C1 9223372036854775807).
+Check (eq_refl (C1 9223372036854775807) <: 0 -c 1 = C1 9223372036854775807).
+Check (eq_refl (C1 9223372036854775807) <<: 0 -c 1 = C1 9223372036854775807).
+Definition compute2 := Eval compute in 0 -c 1.
+Check (eq_refl compute2 : C1 9223372036854775807 = C1 9223372036854775807).
diff --git a/test-suite/arithmetic/subcarryc.v b/test-suite/arithmetic/subcarryc.v
new file mode 100644
index 0000000000..e81b6536b2
--- /dev/null
+++ b/test-suite/arithmetic/subcarryc.v
@@ -0,0 +1,17 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : subcarryc 3 1 = C0 1).
+Check (eq_refl (C0 1) <: subcarryc 3 1 = C0 1).
+Check (eq_refl (C0 1) <<: subcarryc 3 1 = C0 1).
+Definition compute1 := Eval compute in subcarryc 3 1.
+Check (eq_refl compute1 : C0 1 = C0 1).
+
+Check (eq_refl : subcarryc 0 1 = C1 9223372036854775806).
+Check (eq_refl (C1 9223372036854775806) <: subcarryc 0 1 = C1 9223372036854775806).
+Check (eq_refl (C1 9223372036854775806) <<: subcarryc 0 1 = C1 9223372036854775806).
+Definition compute2 := Eval compute in subcarryc 0 1.
+Check (eq_refl compute2 : C1 9223372036854775806 = C1 9223372036854775806).
diff --git a/test-suite/arithmetic/tail0.v b/test-suite/arithmetic/tail0.v
new file mode 100644
index 0000000000..c9d426087a
--- /dev/null
+++ b/test-suite/arithmetic/tail0.v
@@ -0,0 +1,23 @@
+Require Import Int63.
+
+Set Implicit Arguments.
+
+Open Scope int63_scope.
+
+Check (eq_refl : tail0 2305843009213693952 = 61).
+Check (eq_refl 61 <: tail0 2305843009213693952 = 61).
+Check (eq_refl 61 <<: tail0 2305843009213693952 = 61).
+Definition compute1 := Eval compute in tail0 2305843009213693952.
+Check (eq_refl compute1 : 61 = 61).
+
+Check (eq_refl : tail0 1 = 0).
+Check (eq_refl 0 <: tail0 1 = 0).
+Check (eq_refl 0 <<: tail0 1 = 0).
+Definition compute2 := Eval compute in tail0 1.
+Check (eq_refl compute2 : 0 = 0).
+
+Check (eq_refl : tail0 0 = 63).
+Check (eq_refl 63 <: tail0 0 = 63).
+Check (eq_refl 63 <<: tail0 0 = 63).
+Definition compute3 := Eval compute in tail0 0.
+Check (eq_refl compute3 : 63 = 63).
diff --git a/test-suite/arithmetic/unsigned.v b/test-suite/arithmetic/unsigned.v
new file mode 100644
index 0000000000..82920bd201
--- /dev/null
+++ b/test-suite/arithmetic/unsigned.v
@@ -0,0 +1,18 @@
+(* This file checks that operations over int63 are unsigned. *)
+Require Import Int63.
+
+Open Scope int63_scope.
+
+(* (0-1) must be the maximum integer value and not negative 1 *)
+
+Check (eq_refl : 1/(0-1) = 0).
+Check (eq_refl 0 <: 1/(0-1) = 0).
+Check (eq_refl 0 <<: 1/(0-1) = 0).
+Definition compute1 := Eval compute in 1/(0-1).
+Check (eq_refl compute1 : 0 = 0).
+
+Check (eq_refl : 3 \% (0-1) = 3).
+Check (eq_refl 3 <: 3 \% (0-1) = 3).
+Check (eq_refl 3 <<: 3 \% (0-1) = 3).
+Definition compute2 := Eval compute in 3 \% (0-1).
+Check (eq_refl compute2 : 3 = 3).
diff --git a/test-suite/bugs/closed/HoTT_coq_056.v b/test-suite/bugs/closed/HoTT_coq_056.v
index 3e3a987a7c..e28314cada 100644
--- a/test-suite/bugs/closed/HoTT_coq_056.v
+++ b/test-suite/bugs/closed/HoTT_coq_056.v
@@ -82,7 +82,7 @@ Notation "F ^op" := (OppositeFunctor F) : functor_scope.
Definition FunctorProduct' C D C' D' (F : Functor C D) (F' : Functor C' D') : Functor (C * C') (D * D')
:= admit.
-Global Class FunctorApplicationInterpretable
+Class FunctorApplicationInterpretable
{C D} (F : Functor C D)
{argsT : Type} (args : argsT)
{T : Type} (rtn : T)
@@ -94,9 +94,9 @@ Definition FunctorApplicationOf {C D} F {argsT} args {T} {rtn}
Global Arguments FunctorApplicationOf / {C} {D} F {argsT} args {T} {rtn} {_}.
Global Instance FunctorApplicationDash C D (F : Functor C D)
-: FunctorApplicationInterpretable F (IdentityFunctor C) F | 0.
+: FunctorApplicationInterpretable F (IdentityFunctor C) F | 0 := {}.
Global Instance FunctorApplicationFunctorFunctor' A B C C' D (F : Functor (A * B) D) (G : Functor C A) (H : Functor C' B)
-: FunctorApplicationInterpretable F (G, H) (F ∘ (FunctorProduct' G H))%functor | 100.
+: FunctorApplicationInterpretable F (G, H) (F ∘ (FunctorProduct' G H))%functor | 100 := {}.
Notation "F ⟨ x ⟩" := (FunctorApplicationOf F%functor x%functor) : functor_scope.
diff --git a/test-suite/bugs/closed/HoTT_coq_061.v b/test-suite/bugs/closed/HoTT_coq_061.v
index 19551dc92e..72bc04e05e 100644
--- a/test-suite/bugs/closed/HoTT_coq_061.v
+++ b/test-suite/bugs/closed/HoTT_coq_061.v
@@ -96,7 +96,7 @@ Definition NTWhiskerR C D E (F F' : Functor D E) (T : NaturalTransformation F F'
:= Build_NaturalTransformation (F o G) (F' o G)
(fun c => T (G c))
admit.
-Global Class NTC_Composable A B (a : A) (b : B) (T : Type) (term : T) := {}.
+Class NTC_Composable A B (a : A) (b : B) (T : Type) (term : T) := {}.
Definition NTC_Composable_term `{@NTC_Composable A B a b T term} := term.
Notation "T 'o' U"
diff --git a/test-suite/bugs/closed/HoTT_coq_120.v b/test-suite/bugs/closed/HoTT_coq_120.v
index a80d075f69..cd6539b51c 100644
--- a/test-suite/bugs/closed/HoTT_coq_120.v
+++ b/test-suite/bugs/closed/HoTT_coq_120.v
@@ -89,7 +89,7 @@ Definition set_cat : PreCategory
:= @Build_PreCategory hSet
(fun x y => forall _ : x, y)%core
(fun _ _ _ f g x => f (g x))%core.
-Local Inductive minus1Trunc (A :Type) : Type := min1 : A -> minus1Trunc A.
+Inductive minus1Trunc (A :Type) : Type := min1 : A -> minus1Trunc A.
Instance minus1Trunc_is_prop {A : Type} : IsHProp (minus1Trunc A) | 0. Admitted.
Definition hexists {X} (P:X->Type):Type:= minus1Trunc (sigT P).
Definition isepi {X Y} `(f:X->Y) := forall Z: hSet,
diff --git a/test-suite/bugs/closed/bug_2001.v b/test-suite/bugs/closed/bug_2001.v
index 652c65706a..31c62b7b36 100644
--- a/test-suite/bugs/closed/bug_2001.v
+++ b/test-suite/bugs/closed/bug_2001.v
@@ -1,12 +1,10 @@
(* Automatic computing of guard in "Theorem with"; check that guard is not
computed when the user explicitly indicated it *)
-Unset Automatic Introduction.
-
Inductive T : Set :=
| v : T.
-Definition f (s:nat) (t:T) : nat.
+Definition f : forall (s:nat) (t:T), nat.
fix f 2.
intros s t.
refine
diff --git a/test-suite/bugs/closed/bug_2830.v b/test-suite/bugs/closed/bug_2830.v
index 801c61b132..a321bb324e 100644
--- a/test-suite/bugs/closed/bug_2830.v
+++ b/test-suite/bugs/closed/bug_2830.v
@@ -194,14 +194,17 @@ Instance skel_equiv A : Equivalence (@skel A).
Admitted.
Import FunctionalExtensionality.
-Instance set_cat : Category Type (fun A B => A -> B) := {
+
+Instance set_cat : Category Type (fun A B => A -> B).
+refine {|
id := fun A => fun x => x
; comp c b a f g := fun x => f (g x)
; eqv := fun A B => @skel (A -> B)
-}.
+|}.
intros. compute. symmetry. apply eta_expansion.
intros. compute. symmetry. apply eta_expansion.
-intros. compute. reflexivity. Defined.
+intros. compute. reflexivity.
+Defined.
(* The [list] type constructor is a Functor. *)
diff --git a/test-suite/bugs/closed/bug_3324.v b/test-suite/bugs/closed/bug_3324.v
index 45dbb57aa2..dae0d4c024 100644
--- a/test-suite/bugs/closed/bug_3324.v
+++ b/test-suite/bugs/closed/bug_3324.v
@@ -6,7 +6,7 @@ Module ETassi.
Record hProp := hp { hproptype :> Type ; isp : IsHProp hproptype}.
Record hSet := BuildhSet {setT:> Type; iss :> IsHSet setT}.
Canonical Structure default_HSet:= fun T P => (@BuildhSet T P).
- Global Instance isset_hProp : IsHSet hProp | 0.
+ Global Instance isset_hProp : IsHSet hProp | 0 := {}.
Check (eq_refl _ : setT (default_HSet _ _) = hProp).
Check (eq_refl _ : setT _ = hProp).
@@ -22,7 +22,7 @@ Module JGross.
Definition Unit_hp:hProp:=(hp Unit admit).
Record hSet := BuildhSet {setT:> Type; iss :> IsHSet setT}.
Canonical Structure default_HSet:= fun T P => (@BuildhSet T P).
- Global Instance isset_hProp : IsHSet hProp | 0.
+ Global Instance isset_hProp : IsHSet hProp | 0 := {}.
Definition isepi {X Y} `(f:X->Y) := forall Z: hSet,
forall g h: Y -> Z, (fun x => g (f x)) = (fun x => h (f x)) -> g = h.
Lemma isepi_issurj {X Y} (f:X->Y): isepi f -> True.
diff --git a/test-suite/bugs/closed/bug_3325.v b/test-suite/bugs/closed/bug_3325.v
index 36c065ebe8..835b8a7f33 100644
--- a/test-suite/bugs/closed/bug_3325.v
+++ b/test-suite/bugs/closed/bug_3325.v
@@ -1,13 +1,13 @@
Typeclasses eauto := debug.
Set Printing All.
-Axiom SProp : Set.
-Axiom sp : SProp.
+Axiom sProp : Set.
+Axiom sp : sProp.
(* If we hardcode valueType := nat, it goes through *)
Class StateIs := {
valueType : Type;
- stateIs : valueType -> SProp
+ stateIs : valueType -> sProp
}.
Instance NatStateIs : StateIs := {
@@ -17,17 +17,17 @@ Instance NatStateIs : StateIs := {
Canonical Structure NatStateIs.
Class LogicOps F := { land: F -> F }.
-Instance : LogicOps SProp. Admitted.
+Instance : LogicOps sProp. Admitted.
Instance : LogicOps Prop. Admitted.
Parameter (n : nat).
(* If this is a [Definition], the resolution goes through fine. *)
Notation vn := (@stateIs _ n).
Definition vn' := (@stateIs _ n).
-Definition GOOD : SProp :=
+Definition GOOD : sProp :=
@land _ _ vn'.
(* This doesn't resolve, if PropLogicOps is defined later than SPropLogicOps *)
-Definition BAD : SProp :=
+Definition BAD : sProp :=
@land _ _ vn.
diff --git a/test-suite/bugs/closed/bug_3393.v b/test-suite/bugs/closed/bug_3393.v
index d2eb61e3e2..b0b573f5d5 100644
--- a/test-suite/bugs/closed/bug_3393.v
+++ b/test-suite/bugs/closed/bug_3393.v
@@ -109,6 +109,7 @@ Global Instance isisomorphism_compose' `{Funext}
`{@IsIsomorphism (C -> D) F F' T}
: @IsIsomorphism (C -> D) F F'' (T' o T)%natural_transformation
:= @isisomorphism_compose (C -> D) _ _ T' _ _ T _.
+Arguments isisomorphism_compose' {H C D F' F''} T' {F} T {H0 H1}.
Section lemmas.
Context `{Funext}.
Variable C : PreCategory.
diff --git a/test-suite/bugs/closed/bug_3422.v b/test-suite/bugs/closed/bug_3422.v
index 460ae8f110..1305104cdb 100644
--- a/test-suite/bugs/closed/bug_3422.v
+++ b/test-suite/bugs/closed/bug_3422.v
@@ -175,6 +175,7 @@ Global Instance isisomorphism_compose'
`{@IsIsomorphism (C -> D) F F' T}
: @IsIsomorphism (C -> D) F F'' (T' o T)%natural_transformation
:= @isisomorphism_compose (C -> D) _ _ T' _ _ T _.
+Arguments isisomorphism_compose' {C D F' F''} T' {F} T {H H0}.
Section lemmas.
Local Open Scope natural_transformation_scope.
diff --git a/test-suite/bugs/closed/bug_3427.v b/test-suite/bugs/closed/bug_3427.v
index 317efb0b32..f00d2fcf09 100644
--- a/test-suite/bugs/closed/bug_3427.v
+++ b/test-suite/bugs/closed/bug_3427.v
@@ -146,7 +146,7 @@ Section Univalence.
:= (equiv_path A B)^-1 f.
End Univalence.
-Local Inductive minus1Trunc (A :Type) : Type :=
+Inductive minus1Trunc (A :Type) : Type :=
min1 : A -> minus1Trunc A.
Instance minus1Trunc_is_prop {A : Type} : IsHProp (minus1Trunc A) | 0.
diff --git a/test-suite/bugs/closed/bug_3441.v b/test-suite/bugs/closed/bug_3441.v
deleted file mode 100644
index 52acb996f8..0000000000
--- a/test-suite/bugs/closed/bug_3441.v
+++ /dev/null
@@ -1,24 +0,0 @@
-Axiom f : nat -> nat -> nat.
-Fixpoint do_n (n : nat) (k : nat) :=
- match n with
- | 0 => k
- | S n' => do_n n' (f k k)
- end.
-
-Notation big := (_ = _).
-Axiom k : nat.
-Goal True.
-Timeout 1 let H := fresh "H" in
- let x := constr:(let n := 17 in do_n n = do_n n) in
- let y := (eval lazy in x) in
- pose proof y as H. (* Finished transaction in 1.102 secs (1.084u,0.016s) (successful) *)
-Timeout 1 let H := fresh "H" in
- let x := constr:(let n := 17 in do_n n = do_n n) in
- let y := (eval lazy in x) in
- pose y as H; clearbody H. (* Finished transaction in 0.412 secs (0.412u,0.s) (successful) *)
-
-Timeout 1 Time let H := fresh "H" in
- let x := constr:(let n := 17 in do_n n = do_n n) in
- let y := (eval lazy in x) in
- assert (H := y). (* Finished transaction in 1.19 secs (1.164u,0.024s) (successful) *)
-Abort.
diff --git a/test-suite/bugs/closed/bug_3454.v b/test-suite/bugs/closed/bug_3454.v
index e4cd60cb24..0a01adec33 100644
--- a/test-suite/bugs/closed/bug_3454.v
+++ b/test-suite/bugs/closed/bug_3454.v
@@ -32,14 +32,14 @@ Local Instance isequiv_tgt_compose A B
: @IsEquiv (A -> {xy : B * B & fst xy = snd xy})
(A -> B)
(@compose A {xy : B * B & fst xy = snd xy} B
- (@compose {xy : B * B & fst xy = snd xy} _ B (@snd B B) pr1)).
+ (@compose {xy : B * B & fst xy = snd xy} _ B (@snd B B) pr1)) := {}.
(* Toplevel input, characters 220-223: *)
(* Error: Cannot infer this placeholder. *)
Local Instance isequiv_tgt_compose' A B
: @IsEquiv (A -> {xy : B * B & fst xy = snd xy})
(A -> B)
- (@compose A {xy : B * B & fst xy = snd xy} B (@compose {xy : B * B & fst xy = snd xy} _ B (@snd _ _) pr1)).
+ (@compose A {xy : B * B & fst xy = snd xy} B (@compose {xy : B * B & fst xy = snd xy} _ B (@snd _ _) pr1)) := {}.
(* Toplevel input, characters 221-232: *)
(* Error: *)
(* In environment *)
@@ -52,7 +52,7 @@ Local Instance isequiv_tgt_compose'' A B
: @IsEquiv (A -> {xy : B * B & fst xy = snd xy})
(A -> B)
(@compose A {xy : B * B & fst xy = snd xy} B (@compose {xy : B * B & fst xy = snd xy} _ B (@snd _ _)
- (fun s => s.(projT1)))).
+ (fun s => s.(projT1)))) := {}.
(* Toplevel input, characters 15-241:
Error:
Cannot infer an internal placeholder of type "Type" in environment:
diff --git a/test-suite/bugs/closed/bug_3468.v b/test-suite/bugs/closed/bug_3468.v
new file mode 100644
index 0000000000..6ff394bca6
--- /dev/null
+++ b/test-suite/bugs/closed/bug_3468.v
@@ -0,0 +1,29 @@
+(* Checking that unrelated terms requiring some scope do not affect
+ the interpretation of tactic-in-term. The "Check" was failing with:
+ The term "Set" has type "Type" while it is expected to have type
+ "nat". *)
+
+Notation bar2 a b := (let __ := ltac:(exact I) in (a + b)%type) (only parsing).
+Check bar2 (Set + Set) Set.
+
+(* Taking into account scopes in notations containing tactic-in-term *)
+
+Declare Scope foo_scope.
+Delimit Scope foo_scope with foo.
+Notation "x ~~" := (x) (at level 0, only parsing) : foo_scope.
+Notation bar x := (x%foo) (only parsing).
+Notation baz x := ltac:(exact x%foo) (only parsing).
+Check bar (O ~~).
+Check baz (O ~~). (* Was failing *)
+
+(* This was reported as bug #8706 *)
+
+Declare Scope my_scope.
+Notation "@ a" := a%nat (at level 100, only parsing) : my_scope.
+Delimit Scope my_scope with my.
+
+Notation "& b" := ltac:(exact (b)%my) (at level 100, only parsing): my_scope.
+Definition test := (& (@4))%my.
+
+(* Check inconsistent scopes *)
+Fail Notation bar3 a := (let __ := ltac:(exact a%nat) in a%bool) (only parsing).
diff --git a/test-suite/bugs/closed/bug_3495.v b/test-suite/bugs/closed/bug_3495.v
index 7b0883f910..47db64a096 100644
--- a/test-suite/bugs/closed/bug_3495.v
+++ b/test-suite/bugs/closed/bug_3495.v
@@ -1,7 +1,7 @@
Require Import RelationClasses.
Axiom R : Prop -> Prop -> Prop.
-Declare Instance : Reflexive R.
+Declare Instance R_refl : Reflexive R.
Class bar := { x : False }.
Record foo := { a : Prop ; b : bar }.
diff --git a/test-suite/bugs/closed/bug_3682.v b/test-suite/bugs/closed/bug_3682.v
index 9d37d1a2d0..07b759afb5 100644
--- a/test-suite/bugs/closed/bug_3682.v
+++ b/test-suite/bugs/closed/bug_3682.v
@@ -1,6 +1,6 @@
Require Import TestSuite.admit.
Class Foo.
Definition bar `{Foo} (x : Set) := Set.
-Instance: Foo.
+Instance: Foo := {}.
Definition bar1 := bar nat.
Definition bar2 := bar ltac:(admit).
diff --git a/test-suite/bugs/closed/bug_3690.v b/test-suite/bugs/closed/bug_3690.v
index fa30132ab5..9273a20e19 100644
--- a/test-suite/bugs/closed/bug_3690.v
+++ b/test-suite/bugs/closed/bug_3690.v
@@ -41,8 +41,5 @@ Type@{Top.34} -> Type@{Top.37}
Top.36 < Top.34
Top.37 < Top.36
*) *)
-Fail Check @qux@{Set Set}.
-Check @qux@{Type Type Type Type}.
-(* [qux] should only need two universes *)
-Check @qux@{i j k l}. (* Error: The command has not failed!, but I think this is suboptimal *)
-Fail Check @qux@{i j}.
+Check @qux@{Type Type}.
+(* used to have 4 universes *)
diff --git a/test-suite/bugs/closed/bug_3956.v b/test-suite/bugs/closed/bug_3956.v
index 115284ec02..456fa11bd0 100644
--- a/test-suite/bugs/closed/bug_3956.v
+++ b/test-suite/bugs/closed/bug_3956.v
@@ -129,13 +129,13 @@ Module Comodality_Theory (F : Comodality).
:= IdmapM FPM.
Module cip_FPM := FPM.coindpathsM FPM cmpinv_o_cmp_M idmap_FPM.
Module cip_FPHM <: HomotopyM FPM cmpM.PM cip_FPM.fhM cip_FPM.fkM.
- Definition m : forall x, cip_FPM.fhM.m@{i j} x = cip_FPM.fkM.m@{i j} x.
+ Definition m : forall x, cip_FPM.fhM.m x = cip_FPM.fkM.m x.
Proof.
intros x.
- refine (concat (cmpinvM.m_beta@{i j} (cmpM.m@{i j} x)) _).
+ refine (concat (cmpinvM.m_beta (cmpM.m x)) _).
apply path_prod@{i i i}; simpl.
- - exact (cmpM.FfstM.mM.m_beta@{i j} x).
- - exact (cmpM.FsndM.mM.m_beta@{i j} x).
+ - exact (cmpM.FfstM.mM.m_beta x).
+ - exact (cmpM.FsndM.mM.m_beta x).
Defined.
End cip_FPHM.
End isequiv_F_prod_cmp_M.
diff --git a/test-suite/bugs/closed/bug_4132.v b/test-suite/bugs/closed/bug_4132.v
index 806ffb771f..67ecc3087f 100644
--- a/test-suite/bugs/closed/bug_4132.v
+++ b/test-suite/bugs/closed/bug_4132.v
@@ -26,6 +26,6 @@ Qed.
Lemma foo3 x y (b := 0) (H1 : x <= y) (H2 : y <= b) : x <= b.
omega. (* Pierre L: according to a comment of bug report #4132,
- this might have triggered "Failure(occurence 2)" in the past,
+ this might have triggered "Failure(occurrence 2)" in the past,
but I never managed to reproduce that. *)
Qed.
diff --git a/test-suite/bugs/closed/bug_4157.v b/test-suite/bugs/closed/bug_4157.v
new file mode 100644
index 0000000000..a9e96fcdde
--- /dev/null
+++ b/test-suite/bugs/closed/bug_4157.v
@@ -0,0 +1,272 @@
+(** The following proof is due to a bug in `vm_compute` and was found by
+ Maxime Dénès and Pierre-Marie Pédrot. *)
+Inductive t :=
+| C_0 : nat -> t
+| C_1 : nat -> t
+| C_2 : nat -> t
+| C_3 : nat -> t
+| C_4 : nat -> t
+| C_5 : nat -> t
+| C_6 : nat -> t
+| C_7 : nat -> t
+| C_8 : nat -> t
+| C_9 : nat -> t
+| C_10 : nat -> t
+| C_11 : nat -> t
+| C_12 : nat -> t
+| C_13 : nat -> t
+| C_14 : nat -> t
+| C_15 : nat -> t
+| C_16 : nat -> t
+| C_17 : nat -> t
+| C_18 : nat -> t
+| C_19 : nat -> t
+| C_20 : nat -> t
+| C_21 : nat -> t
+| C_22 : nat -> t
+| C_23 : nat -> t
+| C_24 : nat -> t
+| C_25 : nat -> t
+| C_26 : nat -> t
+| C_27 : nat -> t
+| C_28 : nat -> t
+| C_29 : nat -> t
+| C_30 : nat -> t
+| C_31 : nat -> t
+| C_32 : nat -> t
+| C_33 : nat -> t
+| C_34 : nat -> t
+| C_35 : nat -> t
+| C_36 : nat -> t
+| C_37 : nat -> t
+| C_38 : nat -> t
+| C_39 : nat -> t
+| C_40 : nat -> t
+| C_41 : nat -> t
+| C_42 : nat -> t
+| C_43 : nat -> t
+| C_44 : nat -> t
+| C_45 : nat -> t
+| C_46 : nat -> t
+| C_47 : nat -> t
+| C_48 : nat -> t
+| C_49 : nat -> t
+| C_50 : nat -> t
+| C_51 : nat -> t
+| C_52 : nat -> t
+| C_53 : nat -> t
+| C_54 : nat -> t
+| C_55 : nat -> t
+| C_56 : nat -> t
+| C_57 : nat -> t
+| C_58 : nat -> t
+| C_59 : nat -> t
+| C_60 : nat -> t
+| C_61 : nat -> t
+| C_62 : nat -> t
+| C_63 : nat -> t
+| C_64 : nat -> t
+| C_65 : nat -> t
+| C_66 : nat -> t
+| C_67 : nat -> t
+| C_68 : nat -> t
+| C_69 : nat -> t
+| C_70 : nat -> t
+| C_71 : nat -> t
+| C_72 : nat -> t
+| C_73 : nat -> t
+| C_74 : nat -> t
+| C_75 : nat -> t
+| C_76 : nat -> t
+| C_77 : nat -> t
+| C_78 : nat -> t
+| C_79 : nat -> t
+| C_80 : nat -> t
+| C_81 : nat -> t
+| C_82 : nat -> t
+| C_83 : nat -> t
+| C_84 : nat -> t
+| C_85 : nat -> t
+| C_86 : nat -> t
+| C_87 : nat -> t
+| C_88 : nat -> t
+| C_89 : nat -> t
+| C_90 : nat -> t
+| C_91 : nat -> t
+| C_92 : nat -> t
+| C_93 : nat -> t
+| C_94 : nat -> t
+| C_95 : nat -> t
+| C_96 : nat -> t
+| C_97 : nat -> t
+| C_98 : nat -> t
+| C_99 : nat -> t
+| C_100 : nat -> t
+| C_101 : nat -> t
+| C_102 : nat -> t
+| C_103 : nat -> t
+| C_104 : nat -> t
+| C_105 : nat -> t
+| C_106 : nat -> t
+| C_107 : nat -> t
+| C_108 : nat -> t
+| C_109 : nat -> t
+| C_110 : nat -> t
+| C_111 : nat -> t
+| C_112 : nat -> t
+| C_113 : nat -> t
+| C_114 : nat -> t
+| C_115 : nat -> t
+| C_116 : nat -> t
+| C_117 : nat -> t
+| C_118 : nat -> t
+| C_119 : nat -> t
+| C_120 : nat -> t
+| C_121 : nat -> t
+| C_122 : nat -> t
+| C_123 : nat -> t
+| C_124 : nat -> t
+| C_125 : nat -> t
+| C_126 : nat -> t
+| C_127 : nat -> t
+| C_128 : nat -> t
+| C_129 : nat -> t
+| C_130 : nat -> t
+| C_131 : nat -> t
+| C_132 : nat -> t
+| C_133 : nat -> t
+| C_134 : nat -> t
+| C_135 : nat -> t
+| C_136 : nat -> t
+| C_137 : nat -> t
+| C_138 : nat -> t
+| C_139 : nat -> t
+| C_140 : nat -> t
+| C_141 : nat -> t
+| C_142 : nat -> t
+| C_143 : nat -> t
+| C_144 : nat -> t
+| C_145 : nat -> t
+| C_146 : nat -> t
+| C_147 : nat -> t
+| C_148 : nat -> t
+| C_149 : nat -> t
+| C_150 : nat -> t
+| C_151 : nat -> t
+| C_152 : nat -> t
+| C_153 : nat -> t
+| C_154 : nat -> t
+| C_155 : nat -> t
+| C_156 : nat -> t
+| C_157 : nat -> t
+| C_158 : nat -> t
+| C_159 : nat -> t
+| C_160 : nat -> t
+| C_161 : nat -> t
+| C_162 : nat -> t
+| C_163 : nat -> t
+| C_164 : nat -> t
+| C_165 : nat -> t
+| C_166 : nat -> t
+| C_167 : nat -> t
+| C_168 : nat -> t
+| C_169 : nat -> t
+| C_170 : nat -> t
+| C_171 : nat -> t
+| C_172 : nat -> t
+| C_173 : nat -> t
+| C_174 : nat -> t
+| C_175 : nat -> t
+| C_176 : nat -> t
+| C_177 : nat -> t
+| C_178 : nat -> t
+| C_179 : nat -> t
+| C_180 : nat -> t
+| C_181 : nat -> t
+| C_182 : nat -> t
+| C_183 : nat -> t
+| C_184 : nat -> t
+| C_185 : nat -> t
+| C_186 : nat -> t
+| C_187 : nat -> t
+| C_188 : nat -> t
+| C_189 : nat -> t
+| C_190 : nat -> t
+| C_191 : nat -> t
+| C_192 : nat -> t
+| C_193 : nat -> t
+| C_194 : nat -> t
+| C_195 : nat -> t
+| C_196 : nat -> t
+| C_197 : nat -> t
+| C_198 : nat -> t
+| C_199 : nat -> t
+| C_200 : nat -> t
+| C_201 : nat -> t
+| C_202 : nat -> t
+| C_203 : nat -> t
+| C_204 : nat -> t
+| C_205 : nat -> t
+| C_206 : nat -> t
+| C_207 : nat -> t
+| C_208 : nat -> t
+| C_209 : nat -> t
+| C_210 : nat -> t
+| C_211 : nat -> t
+| C_212 : nat -> t
+| C_213 : nat -> t
+| C_214 : nat -> t
+| C_215 : nat -> t
+| C_216 : nat -> t
+| C_217 : nat -> t
+| C_218 : nat -> t
+| C_219 : nat -> t
+| C_220 : nat -> t
+| C_221 : nat -> t
+| C_222 : nat -> t
+| C_223 : nat -> t
+| C_224 : nat -> t
+| C_225 : nat -> t
+| C_226 : nat -> t
+| C_227 : nat -> t
+| C_228 : nat -> t
+| C_229 : nat -> t
+| C_230 : nat -> t
+| C_231 : nat -> t
+| C_232 : nat -> t
+| C_233 : nat -> t
+| C_234 : nat -> t
+| C_235 : nat -> t
+| C_236 : nat -> t
+| C_237 : nat -> t
+| C_238 : nat -> t
+| C_239 : nat -> t
+| C_240 : nat -> t
+| C_241 : nat -> t
+| C_242 : nat -> t
+| C_243 : nat -> t
+| C_244 : nat -> t
+| C_245 : nat -> t
+| C_246 : nat -> t
+| C_247 : nat -> t
+| C_248 : nat -> t
+| C_249 : nat -> t
+| C_250 : nat -> t
+| C_251 : nat -> t
+| C_252 : nat -> t
+| C_253 : nat -> t
+| C_254 : nat -> t
+| C_255 : nat -> t
+| C_256 : nat -> t.
+
+Definition is_256 (x : t) : bool :=
+ match x with
+ | C_256 _ => true
+ | _ => false
+ end.
+
+Lemma falso : False.
+ assert (is_256 (C_256 0) = true) by reflexivity.
+ (* The next line was successful in 8.2pl3 *)
+ Fail assert (is_256 (C_256 0) = false) by (vm_compute; reflexivity).
+Abort.
diff --git a/test-suite/bugs/closed/bug_4366.v b/test-suite/bugs/closed/bug_4366.v
deleted file mode 100644
index 403c2d2026..0000000000
--- a/test-suite/bugs/closed/bug_4366.v
+++ /dev/null
@@ -1,15 +0,0 @@
-Fixpoint stupid (n : nat) : unit :=
-match n with
-| 0 => tt
-| S n =>
- let () := stupid n in
- let () := stupid n in
- tt
-end.
-
-Goal True.
-Proof.
-pose (v := stupid 24).
-Timeout 4 vm_compute in v.
-exact I.
-Qed.
diff --git a/test-suite/bugs/closed/bug_4498.v b/test-suite/bugs/closed/bug_4498.v
index 379e46b3e3..9b3210860c 100644
--- a/test-suite/bugs/closed/bug_4498.v
+++ b/test-suite/bugs/closed/bug_4498.v
@@ -19,6 +19,6 @@ Class Category := {
Require Export Coq.Setoids.Setoid.
-Add Parametric Morphism `{C : Category} {A B C} : (@compose _ A B C) with
+Add Parametric Morphism `{Category} {A B C} : (@compose _ A B C) with
signature equiv ==> equiv ==> equiv as compose_mor.
Proof. apply comp_respects. Qed.
diff --git a/test-suite/bugs/closed/bug_4509.v b/test-suite/bugs/closed/bug_4509.v
new file mode 100644
index 0000000000..ceae7c5fc3
--- /dev/null
+++ b/test-suite/bugs/closed/bug_4509.v
@@ -0,0 +1,11 @@
+(* Was solved at some time, suspectingly in PR #6328 *)
+
+Goal exists n, n > 1.
+Proof.
+ unshelve eexists. (*2 goals, as expected*)
+ Undo.
+ unshelve (eexists; instantiate (1:=ltac:(idtac))). (*only 1 goal*)
+ shelve.
+ Undo.
+ 2:unshelve instantiate (1:=_).
+Abort.
diff --git a/test-suite/bugs/closed/bug_4771.v b/test-suite/bugs/closed/bug_4771.v
new file mode 100644
index 0000000000..e25e5a1be5
--- /dev/null
+++ b/test-suite/bugs/closed/bug_4771.v
@@ -0,0 +1,21 @@
+(* The following code used to trigger an anomaly in functor substitutions *)
+
+Module Type Foo.
+
+Parameter Inline t : nat.
+
+End Foo.
+
+Module F(X : Foo).
+
+Tactic Notation "foo" ref(x) := idtac.
+
+Ltac g := foo X.t.
+
+End F.
+
+Module N.
+Definition t := 0 + 0.
+End N.
+
+Module K := F(N).
diff --git a/test-suite/bugs/opened/bug_4781.v b/test-suite/bugs/closed/bug_4781.v
index 8b651ac22e..464a3de1b3 100644
--- a/test-suite/bugs/opened/bug_4781.v
+++ b/test-suite/bugs/closed/bug_4781.v
@@ -25,29 +25,29 @@ Goal True.
let x := match constr:(Set) with ?y => constr:(y) end in
pose x.
(* This fails with an error: *)
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let x := match constr:(x) with ?y => constr:(y) end in
pose x. (* The command has indeed failed with message:
Error: Variable y should be bound to a term. *)
(* And the rest fail with Anomaly: Uncaught exception Not_found. Please report. *)
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let x := match constr:(x) with ?y => y end in
pose x.
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let x := (eval cbv iota in x) in
pose x.
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let x := type of x in
pose x. (* should succeed *)
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:(_ : abstract_term term) in
let x := type of x in
@@ -70,7 +70,7 @@ Even stranger, consider:*)
(*This works fine. But if I change the period to a semicolon, I get:*)
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let y := (eval cbv iota in (let v : T := x in v)) in
@@ -82,7 +82,7 @@ Even stranger, consider:*)
(* should succeed *)
(*and if I use the second one instead of [pose x] (note that using [idtac] works fine), I get:*)
- Fail let term := constr:(I) in
+ let term := constr:(I) in
let T := type of term in
let x := constr:((_ : abstract_term term) : T) in
let y := (eval cbv iota in (let v : T := x in v)) in
@@ -92,3 +92,5 @@ Even stranger, consider:*)
let x := (eval cbv delta [x'] in x') in
let z := (eval cbv iota in x) in (* Error: Variable x should be bound to a term. *)
idtac. (* should succeed *)
+ exact I.
+Qed.
diff --git a/test-suite/bugs/closed/bug_4782.v b/test-suite/bugs/closed/bug_4782.v
index be17a96f15..c08195d502 100644
--- a/test-suite/bugs/closed/bug_4782.v
+++ b/test-suite/bugs/closed/bug_4782.v
@@ -15,8 +15,8 @@ Record T := { dom : Type }.
Definition pairT A B := {| dom := (dom A * dom B)%type |}.
Class C (A:Type).
Parameter B:T.
-Instance c (A:T) : C (dom A).
-Instance cn : C (dom B).
+Instance c (A:T) : C (dom A) := {}.
+Instance cn : C (dom B) := {}.
Parameter F : forall A:T, C (dom A) -> forall x:dom A, x=x -> A = A.
Set Typeclasses Debug.
Goal forall (A:T) (x:dom A), pairT A A = pairT A A.
diff --git a/test-suite/bugs/closed/bug_4798.v b/test-suite/bugs/closed/bug_4798.v
index 41a1251ca5..696812dee1 100644
--- a/test-suite/bugs/closed/bug_4798.v
+++ b/test-suite/bugs/closed/bug_4798.v
@@ -1,3 +1,5 @@
+(* DO NOT MODIFY THIS FILE DIRECTLY *)
+(* It is autogenerated by dev/tools/update-compat.py. *)
Check match 2 with 0 => 0 | S n => n end.
Notation "|" := 1 (compat "8.7").
Check match 2 with 0 => 0 | S n => n end. (* fails *)
diff --git a/test-suite/bugs/closed/bug_4811.v b/test-suite/bugs/closed/bug_4811.v
deleted file mode 100644
index b90257cb3f..0000000000
--- a/test-suite/bugs/closed/bug_4811.v
+++ /dev/null
@@ -1,1686 +0,0 @@
-(* Test about a slowness of f_equal in 8.5pl1 *)
-
-(* Submitted by Jason Gross *)
-
-(* -*- mode: coq; coq-prog-args: ("-R" "src" "Crypto" "-R" "Bedrock" "Bedrock" "-R" "coqprime-8.5/Coqprime" "Coqprime" "-top" "GF255192") -*- *)
-(* File reduced by coq-bug-finder from original input, then from 162 lines to 23 lines, then from 245 lines to 95 lines, then from 198 lines to 101 lines, then from 654 lines to 452 lines, then from 591 lines to 505 lines, then from 1770 lines to 580 lines, then from 2238 lines to 1715 lines, then from 1776 lines to 1738 lines, then from 1750 lines to 1679 lines, then from 1693 lines to 1679 lines *)
-(* coqc version 8.5pl1 (April 2016) compiled on Apr 18 2016 14:48:5 with OCaml 4.02.3
- coqtop version 8.5pl1 (April 2016) *)
-Require Coq.ZArith.ZArith.
-
-Import Coq.ZArith.ZArith.
-
-Axiom F : Z -> Set.
-Definition Let_In {A P} (x : A) (f : forall y : A, P y)
- := let y := x in f y.
-Local Open Scope Z_scope.
-Definition modulus : Z := 2^255 - 19.
-Axiom decode : list Z -> F modulus.
-Goal forall x9 x8 x7 x6 x5 x4 x3 x2 x1 x0 y9 y8 y7 y6 y5 y4 y3 y2 y1 y0 : Z,
- let Zmul := Z.mul in
- let Zadd := Z.add in
- let Zsub := Z.sub in
- let Zpow_pos := Z.pow_pos in
- @eq (F (Zsub (Zpow_pos (Zpos (xO xH)) (xI (xI (xI (xI (xI (xI (xI xH)))))))) (Zpos (xI (xI (xO (xO xH)))))))
- (@decode
- (@Let_In Z (fun _ : Z => list Z)
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2)) (Zmul (Zmul x7 y3) (Zpos (xO xH))))
- (Zmul x6 y4)) (Zmul (Zmul x5 y5) (Zpos (xO xH)))) (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH)))) (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (fun z : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4)) (Zmul x6 y5)) (Zmul x5 y6))
- (Zmul x4 y7)) (Zmul x3 y8)) (Zmul x2 y9)))))
- (fun z0 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z0 (Zpos (xI (xO (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH)))) (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH))) (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH)))) (Zmul x6 y6)) (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (fun z1 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z1 (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6)) (Zmul x6 y7)) (Zmul x5 y8))
- (Zmul x4 y9)))))
- (fun z2 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z2 (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH)))) (Zmul x2 y2))
- (Zmul (Zmul x1 y3) (Zpos (xO xH)))) (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH)))) (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (fun z3 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z3 (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2)) (Zmul x2 y3)) (Zmul x1 y4))
- (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8)) (Zmul x6 y9)))))
- (fun z4 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z4 (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH)))) (Zmul x4 y2))
- (Zmul (Zmul x3 y3) (Zpos (xO xH)))) (Zmul x2 y4)) (Zmul (Zmul x1 y5) (Zpos (xO xH))))
- (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH)))))))
- (fun z5 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z5 (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2)) (Zmul x4 y3))
- (Zmul x3 y4)) (Zmul x2 y5)) (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (fun z6 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z6 (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x8 y0) (Zmul (Zmul x7 y1) (Zpos (xO xH)))) (Zmul x6 y2))
- (Zmul (Zmul x5 y3) (Zpos (xO xH)))) (Zmul x4 y4))
- (Zmul (Zmul x3 y5) (Zpos (xO xH)))) (Zmul x2 y6))
- (Zmul (Zmul x1 y7) (Zpos (xO xH)))) (Zmul x0 y8))
- (Zmul (Zmul (Zmul (Zpos (xI (xI (xO (xO xH))))) x9) y9) (Zpos (xO xH)))))
- (fun z7 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Z.shiftr z7 (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y0) (Zmul x8 y1)) (Zmul x7 y2)) (Zmul x6 y3))
- (Zmul x5 y4)) (Zmul x4 y5)) (Zmul x3 y6)) (Zmul x2 y7))
- (Zmul x1 y8)) (Zmul x0 y9)))
- (fun z8 : Z =>
- @Let_In Z (fun _ : Z => list Z)
- (Zadd (Zmul (Zpos (xI (xI (xO (xO xH))))) (Z.shiftr z8 (Zpos (xI (xO (xO (xI xH)))))))
- (Z.land z
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))))
- (fun z9 : Z =>
- @cons Z
- (Z.land z9
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Zadd (Z.shiftr z9 (Zpos (xO (xI (xO (xI xH))))))
- (Z.land z0
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land z1
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land z2
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land z3
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land z4
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land z5
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land z6
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land z7
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land z8
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@nil Z)))))))))))))))))))))))
- (@decode
- (@cons Z
- (Z.land
- (Zadd
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y1)
- (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul
- (Zmul x7 y3)
- (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8))
- (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x9 y2) (Zmul x8 y3))
- (Zmul x7 y4))
- (Zmul x6 y5))
- (Zmul x5 y6))
- (Zmul x4 y7)) (Zmul x3 y8))
- (Zmul x2 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH)))
- (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2))
- (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6))
- (Zmul x6 y7)) (Zmul x5 y8))
- (Zmul x4 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH))))
- (Zmul x2 y2)) (Zmul (Zmul x1 y3) (Zpos (xO xH))))
- (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH))))
- (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2)) (Zmul x2 y3))
- (Zmul x1 y4)) (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8)) (Zmul x6 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH)))) (Zmul x4 y2))
- (Zmul (Zmul x3 y3) (Zpos (xO xH)))) (Zmul x2 y4))
- (Zmul (Zmul x1 y5) (Zpos (xO xH)))) (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2)) (Zmul x4 y3))
- (Zmul x3 y4)) (Zmul x2 y5)) (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x8 y0) (Zmul (Zmul x7 y1) (Zpos (xO xH)))) (Zmul x6 y2))
- (Zmul (Zmul x5 y3) (Zpos (xO xH)))) (Zmul x4 y4))
- (Zmul (Zmul x3 y5) (Zpos (xO xH)))) (Zmul x2 y6)) (Zmul (Zmul x1 y7) (Zpos (xO xH))))
- (Zmul x0 y8)) (Zmul (Zmul (Zmul (Zpos (xI (xI (xO (xO xH))))) x9) y9) (Zpos (xO xH)))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y0) (Zmul x8 y1)) (Zmul x7 y2)) (Zmul x6 y3)) (Zmul x5 y4))
- (Zmul x4 y5)) (Zmul x3 y6)) (Zmul x2 y7)) (Zmul x1 y8)) (Zmul x0 y9)))
- (Zpos (xI (xO (xO (xI xH)))))))
- (Z.land
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH)))) (Zmul x6 y4)) (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH)))) (Zmul x2 y8))
- (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Zadd
- (Z.shiftr
- (Zadd
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y1)
- (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul
- (Zmul x7 y3)
- (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul
- (Zmul x5 y5)
- (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8))
- (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul x9 y2)
- (Zmul x8 y3))
- (Zmul x7 y4))
- (Zmul x6 y5))
- (Zmul x5 y6))
- (Zmul x4 y7))
- (Zmul x3 y8))
- (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zmul x2 y0)
- (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul (Zmul x9 y3) (Zpos (xO xH)))
- (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8))
- (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2))
- (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5))
- (Zmul x7 y6)) (Zmul x6 y7))
- (Zmul x5 y8)) (Zmul x4 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH))))
- (Zmul x2 y2)) (Zmul (Zmul x1 y3) (Zpos (xO xH))))
- (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH))))
- (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2))
- (Zmul x2 y3)) (Zmul x1 y4)) (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8))
- (Zmul x6 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH))))
- (Zmul x4 y2)) (Zmul (Zmul x3 y3) (Zpos (xO xH))))
- (Zmul x2 y4)) (Zmul (Zmul x1 y5) (Zpos (xO xH))))
- (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2)) (Zmul x4 y3))
- (Zmul x3 y4)) (Zmul x2 y5)) (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x8 y0) (Zmul (Zmul x7 y1) (Zpos (xO xH)))) (Zmul x6 y2))
- (Zmul (Zmul x5 y3) (Zpos (xO xH)))) (Zmul x4 y4))
- (Zmul (Zmul x3 y5) (Zpos (xO xH)))) (Zmul x2 y6))
- (Zmul (Zmul x1 y7) (Zpos (xO xH)))) (Zmul x0 y8))
- (Zmul (Zmul (Zmul (Zpos (xI (xI (xO (xO xH))))) x9) y9) (Zpos (xO xH)))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y0) (Zmul x8 y1)) (Zmul x7 y2)) (Zmul x6 y3))
- (Zmul x5 y4)) (Zmul x4 y5)) (Zmul x3 y6)) (Zmul x2 y7))
- (Zmul x1 y8)) (Zmul x0 y9))) (Zpos (xI (xO (xO (xI xH)))))))
- (Z.land
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH)))) (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH)))) (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH)))) (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH)))) (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH)))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4)) (Zmul x6 y5)) (Zmul x5 y6))
- (Zmul x4 y7)) (Zmul x3 y8)) (Zmul x2 y9)))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH)))) (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH)))) (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH)))) (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4)) (Zmul x6 y5))
- (Zmul x5 y6)) (Zmul x4 y7)) (Zmul x3 y8)) (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH)))) (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH))) (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH)))) (Zmul x6 y6)) (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH))))
- (Zmul x6 y4)) (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4)) (Zmul x6 y5))
- (Zmul x5 y6)) (Zmul x4 y7)) (Zmul x3 y8)) (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH)))) (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH))) (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH)))) (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH)))) (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6)) (Zmul x6 y7)) (Zmul x5 y8))
- (Zmul x4 y9)))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH))) (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH))))
- (Zmul x6 y4)) (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4))
- (Zmul x6 y5)) (Zmul x5 y6)) (Zmul x4 y7))
- (Zmul x3 y8)) (Zmul x2 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH)))) (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH))) (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH)))) (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH)))) (Zmul x4 y8))
- (Zmul (Zmul x3 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6)) (Zmul x6 y7))
- (Zmul x5 y8)) (Zmul x4 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH)))) (Zmul x2 y2))
- (Zmul (Zmul x1 y3) (Zpos (xO xH)))) (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH)))) (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y1) (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH))))
- (Zmul x6 y4)) (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6)) (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3)) (Zmul x7 y4))
- (Zmul x6 y5)) (Zmul x5 y6))
- (Zmul x4 y7)) (Zmul x3 y8)) (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH)))) (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH))) (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6)) (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6)) (Zmul x6 y7))
- (Zmul x5 y8)) (Zmul x4 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH)))) (Zmul x2 y2))
- (Zmul (Zmul x1 y3) (Zpos (xO xH)))) (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH)))) (Zmul x6 y8))
- (Zmul (Zmul x5 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2)) (Zmul x2 y3)) (Zmul x1 y4))
- (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8)) (Zmul x6 y9)))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul (Zmul x9 y1) (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul (Zmul x7 y3) (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8)) (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x9 y2) (Zmul x8 y3))
- (Zmul x7 y4)) (Zmul x6 y5))
- (Zmul x5 y6)) (Zmul x4 y7))
- (Zmul x3 y8)) (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH)))
- (Zmul x8 y4)) (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6)) (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6))
- (Zmul x6 y7)) (Zmul x5 y8)) (Zmul x4 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH)))) (Zmul x2 y2))
- (Zmul (Zmul x1 y3) (Zpos (xO xH)))) (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH)))) (Zmul x6 y8))
- (Zmul (Zmul x5 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2)) (Zmul x2 y3))
- (Zmul x1 y4)) (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8)) (Zmul x6 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH)))) (Zmul x4 y2))
- (Zmul (Zmul x3 y3) (Zpos (xO xH)))) (Zmul x2 y4))
- (Zmul (Zmul x1 y5) (Zpos (xO xH)))) (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH)))))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y1)
- (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul
- (Zmul x7 y3)
- (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul (Zmul x5 y5) (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul (Zmul x3 y7) (Zpos (xO xH))))
- (Zmul x2 y8))
- (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x9 y2) (Zmul x8 y3))
- (Zmul x7 y4))
- (Zmul x6 y5))
- (Zmul x5 y6))
- (Zmul x4 y7)) (Zmul x3 y8))
- (Zmul x2 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zmul x2 y0) (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y3) (Zpos (xO xH)))
- (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8)) (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2))
- (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5)) (Zmul x7 y6))
- (Zmul x6 y7)) (Zmul x5 y8))
- (Zmul x4 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH))))
- (Zmul x2 y2)) (Zmul (Zmul x1 y3) (Zpos (xO xH))))
- (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH))) (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH))))
- (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2)) (Zmul x2 y3))
- (Zmul x1 y4)) (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8)) (Zmul x6 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH)))) (Zmul x4 y2))
- (Zmul (Zmul x3 y3) (Zpos (xO xH)))) (Zmul x2 y4))
- (Zmul (Zmul x1 y5) (Zpos (xO xH)))) (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2)) (Zmul x4 y3))
- (Zmul x3 y4)) (Zmul x2 y5)) (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y1)
- (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul
- (Zmul x7 y3)
- (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul
- (Zmul x5 y5)
- (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul
- (Zmul x3 y7)
- (Zpos (xO xH))))
- (Zmul x2 y8))
- (Zmul (Zmul x1 y9) (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul x9 y2)
- (Zmul x8 y3))
- (Zmul x7 y4))
- (Zmul x6 y5))
- (Zmul x5 y6))
- (Zmul x4 y7))
- (Zmul x3 y8))
- (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zmul x2 y0)
- (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y3)
- (Zpos (xO xH)))
- (Zmul x8 y4))
- (Zmul (Zmul x7 y5) (Zpos (xO xH))))
- (Zmul x6 y6))
- (Zmul (Zmul x5 y7) (Zpos (xO xH))))
- (Zmul x4 y8))
- (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1)) (Zmul x1 y2))
- (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x9 y4) (Zmul x8 y5))
- (Zmul x7 y6)) (Zmul x6 y7))
- (Zmul x5 y8)) (Zmul x4 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x4 y0) (Zmul (Zmul x3 y1) (Zpos (xO xH))))
- (Zmul x2 y2)) (Zmul (Zmul x1 y3) (Zpos (xO xH))))
- (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH)))
- (Zmul x8 y6)) (Zmul (Zmul x7 y7) (Zpos (xO xH))))
- (Zmul x6 y8)) (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2))
- (Zmul x2 y3)) (Zmul x1 y4)) (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8))
- (Zmul x6 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x6 y0) (Zmul (Zmul x5 y1) (Zpos (xO xH))))
- (Zmul x4 y2)) (Zmul (Zmul x3 y3) (Zpos (xO xH))))
- (Zmul x2 y4)) (Zmul (Zmul x1 y5) (Zpos (xO xH))))
- (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH))))))) (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2))
- (Zmul x4 y3)) (Zmul x3 y4)) (Zmul x2 y5))
- (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x8 y0) (Zmul (Zmul x7 y1) (Zpos (xO xH))))
- (Zmul x6 y2)) (Zmul (Zmul x5 y3) (Zpos (xO xH))))
- (Zmul x4 y4)) (Zmul (Zmul x3 y5) (Zpos (xO xH))))
- (Zmul x2 y6)) (Zmul (Zmul x1 y7) (Zpos (xO xH)))) (Zmul x0 y8))
- (Zmul (Zmul (Zmul (Zpos (xI (xI (xO (xO xH))))) x9) y9) (Zpos (xO xH)))))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI xH)))))))))))))))))))))))))))
- (@cons Z
- (Z.land
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd
- (Z.shiftr
- (Zadd (Zmul x0 y0)
- (Zmul
- (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y1)
- (Zpos (xO xH)))
- (Zmul x8 y2))
- (Zmul
- (Zmul x7 y3)
- (Zpos (xO xH))))
- (Zmul x6 y4))
- (Zmul
- (Zmul x5 y5)
- (Zpos (xO xH))))
- (Zmul x4 y6))
- (Zmul
- (Zmul x3 y7)
- (Zpos (xO xH))))
- (Zmul x2 y8))
- (Zmul
- (Zmul x1 y9)
- (Zpos (xO xH))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd (Zadd (Zmul x1 y0) (Zmul x0 y1))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul x9 y2)
- (Zmul x8 y3))
- (Zmul x7 y4))
- (Zmul x6 y5))
- (Zmul x5 y6))
- (Zmul x4 y7))
- (Zmul x3 y8))
- (Zmul x2 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zmul x2 y0)
- (Zmul (Zmul x1 y1) (Zpos (xO xH))))
- (Zmul x0 y2))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zmul
- (Zmul x9 y3)
- (Zpos (xO xH)))
- (Zmul x8 y4))
- (Zmul
- (Zmul x7 y5)
- (Zpos (xO xH))))
- (Zmul x6 y6))
- (Zmul
- (Zmul x5 y7)
- (Zpos (xO xH))))
- (Zmul x4 y8))
- (Zmul (Zmul x3 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x3 y0) (Zmul x2 y1))
- (Zmul x1 y2)) (Zmul x0 y3))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x9 y4) (Zmul x8 y5))
- (Zmul x7 y6))
- (Zmul x6 y7))
- (Zmul x5 y8))
- (Zmul x4 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x4 y0)
- (Zmul (Zmul x3 y1) (Zpos (xO xH))))
- (Zmul x2 y2))
- (Zmul (Zmul x1 y3) (Zpos (xO xH))))
- (Zmul x0 y4))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul (Zmul x9 y5) (Zpos (xO xH)))
- (Zmul x8 y6))
- (Zmul (Zmul x7 y7) (Zpos (xO xH))))
- (Zmul x6 y8))
- (Zmul (Zmul x5 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x5 y0) (Zmul x4 y1)) (Zmul x3 y2))
- (Zmul x2 y3)) (Zmul x1 y4))
- (Zmul x0 y5))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zadd (Zmul x9 y6) (Zmul x8 y7)) (Zmul x7 y8))
- (Zmul x6 y9))))) (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zmul x6 y0)
- (Zmul (Zmul x5 y1) (Zpos (xO xH))))
- (Zmul x4 y2)) (Zmul (Zmul x3 y3) (Zpos (xO xH))))
- (Zmul x2 y4)) (Zmul (Zmul x1 y5) (Zpos (xO xH))))
- (Zmul x0 y6))
- (Zmul (Zpos (xI (xI (xO (xO xH)))))
- (Zadd (Zadd (Zmul (Zmul x9 y7) (Zpos (xO xH))) (Zmul x8 y8))
- (Zmul (Zmul x7 y9) (Zpos (xO xH)))))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x7 y0) (Zmul x6 y1)) (Zmul x5 y2))
- (Zmul x4 y3)) (Zmul x3 y4)) (Zmul x2 y5))
- (Zmul x1 y6)) (Zmul x0 y7))
- (Zmul (Zpos (xI (xI (xO (xO xH))))) (Zadd (Zmul x9 y8) (Zmul x8 y9)))))
- (Zpos (xI (xO (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zmul x8 y0) (Zmul (Zmul x7 y1) (Zpos (xO xH))))
- (Zmul x6 y2)) (Zmul (Zmul x5 y3) (Zpos (xO xH))))
- (Zmul x4 y4)) (Zmul (Zmul x3 y5) (Zpos (xO xH))))
- (Zmul x2 y6)) (Zmul (Zmul x1 y7) (Zpos (xO xH))))
- (Zmul x0 y8))
- (Zmul (Zmul (Zmul (Zpos (xI (xI (xO (xO xH))))) x9) y9) (Zpos (xO xH)))))
- (Zpos (xO (xI (xO (xI xH))))))
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd
- (Zadd (Zadd (Zadd (Zmul x9 y0) (Zmul x8 y1)) (Zmul x7 y2))
- (Zmul x6 y3)) (Zmul x5 y4)) (Zmul x4 y5))
- (Zmul x3 y6)) (Zmul x2 y7)) (Zmul x1 y8)) (Zmul x0 y9)))
- (Zpos
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI
- (xI (xI (xI (xI (xI (xI (xI xH))))))))))))))))))))))))))
- (@nil Z)))))))))))).
- cbv beta zeta.
- intros.
- (timeout 1 (apply f_equal; reflexivity)) || fail 0 "too early".
- Undo.
- Time Timeout 1 f_equal. (* Finished transaction in 0. secs (0.3u,0.s) in 8.4 *)
-Abort.
diff --git a/test-suite/bugs/closed/bug_4836.v b/test-suite/bugs/closed/bug_4836.v
index 5838dcd8a7..9aefb10172 100644
--- a/test-suite/bugs/closed/bug_4836.v
+++ b/test-suite/bugs/closed/bug_4836.v
@@ -1 +1 @@
-(* -*- coq-prog-args: ("-compile" "bugs/closed/PLACEHOLDER.v") -*- *)
+(* -*- coq-prog-args: ("bugs/closed/PLACEHOLDER.v") -*- *)
diff --git a/test-suite/bugs/closed/bug_5197.v b/test-suite/bugs/closed/bug_5197.v
index b67e93d677..0c236e12ad 100644
--- a/test-suite/bugs/closed/bug_5197.v
+++ b/test-suite/bugs/closed/bug_5197.v
@@ -1,6 +1,6 @@
Set Universe Polymorphism.
Set Primitive Projections.
-Unset Printing Primitive Projection Compatibility.
+
Axiom Ω : Type.
Record Pack (A : Ω -> Type) (Aᴿ : Ω -> (forall ω : Ω, A ω) -> Type) := mkPack {
diff --git a/test-suite/bugs/closed/bug_5198.v b/test-suite/bugs/closed/bug_5198.v
index 5d4409f89b..4f24189d3f 100644
--- a/test-suite/bugs/closed/bug_5198.v
+++ b/test-suite/bugs/closed/bug_5198.v
@@ -1,4 +1,4 @@
-(* -*- mode: coq; coq-prog-args: ("-boot" "-nois") -*- *)
+(* -*- mode: coq; coq-prog-args: ("-nois") -*- *)
(* File reduced by coq-bug-finder from original input, then from 286 lines to
27 lines, then from 224 lines to 53 lines, then from 218 lines to 56 lines,
then from 269 lines to 180 lines, then from 132 lines to 48 lines, then from
diff --git a/test-suite/bugs/closed/bug_5401.v b/test-suite/bugs/closed/bug_5401.v
index 95193b993b..466e669d00 100644
--- a/test-suite/bugs/closed/bug_5401.v
+++ b/test-suite/bugs/closed/bug_5401.v
@@ -5,7 +5,7 @@ Parameter P : nat -> Type.
Parameter v : forall m, P m.
Parameter f : forall (P : nat -> Type), (forall a, P a) -> P 0.
Class U (R : P 0) (m : forall x, P x) : Prop.
-Instance w : U (f _ (fun _ => v _)) v.
+Instance w : U (f _ (fun _ => v _)) v := {}.
Print HintDb typeclass_instances.
End A.
diff --git a/test-suite/bugs/closed/gh6165.v b/test-suite/bugs/closed/bug_6165.v
index b87a7caaf2..b87a7caaf2 100644
--- a/test-suite/bugs/closed/gh6165.v
+++ b/test-suite/bugs/closed/bug_6165.v
diff --git a/test-suite/bugs/closed/bug_6202.v b/test-suite/bugs/closed/bug_6202.v
new file mode 100644
index 0000000000..899260f59a
--- /dev/null
+++ b/test-suite/bugs/closed/bug_6202.v
@@ -0,0 +1,11 @@
+(* This was fixed at some time, suspectingly in PR #6328 *)
+
+Inductive foo := F (a : forall var : Type -> Type, unit -> var unit) (_ : a = a).
+Goal foo.
+ eexists (fun var => fun u : unit => ltac:(clear u)).
+ shelve.
+ Unshelve.
+ all:[ > | ].
+ shelve.
+ Fail Grab Existential Variables.
+Abort.
diff --git a/test-suite/bugs/closed/gh6384.v b/test-suite/bugs/closed/bug_6384.v
index cec84642fb..cec84642fb 100644
--- a/test-suite/bugs/closed/gh6384.v
+++ b/test-suite/bugs/closed/bug_6384.v
diff --git a/test-suite/bugs/closed/gh6385.v b/test-suite/bugs/closed/bug_6385.v
index 3bbb664f4f..3bbb664f4f 100644
--- a/test-suite/bugs/closed/gh6385.v
+++ b/test-suite/bugs/closed/bug_6385.v
diff --git a/test-suite/bugs/closed/bug_6661.v b/test-suite/bugs/closed/bug_6661.v
index e88a3704d8..28a9ffc7bd 100644
--- a/test-suite/bugs/closed/bug_6661.v
+++ b/test-suite/bugs/closed/bug_6661.v
@@ -53,8 +53,6 @@ Definition foo (X:Type) (xy : @total2 X (λ _, X)) : X.
exact x.
Defined.
-Unset Automatic Introduction.
-
Definition idfun (T : UU) := λ t:T, t.
Definition pathscomp0 {X : UU} {a b c : X} (e1 : a = b) (e2 : b = c) : a = c.
diff --git a/test-suite/bugs/closed/bug_7631.v b/test-suite/bugs/closed/bug_7631.v
index 34eb8b8676..93aeb83e28 100644
--- a/test-suite/bugs/closed/bug_7631.v
+++ b/test-suite/bugs/closed/bug_7631.v
@@ -7,6 +7,7 @@ Section Foo.
Let bar := foo.
Eval native_compute in bar.
+Eval vm_compute in bar.
End Foo.
@@ -17,5 +18,6 @@ Module RelContext.
Definition foo := true.
Definition bar (x := foo) := Eval native_compute in x.
+Definition barvm (x := foo) := Eval vm_compute in x.
End RelContext.
diff --git a/test-suite/bugs/closed/bug_7795.v b/test-suite/bugs/closed/bug_7795.v
index 5db0f81cc5..5f9d42f5f7 100644
--- a/test-suite/bugs/closed/bug_7795.v
+++ b/test-suite/bugs/closed/bug_7795.v
@@ -52,6 +52,8 @@ Definition hh:
false = true.
Admitted.
+Require Import Program.
+
Set Program Mode. (* removing this line prevents the bug *)
Obligation Tactic := repeat t_base.
diff --git a/test-suite/bugs/closed/bug_7811.v b/test-suite/bugs/closed/bug_7811.v
index fee330f22d..155f3285b7 100644
--- a/test-suite/bugs/closed/bug_7811.v
+++ b/test-suite/bugs/closed/bug_7811.v
@@ -1,4 +1,4 @@
-(* -*- mode: coq; coq-prog-args: ("-emacs" "-top" "atomic" "-Q" "." "iris" "-R" "." "stdpp") -*- *)
+(* -*- mode: coq; coq-prog-args: ("-top" "atomic" "-Q" "." "iris" "-R" "." "stdpp") -*- *)
(* File reduced by coq-bug-finder from original input, then from 140 lines to 26 lines, then from 141 lines to 27 lines, then from 142 lines to 27 lines, then from 272 lines to 61 lines, then from 291 lines to 94 lines, then from 678 lines to 142 lines, then from 418 lines to 161 lines, then from 538 lines to 189 lines, then from 840 lines to 493 lines, then from 751 lines to 567 lines, then from 913 lines to 649 lines, then from 875 lines to 666 lines, then from 784 lines to 568 lines, then from 655 lines to 173 lines, then from 317 lines to 94 lines, then from 172 lines to 86 lines, then from 102 lines to 86 lines, then from 130 lines to 86 lines, then from 332 lines to 112 lines, then from 279 lines to 111 lines, then from 3996 lines to 5697 lines, then from 153 lines to 117 lines, then from 146 lines to 108 lines, then from 124 lines to 108 lines *)
(* coqc version 8.8.0 (May 2018) compiled on May 2 2018 16:49:46 with OCaml 4.02.3
coqtop version 8.8.0 (May 2018) *)
diff --git a/test-suite/bugs/closed/bug_7904.v b/test-suite/bugs/closed/bug_7904.v
new file mode 100644
index 0000000000..1e518e2adf
--- /dev/null
+++ b/test-suite/bugs/closed/bug_7904.v
@@ -0,0 +1,13 @@
+
+
+Class abstract_term {T} (x : T) := by_abstract_term : T.
+Hint Extern 0 (@abstract_term ?T ?x) => change T; abstract (exact x) : typeclass_instances.
+
+Goal True.
+ let term := constr:(I) in
+ let T := type of term in
+ let x := constr:((_ : abstract_term term) : T) in
+ let x := match constr:(x) with ?y => y end in
+ pose x as v. (* was Error: Variable x should be bound to a term but is bound to a constr. *)
+ exact v.
+Qed.
diff --git a/test-suite/bugs/closed/bug_8076.v b/test-suite/bugs/closed/bug_8076.v
new file mode 100644
index 0000000000..7bee43620f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8076.v
@@ -0,0 +1,3 @@
+
+Notation leak a := ltac:(let x := constr:(Type) in exact a) (only parsing).
+Record foo@{} (P:leak Prop) := { f : leak Prop }.
diff --git a/test-suite/bugs/closed/bug_8224.v b/test-suite/bugs/closed/bug_8224.v
new file mode 100644
index 0000000000..42dd47d48c
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8224.v
@@ -0,0 +1,9 @@
+(* Checking that terms are evar-free before being grounded *)
+
+(* This used to raise an anomaly in 8.9 beta *)
+
+Fail Fixpoint restrict f n :=
+ match n with
+ | O => nil
+ | S n => cons (f n) (restrict f n)
+ end.
diff --git a/test-suite/bugs/closed/bug_8364.v b/test-suite/bugs/closed/bug_8364.v
new file mode 100644
index 0000000000..10f955b41f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8364.v
@@ -0,0 +1,17 @@
+Unset Primitive Projections.
+
+Record Box (A:Type) := box { unbox : A }.
+Arguments box {_} _. Arguments unbox {_} _.
+
+Definition map {A B} (f:A -> B) x :=
+ match x with box x => box (f x) end.
+
+Definition tuple (l : Box Type) : Type :=
+ match l with
+ | box x => x
+ end.
+
+Fail Inductive stack : Type -> Type :=
+| Stack T foos :
+ tuple (map stack foos) ->
+ stack T.
diff --git a/test-suite/bugs/closed/bug_8369.v b/test-suite/bugs/closed/bug_8369.v
new file mode 100644
index 0000000000..9816954d0c
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8369.v
@@ -0,0 +1,3 @@
+(* Was failing in master with a not_found generated by the printer *)
+
+Fail Definition foo := fun '(u, v) p2 => (u, v).
diff --git a/test-suite/bugs/closed/bug_8544.v b/test-suite/bugs/closed/bug_8544.v
new file mode 100644
index 0000000000..674d112595
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8544.v
@@ -0,0 +1,6 @@
+Require Import ssreflect.
+Goal True \/ True -> False.
+Proof.
+(* the following should fail: 2 subgoals, but only one intro pattern *)
+Fail case => [a].
+Abort.
diff --git a/test-suite/bugs/closed/bug_8755.v b/test-suite/bugs/closed/bug_8755.v
new file mode 100644
index 0000000000..cd5aee4fa0
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8755.v
@@ -0,0 +1,6 @@
+
+Lemma f : Type.
+Fail let i := ident:(i) in
+let t := context i [Type] in
+idtac.
+Abort.
diff --git a/test-suite/bugs/closed/bug_8785.v b/test-suite/bugs/closed/bug_8785.v
new file mode 100644
index 0000000000..b10569499e
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8785.v
@@ -0,0 +1,44 @@
+Universe u v w.
+Inductive invertible {X:Type@{u}} {Y:Type} (f:X->Y) : Prop := .
+
+Inductive FiniteT : Type -> Prop :=
+ | add_finite: forall T:Type@{v}, FiniteT T -> FiniteT (option T)
+ | bij_finite: forall (X:Type@{w}) (Y:Type) (f:X->Y), FiniteT X ->
+ invertible f -> FiniteT Y.
+
+Set Printing Universes.
+
+Axiom a : False.
+(*
+Constraint v <= u.
+Constraint v <= w.
+*)
+Lemma finite_subtype: forall (X:Type) (P:X->Prop),
+ FiniteT X -> (forall x:X, P x \/ ~ P x) ->
+ FiniteT {x:X | P x}.
+Proof.
+intros.
+induction H.
+
+destruct (H0 None).
+elim a.
+
+pose (g := fun (x:{x:T | P (Some x)}) =>
+ match x return {x:option T | P x} with
+ | exist _ x0 i => exist (fun x:option T => P x) (Some x0) i
+ end).
+apply bij_finite with _ g.
+apply IHFiniteT.
+intro; apply H0.
+elim a.
+
+pose (g := fun (x:{x:X | P (f x)}) =>
+ match x with
+ | exist _ x0 i => exist (fun x:Y => P x) (f x0) i
+ end).
+apply bij_finite with _ g.
+apply IHFiniteT.
+intro; apply H0.
+elim a.
+
+Qed.
diff --git a/test-suite/bugs/closed/bug_8791.v b/test-suite/bugs/closed/bug_8791.v
new file mode 100644
index 0000000000..9be1936cdf
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8791.v
@@ -0,0 +1,9 @@
+Class Inhabited (A : Type) : Type := populate { inhabitant : A }.
+
+Definition A := 42.
+
+Instance foo (A: Type): Inhabited (list A).
+Check A.
+Abort.
+
+Fail Instance foo (A : nat) (A : Type) : Inhabited nat.
diff --git a/test-suite/bugs/closed/bug_8794.v b/test-suite/bugs/closed/bug_8794.v
new file mode 100644
index 0000000000..5ff0b30260
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8794.v
@@ -0,0 +1,11 @@
+(* This used to raise an anomaly in 8.8 *)
+
+Inductive T := Tau (t : T).
+
+Notation idT t := (match t with Tau t => Tau t end).
+
+Lemma match_itree : forall (t : T), t = idT t.
+Proof. destruct t; auto. Qed.
+
+Lemma what (k : unit -> T) : k tt = k tt.
+Proof. rewrite match_itree. Abort.
diff --git a/test-suite/bugs/closed/bug_8819.v b/test-suite/bugs/closed/bug_8819.v
new file mode 100644
index 0000000000..a4cb9dcd14
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8819.v
@@ -0,0 +1,2 @@
+Theorem foo (_ : nat) (H : bool) : bool.
+Proof. exact H. Qed.
diff --git a/test-suite/bugs/closed/bug_8848.v b/test-suite/bugs/closed/bug_8848.v
new file mode 100644
index 0000000000..26563e6747
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8848.v
@@ -0,0 +1,18 @@
+Require Import Program.
+Set Implicit Arguments.
+Unset Strict Implicit.
+
+Definition def (a : nat) := a = a.
+
+Structure record {a : nat} {D : def a} :=
+ inR { prop : Prop }.
+
+Program
+Canonical Structure ins (a : nat) (rec : @record a _) :=
+ @inR a _ (prop rec).
+Next Obligation.
+ exact eq_refl.
+Defined.
+Next Obligation.
+ exact eq_refl.
+Defined.
diff --git a/test-suite/bugs/closed/bug_8885.v b/test-suite/bugs/closed/bug_8885.v
new file mode 100644
index 0000000000..9d86c08d71
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8885.v
@@ -0,0 +1,8 @@
+From Coq Require Import Cyclic31.
+
+Definition Nat `(int31) := nat.
+Definition Zero (_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _: digits) := 0.
+
+Check (eq_refl (int31_rect Nat Zero 1) : 0 = 0).
+Check (eq_refl (int31_rect Nat Zero 1) <: 0 = 0).
+Check (eq_refl (int31_rect Nat Zero 1) <<: 0 = 0).
diff --git a/test-suite/bugs/closed/bug_8908.v b/test-suite/bugs/closed/bug_8908.v
new file mode 100644
index 0000000000..9c85839b75
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8908.v
@@ -0,0 +1,8 @@
+Record foo : Type :=
+ { fooA : Type; fooB : Type }.
+Definition id {A : Type} (a : A) := a.
+Definition untypable : Type.
+ unshelve refine (let X := _ in let Y : _ := ltac:(let ty := type of X in exact ty) in id Y).
+ exact foo.
+ constructor. exact unit. exact unit.
+Defined.
diff --git a/test-suite/bugs/closed/bug_8951.v b/test-suite/bugs/closed/bug_8951.v
new file mode 100644
index 0000000000..dce19318c5
--- /dev/null
+++ b/test-suite/bugs/closed/bug_8951.v
@@ -0,0 +1,14 @@
+Module Type T.
+ Polymorphic Parameter Inline t@{i} : Type@{i}.
+End T.
+
+Module M.
+ Polymorphic Definition t@{i} := nat.
+End M.
+
+Module Make (X:T).
+ Include X.
+
+End Make.
+
+Module P := Make M.
diff --git a/test-suite/bugs/closed/bug_9014.v b/test-suite/bugs/closed/bug_9014.v
new file mode 100644
index 0000000000..c1fdd04a65
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9014.v
@@ -0,0 +1,19 @@
+(* A type, not a class *)
+Variant T := mkT.
+
+(* In records, :> declares a coercion *)
+Record R := { t_of_r :> T }.
+Check forall r : R, r = r :> T.
+
+(* A class *)
+Class A := { p : Prop }.
+(* A sub-class *)
+Class B := { a_of_b :> A ; t_of_b :> T }.
+(* The sub-instance is automatically inferred due to :> for a_of_b *)
+Check forall b : B, p.
+(* No coercion is introduced by :> in t_of_b *)
+Fail Check forall b : B, b = b :> T.
+
+(* Using :> when the RHS is not a class produces a “not-a-class” warning. *)
+Set Warnings "+not-a-class".
+Fail Class B' := { a_of_b' :> A ; t_of_b' :> T }.
diff --git a/test-suite/bugs/closed/bug_9166.v b/test-suite/bugs/closed/bug_9166.v
new file mode 100644
index 0000000000..a89837dd12
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9166.v
@@ -0,0 +1,11 @@
+(* DO NOT MODIFY THIS FILE DIRECTLY *)
+(* It is autogenerated by dev/tools/update-compat.py. *)
+Set Warnings "+deprecated".
+
+Notation bar := option (compat "8.7").
+
+Definition foo (x: nat) : nat :=
+ match x with
+ | 0 => 0
+ | S bar => bar
+ end.
diff --git a/test-suite/bugs/closed/bug_9229.v b/test-suite/bugs/closed/bug_9229.v
new file mode 100644
index 0000000000..7514741af4
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9229.v
@@ -0,0 +1,6 @@
+(* There was a problem of freshness with Infix choice of vars *)
+
+(* In particular, x and y were special... *)
+
+Infix "#" := (fun x y => x + y) (at level 50, left associativity).
+Check (3 # 5).
diff --git a/test-suite/bugs/closed/bug_9240.v b/test-suite/bugs/closed/bug_9240.v
new file mode 100644
index 0000000000..e0901dc2d9
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9240.v
@@ -0,0 +1,12 @@
+Register unit as core.IDProp.type.
+Register tt as core.IDProp.idProp.
+
+
+Inductive vec (A : Type) : nat -> Type :=
+| nil : vec A 0
+| cons : forall n : nat, A -> vec A n -> vec A (S n).
+
+Definition hd (A : Type) (n : nat) (v : vec A (S n)) : A :=
+match v in (vec _ (S n)) return A with
+| cons _ _ h _ => h
+end. (* assertion failure in evarconv *)
diff --git a/test-suite/bugs/closed/bug_9268.v b/test-suite/bugs/closed/bug_9268.v
new file mode 100644
index 0000000000..02dd46f6d2
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9268.v
@@ -0,0 +1,46 @@
+Require Import Coq.ZArith.ZArith.
+Require Import Coq.micromega.Lia.
+
+Local Open Scope Z_scope.
+
+Definition Register := Z%type.
+
+Definition Opcode := Z%type.
+
+Inductive InstructionI : Type
+ := Lb : Register -> Register -> Z -> InstructionI
+ | InvalidI : InstructionI.
+
+Inductive Instruction : Type
+ := IInstruction : InstructionI -> Instruction.
+
+Definition funct3_LB : Z := 0.
+
+Definition opcode_LOAD : Opcode := 3.
+
+Set Universe Polymorphism.
+
+Definition MachineInt := Z.
+
+Definition funct3_JALR := 0.
+
+Axiom InstructionMapper: Type -> Type.
+
+Definition apply_InstructionMapper(mapper: InstructionMapper Z)(inst: Instruction): Z :=
+ match inst with
+ | IInstruction InvalidI => 2
+ | IInstruction (Lb rd rs1 oimm12) => 3
+ end.
+
+Axiom Encoder: InstructionMapper MachineInt.
+
+Definition encode: Instruction -> MachineInt := apply_InstructionMapper Encoder.
+
+Lemma foo: forall (ins: InstructionI),
+ 0 <= encode (IInstruction ins) ->
+ 0 <= encode (IInstruction ins) .
+Proof.
+ Set Printing Universes.
+ intros.
+ lia.
+Qed.
diff --git a/test-suite/bugs/closed/bug_9300.v b/test-suite/bugs/closed/bug_9300.v
new file mode 100644
index 0000000000..a80f3233a3
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9300.v
@@ -0,0 +1,6 @@
+Existing Class True.
+
+Instance foo {n : nat} (x := I) : forall {b : bool} (s : nat * nat), True. auto. Defined.
+
+Fail Check foo (n := 3) true (s := (4 , 5)).
+Check foo (n := 3) (b := true) (4 , 5).
diff --git a/test-suite/bugs/closed/bug_9313.v b/test-suite/bugs/closed/bug_9313.v
new file mode 100644
index 0000000000..0845e7732c
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9313.v
@@ -0,0 +1,13 @@
+Set Implicit Arguments.
+Existing Class True.
+
+Instance foo1 (a : nat) {b : nat} (e : a = b) : True := I.
+Check foo1 (a := 3) (b := 4).
+
+Definition foo2 (a : nat) {b : nat} (e : a = b) : True := I.
+Check foo2 (a := 3) (b := 4).
+
+Instance foo3 (a : nat) {b : nat} (e : a = b) : True.
+exact I.
+Qed.
+Check foo3 (a := 3) (b := 4).
diff --git a/test-suite/bugs/closed/bug_9329.v b/test-suite/bugs/closed/bug_9329.v
new file mode 100644
index 0000000000..c0322dec40
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9329.v
@@ -0,0 +1,12 @@
+(* Declare empty levels in the same order they are computed *)
+
+Notation "< a ; b ; c >1" :=
+ (sum a (sum b c)) (at level 18, a at level 19, b at level 20, c at level 21).
+Notation "< a ; b ; c >2" :=
+ (sum a (sum b c)) (at level 28, a at level 29, c at level 32, b at level 31).
+Notation "< a ; b ; c >3" :=
+ (sum a (sum b c)) (at level 38, c at level 42, a at level 39, b at level 41).
+Notation "< a ; b ; c >4" :=
+ (sum a (sum b c)) (at level 48, c at level 52, b at level 51, a at level 49).
+Notation "< a ; b >" :=
+ (sum a b) (at level 61, a at level 63, b at level 62).
diff --git a/test-suite/bugs/closed/bug_9363.v b/test-suite/bugs/closed/bug_9363.v
new file mode 100644
index 0000000000..a3f6ad9fa2
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9363.v
@@ -0,0 +1,17 @@
+(* Outside a section, Hypothesis, Variable, Axiom all obey implicit binders *)
+Hypothesis foo1 : forall {n : nat}, True.
+Variable foo1' : forall {n : nat}, True.
+Axiom foo1'' : forall {n : nat}, True.
+Check foo1 (n := 1).
+Check foo1' (n := 1).
+Check foo1'' (n := 1).
+
+Section bar.
+(* Inside a section, Hypothesis and Variable do not, but they should *)
+Hypothesis foo2 : forall {n : nat}, True.
+Variable foo2' : forall {n : nat}, True.
+Axiom foo2'' : forall {n : nat}, True.
+Check foo2 (n := 1).
+Check foo2' (n := 1).
+Check foo2'' (n := 1).
+End bar.
diff --git a/test-suite/bugs/closed/bug_9367.v b/test-suite/bugs/closed/bug_9367.v
new file mode 100644
index 0000000000..885f6bc391
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9367.v
@@ -0,0 +1,12 @@
+Section foo.
+Variable f : forall n : nat, nat.
+Arguments f {_}.
+Check f (n := 3).
+Global Arguments f {bar} : rename.
+End foo.
+
+Section foo.
+Variable f : forall n : nat, nat.
+Arguments f {_}.
+Fail Check f (bar := 3).
+End foo.
diff --git a/test-suite/bugs/closed/bug_9375.v b/test-suite/bugs/closed/bug_9375.v
new file mode 100644
index 0000000000..a2bfbafe06
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9375.v
@@ -0,0 +1,16 @@
+Set Primitive Projections.
+
+Record toto : Type := Toto {
+ toto1 : Type;
+ toto2 : toto1 -> Type
+}.
+
+Record tata := Tata {
+ tata1 : Type
+}.
+
+Canonical Structure tata_toto (x : toto) X :=
+ Tata (toto2 x X).
+
+Check fun (T : toto) (t : toto1 T) =>
+ (eq_refl _ : @tata1 _ = @toto2 _ t).
diff --git a/test-suite/bugs/closed/bug_9432.v b/test-suite/bugs/closed/bug_9432.v
new file mode 100644
index 0000000000..c85f8129ce
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9432.v
@@ -0,0 +1,12 @@
+
+Record foo := { f : Type }.
+
+Fail Canonical Structure xx@{} := {| f := Type |}.
+
+Canonical Structure xx@{i} := {| f := Type@{i} |}.
+
+Fail Coercion cc@{} := fun x : Type => Build_foo x.
+
+Polymorphic Coercion cc@{i} := fun x : Type@{i} => Build_foo x.
+
+Coercion cc1@{i} := (cc@{i}).
diff --git a/test-suite/bugs/closed/bug_9451.v b/test-suite/bugs/closed/bug_9451.v
new file mode 100644
index 0000000000..03bb0433f1
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9451.v
@@ -0,0 +1,8 @@
+Goal False.
+cut True.
+assert False.
+evar (x : True).
+let v := open_constr:(_) in idtac. all: exfalso; clear.
+Optimize Proof.
+(* Error: Anomaly "grounding a non evar-free term" *)
+Abort All.
diff --git a/test-suite/bugs/closed/bug_9453.v b/test-suite/bugs/closed/bug_9453.v
new file mode 100644
index 0000000000..18745533b2
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9453.v
@@ -0,0 +1,7 @@
+(* check compatibility with 8.8 and earlier for lack of warnings on the nat 5000 *)
+Set Warnings Append "+large-nat,+abstract-large-number".
+Fail Check 5001.
+Check 5000.
+(* Error:
+To avoid stack overflow, large numbers in nat are interpreted as applications of
+Nat.of_uint. *)
diff --git a/test-suite/bugs/closed/bug_9494.v b/test-suite/bugs/closed/bug_9494.v
new file mode 100644
index 0000000000..a0b8383d16
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9494.v
@@ -0,0 +1,10 @@
+Lemma foo (a : nat) : True.
+Proof.
+destruct a eqn:n; exact I.
+Qed.
+
+Set Mangle Names.
+Lemma foo2 (a : nat) : True.
+Proof.
+let N := fresh in destruct a eqn:N; exact I.
+Qed.
diff --git a/test-suite/bugs/closed/bug_9508.v b/test-suite/bugs/closed/bug_9508.v
new file mode 100644
index 0000000000..2c38e24add
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9508.v
@@ -0,0 +1,29 @@
+Set Implicit Arguments.
+Unset Strict Implicit.
+
+Module OK.
+Record A := mkA {
+ T : Type;
+ P : T -> bool;
+}.
+
+About P. (* Argument a is implicit *)
+Check P (true: T (mkA negb)).
+End OK.
+
+Module KO.
+Set Primitive Projections.
+Record A := mkA {
+ T : Type;
+ P : T -> bool;
+}.
+
+About P. (* No implicit arguments *)
+Check P (true: T (mkA negb)).
+(*
+The command has indeed failed with message:
+The term "true : T {| T := bool; P := negb |}" has type "T {| T := bool; P := negb |}"
+while it is expected to have type "A".
+*)
+
+End KO.
diff --git a/test-suite/bugs/closed/bug_9526.v b/test-suite/bugs/closed/bug_9526.v
new file mode 100644
index 0000000000..344d42083f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9526.v
@@ -0,0 +1,30 @@
+Primitive int := #int63_type.
+
+Module bad1.
+Polymorphic Inductive badcarry1 (A:Type) : Type :=
+| C0: A -> badcarry1 A
+| C1: A -> badcarry1 A.
+
+Fail Register badcarry1 as kernel.ind_carry.
+
+End bad1.
+
+Module bad2.
+
+Inductive badcarry2 (A:Set) : Set :=
+| C0: A -> badcarry2 A
+| C1: A -> badcarry2 A.
+
+Fail Register badcarry2 as kernel.ind_carry.
+
+End bad2.
+
+Module bad3.
+
+Inductive badcarry3 : Type -> Type :=
+| C0: forall A, A -> badcarry3 A
+| C1: forall A, A -> badcarry3 A.
+
+Fail Register badcarry3 as kernel.ind_carry.
+
+End bad3.
diff --git a/test-suite/bugs/closed/bug_9527.v b/test-suite/bugs/closed/bug_9527.v
new file mode 100644
index 0000000000..e08d194c6c
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9527.v
@@ -0,0 +1 @@
+Fail Check fix f (x : nat) := (let x := (f x) in f 0).
diff --git a/test-suite/bugs/closed/bug_9595.v b/test-suite/bugs/closed/bug_9595.v
new file mode 100644
index 0000000000..312ed7d045
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9595.v
@@ -0,0 +1,11 @@
+Set Primitive Projections.
+Set Warnings "+non-primitive-record".
+
+(* 0 fields *)
+Fail Record foo := { a := 0 }.
+
+(* anonymous field *)
+Fail Record foo := { _ : nat }.
+
+(* squashed *)
+Fail Record foo : Prop := { a : nat }.
diff --git a/test-suite/bugs/closed/bug_9598.v b/test-suite/bugs/closed/bug_9598.v
new file mode 100644
index 0000000000..00bbfcf5d9
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9598.v
@@ -0,0 +1,36 @@
+Module case.
+
+ Inductive pair := K (n1 : nat) (n2 : nat).
+ Definition fst (p : pair) : nat := match p with K n _ => n end.
+
+ Definition alias_K a b := K a b.
+
+ Fixpoint rec (x : nat) : nat := fst (K 0 (rec x)).
+ Fixpoint rec_ko (x : nat) : nat := fst (alias_K 0 (rec_ko x)).
+
+End case.
+
+Module fixpoint.
+
+ Inductive pair := K (n1 : nat) (n2 : nat).
+ Fixpoint fst (p : pair) : nat := match p with K n _ => n end.
+
+ Definition alias_K a b := K a b.
+
+ Fixpoint rec (x : nat) : nat := fst (K 0 (rec x)).
+ Fixpoint rec_ko (x : nat) : nat := fst (alias_K 0 (rec_ko x)).
+
+End fixpoint.
+
+Module primproj.
+
+ Set Primitive Projections.
+
+ Inductive pair := K { fst : nat; snd : nat }.
+
+ Definition alias_K a b := K a b.
+
+ Fixpoint rec (x : nat) : nat := fst (K 0 (rec x)).
+ Fixpoint rec_ko (x : nat) : nat := fst (alias_K 0 (rec_ko x)).
+
+End primproj.
diff --git a/test-suite/bugs/closed/bug_9631.v b/test-suite/bugs/closed/bug_9631.v
new file mode 100644
index 0000000000..8afeccccd4
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9631.v
@@ -0,0 +1,7 @@
+
+Fail Instance x : _.
+
+Existing Class True.
+(* the type is checked for typeclass-ness before interping the body so
+ this is the same error *)
+Fail Instance x : _ := I.
diff --git a/test-suite/bugs/closed/bug_9663.v b/test-suite/bugs/closed/bug_9663.v
new file mode 100644
index 0000000000..b5fa601278
--- /dev/null
+++ b/test-suite/bugs/closed/bug_9663.v
@@ -0,0 +1,2 @@
+Definition id_depfn S T (f : forall x : S, T x) := f.
+Definition idn : nat -> nat := @id_depfn _ _ (fun x => x).
diff --git a/test-suite/bugs/closed/bug_sprop_13.v b/test-suite/bugs/closed/bug_sprop_13.v
new file mode 100644
index 0000000000..ae80c9c51f
--- /dev/null
+++ b/test-suite/bugs/closed/bug_sprop_13.v
@@ -0,0 +1,7 @@
+(* -*- mode: coq; coq-prog-args: ("-allow-sprop") -*- *)
+Goal forall (P : SProp), P -> P.
+Proof.
+ intros P H. set (H0 := H).
+ (* goal is now H0 *)
+ exact H0.
+Qed.
diff --git a/test-suite/bugs/closed/bug_sprop_14.v b/test-suite/bugs/closed/bug_sprop_14.v
new file mode 100644
index 0000000000..1e6e9b30de
--- /dev/null
+++ b/test-suite/bugs/closed/bug_sprop_14.v
@@ -0,0 +1,26 @@
+(* -*- coq-prog-args: ("-allow-sprop"); -*- *)
+
+Set Universe Polymorphism.
+
+Inductive False : SProp :=.
+
+Axiom ℙ@{} : SProp.
+
+Definition TYPE@{i} := ℙ -> Type@{i}.
+Definition PROP@{} := ℙ -> SProp.
+
+Definition El@{i} (A : TYPE@{i}) := forall p, A p.
+Definition sEl@{} (A : PROP@{}) : SProp := forall p, A p.
+
+Definition SPropᶠ@{} := fun (p : ℙ) => SProp.
+
+Definition sProdᶠ@{i}
+ (A : TYPE@{i})
+ (B : forall (p : ℙ), El A -> SProp) : PROP := fun (p : ℙ) => forall x : El A, B p x.
+
+Definition Falseᶠ : El SPropᶠ := fun p => False.
+
+Definition EMᶠ : sEl (sProdᶠ SPropᶠ (fun p A => ((sProdᶠ A (fun p _ => Falseᶠ p))) p)).
+Proof.
+Fail Admitted.
+Abort.
diff --git a/test-suite/bugs/opened/bug_3166.v b/test-suite/bugs/opened/bug_3166.v
index e1c29a954c..baf87631f0 100644
--- a/test-suite/bugs/opened/bug_3166.v
+++ b/test-suite/bugs/opened/bug_3166.v
@@ -81,3 +81,4 @@ Goal forall T (x y : T) (p : x = y), True.
compute in H0.
change (fun (x' : T) (_ : y = x') => x' = y) with ((fun y => fun (x' : T) (_ : y = x') => x' = y) y) in H0.
Fail pose proof (fun k => @eq_trans _ _ _ k H0).
+Abort.
diff --git a/test-suite/bugs/opened/bug_3754.v b/test-suite/bugs/opened/bug_3754.v
index a717bbe735..18820b1a4c 100644
--- a/test-suite/bugs/opened/bug_3754.v
+++ b/test-suite/bugs/opened/bug_3754.v
@@ -282,3 +282,4 @@ Defined.
rewrite <- ap_p_pp; rewrite_moveL_Mp_p.
Set Debug Tactic Unification.
Fail rewrite (concat_Ap ff2).
+ Abort.
diff --git a/test-suite/bugs/opened/bug_3890.v b/test-suite/bugs/opened/bug_3890.v
index 5c74addb62..9d83743b2a 100644
--- a/test-suite/bugs/opened/bug_3890.v
+++ b/test-suite/bugs/opened/bug_3890.v
@@ -1,7 +1,11 @@
+Set Nested Proofs Allowed.
+
Class Foo.
Class Bar := b : Type.
+Set Refine Instance Mode.
Instance foo : Foo := _.
+Unset Refine Instance Mode.
(* 1 subgoals, subgoal 1 (ID 4)
============================
diff --git a/test-suite/bugs/opened/bug_3938.v b/test-suite/bugs/opened/bug_3938.v
index 2d0d1930f1..3c7c945ed8 100644
--- a/test-suite/bugs/opened/bug_3938.v
+++ b/test-suite/bugs/opened/bug_3938.v
@@ -4,3 +4,4 @@ Goal forall a b (f : nat -> Set), Nat.eq a b -> f a = f b.
intros a b f H.
rewrite H. (* Toplevel input, characters 15-25:
Anomaly: Evar ?X11 was not declared. Please report. *)
+Abort.
diff --git a/test-suite/complexity/constructor.v b/test-suite/complexity/constructor.v
index c5e1953829..31217ca75e 100644
--- a/test-suite/complexity/constructor.v
+++ b/test-suite/complexity/constructor.v
@@ -214,3 +214,4 @@ Fixpoint expand (n : nat) : Prop :=
Example Expand : expand 2500.
Time constructor. (* ~0.45 secs *)
+Qed.
diff --git a/test-suite/complexity/f_equal.v b/test-suite/complexity/f_equal.v
index 86698fa872..c2c566930b 100644
--- a/test-suite/complexity/f_equal.v
+++ b/test-suite/complexity/f_equal.v
@@ -12,3 +12,4 @@ end.
Goal stupid 23 = stupid 23.
Timeout 5 Time f_equal.
+Abort.
diff --git a/test-suite/complexity/injection.v b/test-suite/complexity/injection.v
index a76fa19d3c..298a07c1c4 100644
--- a/test-suite/complexity/injection.v
+++ b/test-suite/complexity/injection.v
@@ -111,3 +111,4 @@ Lemma test: forall n1 w1 n2 w2, mk_world n1 w1 = mk_world n2 w2 ->
Proof.
intros.
Timeout 10 Time injection H.
+Abort.
diff --git a/test-suite/complexity/ring.v b/test-suite/complexity/ring.v
index 51f7c4dabc..2d585ce5c5 100644
--- a/test-suite/complexity/ring.v
+++ b/test-suite/complexity/ring.v
@@ -5,3 +5,4 @@ Require Import ZArith.
Open Scope Z_scope.
Goal forall a, a+a+a+a+a+a+a+a+a+a+a+a+a = a*13.
Timeout 5 Time intro; ring.
+Abort.
diff --git a/test-suite/complexity/ring2.v b/test-suite/complexity/ring2.v
index 04fa59075b..1c119b8e42 100644
--- a/test-suite/complexity/ring2.v
+++ b/test-suite/complexity/ring2.v
@@ -50,3 +50,4 @@ Infix "+" := Zadd : Z_scope.
Goal forall a, a+a+a+a+a+a+a+a+a+a+a+a+a = a*13.
Timeout 5 Time intro; ring.
+Abort.
diff --git a/test-suite/complexity/setoid_rewrite.v b/test-suite/complexity/setoid_rewrite.v
index 2e3b006ef0..10b270ccad 100644
--- a/test-suite/complexity/setoid_rewrite.v
+++ b/test-suite/complexity/setoid_rewrite.v
@@ -8,3 +8,4 @@ Variable f : nat -> Prop.
Goal forall U:Prop, f 100 <-> U.
intros U.
Timeout 5 Time setoid_replace U with False.
+Abort.
diff --git a/test-suite/complexity/unification.v b/test-suite/complexity/unification.v
index d2ea527516..0c9915c84e 100644
--- a/test-suite/complexity/unification.v
+++ b/test-suite/complexity/unification.v
@@ -49,3 +49,4 @@ Goal
))))
.
Timeout 2 Time try refine (refl_equal _).
+Abort.
diff --git a/test-suite/coq-makefile/arg/_CoqProject b/test-suite/coq-makefile/arg/_CoqProject
index 53dc963997..ed31a58247 100644
--- a/test-suite/coq-makefile/arg/_CoqProject
+++ b/test-suite/coq-makefile/arg/_CoqProject
@@ -4,7 +4,7 @@
-arg "-w default"
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/camldep/_CoqProject b/test-suite/coq-makefile/camldep/_CoqProject
new file mode 100644
index 0000000000..0b7ebd14e4
--- /dev/null
+++ b/test-suite/coq-makefile/camldep/_CoqProject
@@ -0,0 +1,4 @@
+-Q . Foo
+-I src
+src/file1.mlg
+src/file2.ml
diff --git a/test-suite/coq-makefile/camldep/run.sh b/test-suite/coq-makefile/camldep/run.sh
new file mode 100755
index 0000000000..aa62ee56eb
--- /dev/null
+++ b/test-suite/coq-makefile/camldep/run.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+export PATH=$COQBIN:$PATH
+export LC_ALL=C
+
+rm -rf _test
+mkdir _test
+cp _CoqProject _test/
+cd _test
+mkdir src
+
+echo '{ let foo = () }' > src/file1.mlg
+echo 'let bar = File1.foo' > src/file2.ml
+coq_makefile -f _CoqProject -o Makefile
+make src/file2.cmx
+[ -f src/file2.cmx ]
diff --git a/test-suite/coq-makefile/compat-subdirs/_CoqProject b/test-suite/coq-makefile/compat-subdirs/_CoqProject
index 4f44bde22a..1f914a71b0 100644
--- a/test-suite/coq-makefile/compat-subdirs/_CoqProject
+++ b/test-suite/coq-makefile/compat-subdirs/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/coqdoc1/_CoqProject b/test-suite/coq-makefile/coqdoc1/_CoqProject
index 35792066bb..aa9473eaf0 100644
--- a/test-suite/coq-makefile/coqdoc1/_CoqProject
+++ b/test-suite/coq-makefile/coqdoc1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/coqdoc2/_CoqProject b/test-suite/coq-makefile/coqdoc2/_CoqProject
index d2a547d47b..0068554d72 100644
--- a/test-suite/coq-makefile/coqdoc2/_CoqProject
+++ b/test-suite/coq-makefile/coqdoc2/_CoqProject
@@ -3,7 +3,7 @@
-I src/
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/emptyprefix/_CoqProject b/test-suite/coq-makefile/emptyprefix/_CoqProject
index 5678a8edbb..3133342f6c 100644
--- a/test-suite/coq-makefile/emptyprefix/_CoqProject
+++ b/test-suite/coq-makefile/emptyprefix/_CoqProject
@@ -4,7 +4,7 @@
-arg "-w default"
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/extend-subdirs/_CoqProject b/test-suite/coq-makefile/extend-subdirs/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/extend-subdirs/_CoqProject
+++ b/test-suite/coq-makefile/extend-subdirs/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/findlib-package/_CoqProject b/test-suite/coq-makefile/findlib-package/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/findlib-package/_CoqProject
+++ b/test-suite/coq-makefile/findlib-package/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/latex1/_CoqProject b/test-suite/coq-makefile/latex1/_CoqProject
index 35792066bb..aa9473eaf0 100644
--- a/test-suite/coq-makefile/latex1/_CoqProject
+++ b/test-suite/coq-makefile/latex1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/merlin1/_CoqProject b/test-suite/coq-makefile/merlin1/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/merlin1/_CoqProject
+++ b/test-suite/coq-makefile/merlin1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/mlpack1/_CoqProject b/test-suite/coq-makefile/mlpack1/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/mlpack1/_CoqProject
+++ b/test-suite/coq-makefile/mlpack1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/mlpack2/_CoqProject b/test-suite/coq-makefile/mlpack2/_CoqProject
index 51864a87ae..3db54e0a0b 100644
--- a/test-suite/coq-makefile/mlpack2/_CoqProject
+++ b/test-suite/coq-makefile/mlpack2/_CoqProject
@@ -3,7 +3,7 @@
-I src/
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/multiroot/_CoqProject b/test-suite/coq-makefile/multiroot/_CoqProject
index b384bb6d97..f53eef99a8 100644
--- a/test-suite/coq-makefile/multiroot/_CoqProject
+++ b/test-suite/coq-makefile/multiroot/_CoqProject
@@ -4,7 +4,7 @@
-I src/
./src/test_plugin.mllib
-./src/test.ml4
+./src/test.mlg
./src/test.mli
./src/test_aux.ml
./src/test_aux.mli
diff --git a/test-suite/coq-makefile/native1/_CoqProject b/test-suite/coq-makefile/native1/_CoqProject
index a6fa17348c..3dfca7ffc0 100644
--- a/test-suite/coq-makefile/native1/_CoqProject
+++ b/test-suite/coq-makefile/native1/_CoqProject
@@ -2,9 +2,10 @@
-R theories test
-I src
-arg -native-compiler
+-arg yes
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/only/_CoqProject b/test-suite/coq-makefile/only/_CoqProject
index 357384fddf..619a8fa459 100644
--- a/test-suite/coq-makefile/only/_CoqProject
+++ b/test-suite/coq-makefile/only/_CoqProject
@@ -3,7 +3,7 @@
-I src/
./src/test_plugin.mlpack
-./src/test.ml4
+./src/test.mlg
./src/test.mli
./src/test_aux.ml
./src/test_aux.mli
diff --git a/test-suite/coq-makefile/plugin1/_CoqProject b/test-suite/coq-makefile/plugin1/_CoqProject
index 4eddc9d708..ab7876d868 100644
--- a/test-suite/coq-makefile/plugin1/_CoqProject
+++ b/test-suite/coq-makefile/plugin1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mllib
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/plugin2/_CoqProject b/test-suite/coq-makefile/plugin2/_CoqProject
index 0bf1e07f25..94eed53130 100644
--- a/test-suite/coq-makefile/plugin2/_CoqProject
+++ b/test-suite/coq-makefile/plugin2/_CoqProject
@@ -3,7 +3,7 @@
-I src/
src/test_plugin.mllib
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/plugin3/_CoqProject b/test-suite/coq-makefile/plugin3/_CoqProject
index 2028d49a8b..8e8a7ab074 100644
--- a/test-suite/coq-makefile/plugin3/_CoqProject
+++ b/test-suite/coq-makefile/plugin3/_CoqProject
@@ -3,7 +3,7 @@
-I src/
./src/test_plugin.mllib
-./src/test.ml4
+./src/test.mlg
./src/test.mli
./src/test_aux.ml
./src/test_aux.mli
diff --git a/test-suite/coq-makefile/quick2vo/_CoqProject b/test-suite/coq-makefile/quick2vo/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/quick2vo/_CoqProject
+++ b/test-suite/coq-makefile/quick2vo/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/template/init.sh b/test-suite/coq-makefile/template/init.sh
index 2e066d30d9..30be5e6456 100755
--- a/test-suite/coq-makefile/template/init.sh
+++ b/test-suite/coq-makefile/template/init.sh
@@ -11,7 +11,7 @@ mkdir -p theories/sub
cp ../../template/theories/sub/testsub.v theories/sub
cp ../../template/theories/test.v theories
-cp ../../template/src/test.ml4 src
+cp ../../template/src/test.mlg src
cp ../../template/src/test_aux.mli src
cp ../../template/src/test.mli src
cp ../../template/src/test_plugin.mlpack src
diff --git a/test-suite/coq-makefile/template/src/test.ml4 b/test-suite/coq-makefile/template/src/test.mlg
index 72765abe04..7a166f3b98 100644
--- a/test-suite/coq-makefile/template/src/test.ml4
+++ b/test-suite/coq-makefile/template/src/test.mlg
@@ -1,13 +1,17 @@
+{
open Ltac_plugin
+}
DECLARE PLUGIN "test_plugin"
+{
let () = Mltop.add_known_plugin (fun () -> ()) "test_plugin";;
+}
VERNAC COMMAND EXTEND Test CLASSIFIED AS SIDEFF
- | [ "TestCommand" ] -> [ () ]
+ | [ "TestCommand" ] -> { () }
END
TACTIC EXTEND test
-| [ "test_tactic" ] -> [ Test_aux.tac ]
+| [ "test_tactic" ] -> { Test_aux.tac }
END
diff --git a/test-suite/coq-makefile/uninstall1/_CoqProject b/test-suite/coq-makefile/uninstall1/_CoqProject
index 35792066bb..aa9473eaf0 100644
--- a/test-suite/coq-makefile/uninstall1/_CoqProject
+++ b/test-suite/coq-makefile/uninstall1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/uninstall2/_CoqProject b/test-suite/coq-makefile/uninstall2/_CoqProject
index d2a547d47b..0068554d72 100644
--- a/test-suite/coq-makefile/uninstall2/_CoqProject
+++ b/test-suite/coq-makefile/uninstall2/_CoqProject
@@ -3,7 +3,7 @@
-I src/
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/validate1/_CoqProject b/test-suite/coq-makefile/validate1/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/validate1/_CoqProject
+++ b/test-suite/coq-makefile/validate1/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coq-makefile/vio2vo/_CoqProject b/test-suite/coq-makefile/vio2vo/_CoqProject
index 69f47302e1..61136e82f0 100644
--- a/test-suite/coq-makefile/vio2vo/_CoqProject
+++ b/test-suite/coq-makefile/vio2vo/_CoqProject
@@ -3,7 +3,7 @@
-I src
src/test_plugin.mlpack
-src/test.ml4
+src/test.mlg
src/test.mli
src/test_aux.ml
src/test_aux.mli
diff --git a/test-suite/coqchk/bug_8655.v b/test-suite/coqchk/bug_8655.v
new file mode 100644
index 0000000000..06d08b2082
--- /dev/null
+++ b/test-suite/coqchk/bug_8655.v
@@ -0,0 +1 @@
+Inductive IND2 (A:Type) (T:=fun _ : Type->Type => A) := CONS2 : IND2 A -> IND2 (T IND2).
diff --git a/test-suite/coqchk/bug_8876.v b/test-suite/coqchk/bug_8876.v
new file mode 100644
index 0000000000..2d20511a04
--- /dev/null
+++ b/test-suite/coqchk/bug_8876.v
@@ -0,0 +1,19 @@
+(* -*- coq-prog-args: ("-noinit"); -*- *)
+Require Import Coq.Init.Notations.
+
+Notation "x -> y" := (forall _ : x, y).
+
+Inductive eq {A:Type} (a:A) : A -> Prop := eq_refl : eq a a.
+
+Set Universe Polymorphism.
+Set Polymorphic Inductive Cumulativity.
+Set Printing Universes.
+
+(* Constructors for an inductive with indices *)
+Module WithIndex.
+ Inductive foo@{i} : (Prop -> Prop) -> Prop := mkfoo: foo (fun x => x).
+
+ Monomorphic Universes i j.
+ Monomorphic Constraint i < j.
+ Definition bar : eq mkfoo@{i} mkfoo@{j} := eq_refl _.
+End WithIndex.
diff --git a/test-suite/coqchk/bug_8881.v b/test-suite/coqchk/bug_8881.v
new file mode 100644
index 0000000000..dfc209b318
--- /dev/null
+++ b/test-suite/coqchk/bug_8881.v
@@ -0,0 +1,23 @@
+
+(* Check use of equivalence on inductive types (bug #1242) *)
+
+Module Type ASIG.
+ Inductive t : Set := a | b : t.
+ Definition f := fun x => match x with a => true | b => false end.
+End ASIG.
+
+Module Type BSIG.
+ Declare Module A : ASIG.
+ Definition f := fun x => match x with A.a => true | A.b => false end.
+End BSIG.
+
+Module C (A : ASIG) (B : BSIG with Module A:=A).
+
+ (* Check equivalence is considered in "case_info" *)
+ Lemma test : forall x, A.f x = B.f x.
+ Proof.
+ intro x. unfold B.f, A.f.
+ destruct x; reflexivity.
+ Qed.
+
+End C.
diff --git a/test-suite/coqchk/bug_8937.v b/test-suite/coqchk/bug_8937.v
new file mode 100644
index 0000000000..5b326e389b
--- /dev/null
+++ b/test-suite/coqchk/bug_8937.v
@@ -0,0 +1,21 @@
+(* -*- coq-prog-args: ("-noinit"); -*- *)
+
+Unset Elimination Schemes.
+Module Type S.
+
+Inductive foo : Prop :=.
+Definition bar (x:foo) : Prop := match x with end.
+
+End S.
+
+Module M.
+
+Inductive foo : Prop :=.
+Definition bar (x:foo) : Prop := match x with end.
+
+End M.
+
+Module MS : S := M.
+
+Module F (Z:S) := Z.
+Module MS' : S := F M.
diff --git a/test-suite/coqchk/inductive_functor_params.v b/test-suite/coqchk/inductive_functor_params.v
new file mode 100644
index 0000000000..f364a62818
--- /dev/null
+++ b/test-suite/coqchk/inductive_functor_params.v
@@ -0,0 +1,16 @@
+
+Module Type T.
+ Parameter foo : nat -> nat.
+End T.
+
+Module F (A:T).
+ Inductive ind (n:nat) : nat -> Prop :=
+ | C : (forall x, x < n -> ind (A.foo n) x) -> ind n n.
+End F.
+
+Module A. Definition foo (n:nat) := n. End A.
+
+Module M := F A.
+(* Note: M.ind could be seen as having 1 recursively uniform
+ parameter, but module substitution does not recognize it, so it is
+ treated as a non-uniform parameter. *)
diff --git a/test-suite/coqchk/inductive_functor_squash.v b/test-suite/coqchk/inductive_functor_squash.v
new file mode 100644
index 0000000000..9d33fafc4c
--- /dev/null
+++ b/test-suite/coqchk/inductive_functor_squash.v
@@ -0,0 +1,15 @@
+
+
+Module Type T.
+ Parameter f : nat -> Type.
+End T.
+
+Module F(A:T).
+ Inductive ind : Prop :=
+ C : A.f 0 -> ind.
+End F.
+
+Module A. Definition f (x:nat) := True. End A.
+
+Module M := F A.
+(* M.ind could eliminate into Set/Type even though F.ind can't *)
diff --git a/test-suite/coqchk/inductive_functor_template.v b/test-suite/coqchk/inductive_functor_template.v
new file mode 100644
index 0000000000..bc5cd0fb68
--- /dev/null
+++ b/test-suite/coqchk/inductive_functor_template.v
@@ -0,0 +1,11 @@
+
+Module Type E. Parameter T : Type. End E.
+
+Module F (X:E).
+ #[universes(template)] Inductive foo := box : X.T -> foo.
+End F.
+
+Module ME. Definition T := nat. End ME.
+Module A := F ME.
+(* Note: A.foo could live in Set, and coqchk sees that (because of
+ template polymorphism implementation details) *)
diff --git a/test-suite/dune b/test-suite/dune
index c5fa0bb14a..c430400ba5 100644
--- a/test-suite/dune
+++ b/test-suite/dune
@@ -1,3 +1,13 @@
+; The easiest way to generate a portable absolute path is to use OCaml
+; itself to print it
+(executable
+ (name ocaml_pwd)
+ (modules ocaml_pwd))
+
+(rule
+ (targets libpath.inc)
+ (action (with-stdout-to %{targets} (run ./ocaml_pwd.exe -quoted ../../install/%{context_name}/lib/coq/ ))))
+
(rule
(targets summary.log)
(deps
@@ -14,60 +24,13 @@
; For fake_ide
(package coqide-server)
(source_tree .))
- ; Finer-grained dependencies look like this
+ ; Finer-grained dependencies would look like this and be generated
+ ; by coqdep; that would allow tests to be run incrementally.
; ../tools/CoqMakefile.in
; ../theories/Init/Prelude.vo
- ; ../theories/Arith/Arith.vo
- ; ../theories/Arith/Compare.vo
- ; ../theories/PArith/PArith.vo
- ; ../theories/QArith/QArith.vo
- ; ../theories/QArith/Qcanon.vo
- ; ../theories/ZArith/ZArith.vo
- ; ../theories/ZArith/Zwf.vo
- ; ../theories/Sets/Ensembles.vo
- ; ../theories/Numbers/Natural/Peano/NPeano.vo
- ; ../theories/Numbers/Cyclic/Int31/Cyclic31.vo
- ; ../theories/FSets/FMaps.vo
- ; ../theories/FSets/FSets.vo
- ; ../theories/MSets/MSets.vo
- ; ../theories/Compat/Coq87.vo
- ; ../theories/Compat/Coq88.vo
- ; ../theories/Relations/Relations.vo
- ; ../theories/Unicode/Utf8.vo
- ; ../theories/Program/Program.vo
- ; ../theories/Classes/EquivDec.vo
- ; ../theories/Classes/DecidableClass.vo
- ; ../theories/Classes/SetoidClass.vo
- ; ../theories/Classes/RelationClasses.vo
- ; ../theories/Logic/Classical.vo
- ; ../theories/Logic/Hurkens.vo
- ; ../theories/Logic/ClassicalFacts.vo
- ; ../theories/Reals/Reals.vo
- ; ../theories/Lists/Streams.vo
- ; ../plugins/micromega/Lia.vo
- ; ../plugins/micromega/Lqa.vo
- ; ../plugins/micromega/Psatz.vo
- ; ../plugins/micromega/MExtraction.vo
- ; ../plugins/nsatz/Nsatz.vo
- ; ../plugins/omega/Omega.vo
- ; ../plugins/ssr/ssrbool.vo
- ; ../plugins/derive/Derive.vo
- ; ../plugins/funind/Recdef.vo
- ; ../plugins/extraction/Extraction.vo
- ; ../plugins/extraction/ExtrOcamlNatInt.vo
- ; coqtop
- ; coqtop.opt
- ; coqidetop.opt
- ; coqqueryworker.opt
- ; coqtacticworker.opt
- ; coqproofworker.opt
- ; coqc
- ; coqchk
- ; coqdoc
+ ; %{bin:coqc}
; %{bin:coq_makefile}
; %{bin:fake_ide}
(action
(progn
- ; XXX: we will allow to set the NJOBS variable in a future Dune
- ; version, either by using an env var or by letting Dune set `-j`
- (run make -j 2 BIN= PRINT_LOGS=1))))
+ (bash "make -j %{env:NJOBS=2} BIN= COQLIB=%{read:libpath.inc} PRINT_LOGS=1 UNIT_TESTS=%{env:COQ_UNIT_TEST=unit-tests}"))))
diff --git a/test-suite/failure/int31.v b/test-suite/failure/int63.v
index ed4c9f9c78..0bb87c6548 100644
--- a/test-suite/failure/int31.v
+++ b/test-suite/failure/int63.v
@@ -1,17 +1,16 @@
-Require Import Int31 Cyclic31.
+Require Import Int63 Cyclic63.
-Open Scope int31_scope.
+Open Scope int63_scope.
(* This used to go through because of an unbalanced stack bug in the bytecode
interpreter *)
Lemma bad : False.
assert (1 = 2).
-change 1 with (add31 (addmuldiv31 65 (add31 1 1) 2) 1).
+change 1 with (Int63.add (Int63.addmuldiv 129 (Int63.add 1 1) 2) 1).
Fail vm_compute; reflexivity.
(*
discriminate.
Qed.
*)
Abort.
-
diff --git a/test-suite/ide/debug_ltac.fake b/test-suite/ide/debug_ltac.fake
new file mode 100644
index 0000000000..aa68fad39e
--- /dev/null
+++ b/test-suite/ide/debug_ltac.fake
@@ -0,0 +1,2 @@
+FAILADD { Debug On. }
+ADD { Set Debug On. }
diff --git a/test-suite/ide/join-sync.fake b/test-suite/ide/join-sync.fake
new file mode 100644
index 0000000000..236028ce46
--- /dev/null
+++ b/test-suite/ide/join-sync.fake
@@ -0,0 +1,20 @@
+# Script simulating a dialog between coqide and coqtop -ideslave
+# Run it via fake_ide
+#
+# Error resiliency + async proofs off
+# coq-prog-args: ("-async-proofs" "off" "-async-proofs-command-error-resilience" "on")
+#
+
+ADD { Lemma x : True. }
+ADD { Proof using. }
+ADD here { trivial. }
+ADD { fail. }
+ADD { Qed. }
+ADD { Lemma y : True. }
+ADD { Proof using. }
+ADD { trivial. }
+ADD { Qed. }
+WAIT
+FAILJOIN
+ASSERT TIP here
+ABORT
diff --git a/test-suite/ide/join.fake b/test-suite/ide/join.fake
new file mode 100644
index 0000000000..c4c696ad9a
--- /dev/null
+++ b/test-suite/ide/join.fake
@@ -0,0 +1,20 @@
+# Script simulating a dialog between coqide and coqtop -ideslave
+# Run it via fake_ide
+#
+# Error resiliency
+#
+
+ADD { Section x. }
+ADD { Lemma x : True. }
+ADD { Proof using. }
+ADD here { trivial. }
+ADD { fail. }
+ADD { Qed. }
+ADD { Lemma y : True. }
+ADD { Proof using. }
+ADD { trivial. }
+ADD { Qed. }
+ADD { End x. }
+FAILJOIN
+ASSERT TIP here
+ABORT
diff --git a/test-suite/ide/reopen1.fake b/test-suite/ide/reopen1.fake
new file mode 100644
index 0000000000..2c4f13de86
--- /dev/null
+++ b/test-suite/ide/reopen1.fake
@@ -0,0 +1,22 @@
+# Script simulating a dialog between coqide and coqtop -ideslave
+# Run it via fake_ide
+#
+# jumping outside the focused zone should signal an unfocus.
+
+# first proof
+ADD here { Goal True. }
+ADD here1 { Proof. }
+ADD { Qed. }
+WAIT
+EDIT_AT here1
+EDIT_AT here
+# fwd again
+ADD here2 { Proof. }
+ADD here3 { Qed. }
+WAIT
+EDIT_AT here2
+# Fixing the proof
+ADD { Proof. }
+ADD { trivial. }
+ADD { Qed. }
+JOIN
diff --git a/test-suite/misc/4722.sh b/test-suite/misc/4722.sh
index 86bc50b5cd..70071b9d60 100755
--- a/test-suite/misc/4722.sh
+++ b/test-suite/misc/4722.sh
@@ -4,12 +4,12 @@ set -e
# create test files
mkdir -p misc/4722
ln -sf toto misc/4722/tata
-touch misc/4722.v
+touch misc/bug_4722.v
# run test
-$coqtop "-R" "misc/4722" "Foo" -top Top -load-vernac-source misc/4722.v
+$coqc "-R" "misc/4722" "Foo" -top Top misc/bug_4722.v
# clean up test files
rm misc/4722/tata
rmdir misc/4722
-rm misc/4722.v
+rm misc/bug_4722.v
diff --git a/test-suite/misc/7704.sh b/test-suite/misc/7704.sh
index 0ca2c97d24..5fc171649e 100755
--- a/test-suite/misc/7704.sh
+++ b/test-suite/misc/7704.sh
@@ -4,4 +4,4 @@ set -e
export PATH=$BIN:$PATH
-${coqtop#"$BIN"} -compile misc/aux7704.v
+${coqc#"$BIN"} misc/aux7704.v
diff --git a/test-suite/misc/aux7704.v b/test-suite/misc/aux7704.v
index 6fdcf67684..1c95211a71 100644
--- a/test-suite/misc/aux7704.v
+++ b/test-suite/misc/aux7704.v
@@ -1,4 +1,3 @@
-
Goal True /\ True.
Proof.
split.
diff --git a/test-suite/misc/deps-checksum.sh b/test-suite/misc/deps-checksum.sh
index a15a8fbee9..8523358303 100755
--- a/test-suite/misc/deps-checksum.sh
+++ b/test-suite/misc/deps-checksum.sh
@@ -3,4 +3,4 @@ rm -f misc/deps/A/*.vo misc/deps/B/*.vo
$coqc -R misc/deps/A A misc/deps/A/A.v
$coqc -R misc/deps/B A misc/deps/B/A.v
$coqc -R misc/deps/B A misc/deps/B/B.v
-$coqtop -R misc/deps/B A -R misc/deps/A A -load-vernac-source misc/deps/checksum.v
+$coqc -R misc/deps/B A -R misc/deps/A A misc/deps/checksum.v
diff --git a/test-suite/misc/deps-order.sh b/test-suite/misc/deps-order.sh
index 6bb2ba2da0..551515b0d6 100755
--- a/test-suite/misc/deps-order.sh
+++ b/test-suite/misc/deps-order.sh
@@ -10,12 +10,12 @@ R=$?
times
$coqc -R misc/deps/lib lib misc/deps/lib/foo.v 2>&1
$coqc -R misc/deps/lib lib -R misc/deps/client client misc/deps/client/foo.v 2>&1
-$coqtop -R misc/deps/lib lib -R misc/deps/client client -load-vernac-source misc/deps/client/bar.v 2>&1
+$coqc -R misc/deps/lib lib -R misc/deps/client client misc/deps/client/bar.v 2>&1
S=$?
if [ $R = 0 ] && [ $S = 0 ]; then
- printf "coqdep and coqtop agree\n"
+ printf "coqdep and coqc agree\n"
exit 0
else
- printf "coqdep and coqtop disagree\n"
+ printf "coqdep and coqc disagree\n"
exit 1
fi
diff --git a/test-suite/misc/deps-utf8.sh b/test-suite/misc/deps-utf8.sh
index acb45b2292..af69370ce4 100755
--- a/test-suite/misc/deps-utf8.sh
+++ b/test-suite/misc/deps-utf8.sh
@@ -8,7 +8,7 @@ rm -f misc/deps/théorèmes/*.v
tmpoutput=$(mktemp /tmp/coqcheck.XXXXXX)
$coqc -R misc/deps AlphaBêta misc/deps/αβ/γδ.v
R=$?
-$coqtop -R misc/deps AlphaBêta -load-vernac-source misc/deps/αβ/εζ.v
+$coqc -R misc/deps AlphaBêta misc/deps/αβ/εζ.v
S=$?
if [ $R = 0 ] && [ $S = 0 ]; then
exit 0
diff --git a/test-suite/misc/exitstatus.sh b/test-suite/misc/exitstatus.sh
index a327f4248b..afc415b2da 100755
--- a/test-suite/misc/exitstatus.sh
+++ b/test-suite/misc/exitstatus.sh
@@ -1,8 +1,5 @@
#!/bin/sh
-$coqtop -load-vernac-source misc/exitstatus/illtyped.v
-N=$?
$coqc misc/exitstatus/illtyped.v
P=$?
-printf "On ill-typed input, coqtop returned %s.\n" "$N"
printf "On ill-typed input, coqc returned %s.\n" "$P"
-if [ $N = 1 ] && [ $P = 1 ]; then exit 0; else exit 1; fi
+if [ $P = 1 ]; then exit 0; else exit 1; fi
diff --git a/test-suite/misc/poly-capture-global-univs.sh b/test-suite/misc/poly-capture-global-univs.sh
index e066ac039b..39d20fd524 100755
--- a/test-suite/misc/poly-capture-global-univs.sh
+++ b/test-suite/misc/poly-capture-global-univs.sh
@@ -11,7 +11,7 @@ coq_makefile -f _CoqProject -o Makefile
make clean
-make src/evil_plugin.cmxs
+make src/evil_plugin.cma
if make; then
>&2 echo 'Should have failed!'
diff --git a/test-suite/misc/poly-capture-global-univs/.gitignore b/test-suite/misc/poly-capture-global-univs/.gitignore
index f5a6d22b8e..2a6a6bc68d 100644
--- a/test-suite/misc/poly-capture-global-univs/.gitignore
+++ b/test-suite/misc/poly-capture-global-univs/.gitignore
@@ -1 +1,2 @@
/Makefile*
+/src/evil.ml
diff --git a/test-suite/misc/poly-capture-global-univs/_CoqProject b/test-suite/misc/poly-capture-global-univs/_CoqProject
index 70ec246062..e5dc3cff56 100644
--- a/test-suite/misc/poly-capture-global-univs/_CoqProject
+++ b/test-suite/misc/poly-capture-global-univs/_CoqProject
@@ -1,7 +1,7 @@
-Q theories Evil
-I src
-src/evil.ml4
+src/evil.mlg
src/evilImpl.ml
src/evilImpl.mli
src/evil_plugin.mlpack
diff --git a/test-suite/misc/poly-capture-global-univs/src/evil.ml4 b/test-suite/misc/poly-capture-global-univs/src/evil.ml4
deleted file mode 100644
index 565e979aaa..0000000000
--- a/test-suite/misc/poly-capture-global-univs/src/evil.ml4
+++ /dev/null
@@ -1,9 +0,0 @@
-
-open Stdarg
-open EvilImpl
-
-DECLARE PLUGIN "evil_plugin"
-
-VERNAC COMMAND FUNCTIONAL EXTEND VernacEvil CLASSIFIED AS SIDEFF
-| [ "Evil" ident(x) ident(y) ] -> [ fun ~atts ~st -> evil x y; st ]
-END
diff --git a/test-suite/misc/poly-capture-global-univs/src/evil.mlg b/test-suite/misc/poly-capture-global-univs/src/evil.mlg
new file mode 100644
index 0000000000..edd22b1d29
--- /dev/null
+++ b/test-suite/misc/poly-capture-global-univs/src/evil.mlg
@@ -0,0 +1,10 @@
+{
+open Stdarg
+open EvilImpl
+}
+
+DECLARE PLUGIN "evil_plugin"
+
+VERNAC COMMAND EXTEND VernacEvil CLASSIFIED AS SIDEFF
+| [ "Evil" ident(x) ident(y) ] -> { evil x y }
+END
diff --git a/test-suite/misc/poly-capture-global-univs/src/evilImpl.ml b/test-suite/misc/poly-capture-global-univs/src/evilImpl.ml
index 6d8ce7c5d7..adabb7a0a0 100644
--- a/test-suite/misc/poly-capture-global-univs/src/evilImpl.ml
+++ b/test-suite/misc/poly-capture-global-univs/src/evilImpl.ml
@@ -9,14 +9,14 @@ let evil t f =
let u = Level.var 0 in
let tu = mkType (Universe.make u) in
let te = Declare.definition_entry
- ~univs:(Monomorphic_const_entry (ContextSet.singleton u)) tu
+ ~univs:(Monomorphic_entry (ContextSet.singleton u)) tu
in
let tc = Declare.declare_constant t (DefinitionEntry te, k) in
let tc = mkConst tc in
let fe = Declare.definition_entry
- ~univs:(Polymorphic_const_entry (UContext.make (Instance.of_array [|u|],Constraint.empty)))
- ~types:(Term.mkArrow tc tu)
- (mkLambda (Name.Name (Id.of_string "x"), tc, mkRel 1))
+ ~univs:(Polymorphic_entry ([|Anonymous|], UContext.make (Instance.of_array [|u|],Constraint.empty)))
+ ~types:(Term.mkArrowR tc tu)
+ (mkLambda (Context.nameR (Id.of_string "x"), tc, mkRel 1))
in
ignore (Declare.declare_constant f (DefinitionEntry fe, k))
diff --git a/test-suite/misc/quick-include.sh b/test-suite/misc/quick-include.sh
new file mode 100755
index 0000000000..96bdee2fc2
--- /dev/null
+++ b/test-suite/misc/quick-include.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+
+$coqc -R misc/quick-include/ QuickInclude -quick misc/quick-include/file1.v
+$coqc -R misc/quick-include/ QuickInclude -quick misc/quick-include/file2.v
diff --git a/test-suite/misc/quick-include/file1.v b/test-suite/misc/quick-include/file1.v
new file mode 100644
index 0000000000..fa48e240cb
--- /dev/null
+++ b/test-suite/misc/quick-include/file1.v
@@ -0,0 +1,18 @@
+
+Module Type E. End E.
+
+Module M.
+ Lemma x : True.
+ Proof. trivial. Qed.
+End M.
+
+
+Module Type T.
+ Lemma x : True.
+ Proof. trivial. Qed.
+End T.
+
+Module F(A:E).
+ Lemma x : True.
+ Proof. trivial. Qed.
+End F.
diff --git a/test-suite/misc/quick-include/file2.v b/test-suite/misc/quick-include/file2.v
new file mode 100644
index 0000000000..ab10dfd8de
--- /dev/null
+++ b/test-suite/misc/quick-include/file2.v
@@ -0,0 +1,6 @@
+
+From QuickInclude Require file1.
+
+Module M. Include file1.M. End M.
+Module T. Include file1.T. End T.
+Module F. Include file1.F. End F.
diff --git a/test-suite/misc/universes/dune b/test-suite/misc/universes/dune
index 58bba300d2..0772f95604 100644
--- a/test-suite/misc/universes/dune
+++ b/test-suite/misc/universes/dune
@@ -5,4 +5,4 @@
(source_tree ../../../plugins))
(action
(with-outputs-to all_stdlib.v
- (run ./build_all_stdlib.sh))))
+ (bash "./build_all_stdlib.sh"))))
diff --git a/test-suite/modules/Nat.v b/test-suite/modules/Nat.v
index d2116d2183..95daa1bb0c 100644
--- a/test-suite/modules/Nat.v
+++ b/test-suite/modules/Nat.v
@@ -2,7 +2,7 @@ Definition T := nat.
Definition le := le.
-Hint Unfold le.
+Hint Unfold le : core.
Lemma le_refl : forall n : nat, le n n.
auto.
diff --git a/test-suite/ocaml_pwd.ml b/test-suite/ocaml_pwd.ml
new file mode 100644
index 0000000000..afa3deea3a
--- /dev/null
+++ b/test-suite/ocaml_pwd.ml
@@ -0,0 +1,7 @@
+let _ =
+ let quoted = Sys.argv.(1) = "-quoted" in
+ let ch_dir = Sys.argv.(if quoted then 2 else 1) in
+ Sys.chdir ch_dir;
+ let dir = Sys.getcwd () in
+ let dir = if quoted then Filename.quote dir else dir in
+ Format.printf "%s%!" dir
diff --git a/test-suite/output-modulo-time/ltacprof_cutoff.v b/test-suite/output-modulo-time/ltacprof_cutoff.v
deleted file mode 100644
index ae5d51bae8..0000000000
--- a/test-suite/output-modulo-time/ltacprof_cutoff.v
+++ /dev/null
@@ -1,28 +0,0 @@
-(* -*- coq-prog-args: ("-profile-ltac") -*- *)
-Require Coq.ZArith.BinInt.
-Module WithIdTac.
- Ltac sleep := do 50 (idtac; let sleep := (eval vm_compute in Coq.ZArith.BinInt.Z.div_eucl) in idtac).
-
- Ltac foo0 := idtac; sleep.
- Ltac foo1 := sleep; foo0.
- Ltac foo2 := sleep; foo1.
- Goal True.
- foo2.
- Show Ltac Profile CutOff 47.
- constructor.
- Qed.
-End WithIdTac.
-
-Module TestEval.
- Ltac sleep := let sleep := (eval vm_compute in Coq.ZArith.BinInt.Z.div_eucl) in idtac.
-
- Ltac foo0 := idtac; do 50 (idtac; sleep).
- Ltac foo1 := sleep; foo0.
- Ltac foo2 := sleep; foo1.
- Goal True.
- Reset Ltac Profile.
- foo2.
- Show Ltac Profile CutOff 47.
- constructor.
- Qed.
-End TestEval.
diff --git a/test-suite/output/Arguments.out b/test-suite/output/Arguments.out
index d587d1f09b..7074ad2d41 100644
--- a/test-suite/output/Arguments.out
+++ b/test-suite/output/Arguments.out
@@ -1,11 +1,13 @@
Nat.sub : nat -> nat -> nat
+Nat.sub is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
The reduction tactics unfold Nat.sub but avoid exposing match constructs
Nat.sub is transparent
Expands to: Constant Coq.Init.Nat.sub
Nat.sub : nat -> nat -> nat
+Nat.sub is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
The reduction tactics unfold Nat.sub when applied to 1 argument
but avoid exposing match constructs
@@ -13,6 +15,7 @@ Nat.sub is transparent
Expands to: Constant Coq.Init.Nat.sub
Nat.sub : nat -> nat -> nat
+Nat.sub is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
The reduction tactics unfold Nat.sub
when the 1st argument evaluates to a constructor and
@@ -21,6 +24,7 @@ Nat.sub is transparent
Expands to: Constant Coq.Init.Nat.sub
Nat.sub : nat -> nat -> nat
+Nat.sub is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
The reduction tactics unfold Nat.sub when the 1st and
2nd arguments evaluate to a constructor and when applied to 2 arguments
@@ -28,6 +32,7 @@ Nat.sub is transparent
Expands to: Constant Coq.Init.Nat.sub
Nat.sub : nat -> nat -> nat
+Nat.sub is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
The reduction tactics unfold Nat.sub when the 1st and
2nd arguments evaluate to a constructor
@@ -37,6 +42,7 @@ pf :
forall D1 C1 : Type,
(D1 -> C1) -> forall D2 C2 : Type, (D2 -> C2) -> D1 * D2 -> C1 * C2
+pf is not universe polymorphic
Arguments D2, C2 are implicit
Arguments D1, C1 are implicit and maximally inserted
Argument scopes are [foo_scope type_scope _ _ _ _ _]
@@ -45,6 +51,7 @@ pf is transparent
Expands to: Constant Arguments.pf
fcomp : forall A B C : Type, (B -> C) -> (A -> B) -> A -> C
+fcomp is not universe polymorphic
Arguments A, B, C are implicit and maximally inserted
Argument scopes are [type_scope type_scope type_scope _ _ _]
The reduction tactics unfold fcomp when applied to 6 arguments
@@ -52,17 +59,20 @@ fcomp is transparent
Expands to: Constant Arguments.fcomp
volatile : nat -> nat
+volatile is not universe polymorphic
Argument scope is [nat_scope]
The reduction tactics always unfold volatile
volatile is transparent
Expands to: Constant Arguments.volatile
f : T1 -> T2 -> nat -> unit -> nat -> nat
+f is not universe polymorphic
Argument scopes are [_ _ nat_scope _ nat_scope]
f is transparent
Expands to: Constant Arguments.S1.S2.f
f : T1 -> T2 -> nat -> unit -> nat -> nat
+f is not universe polymorphic
Argument scopes are [_ _ nat_scope _ nat_scope]
The reduction tactics unfold f when the 3rd, 4th and
5th arguments evaluate to a constructor
@@ -70,6 +80,7 @@ f is transparent
Expands to: Constant Arguments.S1.S2.f
f : forall T2 : Type, T1 -> T2 -> nat -> unit -> nat -> nat
+f is not universe polymorphic
Argument T2 is implicit
Argument scopes are [type_scope _ _ nat_scope _ nat_scope]
The reduction tactics unfold f when the 4th, 5th and
@@ -78,6 +89,7 @@ f is transparent
Expands to: Constant Arguments.S1.f
f : forall T1 T2 : Type, T1 -> T2 -> nat -> unit -> nat -> nat
+f is not universe polymorphic
Arguments T1, T2 are implicit
Argument scopes are [type_scope type_scope _ _ nat_scope _ nat_scope]
The reduction tactics unfold f when the 5th, 6th and
@@ -90,6 +102,7 @@ Expands to: Constant Arguments.f
: Prop
f : forall T1 T2 : Type, T1 -> T2 -> nat -> unit -> nat -> nat
+f is not universe polymorphic
The reduction tactics unfold f when the 5th, 6th and
7th arguments evaluate to a constructor
f is transparent
diff --git a/test-suite/output/Arguments.v b/test-suite/output/Arguments.v
index 97df40f882..844f96aaa1 100644
--- a/test-suite/output/Arguments.v
+++ b/test-suite/output/Arguments.v
@@ -51,7 +51,7 @@ Arguments pi _ _%F _%B.
Check (forall w : r, pi w $ $ = tt).
Fail Check (forall w : r, w $ $ = tt).
Axiom w : r.
-Arguments w _%F _%B : extra scopes.
+Arguments w x%F y%B : extra scopes.
Check (w $ $ = tt).
Fail Arguments w _%F _%B.
diff --git a/test-suite/output/ArgumentsScope.out b/test-suite/output/ArgumentsScope.out
index febe160820..69ba329ff1 100644
--- a/test-suite/output/ArgumentsScope.out
+++ b/test-suite/output/ArgumentsScope.out
@@ -1,56 +1,70 @@
a : bool -> bool
+a is not universe polymorphic
Argument scope is [bool_scope]
Expands to: Variable a
b : bool -> bool
+b is not universe polymorphic
Argument scope is [bool_scope]
Expands to: Variable b
negb'' : bool -> bool
+negb'' is not universe polymorphic
Argument scope is [bool_scope]
negb'' is transparent
Expands to: Constant ArgumentsScope.A.B.negb''
negb' : bool -> bool
+negb' is not universe polymorphic
Argument scope is [bool_scope]
negb' is transparent
Expands to: Constant ArgumentsScope.A.negb'
negb : bool -> bool
+negb is not universe polymorphic
Argument scope is [bool_scope]
negb is transparent
Expands to: Constant Coq.Init.Datatypes.negb
a : bool -> bool
+a is not universe polymorphic
Expands to: Variable a
b : bool -> bool
+b is not universe polymorphic
Expands to: Variable b
negb : bool -> bool
+negb is not universe polymorphic
negb is transparent
Expands to: Constant Coq.Init.Datatypes.negb
negb' : bool -> bool
+negb' is not universe polymorphic
negb' is transparent
Expands to: Constant ArgumentsScope.A.negb'
negb'' : bool -> bool
+negb'' is not universe polymorphic
negb'' is transparent
Expands to: Constant ArgumentsScope.A.B.negb''
a : bool -> bool
+a is not universe polymorphic
Expands to: Variable a
negb : bool -> bool
+negb is not universe polymorphic
negb is transparent
Expands to: Constant Coq.Init.Datatypes.negb
negb' : bool -> bool
+negb' is not universe polymorphic
negb' is transparent
Expands to: Constant ArgumentsScope.negb'
negb'' : bool -> bool
+negb'' is not universe polymorphic
negb'' is transparent
Expands to: Constant ArgumentsScope.negb''
diff --git a/test-suite/output/Arguments_renaming.out b/test-suite/output/Arguments_renaming.out
index 1755886967..3f0717666c 100644
--- a/test-suite/output/Arguments_renaming.out
+++ b/test-suite/output/Arguments_renaming.out
@@ -23,6 +23,7 @@ For eq: Argument scopes are [type_scope _ _]
For eq_refl: Argument scopes are [type_scope _]
eq_refl : forall (A : Type) (x : A), x = x
+eq_refl is not universe polymorphic
Arguments are renamed to B, y
When applied to no arguments:
Arguments B, y are implicit and maximally inserted
@@ -38,6 +39,7 @@ For myEq: Argument scopes are [type_scope _ _]
For myrefl: Argument scopes are [type_scope _ _]
myrefl : forall (B : Type) (x : A), B -> myEq B x x
+myrefl is not universe polymorphic
Arguments are renamed to C, x, _
Argument C is implicit and maximally inserted
Argument scopes are [type_scope _ _]
@@ -55,6 +57,7 @@ Argument Z is implicit and maximally inserted
Argument scopes are [type_scope _ nat_scope nat_scope]
myplus : forall T : Type, T -> nat -> nat -> nat
+myplus is not universe polymorphic
Arguments are renamed to Z, t, n, m
Argument Z is implicit and maximally inserted
Argument scopes are [type_scope _ nat_scope nat_scope]
@@ -73,6 +76,7 @@ For myEq: Argument scopes are [type_scope type_scope _ _]
For myrefl: Argument scopes are [type_scope type_scope _ _]
myrefl : forall (A B : Type) (x : A), B -> myEq A B x x
+myrefl is not universe polymorphic
Arguments are renamed to A, C, x, _
Argument C is implicit and maximally inserted
Argument scopes are [type_scope type_scope _ _]
@@ -92,6 +96,7 @@ Argument Z is implicit and maximally inserted
Argument scopes are [type_scope _ nat_scope nat_scope]
myplus : forall T : Type, T -> nat -> nat -> nat
+myplus is not universe polymorphic
Arguments are renamed to Z, t, n, m
Argument Z is implicit and maximally inserted
Argument scopes are [type_scope _ nat_scope nat_scope]
@@ -108,7 +113,8 @@ Sequences of implicit arguments must be of different lengths.
The command has indeed failed with message:
Some argument names are duplicated: F
The command has indeed failed with message:
-Argument z cannot be declared implicit.
+Argument number 2 (anonymous in original definition) cannot be declared
+implicit.
The command has indeed failed with message:
Extra arguments: y.
The command has indeed failed with message:
diff --git a/test-suite/output/Cases.v b/test-suite/output/Cases.v
index 43718a0f07..4e949dcb04 100644
--- a/test-suite/output/Cases.v
+++ b/test-suite/output/Cases.v
@@ -43,6 +43,7 @@ Print foo.
(* Accept and use notation with binded parameters *)
+#[universes(template)]
Inductive I (A: Type) : Type := C : A -> I A.
Notation "x <: T" := (C T x) (at level 38).
@@ -83,6 +84,7 @@ Print f.
(* Was enhancement request #5142 (error message reported on the most
general return clause heuristic) *)
+#[universes(template)]
Inductive gadt : Type -> Type :=
| gadtNat : nat -> gadt nat
| gadtTy : forall T, T -> gadt T.
diff --git a/test-suite/output/Coercions.v b/test-suite/output/Coercions.v
index 0e84bf3966..6976f35a88 100644
--- a/test-suite/output/Coercions.v
+++ b/test-suite/output/Coercions.v
@@ -1,7 +1,7 @@
(* Submitted by Randy Pollack *)
-Record pred (S : Set) : Type := {sp_pred :> S -> Prop}.
-Record rel (S : Set) : Type := {sr_rel :> S -> S -> Prop}.
+#[universes(template)] Record pred (S : Set) : Type := {sp_pred :> S -> Prop}.
+#[universes(template)] Record rel (S : Set) : Type := {sr_rel :> S -> S -> Prop}.
Section testSection.
Variables (S : Set) (P : pred S) (R : rel S) (x : S).
diff --git a/test-suite/output/ErrorInCanonicalStructures.out b/test-suite/output/ErrorInCanonicalStructures.out
index 73da4f44f8..b4aa60a2c8 100644
--- a/test-suite/output/ErrorInCanonicalStructures.out
+++ b/test-suite/output/ErrorInCanonicalStructures.out
@@ -1,5 +1,4 @@
File "stdin", line 3, characters 0-24:
-Error:
-Could not declare a canonical structure Foo.
+Error: Could not declare a canonical structure Foo.
Expected an instance of a record or structure.
diff --git a/test-suite/output/ErrorInCanonicalStructures2.out b/test-suite/output/ErrorInCanonicalStructures2.out
index 63a2871b82..ab64e25030 100644
--- a/test-suite/output/ErrorInCanonicalStructures2.out
+++ b/test-suite/output/ErrorInCanonicalStructures2.out
@@ -1,5 +1,4 @@
File "stdin", line 3, characters 0-24:
-Error:
-Could not declare a canonical structure bar.
+Error: Could not declare a canonical structure bar.
Expected an instance of a record or structure.
diff --git a/test-suite/output/Error_msg_diffs.out b/test-suite/output/Error_msg_diffs.out
new file mode 100644
index 0000000000..3e337e892d
--- /dev/null
+++ b/test-suite/output/Error_msg_diffs.out
@@ -0,0 +1,12 @@
+File "stdin", line 32, characters 0-12:
+Error:
+In environment
+T : Type
+p : T -> bool
+a : T
+t1, t2 : btree T
+IH1 : count p (rev_tree t1) = count p t1
+IH2 : count p (rev_tree t2) = count p t2
+Unable to unify "(if p a then 1 else 0) + (count p t1 + count p t2)" with
+ "(if p a then 1 else 0) + (count p t2 + count p t1)".
+
diff --git a/test-suite/output/Error_msg_diffs.v b/test-suite/output/Error_msg_diffs.v
new file mode 100644
index 0000000000..11c766b210
--- /dev/null
+++ b/test-suite/output/Error_msg_diffs.v
@@ -0,0 +1,35 @@
+(* coq-prog-args: ("-color" "on" "-async-proofs" "off") *)
+(* Re: -async-proofs off, see https://github.com/coq/coq/issues/9671 *)
+(* Shows diffs in an error message for an "Unable to unify" error *)
+Require Import Arith List Bool.
+
+Inductive btree (T : Type) : Type :=
+ Leaf | Node (val : T) (t1 t2 : btree T).
+
+Arguments Leaf {T}.
+Arguments Node {T}.
+
+Fixpoint rev_tree {T : Type} (t : btree T) : btree T :=
+match t with
+| Leaf => Leaf
+| Node x t1 t2 => Node x (rev_tree t2) (rev_tree t1)
+end.
+
+Fixpoint count {T : Type} (p : T -> bool) (t : btree T) : nat :=
+match t with
+| Leaf => 0
+| Node x t1 t2 =>
+ (if p x then 1 else 0) + (count p t1 + count p t2)
+end.
+
+Lemma count_rev_tree {T} (p : T -> bool) t : count p (rev_tree t) = count p t.
+Proof.
+induction t as [ | a t1 IH1 t2 IH2].
+ easy.
+simpl.
+rewrite IH1.
+rewrite IH2.
+reflexivity.
+rewrite (Nat.add_comm (count p t2)).
+easy.
+Qed.
diff --git a/test-suite/output/Errors.out b/test-suite/output/Errors.out
index cf2d5b2850..14c48e8fa0 100644
--- a/test-suite/output/Errors.out
+++ b/test-suite/output/Errors.out
@@ -9,10 +9,11 @@ The command has indeed failed with message:
Ltac call to "instantiate ( (ident) := (lglob) )" failed.
Instance is not well-typed in the environment of ?x.
The command has indeed failed with message:
-Cannot infer the domain of the type of f.
+Cannot infer ?T in the partial instance "?T -> nat" found for the type of f.
The command has indeed failed with message:
-Cannot infer the domain of the implicit parameter A of id whose type is
-"Type".
+Cannot infer ?T in the partial instance "?T -> nat" found for the implicit
+parameter A of id whose type is "Type".
The command has indeed failed with message:
-Cannot infer the codomain of the type of f in environment:
+Cannot infer ?T in the partial instance "forall x : nat, ?T" found for the
+type of f in environment:
x : nat
diff --git a/test-suite/output/Errors.v b/test-suite/output/Errors.v
index edc35f17b4..b52537dec0 100644
--- a/test-suite/output/Errors.v
+++ b/test-suite/output/Errors.v
@@ -1,6 +1,8 @@
(* coq-prog-args: ("-top" "Errors") *)
(* Test error messages *)
+Set Ltac Backtrace.
+
(* Test non-regression of bug fixed in r13486 (bad printer for module names) *)
Module Type S.
diff --git a/test-suite/output/Extraction_matchs_2413.v b/test-suite/output/Extraction_matchs_2413.v
index 1ecd9771eb..f9398fdca9 100644
--- a/test-suite/output/Extraction_matchs_2413.v
+++ b/test-suite/output/Extraction_matchs_2413.v
@@ -101,7 +101,7 @@ Section decoder_result.
Variable inst : Type.
- Inductive decoder_result : Type :=
+ #[universes(template)] Inductive decoder_result : Type :=
| DecUndefined : decoder_result
| DecUnpredictable : decoder_result
| DecInst : inst -> decoder_result
diff --git a/test-suite/output/Fixpoint.v b/test-suite/output/Fixpoint.v
index 61ae4edbd1..9b25c2dbd3 100644
--- a/test-suite/output/Fixpoint.v
+++ b/test-suite/output/Fixpoint.v
@@ -44,7 +44,7 @@ fix even_pos_odd_pos 2 with (odd_pos_even_pos n (H:odd n) {struct H} : n >= 1).
omega.
Qed.
-CoInductive Inf := S { projS : Inf }.
+#[universes(template)] CoInductive Inf := S { projS : Inf }.
Definition expand_Inf (x : Inf) := S (projS x).
CoFixpoint inf := S inf.
Eval compute in inf.
diff --git a/test-suite/output/FunExt.out b/test-suite/output/FunExt.out
index 8d2a125c1d..2a823396d5 100644
--- a/test-suite/output/FunExt.out
+++ b/test-suite/output/FunExt.out
@@ -1,19 +1,12 @@
The command has indeed failed with message:
-Ltac call to "extensionality in (var)" failed.
Tactic failure: Not an extensional equality.
The command has indeed failed with message:
-Ltac call to "extensionality in (var)" failed.
Tactic failure: Not an extensional equality.
The command has indeed failed with message:
-Ltac call to "extensionality in (var)" failed.
Tactic failure: Not an extensional equality.
The command has indeed failed with message:
-Ltac call to "extensionality in (var)" failed.
Tactic failure: Not an extensional equality.
The command has indeed failed with message:
-Ltac call to "extensionality in (var)" failed.
Tactic failure: Already an intensional equality.
The command has indeed failed with message:
-In nested Ltac calls to "extensionality in (var)" and
-"clearbody (ne_var_list)", last call failed.
Hypothesis e depends on the body of H'
diff --git a/test-suite/output/FunExt.v b/test-suite/output/FunExt.v
index 7658ce718e..440fe46003 100644
--- a/test-suite/output/FunExt.v
+++ b/test-suite/output/FunExt.v
@@ -1,3 +1,4 @@
+(* -*- coq-prog-args: ("-async-proofs" "no") -*- *)
Require Import FunctionalExtensionality.
(* Basic example *)
diff --git a/test-suite/output/Inductive.out b/test-suite/output/Inductive.out
index af202ea01c..2ba02924c9 100644
--- a/test-suite/output/Inductive.out
+++ b/test-suite/output/Inductive.out
@@ -1,6 +1,6 @@
The command has indeed failed with message:
Last occurrence of "list'" must have "A" as 1st argument in
- "A -> list' A -> list' (A * A)%type".
+ "A -> list' A -> list' (A * A)".
Inductive foo (A : Type) (x : A) (y : A := x) : Prop := Foo : foo A x
For foo: Argument scopes are [type_scope _]
diff --git a/test-suite/output/Inductive.v b/test-suite/output/Inductive.v
index 8ff91268a6..9eec9a7dad 100644
--- a/test-suite/output/Inductive.v
+++ b/test-suite/output/Inductive.v
@@ -3,5 +3,5 @@ Fail Inductive list' (A:Set) : Set :=
| cons' : A -> list' A -> list' (A*A).
(* Check printing of let-ins *)
-Inductive foo (A : Type) (x : A) (y := x) := Foo.
+#[universes(template)] Inductive foo (A : Type) (x : A) (y := x) := Foo.
Print foo.
diff --git a/test-suite/output/Int31Syntax.out b/test-suite/output/Int31Syntax.out
index 4e8796c14b..0d6504f5f8 100644
--- a/test-suite/output/Int31Syntax.out
+++ b/test-suite/output/Int31Syntax.out
@@ -12,3 +12,5 @@ I31
: int31
= 710436486
: int31
+The command has indeed failed with message:
+Cannot interpret this number as a value of type int31
diff --git a/test-suite/output/Int31Syntax.v b/test-suite/output/Int31Syntax.v
index 83be3b976b..48889a26ef 100644
--- a/test-suite/output/Int31Syntax.v
+++ b/test-suite/output/Int31Syntax.v
@@ -3,11 +3,12 @@ Require Import Int31 Cyclic31.
Open Scope int31_scope.
Check I31. (* Would be nice to have I31 : digits->digits->...->int31
For the moment, I31 : digits31 int31, which is better
- than (fix nfun .....) size int31 *)
+ than (fix nfun .....) size int31 *)
Check 2.
Check 1000000000000000000. (* = 660865024, after modulo 2^31 *)
Check (add31 2 2).
Check (2+2).
Eval vm_compute in 2+2.
Eval vm_compute in 65675757 * 565675998.
+Fail Check -1.
Close Scope int31_scope.
diff --git a/test-suite/output/Int63Syntax.out b/test-suite/output/Int63Syntax.out
new file mode 100644
index 0000000000..fdd5599565
--- /dev/null
+++ b/test-suite/output/Int63Syntax.out
@@ -0,0 +1,16 @@
+2
+ : int
+9223372036854775807
+ : int
+2 + 2
+ : int
+2 + 2
+ : int
+ = 4
+ : int
+ = 37151199385380486
+ : int
+The command has indeed failed with message:
+int63 are only non-negative numbers.
+The command has indeed failed with message:
+overflow in int63 literal: 9223372036854775808
diff --git a/test-suite/output/Int63Syntax.v b/test-suite/output/Int63Syntax.v
new file mode 100644
index 0000000000..3dc364eddb
--- /dev/null
+++ b/test-suite/output/Int63Syntax.v
@@ -0,0 +1,12 @@
+Require Import Int63 Cyclic63.
+
+Open Scope int63_scope.
+Check 2.
+Check 9223372036854775807.
+Check (Int63.add 2 2).
+Check (2+2).
+Eval vm_compute in 2+2.
+Eval vm_compute in 65675757 * 565675998.
+Fail Check -1.
+Fail Check 9223372036854775808.
+Close Scope int63_scope.
diff --git a/test-suite/output/Notations.out b/test-suite/output/Notations.out
index 94b86fc222..bec4fc1579 100644
--- a/test-suite/output/Notations.out
+++ b/test-suite/output/Notations.out
@@ -72,7 +72,7 @@ Nil
: forall A : Type, list A
NIL : list nat
: list nat
-(false && I 3)%bool /\ I 6
+(false && I 3)%bool /\ (I 6)%bool
: Prop
[|1, 2, 3; 4, 5, 6|]
: Z * Z * Z * (Z * Z * Z)
diff --git a/test-suite/output/Notations.v b/test-suite/output/Notations.v
index adab324cf0..2ffc3b14e2 100644
--- a/test-suite/output/Notations.v
+++ b/test-suite/output/Notations.v
@@ -30,7 +30,7 @@ Check (decomp (true,true) as t, u in (t,u)).
Section A.
-Notation "! A" := (forall _:nat, A) (at level 60).
+Notation "! A" := (forall _:nat, A) (at level 60) : type_scope.
Check ! (0=0).
Check forall n, n=0.
@@ -195,9 +195,9 @@ Open Scope nat_scope.
Coercion is_true := fun b => b=true.
Coercion of_nat n := match n with 0 => true | _ => false end.
-Notation "'I' x" := (of_nat (S x) || true)%bool (at level 10).
+Notation "'I' x" := (of_nat (S x) || true)%bool (at level 10) : bool_scope.
-Check (false && I 3)%bool /\ I 6.
+Check (false && I 3)%bool /\ (I 6)%bool.
(**********************************************************************)
(* Check notations with several recursive patterns *)
diff --git a/test-suite/output/Notations2.v b/test-suite/output/Notations2.v
index bcb2468792..923caedace 100644
--- a/test-suite/output/Notations2.v
+++ b/test-suite/output/Notations2.v
@@ -71,6 +71,7 @@ Check let' f x y (a:=0) z (b:bool) := x+y+z+1 in f 0 1 2.
(* Note: does not work for pattern *)
Module A.
Notation "f ( x )" := (f x) (at level 10, format "f ( x )").
+Open Scope nat_scope.
Check fun f x => f x + S x.
Open Scope list_scope.
diff --git a/test-suite/output/Notations3.out b/test-suite/output/Notations3.out
index d32cf67e28..015dac2512 100644
--- a/test-suite/output/Notations3.out
+++ b/test-suite/output/Notations3.out
@@ -128,25 +128,27 @@ return (1, 2, 3, 4)
: nat
*(1.2)
: nat
-! '{{x, y}}, x.y = 0
+! '{{x, y}}, x + y = 0
: Prop
exists x : nat,
nat ->
exists y : nat,
- nat -> exists '{{u, t}}, forall z1 : nat, z1 = 0 /\ x.y = 0 /\ u.t = 0
+ nat ->
+ exists '{{u, t}}, forall z1 : nat, z1 = 0 /\ x + y = 0 /\ u + t = 0
: Prop
exists x : nat,
nat ->
exists y : nat,
- nat -> exists '{{z, t}}, forall z2 : nat, z2 = 0 /\ x.y = 0 /\ z.t = 0
+ nat ->
+ exists '{{z, t}}, forall z2 : nat, z2 = 0 /\ x + y = 0 /\ z + t = 0
: Prop
-exists_true '{{x, y}} (u := 0) '{{z, t}}, x.y = 0 /\ z.t = 0
+exists_true '{{x, y}} (u := 0) '{{z, t}}, x + y = 0 /\ z + t = 0
: Prop
exists_true (A : Type) (R : A -> A -> Prop) (_ : Reflexive R),
(forall x : A, R x x)
: Prop
exists_true (x : nat) (A : Type) (R : A -> A -> Prop)
-(_ : Reflexive R) (y : nat), x.y = 0 -> forall z : A, R z z
+(_ : Reflexive R) (y : nat), x + y = 0 -> forall z : A, R z z
: Prop
{{{{True, nat -> True}}, nat -> True}}
: Prop * Prop * Prop
@@ -182,22 +184,22 @@ pair
(prod nat (prod nat nat))) (prod (prod nat nat) nat)
fun x : nat => if x is n .+ 1 then n else 1
: nat -> nat
-{'{{x, y}} : nat * nat | x.y = 0}
+{'{{x, y}} : nat * nat | x + y = 0}
: Set
exists2' {{x, y}}, x = 0 & y = 0
: Prop
myexists2 x : nat * nat,
let '{{y, z}} := x in y > z & let '{{y, z}} := x in z > y
: Prop
-fun '({{x, y}} as z) => x.y = 0 /\ z = z
+fun '({{x, y}} as z) => x + y = 0 /\ z = z
: nat * nat -> Prop
-myexists ({{x, y}} as z), x.y = 0 /\ z = z
+myexists ({{x, y}} as z), x + y = 0 /\ z = z
: Prop
-exists '({{x, y}} as z), x.y = 0 /\ z = z
+exists '({{x, y}} as z), x + y = 0 /\ z = z
: Prop
-∀ '({{x, y}} as z), x.y = 0 /\ z = z
+∀ '({{x, y}} as z), x + y = 0 /\ z = z
: Prop
-fun '({{{{x, y}}, true}} | {{{{x, y}}, false}}) => x.y
+fun '({{{{x, y}}, true}} | {{{{x, y}}, false}}) => x + y
: nat * nat * bool -> nat
myexists ({{{{x, y}}, true}} | {{{{x, y}}, false}}), x > y
: Prop
@@ -209,17 +211,17 @@ fun p : nat => if p is S n then n else 0
: nat -> nat
fun p : comparison => if p is Lt then 1 else 0
: comparison -> nat
-fun S : nat => [S | S.S]
+fun S : nat => [S | S + S]
: nat -> nat * (nat -> nat)
-fun N : nat => [N | N.0]
+fun N : nat => [N | N + 0]
: nat -> nat * (nat -> nat)
-fun S : nat => [[S | S.S]]
+fun S : nat => [[S | S + S]]
: nat -> nat * (nat -> nat)
{I : nat | I = I}
: Set
{'I : True | I = I}
: Prop
-{'{{x, y}} : nat * nat | x.y = 0}
+{'{{x, y}} : nat * nat | x + y = 0}
: Set
exists2 '{{y, z}} : nat * nat, y > z & z > y
: Prop
@@ -252,3 +254,13 @@ myfoo01 tt
: nat
myfoo01 tt
: nat
+[{0; 0}]
+ : list (list nat)
+[{1; 2; 3};
+ {4; 5; 6};
+ {7; 8; 9}]
+ : list (list nat)
+amatch = mmatch 0 (with 0 => 1| 1 => 2 end)
+ : unit
+alist = [0; 1; 2]
+ : list nat
diff --git a/test-suite/output/Notations3.v b/test-suite/output/Notations3.v
index 180e8d337e..2caffad1d9 100644
--- a/test-suite/output/Notations3.v
+++ b/test-suite/output/Notations3.v
@@ -59,7 +59,7 @@ Check fun f => CURRYINVLEFT (x:nat) (y:bool), f.
(* Notations with variables bound both as a term and as a binder *)
(* This is #4592 *)
-Notation "{# x | P }" := (ex2 (fun y => x = y) (fun x => P)).
+Notation "{# x | P }" := (ex2 (fun y => x = y) (fun x => P)) : type_scope.
Check forall n:nat, {# n | 1 > n}.
Parameter foo : forall {T}(x : T)(P : T -> Prop), Prop.
@@ -123,7 +123,7 @@ Check fun n => foo4 n (fun x y z => (fun _ => y=0) z).
(**********************************************************************)
(* Test printing of #4932 *)
-Inductive ftele : Type :=
+#[universes(template)] Inductive ftele : Type :=
| fb {T:Type} : T -> ftele
| fr {T} : (T -> ftele) -> ftele.
@@ -183,9 +183,13 @@ Check letpair x [1] = {0}; return (1,2,3,4).
(* Test spacing in #5569 *)
+Section S1.
+Variable plus : nat -> nat -> nat.
+Infix "+" := plus.
Notation "{ { xL | xR // xcut } }" := (xL+xR+xcut)
(at level 0, xR at level 39, format "{ { xL | xR // xcut } }").
Check 1+1+1.
+End S1.
(* Test presence of notation variables in the recursive parts (introduced in dfdaf4de) *)
Notation "!!! x .. y , b" := ((fun x => b), .. ((fun y => b), True) ..) (at level 200, x binder).
@@ -193,10 +197,12 @@ Check !!! (x y:nat), True.
(* Allow level for leftmost nonterminal when printing-only, BZ#5739 *)
-Notation "* x" := (id x) (only printing, at level 15, format "* x").
-Notation "x . y" := (x + y) (only printing, at level 20, x at level 14, left associativity, format "x . y").
+Section S2.
+Notation "* x" := (id x) (only printing, at level 15, format "* x") : nat_scope.
+Notation "x . y" := (x + y) (only printing, at level 20, x at level 14, left associativity, format "x . y") : nat_scope.
Check (((id 1) + 2) + 3).
Check (id (1 + 2)).
+End S2.
(* Test contraction of "forall x, let 'pat := x in ..." into "forall 'pat, ..." *)
(* for isolated "forall" (was not working already in 8.6) *)
@@ -410,3 +416,58 @@ Check myfoo0 1 tt. (* was printing [myfoo0 1 HI], but should print [myfoo01 HI]
Check myfoo01 tt. (* was printing [myfoo0 1 HI], but should print [myfoo01 HI] *)
End Issue8126.
+
+(* Test printing of notations guided by scope *)
+
+Module A.
+
+Declare Scope line_scope.
+Delimit Scope line_scope with line.
+Declare Scope matx_scope.
+Notation "{ }" := nil (format "{ }") : line_scope.
+Notation "{ x }" := (cons x nil) : line_scope.
+Notation "{ x ; y ; .. ; z }" := (cons x (cons y .. (cons z nil) ..)) : line_scope.
+Notation "[ ]" := nil (format "[ ]") : matx_scope.
+Notation "[ l ]" := (cons l%line nil) : matx_scope.
+Notation "[ l ; l' ; .. ; l'' ]" := (cons l%line (cons l'%line .. (cons l''%line nil) ..))
+ (format "[ '[v' l ; '/' l' ; '/' .. ; '/' l'' ']' ]") : matx_scope.
+
+Open Scope matx_scope.
+Check [[0;0]].
+Check [[1;2;3];[4;5;6];[7;8;9]].
+
+End A.
+
+(* Example by Beta Ziliani *)
+
+Require Import Lists.List.
+
+Module B.
+
+Import ListNotations.
+
+Declare Scope pattern_scope.
+Delimit Scope pattern_scope with pattern.
+
+Declare Scope patterns_scope.
+Delimit Scope patterns_scope with patterns.
+
+Notation "a => b" := (a, b) (at level 201) : pattern_scope.
+Notation "'with' p1 | .. | pn 'end'" :=
+ ((cons p1%pattern (.. (cons pn%pattern nil) ..)))
+ (at level 91, p1 at level 210, pn at level 210) : patterns_scope.
+
+Definition mymatch (n:nat) (l : list (nat * nat)) := tt.
+Arguments mymatch _ _%patterns.
+Notation "'mmatch' n ls" := (mymatch n ls) (at level 0).
+
+Close Scope patterns_scope.
+Close Scope pattern_scope.
+
+Definition amatch := mmatch 0 with 0 => 1 | 1 => 2 end.
+Print amatch. (* Good: amatch = mmatch 0 (with 0 => 1| 1 => 2 end) *)
+
+Definition alist := [0;1;2].
+Print alist.
+
+End B.
diff --git a/test-suite/output/Notations4.out b/test-suite/output/Notations4.out
index cef7d1a702..5bf4ec7bfb 100644
--- a/test-suite/output/Notations4.out
+++ b/test-suite/output/Notations4.out
@@ -1,5 +1,7 @@
[< 0 > + < 1 > * < 2 >]
: nat
+[< b > + < b > * < 2 >]
+ : nat
[<< # 0 >>]
: option nat
[1 {f 1}]
@@ -15,3 +17,59 @@ end
: Expr -> Expr
[(1 + 1)]
: Expr
+Let "x" e1 e2
+ : expr
+Let "x" e1 e2
+ : expr
+fun x : nat => (# x)%nat
+ : nat -> nat
+fun x : nat => ## x
+ : nat -> nat
+fun x : nat => # x
+ : nat -> nat
+fun x : nat => ### x
+ : nat -> nat
+fun x : nat => ## x
+ : nat -> nat
+fun x : nat => (x.-1)%pred
+ : nat -> nat
+∀ a : nat, a = 0
+ : Prop
+((∀ a : nat, a = 0) -> True)%type
+ : Prop
+#
+ : Prop
+# -> True
+ : Prop
+((∀ a : nat, a = 0) -> True)%type
+ : Prop
+##
+ : Prop
+myAnd1 True True
+ : Prop
+r 2 3
+ : Prop
+Notation Cn := Foo.FooCn
+Expands to: Notation Notations4.J.Mfoo.Foo.Bar.Cn
+let v := 0%test17 in v : myint63
+ : myint63
+fun y : nat => # (x, z) |-> y & y
+ : forall y : nat,
+ (?T1 * ?T2 -> ?T1 * ?T2 * nat) * (?T * ?T0 -> ?T * ?T0 * nat)
+where
+?T : [y : nat pat : ?T * ?T0 p0 : ?T * ?T0 p := p0 : ?T * ?T0
+ |- Type] (pat, p0, p cannot be used)
+?T0 : [y : nat pat : ?T * ?T0 p0 : ?T * ?T0 p := p0 : ?T * ?T0
+ |- Type] (pat, p0, p cannot be used)
+?T1 : [y : nat pat : ?T1 * ?T2 p0 : ?T1 * ?T2 p := p0 : ?T1 * ?T2
+ |- Type] (pat, p0, p cannot be used)
+?T2 : [y : nat pat : ?T1 * ?T2 p0 : ?T1 * ?T2 p := p0 : ?T1 * ?T2
+ |- Type] (pat, p0, p cannot be used)
+fun y : nat => # (x, z) |-> (x + y) & (y + z)
+ : forall y : nat,
+ (nat * ?T -> nat * ?T * nat) * (?T0 * nat -> ?T0 * nat * nat)
+where
+?T : [y : nat pat : nat * ?T p0 : nat * ?T p := p0 : nat * ?T
+ |- Type] (pat, p0, p cannot be used)
+?T0 : [y : nat pat : ?T0 * nat p0 : ?T0 * nat p := p0 : ?T0 * nat
+ |- Type] (pat, p0, p cannot be used)
diff --git a/test-suite/output/Notations4.v b/test-suite/output/Notations4.v
index 9738ce5a5e..b33ad17ed4 100644
--- a/test-suite/output/Notations4.v
+++ b/test-suite/output/Notations4.v
@@ -5,11 +5,15 @@ Module A.
Declare Custom Entry myconstr.
Notation "[ x ]" := x (x custom myconstr at level 6).
-Notation "x + y" := (Nat.add x y) (in custom myconstr at level 5).
-Notation "x * y" := (Nat.mul x y) (in custom myconstr at level 4).
+Notation "x + y" := (Nat.add x y) (in custom myconstr at level 5) : nat_scope.
+Notation "x * y" := (Nat.mul x y) (in custom myconstr at level 4) : nat_scope.
Notation "< x >" := x (in custom myconstr at level 3, x constr at level 10).
Check [ < 0 > + < 1 > * < 2 >].
+Axiom a : nat.
+Notation b := a.
+Check [ < b > + < a > * < 2 >].
+
Declare Custom Entry anotherconstr.
Notation "[ x ]" := x (x custom myconstr at level 6).
@@ -66,3 +70,152 @@ Notation "( x )" := x (in custom expr at level 0, x at level 2).
Check [1 + 1].
End C.
+
+(* An example of interaction between coercion and notations from
+ Robbert Krebbers. *)
+
+Require Import String.
+
+Module D.
+
+Inductive expr :=
+ | Var : string -> expr
+ | Lam : string -> expr -> expr
+ | App : expr -> expr -> expr.
+
+Notation Let x e1 e2 := (App (Lam x e2) e1).
+
+Parameter e1 e2 : expr.
+
+Check (Let "x" e1 e2).
+
+Coercion App : expr >-> Funclass.
+
+Check (Let "x" e1 e2).
+
+End D.
+
+(* Check fix of #8551: a delimiter should be inserted because the
+ lonely notation hides the scope nat_scope, even though the latter
+ is open *)
+
+Module E.
+
+Notation "# x" := (S x) (at level 20) : nat_scope.
+Notation "# x" := (Some x).
+Check fun x => (# x)%nat.
+
+End E.
+
+(* Other tests of precedence *)
+
+Module F.
+
+Notation "# x" := (S x) (at level 20) : nat_scope.
+Notation "## x" := (S x) (at level 20).
+Check fun x => S x.
+Open Scope nat_scope.
+Check fun x => S x.
+Notation "### x" := (S x) (at level 20) : nat_scope.
+Check fun x => S x.
+Close Scope nat_scope.
+Check fun x => S x.
+
+End F.
+
+(* Lower priority of generic application rules *)
+
+Module G.
+
+Declare Scope predecessor_scope.
+Delimit Scope predecessor_scope with pred.
+Declare Scope app_scope.
+Delimit Scope app_scope with app.
+Notation "x .-1" := (Nat.pred x) (at level 10, format "x .-1") : predecessor_scope.
+Notation "f ( x )" := (f x) (at level 10, format "f ( x )") : app_scope.
+Check fun x => pred x.
+
+End G.
+
+(* Checking arbitration between in the presence of a notation in type scope *)
+
+Module H.
+
+Notation "∀ x .. y , P" := (forall x, .. (forall y, P) ..)
+ (at level 200, x binder, y binder, right associativity,
+ format "'[ ' '[ ' ∀ x .. y ']' , '/' P ']'") : type_scope.
+Check forall a, a = 0.
+
+Close Scope type_scope.
+Check ((forall a, a = 0) -> True)%type.
+Open Scope type_scope.
+
+Notation "#" := (forall a, a = 0).
+Check #.
+Check # -> True.
+
+Close Scope type_scope.
+Check (# -> True)%type.
+Open Scope type_scope.
+
+Declare Scope my_scope.
+Notation "##" := (forall a, a = 0) : my_scope.
+Open Scope my_scope.
+Check ##.
+
+End H.
+
+(* Fixing bugs reported by G. Gonthier in #9207 *)
+
+Module I.
+
+Definition myAnd A B := A /\ B.
+Notation myAnd1 A := (myAnd A).
+Check myAnd1 True True.
+
+Set Warnings "-auto-template".
+
+Record Pnat := {inPnat :> nat -> Prop}.
+Axiom r : nat -> Pnat.
+Check r 2 3.
+
+End I.
+
+(* Fixing a bug reported by G. Gonthier in #9207 *)
+
+Module J.
+
+Module Import Mfoo.
+Module Foo.
+Definition FooCn := 2.
+Module Bar.
+Notation Cn := FooCn.
+End Bar.
+End Foo.
+Export Foo.Bar.
+End Mfoo.
+About Cn.
+
+End J.
+
+Require Import Coq.Numbers.Cyclic.Int63.Int63.
+Module NumeralNotations.
+ Module Test17.
+ (** Test int63 *)
+ Declare Scope test17_scope.
+ Delimit Scope test17_scope with test17.
+ Local Set Primitive Projections.
+ Record myint63 := of_int { to_int : int }.
+ Numeral Notation myint63 of_int to_int : test17_scope.
+ Check let v := 0%test17 in v : myint63.
+ End Test17.
+End NumeralNotations.
+
+Module K.
+
+Notation "# x |-> t & u" := ((fun x => (x,t)),(fun x => (x,u)))
+ (at level 0, x pattern, t, u at level 39).
+Check fun y : nat => # (x,z) |-> y & y.
+Check fun y : nat => # (x,z) |-> (x + y) & (y + z).
+
+End K.
diff --git a/test-suite/output/PatternsInBinders.v b/test-suite/output/PatternsInBinders.v
index d671053c07..0c1b08f5a3 100644
--- a/test-suite/output/PatternsInBinders.v
+++ b/test-suite/output/PatternsInBinders.v
@@ -53,7 +53,7 @@ Module Suboptimal.
(** This test shows an example which exposes the [let] introduced by
the pattern notation in binders. *)
-Inductive Fin (n:nat) := Z : Fin n.
+#[universes(template)] Inductive Fin (n:nat) := Z : Fin n.
Definition F '(n,p) : Type := (Fin n * Fin p)%type.
Definition both_z '(n,p) : F (n,p) := (Z _,Z _).
Print both_z.
diff --git a/test-suite/output/PrintInfos.out b/test-suite/output/PrintInfos.out
index 38a16e01c2..ab4172711e 100644
--- a/test-suite/output/PrintInfos.out
+++ b/test-suite/output/PrintInfos.out
@@ -25,6 +25,7 @@ For eq: Argument scopes are [type_scope _ _]
For eq_refl: Argument scopes are [type_scope _]
eq_refl : forall (A : Type) (x : A), x = x
+eq_refl is not universe polymorphic
When applied to no arguments:
Arguments A, x are implicit and maximally inserted
When applied to 1 argument:
@@ -48,6 +49,7 @@ fix add (n m : nat) {struct n} : nat :=
Argument scopes are [nat_scope nat_scope]
Nat.add : nat -> nat -> nat
+Nat.add is not universe polymorphic
Argument scopes are [nat_scope nat_scope]
Nat.add is transparent
Expands to: Constant Coq.Init.Nat.add
@@ -55,6 +57,7 @@ Nat.add : nat -> nat -> nat
plus_n_O : forall n : nat, n = n + 0
+plus_n_O is not universe polymorphic
Argument scope is [nat_scope]
plus_n_O is opaque
Expands to: Constant Coq.Init.Peano.plus_n_O
@@ -68,11 +71,13 @@ For le_n: Argument scope is [nat_scope]
For le_S: Argument scopes are [nat_scope nat_scope _]
comparison : Set
+comparison is not universe polymorphic
Expands to: Inductive Coq.Init.Datatypes.comparison
Inductive comparison : Set :=
Eq : comparison | Lt : comparison | Gt : comparison
bar : foo
+bar is not universe polymorphic
Expanded type for implicit arguments
bar : forall x : nat, x = 0
diff --git a/test-suite/output/PrintInfos.v b/test-suite/output/PrintInfos.v
index d7c271c3ec..d95cc0e32f 100644
--- a/test-suite/output/PrintInfos.v
+++ b/test-suite/output/PrintInfos.v
@@ -22,7 +22,7 @@ Print comparison.
Definition foo := forall x, x = 0.
Parameter bar : foo.
-Arguments bar [x].
+Arguments bar {x}.
About bar.
Print bar.
diff --git a/test-suite/output/PrintUnivsSubgraph.out b/test-suite/output/PrintUnivsSubgraph.out
new file mode 100644
index 0000000000..c42e15e4e8
--- /dev/null
+++ b/test-suite/output/PrintUnivsSubgraph.out
@@ -0,0 +1,5 @@
+Prop < Set
+Set < i
+ < j
+i < j
+
diff --git a/test-suite/output/PrintUnivsSubgraph.v b/test-suite/output/PrintUnivsSubgraph.v
new file mode 100644
index 0000000000..ec9cf44d4f
--- /dev/null
+++ b/test-suite/output/PrintUnivsSubgraph.v
@@ -0,0 +1,9 @@
+
+Universes i j k l.
+
+Definition foo : Type@{j} := Type@{i}.
+
+Definition baz : Type@{k} := Type@{l}.
+
+Print Universes Subgraph(i j).
+(* should print [i < j], not [l < k] (and not prelude universes) *)
diff --git a/test-suite/output/Projections.v b/test-suite/output/Projections.v
index 098a518dc4..2713e6a188 100644
--- a/test-suite/output/Projections.v
+++ b/test-suite/output/Projections.v
@@ -5,7 +5,7 @@ Class HostFunction := host_func : Type.
Section store.
Context `{HostFunction}.
- Record store := { store_funcs : host_func }.
+ #[universes(template)] Record store := { store_funcs : host_func }.
End store.
Check (fun (S:@store nat) => S.(store_funcs)).
diff --git a/test-suite/output/RealSyntax.v b/test-suite/output/RealSyntax.v
index 15ae66010e..44e8c7a50c 100644
--- a/test-suite/output/RealSyntax.v
+++ b/test-suite/output/RealSyntax.v
@@ -1,3 +1,3 @@
-Require Import Reals.
+Require Import Reals.Rdefinitions.
Check 32%R.
Check (-31)%R.
diff --git a/test-suite/output/RecognizePluginWarning.v b/test-suite/output/RecognizePluginWarning.v
index cd667bbd00..a53b52396f 100644
--- a/test-suite/output/RecognizePluginWarning.v
+++ b/test-suite/output/RecognizePluginWarning.v
@@ -1,4 +1,4 @@
-(* -*- mode: coq; coq-prog-args: ("-emacs" "-w" "extraction-logical-axiom") -*- *)
+(* -*- mode: coq; coq-prog-args: ("-w" "extraction-logical-axiom") -*- *)
(* Test that mentioning a warning defined in plugins works. The failure
mode here is that these result in a warning about unknown warnings, since the
diff --git a/test-suite/output/Record.v b/test-suite/output/Record.v
index d9a649fadc..4fe7b051f8 100644
--- a/test-suite/output/Record.v
+++ b/test-suite/output/Record.v
@@ -20,12 +20,12 @@ Check {| field := 5 |}.
Check build_r 5.
Check build_c 5.
-Record N := C { T : Type; _ : True }.
+#[universes(template)] Record N := C { T : Type; _ : True }.
Check fun x:N => let 'C _ p := x in p.
Check fun x:N => let 'C T _ := x in T.
Check fun x:N => let 'C T p := x in (T,p).
-Record M := D { U : Type; a := 0; q : True }.
+#[universes(template)] Record M := D { U : Type; a := 0; q : True }.
Check fun x:M => let 'D T _ p := x in p.
Check fun x:M => let 'D T _ p := x in T.
Check fun x:M => let 'D T p := x in (T,p).
diff --git a/test-suite/output/RecordFieldErrors.out b/test-suite/output/RecordFieldErrors.out
new file mode 100644
index 0000000000..5b67f632c9
--- /dev/null
+++ b/test-suite/output/RecordFieldErrors.out
@@ -0,0 +1,14 @@
+The command has indeed failed with message:
+unit: Not a projection.
+The command has indeed failed with message:
+unit: Not a projection.
+The command has indeed failed with message:
+This record contains fields of both t and t'.
+The command has indeed failed with message:
+unit: Not a projection.
+The command has indeed failed with message:
+This record defines several times the field foo.
+The command has indeed failed with message:
+This record defines several times the field unit.
+The command has indeed failed with message:
+unit: Not a projection of inductive t.
diff --git a/test-suite/output/RecordFieldErrors.v b/test-suite/output/RecordFieldErrors.v
new file mode 100644
index 0000000000..27aa07822b
--- /dev/null
+++ b/test-suite/output/RecordFieldErrors.v
@@ -0,0 +1,38 @@
+(** Check that various errors in record fields are reported with the correct
+underlying issue. *)
+
+Record t :=
+ { foo: unit }.
+
+Record t' :=
+ { bar: unit }.
+
+Fail Check {| unit := tt |}.
+(* unit: Not a projection. *)
+
+Fail Check {| unit := tt;
+ foo := tt |}.
+(* unit: Not a projection. *)
+
+Fail Check {| foo := tt;
+ bar := tt |}.
+(* This record contains fields of both t and t'. *)
+
+Fail Check {| unit := tt;
+ unit := tt |}.
+(* unit: Not a projection. *)
+
+Fail Check {| foo := tt;
+ foo := tt |}.
+(* This record defines several times the field foo. *)
+
+Fail Check {| foo := tt;
+ unit := tt;
+ unit := tt |}.
+(* This is slightly wrong (would prefer "unit: Not a projection."), but it's
+acceptable and seems an unlikely mistake. *)
+(* This record defines several times the field unit. *)
+
+Fail Check {| foo := tt;
+ unit := tt |}.
+(* unit: Not a projection of inductive t. *)
diff --git a/test-suite/output/Search.out b/test-suite/output/Search.out
index 7446c17d98..ffba1d35cc 100644
--- a/test-suite/output/Search.out
+++ b/test-suite/output/Search.out
@@ -1,57 +1,80 @@
le_n: forall n : nat, n <= n
le_0_n: forall n : nat, 0 <= n
le_S: forall n m : nat, n <= m -> n <= S m
-le_n_S: forall n m : nat, n <= m -> S n <= S m
-le_pred: forall n m : nat, n <= m -> Nat.pred n <= Nat.pred m
le_S_n: forall n m : nat, S n <= S m -> n <= m
-min_l: forall n m : nat, n <= m -> Nat.min n m = n
+le_pred: forall n m : nat, n <= m -> Nat.pred n <= Nat.pred m
+le_n_S: forall n m : nat, n <= m -> S n <= S m
+max_l: forall n m : nat, m <= n -> Nat.max n m = n
max_r: forall n m : nat, n <= m -> Nat.max n m = m
min_r: forall n m : nat, m <= n -> Nat.min n m = m
-max_l: forall n m : nat, m <= n -> Nat.max n m = n
+min_l: forall n m : nat, n <= m -> Nat.min n m = n
le_ind:
forall (n : nat) (P : nat -> Prop),
P n ->
(forall m : nat, n <= m -> P m -> P (S m)) ->
forall n0 : nat, n <= n0 -> P n0
+le_sind:
+ forall (n : nat) (P : nat -> SProp),
+ P n ->
+ (forall m : nat, n <= m -> P m -> P (S m)) ->
+ forall n0 : nat, n <= n0 -> P n0
false: bool
true: bool
+eq_true: bool -> Prop
is_true: bool -> Prop
negb: bool -> bool
-eq_true: bool -> Prop
-implb: bool -> bool -> bool
-orb: bool -> bool -> bool
andb: bool -> bool -> bool
+orb: bool -> bool -> bool
+implb: bool -> bool -> bool
xorb: bool -> bool -> bool
Nat.even: nat -> bool
Nat.odd: nat -> bool
BoolSpec: Prop -> Prop -> bool -> Prop
-Nat.eqb: nat -> nat -> bool
-Nat.testbit: nat -> nat -> bool
Nat.ltb: nat -> nat -> bool
+Nat.testbit: nat -> nat -> bool
+Nat.eqb: nat -> nat -> bool
Nat.leb: nat -> nat -> bool
Nat.bitwise: (bool -> bool -> bool) -> nat -> nat -> nat -> nat
-bool_ind: forall P : bool -> Prop, P true -> P false -> forall b : bool, P b
bool_rec: forall P : bool -> Set, P true -> P false -> forall b : bool, P b
+eq_true_ind_r:
+ forall (P : bool -> Prop) (b : bool), P b -> eq_true b -> P true
eq_true_rec:
forall P : bool -> Set, P true -> forall b : bool, eq_true b -> P b
+bool_ind: forall P : bool -> Prop, P true -> P false -> forall b : bool, P b
+eq_true_rect:
+ forall P : bool -> Type, P true -> forall b : bool, eq_true b -> P b
+eq_true_sind:
+ forall P : bool -> SProp, P true -> forall b : bool, eq_true b -> P b
+bool_rect: forall P : bool -> Type, P true -> P false -> forall b : bool, P b
eq_true_ind:
forall P : bool -> Prop, P true -> forall b : bool, eq_true b -> P b
-eq_true_rect_r:
- forall (P : bool -> Type) (b : bool), P b -> eq_true b -> P true
eq_true_rec_r:
forall (P : bool -> Set) (b : bool), P b -> eq_true b -> P true
-eq_true_rect:
- forall P : bool -> Type, P true -> forall b : bool, eq_true b -> P b
-bool_rect: forall P : bool -> Type, P true -> P false -> forall b : bool, P b
-eq_true_ind_r:
- forall (P : bool -> Prop) (b : bool), P b -> eq_true b -> P true
+eq_true_rect_r:
+ forall (P : bool -> Type) (b : bool), P b -> eq_true b -> P true
+bool_sind:
+ forall P : bool -> SProp, P true -> P false -> forall b : bool, P b
+Byte.to_bits:
+ Byte.byte ->
+ bool * (bool * (bool * (bool * (bool * (bool * (bool * bool))))))
+Byte.of_bits:
+ bool * (bool * (bool * (bool * (bool * (bool * (bool * bool)))))) ->
+ Byte.byte
+andb_prop: forall a b : bool, (a && b)%bool = true -> a = true /\ b = true
andb_true_intro:
forall b1 b2 : bool, b1 = true /\ b2 = true -> (b1 && b2)%bool = true
-andb_prop: forall a b : bool, (a && b)%bool = true -> a = true /\ b = true
+BoolSpec_sind:
+ forall (P Q : Prop) (P0 : bool -> SProp),
+ (P -> P0 true) ->
+ (Q -> P0 false) -> forall b : bool, BoolSpec P Q b -> P0 b
BoolSpec_ind:
forall (P Q : Prop) (P0 : bool -> Prop),
(P -> P0 true) ->
(Q -> P0 false) -> forall b : bool, BoolSpec P Q b -> P0 b
+Byte.to_bits_of_bits:
+ forall
+ b : bool * (bool * (bool * (bool * (bool * (bool * (bool * bool)))))),
+ Byte.to_bits (Byte.of_bits b) = b
bool_choice:
forall (S : Set) (R1 R2 : S -> Prop),
(forall x : S, {R1 x} + {R2 x}) ->
diff --git a/test-suite/output/Show.v b/test-suite/output/Show.v
index 60faac8dd9..c875051bdc 100644
--- a/test-suite/output/Show.v
+++ b/test-suite/output/Show.v
@@ -5,7 +5,7 @@
Theorem nums : forall (n m : nat), n = m -> (S n) = (S m).
Proof.
intros.
- induction n as [| n'].
+ induction n as [| n'].
induction m as [| m'].
Show.
Admitted.
diff --git a/test-suite/output/ShowMatch.v b/test-suite/output/ShowMatch.v
index 9cf6ad35b8..99183f2064 100644
--- a/test-suite/output/ShowMatch.v
+++ b/test-suite/output/ShowMatch.v
@@ -3,12 +3,12 @@
*)
Module A.
- Inductive foo := f.
+ #[universes(template)] Inductive foo := f.
Show Match foo. (* no need to disambiguate *)
End A.
Module B.
- Inductive foo := f.
+ #[universes(template)] Inductive foo := f.
(* local foo shadows A.foo, so constructor "f" needs disambiguation *)
Show Match A.foo.
End B.
diff --git a/test-suite/output/StringSyntax.out b/test-suite/output/StringSyntax.out
new file mode 100644
index 0000000000..9366113c0c
--- /dev/null
+++ b/test-suite/output/StringSyntax.out
@@ -0,0 +1,1086 @@
+byte_rect =
+fun (P : byte -> Type) (f : P "000") (f0 : P "001") (f1 : P "002") (f2 : P "003") (f3 : P "004") (f4 : P "005") (f5 : P "006") (f6 : P "007") (f7 : P "008") (f8 : P "009") (f9 : P "010") (f10 : P "011") (f11 : P "012") (f12 : P "013") (f13 : P "014") (f14 : P "015") (f15 : P "016") (f16 : P "017") (f17 : P "018") (f18 : P "019") (f19 : P "020") (f20 : P "021") (f21 : P "022") (f22 : P "023") (f23 : P "024") (f24 : P "025") (f25 : P "026") (f26 : P "027") (f27 : P "028") (f28 : P "029") (f29 : P "030") (f30 : P "031") (f31 : P " ") (f32 : P "!") (f33 : P """") (f34 : P "#") (f35 : P "$") (f36 : P "%") (f37 : P "&") (f38 : P "'") (f39 : P "(") (f40 : P ")") (f41 : P "*") (f42 : P "+") (f43 : P ",") (f44 : P "-") (f45 : P ".") (f46 : P "/") (f47 : P "0") (f48 : P "1") (f49 : P "2") (f50 : P "3") (f51 : P "4") (f52 : P "5") (f53 : P "6") (f54 : P "7") (f55 : P "8") (f56 : P "9") (f57 : P ":") (f58 : P ";") (f59 : P "<") (f60 : P "=") (f61 : P ">") (f62 : P "?")
+ (f63 : P "@") (f64 : P "A") (f65 : P "B") (f66 : P "C") (f67 : P "D") (f68 : P "E") (f69 : P "F") (f70 : P "G") (f71 : P "H") (f72 : P "I") (f73 : P "J") (f74 : P "K") (f75 : P "L") (f76 : P "M") (f77 : P "N") (f78 : P "O") (f79 : P "P") (f80 : P "Q") (f81 : P "R") (f82 : P "S") (f83 : P "T") (f84 : P "U") (f85 : P "V") (f86 : P "W") (f87 : P "X") (f88 : P "Y") (f89 : P "Z") (f90 : P "[") (f91 : P "\") (f92 : P "]") (f93 : P "^") (f94 : P "_") (f95 : P "`") (f96 : P "a") (f97 : P "b") (f98 : P "c") (f99 : P "d") (f100 : P "e") (f101 : P "f") (f102 : P "g") (f103 : P "h") (f104 : P "i") (f105 : P "j") (f106 : P "k") (f107 : P "l") (f108 : P "m") (f109 : P "n") (f110 : P "o") (f111 : P "p") (f112 : P "q") (f113 : P "r") (f114 : P "s") (f115 : P "t") (f116 : P "u") (f117 : P "v") (f118 : P "w") (f119 : P "x") (f120 : P "y") (f121 : P "z") (f122 : P "{") (f123 : P "|") (f124 : P "}") (f125 : P "~") (f126 : P "127") (f127 : P "128") (f128 : P "129") (f129 : P "130")
+ (f130 : P "131") (f131 : P "132") (f132 : P "133") (f133 : P "134") (f134 : P "135") (f135 : P "136") (f136 : P "137") (f137 : P "138") (f138 : P "139") (f139 : P "140") (f140 : P "141") (f141 : P "142") (f142 : P "143") (f143 : P "144") (f144 : P "145") (f145 : P "146") (f146 : P "147") (f147 : P "148") (f148 : P "149") (f149 : P "150") (f150 : P "151") (f151 : P "152") (f152 : P "153") (f153 : P "154") (f154 : P "155") (f155 : P "156") (f156 : P "157") (f157 : P "158") (f158 : P "159") (f159 : P "160") (f160 : P "161") (f161 : P "162") (f162 : P "163") (f163 : P "164") (f164 : P "165") (f165 : P "166") (f166 : P "167") (f167 : P "168") (f168 : P "169") (f169 : P "170") (f170 : P "171") (f171 : P "172") (f172 : P "173") (f173 : P "174") (f174 : P "175") (f175 : P "176") (f176 : P "177") (f177 : P "178") (f178 : P "179") (f179 : P "180") (f180 : P "181") (f181 : P "182") (f182 : P "183") (f183 : P "184") (f184 : P "185") (f185 : P "186") (f186 : P "187")
+ (f187 : P "188") (f188 : P "189") (f189 : P "190") (f190 : P "191") (f191 : P "192") (f192 : P "193") (f193 : P "194") (f194 : P "195") (f195 : P "196") (f196 : P "197") (f197 : P "198") (f198 : P "199") (f199 : P "200") (f200 : P "201") (f201 : P "202") (f202 : P "203") (f203 : P "204") (f204 : P "205") (f205 : P "206") (f206 : P "207") (f207 : P "208") (f208 : P "209") (f209 : P "210") (f210 : P "211") (f211 : P "212") (f212 : P "213") (f213 : P "214") (f214 : P "215") (f215 : P "216") (f216 : P "217") (f217 : P "218") (f218 : P "219") (f219 : P "220") (f220 : P "221") (f221 : P "222") (f222 : P "223") (f223 : P "224") (f224 : P "225") (f225 : P "226") (f226 : P "227") (f227 : P "228") (f228 : P "229") (f229 : P "230") (f230 : P "231") (f231 : P "232") (f232 : P "233") (f233 : P "234") (f234 : P "235") (f235 : P "236") (f236 : P "237") (f237 : P "238") (f238 : P "239") (f239 : P "240") (f240 : P "241") (f241 : P "242") (f242 : P "243") (f243 : P "244")
+ (f244 : P "245") (f245 : P "246") (f246 : P "247") (f247 : P "248") (f248 : P "249") (f249 : P "250") (f250 : P "251") (f251 : P "252") (f252 : P "253") (f253 : P "254") (f254 : P "255") (b : byte) =>
+match b as b0 return (P b0) with
+| "000" => f
+| "001" => f0
+| "002" => f1
+| "003" => f2
+| "004" => f3
+| "005" => f4
+| "006" => f5
+| "007" => f6
+| "008" => f7
+| "009" => f8
+| "010" => f9
+| "011" => f10
+| "012" => f11
+| "013" => f12
+| "014" => f13
+| "015" => f14
+| "016" => f15
+| "017" => f16
+| "018" => f17
+| "019" => f18
+| "020" => f19
+| "021" => f20
+| "022" => f21
+| "023" => f22
+| "024" => f23
+| "025" => f24
+| "026" => f25
+| "027" => f26
+| "028" => f27
+| "029" => f28
+| "030" => f29
+| "031" => f30
+| " " => f31
+| "!" => f32
+| """" => f33
+| "#" => f34
+| "$" => f35
+| "%" => f36
+| "&" => f37
+| "'" => f38
+| "(" => f39
+| ")" => f40
+| "*" => f41
+| "+" => f42
+| "," => f43
+| "-" => f44
+| "." => f45
+| "/" => f46
+| "0" => f47
+| "1" => f48
+| "2" => f49
+| "3" => f50
+| "4" => f51
+| "5" => f52
+| "6" => f53
+| "7" => f54
+| "8" => f55
+| "9" => f56
+| ":" => f57
+| ";" => f58
+| "<" => f59
+| "=" => f60
+| ">" => f61
+| "?" => f62
+| "@" => f63
+| "A" => f64
+| "B" => f65
+| "C" => f66
+| "D" => f67
+| "E" => f68
+| "F" => f69
+| "G" => f70
+| "H" => f71
+| "I" => f72
+| "J" => f73
+| "K" => f74
+| "L" => f75
+| "M" => f76
+| "N" => f77
+| "O" => f78
+| "P" => f79
+| "Q" => f80
+| "R" => f81
+| "S" => f82
+| "T" => f83
+| "U" => f84
+| "V" => f85
+| "W" => f86
+| "X" => f87
+| "Y" => f88
+| "Z" => f89
+| "[" => f90
+| "\" => f91
+| "]" => f92
+| "^" => f93
+| "_" => f94
+| "`" => f95
+| "a" => f96
+| "b" => f97
+| "c" => f98
+| "d" => f99
+| "e" => f100
+| "f" => f101
+| "g" => f102
+| "h" => f103
+| "i" => f104
+| "j" => f105
+| "k" => f106
+| "l" => f107
+| "m" => f108
+| "n" => f109
+| "o" => f110
+| "p" => f111
+| "q" => f112
+| "r" => f113
+| "s" => f114
+| "t" => f115
+| "u" => f116
+| "v" => f117
+| "w" => f118
+| "x" => f119
+| "y" => f120
+| "z" => f121
+| "{" => f122
+| "|" => f123
+| "}" => f124
+| "~" => f125
+| "127" => f126
+| "128" => f127
+| "129" => f128
+| "130" => f129
+| "131" => f130
+| "132" => f131
+| "133" => f132
+| "134" => f133
+| "135" => f134
+| "136" => f135
+| "137" => f136
+| "138" => f137
+| "139" => f138
+| "140" => f139
+| "141" => f140
+| "142" => f141
+| "143" => f142
+| "144" => f143
+| "145" => f144
+| "146" => f145
+| "147" => f146
+| "148" => f147
+| "149" => f148
+| "150" => f149
+| "151" => f150
+| "152" => f151
+| "153" => f152
+| "154" => f153
+| "155" => f154
+| "156" => f155
+| "157" => f156
+| "158" => f157
+| "159" => f158
+| "160" => f159
+| "161" => f160
+| "162" => f161
+| "163" => f162
+| "164" => f163
+| "165" => f164
+| "166" => f165
+| "167" => f166
+| "168" => f167
+| "169" => f168
+| "170" => f169
+| "171" => f170
+| "172" => f171
+| "173" => f172
+| "174" => f173
+| "175" => f174
+| "176" => f175
+| "177" => f176
+| "178" => f177
+| "179" => f178
+| "180" => f179
+| "181" => f180
+| "182" => f181
+| "183" => f182
+| "184" => f183
+| "185" => f184
+| "186" => f185
+| "187" => f186
+| "188" => f187
+| "189" => f188
+| "190" => f189
+| "191" => f190
+| "192" => f191
+| "193" => f192
+| "194" => f193
+| "195" => f194
+| "196" => f195
+| "197" => f196
+| "198" => f197
+| "199" => f198
+| "200" => f199
+| "201" => f200
+| "202" => f201
+| "203" => f202
+| "204" => f203
+| "205" => f204
+| "206" => f205
+| "207" => f206
+| "208" => f207
+| "209" => f208
+| "210" => f209
+| "211" => f210
+| "212" => f211
+| "213" => f212
+| "214" => f213
+| "215" => f214
+| "216" => f215
+| "217" => f216
+| "218" => f217
+| "219" => f218
+| "220" => f219
+| "221" => f220
+| "222" => f221
+| "223" => f222
+| "224" => f223
+| "225" => f224
+| "226" => f225
+| "227" => f226
+| "228" => f227
+| "229" => f228
+| "230" => f229
+| "231" => f230
+| "232" => f231
+| "233" => f232
+| "234" => f233
+| "235" => f234
+| "236" => f235
+| "237" => f236
+| "238" => f237
+| "239" => f238
+| "240" => f239
+| "241" => f240
+| "242" => f241
+| "243" => f242
+| "244" => f243
+| "245" => f244
+| "246" => f245
+| "247" => f246
+| "248" => f247
+| "249" => f248
+| "250" => f249
+| "251" => f250
+| "252" => f251
+| "253" => f252
+| "254" => f253
+| "255" => f254
+end
+ : forall P : byte -> Type,
+ P "000" ->
+ P "001" ->
+ P "002" ->
+ P "003" ->
+ P "004" ->
+ P "005" ->
+ P "006" ->
+ P "007" ->
+ P "008" ->
+ P "009" ->
+ P "010" ->
+ P "011" ->
+ P "012" ->
+ P "013" ->
+ P "014" ->
+ P "015" ->
+ P "016" ->
+ P "017" ->
+ P "018" ->
+ P "019" ->
+ P "020" ->
+ P "021" ->
+ P "022" ->
+ P "023" ->
+ P "024" ->
+ P "025" ->
+ P "026" ->
+ P "027" ->
+ P "028" ->
+ P "029" ->
+ P "030" ->
+ P "031" ->
+ P " " ->
+ P "!" ->
+ P """" ->
+ P "#" ->
+ P "$" ->
+ P "%" ->
+ P "&" ->
+ P "'" ->
+ P "(" ->
+ P ")" ->
+ P "*" ->
+ P "+" ->
+ P "," ->
+ P "-" ->
+ P "." ->
+ P "/" ->
+ P "0" ->
+ P "1" ->
+ P "2" ->
+ P "3" ->
+ P "4" ->
+ P "5" ->
+ P "6" ->
+ P "7" ->
+ P "8" ->
+ P "9" ->
+ P ":" ->
+ P ";" ->
+ P "<" ->
+ P "=" ->
+ P ">" ->
+ P "?" ->
+ P "@" ->
+ P "A" ->
+ P "B" ->
+ P "C" ->
+ P "D" ->
+ P "E" ->
+ P "F" ->
+ P "G" ->
+ P "H" ->
+ P "I" ->
+ P "J" ->
+ P "K" ->
+ P "L" ->
+ P "M" ->
+ P "N" ->
+ P "O" ->
+ P "P" ->
+ P "Q" ->
+ P "R" ->
+ P "S" ->
+ P "T" ->
+ P "U" ->
+ P "V" ->
+ P "W" ->
+ P "X" ->
+ P "Y" ->
+ P "Z" ->
+ P "[" ->
+ P "\" ->
+ P "]" ->
+ P "^" ->
+ P "_" ->
+ P "`" ->
+ P "a" ->
+ P "b" ->
+ P "c" ->
+ P "d" ->
+ P "e" ->
+ P "f" ->
+ P "g" ->
+ P "h" ->
+ P "i" ->
+ P "j" ->
+ P "k" ->
+ P "l" ->
+ P "m" ->
+ P "n" ->
+ P "o" ->
+ P "p" ->
+ P "q" ->
+ P "r" ->
+ P "s" ->
+ P "t" ->
+ P "u" ->
+ P "v" ->
+ P "w" ->
+ P "x" ->
+ P "y" ->
+ P "z" ->
+ P "{" ->
+ P "|" ->
+ P "}" ->
+ P "~" ->
+ P "127" ->
+ P "128" ->
+ P "129" ->
+ P "130" ->
+ P "131" ->
+ P "132" ->
+ P "133" ->
+ P "134" ->
+ P "135" ->
+ P "136" ->
+ P "137" ->
+ P "138" ->
+ P "139" ->
+ P "140" ->
+ P "141" ->
+ P "142" ->
+ P "143" ->
+ P "144" ->
+ P "145" ->
+ P "146" ->
+ P "147" ->
+ P "148" ->
+ P "149" ->
+ P "150" ->
+ P "151" ->
+ P "152" ->
+ P "153" ->
+ P "154" ->
+ P "155" ->
+ P "156" ->
+ P "157" ->
+ P "158" ->
+ P "159" ->
+ P "160" ->
+ P "161" ->
+ P "162" ->
+ P "163" ->
+ P "164" ->
+ P "165" ->
+ P "166" ->
+ P "167" ->
+ P "168" -> P "169" -> P "170" -> P "171" -> P "172" -> P "173" -> P "174" -> P "175" -> P "176" -> P "177" -> P "178" -> P "179" -> P "180" -> P "181" -> P "182" -> P "183" -> P "184" -> P "185" -> P "186" -> P "187" -> P "188" -> P "189" -> P "190" -> P "191" -> P "192" -> P "193" -> P "194" -> P "195" -> P "196" -> P "197" -> P "198" -> P "199" -> P "200" -> P "201" -> P "202" -> P "203" -> P "204" -> P "205" -> P "206" -> P "207" -> P "208" -> P "209" -> P "210" -> P "211" -> P "212" -> P "213" -> P "214" -> P "215" -> P "216" -> P "217" -> P "218" -> P "219" -> P "220" -> P "221" -> P "222" -> P "223" -> P "224" -> P "225" -> P "226" -> P "227" -> P "228" -> P "229" -> P "230" -> P "231" -> P "232" -> P "233" -> P "234" -> P "235" -> P "236" -> P "237" -> P "238" -> P "239" -> P "240" -> P "241" -> P "242" -> P "243" -> P "244" -> P "245" -> P "246" -> P "247" -> P "248" -> P "249" -> P "250" -> P "251" -> P "252" -> P "253" -> P "254" -> P "255" -> forall b : byte, P b
+
+Argument scopes are [function_scope _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ byte_scope]
+byte_rec =
+fun P : byte -> Set => byte_rect P
+ : forall P : byte -> Set,
+ P "000" ->
+ P "001" ->
+ P "002" ->
+ P "003" ->
+ P "004" ->
+ P "005" ->
+ P "006" ->
+ P "007" ->
+ P "008" ->
+ P "009" ->
+ P "010" ->
+ P "011" ->
+ P "012" ->
+ P "013" ->
+ P "014" ->
+ P "015" ->
+ P "016" ->
+ P "017" ->
+ P "018" ->
+ P "019" ->
+ P "020" ->
+ P "021" ->
+ P "022" ->
+ P "023" ->
+ P "024" ->
+ P "025" ->
+ P "026" ->
+ P "027" ->
+ P "028" ->
+ P "029" ->
+ P "030" ->
+ P "031" ->
+ P " " ->
+ P "!" ->
+ P """" ->
+ P "#" ->
+ P "$" ->
+ P "%" ->
+ P "&" ->
+ P "'" ->
+ P "(" ->
+ P ")" ->
+ P "*" ->
+ P "+" ->
+ P "," ->
+ P "-" ->
+ P "." ->
+ P "/" ->
+ P "0" ->
+ P "1" ->
+ P "2" ->
+ P "3" ->
+ P "4" ->
+ P "5" ->
+ P "6" ->
+ P "7" ->
+ P "8" ->
+ P "9" ->
+ P ":" ->
+ P ";" ->
+ P "<" ->
+ P "=" ->
+ P ">" ->
+ P "?" ->
+ P "@" ->
+ P "A" ->
+ P "B" ->
+ P "C" ->
+ P "D" ->
+ P "E" ->
+ P "F" ->
+ P "G" ->
+ P "H" ->
+ P "I" ->
+ P "J" ->
+ P "K" ->
+ P "L" ->
+ P "M" ->
+ P "N" ->
+ P "O" ->
+ P "P" ->
+ P "Q" ->
+ P "R" ->
+ P "S" ->
+ P "T" ->
+ P "U" ->
+ P "V" ->
+ P "W" ->
+ P "X" ->
+ P "Y" ->
+ P "Z" ->
+ P "[" ->
+ P "\" ->
+ P "]" ->
+ P "^" ->
+ P "_" ->
+ P "`" ->
+ P "a" ->
+ P "b" ->
+ P "c" ->
+ P "d" ->
+ P "e" ->
+ P "f" ->
+ P "g" ->
+ P "h" ->
+ P "i" ->
+ P "j" ->
+ P "k" ->
+ P "l" ->
+ P "m" ->
+ P "n" ->
+ P "o" ->
+ P "p" ->
+ P "q" ->
+ P "r" ->
+ P "s" ->
+ P "t" ->
+ P "u" ->
+ P "v" ->
+ P "w" ->
+ P "x" ->
+ P "y" ->
+ P "z" ->
+ P "{" ->
+ P "|" ->
+ P "}" ->
+ P "~" ->
+ P "127" ->
+ P "128" ->
+ P "129" ->
+ P "130" ->
+ P "131" ->
+ P "132" ->
+ P "133" ->
+ P "134" ->
+ P "135" ->
+ P "136" ->
+ P "137" ->
+ P "138" ->
+ P "139" ->
+ P "140" ->
+ P "141" ->
+ P "142" ->
+ P "143" ->
+ P "144" ->
+ P "145" ->
+ P "146" ->
+ P "147" ->
+ P "148" ->
+ P "149" ->
+ P "150" ->
+ P "151" ->
+ P "152" ->
+ P "153" ->
+ P "154" ->
+ P "155" ->
+ P "156" ->
+ P "157" ->
+ P "158" ->
+ P "159" ->
+ P "160" ->
+ P "161" ->
+ P "162" ->
+ P "163" ->
+ P "164" ->
+ P "165" ->
+ P "166" ->
+ P "167" ->
+ P "168" -> P "169" -> P "170" -> P "171" -> P "172" -> P "173" -> P "174" -> P "175" -> P "176" -> P "177" -> P "178" -> P "179" -> P "180" -> P "181" -> P "182" -> P "183" -> P "184" -> P "185" -> P "186" -> P "187" -> P "188" -> P "189" -> P "190" -> P "191" -> P "192" -> P "193" -> P "194" -> P "195" -> P "196" -> P "197" -> P "198" -> P "199" -> P "200" -> P "201" -> P "202" -> P "203" -> P "204" -> P "205" -> P "206" -> P "207" -> P "208" -> P "209" -> P "210" -> P "211" -> P "212" -> P "213" -> P "214" -> P "215" -> P "216" -> P "217" -> P "218" -> P "219" -> P "220" -> P "221" -> P "222" -> P "223" -> P "224" -> P "225" -> P "226" -> P "227" -> P "228" -> P "229" -> P "230" -> P "231" -> P "232" -> P "233" -> P "234" -> P "235" -> P "236" -> P "237" -> P "238" -> P "239" -> P "240" -> P "241" -> P "242" -> P "243" -> P "244" -> P "245" -> P "246" -> P "247" -> P "248" -> P "249" -> P "250" -> P "251" -> P "252" -> P "253" -> P "254" -> P "255" -> forall b : byte, P b
+
+Argument scopes are [function_scope _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ byte_scope]
+byte_ind =
+fun (P : byte -> Prop) (f : P "000") (f0 : P "001") (f1 : P "002") (f2 : P "003") (f3 : P "004") (f4 : P "005") (f5 : P "006") (f6 : P "007") (f7 : P "008") (f8 : P "009") (f9 : P "010") (f10 : P "011") (f11 : P "012") (f12 : P "013") (f13 : P "014") (f14 : P "015") (f15 : P "016") (f16 : P "017") (f17 : P "018") (f18 : P "019") (f19 : P "020") (f20 : P "021") (f21 : P "022") (f22 : P "023") (f23 : P "024") (f24 : P "025") (f25 : P "026") (f26 : P "027") (f27 : P "028") (f28 : P "029") (f29 : P "030") (f30 : P "031") (f31 : P " ") (f32 : P "!") (f33 : P """") (f34 : P "#") (f35 : P "$") (f36 : P "%") (f37 : P "&") (f38 : P "'") (f39 : P "(") (f40 : P ")") (f41 : P "*") (f42 : P "+") (f43 : P ",") (f44 : P "-") (f45 : P ".") (f46 : P "/") (f47 : P "0") (f48 : P "1") (f49 : P "2") (f50 : P "3") (f51 : P "4") (f52 : P "5") (f53 : P "6") (f54 : P "7") (f55 : P "8") (f56 : P "9") (f57 : P ":") (f58 : P ";") (f59 : P "<") (f60 : P "=") (f61 : P ">") (f62 : P "?")
+ (f63 : P "@") (f64 : P "A") (f65 : P "B") (f66 : P "C") (f67 : P "D") (f68 : P "E") (f69 : P "F") (f70 : P "G") (f71 : P "H") (f72 : P "I") (f73 : P "J") (f74 : P "K") (f75 : P "L") (f76 : P "M") (f77 : P "N") (f78 : P "O") (f79 : P "P") (f80 : P "Q") (f81 : P "R") (f82 : P "S") (f83 : P "T") (f84 : P "U") (f85 : P "V") (f86 : P "W") (f87 : P "X") (f88 : P "Y") (f89 : P "Z") (f90 : P "[") (f91 : P "\") (f92 : P "]") (f93 : P "^") (f94 : P "_") (f95 : P "`") (f96 : P "a") (f97 : P "b") (f98 : P "c") (f99 : P "d") (f100 : P "e") (f101 : P "f") (f102 : P "g") (f103 : P "h") (f104 : P "i") (f105 : P "j") (f106 : P "k") (f107 : P "l") (f108 : P "m") (f109 : P "n") (f110 : P "o") (f111 : P "p") (f112 : P "q") (f113 : P "r") (f114 : P "s") (f115 : P "t") (f116 : P "u") (f117 : P "v") (f118 : P "w") (f119 : P "x") (f120 : P "y") (f121 : P "z") (f122 : P "{") (f123 : P "|") (f124 : P "}") (f125 : P "~") (f126 : P "127") (f127 : P "128") (f128 : P "129") (f129 : P "130")
+ (f130 : P "131") (f131 : P "132") (f132 : P "133") (f133 : P "134") (f134 : P "135") (f135 : P "136") (f136 : P "137") (f137 : P "138") (f138 : P "139") (f139 : P "140") (f140 : P "141") (f141 : P "142") (f142 : P "143") (f143 : P "144") (f144 : P "145") (f145 : P "146") (f146 : P "147") (f147 : P "148") (f148 : P "149") (f149 : P "150") (f150 : P "151") (f151 : P "152") (f152 : P "153") (f153 : P "154") (f154 : P "155") (f155 : P "156") (f156 : P "157") (f157 : P "158") (f158 : P "159") (f159 : P "160") (f160 : P "161") (f161 : P "162") (f162 : P "163") (f163 : P "164") (f164 : P "165") (f165 : P "166") (f166 : P "167") (f167 : P "168") (f168 : P "169") (f169 : P "170") (f170 : P "171") (f171 : P "172") (f172 : P "173") (f173 : P "174") (f174 : P "175") (f175 : P "176") (f176 : P "177") (f177 : P "178") (f178 : P "179") (f179 : P "180") (f180 : P "181") (f181 : P "182") (f182 : P "183") (f183 : P "184") (f184 : P "185") (f185 : P "186") (f186 : P "187")
+ (f187 : P "188") (f188 : P "189") (f189 : P "190") (f190 : P "191") (f191 : P "192") (f192 : P "193") (f193 : P "194") (f194 : P "195") (f195 : P "196") (f196 : P "197") (f197 : P "198") (f198 : P "199") (f199 : P "200") (f200 : P "201") (f201 : P "202") (f202 : P "203") (f203 : P "204") (f204 : P "205") (f205 : P "206") (f206 : P "207") (f207 : P "208") (f208 : P "209") (f209 : P "210") (f210 : P "211") (f211 : P "212") (f212 : P "213") (f213 : P "214") (f214 : P "215") (f215 : P "216") (f216 : P "217") (f217 : P "218") (f218 : P "219") (f219 : P "220") (f220 : P "221") (f221 : P "222") (f222 : P "223") (f223 : P "224") (f224 : P "225") (f225 : P "226") (f226 : P "227") (f227 : P "228") (f228 : P "229") (f229 : P "230") (f230 : P "231") (f231 : P "232") (f232 : P "233") (f233 : P "234") (f234 : P "235") (f235 : P "236") (f236 : P "237") (f237 : P "238") (f238 : P "239") (f239 : P "240") (f240 : P "241") (f241 : P "242") (f242 : P "243") (f243 : P "244")
+ (f244 : P "245") (f245 : P "246") (f246 : P "247") (f247 : P "248") (f248 : P "249") (f249 : P "250") (f250 : P "251") (f251 : P "252") (f252 : P "253") (f253 : P "254") (f254 : P "255") (b : byte) =>
+match b as b0 return (P b0) with
+| "000" => f
+| "001" => f0
+| "002" => f1
+| "003" => f2
+| "004" => f3
+| "005" => f4
+| "006" => f5
+| "007" => f6
+| "008" => f7
+| "009" => f8
+| "010" => f9
+| "011" => f10
+| "012" => f11
+| "013" => f12
+| "014" => f13
+| "015" => f14
+| "016" => f15
+| "017" => f16
+| "018" => f17
+| "019" => f18
+| "020" => f19
+| "021" => f20
+| "022" => f21
+| "023" => f22
+| "024" => f23
+| "025" => f24
+| "026" => f25
+| "027" => f26
+| "028" => f27
+| "029" => f28
+| "030" => f29
+| "031" => f30
+| " " => f31
+| "!" => f32
+| """" => f33
+| "#" => f34
+| "$" => f35
+| "%" => f36
+| "&" => f37
+| "'" => f38
+| "(" => f39
+| ")" => f40
+| "*" => f41
+| "+" => f42
+| "," => f43
+| "-" => f44
+| "." => f45
+| "/" => f46
+| "0" => f47
+| "1" => f48
+| "2" => f49
+| "3" => f50
+| "4" => f51
+| "5" => f52
+| "6" => f53
+| "7" => f54
+| "8" => f55
+| "9" => f56
+| ":" => f57
+| ";" => f58
+| "<" => f59
+| "=" => f60
+| ">" => f61
+| "?" => f62
+| "@" => f63
+| "A" => f64
+| "B" => f65
+| "C" => f66
+| "D" => f67
+| "E" => f68
+| "F" => f69
+| "G" => f70
+| "H" => f71
+| "I" => f72
+| "J" => f73
+| "K" => f74
+| "L" => f75
+| "M" => f76
+| "N" => f77
+| "O" => f78
+| "P" => f79
+| "Q" => f80
+| "R" => f81
+| "S" => f82
+| "T" => f83
+| "U" => f84
+| "V" => f85
+| "W" => f86
+| "X" => f87
+| "Y" => f88
+| "Z" => f89
+| "[" => f90
+| "\" => f91
+| "]" => f92
+| "^" => f93
+| "_" => f94
+| "`" => f95
+| "a" => f96
+| "b" => f97
+| "c" => f98
+| "d" => f99
+| "e" => f100
+| "f" => f101
+| "g" => f102
+| "h" => f103
+| "i" => f104
+| "j" => f105
+| "k" => f106
+| "l" => f107
+| "m" => f108
+| "n" => f109
+| "o" => f110
+| "p" => f111
+| "q" => f112
+| "r" => f113
+| "s" => f114
+| "t" => f115
+| "u" => f116
+| "v" => f117
+| "w" => f118
+| "x" => f119
+| "y" => f120
+| "z" => f121
+| "{" => f122
+| "|" => f123
+| "}" => f124
+| "~" => f125
+| "127" => f126
+| "128" => f127
+| "129" => f128
+| "130" => f129
+| "131" => f130
+| "132" => f131
+| "133" => f132
+| "134" => f133
+| "135" => f134
+| "136" => f135
+| "137" => f136
+| "138" => f137
+| "139" => f138
+| "140" => f139
+| "141" => f140
+| "142" => f141
+| "143" => f142
+| "144" => f143
+| "145" => f144
+| "146" => f145
+| "147" => f146
+| "148" => f147
+| "149" => f148
+| "150" => f149
+| "151" => f150
+| "152" => f151
+| "153" => f152
+| "154" => f153
+| "155" => f154
+| "156" => f155
+| "157" => f156
+| "158" => f157
+| "159" => f158
+| "160" => f159
+| "161" => f160
+| "162" => f161
+| "163" => f162
+| "164" => f163
+| "165" => f164
+| "166" => f165
+| "167" => f166
+| "168" => f167
+| "169" => f168
+| "170" => f169
+| "171" => f170
+| "172" => f171
+| "173" => f172
+| "174" => f173
+| "175" => f174
+| "176" => f175
+| "177" => f176
+| "178" => f177
+| "179" => f178
+| "180" => f179
+| "181" => f180
+| "182" => f181
+| "183" => f182
+| "184" => f183
+| "185" => f184
+| "186" => f185
+| "187" => f186
+| "188" => f187
+| "189" => f188
+| "190" => f189
+| "191" => f190
+| "192" => f191
+| "193" => f192
+| "194" => f193
+| "195" => f194
+| "196" => f195
+| "197" => f196
+| "198" => f197
+| "199" => f198
+| "200" => f199
+| "201" => f200
+| "202" => f201
+| "203" => f202
+| "204" => f203
+| "205" => f204
+| "206" => f205
+| "207" => f206
+| "208" => f207
+| "209" => f208
+| "210" => f209
+| "211" => f210
+| "212" => f211
+| "213" => f212
+| "214" => f213
+| "215" => f214
+| "216" => f215
+| "217" => f216
+| "218" => f217
+| "219" => f218
+| "220" => f219
+| "221" => f220
+| "222" => f221
+| "223" => f222
+| "224" => f223
+| "225" => f224
+| "226" => f225
+| "227" => f226
+| "228" => f227
+| "229" => f228
+| "230" => f229
+| "231" => f230
+| "232" => f231
+| "233" => f232
+| "234" => f233
+| "235" => f234
+| "236" => f235
+| "237" => f236
+| "238" => f237
+| "239" => f238
+| "240" => f239
+| "241" => f240
+| "242" => f241
+| "243" => f242
+| "244" => f243
+| "245" => f244
+| "246" => f245
+| "247" => f246
+| "248" => f247
+| "249" => f248
+| "250" => f249
+| "251" => f250
+| "252" => f251
+| "253" => f252
+| "254" => f253
+| "255" => f254
+end
+ : forall P : byte -> Prop,
+ P "000" ->
+ P "001" ->
+ P "002" ->
+ P "003" ->
+ P "004" ->
+ P "005" ->
+ P "006" ->
+ P "007" ->
+ P "008" ->
+ P "009" ->
+ P "010" ->
+ P "011" ->
+ P "012" ->
+ P "013" ->
+ P "014" ->
+ P "015" ->
+ P "016" ->
+ P "017" ->
+ P "018" ->
+ P "019" ->
+ P "020" ->
+ P "021" ->
+ P "022" ->
+ P "023" ->
+ P "024" ->
+ P "025" ->
+ P "026" ->
+ P "027" ->
+ P "028" ->
+ P "029" ->
+ P "030" ->
+ P "031" ->
+ P " " ->
+ P "!" ->
+ P """" ->
+ P "#" ->
+ P "$" ->
+ P "%" ->
+ P "&" ->
+ P "'" ->
+ P "(" ->
+ P ")" ->
+ P "*" ->
+ P "+" ->
+ P "," ->
+ P "-" ->
+ P "." ->
+ P "/" ->
+ P "0" ->
+ P "1" ->
+ P "2" ->
+ P "3" ->
+ P "4" ->
+ P "5" ->
+ P "6" ->
+ P "7" ->
+ P "8" ->
+ P "9" ->
+ P ":" ->
+ P ";" ->
+ P "<" ->
+ P "=" ->
+ P ">" ->
+ P "?" ->
+ P "@" ->
+ P "A" ->
+ P "B" ->
+ P "C" ->
+ P "D" ->
+ P "E" ->
+ P "F" ->
+ P "G" ->
+ P "H" ->
+ P "I" ->
+ P "J" ->
+ P "K" ->
+ P "L" ->
+ P "M" ->
+ P "N" ->
+ P "O" ->
+ P "P" ->
+ P "Q" ->
+ P "R" ->
+ P "S" ->
+ P "T" ->
+ P "U" ->
+ P "V" ->
+ P "W" ->
+ P "X" ->
+ P "Y" ->
+ P "Z" ->
+ P "[" ->
+ P "\" ->
+ P "]" ->
+ P "^" ->
+ P "_" ->
+ P "`" ->
+ P "a" ->
+ P "b" ->
+ P "c" ->
+ P "d" ->
+ P "e" ->
+ P "f" ->
+ P "g" ->
+ P "h" ->
+ P "i" ->
+ P "j" ->
+ P "k" ->
+ P "l" ->
+ P "m" ->
+ P "n" ->
+ P "o" ->
+ P "p" ->
+ P "q" ->
+ P "r" ->
+ P "s" ->
+ P "t" ->
+ P "u" ->
+ P "v" ->
+ P "w" ->
+ P "x" ->
+ P "y" ->
+ P "z" ->
+ P "{" ->
+ P "|" ->
+ P "}" ->
+ P "~" ->
+ P "127" ->
+ P "128" ->
+ P "129" ->
+ P "130" ->
+ P "131" ->
+ P "132" ->
+ P "133" ->
+ P "134" ->
+ P "135" ->
+ P "136" ->
+ P "137" ->
+ P "138" ->
+ P "139" ->
+ P "140" ->
+ P "141" ->
+ P "142" ->
+ P "143" ->
+ P "144" ->
+ P "145" ->
+ P "146" ->
+ P "147" ->
+ P "148" ->
+ P "149" ->
+ P "150" ->
+ P "151" ->
+ P "152" ->
+ P "153" ->
+ P "154" ->
+ P "155" ->
+ P "156" ->
+ P "157" ->
+ P "158" ->
+ P "159" ->
+ P "160" ->
+ P "161" ->
+ P "162" ->
+ P "163" ->
+ P "164" ->
+ P "165" ->
+ P "166" ->
+ P "167" ->
+ P "168" -> P "169" -> P "170" -> P "171" -> P "172" -> P "173" -> P "174" -> P "175" -> P "176" -> P "177" -> P "178" -> P "179" -> P "180" -> P "181" -> P "182" -> P "183" -> P "184" -> P "185" -> P "186" -> P "187" -> P "188" -> P "189" -> P "190" -> P "191" -> P "192" -> P "193" -> P "194" -> P "195" -> P "196" -> P "197" -> P "198" -> P "199" -> P "200" -> P "201" -> P "202" -> P "203" -> P "204" -> P "205" -> P "206" -> P "207" -> P "208" -> P "209" -> P "210" -> P "211" -> P "212" -> P "213" -> P "214" -> P "215" -> P "216" -> P "217" -> P "218" -> P "219" -> P "220" -> P "221" -> P "222" -> P "223" -> P "224" -> P "225" -> P "226" -> P "227" -> P "228" -> P "229" -> P "230" -> P "231" -> P "232" -> P "233" -> P "234" -> P "235" -> P "236" -> P "237" -> P "238" -> P "239" -> P "240" -> P "241" -> P "242" -> P "243" -> P "244" -> P "245" -> P "246" -> P "247" -> P "248" -> P "249" -> P "250" -> P "251" -> P "252" -> P "253" -> P "254" -> P "255" -> forall b : byte, P b
+
+Argument scopes are [function_scope _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ byte_scope]
+"000"
+ : byte
+"a"
+ : byte
+"127"
+ : byte
+The command has indeed failed with message:
+Expects a single character or a three-digits ascii code.
+"000"
+ : ascii
+"a"
+ : ascii
+"127"
+ : ascii
+The command has indeed failed with message:
+Expects a single character or a three-digits ascii code.
+"000"
+ : string
+"a"
+ : string
+"127"
+ : string
+"€"
+ : string
+""
+ : string
+ = "a"%char
+ : ascii
+ = "a"%byte
+ : byte
+ = "a"%string
+ : string
+ = ["a"%byte]
+ : list byte
+ = ["000"; "001"; "002"; "003"; "004"; "005"; "006"; "007"; "008"; "009"; "010"; "011"; "012"; "013"; "014"; "015"; "016"; "017"; "018"; "019"; "020"; "021"; "022"; "023"; "024"; "025"; "026"; "027"; "028"; "029"; "030"; "031"; " "; "!"; """"; "#"; "$"; "%"; "&"; "'"; "("; ")"; "*"; "+"; ","; "-"; "."; "/"; "0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9"; ":"; ";"; "<"; "="; ">"; "?"; "@"; "A"; "B"; "C"; "D"; "E"; "F"; "G"; "H"; "I"; "J"; "K"; "L"; "M"; "N"; "O"; "P"; "Q"; "R"; "S"; "T"; "U"; "V"; "W"; "X"; "Y"; "Z"; "["; "\"; "]"; "^"; "_"; "`"; "a"; "b"; "c"; "d"; "e"; "f"; "g"; "h"; "i"; "j"; "k"; "l"; "m"; "n"; "o"; "p"; "q"; "r"; "s"; "t"; "u"; "v"; "w"; "x"; "y"; "z"; "{"; "|"; "}"; "~"; "127"; "128"; "129"; "130"; "131"; "132"; "133"; "134"; "135"; "136"; "137"; "138"; "139"; "140"; "141"; "142"; "143"; "144"; "145"; "146"; "147"; "148"; "149"; "150"; "151"; "152"; "153"; "154"; "155"; "156"; "157"; "158"; "159"; "160"; "161"; "162"; "163"; "164"; "165"; "166"; "167";
+ "168"; "169"; "170"; "171"; "172"; "173"; "174"; "175"; "176"; "177"; "178"; "179"; "180"; "181"; "182"; "183"; "184"; "185"; "186"; "187"; "188"; "189"; "190"; "191"; "192"; "193"; "194"; "195"; "196"; "197"; "198"; "199"; "200"; "201"; "202"; "203"; "204"; "205"; "206"; "207"; "208"; "209"; "210"; "211"; "212"; "213"; "214"; "215"; "216"; "217"; "218"; "219"; "220"; "221"; "222"; "223"; "224"; "225"; "226"; "227"; "228"; "229"; "230"; "231"; "232"; "233"; "234"; "235"; "236"; "237"; "238"; "239"; "240"; "241"; "242"; "243"; "244"; "245"; "246"; "247"; "248"; "249"; "250"; "251"; "252"; "253"; "254"; "255"]
+ : list byte
+ = ["000"; "001"; "002"; "003"; "004"; "005"; "006"; "007"; "008"; "009"; "010"; "011"; "012"; "013"; "014"; "015"; "016"; "017"; "018"; "019"; "020"; "021"; "022"; "023"; "024"; "025"; "026"; "027"; "028"; "029"; "030"; "031"; " "; "!"; """"; "#"; "$"; "%"; "&"; "'"; "("; ")"; "*"; "+"; ","; "-"; "."; "/"; "0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9"; ":"; ";"; "<"; "="; ">"; "?"; "@"; "A"; "B"; "C"; "D"; "E"; "F"; "G"; "H"; "I"; "J"; "K"; "L"; "M"; "N"; "O"; "P"; "Q"; "R"; "S"; "T"; "U"; "V"; "W"; "X"; "Y"; "Z"; "["; "\"; "]"; "^"; "_"; "`"; "a"; "b"; "c"; "d"; "e"; "f"; "g"; "h"; "i"; "j"; "k"; "l"; "m"; "n"; "o"; "p"; "q"; "r"; "s"; "t"; "u"; "v"; "w"; "x"; "y"; "z"; "{"; "|"; "}"; "~"; "127"; "128"; "129"; "130"; "131"; "132"; "133"; "134"; "135"; "136"; "137"; "138"; "139"; "140"; "141"; "142"; "143"; "144"; "145"; "146"; "147"; "148"; "149"; "150"; "151"; "152"; "153"; "154"; "155"; "156"; "157"; "158"; "159"; "160"; "161"; "162"; "163"; "164"; "165"; "166"; "167";
+ "168"; "169"; "170"; "171"; "172"; "173"; "174"; "175"; "176"; "177"; "178"; "179"; "180"; "181"; "182"; "183"; "184"; "185"; "186"; "187"; "188"; "189"; "190"; "191"; "192"; "193"; "194"; "195"; "196"; "197"; "198"; "199"; "200"; "201"; "202"; "203"; "204"; "205"; "206"; "207"; "208"; "209"; "210"; "211"; "212"; "213"; "214"; "215"; "216"; "217"; "218"; "219"; "220"; "221"; "222"; "223"; "224"; "225"; "226"; "227"; "228"; "229"; "230"; "231"; "232"; "233"; "234"; "235"; "236"; "237"; "238"; "239"; "240"; "241"; "242"; "243"; "244"; "245"; "246"; "247"; "248"; "249"; "250"; "251"; "252"; "253"; "254"; "255"]
+ : list ascii
diff --git a/test-suite/output/StringSyntax.v b/test-suite/output/StringSyntax.v
new file mode 100644
index 0000000000..aab6e0bb03
--- /dev/null
+++ b/test-suite/output/StringSyntax.v
@@ -0,0 +1,52 @@
+Require Import Coq.Lists.List.
+Require Import Coq.Strings.String Coq.Strings.Byte Coq.Strings.Ascii.
+Import ListNotations.
+
+Set Printing Depth 100000.
+Set Printing Width 1000.
+
+Close Scope char_scope.
+Close Scope string_scope.
+
+Open Scope byte_scope.
+Print byte_rect.
+Print byte_rec.
+Print byte_ind.
+Check "000".
+Check "a".
+Check "127".
+Fail Check "€".
+Close Scope byte_scope.
+
+Open Scope char_scope.
+Check "000".
+Check "a".
+Check "127".
+Fail Check "€".
+Close Scope char_scope.
+
+Open Scope string_scope.
+Check "000".
+Check "a".
+Check "127".
+Check "€".
+Check String "001" EmptyString.
+Close Scope string_scope.
+
+Compute ascii_of_byte "a".
+Compute byte_of_ascii "a".
+Compute string_of_list_byte ("a"::nil)%byte.
+Compute list_byte_of_string "a".
+
+Local Open Scope byte_scope.
+Compute List.fold_right
+ (fun n ls => match Byte.of_nat n with
+ | Some b => cons b ls
+ | None => ls
+ end)
+ nil
+ (List.seq 0 256).
+Local Close Scope byte_scope.
+Local Open Scope char_scope.
+Compute List.map Ascii.ascii_of_nat (List.seq 0 256).
+Local Close Scope char_scope.
diff --git a/test-suite/output/TypeclassDebug.out b/test-suite/output/TypeclassDebug.out
index 8b38fe0ff4..7ea7a08cb3 100644
--- a/test-suite/output/TypeclassDebug.out
+++ b/test-suite/output/TypeclassDebug.out
@@ -14,5 +14,4 @@ Debug: 1.1-1.1-1.1-1.1-1: looking for foo without backtracking
Debug: 1.1-1.1-1.1-1.1-1.1: simple apply H on foo, 1 subgoal(s)
Debug: 1.1-1.1-1.1-1.1-1.1-1 : foo
The command has indeed failed with message:
-Ltac call to "typeclasses eauto (int_or_var_opt) with (ne_preident_list)" failed.
Tactic failure: Proof search reached its limit.
diff --git a/test-suite/output/UnclosedBlocks.v b/test-suite/output/UnclosedBlocks.v
index 854bd6a6d5..b9ba579246 100644
--- a/test-suite/output/UnclosedBlocks.v
+++ b/test-suite/output/UnclosedBlocks.v
@@ -1,4 +1,3 @@
-(* -*- mode: coq; coq-prog-args: ("-compile" "UnclosedBlocks.v") *)
Module Foo.
Module Closed.
End Closed.
diff --git a/test-suite/output/UnivBinders.out b/test-suite/output/UnivBinders.out
index acc37f653c..222a808768 100644
--- a/test-suite/output/UnivBinders.out
+++ b/test-suite/output/UnivBinders.out
@@ -1,5 +1,7 @@
-NonCumulative Inductive Empty@{u} : Type@{u} :=
-NonCumulative Record PWrap (A : Type@{u}) : Type@{u} := pwrap { punwrap : A }
+Inductive Empty@{u} : Type@{u} :=
+(* u |= *)
+Record PWrap (A : Type@{u}) : Type@{u} := pwrap { punwrap : A }
+(* u |= *)
PWrap has primitive projections with eta conversion.
For PWrap: Argument scope is [type_scope]
@@ -9,9 +11,9 @@ fun (A : Type@{u}) (p : PWrap@{u} A) => punwrap _ p
: forall A : Type@{u}, PWrap@{u} A -> A
(* u |= *)
-punwrap is universe polymorphic
Argument scopes are [type_scope _]
-NonCumulative Record RWrap (A : Type@{u}) : Type@{u} := rwrap { runwrap : A }
+Record RWrap (A : Type@{u}) : Type@{u} := rwrap { runwrap : A }
+(* u |= *)
For RWrap: Argument scope is [type_scope]
For rwrap: Argument scopes are [type_scope _]
@@ -20,45 +22,35 @@ fun (A : Type@{u}) (r : RWrap@{u} A) => let (runwrap) := r in runwrap
: forall A : Type@{u}, RWrap@{u} A -> A
(* u |= *)
-runwrap is universe polymorphic
Argument scopes are [type_scope _]
Wrap@{u} = fun A : Type@{u} => A
: Type@{u} -> Type@{u}
(* u |= *)
-Wrap is universe polymorphic
Argument scope is [type_scope]
wrap@{u} =
fun (A : Type@{u}) (Wrap : Wrap@{u} A) => Wrap
: forall A : Type@{u}, Wrap@{u} A -> A
(* u |= *)
-wrap is universe polymorphic
Arguments A, Wrap are implicit and maximally inserted
Argument scopes are [type_scope _]
bar@{u} = nat
: Wrap@{u} Set
-(* u |= Set < u
- *)
-
-bar is universe polymorphic
+(* u |= Set < u *)
foo@{u UnivBinders.17 v} =
Type@{UnivBinders.17} -> Type@{v} -> Type@{u}
: Type@{max(u+1,UnivBinders.17+1,v+1)}
(* u UnivBinders.17 v |= *)
-
-foo is universe polymorphic
Type@{i} -> Type@{j}
: Type@{max(i+1,j+1)}
(* {j i} |= *)
= Type@{i} -> Type@{j}
: Type@{max(i+1,j+1)}
(* {j i} |= *)
-Monomorphic mono = Type@{mono.u}
+mono = Type@{mono.u}
: Type@{mono.u+1}
(* {mono.u} |= *)
-
-mono is not universe polymorphic
mono
: Type@{mono.u+1}
Type@{mono.u}
@@ -76,24 +68,23 @@ mono
The command has indeed failed with message:
Universe u already exists.
bobmorane =
-let tt := Type@{tt.v} in let ff := Type@{ff.v} in tt -> ff
- : Type@{max(tt.u,ff.u)}
+let tt := Type@{UnivBinders.32} in
+let ff := Type@{UnivBinders.34} in tt -> ff
+ : Type@{max(UnivBinders.31,UnivBinders.33)}
The command has indeed failed with message:
Universe u already bound.
foo@{E M N} =
Type@{M} -> Type@{N} -> Type@{E}
: Type@{max(E+1,M+1,N+1)}
(* E M N |= *)
-
-foo is universe polymorphic
foo@{u UnivBinders.17 v} =
Type@{UnivBinders.17} -> Type@{v} -> Type@{u}
: Type@{max(u+1,UnivBinders.17+1,v+1)}
(* u UnivBinders.17 v |= *)
-
-foo is universe polymorphic
-NonCumulative Inductive Empty@{E} : Type@{E} :=
-NonCumulative Record PWrap (A : Type@{E}) : Type@{E} := pwrap { punwrap : A }
+Inductive Empty@{E} : Type@{E} :=
+(* E |= *)
+Record PWrap (A : Type@{E}) : Type@{E} := pwrap { punwrap : A }
+(* E |= *)
PWrap has primitive projections with eta conversion.
For PWrap: Argument scope is [type_scope]
@@ -113,76 +104,65 @@ The command has indeed failed with message:
This object does not support universe names.
The command has indeed failed with message:
Cannot enforce v < u because u < gU < gV < v
-Monomorphic bind_univs.mono =
+bind_univs.mono =
Type@{bind_univs.mono.u}
: Type@{bind_univs.mono.u+1}
(* {bind_univs.mono.u} |= *)
-
-bind_univs.mono is not universe polymorphic
bind_univs.poly@{u} = Type@{u}
: Type@{u+1}
(* u |= *)
-
-bind_univs.poly is universe polymorphic
insec@{v} = Type@{u} -> Type@{v}
: Type@{max(u+1,v+1)}
(* v |= *)
-
-insec is universe polymorphic
-NonCumulative Inductive insecind@{k} : Type@{k+1} :=
+Inductive insecind@{k} : Type@{k+1} :=
inseccstr : Type@{k} -> insecind@{k}
+(* k |= *)
For inseccstr: Argument scope is [type_scope]
insec@{u v} = Type@{u} -> Type@{v}
: Type@{max(u+1,v+1)}
(* u v |= *)
-
-insec is universe polymorphic
-NonCumulative Inductive insecind@{u k} : Type@{k+1} :=
+Inductive insecind@{u k} : Type@{k+1} :=
inseccstr : Type@{k} -> insecind@{u k}
+(* u k |= *)
For inseccstr: Argument scope is [type_scope]
+insec2@{u} = Prop
+ : Type@{Set+1}
+(* u |= *)
inmod@{u} = Type@{u}
: Type@{u+1}
(* u |= *)
-
-inmod is universe polymorphic
SomeMod.inmod@{u} = Type@{u}
: Type@{u+1}
(* u |= *)
-
-SomeMod.inmod is universe polymorphic
inmod@{u} = Type@{u}
: Type@{u+1}
(* u |= *)
-
-inmod is universe polymorphic
Applied.infunct@{u v} =
inmod@{u} -> Type@{v}
: Type@{max(u+1,v+1)}
(* u v |= *)
-
-Applied.infunct is universe polymorphic
-axfoo@{i UnivBinders.55 UnivBinders.56} :
-Type@{UnivBinders.55} -> Type@{i}
-(* i UnivBinders.55 UnivBinders.56 |= *)
+axfoo@{i UnivBinders.56 UnivBinders.57} :
+Type@{UnivBinders.56} -> Type@{i}
+(* i UnivBinders.56 UnivBinders.57 |= *)
axfoo is universe polymorphic
Argument scope is [type_scope]
Expands to: Constant UnivBinders.axfoo
-axbar@{i UnivBinders.55 UnivBinders.56} :
-Type@{UnivBinders.56} -> Type@{i}
-(* i UnivBinders.55 UnivBinders.56 |= *)
+axbar@{i UnivBinders.56 UnivBinders.57} :
+Type@{UnivBinders.57} -> Type@{i}
+(* i UnivBinders.56 UnivBinders.57 |= *)
axbar is universe polymorphic
Argument scope is [type_scope]
Expands to: Constant UnivBinders.axbar
-axfoo' : Type@{UnivBinders.58} -> Type@{axbar'.i}
+axfoo' : Type@{axbar'.u0} -> Type@{axbar'.i}
axfoo' is not universe polymorphic
Argument scope is [type_scope]
Expands to: Constant UnivBinders.axfoo'
-axbar' : Type@{UnivBinders.58} -> Type@{axbar'.i}
+axbar' : Type@{axbar'.u0} -> Type@{axbar'.i}
axbar' is not universe polymorphic
Argument scope is [type_scope]
diff --git a/test-suite/output/UnivBinders.v b/test-suite/output/UnivBinders.v
index 56474a0723..582a5e969a 100644
--- a/test-suite/output/UnivBinders.v
+++ b/test-suite/output/UnivBinders.v
@@ -1,4 +1,5 @@
-(* coq-prog-args: ("-top" "UnivBinders") *)
+(* -*- coq-prog-args: ("-top" "UnivBinders"); -*- *)
+
Set Universe Polymorphism.
Set Printing Universes.
(* Unset Strict Universe Declaration. *)
@@ -73,19 +74,10 @@ Module SecLet.
(* Fail Let foo@{} := Type@{u}. (* doesn't parse: Let foo@{...} doesn't exist *) *)
Unset Strict Universe Declaration.
Let tt : Type@{u} := Type@{v}. (* names disappear in the ether *)
- Let ff : Type@{u}. Proof. exact Type@{v}. Qed. (* if Set Universe Polymorphism: universes are named ff.u and ff.v. Otherwise names disappear into space *)
+ Let ff : Type@{u}. Proof. exact Type@{v}. Qed. (* names disappear into space *)
Definition bobmorane := tt -> ff.
End foo.
- Print bobmorane. (*
- bobmorane@{UnivBinders.15 UnivBinders.16 ff.u ff.v} =
- let tt := Type@{UnivBinders.16} in let ff := Type@{ff.v} in tt -> ff
- : Type@{max(UnivBinders.15,ff.u)}
- (* UnivBinders.15 UnivBinders.16 ff.u ff.v |= UnivBinders.16 < UnivBinders.15
- ff.v < ff.u
- *)
-
- bobmorane is universe polymorphic
- *)
+ Print bobmorane.
End SecLet.
(* fun x x => foo is nonsense with local binders *)
@@ -130,6 +122,12 @@ End SomeSec.
Print insec.
Print insecind.
+Section SomeSec2.
+ Universe u.
+ Definition insec2@{} := Prop.
+End SomeSec2.
+Print insec2.
+
Module SomeMod.
Definition inmod@{u} := Type@{u}.
Print inmod.
diff --git a/test-suite/output/UsePluginWarning.v b/test-suite/output/UsePluginWarning.v
index c6e0054641..618b8fd42f 100644
--- a/test-suite/output/UsePluginWarning.v
+++ b/test-suite/output/UsePluginWarning.v
@@ -1,5 +1,4 @@
-(* -*- mode: coq; coq-prog-args: ("-emacs" "-w" "-extraction-logical-axiom") -*- *)
-
+(* -*- mode: coq; coq-prog-args: ("-w" "-extraction-logical-axiom") -*- *)
Require Extraction.
Axiom foo : Prop.
diff --git a/test-suite/output/Warnings.v b/test-suite/output/Warnings.v
index 7465442cab..0eb5db1733 100644
--- a/test-suite/output/Warnings.v
+++ b/test-suite/output/Warnings.v
@@ -1,5 +1,5 @@
(* Term in warning was not printed in the right environment at some time *)
-Record A := { B:Type; b:B->B }.
+#[universes(template)] Record A := { B:Type; b:B->B }.
Definition a B := {| B:=B; b:=fun x => x |}.
Canonical Structure a.
diff --git a/test-suite/output/bug5778.v b/test-suite/output/bug5778.v
index 0dcd76aeff..441e87af84 100644
--- a/test-suite/output/bug5778.v
+++ b/test-suite/output/bug5778.v
@@ -1,3 +1,4 @@
+Set Ltac Backtrace.
Ltac a _ := pose (I : I).
Ltac b _ := a ().
Ltac abs _ := abstract b ().
diff --git a/test-suite/output/bug6404.v b/test-suite/output/bug6404.v
index bbe6b1a00f..d9e5e20b66 100644
--- a/test-suite/output/bug6404.v
+++ b/test-suite/output/bug6404.v
@@ -1,3 +1,4 @@
+Set Ltac Backtrace.
Ltac a _ := pose (I : I).
Ltac b _ := a ().
Ltac abs _ := transparent_abstract b ().
diff --git a/test-suite/output/inference.v b/test-suite/output/inference.v
index 57a4739e9f..209fedc343 100644
--- a/test-suite/output/inference.v
+++ b/test-suite/output/inference.v
@@ -21,6 +21,6 @@ Print P.
(* Note: exact numbers of evars are not important... *)
-Inductive T (n:nat) : Type := A : T n.
+#[universes(template)] Inductive T (n:nat) : Type := A : T n.
Check fun n (y:=A n:T n) => _ _ : T n.
Check fun n => _ _ : T n.
diff --git a/test-suite/output/ltac.v b/test-suite/output/ltac.v
index 40e743c3f0..fcd5dd05f0 100644
--- a/test-suite/output/ltac.v
+++ b/test-suite/output/ltac.v
@@ -1,3 +1,5 @@
+Set Ltac Backtrace.
+
(* This used to refer to b instead of z sometimes between 8.4 and 8.5beta3 *)
Goal True.
Fail let T := constr:((fun a b : nat => a+b) 1 1) in
diff --git a/test-suite/output/ltac_missing_args.v b/test-suite/output/ltac_missing_args.v
index 91331a1de5..e30c97aac6 100644
--- a/test-suite/output/ltac_missing_args.v
+++ b/test-suite/output/ltac_missing_args.v
@@ -1,3 +1,5 @@
+Set Ltac Backtrace.
+
Ltac foo x := idtac x.
Ltac bar x := fun y _ => idtac x y.
Ltac baz := foo.
diff --git a/test-suite/output/relaxed_ambiguous_paths.out b/test-suite/output/relaxed_ambiguous_paths.out
new file mode 100644
index 0000000000..2a7ce806d7
--- /dev/null
+++ b/test-suite/output/relaxed_ambiguous_paths.out
@@ -0,0 +1,33 @@
+File "stdin", line 10, characters 0-28:
+Warning: Ambiguous paths: [ac; cd] : A >-> D [ambiguous-paths,typechecker]
+[ab] : A >-> B
+[ab; bd] : A >-> D
+[ac] : A >-> C
+[bd] : B >-> D
+[cd] : C >-> D
+[B_A] : B >-> A
+[C_A] : C >-> A
+[D_B] : D >-> B
+[D_A] : D >-> A
+[D_C] : D >-> C
+[A'_A] : A' >-> A
+[B_A'] : B >-> A'
+[B_A'; A'_A] : B >-> A
+[C_A'] : C >-> A'
+[C_A'; A'_A] : C >-> A
+[D_B; B_A'] : D >-> A'
+[D_A] : D >-> A
+[D_B] : D >-> B
+[D_C] : D >-> C
+File "stdin", line 103, characters 0-86:
+Warning: Ambiguous paths: [D_C; C_A'] : D >-> A'
+[ambiguous-paths,typechecker]
+[A'_A] : A' >-> A
+[B_A'] : B >-> A'
+[B_A'; A'_A] : B >-> A
+[C_A'] : C >-> A'
+[C_A'; A'_A] : C >-> A
+[D_B; B_A'] : D >-> A'
+[D_A] : D >-> A
+[D_B] : D >-> B
+[D_C] : D >-> C
diff --git a/test-suite/output/relaxed_ambiguous_paths.v b/test-suite/output/relaxed_ambiguous_paths.v
new file mode 100644
index 0000000000..a4af27539c
--- /dev/null
+++ b/test-suite/output/relaxed_ambiguous_paths.v
@@ -0,0 +1,109 @@
+Module test1.
+Section test1.
+
+Variable (A B C D : Type).
+Variable (ab : A -> B) (bd : B -> D) (ac : A -> C) (cd : C -> D).
+
+Local Coercion ab : A >-> B.
+Local Coercion bd : B >-> D.
+Local Coercion ac : A >-> C.
+Local Coercion cd : C >-> D.
+
+Print Graph.
+
+End test1.
+End test1.
+
+Module test2.
+Section test2.
+Variable (A : Type) (P Q : A -> Prop).
+
+Record B := {
+ B_A : A;
+ B_P : P B_A }.
+
+Record C := {
+ C_A : A;
+ C_Q : Q C_A }.
+
+Record D := {
+ D_A : A;
+ D_P : P D_A;
+ D_Q : Q D_A }.
+
+Local Coercion B_A : B >-> A.
+Local Coercion C_A : C >-> A.
+Local Coercion D_A : D >-> A.
+Local Coercion D_B (d : D) : B := Build_B (D_A d) (D_P d).
+Local Coercion D_C (d : D) : C := Build_C (D_A d) (D_Q d).
+
+Print Graph.
+
+End test2.
+End test2.
+
+Module test3.
+Section test3.
+
+Variable (A : Type) (P Q : A -> Prop).
+
+Definition A' (x : bool) := A.
+
+Record B (x : bool) := {
+ B_A' : A' x;
+ B_P : P B_A' }.
+
+Record C (x : bool) := {
+ C_A' : A' x;
+ C_Q : Q C_A' }.
+
+Record D := {
+ D_A : A;
+ D_P : P D_A;
+ D_Q : Q D_A }.
+
+Local Coercion A'_A (x : bool) (a : A' x) : A := a.
+Local Coercion B_A' : B >-> A'.
+Local Coercion C_A' : C >-> A'.
+Local Coercion D_A : D >-> A.
+Local Coercion D_B (d : D) : B false := Build_B false (D_A d) (D_P d).
+Local Coercion D_C (d : D) : C true := Build_C true (D_A d) (D_Q d).
+
+Print Graph.
+
+End test3.
+End test3.
+
+Module test4.
+Section test4.
+
+Variable (A : Type) (P Q : A -> Prop).
+
+Record A' (x : bool) := { A'_A : A }.
+
+Record B (x : bool) := {
+ B_A' : A' x;
+ B_P : P (A'_A x B_A') }.
+
+Record C (x : bool) := {
+ C_A' : A' x;
+ C_Q : Q (A'_A x C_A') }.
+
+Record D := {
+ D_A : A;
+ D_P : P D_A;
+ D_Q : Q D_A }.
+
+Local Coercion A'_A : A' >-> A.
+Local Coercion B_A' : B >-> A'.
+Local Coercion C_A' : C >-> A'.
+Local Coercion D_A : D >-> A.
+Local Coercion D_B (d : D) : B false :=
+ Build_B false (Build_A' false (D_A d)) (D_P d).
+Local Coercion D_C (d : D) : C true :=
+ Build_C true (Build_A' true (D_A d)) (D_Q d).
+
+Print Graph.
+
+End test4.
+End test4.
diff --git a/test-suite/output/simpl.v b/test-suite/output/simpl.v
index 5f1926f142..5f7e3ab9dd 100644
--- a/test-suite/output/simpl.v
+++ b/test-suite/output/simpl.v
@@ -11,3 +11,4 @@ Undo.
simpl (0 + _).
Show.
Undo.
+Abort.
diff --git a/test-suite/output/sint63Notation.out b/test-suite/output/sint63Notation.out
new file mode 100644
index 0000000000..9d325b38c7
--- /dev/null
+++ b/test-suite/output/sint63Notation.out
@@ -0,0 +1,24 @@
+ = 0
+ : uint
+ = 1
+ : uint
+ = 9223372036854775807
+ : uint
+let v := 0 in v : uint
+ : uint
+let v := 1 in v : uint
+ : uint
+let v := 9223372036854775807 in v : uint
+ : uint
+ = 0
+ : sint
+ = 1
+ : sint
+ = -1
+ : sint
+let v := 0 in v : sint
+ : sint
+let v := 1 in v : sint
+ : sint
+let v := -1 in v : sint
+ : sint
diff --git a/test-suite/output/sint63Notation.v b/test-suite/output/sint63Notation.v
new file mode 100644
index 0000000000..331d74ed3d
--- /dev/null
+++ b/test-suite/output/sint63Notation.v
@@ -0,0 +1,37 @@
+From Coq
+Require Import Int63.
+Import ZArith.
+
+Declare Scope uint_scope.
+Declare Scope sint_scope.
+Delimit Scope uint_scope with uint.
+Delimit Scope sint_scope with sint.
+
+Record uint := wrapu { unwrapu : int }.
+Record sint := wraps { unwraps : int }.
+
+Definition uof_Z (v : Z) := wrapu (of_Z v).
+Definition uto_Z (v : uint) := to_Z (unwrapu v).
+
+Definition sof_Z (v : Z) := wraps (of_Z (v mod (2 ^ 31))).
+Definition as_signed (bw : Z) (v : Z) :=
+ (((2 ^ (bw - 1) + v) mod (2 ^ bw)) - 2 ^ (bw - 1))%Z.
+
+Definition sto_Z (v : sint) := as_signed 31 (to_Z (unwraps v)).
+Numeral Notation uint uof_Z uto_Z : uint_scope.
+Numeral Notation sint sof_Z sto_Z : sint_scope.
+Open Scope uint_scope.
+Compute uof_Z 0.
+Compute uof_Z 1.
+Compute uof_Z (-1).
+Check let v := 0 in v : uint.
+Check let v := 1 in v : uint.
+Check let v := -1 in v : uint.
+Close Scope uint_scope.
+Open Scope sint_scope.
+Compute sof_Z 0.
+Compute sof_Z 1.
+Compute sof_Z (-1).
+Check let v := 0 in v : sint.
+Check let v := 1 in v : sint.
+Check let v := -1 in v : sint.
diff --git a/test-suite/output/ssr_clear.out b/test-suite/output/ssr_clear.out
index 1515954060..1a0f90493e 100644
--- a/test-suite/output/ssr_clear.out
+++ b/test-suite/output/ssr_clear.out
@@ -1,3 +1,2 @@
The command has indeed failed with message:
-Ltac call to "move (ssrmovearg) (ssrclauses)" failed.
No assumption is named NO_SUCH_NAME
diff --git a/test-suite/output/ssr_explain_match.out b/test-suite/output/ssr_explain_match.out
index 32cfb354bf..0f68ab0b02 100644
--- a/test-suite/output/ssr_explain_match.out
+++ b/test-suite/output/ssr_explain_match.out
@@ -51,5 +51,4 @@ instance: (addnC y x) matches: (x + y)
instance: (addnC y x) matches: (x + y)
END INSTANCES
The command has indeed failed with message:
-Ltac call to "ssrinstancesoftpat (cpattern)" failed.
Not supported
diff --git a/test-suite/output/unifconstraints.v b/test-suite/output/unifconstraints.v
index 179dec3fb0..c987d66c5f 100644
--- a/test-suite/output/unifconstraints.v
+++ b/test-suite/output/unifconstraints.v
@@ -1,3 +1,4 @@
+(* -*- coq-prog-args: ("-async-proofs" "no") -*- *)
(* Set Printing Existential Instances. *)
Unset Solve Unification Constraints.
Axiom veeryyyyyyyyyyyyloooooooooooooonggidentifier : nat.
diff --git a/test-suite/report.sh b/test-suite/report.sh
index 05f39b4b02..5b74bee0c7 100755
--- a/test-suite/report.sh
+++ b/test-suite/report.sh
@@ -11,11 +11,8 @@ SAVEDIR="logs"
rm -rf "$SAVEDIR"
mkdir "$SAVEDIR"
-# keep this synced with test-suite/Makefile
-FAILMARK="==========> FAILURE <=========="
-
FAILED=$(mktemp /tmp/coq-check-XXXXXX)
-find . '(' -path ./bugs/opened -prune ')' -o '(' -name '*.log' -exec grep "$FAILMARK" -q '{}' ';' -print0 ')' > "$FAILED"
+find . '(' -name '*.log' -exec grep -q -F "Error!" '{}' ';' -print0 ')' > "$FAILED"
rsync -a --from0 --files-from="$FAILED" . "$SAVEDIR"
cp summary.log "$SAVEDIR"/
@@ -24,28 +21,19 @@ cp summary.log "$SAVEDIR"/
rm "$FAILED"
# print info
-if [ -n "$TRAVIS" ] || [ -n "$PRINT_LOGS" ]; then
+if [ -n "$APPVEYOR" ] || [ -n "$PRINT_LOGS" ]; then
find logs/ -name '*.log' -not -name 'summary.log' -print0 | while IFS= read -r -d '' file; do
- if [ -n "$TRAVIS" ]; then
- # ${foo////.} replaces every / by . in $foo
- printf 'travis_fold:start:coq.logs.%s\n' "${file////.}";
- else printf '%s\n' "$file"
- fi
-
+ printf '%s\n' "$file"
cat "$file"
-
- if [ -n "$TRAVIS" ]; then
- # ${foo////.} replaces every / by . in $foo
- printf 'travis_fold:end:coq.logs.%s\n' "${file////.}";
- else printf '\n'
- fi
+ printf '\n'
done
+ printed_logs=1
fi
if grep -q -F 'Error!' summary.log ; then
echo FAILURES;
grep -F 'Error!' summary.log;
- if [ -z "$TRAVIS" ] && [ -z "$PRINT_LOGS" ]; then
+ if [ -z "$printed_logs" ]; then
echo 'To print details of failed tests, rerun with environment variable PRINT_LOGS=1'
echo 'eg "make report PRINT_LOGS=1" from the test suite directory"'
echo 'See README.md in the test suite directory for more information.'
diff --git a/test-suite/ssr/autoclean.v b/test-suite/ssr/autoclean.v
new file mode 100644
index 0000000000..db80a62259
--- /dev/null
+++ b/test-suite/ssr/autoclean.v
@@ -0,0 +1,4 @@
+Require Import ssreflect.
+
+Lemma view_disappears A B (AB : A -> B) : A -> False.
+Proof. move=> {}/(AB). have := AB. Abort.
diff --git a/test-suite/ssr/case_TC.v b/test-suite/ssr/case_TC.v
new file mode 100644
index 0000000000..78ed374432
--- /dev/null
+++ b/test-suite/ssr/case_TC.v
@@ -0,0 +1,18 @@
+From Coq Require Import ssreflect.
+From Coq Require Import ssrbool.
+
+Set Printing All.
+Set Debug Ssreflect.
+
+Class Class := { sort : Type ; op : sort -> bool }.
+Coercion sort : Class >-> Sortclass.
+Arguments op [_] _.
+
+Section Section.
+ Context (A B: Class) (a: A).
+
+ Goal op a || ~~ op a.
+ by case: op.
+ Abort.
+
+End Section.
diff --git a/test-suite/ssr/case_TC2.v b/test-suite/ssr/case_TC2.v
new file mode 100644
index 0000000000..37504d662d
--- /dev/null
+++ b/test-suite/ssr/case_TC2.v
@@ -0,0 +1,20 @@
+From Coq Require Import Bool ssreflect.
+
+Set Printing All.
+Set Debug Ssreflect.
+
+Class Class := { sort : Type ; op : sort -> bool }.
+Coercion sort : Class >-> Sortclass.
+Arguments op [_] _.
+
+Lemma opP (A: Class) (a: A) : reflect True (op a).
+Proof. Admitted.
+
+Section Section.
+ Context (A B: Class) (a: A).
+
+ Goal is_true (op a).
+ by case: opP.
+ Abort.
+
+End Section.
diff --git a/test-suite/ssr/case_TC3.v b/test-suite/ssr/case_TC3.v
new file mode 100644
index 0000000000..92e166e85d
--- /dev/null
+++ b/test-suite/ssr/case_TC3.v
@@ -0,0 +1,21 @@
+From Coq Require Import Utf8 Bool ssreflect.
+
+Set Printing All.
+Set Debug Ssreflect.
+
+Class Class sort := { op : sort → bool }.
+Arguments op {_ _}.
+Hint Mode Class !.
+
+Lemma opP A (C: Class A) (a: A) : reflect True (op a).
+Proof. Admitted.
+Arguments op {_ _}.
+
+Section Section.
+ Context A B (CA : Class A) (CB : Class B) (a: A).
+
+ Goal is_true (op a).
+ by case: opP.
+ Abort.
+
+End Section.
diff --git a/test-suite/ssr/elim.v b/test-suite/ssr/elim.v
index 908249a369..720f4f6607 100644
--- a/test-suite/ssr/elim.v
+++ b/test-suite/ssr/elim.v
@@ -33,7 +33,7 @@ Qed.
(* The same but without names for variables involved in the generated eq *)
Lemma testL3 : forall A (s : seq A), s = s.
Proof.
-move=> A s; elim branch: s; move: (s) => _.
+move=> A s; elim branch: s.
match goal with _ : _ = [::] |- [::] = [::] => move: branch => // | _ => fail end.
move=> _; match goal with _ : _ = _ :: _ |- _ :: _ = _ :: _ => move: branch => // | _ => fail end.
Qed.
diff --git a/test-suite/ssr/elim_noquant.v b/test-suite/ssr/elim_noquant.v
new file mode 100644
index 0000000000..e6662203e9
--- /dev/null
+++ b/test-suite/ssr/elim_noquant.v
@@ -0,0 +1,29 @@
+Require Import ssreflect.
+
+
+Axiom app : forall T, list T -> list T -> list T.
+Arguments app {_}.
+Infix "++" := app.
+
+Lemma test (aT rT : Type)
+ (pmap : (aT -> option rT) -> list aT -> list rT)
+ (perm_eq : list rT -> list rT -> Prop)
+ (f : aT -> option rT)
+ (g : rT -> aT)
+ (s t : list aT)
+ (E : forall T : list aT -> Type,
+ (forall s1 s2 s3 : list aT,
+ T (s1 ++ s2 ++ s3) -> T (s2 ++ s1 ++ s3)) ->
+ T s -> T t) :
+ perm_eq (pmap f s) (pmap f t).
+Proof.
+elim/E: (t).
+Admitted.
+
+
+Lemma test2 (a b : nat) : a = b -> b = 1.
+Proof.
+elim.
+match goal with |- a = 1 => idtac end.
+Admitted.
+
diff --git a/test-suite/ssr/ipat_clear_if_id.v b/test-suite/ssr/ipat_clear_if_id.v
index 7a44db2ea0..cc087a62ad 100644
--- a/test-suite/ssr/ipat_clear_if_id.v
+++ b/test-suite/ssr/ipat_clear_if_id.v
@@ -8,6 +8,7 @@ Variable v2 : nat -> bool.
Lemma test (v3 : nat -> bool) (v4 : bool -> bool) (v5 : bool -> bool) : nat -> nat -> nat -> nat -> True.
Proof.
+Set Debug Ssreflect.
move=> {}/v1 b1 {}/v2 b2 {}/v3 b3 {}/v2/v4/v5 b4.
Check b1 : bool.
Check b2 : bool.
@@ -20,4 +21,12 @@ Check v2 : nat -> bool.
by [].
Qed.
+Lemma test2 (v : True <-> False) : True -> False.
+Proof.
+move=> {}/v.
+Fail Check v.
+by [].
+Qed.
+
+
End Foo.
diff --git a/test-suite/ssr/ipat_fast_any.v b/test-suite/ssr/ipat_fast_any.v
new file mode 100644
index 0000000000..a50984c7c0
--- /dev/null
+++ b/test-suite/ssr/ipat_fast_any.v
@@ -0,0 +1,21 @@
+Require Import ssreflect.
+
+Goal forall y x : nat, x = y -> x = x.
+Proof.
+move=> + > ->. match goal with |- forall y, y = y => by [] end.
+Qed.
+
+Goal forall y x : nat, le x y -> x = y.
+Proof.
+move=> > [|].
+ by [].
+match goal with |- forall a, _ <= a -> _ = S a => admit end.
+Admitted.
+
+Goal forall y x : nat, le x y -> x = y.
+Proof.
+move=> y x.
+case E: x => >.
+ admit.
+match goal with |- S _ <= y -> S _ = y => admit end.
+Admitted.
diff --git a/test-suite/ssr/ipat_fastid.v b/test-suite/ssr/ipat_fastid.v
new file mode 100644
index 0000000000..b0985a0d2f
--- /dev/null
+++ b/test-suite/ssr/ipat_fastid.v
@@ -0,0 +1,48 @@
+Require Import ssreflect.
+
+Axiom odd : nat -> Prop.
+
+Lemma simple :
+ forall x, 3 <= x -> forall y, odd (y+x) -> x = y -> True.
+Proof.
+move=> >x_ge_3 >xy_odd.
+lazymatch goal with
+| |- ?x = ?y -> True => done
+end.
+Qed.
+
+Lemma simple2 :
+ forall x, 3 <= x -> forall y, odd (y+x) -> x = y -> True.
+Proof.
+move=> >; move=>x_ge_3; move=> >; move=>xy_odd.
+lazymatch goal with
+| |- ?x = ?y -> True => done
+end.
+Qed.
+
+
+Definition stuff x := 3 <= x -> forall y, odd (y+x) -> x = y -> True.
+
+Lemma harder : forall x, stuff x.
+Proof.
+move=> >x_ge_3 >xy_odd.
+lazymatch goal with
+| |- ?x = ?y -> True => done
+end.
+Qed.
+
+Lemma harder2 : forall x, stuff x.
+Proof.
+move=> >; move=>x_ge_3;move=> >; move=>xy_odd.
+lazymatch goal with
+| |- ?x = ?y -> True => done
+end.
+Qed.
+
+Lemma homotop : forall x : nat, forall e : x = x, e = e -> True.
+Proof.
+move=> >eq_ee.
+lazymatch goal with
+| |- True => done
+end.
+Qed.
diff --git a/test-suite/ssr/ipat_replace.v b/test-suite/ssr/ipat_replace.v
new file mode 100644
index 0000000000..528f33f30d
--- /dev/null
+++ b/test-suite/ssr/ipat_replace.v
@@ -0,0 +1,17 @@
+Require Import ssreflect.
+
+Lemma test : True.
+Proof.
+have H : True.
+ by [].
+have {}H : True.
+ by apply: H.
+by apply: H.
+Qed.
+
+Lemma test2 (H : True) : False -> False -> False.
+Proof.
+move=> {}W.
+move=> {}H.
+by apply: H.
+Qed.
diff --git a/test-suite/ssr/ipat_seed.v b/test-suite/ssr/ipat_seed.v
new file mode 100644
index 0000000000..e418d66917
--- /dev/null
+++ b/test-suite/ssr/ipat_seed.v
@@ -0,0 +1,60 @@
+Require Import ssreflect.
+
+Section foo.
+
+Variable A : Type.
+
+Record bar (X : Type) := mk_bar {
+ a : X * A;
+ b : A;
+ c := (a,7);
+ _ : X;
+ _ : X
+}.
+
+Inductive baz (X : Type) (Y : Type) : nat -> Type :=
+| K1 x (e : 0=1) (f := 3) of x=x:>X : baz X Y O
+| K2 n of n=n & baz X nat 0 : baz X Y (n+1).
+
+Axiom Q : nat -> Prop.
+Axiom Qx : forall x, Q x.
+Axiom my_ind :
+ forall P : nat -> Prop, P O -> (forall n m (w : P n /\ P m), P (n+m)) ->
+ forall w, P w.
+
+Lemma test x : bar nat -> baz nat nat x -> forall n : nat, Q n.
+Proof.
+
+(* record *)
+move => [^~ _ccc ].
+Check (refl_equal _ : c_ccc = (a_ccc, 7)).
+
+(* inductive *)
+move=> [^ xxx_ ].
+Check (refl_equal _ : xxx_f = 3).
+ by [].
+Check (refl_equal _ : xxx_n = xxx_n).
+
+(* eliminator *)
+elim/my_ind => [^ wow_ ].
+ exact: Qx 0.
+Check (wow_w : Q wow_n /\ Q wow_m).
+exact: Qx (wow_n + wow_m).
+
+Qed.
+
+Arguments mk_bar A x y z w : rename.
+Arguments K1 A B a b c : rename.
+
+
+Lemma test2 x : bar nat -> baz nat nat x -> forall n : nat, Q n.
+Proof.
+move=> [^~ _ccc ].
+Check (refl_equal _ : c_ccc = (x_ccc, 7)).
+move=> [^ xxx_ ].
+Check (refl_equal _ : xxx_f = 3).
+ by [].
+Check (refl_equal _ : xxx_n = xxx_n).
+Abort.
+
+End foo.
diff --git a/test-suite/ssr/ipat_tac.v b/test-suite/ssr/ipat_tac.v
new file mode 100644
index 0000000000..cfef2e37be
--- /dev/null
+++ b/test-suite/ssr/ipat_tac.v
@@ -0,0 +1,38 @@
+Require Import ssreflect.
+
+Ltac fancy := case; last first.
+
+Notation fancy := (ltac:( fancy )).
+
+Ltac replicate n :=
+ let what := fresh "_replicate_" in
+ move=> what; do n! [ have := what ]; clear what.
+
+Notation replicate n := (ltac:( replicate n )).
+
+Lemma foo x (w : nat) (J : bool -> nat -> nat) : exists y, x=0+y.
+Proof.
+move: (w) => /ltac:(idtac) _.
+move: w => /(replicate 6) w1 w2 w3 w4 w5 w6.
+move: w1 => /J/fancy [w'||];last exact: false.
+ move: w' => /J/fancy[w''||]; last exact: false.
+ by exists x.
+ by exists x.
+by exists x.
+Qed.
+
+Ltac unfld what := rewrite /what.
+
+Notation "% n" := (ltac:( unfld n )) (at level 0) : ssripat_scope.
+Notation "% n" := n : nat_scope.
+
+Open Scope nat_scope.
+
+
+Definition def := 4.
+
+Lemma test : True -> def = 4.
+Proof.
+move=> _ /(% def).
+match goal with |- 4 = 4 => reflexivity end.
+Qed.
diff --git a/test-suite/ssr/ipat_tmp.v b/test-suite/ssr/ipat_tmp.v
new file mode 100644
index 0000000000..5f5421ac74
--- /dev/null
+++ b/test-suite/ssr/ipat_tmp.v
@@ -0,0 +1,22 @@
+Require Import ssreflect ssrbool.
+
+ Axiom eqn : nat -> nat -> bool.
+ Infix "==" := eqn (at level 40).
+ Axiom eqP : forall x y : nat, reflect (x = y) (x == y).
+
+ Lemma test1 :
+ forall x y : nat, x = y -> forall z : nat, y == z -> x = z.
+ Proof.
+ by move=> x y + z /eqP <-; apply.
+ Qed.
+
+ Lemma test2 : forall (x y : nat) (e : x = y), e = e -> x = y.
+ Proof.
+ move=> + y + _ => x def_x; exact: (def_x : x = y).
+ Qed.
+
+ Lemma test3 :
+ forall x y : nat, x = y -> forall z : nat, y == z -> x = z.
+ Proof.
+ move=> ++++ /eqP <- => x y e z; exact: e.
+ Qed.
diff --git a/test-suite/ssr/misc_extended.v b/test-suite/ssr/misc_extended.v
new file mode 100644
index 0000000000..81c86f1af4
--- /dev/null
+++ b/test-suite/ssr/misc_extended.v
@@ -0,0 +1,83 @@
+Require Import ssreflect.
+
+Require Import List.
+
+Lemma test_elim_pattern_1 : forall A (l:list A), l ++ nil = l.
+Proof.
+intros A.
+elim/list_ind => [^~ 1 ].
+ by [].
+match goal with |- (a1 :: l1) ++ nil = a1 :: l1 => idtac end.
+Abort.
+
+Lemma test_elim_pattern_2 : forall A (l:list A), l ++ nil = l.
+Proof.
+intros. elim: l => [^~ 1 ].
+ by [].
+match goal with |- (a1 :: l1) ++ nil = a1 :: l1 => idtac end.
+Abort.
+
+Lemma test_elim_pattern_3 : forall A (l:list A), l ++ nil = l.
+Proof.
+intros. elim: l => [ | x l' IH ].
+ by [].
+match goal with |- (x :: l') ++ nil = x :: l' => idtac end.
+Abort.
+
+
+Generalizable Variables A.
+
+Class Inhab (A:Type) : Type :=
+ { arbitrary : A }.
+
+Lemma test_intro_typeclass_1 : forall A `{Inhab A} (l1 l2:list A), l2 = nil -> l1 ++ l2 = l1.
+Proof.
+move =>> H.
+ match goal with |- _ = _ => idtac end.
+Abort.
+
+Lemma test_intro_typeclass_2 : forall A `{Inhab A} (x:A), x = arbitrary -> x = arbitrary.
+Proof.
+move =>> H.
+ match goal with |- _ = _ => idtac end.
+Abort.
+
+Lemma test_intro_temporary_1 : forall A (l1 l2:list A), l2 = nil -> l1 ++ l2 = l1.
+Proof.
+move => A + l2.
+ match goal with |- forall l1, l2 = nil -> l1 ++ l2 = l1 => idtac end.
+Abort.
+
+Lemma test_intro_temporary_2 : forall A `{Inhab A} (l1 l2:list A), l2 = nil -> l1 ++ l2 = l1.
+Proof.
+move => > E.
+ match goal with |- _ = _ => idtac end.
+Abort.
+
+Lemma test_dispatch : (forall x:nat, x= x )/\ (forall y:nat, y = y).
+Proof.
+intros. split => [ a | b ].
+ match goal with |- a = a => by [] end.
+match goal with |- b = b => by [] end.
+Abort.
+
+Lemma test_tactics_as_view_1 : forall A (l1:list A), nil ++ l1 = l1.
+Proof.
+move => /ltac:(simpl).
+Abort.
+
+Lemma test_tactics_as_view_2 : forall A, (forall (l1:list A), nil ++ l1 = l1) /\ (nil ++ nil = @nil A).
+Proof.
+move => A.
+(* TODO: I want to do [split =>.] as a temporary step in setting up my script,
+ but this syntax does not seem to be supported. Can't we have an empty ipat?
+ Note that I can do [split => [ | ]]*)
+split => [| /ltac:(simpl)].
+Abort.
+
+Notation "%%" := (ltac:(simpl)) : ssripat_scope.
+
+Lemma test_tactics_as_view_3 : forall A, (forall (l1:list A), nil ++ l1 = l1) /\ (nil ++ nil = @nil A).
+Proof.
+move => /ltac:(split) [ | /%% ].
+Abort.
diff --git a/test-suite/ssr/misc_tc.v b/test-suite/ssr/misc_tc.v
new file mode 100644
index 0000000000..4db45b743a
--- /dev/null
+++ b/test-suite/ssr/misc_tc.v
@@ -0,0 +1,30 @@
+Require Import ssreflect List.
+
+Generalizable Variables A B.
+
+Class Inhab (A:Type) : Type :=
+ { arbitrary : A }.
+
+Lemma test_intro_typeclass_1 : forall A `{Inhab A} (x:A), x = arbitrary -> x = arbitrary.
+Proof.
+move =>> H. (* introduces [H:x=arbitrary] because first non dependent hypothesis *)
+Abort.
+
+Lemma test_intro_typeclass_2 : forall A `{Inhab A} (l1 l2:list A), l2 = nil -> l1 ++ l2 = l1.
+Proof.
+move =>> H. (* introduces [Inhab A] automatically because it is a typeclass instance *)
+Abort.
+
+Lemma test_intro_typeclass_3 : forall `{Inhab A, Inhab B} (x:A) (y:B), True -> x = x.
+Proof. (* Above types [A] and [B] are implicitly quantified *)
+move =>> y H. (* introduces the two typeclass instances automatically *)
+Abort.
+
+Class Foo `{Inhab A} : Type :=
+ { foo : A }.
+
+Lemma test_intro_typeclass_4 : forall `{Foo A}, True -> True.
+Proof. (* Above, [A] and [{Inhab A}] are implicitly quantified *)
+move =>> H. (* introduces [A] and [Inhab A] because they are dependently used,
+ and introduce [Foo A] automatically because it is an instance. *)
+Abort.
diff --git a/test-suite/stm/arg_filter_1.v b/test-suite/stm/arg_filter_1.v
new file mode 100644
index 0000000000..ed87d67405
--- /dev/null
+++ b/test-suite/stm/arg_filter_1.v
@@ -0,0 +1,4 @@
+(* coq-prog-args: ("-async-proofs-tac-j" "1") *)
+
+Lemma foo (A B : Prop) n : n + 0 = n /\ (A -> B -> A).
+Proof. split. par: now auto. Qed.
diff --git a/test-suite/stm/classify_set_proof_mode_9093.v b/test-suite/stm/classify_set_proof_mode_9093.v
new file mode 100644
index 0000000000..d3f73ff435
--- /dev/null
+++ b/test-suite/stm/classify_set_proof_mode_9093.v
@@ -0,0 +1,9 @@
+(* -*- coq-prog-args: ("-async-proofs" "on" "-noinit"); -*- *)
+
+Declare ML Module "ltac_plugin".
+
+Set Default Proof Mode "Classic".
+
+Goal Prop.
+ idtac.
+Abort.
diff --git a/test-suite/stm/delayed_restrict_univs_9093.v b/test-suite/stm/delayed_restrict_univs_9093.v
new file mode 100644
index 0000000000..6ca36da4b0
--- /dev/null
+++ b/test-suite/stm/delayed_restrict_univs_9093.v
@@ -0,0 +1,10 @@
+(* -*- coq-prog-args: ("-async-proofs" "on"); -*- *)
+
+Unset Universe Polymorphism.
+
+Ltac exact0 := let x := constr:(Type) in exact 0.
+
+Lemma lemma_restrict_abstract@{} : (nat * nat)%type.
+Proof. split;[exact 0|abstract exact0]. Qed.
+(* Debug: 10237:proofworker:0:0 STM: sending back a fat state
+Error: Universe {polymorphism.1} is unbound. *)
diff --git a/test-suite/success/AdvancedTypeClasses.v b/test-suite/success/AdvancedTypeClasses.v
index d0aa5c8578..0253ec46e4 100644
--- a/test-suite/success/AdvancedTypeClasses.v
+++ b/test-suite/success/AdvancedTypeClasses.v
@@ -71,7 +71,7 @@ Variable Inhabited: term -> Prop.
Variable Inhabited_correct: forall `{interp_pair p}, Inhabited (repr p) -> p.
Lemma L : Prop * A -> bool * (Type -> Set) .
-apply (Inhabited_correct _ _).
+apply Inhabited_correct.
change (Inhabited (Fun (Prod PROP (Var A)) (Prod Bool (Fun TYPE SET)))).
Admitted.
diff --git a/test-suite/success/Cases.v b/test-suite/success/Cases.v
index 52fe98ac07..232ac17cbf 100644
--- a/test-suite/success/Cases.v
+++ b/test-suite/success/Cases.v
@@ -1873,3 +1873,12 @@ Check match niln in listn O return O=O with niln => eq_refl end.
(* (was failing up to May 2017) *)
Check fun x => match x with (y,z) as t as w => (y+z,t) = (0,w) end.
+
+(* A test about binding variables of "in" clause of "match" *)
+(* (was failing from 8.5 to Dec 2018) *)
+
+Check match O in nat return nat with O => O | _ => O end.
+
+(* Checking that aliases are substituted in the correct order *)
+
+Check match eq_refl (1,0) in _ = (y as z, y' as z) return z = z with eq_refl => eq_refl end : 0=0.
diff --git a/test-suite/success/Compat88.v b/test-suite/success/Compat88.v
index e2045900d5..1233a4b8f5 100644
--- a/test-suite/success/Compat88.v
+++ b/test-suite/success/Compat88.v
@@ -4,7 +4,7 @@
Require Coq.Strings.Ascii Coq.Strings.String.
Require Coq.ZArith.BinIntDef Coq.PArith.BinPosDef Coq.NArith.BinNatDef.
Require Coq.Reals.Rdefinitions.
-Require Coq.Numbers.Cyclic.Int31.Cyclic31.
+Require Coq.Numbers.Cyclic.Int63.Cyclic63.
Require Import Coq.Compat.Coq88. (* XXX FIXME Should not need [Require], see https://github.com/coq/coq/issues/8311 *)
@@ -15,4 +15,4 @@ Check BinNat.N.eqb 1 1.
Check BinInt.Z.eqb 1 1.
Check BinPos.Pos.eqb 1 1.
Check Rdefinitions.Rplus 1 1.
-Check Int31.iszero 1.
+Check Int63.is_zero 1.
diff --git a/test-suite/success/CompatCurrentFlag.v b/test-suite/success/CompatCurrentFlag.v
index 5650dba236..81469d79c3 100644
--- a/test-suite/success/CompatCurrentFlag.v
+++ b/test-suite/success/CompatCurrentFlag.v
@@ -1,3 +1,3 @@
-(* -*- coq-prog-args: ("-compat" "8.9") -*- *)
+(* -*- coq-prog-args: ("-compat" "8.10") -*- *)
(** Check that the current compatibility flag actually requires the relevant modules. *)
-Import Coq.Compat.Coq89.
+Import Coq.Compat.Coq810.
diff --git a/test-suite/success/CompatOldFlag.v b/test-suite/success/CompatOldFlag.v
index 37d50ee67d..afeb57f9f2 100644
--- a/test-suite/success/CompatOldFlag.v
+++ b/test-suite/success/CompatOldFlag.v
@@ -1,5 +1,5 @@
-(* -*- coq-prog-args: ("-compat" "8.7") -*- *)
+(* -*- coq-prog-args: ("-compat" "8.8") -*- *)
(** Check that the current-minus-two compatibility flag actually requires the relevant modules. *)
+Import Coq.Compat.Coq810.
Import Coq.Compat.Coq89.
Import Coq.Compat.Coq88.
-Import Coq.Compat.Coq87.
diff --git a/test-suite/success/CompatOldOldFlag.v b/test-suite/success/CompatOldOldFlag.v
new file mode 100644
index 0000000000..1f62635f50
--- /dev/null
+++ b/test-suite/success/CompatOldOldFlag.v
@@ -0,0 +1,6 @@
+(* -*- coq-prog-args: ("-compat" "8.7") -*- *)
+(** Check that the current-minus-three compatibility flag actually requires the relevant modules. *)
+Import Coq.Compat.Coq810.
+Import Coq.Compat.Coq89.
+Import Coq.Compat.Coq88.
+Import Coq.Compat.Coq87.
diff --git a/test-suite/success/CompatPreviousFlag.v b/test-suite/success/CompatPreviousFlag.v
index 9981388381..c8f75915c8 100644
--- a/test-suite/success/CompatPreviousFlag.v
+++ b/test-suite/success/CompatPreviousFlag.v
@@ -1,4 +1,4 @@
-(* -*- coq-prog-args: ("-compat" "8.8") -*- *)
+(* -*- coq-prog-args: ("-compat" "8.9") -*- *)
(** Check that the current-minus-one compatibility flag actually requires the relevant modules. *)
+Import Coq.Compat.Coq810.
Import Coq.Compat.Coq89.
-Import Coq.Compat.Coq88.
diff --git a/test-suite/success/Fixpoint.v b/test-suite/success/Fixpoint.v
index efb32ef6f7..81c9763ccd 100644
--- a/test-suite/success/Fixpoint.v
+++ b/test-suite/success/Fixpoint.v
@@ -50,8 +50,6 @@ End folding.
(* Check definition by tactics *)
-Set Automatic Introduction.
-
Inductive even : nat -> Type :=
| even_O : even 0
| even_S : forall n, odd n -> even (S n)
diff --git a/test-suite/success/Hints.v b/test-suite/success/Hints.v
index ebf5b094e1..2f13b7c225 100644
--- a/test-suite/success/Hints.v
+++ b/test-suite/success/Hints.v
@@ -169,7 +169,7 @@ Proof.
Hint Cut [_* (a_is_b | b_is_c | c_is_d | d_is_e)
(a_compose | b_compose | c_compose | d_compose | e_compose)] : typeclass_instances.
-Timeout 1 Fail apply _. (* 0.06s *)
+ Timeout 1 Fail apply _. (* 0.06s *)
Abort.
End HintCut.
diff --git a/test-suite/success/Inductive.v b/test-suite/success/Inductive.v
index f07c0191f1..c2130995fc 100644
--- a/test-suite/success/Inductive.v
+++ b/test-suite/success/Inductive.v
@@ -1,7 +1,5 @@
(* Test des definitions inductives imbriquees *)
-Require Import List.
-
Inductive X : Set :=
cons1 : list X -> X.
diff --git a/test-suite/success/Nia.v b/test-suite/success/Nia.v
new file mode 100644
index 0000000000..62ecece792
--- /dev/null
+++ b/test-suite/success/Nia.v
@@ -0,0 +1,918 @@
+Require Import Coq.ZArith.ZArith.
+Require Import Coq.micromega.Lia.
+Open Scope Z_scope.
+
+(** Add [Z.to_euclidean_division_equations] to the end of [zify], just for this
+ file. *)
+Ltac zify ::= repeat (zify_nat; zify_positive; zify_N); zify_op; Z.to_euclidean_division_equations.
+
+Lemma Z_zerop_or x : x = 0 \/ x <> 0. Proof. nia. Qed.
+Lemma Z_eq_dec_or (x y : Z) : x = y \/ x <> y. Proof. nia. Qed.
+
+Ltac unique_pose_proof pf :=
+ let T := type of pf in
+ lazymatch goal with
+ | [ H : T |- _ ] => fail
+ | _ => pose proof pf
+ end.
+
+Ltac saturate_mod_div :=
+ repeat match goal with
+ | [ |- context[?x mod ?y] ] => unique_pose_proof (Z_zerop_or (x / y))
+ | [ H : context[?x mod ?y] |- _ ] => unique_pose_proof (Z_zerop_or (x / y))
+ | [ |- context[?x / ?y] ] => unique_pose_proof (Z_zerop_or y)
+ | [ H : context[?x / ?y] |- _ ] => unique_pose_proof (Z_zerop_or y)
+ | [ |- context[Z.rem ?x ?y] ] => unique_pose_proof (Z_zerop_or (Z.quot x y))
+ | [ H : context[Z.rem ?x ?y] |- _ ] => unique_pose_proof (Z_zerop_or (Z.quot x y))
+ | [ |- context[Z.quot ?x ?y] ] => unique_pose_proof (Z_zerop_or y)
+ | [ H : context[Z.quot ?x ?y] |- _ ] => unique_pose_proof (Z_zerop_or y)
+ end.
+
+Ltac t := intros; saturate_mod_div; try nia.
+
+Ltac destr_step :=
+ match goal with
+ | [ H : and _ _ |- _ ] => destruct H
+ | [ H : or _ _ |- _ ] => destruct H
+ end.
+
+Example mod_0_l: forall x : Z, 0 mod x = 0. Proof. t. Qed.
+Example mod_0_r: forall x : Z, x mod 0 = 0. Proof. intros; nia. Qed.
+Example Z_mod_same_full: forall a : Z, a mod a = 0. Proof. t. Qed.
+Example Zmod_0_l: forall a : Z, 0 mod a = 0. Proof. t. Qed.
+Example Zmod_0_r: forall a : Z, a mod 0 = 0. Proof. intros; nia. Qed.
+Example mod_mod_same: forall x y : Z, (x mod y) mod y = x mod y. Proof. t. Qed.
+Example Zmod_mod: forall a n : Z, (a mod n) mod n = a mod n. Proof. t. Qed.
+Example Zmod_1_r: forall a : Z, a mod 1 = 0. Proof. intros; nia. Qed.
+Example Zmod_div: forall a b : Z, a mod b / b = 0. Proof. intros; nia. Qed.
+Example Z_mod_1_r: forall a : Z, a mod 1 = 0. Proof. intros; nia. Qed.
+Example Z_mod_same: forall a : Z, a > 0 -> a mod a = 0. Proof. t. Qed.
+Example Z_mod_mult: forall a b : Z, (a * b) mod b = 0.
+Proof.
+ intros a b.
+ assert (b = 0 \/ (a * b) / b = a) by nia.
+ nia.
+Qed.
+Example Z_mod_same': forall a : Z, a <> 0 -> a mod a = 0. Proof. t. Qed.
+Example Z_mod_0_l: forall a : Z, a <> 0 -> 0 mod a = 0. Proof. t. Qed.
+Example Zmod_opp_opp: forall a b : Z, - a mod - b = - (a mod b).
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or ((-a)/(-b)) (a/b)).
+ nia.
+Qed.
+Example Z_mod_le: forall a b : Z, 0 <= a -> 0 < b -> a mod b <= a. Proof. t. Qed.
+Example Zmod_le: forall a b : Z, 0 < b -> 0 <= a -> a mod b <= a. Proof. t. Qed.
+Example Zplus_mod_idemp_r: forall a b n : Z, (b + a mod n) mod n = (b + a) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((b + a mod n) / n = (b / n) + (b mod n + a mod n) / n)
+ by nia.
+ assert ((b + a) / n = (b / n) + (a / n) + (b mod n + a mod n) / n)
+ by nia.
+ nia.
+Qed.
+Example Zplus_mod_idemp_l: forall a b n : Z, (a mod n + b) mod n = (a + b) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a mod n + b) / n = (b / n) + (b mod n + a mod n) / n) by nia.
+ assert ((a + b) / n = (b / n) + (a / n) + (b mod n + a mod n) / n) by nia.
+ nia.
+Qed.
+Example Zmult_mod_distr_r: forall a b c : Z, (a * c) mod (b * c) = a mod b * c.
+Proof.
+ intros a b c.
+ destruct (Z_zerop c); try nia.
+ pose proof (Z_eq_dec_or ((a * c) / (b * c)) (a / b)).
+ nia.
+Qed.
+Example Z_mod_zero_opp_full: forall a b : Z, a mod b = 0 -> - a mod b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or (a/b) (-(-a/b))).
+ nia.
+Qed.
+Example Zmult_mod_idemp_r: forall a b n : Z, (b * (a mod n)) mod n = (b * a) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((b * (a mod n)) / n = (b / n) * (a mod n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ assert ((b * a) / n = (b / n) * (a / n) * n + (b / n) * (a mod n) + (b mod n) * (a / n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Zmult_mod_idemp_l: forall a b n : Z, (a mod n * b) mod n = (a * b) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert (((a mod n) * b) / n = (b / n) * (a mod n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ assert ((a * b) / n = (b / n) * (a / n) * n + (b / n) * (a mod n) + (b mod n) * (a / n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Zminus_mod_idemp_r: forall a b n : Z, (a - b mod n) mod n = (a - b) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a - b mod n) / n = a / n + ((a mod n) - (b mod n)) / n) by nia.
+ assert ((a - b) / n = a / n - b / n + ((a mod n) - (b mod n)) / n) by nia.
+ nia.
+Qed.
+Example Zminus_mod_idemp_l: forall a b n : Z, (a mod n - b) mod n = (a - b) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a mod n - b) / n = - (b / n) + ((a mod n) - (b mod n)) / n) by nia.
+ assert ((a - b) / n = a / n - b / n + ((a mod n) - (b mod n)) / n) by nia.
+ nia.
+Qed.
+Example Z_mod_plus_full: forall a b c : Z, (a + b * c) mod c = a mod c.
+Proof.
+ intros a b c.
+ pose proof (Z_eq_dec_or ((a+b*c)/c) (a/c + b)).
+ nia.
+Qed.
+Example Zmult_mod_distr_l: forall a b c : Z, (c * a) mod (c * b) = c * (a mod b).
+Proof.
+ intros a b c.
+ destruct (Z_zerop c); try nia.
+ pose proof (Z_eq_dec_or ((c * a) / (c * b)) (a / b)).
+ nia.
+Qed.
+Example Z_mod_zero_opp_r: forall a b : Z, a mod b = 0 -> a mod - b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or (a/b) (-(a/-b))).
+ nia.
+Qed.
+Example Zmod_1_l: forall a : Z, 1 < a -> 1 mod a = 1. Proof. t. Qed.
+Example Z_mod_1_l: forall a : Z, 1 < a -> 1 mod a = 1. Proof. t. Qed.
+Example Z_mod_mul: forall a b : Z, b <> 0 -> (a * b) mod b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or ((a*b)/b) a).
+ nia.
+Qed.
+Example Zminus_mod: forall a b n : Z, (a - b) mod n = (a mod n - b mod n) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a - b) / n = (a / n) - (b / n) + ((a mod n) - (b mod n)) / n) by nia.
+ nia.
+Qed.
+Example Zplus_mod: forall a b n : Z, (a + b) mod n = (a mod n + b mod n) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a + b) / n = (a / n) + (b / n) + ((a mod n) + (b mod n)) / n) by nia.
+ nia.
+Qed.
+Example Zmult_mod: forall a b n : Z, (a * b) mod n = (a mod n * (b mod n)) mod n.
+Proof.
+ intros a b n.
+ destruct (Z_zerop n); [ subst; nia | ].
+ assert ((a * b) / n = n * (a / n) * (b / n) + (a mod n) * (b / n) + (a / n) * (b mod n) + ((a mod n) * (b mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Z_mod_mod: forall a n : Z, n <> 0 -> (a mod n) mod n = a mod n. Proof. t. Qed.
+Example Z_mod_div: forall a b : Z, b <> 0 -> a mod b / b = 0. Proof. intros; nia. Qed.
+Example Z_div_exact_full_1: forall a b : Z, a = b * (a / b) -> a mod b = 0. Proof. intros; nia. Qed.
+Example Z_mod_pos_bound: forall a b : Z, 0 < b -> 0 <= a mod b < b. Proof. intros; nia. Qed.
+Example Z_mod_sign_mul: forall a b : Z, b <> 0 -> 0 <= a mod b * b. Proof. intros; nia. Qed.
+Example Z_mod_neg_bound: forall a b : Z, b < 0 -> b < a mod b <= 0. Proof. intros; nia. Qed.
+Example Z_mod_neg: forall a b : Z, b < 0 -> b < a mod b <= 0. Proof. intros; nia. Qed.
+Example div_mod_small: forall x y : Z, 0 <= x < y -> x mod y = x. Proof. t. Qed.
+Example Zmod_small: forall a n : Z, 0 <= a < n -> a mod n = a. Proof. t. Qed.
+Example Z_mod_small: forall a b : Z, 0 <= a < b -> a mod b = a. Proof. t. Qed.
+Example Z_div_zero_opp_full: forall a b : Z, a mod b = 0 -> - a / b = - (a / b). Proof. intros; nia. Qed.
+Example Z_mod_zero_opp: forall a b : Z, b > 0 -> a mod b = 0 -> - a mod b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or (a/b) (-(-a/b))).
+ nia.
+Qed.
+Example Z_div_zero_opp_r: forall a b : Z, a mod b = 0 -> a / - b = - (a / b). Proof. intros; nia. Qed.
+Example Z_mod_lt: forall a b : Z, b > 0 -> 0 <= a mod b < b. Proof. intros; nia. Qed.
+Example Z_mod_opp_opp: forall a b : Z, b <> 0 -> - a mod - b = - (a mod b).
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or ((-a)/(-b)) ((a/b))).
+ nia.
+Qed.
+Example Z_mod_bound_pos: forall a b : Z, 0 <= a -> 0 < b -> 0 <= a mod b < b. Proof. intros; nia. Qed.
+Example Z_mod_opp_l_z: forall a b : Z, b <> 0 -> a mod b = 0 -> - a mod b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or (a/b) (-(-a/b))).
+ nia.
+Qed.
+Example Z_mod_plus: forall a b c : Z, c > 0 -> (a + b * c) mod c = a mod c.
+Proof.
+ intros a b c.
+ pose proof (Z_eq_dec_or ((a+b*c)/c) (a/c+b)).
+ nia.
+Qed.
+Example Z_mod_opp_r_z: forall a b : Z, b <> 0 -> a mod b = 0 -> a mod - b = 0.
+Proof.
+ intros a b.
+ pose proof (Z_eq_dec_or (a/b) (-(a/-b))).
+ nia.
+Qed.
+Example Zmod_eq: forall a b : Z, b > 0 -> a mod b = a - a / b * b. Proof. intros; nia. Qed.
+Example Z_div_exact_2: forall a b : Z, b > 0 -> a mod b = 0 -> a = b * (a / b). Proof. intros; nia. Qed.
+Example Z_div_mod_eq: forall a b : Z, b > 0 -> a = b * (a / b) + a mod b. Proof. intros; nia. Qed.
+Example Z_div_exact_1: forall a b : Z, b > 0 -> a = b * (a / b) -> a mod b = 0. Proof. intros; nia. Qed.
+Example Z_mod_add: forall a b c : Z, c <> 0 -> (a + b * c) mod c = a mod c.
+Proof.
+ intros a b c.
+ pose proof (Z_eq_dec_or ((a+b*c)/c) (a/c+b)).
+ nia.
+Qed.
+Example Z_mod_nz_opp_r: forall a b : Z, a mod b <> 0 -> a mod - b = a mod b - b.
+Proof.
+ intros a b.
+ assert (a mod b <> 0 -> a / -b = -(a/b)-1) by t.
+ nia.
+Qed.
+Example Z_mul_mod_idemp_l: forall a b n : Z, n <> 0 -> (a mod n * b) mod n = (a * b) mod n.
+Proof.
+ intros a b n ?.
+ assert (((a mod n) * b) / n = (b / n) * (a mod n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ assert ((a * b) / n = (b / n) * (a / n) * n + (b / n) * (a mod n) + (b mod n) * (a / n) + ((b mod n) * (a mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Z_mod_nz_opp_full: forall a b : Z, a mod b <> 0 -> - a mod b = b - a mod b.
+Proof.
+ intros a b.
+ assert (a mod b <> 0 -> -a/b = -1-a/b) by nia.
+ nia.
+Qed.
+Example Z_add_mod_idemp_r: forall a b n : Z, n <> 0 -> (a + b mod n) mod n = (a + b) mod n.
+Proof.
+ intros a b n ?.
+ assert ((a + b mod n) / n = (a / n) + (a mod n + b mod n) / n) by nia.
+ assert ((a + b) / n = (a / n) + (b / n) + (a mod n + b mod n) / n) by nia.
+ nia.
+Qed.
+Example Z_add_mod_idemp_l: forall a b n : Z, n <> 0 -> (a mod n + b) mod n = (a + b) mod n.
+Proof.
+ intros a b n ?.
+ assert ((a mod n + b) / n = (b / n) + (a mod n + b mod n) / n) by nia.
+ assert ((a + b) / n = (a / n) + (b / n) + (a mod n + b mod n) / n) by nia.
+ nia.
+Qed.
+Example Z_mul_mod_idemp_r: forall a b n : Z, n <> 0 -> (a * (b mod n)) mod n = (a * b) mod n.
+Proof.
+ intros a b n ?.
+ assert ((a * (b mod n)) / n = (a / n) * (b mod n) + ((a mod n) * (b mod n)) / n)
+ by nia.
+ assert ((a * b) / n = (b / n) * (a / n) * n + (b / n) * (a mod n) + (b mod n) * (a / n) + ((a mod n) * (b mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Zmod_eq_full: forall a b : Z, b <> 0 -> a mod b = a - a / b * b. Proof. intros; nia. Qed.
+Example div_eq: forall x y : Z, y <> 0 -> x mod y = 0 -> x / y * y = x. Proof. intros; nia. Qed.
+Example Z_mod_eq: forall a b : Z, b <> 0 -> a mod b = a - b * (a / b). Proof. intros; nia. Qed.
+Example Z_mod_sign_nz: forall a b : Z, b <> 0 -> a mod b <> 0 -> Z.sgn (a mod b) = Z.sgn b. Proof. intros; nia. Qed.
+Example Z_div_exact_full_2: forall a b : Z, b <> 0 -> a mod b = 0 -> a = b * (a / b). Proof. intros; nia. Qed.
+Example Z_div_mod: forall a b : Z, b <> 0 -> a = b * (a / b) + a mod b. Proof. intros; nia. Qed.
+Example Z_add_mod: forall a b n : Z, n <> 0 -> (a + b) mod n = (a mod n + b mod n) mod n.
+Proof.
+ intros a b n ?.
+ assert ((a + b) / n = (a / n) + (b / n) + (a mod n + b mod n) / n) by nia.
+ nia.
+Qed.
+Example Z_mul_mod: forall a b n : Z, n <> 0 -> (a * b) mod n = (a mod n * (b mod n)) mod n.
+Proof.
+ intros a b n ?.
+ assert ((a * b) / n = (b / n) * (a / n) * n + (b / n) * (a mod n) + (b mod n) * (a / n) + ((a mod n) * (b mod n)) / n)
+ by nia.
+ nia.
+Qed.
+Example Z_div_exact: forall a b : Z, b <> 0 -> a = b * (a / b) <-> a mod b = 0. Proof. intros; nia. Qed.
+Example Z_div_opp_l_z: forall a b : Z, b <> 0 -> a mod b = 0 -> - a / b = - (a / b). Proof. intros; nia. Qed.
+Example Z_div_opp_r_z: forall a b : Z, b <> 0 -> a mod b = 0 -> a / - b = - (a / b). Proof. intros; nia. Qed.
+Example Z_mod_opp_r_nz: forall a b : Z, b <> 0 -> a mod b <> 0 -> a mod - b = a mod b - b.
+Proof.
+ intros a b.
+ assert (a mod b <> 0 -> a/(-b) = -1-a/b) by nia.
+ nia.
+Qed.
+Example Z_mul_mod_distr_r: forall a b c : Z, b <> 0 -> c <> 0 -> (a * c) mod (b * c) = a mod b * c.
+Proof.
+ intros a b c.
+ pose proof (Z_eq_dec_or ((a*c)/(b*c)) (a/b)).
+ nia.
+Qed.
+Example Z_mul_mod_distr_l: forall a b c : Z, b <> 0 -> c <> 0 -> (c * a) mod (c * b) = c * (a mod b).
+Proof.
+ intros a b c.
+ pose proof (Z_eq_dec_or ((c*a)/(c*b)) (a/b)).
+ nia.
+Qed.
+Example Z_mod_opp_l_nz: forall a b : Z, b <> 0 -> a mod b <> 0 -> - a mod b = b - a mod b.
+Proof.
+ intros a b.
+ assert (a mod b <> 0 -> -a/b = -1-a/b) by nia.
+ nia.
+Qed.
+Example mod_eq: forall x x' y : Z, x / y = x' / y -> x mod y = x' mod y -> y <> 0 -> x = x'. Proof. intros; nia. Qed.
+Example Z_div_nz_opp_r: forall a b : Z, a mod b <> 0 -> a / - b = - (a / b) - 1. Proof. intros; nia. Qed.
+Example Z_div_nz_opp_full: forall a b : Z, a mod b <> 0 -> - a / b = - (a / b) - 1. Proof. intros; nia. Qed.
+Example Zmod_unique: forall a b q r : Z, 0 <= r < b -> a = b * q + r -> r = a mod b.
+Proof.
+ intros a b q r ??.
+ assert (q = a / b) by nia.
+ nia.
+Qed.
+Example Z_mod_unique_neg: forall a b q r : Z, b < r <= 0 -> a = b * q + r -> r = a mod b.
+Proof.
+ intros a b q r ??.
+ assert (q = a / b) by nia.
+ nia.
+Qed.
+Example Z_mod_unique_pos: forall a b q r : Z, 0 <= r < b -> a = b * q + r -> r = a mod b.
+Proof.
+ intros a b q r ??.
+ assert (q = a / b) by nia.
+ nia.
+Qed.
+Example Z_rem_mul_r: forall a b c : Z, b <> 0 -> 0 < c -> a mod (b * c) = a mod b + b * ((a / b) mod c).
+Proof.
+ intros a b c ??.
+ assert (a / (b * c) = ((a / b) / c)) by nia.
+ nia.
+Qed.
+Example Z_mod_bound_or: forall a b : Z, b <> 0 -> 0 <= a mod b < b \/ b < a mod b <= 0. Proof. intros; nia. Qed.
+Example Z_div_opp_l_nz: forall a b : Z, b <> 0 -> a mod b <> 0 -> - a / b = - (a / b) - 1. Proof. intros; nia. Qed.
+Example Z_div_opp_r_nz: forall a b : Z, b <> 0 -> a mod b <> 0 -> a / - b = - (a / b) - 1. Proof. intros; nia. Qed.
+Example Z_mod_small_iff: forall a b : Z, b <> 0 -> a mod b = a <-> 0 <= a < b \/ b < a <= 0. Proof. t. Qed.
+Example Z_mod_unique: forall a b q r : Z, 0 <= r < b \/ b < r <= 0 -> a = b * q + r -> r = a mod b.
+Proof.
+ intros a b q r ??.
+ assert (q = a/b) by nia.
+ nia.
+Qed.
+Example Z_opp_mod_bound_or: forall a b : Z, b <> 0 -> 0 <= - (a mod b) < - b \/ - b < - (a mod b) <= 0. Proof. intros; nia. Qed.
+
+Example Zdiv_0_r: forall a : Z, a / 0 = 0. Proof. intros; nia. Qed.
+Example Zdiv_0_l: forall a : Z, 0 / a = 0. Proof. intros; nia. Qed.
+Example Z_div_1_r: forall a : Z, a / 1 = a. Proof. intros; nia. Qed.
+Example Zdiv_1_r: forall a : Z, a / 1 = a. Proof. intros; nia. Qed.
+Example Zdiv_opp_opp: forall a b : Z, - a / - b = a / b. Proof. intros; nia. Qed.
+Example Z_div_0_l: forall a : Z, a <> 0 -> 0 / a = 0. Proof. intros; nia. Qed.
+Example Z_div_pos: forall a b : Z, b > 0 -> 0 <= a -> 0 <= a / b. Proof. intros; nia. Qed.
+Example Z_div_ge0: forall a b : Z, b > 0 -> a >= 0 -> a / b >= 0. Proof. intros; nia. Qed.
+Example Z_div_pos': forall a b : Z, 0 <= a -> 0 < b -> 0 <= a / b. Proof. intros; nia. Qed.
+Example Z_mult_div_ge: forall a b : Z, b > 0 -> b * (a / b) <= a. Proof. intros; nia. Qed.
+Example Z_mult_div_ge_neg: forall a b : Z, b < 0 -> b * (a / b) >= a. Proof. intros; nia. Qed.
+Example Z_mul_div_le: forall a b : Z, 0 < b -> b * (a / b) <= a. Proof. intros; nia. Qed.
+Example Z_mul_div_ge: forall a b : Z, b < 0 -> a <= b * (a / b). Proof. intros; nia. Qed.
+Example Z_div_same: forall a : Z, a > 0 -> a / a = 1. Proof. intros; nia. Qed.
+Example Z_div_mult: forall a b : Z, b > 0 -> a * b / b = a. Proof. intros; nia. Qed.
+Example Z_mul_succ_div_gt: forall a b : Z, 0 < b -> a < b * Z.succ (a / b). Proof. intros; nia. Qed.
+Example Z_mul_succ_div_lt: forall a b : Z, b < 0 -> b * Z.succ (a / b) < a. Proof. intros; nia. Qed.
+Example Zdiv_1_l: forall a : Z, 1 < a -> 1 / a = 0. Proof. intros; nia. Qed.
+Example Z_div_1_l: forall a : Z, 1 < a -> 1 / a = 0. Proof. intros; nia. Qed.
+Example Z_div_str_pos: forall a b : Z, 0 < b <= a -> 0 < a / b. Proof. intros; nia. Qed.
+Example Z_div_ge: forall a b c : Z, c > 0 -> a >= b -> a / c >= b / c. Proof. intros; nia. Qed.
+Example Z_div_mult_full: forall a b : Z, b <> 0 -> a * b / b = a. Proof. intros; nia. Qed.
+Example Z_div_same': forall a : Z, a <> 0 -> a / a = 1. Proof. intros; nia. Qed.
+Example Zdiv_lt_upper_bound: forall a b q : Z, 0 < b -> a < q * b -> a / b < q. Proof. intros; nia. Qed.
+Example Z_div_mul: forall a b : Z, b <> 0 -> a * b / b = a. Proof. intros; nia. Qed.
+Example Z_div_lt: forall a b : Z, 0 < a -> 1 < b -> a / b < a. Proof. intros; nia. Qed.
+Example Z_div_le_mono: forall a b c : Z, 0 < c -> a <= b -> a / c <= b / c. Proof. intros; nia. Qed.
+Example Zdiv_sgn: forall a b : Z, 0 <= Z.sgn (a / b) * Z.sgn a * Z.sgn b. Proof. intros; nia. Qed.
+Example Z_div_same_full: forall a : Z, a <> 0 -> a / a = 1. Proof. intros; nia. Qed.
+Example Z_div_lt_upper_bound: forall a b q : Z, 0 < b -> a < b * q -> a / b < q. Proof. intros; nia. Qed.
+Example Z_div_le: forall a b c : Z, c > 0 -> a <= b -> a / c <= b / c. Proof. intros; nia. Qed.
+Example Z_div_le_lower_bound: forall a b q : Z, 0 < b -> b * q <= a -> q <= a / b. Proof. intros; nia. Qed.
+Example Zdiv_le_lower_bound: forall a b q : Z, 0 < b -> q * b <= a -> q <= a / b. Proof. intros; nia. Qed.
+Example Zdiv_le_upper_bound: forall a b q : Z, 0 < b -> a <= q * b -> a / b <= q. Proof. intros; nia. Qed.
+Example Z_div_le_upper_bound: forall a b q : Z, 0 < b -> a <= b * q -> a / b <= q. Proof. intros; nia. Qed.
+Example Z_div_small: forall a b : Z, 0 <= a < b -> a / b = 0. Proof. intros; nia. Qed.
+Example Zdiv_small: forall a b : Z, 0 <= a < b -> a / b = 0. Proof. intros; nia. Qed.
+Example Z_div_opp_opp: forall a b : Z, b <> 0 -> - a / - b = a / b. Proof. intros; nia. Qed.
+Example Zdiv_mult_cancel_r: forall a b c : Z, c <> 0 -> a * c / (b * c) = a / b. Proof. intros; nia. Qed.
+Example Z_div_unique_exact: forall a b q : Z, b <> 0 -> a = b * q -> q = a / b. Proof. intros; nia. Qed.
+Example Zdiv_mult_cancel_l: forall a b c : Z, c <> 0 -> c * a / (c * b) = a / b. Proof. intros; nia. Qed.
+Example Zdiv_le_compat_l: forall p q r : Z, 0 <= p -> 0 < q < r -> p / r <= p / q.
+Proof.
+ intros p q r ??.
+ assert (p mod r <= p mod q \/ p mod q <= p mod r) by nia.
+ assert (0 <= p / r) by nia.
+ assert (0 <= p / q) by nia.
+ nia.
+Qed.
+Example Z_div_le_compat_l: forall p q r : Z, 0 <= p -> 0 < q <= r -> p / r <= p / q.
+Proof.
+ intros p q r ??.
+ assert (p mod r <= p mod q \/ p mod q <= p mod r) by nia.
+ assert (0 <= p / r) by nia.
+ assert (0 <= p / q) by nia.
+ nia.
+Qed.
+Example Zdiv_Zdiv: forall a b c : Z, 0 <= b -> 0 <= c -> a / b / c = a / (b * c). Proof. intros; nia. Qed.
+Example Z_div_plus: forall a b c : Z, c > 0 -> (a + b * c) / c = a / c + b. Proof. intros; nia. Qed.
+Example Z_div_lt': forall a b : Z, b >= 2 -> a > 0 -> a / b < a. Proof. intros; nia. Qed.
+Example Zdiv_mult_le: forall a b c : Z, 0 <= a -> 0 <= b -> 0 <= c -> c * (a / b) <= c * a / b. Proof. intros; nia. Qed.
+Example Z_div_add_l: forall a b c : Z, b <> 0 -> (a * b + c) / b = a + c / b. Proof. intros; nia. Qed.
+Example Z_div_plus_full_l: forall a b c : Z, b <> 0 -> (a * b + c) / b = a + c / b. Proof. intros; nia. Qed.
+Example Z_div_add: forall a b c : Z, c <> 0 -> (a + b * c) / c = a / c + b. Proof. intros; nia. Qed.
+Example Z_div_plus_full: forall a b c : Z, c <> 0 -> (a + b * c) / c = a / c + b. Proof. intros; nia. Qed.
+Example Z_div_mul_le: forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a / b) <= c * a / b. Proof. intros; nia. Qed.
+Example Z_div_mul_cancel_r: forall a b c : Z, b <> 0 -> c <> 0 -> a * c / (b * c) = a / b. Proof. intros; nia. Qed.
+Example Z_div_div: forall a b c : Z, b <> 0 -> 0 < c -> a / b / c = a / (b * c). Proof. intros; nia. Qed.
+Example Z_div_mul_cancel_l: forall a b c : Z, b <> 0 -> c <> 0 -> c * a / (c * b) = a / b. Proof. intros; nia. Qed.
+Example Z_div_unique_neg: forall a b q r : Z, b < r <= 0 -> a = b * q + r -> q = a / b. Proof. intros; nia. Qed.
+Example Zdiv_unique: forall a b q r : Z, 0 <= r < b -> a = b * q + r -> q = a / b. Proof. intros; nia. Qed.
+Example Z_div_unique_pos: forall a b q r : Z, 0 <= r < b -> a = b * q + r -> q = a / b. Proof. intros; nia. Qed.
+Example Z_div_small_iff: forall a b : Z, b <> 0 -> a / b = 0 <-> 0 <= a < b \/ b < a <= 0. Proof. intros; nia. Qed.
+Example Z_div_unique: forall a b q r : Z, 0 <= r < b \/ b < r <= 0 -> a = b * q + r -> q = a / b. Proof. intros; nia. Qed.
+
+(** Now we do the same, but with [Z.quot] and [Z.rem] instead. *)
+Lemma N2Z_inj_quot : forall n m : N, Z.of_N (n / m) = Z.of_N n ÷ Z.of_N m. Proof. intros; nia. Qed.
+Lemma N2Z_inj_rem : forall n m : N, Z.of_N (n mod m) = Z.rem (Z.of_N n) (Z.of_N m). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_mul_quot_ge : forall a b : Z, a <= 0 -> b <> 0 -> a <= b * (a ÷ b) <= 0.
+Proof. intros; destruct (Z_zerop (a ÷ b)); nia. Qed.
+Lemma OrdersEx_Z_as_DT_mul_quot_le : forall a b : Z, 0 <= a -> b <> 0 -> 0 <= b * (a ÷ b) <= a. Proof. intros; destruct (Z_zerop (a ÷ b)); nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_0_l : forall a : Z, 0 < a -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_1_r : forall a : Z, 0 <= a -> a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_add_l : forall a b c : Z, 0 <= c -> 0 <= a * b + c -> 0 < b -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_div : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a ÷ b ÷ c = a ÷ (b * c).
+Proof. intros; assert (0 < b * c) by nia; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q.
+Proof.
+ intros.
+ destruct (Z_zerop p), (Z_zerop (p ÷ r)), (Z_zerop (p ÷ q)); subst; [ nia.. | ].
+ assert (0 < q) by nia; assert (0 < r) by nia; assert (0 < p) by nia.
+ nia.
+Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_le_lower_bound : forall a b q : Z, 0 <= a -> 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_le_mono : forall a b c : Z, 0 < c -> 0 <= a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_le_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_mul_cancel_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_mul_cancel_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_mul : forall a b : Z, 0 <= a -> 0 < b -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_same : forall a : Z, 0 < a -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_small_iff : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = 0 <-> a < b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_str_pos_iff : forall a b : Z, 0 <= a -> 0 < b -> 0 < a ÷ b <-> b <= a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_unique_exact : forall a b q : Z, 0 <= a -> 0 < b -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_div_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_Private_Div_NZQuot_mul_div_le : forall a b : Z, 0 <= a -> 0 < b -> b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_0_l : forall a : Z, a <> 0 -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_1_r : forall a : Z, a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_add_l : forall a b c : Z, b <> 0 -> 0 <= (a * b + c) * c -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_div_nonneg : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = a / b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q.
+Proof.
+ intros.
+ destruct (Z_zerop p), (Z_zerop (p ÷ r)), (Z_zerop (p ÷ q)); [ subst; nia.. | ].
+ assert (0 < p) by nia; assert (0 < r) by nia.
+ nia.
+Qed.
+Lemma OrdersEx_Z_as_DT_quot_le_lower_bound : forall a b q : Z, 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_le_mono : forall a b c : Z, 0 < c -> a <= b -> a ÷ c <= b ÷ c.
+Proof.
+ intros.
+ destruct (Z_zerop a), (Z_zerop b), (Z_zerop (a ÷ c)), (Z_zerop (b ÷ c)); [ subst; nia.. | ].
+ nia.
+Qed.
+Lemma OrdersEx_Z_as_DT_quot_le_upper_bound : forall a b q : Z, 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_mul_cancel_l : forall a b c : Z, b <> 0 -> c <> 0 -> c * a ÷ (c * b) = a ÷ b.
+Proof.
+ intros.
+ assert (c * b <> 0) by nia.
+ destruct (Z_zerop a), (Z_zerop (c * a)); subst; [ nia | exfalso; nia.. | ].
+Abort.
+Lemma OrdersEx_Z_as_DT_quot_mul_cancel_r : forall a b c : Z, b <> 0 -> c <> 0 -> a * c ÷ (b * c) = a ÷ b. Proof. Abort.
+Lemma OrdersEx_Z_as_DT_quot_mul : forall a b : Z, b <> 0 -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_opp_l : forall a b : Z, b <> 0 -> - a ÷ b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_opp_opp : forall a b : Z, b <> 0 -> - a ÷ - b = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_opp_r : forall a b : Z, b <> 0 -> a ÷ - b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_quot : forall a b c : Z, b <> 0 -> c <> 0 -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; assert (b * c <> 0) by nia. Abort.
+Lemma OrdersEx_Z_as_DT_quot_same : forall a : Z, a <> 0 -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_unique_exact : forall a b q : Z, b <> 0 -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_DT_quot_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_mul_quot_ge : forall a b : Z, a <= 0 -> b <> 0 -> a <= b * (a ÷ b) <= 0. Proof. intros. Fail nia. Abort.
+Lemma OrdersEx_Z_as_OT_mul_quot_le : forall a b : Z, 0 <= a -> b <> 0 -> 0 <= b * (a ÷ b) <= a. Proof. intros. Fail nia. Abort.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_0_l : forall a : Z, 0 < a -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_1_r : forall a : Z, 0 <= a -> a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_add_l : forall a b c : Z, 0 <= c -> 0 <= a * b + c -> 0 < b -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_div : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros. Abort.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_le_lower_bound : forall a b q : Z, 0 <= a -> 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_le_mono : forall a b c : Z, 0 < c -> 0 <= a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_le_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_mul_cancel_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_mul_cancel_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_mul : forall a b : Z, 0 <= a -> 0 < b -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_same : forall a : Z, 0 < a -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_small_iff : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = 0 <-> a < b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_str_pos_iff : forall a b : Z, 0 <= a -> 0 < b -> 0 < a ÷ b <-> b <= a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_unique_exact : forall a b q : Z, 0 <= a -> 0 < b -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_div_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_Private_Div_NZQuot_mul_div_le : forall a b : Z, 0 <= a -> 0 < b -> b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_0_l : forall a : Z, a <> 0 -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_1_r : forall a : Z, a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_add_l : forall a b c : Z, b <> 0 -> 0 <= (a * b + c) * c -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_div_nonneg : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = a / b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros. Fail nia. Abort.
+Lemma OrdersEx_Z_as_OT_quot_le_lower_bound : forall a b q : Z, 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_le_mono : forall a b c : Z, 0 < c -> a <= b -> a ÷ c <= b ÷ c. Proof. intros. Fail nia. Abort.
+Lemma OrdersEx_Z_as_OT_quot_le_upper_bound : forall a b q : Z, 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_mul_cancel_l : forall a b c : Z, b <> 0 -> c <> 0 -> c * a ÷ (c * b) = a ÷ b. Proof. intros. Abort.
+Lemma OrdersEx_Z_as_OT_quot_mul_cancel_r : forall a b c : Z, b <> 0 -> c <> 0 -> a * c ÷ (b * c) = a ÷ b. Proof. intros. Abort.
+Lemma OrdersEx_Z_as_OT_quot_mul : forall a b : Z, b <> 0 -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_opp_l : forall a b : Z, b <> 0 -> - a ÷ b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_opp_opp : forall a b : Z, b <> 0 -> - a ÷ - b = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_opp_r : forall a b : Z, b <> 0 -> a ÷ - b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_quot : forall a b c : Z, b <> 0 -> c <> 0 -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros. Abort.
+Lemma OrdersEx_Z_as_OT_quot_same : forall a : Z, a <> 0 -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_unique_exact : forall a b q : Z, b <> 0 -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma OrdersEx_Z_as_OT_quot_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z2N_inj_quot : forall n m : Z, 0 <= n -> 0 <= m -> Z.to_N (n ÷ m) = (Z.to_N n / Z.to_N m)%N.
+Proof. intros; destruct (Z_zerop n), (Z_zerop m), (Z_zerop (n ÷ m)); [ subst; try nia.. | ]. Abort.
+Lemma Z2N_inj_rem : forall n m : Z, 0 <= n -> 0 <= m -> Z.to_N (Z.rem n m) = (Z.to_N n mod Z.to_N m)%N. Proof. intros. Abort.
+Lemma Zabs2N_inj_quot : forall n m : Z, Z.abs_N (n ÷ m) = (Z.abs_N n / Z.abs_N m)%N. Proof. intros. Abort.
+Lemma Zabs2N_inj_rem : forall n m : Z, Z.abs_N (Z.rem n m) = (Z.abs_N n mod Z.abs_N m)%N. Proof. intros. Abort.
+(* Some of these don't work, and I haven't gone through and figured out which ones yet, so they're all commented out for now *)
+(*
+Lemma Z_add_rem : forall a b n : Z, n <> 0 -> 0 <= a * b -> Z.rem (a + b) n = Z.rem (Z.rem a n + Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Z_add_rem_idemp_l : forall a b n : Z, n <> 0 -> 0 <= a * b -> Z.rem (Z.rem a n + b) n = Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma Z_add_rem_idemp_r : forall a b n : Z, n <> 0 -> 0 <= a * b -> Z.rem (a + Z.rem b n) n = Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_add_rem : forall a b n : Z, n <> 0 -> 0 <= a * b -> ZBinary.Z.rem (a + b) n = ZBinary.Z.rem (ZBinary.Z.rem a n + ZBinary.Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_add_rem_idemp_l : forall a b n : Z, n <> 0 -> 0 <= a * b -> ZBinary.Z.rem (ZBinary.Z.rem a n + b) n = ZBinary.Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_add_rem_idemp_r : forall a b n : Z, n <> 0 -> 0 <= a * b -> ZBinary.Z.rem (a + ZBinary.Z.rem b n) n = ZBinary.Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_gcd_quot_gcd : forall a b g : Z, g <> 0 -> g = ZBinary.Z.gcd a b -> ZBinary.Z.gcd (a ÷ g) (b ÷ g) = 1. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_gcd_rem : forall a b : Z, b <> 0 -> ZBinary.Z.gcd (ZBinary.Z.rem a b) b = ZBinary.Z.gcd b a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mod_mul_r : forall a b c : Z, b <> 0 -> c <> 0 -> ZBinary.Z.rem a (b * c) = ZBinary.Z.rem a b + b * ZBinary.Z.rem (a ÷ b) c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_pred_quot_gt : forall a b : Z, 0 <= a -> b < 0 -> a < b * ZBinary.Z.pred (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_pred_quot_lt : forall a b : Z, a <= 0 -> 0 < b -> b * ZBinary.Z.pred (a ÷ b) < a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_quot_ge : forall a b : Z, a <= 0 -> b <> 0 -> a <= b * (a ÷ b) <= 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_quot_le : forall a b : Z, 0 <= a -> b <> 0 -> 0 <= b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_rem_distr_l : forall a b c : Z, b <> 0 -> c <> 0 -> ZBinary.Z.rem (c * a) (c * b) = c * ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_rem_distr_r : forall a b c : Z, b <> 0 -> c <> 0 -> ZBinary.Z.rem (a * c) (b * c) = ZBinary.Z.rem a b * c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_rem : forall a b n : Z, n <> 0 -> ZBinary.Z.rem (a * b) n = ZBinary.Z.rem (ZBinary.Z.rem a n * ZBinary.Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_rem_idemp_l : forall a b n : Z, n <> 0 -> ZBinary.Z.rem (ZBinary.Z.rem a n * b) n = ZBinary.Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_rem_idemp_r : forall a b n : Z, n <> 0 -> ZBinary.Z.rem (a * ZBinary.Z.rem b n) n = ZBinary.Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_succ_quot_gt : forall a b : Z, 0 <= a -> 0 < b -> a < b * ZBinary.Z.succ (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_mul_succ_quot_lt : forall a b : Z, a <= 0 -> b < 0 -> b * ZBinary.Z.succ (a ÷ b) < a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_add_mod : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (a + b) n = ZBinary.Z.rem (ZBinary.Z.rem a n + ZBinary.Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_add_mod_idemp_l : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (ZBinary.Z.rem a n + b) n = ZBinary.Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_add_mod_idemp_r : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (a + ZBinary.Z.rem b n) n = ZBinary.Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_0_l : forall a : Z, 0 < a -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_1_r : forall a : Z, 0 <= a -> a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_add_l : forall a b c : Z, 0 <= c -> 0 <= a * b + c -> 0 < b -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_div : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_exact : forall a b : Z, 0 <= a -> 0 < b -> a = b * (a ÷ b) <-> ZBinary.Z.rem a b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_le_lower_bound : forall a b q : Z, 0 <= a -> 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_le_mono : forall a b c : Z, 0 < c -> 0 <= a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_le_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_mul_cancel_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_mul_cancel_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_mul : forall a b : Z, 0 <= a -> 0 < b -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_same : forall a : Z, 0 < a -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_small_iff : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = 0 <-> a < b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_str_pos_iff : forall a b : Z, 0 <= a -> 0 < b -> 0 < a ÷ b <-> b <= a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_unique_exact : forall a b q : Z, 0 <= a -> 0 < b -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_div_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_0_l : forall a : Z, 0 < a -> ZBinary.Z.rem 0 a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_1_l : forall a : Z, 1 < a -> ZBinary.Z.rem 1 a = 1. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_1_r : forall a : Z, 0 <= a -> ZBinary.Z.rem a 1 = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> ZBinary.Z.rem (a + b * c) c = ZBinary.Z.rem a c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_divides : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem a b = 0 <-> (exists c : Z, a = b * c). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_le : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem a b <= a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_mod : forall a n : Z, 0 <= a -> 0 < n -> ZBinary.Z.rem (ZBinary.Z.rem a n) n = ZBinary.Z.rem a n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_mul : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem (a * b) b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_mul_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> ZBinary.Z.rem a (b * c) = ZBinary.Z.rem a b + b * ZBinary.Z.rem (a ÷ b) c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_same : forall a : Z, 0 < a -> ZBinary.Z.rem a a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_small : forall a b : Z, 0 <= a < b -> ZBinary.Z.rem a b = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_small_iff : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem a b = a <-> a < b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mod_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> r = ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_div_le : forall a b : Z, 0 <= a -> 0 < b -> b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_mod_distr_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> ZBinary.Z.rem (c * a) (c * b) = c * ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_mod_distr_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> ZBinary.Z.rem (a * c) (b * c) = ZBinary.Z.rem a b * c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_mod : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (a * b) n = ZBinary.Z.rem (ZBinary.Z.rem a n * ZBinary.Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_mod_idemp_l : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (ZBinary.Z.rem a n * b) n = ZBinary.Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_mod_idemp_r : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> ZBinary.Z.rem (a * ZBinary.Z.rem b n) n = ZBinary.Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_NZQuot_mul_succ_div_gt : forall a b : Z, 0 <= a -> 0 < b -> a < b * ZBinary.Z.succ (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_Private_Div_Quot2Div_div_mod : forall a b : Z, b <> 0 -> a = b * (a ÷ b) + ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+ZBinary_Z_Private_Div_Quot2Div_div_wd Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) ZBinary.Z.quot
+Lemma ZBinary_Z_Private_Div_Quot2Div_mod_bound_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= ZBinary.Z.rem a b < b. Proof. intros; nia. Qed.
+ZBinary_Z_Private_Div_Quot2Div_mod_wd Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) ZBinary.Z.rem
+Lemma ZBinary_Z_quot_0_l : forall a : Z, a <> 0 -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_1_r : forall a : Z, a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_abs : forall a b : Z, b <> 0 -> ZBinary.Z.abs a ÷ ZBinary.Z.abs b = ZBinary.Z.abs (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_abs_l : forall a b : Z, b <> 0 -> ZBinary.Z.abs a ÷ b = ZBinary.Z.sgn a * (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_abs_r : forall a b : Z, b <> 0 -> a ÷ ZBinary.Z.abs b = ZBinary.Z.sgn b * (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_add_l : forall a b c : Z, b <> 0 -> 0 <= (a * b + c) * c -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_div : forall a b : Z, b <> 0 -> a ÷ b = ZBinary.Z.sgn a * ZBinary.Z.sgn b * (ZBinary.Z.abs a / ZBinary.Z.abs b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_div_nonneg : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = a / b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_exact : forall a b : Z, b <> 0 -> a = b * (a ÷ b) <-> ZBinary.Z.rem a b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_le_lower_bound : forall a b q : Z, 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_le_mono : forall a b c : Z, 0 < c -> a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_le_upper_bound : forall a b q : Z, 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_mul_cancel_l : forall a b c : Z, b <> 0 -> c <> 0 -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_mul_cancel_r : forall a b c : Z, b <> 0 -> c <> 0 -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_mul : forall a b : Z, b <> 0 -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_opp_l : forall a b : Z, b <> 0 -> - a ÷ b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_opp_opp : forall a b : Z, b <> 0 -> - a ÷ - b = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_opp_r : forall a b : Z, b <> 0 -> a ÷ - b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_quot : forall a b c : Z, b <> 0 -> c <> 0 -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_rem' : forall a b : Z, a = b * (a ÷ b) + ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_rem : forall a b : Z, b <> 0 -> a = b * (a ÷ b) + ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_same : forall a : Z, a <> 0 -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_small_iff : forall a b : Z, b <> 0 -> a ÷ b = 0 <-> ZBinary.Z.abs a < ZBinary.Z.abs b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_unique_exact : forall a b q : Z, b <> 0 -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_quot_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+ZBinary_Z_quot_wd Morphisms.Proper (Morphisms.respectful ZBinary.Z.eq (Morphisms.respectful ZBinary.Z.eq ZBinary.Z.eq)) ZBinary.Z.quot
+Lemma ZBinary_Z_rem_0_l : forall a : Z, a <> 0 -> ZBinary.Z.rem 0 a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_1_l : forall a : Z, 1 < a -> ZBinary.Z.rem 1 a = 1. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_1_r : forall a : Z, ZBinary.Z.rem a 1 = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_abs : forall a b : Z, b <> 0 -> ZBinary.Z.rem (ZBinary.Z.abs a) (ZBinary.Z.abs b) = ZBinary.Z.abs (ZBinary.Z.rem a b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_abs_l : forall a b : Z, b <> 0 -> ZBinary.Z.rem (ZBinary.Z.abs a) b = ZBinary.Z.abs (ZBinary.Z.rem a b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_abs_r : forall a b : Z, b <> 0 -> ZBinary.Z.rem a (ZBinary.Z.abs b) = ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> ZBinary.Z.rem (a + b * c) c = ZBinary.Z.rem a c. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_bound_abs : forall a b : Z, b <> 0 -> ZBinary.Z.abs (ZBinary.Z.rem a b) < ZBinary.Z.abs b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_bound_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= ZBinary.Z.rem a b < b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_eq : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b = a - b * (a ÷ b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_le : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem a b <= a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_mod_eq_0 : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b = 0 <-> a mod b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_mod : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b = ZBinary.Z.sgn a * (ZBinary.Z.abs a mod ZBinary.Z.abs b). Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_mod_nonneg : forall a b : Z, 0 <= a -> 0 < b -> ZBinary.Z.rem a b = a mod b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_mul : forall a b : Z, b <> 0 -> ZBinary.Z.rem (a * b) b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_nonneg : forall a b : Z, b <> 0 -> 0 <= a -> 0 <= ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_nonpos : forall a b : Z, b <> 0 -> a <= 0 -> ZBinary.Z.rem a b <= 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_opp_l : forall a b : Z, b <> 0 -> ZBinary.Z.rem (- a) b = - ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_opp_l' : forall a b : Z, ZBinary.Z.rem (- a) b = - ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_opp_opp : forall a b : Z, b <> 0 -> ZBinary.Z.rem (- a) (- b) = - ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_opp_r : forall a b : Z, b <> 0 -> ZBinary.Z.rem a (- b) = ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_opp_r' : forall a b : Z, ZBinary.Z.rem a (- b) = ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_quot : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b ÷ b = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_rem : forall a n : Z, n <> 0 -> ZBinary.Z.rem (ZBinary.Z.rem a n) n = ZBinary.Z.rem a n. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_same : forall a : Z, a <> 0 -> ZBinary.Z.rem a a = 0. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_sign : forall a b : Z, a <> 0 -> b <> 0 -> ZBinary.Z.sgn (ZBinary.Z.rem a b) <> - ZBinary.Z.sgn a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_sign_mul : forall a b : Z, b <> 0 -> 0 <= ZBinary.Z.rem a b * a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_sign_nz : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b <> 0 -> ZBinary.Z.sgn (ZBinary.Z.rem a b) = ZBinary.Z.sgn a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_small : forall a b : Z, 0 <= a < b -> ZBinary.Z.rem a b = a. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_small_iff : forall a b : Z, b <> 0 -> ZBinary.Z.rem a b = a <-> ZBinary.Z.abs a < ZBinary.Z.abs b. Proof. intros; nia. Qed.
+Lemma ZBinary_Z_rem_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> r = ZBinary.Z.rem a b. Proof. intros; nia. Qed.
+ZBinary_Z_rem_wd Morphisms.Proper (Morphisms.respectful ZBinary.Z.eq (Morphisms.respectful ZBinary.Z.eq ZBinary.Z.eq)) ZBinary.Z.rem
+Lemma Z_gcd_quot_gcd : forall a b g : Z, g <> 0 -> g = Z.gcd a b -> Z.gcd (a ÷ g) (b ÷ g) = 1. Proof. intros; nia. Qed.
+Lemma Z_gcd_rem : forall a b : Z, b <> 0 -> Z.gcd (Z.rem a b) b = Z.gcd b a. Proof. intros; nia. Qed.
+Lemma Z_mod_mul_r : forall a b c : Z, b <> 0 -> c <> 0 -> Z.rem a (b * c) = Z.rem a b + b * Z.rem (a ÷ b) c. Proof. intros; nia. Qed.
+Lemma Z_mul_pred_quot_gt : forall a b : Z, 0 <= a -> b < 0 -> a < b * Z.pred (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_mul_pred_quot_lt : forall a b : Z, a <= 0 -> 0 < b -> b * Z.pred (a ÷ b) < a. Proof. intros; nia. Qed.
+Lemma Z_mul_quot_ge : forall a b : Z, a <= 0 -> b <> 0 -> a <= b * (a ÷ b) <= 0. Proof. intros; nia. Qed.
+Lemma Z_mul_quot_le : forall a b : Z, 0 <= a -> b <> 0 -> 0 <= b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma Z_mul_rem_distr_l : forall a b c : Z, b <> 0 -> c <> 0 -> Z.rem (c * a) (c * b) = c * Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_mul_rem_distr_r : forall a b c : Z, b <> 0 -> c <> 0 -> Z.rem (a * c) (b * c) = Z.rem a b * c. Proof. intros; nia. Qed.
+Lemma Z_mul_rem : forall a b n : Z, n <> 0 -> Z.rem (a * b) n = Z.rem (Z.rem a n * Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Z_mul_rem_idemp_l : forall a b n : Z, n <> 0 -> Z.rem (Z.rem a n * b) n = Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma Z_mul_rem_idemp_r : forall a b n : Z, n <> 0 -> Z.rem (a * Z.rem b n) n = Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma Z_mul_succ_quot_gt : forall a b : Z, 0 <= a -> 0 < b -> a < b * Z.succ (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_mul_succ_quot_lt : forall a b : Z, a <= 0 -> b < 0 -> b * Z.succ (a ÷ b) < a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_add_mod : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (a + b) n = Z.rem (Z.rem a n + Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_add_mod_idemp_l : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (Z.rem a n + b) n = Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_add_mod_idemp_r : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (a + Z.rem b n) n = Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_0_l : forall a : Z, 0 < a -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_1_r : forall a : Z, 0 <= a -> a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_add_l : forall a b c : Z, 0 <= c -> 0 <= a * b + c -> 0 < b -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_div : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_exact : forall a b : Z, 0 <= a -> 0 < b -> a = b * (a ÷ b) <-> Z.rem a b = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_le_lower_bound : forall a b q : Z, 0 <= a -> 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_le_mono : forall a b c : Z, 0 < c -> 0 <= a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_le_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_mul_cancel_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_mul_cancel_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_mul : forall a b : Z, 0 <= a -> 0 < b -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_same : forall a : Z, 0 < a -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_small_iff : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = 0 <-> a < b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_str_pos_iff : forall a b : Z, 0 <= a -> 0 < b -> 0 < a ÷ b <-> b <= a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_unique_exact : forall a b q : Z, 0 <= a -> 0 < b -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_div_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_0_l : forall a : Z, 0 < a -> Z.rem 0 a = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_1_l : forall a : Z, 1 < a -> Z.rem 1 a = 1. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_1_r : forall a : Z, 0 <= a -> Z.rem a 1 = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_add : forall a b c : Z, 0 <= a -> 0 <= a + b * c -> 0 < c -> Z.rem (a + b * c) c = Z.rem a c. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_divides : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b = 0 <-> (exists c : Z, a = b * c). Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_le : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b <= a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_mod : forall a n : Z, 0 <= a -> 0 < n -> Z.rem (Z.rem a n) n = Z.rem a n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_mul : forall a b : Z, 0 <= a -> 0 < b -> Z.rem (a * b) b = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_mul_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> Z.rem a (b * c) = Z.rem a b + b * Z.rem (a ÷ b) c. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_same : forall a : Z, 0 < a -> Z.rem a a = 0. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_small : forall a b : Z, 0 <= a < b -> Z.rem a b = a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_small_iff : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b = a <-> a < b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mod_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> r = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_div_le : forall a b : Z, 0 <= a -> 0 < b -> b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_mod_distr_l : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> Z.rem (c * a) (c * b) = c * Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_mod_distr_r : forall a b c : Z, 0 <= a -> 0 < b -> 0 < c -> Z.rem (a * c) (b * c) = Z.rem a b * c. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_mod : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (a * b) n = Z.rem (Z.rem a n * Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_mod_idemp_l : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (Z.rem a n * b) n = Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_mod_idemp_r : forall a b n : Z, 0 <= a -> 0 <= b -> 0 < n -> Z.rem (a * Z.rem b n) n = Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma Z_Private_Div_NZQuot_mul_succ_div_gt : forall a b : Z, 0 <= a -> 0 < b -> a < b * Z.succ (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_Private_Div_Quot2Div_div_mod : forall a b : Z, b <> 0 -> a = b * (a ÷ b) + Z.rem a b. Proof. intros; nia. Qed.
+Z_Private_Div_Quot2Div_div_wd Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) Z.quot
+Lemma Z_Private_Div_Quot2Div_mod_bound_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= Z.rem a b < b. Proof. intros; nia. Qed.
+Z_Private_Div_Quot2Div_mod_wd Morphisms.Proper (Morphisms.respectful eq (Morphisms.respectful eq eq)) Z.rem
+Lemma Z_quot_0_l : forall a : Z, a <> 0 -> 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma Z_quot_0_r_ext : forall x y : Z, y = 0 -> x ÷ y = 0. Proof. intros; nia. Qed.
+Lemma Z_quot_1_l : forall a : Z, 1 < a -> 1 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma Z_quot_1_r : forall a : Z, a ÷ 1 = a. Proof. intros; nia. Qed.
+Lemma Zquot2_quot : forall n : Z, Z.quot2 n = n ÷ 2. Proof. intros; nia. Qed.
+Lemma Z_quot_abs : forall a b : Z, b <> 0 -> Z.abs a ÷ Z.abs b = Z.abs (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_quot_abs_l : forall a b : Z, b <> 0 -> Z.abs a ÷ b = Z.sgn a * (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_quot_abs_r : forall a b : Z, b <> 0 -> a ÷ Z.abs b = Z.sgn b * (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_quot_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma Z_quot_add_l : forall a b c : Z, b <> 0 -> 0 <= (a * b + c) * c -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_div : forall a b : Z, b <> 0 -> a ÷ b = Z.sgn a * Z.sgn b * (Z.abs a / Z.abs b). Proof. intros; nia. Qed.
+Lemma Z_quot_div_nonneg : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = a / b. Proof. intros; nia. Qed.
+Lemma Z_quot_exact : forall a b : Z, b <> 0 -> a = b * (a ÷ b) <-> Z.rem a b = 0. Proof. intros; nia. Qed.
+Lemma Z_quot_le_compat_l : forall p q r : Z, 0 <= p -> 0 < q <= r -> p ÷ r <= p ÷ q. Proof. intros; nia. Qed.
+Lemma Z_quot_le_lower_bound : forall a b q : Z, 0 < b -> b * q <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_le_mono : forall a b c : Z, 0 < c -> a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma Z_quot_le_upper_bound : forall a b q : Z, 0 < b -> a <= b * q -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma Z_quot_lt : forall a b : Z, 0 < a -> 1 < b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma Z_quot_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < b * q -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma Z_quot_mul_cancel_l : forall a b c : Z, b <> 0 -> c <> 0 -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_mul_cancel_r : forall a b c : Z, b <> 0 -> c <> 0 -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_mul : forall a b : Z, b <> 0 -> a * b ÷ b = a. Proof. intros; nia. Qed.
+Lemma Z_quot_mul_le : forall a b c : Z, 0 <= a -> 0 < b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_opp_l : forall a b : Z, b <> 0 -> - a ÷ b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_quot_opp_opp : forall a b : Z, b <> 0 -> - a ÷ - b = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_opp_r : forall a b : Z, b <> 0 -> a ÷ - b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_quot_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_quot : forall a b c : Z, b <> 0 -> c <> 0 -> a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma Z_quot_rem' : forall a b : Z, a = b * (a ÷ b) + Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_quot_rem : forall a b : Z, b <> 0 -> a = b * (a ÷ b) + Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_quot_same : forall a : Z, a <> 0 -> a ÷ a = 1. Proof. intros; nia. Qed.
+Lemma Z_quot_small : forall a b : Z, 0 <= a < b -> a ÷ b = 0. Proof. intros; nia. Qed.
+Lemma Z_quot_small_iff : forall a b : Z, b <> 0 -> a ÷ b = 0 <-> Z.abs a < Z.abs b. Proof. intros; nia. Qed.
+Lemma Z_quot_str_pos : forall a b : Z, 0 < b <= a -> 0 < a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_unique_exact : forall a b q : Z, b <> 0 -> a = b * q -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma Z_quot_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Z_quot_wd Morphisms.Proper (Morphisms.respectful Z.eq (Morphisms.respectful Z.eq Z.eq)) Z.quot
+Lemma Zquot_Zeven_rem : forall a : Z, Z.even a = (Z.rem a 2 =? 0). Proof. intros; nia. Qed.
+Lemma Zquot_Z_mult_quot_ge : forall a b : Z, a <= 0 -> a <= b * (a ÷ b) <= 0. Proof. intros; nia. Qed.
+Lemma Zquot_Z_mult_quot_le : forall a b : Z, 0 <= a -> 0 <= b * (a ÷ b) <= a. Proof. intros; nia. Qed.
+Lemma Zquot_Zmult_rem_distr_l : forall a b c : Z, Z.rem (c * a) (c * b) = c * Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Zmult_rem_distr_r : forall a b c : Z, Z.rem (a * c) (b * c) = Z.rem a b * c. Proof. intros; nia. Qed.
+Lemma Zquot_Zmult_rem : forall a b n : Z, Z.rem (a * b) n = Z.rem (Z.rem a n * Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zmult_rem_idemp_l : forall a b n : Z, Z.rem (Z.rem a n * b) n = Z.rem (a * b) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zmult_rem_idemp_r : forall a b n : Z, Z.rem (b * Z.rem a n) n = Z.rem (b * a) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zodd_rem : forall a : Z, Z.odd a = negb (Z.rem a 2 =? 0). Proof. intros; nia. Qed.
+Lemma Zquot_Zplus_rem : forall a b n : Z, 0 <= a * b -> Z.rem (a + b) n = Z.rem (Z.rem a n + Z.rem b n) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zplus_rem_idemp_l : forall a b n : Z, 0 <= a * b -> Z.rem (Z.rem a n + b) n = Z.rem (a + b) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zplus_rem_idemp_r : forall a b n : Z, 0 <= a * b -> Z.rem (b + Z.rem a n) n = Z.rem (b + a) n. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_0_l : forall a : Z, 0 ÷ a = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_0_r : forall a : Z, a ÷ 0 = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_exact_full : forall a b : Z, a = b * (a ÷ b) <-> Z.rem a b = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_le_lower_bound : forall a b q : Z, 0 < b -> q * b <= a -> q <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_le_upper_bound : forall a b q : Z, 0 < b -> a <= q * b -> a ÷ b <= q. Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_lt : forall a b : Z, 0 < a -> 2 <= b -> a ÷ b < a. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_lt_upper_bound : forall a b q : Z, 0 <= a -> 0 < b -> a < q * b -> a ÷ b < q. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_mod_unique_full : forall a b q r : Z, Zquot.Remainder a b r -> a = b * q + r -> q = a ÷ b /\ r = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_monotone : forall a b c : Z, 0 <= c -> a <= b -> a ÷ c <= b ÷ c. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_mult_cancel_l : forall a b c : Z, c <> 0 -> c * a ÷ (c * b) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_mult_cancel_r : forall a b c : Z, c <> 0 -> a * c ÷ (b * c) = a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_mult_le : forall a b c : Z, 0 <= a -> 0 <= b -> 0 <= c -> c * (a ÷ b) <= c * a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_opp_l : forall a b : Z, - a ÷ b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_opp_opp : forall a b : Z, - a ÷ - b = a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_opp_r : forall a b : Z, a ÷ - b = - (a ÷ b). Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_plus : forall a b c : Z, 0 <= (a + b * c) * a -> c <> 0 -> (a + b * c) ÷ c = a ÷ c + b. Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_plus_l : forall a b c : Z, 0 <= (a * b + c) * c -> b <> 0 -> b <> 0 -> (a * b + c) ÷ b = a + c ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Z_quot_pos : forall a b : Z, 0 <= a -> 0 <= b -> 0 <= a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquotrem_Zdiv_eucl_pos : forall a b : Z, 0 <= a -> 0 < b -> a ÷ b = a / b /\ Z.rem a b = a mod b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_sgn : forall a b : Z, 0 <= Z.sgn (a ÷ b) * Z.sgn a * Z.sgn b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_unique_full : forall a b q r : Z, Zquot.Remainder a b r -> a = b * q + r -> q = a ÷ b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_Zdiv_pos : forall a b : Z, 0 <= a -> 0 <= b -> a ÷ b = a / b. Proof. intros; nia. Qed.
+Lemma Zquot_Zquot_Zquot : forall a b c : Z, a ÷ b ÷ c = a ÷ (b * c). Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_0_l : forall a : Z, Z.rem 0 a = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_0_r : forall a : Z, Z.rem a 0 = a. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_divides : forall a b : Z, Z.rem a b = 0 <-> (exists c : Z, a = b * c). Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_even : forall a : Z, Z.rem a 2 = (if Z.even a then 0 else Z.sgn a). Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_le : forall a b : Z, 0 <= a -> 0 <= b -> Z.rem a b <= a. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_neg : forall a b : Z, a <= 0 -> b <> 0 -> - Z.abs b < Z.rem a b <= 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_neg_neg : forall a b : Z, a <= 0 -> b < 0 -> b < Z.rem a b <= 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_neg_pos : forall a b : Z, a <= 0 -> 0 < b -> - b < Z.rem a b <= 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_pos : forall a b : Z, 0 <= a -> b <> 0 -> 0 <= Z.rem a b < Z.abs b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_pos_neg : forall a b : Z, 0 <= a -> b < 0 -> 0 <= Z.rem a b < - b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_lt_pos_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= Z.rem a b < b. Proof. intros; nia. Qed.
+Lemma Zquot_Z_rem_mult : forall a b : Z, Z.rem (a * b) b = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_odd : forall a : Z, Z.rem a 2 = (if Z.odd a then Z.sgn a else 0). Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_opp_l : forall a b : Z, Z.rem (- a) b = - Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_opp_opp : forall a b : Z, Z.rem (- a) (- b) = - Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_opp_r : forall a b : Z, Z.rem a (- b) = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Z_rem_plus : forall a b c : Z, 0 <= (a + b * c) * a -> Z.rem (a + b * c) c = Z.rem a c. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_rem : forall a n : Z, Z.rem (Z.rem a n) n = Z.rem a n. Proof. intros; nia. Qed.
+Lemma Zquot_Z_rem_same : forall a : Z, Z.rem a a = 0. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_sgn2 : forall a b : Z, 0 <= Z.rem a b * a. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_sgn : forall a b : Z, 0 <= Z.sgn (Z.rem a b) * Z.sgn a. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_unique_full : forall a b q r : Z, Zquot.Remainder a b r -> a = b * q + r -> r = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_Zmod_pos : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b = a mod b. Proof. intros; nia. Qed.
+Lemma Zquot_Zrem_Zmod_zero : forall a b : Z, b <> 0 -> Z.rem a b = 0 <-> a mod b = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_0_l : forall a : Z, a <> 0 -> Z.rem 0 a = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_0_r_ext : forall x y : Z, y = 0 -> Z.rem x y = x. Proof. intros; nia. Qed.
+Lemma Z_rem_1_l : forall a : Z, 1 < a -> Z.rem 1 a = 1. Proof. intros; nia. Qed.
+Lemma Z_rem_1_r : forall a : Z, Z.rem a 1 = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_abs : forall a b : Z, b <> 0 -> Z.rem (Z.abs a) (Z.abs b) = Z.abs (Z.rem a b). Proof. intros; nia. Qed.
+Lemma Z_rem_abs_l : forall a b : Z, b <> 0 -> Z.rem (Z.abs a) b = Z.abs (Z.rem a b). Proof. intros; nia. Qed.
+Lemma Z_rem_abs_r : forall a b : Z, b <> 0 -> Z.rem a (Z.abs b) = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_add : forall a b c : Z, c <> 0 -> 0 <= (a + b * c) * a -> Z.rem (a + b * c) c = Z.rem a c. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_abs : forall a b : Z, b <> 0 -> Z.abs (Z.rem a b) < Z.abs b. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_neg_neg : forall x y : Z, y < 0 -> x <= 0 -> y < Z.rem x y <= 0. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_neg_pos : forall x y : Z, y < 0 -> 0 <= x -> 0 <= Z.rem x y < - y. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_pos : forall a b : Z, 0 <= a -> 0 < b -> 0 <= Z.rem a b < b. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_pos_neg : forall x y : Z, 0 < y -> x <= 0 -> - y < Z.rem x y <= 0. Proof. intros; nia. Qed.
+Lemma Z_rem_bound_pos_pos : forall x y : Z, 0 < y -> 0 <= x -> 0 <= Z.rem x y < y. Proof. intros; nia. Qed.
+Lemma Z_rem_eq : forall a b : Z, b <> 0 -> Z.rem a b = a - b * (a ÷ b). Proof. intros; nia. Qed.
+Lemma Z_rem_le : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b <= a. Proof. intros; nia. Qed.
+Lemma Z_rem_mod_eq_0 : forall a b : Z, b <> 0 -> Z.rem a b = 0 <-> a mod b = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_mod : forall a b : Z, b <> 0 -> Z.rem a b = Z.sgn a * (Z.abs a mod Z.abs b). Proof. intros; nia. Qed.
+Lemma Z_rem_mod_nonneg : forall a b : Z, 0 <= a -> 0 < b -> Z.rem a b = a mod b. Proof. intros; nia. Qed.
+Lemma Z_rem_mul : forall a b : Z, b <> 0 -> Z.rem (a * b) b = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_nonneg : forall a b : Z, b <> 0 -> 0 <= a -> 0 <= Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_nonpos : forall a b : Z, b <> 0 -> a <= 0 -> Z.rem a b <= 0. Proof. intros; nia. Qed.
+Lemma Z_rem_opp_l : forall a b : Z, b <> 0 -> Z.rem (- a) b = - Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_opp_l' : forall a b : Z, Z.rem (- a) b = - Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_opp_opp : forall a b : Z, b <> 0 -> Z.rem (- a) (- b) = - Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_opp_r : forall a b : Z, b <> 0 -> Z.rem a (- b) = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_opp_r' : forall a b : Z, Z.rem a (- b) = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_quot : forall a b : Z, b <> 0 -> Z.rem a b ÷ b = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_rem : forall a n : Z, n <> 0 -> Z.rem (Z.rem a n) n = Z.rem a n. Proof. intros; nia. Qed.
+Lemma Z_rem_same : forall a : Z, a <> 0 -> Z.rem a a = 0. Proof. intros; nia. Qed.
+Lemma Z_rem_sign : forall a b : Z, a <> 0 -> b <> 0 -> Z.sgn (Z.rem a b) <> - Z.sgn a. Proof. intros; nia. Qed.
+Lemma Z_rem_sign_mul : forall a b : Z, b <> 0 -> 0 <= Z.rem a b * a. Proof. intros; nia. Qed.
+Lemma Z_rem_sign_nz : forall a b : Z, b <> 0 -> Z.rem a b <> 0 -> Z.sgn (Z.rem a b) = Z.sgn a. Proof. intros; nia. Qed.
+Lemma Z_rem_small : forall a b : Z, 0 <= a < b -> Z.rem a b = a. Proof. intros; nia. Qed.
+Lemma Z_rem_small_iff : forall a b : Z, b <> 0 -> Z.rem a b = a <-> Z.abs a < Z.abs b. Proof. intros; nia. Qed.
+Lemma Z_rem_unique : forall a b q r : Z, 0 <= a -> 0 <= r < b -> a = b * q + r -> r = Z.rem a b. Proof. intros; nia. Qed.
+Lemma Z_rem_wd : Morphisms.Proper (Morphisms.respectful Z.eq (Morphisms.respectful Z.eq Z.eq)) Z.rem. Proof. intros; nia. Qed.
+*)
diff --git a/test-suite/success/Notations2.v b/test-suite/success/Notations2.v
index 1b33863e3b..2533a39cc4 100644
--- a/test-suite/success/Notations2.v
+++ b/test-suite/success/Notations2.v
@@ -154,3 +154,14 @@ Module M16.
Print Grammar foo.
Print Grammar foo2.
End M16.
+
+(* Example showing the need for strong evaluation of
+ cases_pattern_of_glob_constr (this used to raise Not_found at some
+ time) *)
+
+Module M17.
+
+Notation "# x ## t & u" := ((fun x => (x,t)),(fun x => (x,u))) (at level 0, x pattern).
+Check fun y : nat => # (x,z) ## y & y.
+
+End M17.
diff --git a/test-suite/success/NumeralNotations.v b/test-suite/success/NumeralNotations.v
index 47ef381270..7b857c70c5 100644
--- a/test-suite/success/NumeralNotations.v
+++ b/test-suite/success/NumeralNotations.v
@@ -300,3 +300,14 @@ Module Test16.
(** Ideally this should work, but it should definitely not anomaly *)
Fail Check let v := 0%test16 in v : Foo.
End Test16.
+
+Require Import Coq.Numbers.Cyclic.Int63.Int63.
+Module Test17.
+ (** Test int63 *)
+ Declare Scope test17_scope.
+ Delimit Scope test17_scope with test17.
+ Local Set Primitive Projections.
+ Record myint63 := of_int { to_int : int }.
+ Numeral Notation myint63 of_int to_int : test17_scope.
+ Check let v := 0%test17 in v : myint63.
+End Test17.
diff --git a/test-suite/success/Require.v b/test-suite/success/Require.v
index f851d8c7d9..de5987c4f7 100644
--- a/test-suite/success/Require.v
+++ b/test-suite/success/Require.v
@@ -1,3 +1,8 @@
+(* -*- coq-prog-args: ("-noinit"); -*- *)
+
Require Import Coq.Arith.Plus.
Require Coq.Arith.Minus.
Locate Library Coq.Arith.Minus.
+
+(* Check that Init didn't get exported by the import above *)
+Fail Check nat.
diff --git a/test-suite/success/Template.v b/test-suite/success/Template.v
index 1c6e2d81d8..cfc25c3346 100644
--- a/test-suite/success/Template.v
+++ b/test-suite/success/Template.v
@@ -25,7 +25,7 @@ Module AutoNo.
End AutoNo.
Module Yes.
- #[template]
+ #[universes(template)]
Inductive Box@{i} (A:Type@{i}) : Type@{i} := box : A -> Box A.
About Box.
@@ -37,7 +37,7 @@ Module Yes.
End Yes.
Module No.
- #[notemplate]
+ #[universes(notemplate)]
Inductive Box (A:Type) : Type := box : A -> Box A.
About Box.
diff --git a/test-suite/success/Typeclasses.v b/test-suite/success/Typeclasses.v
index 400479ae85..3888cafed3 100644
--- a/test-suite/success/Typeclasses.v
+++ b/test-suite/success/Typeclasses.v
@@ -14,7 +14,7 @@ Module onlyclasses.
Module RJung.
Class Foo (x : nat).
- Instance foo x : x = 2 -> Foo x.
+ Instance foo x : x = 2 -> Foo x := {}.
Hint Extern 0 (_ = _) => reflexivity : typeclass_instances.
Typeclasses eauto := debug.
Check (_ : Foo 2).
@@ -63,7 +63,7 @@ End RefineVsNoTceauto.
Module Leivantex2PR339.
(** Was a bug preventing to find hints associated with no pattern *)
Class Bar := {}.
- Instance bar1 (t:Type) : Bar.
+ Instance bar1 (t:Type) : Bar := {}.
Hint Extern 0 => exact True : typeclass_instances.
Typeclasses eauto := debug.
Goal Bar.
@@ -198,7 +198,9 @@ Module UniqueInstances.
for it. *)
Set Typeclasses Unique Instances.
Class Eq (A : Type) : Set.
+ Set Refine Instance Mode.
Instance eqa : Eq nat := _. constructor. Qed.
+ Unset Refine Instance Mode.
Instance eqb : Eq nat := {}.
Class Foo (A : Type) (e : Eq A) : Set.
Instance fooa : Foo _ eqa := {}.
@@ -220,10 +222,10 @@ Module IterativeDeepening.
Class B.
Class C.
- Instance: B -> A | 0.
- Instance: C -> A | 0.
- Instance: C -> B -> A | 0.
- Instance: A -> A | 0.
+ Instance: B -> A | 0 := {}.
+ Instance: C -> A | 0 := {}.
+ Instance: C -> B -> A | 0 := {}.
+ Instance: A -> A | 0 := {}.
Goal C -> A.
intros.
diff --git a/test-suite/success/attribute_syntax.v b/test-suite/success/attribute_syntax.v
index 7b972f4ed9..f4f59a3c16 100644
--- a/test-suite/success/attribute_syntax.v
+++ b/test-suite/success/attribute_syntax.v
@@ -11,7 +11,7 @@ End Scope.
Fail Check 0 = true :> nat.
-#[polymorphic]
+#[universes(polymorphic)]
Definition ι T (x: T) := x.
Check ι _ ι.
@@ -24,9 +24,9 @@ Reset f.
Ltac foo := foo.
Module M.
- #[local] #[polymorphic] Definition zed := Type.
+ #[local] #[universes(polymorphic)] Definition zed := Type.
- #[local, polymorphic] Definition kats := Type.
+ #[local, universes(polymorphic)] Definition kats := Type.
End M.
Check M.zed@{_}.
Fail Check zed.
diff --git a/test-suite/success/auto.v b/test-suite/success/auto.v
index 5477c83316..62a66daf7d 100644
--- a/test-suite/success/auto.v
+++ b/test-suite/success/auto.v
@@ -51,7 +51,7 @@ Qed.
Class B (A : Type).
Class I.
-Instance i : I.
+Instance i : I := {}.
Definition flip {A B C : Type} (f : A -> B -> C) := fun y x => f x y.
Class D (f : nat -> nat -> nat).
@@ -59,7 +59,7 @@ Definition ftest (x y : nat) := x + y.
Definition flipD (f : nat -> nat -> nat) : D f -> D (flip f).
Admitted.
Module Instnopat.
- Local Instance: B nat.
+ Local Instance: B nat := {}.
(* pattern_of_constr -> B nat *)
(* exact hint *)
Check (_ : B nat).
@@ -72,7 +72,7 @@ Module Instnopat.
eauto with typeclass_instances.
Qed.
- Local Instance: D ftest.
+ Local Instance: D ftest := {}.
Local Hint Resolve flipD | 0 : typeclass_instances.
(* pattern: D (flip _) *)
Fail Timeout 1 Check (_ : D _). (* loops applying flipD *)
@@ -80,7 +80,7 @@ Module Instnopat.
End Instnopat.
Module InstnopatApply.
- Local Instance: I -> B nat.
+ Local Instance: I -> B nat := {}.
(* pattern_of_constr -> B nat *)
(* apply hint *)
Check (_ : B nat).
@@ -116,7 +116,7 @@ Module InstPat.
Hint Extern 0 (D (flip _)) => apply flipD : typeclass_instances.
Module withftest.
- Local Instance: D ftest.
+ Local Instance: D ftest := {}.
Check (_ : D _).
(* D_instance_0 : D ftest *)
diff --git a/test-suite/success/autointros.v b/test-suite/success/autointros.v
index 0a0812711c..1140a537fc 100644
--- a/test-suite/success/autointros.v
+++ b/test-suite/success/autointros.v
@@ -1,5 +1,3 @@
-Set Automatic Introduction.
-
Inductive even : nat -> Prop :=
| even_0 : even 0
| even_odd : forall n, odd n -> even (S n)
diff --git a/test-suite/success/bteauto.v b/test-suite/success/bteauto.v
index 730b367d60..cea7d92c0b 100644
--- a/test-suite/success/bteauto.v
+++ b/test-suite/success/bteauto.v
@@ -149,10 +149,10 @@ Module IterativeDeepening.
Class B.
Class C.
- Instance: B -> A | 0.
- Instance: C -> A | 0.
- Instance: C -> B -> A | 0.
- Instance: A -> A | 0.
+ Instance: B -> A | 0 := {}.
+ Instance: C -> A | 0 := {}.
+ Instance: C -> B -> A | 0 := {}.
+ Instance: A -> A | 0 := {}.
Goal C -> A.
intros.
diff --git a/test-suite/success/cumulativity.v b/test-suite/success/cumulativity.v
index 3d97f27b16..31fed98952 100644
--- a/test-suite/success/cumulativity.v
+++ b/test-suite/success/cumulativity.v
@@ -137,3 +137,12 @@ Module WithIndex.
Monomorphic Constraint i < j.
Definition bar : eq mkfoo@{i} mkfoo@{j} := eq_refl _.
End WithIndex.
+
+Module CumulApp.
+
+ (* i is covariant here, and we have one parameter *)
+ Inductive foo@{i} (A : nat) : Type@{i+1} := mkfoo (B : Type@{i}).
+
+ Definition bar@{i j|i<=j} := fun x : foo@{i} 0 => x : foo@{j} 0.
+
+End CumulApp.
diff --git a/test-suite/success/destruct.v b/test-suite/success/destruct.v
index d1d384659b..573912c7cd 100644
--- a/test-suite/success/destruct.v
+++ b/test-suite/success/destruct.v
@@ -263,7 +263,7 @@ Abort.
(* This one was working in 8.4 (because of full conv on closed arguments) *)
Class E.
-Instance a:E.
+Instance a:E := {}.
Goal forall h : E -> nat -> nat, h (id a) 0 = h a 0.
intros.
destruct (h _).
diff --git a/test-suite/success/eauto.v b/test-suite/success/eauto.v
index c44747379f..5b616ccc33 100644
--- a/test-suite/success/eauto.v
+++ b/test-suite/success/eauto.v
@@ -9,11 +9,11 @@
(************************************************************************)
Class A (A : Type).
- Instance an: A nat.
+ Instance an: A nat := {}.
Class B (A : Type) (a : A).
-Instance bn0: B nat 0.
-Instance bn1: B nat 1.
+Instance bn0: B nat 0 := {}.
+Instance bn1: B nat 1 := {}.
Goal A nat.
Proof.
@@ -39,7 +39,7 @@ Proof.
eexists. eexists. typeclasses eauto.
Defined.
-Instance ab: A bool. (* Backtrack on A instance *)
+Instance ab: A bool := {}. (* Backtrack on A instance *)
Goal exists (T : Type) (t : T), A T /\ B T t.
Proof.
eexists. eexists. typeclasses eauto.
@@ -51,7 +51,7 @@ Hint Extern 0 { x : ?A & _ } =>
unshelve class_apply @existT : typeclass_instances.
Existing Class sigT.
Set Typeclasses Debug.
-Instance can: C an 0.
+Instance can: C an 0 := {}.
(* Backtrack on instance implementation *)
Goal exists (T : Type) (t : T), { x : A T & C x t }.
Proof.
@@ -59,7 +59,7 @@ Proof.
Defined.
Class D T `(a: A T).
- Instance: D _ an.
+ Instance: D _ an := {}.
Goal exists (T : Type), { x : A T & D T x }.
Proof.
eexists. typeclasses eauto.
diff --git a/test-suite/success/module_with_def_univ_poly.v b/test-suite/success/module_with_def_univ_poly.v
new file mode 100644
index 0000000000..a547be4c46
--- /dev/null
+++ b/test-suite/success/module_with_def_univ_poly.v
@@ -0,0 +1,31 @@
+
+(* When doing Module Foo with Definition bar := ..., bar must be
+ generated with the same polymorphism as Foo.bar. *)
+Module Mono.
+ Unset Universe Polymorphism.
+ Module Type T.
+ Parameter foo : Type.
+ End T.
+
+ Module Type F(A:T). End F.
+
+ Set Universe Polymorphism.
+ Module M : T with Definition foo := Type.
+ Monomorphic Definition foo := Type.
+ End M.
+End Mono.
+
+Module Poly.
+ Set Universe Polymorphism.
+
+ Module Type T.
+ Parameter foo@{i|Set < i} : Type@{i}.
+ End T.
+
+ Module Type F(A:T). End F.
+
+ Unset Universe Polymorphism.
+ Module M : T with Definition foo := Set : Type.
+ Polymorphic Definition foo := Set : Type.
+ End M.
+End Poly.
diff --git a/test-suite/success/polymorphism.v b/test-suite/success/polymorphism.v
index d76b307914..339f798240 100644
--- a/test-suite/success/polymorphism.v
+++ b/test-suite/success/polymorphism.v
@@ -165,19 +165,13 @@ Module binders.
exact A.
Defined.
- Definition nomoreu@{i j | i < j +} (A : Type@{i}) : Type@{j}.
- pose(foo:=Type).
- exact A.
- Fail Defined.
- Abort.
-
- Polymorphic Definition moreu@{i j +} (A : Type@{i}) : Type@{j}.
- pose(foo:=Type).
- exact A.
- Defined.
+ Polymorphic Lemma hidden_strict_type : Type.
+ Proof.
+ exact Type.
+ Qed.
+ Check hidden_strict_type@{_}.
+ Fail Check hidden_strict_type@{Set}.
- Check moreu@{_ _ _ _}.
-
Fail Definition morec@{i j|} (A : Type@{i}) : Type@{j} := A.
(* By default constraints are extensible *)
diff --git a/test-suite/success/private_univs.v b/test-suite/success/private_univs.v
new file mode 100644
index 0000000000..5c30b33435
--- /dev/null
+++ b/test-suite/success/private_univs.v
@@ -0,0 +1,50 @@
+Set Universe Polymorphism. Set Printing Universes.
+
+Definition internal_defined@{i j | i < j +} (A : Type@{i}) : Type@{j}.
+ pose(foo:=Type). (* 1 universe for the let body + 1 for the type *)
+ exact A.
+ Fail Defined.
+Abort.
+
+Definition internal_defined@{i j +} (A : Type@{i}) : Type@{j}.
+pose(foo:=Type).
+exact A.
+Defined.
+Check internal_defined@{_ _ _ _}.
+
+Module M.
+Lemma internal_qed@{i j|i<=j} (A:Type@{i}) : Type@{j}.
+Proof.
+ pose (foo := Type).
+ exact A.
+Qed.
+Check internal_qed@{_ _}.
+End M.
+Include M.
+(* be careful to remove const_private_univs in Include! will be coqchk'd *)
+
+Unset Strict Universe Declaration.
+Lemma private_transitivity@{i j} (A:Type@{i}) : Type@{j}.
+Proof.
+ pose (bar := Type : Type@{j}).
+ pose (foo := Type@{i} : bar).
+ exact bar.
+Qed.
+
+Definition private_transitivity'@{i j|i < j} := private_transitivity@{i j}.
+Fail Definition dummy@{i j|j <= i +} := private_transitivity@{i j}.
+
+Unset Private Polymorphic Universes.
+Lemma internal_noprivate_qed@{i j|i<=j} (A:Type@{i}) : Type@{j}.
+Proof.
+ pose (foo := Type).
+ exact A.
+ Fail Qed.
+Abort.
+
+Lemma internal_noprivate_qed@{i j +} (A:Type@{i}) : Type@{j}.
+Proof.
+ pose (foo := Type).
+ exact A.
+Qed.
+Check internal_noprivate_qed@{_ _ _ _}.
diff --git a/test-suite/success/setoid_test2.v b/test-suite/success/setoid_test2.v
index 79467e549c..351481b0b6 100644
--- a/test-suite/success/setoid_test2.v
+++ b/test-suite/success/setoid_test2.v
@@ -120,7 +120,7 @@ Axiom eqS1: S1 -> S1 -> Prop.
Axiom SetoidS1 : Setoid_Theory S1 eqS1.
Add Setoid S1 eqS1 SetoidS1 as S1setoid.
-Instance eqS1_default : DefaultRelation eqS1.
+Instance eqS1_default : DefaultRelation eqS1 := {}.
Axiom eqS1': S1 -> S1 -> Prop.
Axiom SetoidS1' : Setoid_Theory S1 eqS1'.
@@ -220,7 +220,7 @@ Axiom eqS1_test8: S1_test8 -> S1_test8 -> Prop.
Axiom SetoidS1_test8 : Setoid_Theory S1_test8 eqS1_test8.
Add Setoid S1_test8 eqS1_test8 SetoidS1_test8 as S1_test8setoid.
-Instance eqS1_test8_default : DefaultRelation eqS1_test8.
+Instance eqS1_test8_default : DefaultRelation eqS1_test8 := {}.
Axiom f_test8 : S2 -> S1_test8.
Add Morphism f_test8 with signature (eqS2 ==> eqS1_test8) as f_compat_test8. Admitted.
diff --git a/test-suite/success/sprop.v b/test-suite/success/sprop.v
new file mode 100644
index 0000000000..268c1880d2
--- /dev/null
+++ b/test-suite/success/sprop.v
@@ -0,0 +1,189 @@
+(* -*- mode: coq; coq-prog-args: ("-allow-sprop") -*- *)
+
+Set Primitive Projections.
+Set Warnings "+non-primitive-record".
+Set Warnings "+bad-relevance".
+
+Check SProp.
+
+Definition iUnit : SProp := forall A : SProp, A -> A.
+
+Definition itt : iUnit := fun A a => a.
+
+Definition iUnit_irr (P : iUnit -> Type) (x y : iUnit) : P x -> P y
+ := fun v => v.
+
+Definition iSquash (A:Type) : SProp
+ := forall P : SProp, (A -> P) -> P.
+Definition isquash A : A -> iSquash A
+ := fun a P f => f a.
+Definition iSquash_rect A (P : iSquash A -> SProp) (H : forall x : A, P (isquash A x))
+ : forall x : iSquash A, P x
+ := fun x => x (P x) (H : A -> P x).
+
+Fail Check (fun A : SProp => A : Type).
+
+Lemma foo : Prop.
+Proof. pose (fun A : SProp => A : Type); exact True. Fail Qed. Abort.
+
+(* define evar as product *)
+Check (fun (f:(_:SProp)) => f _).
+
+Inductive sBox (A:SProp) : Prop
+ := sbox : A -> sBox A.
+
+Definition uBox := sBox iUnit.
+
+Definition sBox_irr A (x y : sBox A) : x = y.
+Proof.
+ Fail reflexivity.
+ destruct x as [x], y as [y].
+ reflexivity.
+Defined.
+
+(* Primitive record with all fields in SProp has the eta property of SProp so must be SProp. *)
+Fail Record rBox (A:SProp) : Prop := rmkbox { runbox : A }.
+Section Opt.
+ Local Unset Primitive Projections.
+ Record rBox (A:SProp) : Prop := rmkbox { runbox : A }.
+End Opt.
+
+(* Check that defining as an emulated record worked *)
+Check runbox.
+
+(* Check that it doesn't have eta *)
+Fail Check (fun (A : SProp) (x : rBox A) => eq_refl : x = @rmkbox _ (@runbox _ x)).
+
+Inductive sEmpty : SProp := .
+
+Inductive sUnit : SProp := stt.
+
+Inductive BIG : SProp := foo | bar.
+
+Inductive Squash (A:Type) : SProp
+ := squash : A -> Squash A.
+
+Definition BIG_flip : BIG -> BIG.
+Proof.
+ intros [|]. exact bar. exact foo.
+Defined.
+
+Inductive pb : Prop := pt | pf.
+
+Definition pb_big : pb -> BIG.
+Proof.
+ intros [|]. exact foo. exact bar.
+Defined.
+
+Fail Definition big_pb (b:BIG) : pb :=
+ match b return pb with foo => pt | bar => pf end.
+
+Inductive which_pb : pb -> SProp :=
+| is_pt : which_pb pt
+| is_pf : which_pb pf.
+
+Fail Definition pb_which b (w:which_pb b) : bool
+ := match w with
+ | is_pt => true
+ | is_pf => false
+ end.
+
+(* Non primitive because no arguments, but maybe we should allow it for sprops? *)
+Fail Record UnitRecord : SProp := {}.
+
+Section Opt.
+ Local Unset Primitive Projections.
+ Record UnitRecord' : SProp := {}.
+End Opt.
+Fail Scheme Induction for UnitRecord' Sort Set.
+
+Record sProd (A B : SProp) : SProp := sPair { sFst : A; sSnd : B }.
+
+Scheme Induction for sProd Sort Set.
+
+Unset Primitive Projections.
+Record sProd' (A B : SProp) : SProp := sPair' { sFst' : A; sSnd' : B }.
+Set Primitive Projections.
+
+Fail Scheme Induction for sProd' Sort Set.
+
+Inductive Istrue : bool -> SProp := istrue : Istrue true.
+
+Definition Istrue_sym (b:bool) := if b then sUnit else sEmpty.
+Definition Istrue_to_sym b (i:Istrue b) : Istrue_sym b := match i with istrue => stt end.
+
+Definition Istrue_rec (P:forall b, Istrue b -> Set) (H:P true istrue) b (i:Istrue b) : P b i.
+Proof.
+ destruct b.
+ - exact_no_check H.
+ - apply sEmpty_rec. apply Istrue_to_sym in i. exact i.
+Defined.
+
+Check (fun P v (e:Istrue true) => eq_refl : Istrue_rec P v _ e = v).
+
+Record Truepack := truepack { trueval :> bool; trueprop : Istrue trueval }.
+
+Definition Truepack_eta (x : Truepack) (i : Istrue x) : x = truepack x i := @eq_refl Truepack x.
+
+Class emptyclass : SProp := emptyinstance : forall A:SProp, A.
+
+(** Sigma in SProp can be done through Squash and relevant sigma. *)
+Definition sSigma (A:SProp) (B:A -> SProp) : SProp
+ := Squash (@sigT (rBox A) (fun x => rBox (B (runbox _ x)))).
+
+Definition spair (A:SProp) (B:A->SProp) (x:A) (y:B x) : sSigma A B
+ := squash _ (existT _ (rmkbox _ x) (rmkbox _ y)).
+
+Definition spr1 (A:SProp) (B:A->SProp) (p:sSigma A B) : A
+ := let 'squash _ (existT _ x y) := p in runbox _ x.
+
+Definition spr2 (A:SProp) (B:A->SProp) (p:sSigma A B) : B (spr1 A B p)
+ := let 'squash _ (existT _ x y) := p return B (spr1 A B p) in runbox _ y.
+(* it's SProp so it computes properly *)
+
+(** Fixpoints on SProp values are only allowed to produce SProp results *)
+Inductive sAcc (x:nat) : SProp := sAcc_in : (forall y, y < x -> sAcc y) -> sAcc x.
+
+Definition sAcc_inv x (s:sAcc x) : forall y, y < x -> sAcc y.
+Proof.
+ destruct s as [H]. exact H.
+Defined.
+
+Section sFix_fail.
+ Variable P : nat -> Type.
+ Variable F : forall x:nat, (forall y:nat, y < x -> P y) -> P x.
+
+ Fail Fixpoint sFix (x:nat) (a:sAcc x) {struct a} : P x :=
+ F x (fun (y:nat) (h: y < x) => sFix y (sAcc_inv x a y h)).
+End sFix_fail.
+
+Section sFix.
+ Variable P : nat -> SProp.
+ Variable F : forall x:nat, (forall y:nat, y < x -> P y) -> P x.
+
+ Fixpoint sFix (x:nat) (a:sAcc x) {struct a} : P x :=
+ F x (fun (y:nat) (h: y < x) => sFix y (sAcc_inv x a y h)).
+
+End sFix.
+
+(** Relevance repairs *)
+
+Fail Definition fix_relevance : _ -> nat := fun _ : iUnit => 0.
+
+Require Import ssreflect.
+
+Goal forall T : SProp, T -> True.
+Proof.
+ move=> T +.
+ intros X;exact I.
+Qed.
+
+Set Warnings "-bad-relevance".
+Definition fix_relevance : _ -> nat := fun _ : iUnit => 0.
+
+(* relevance isn't fixed when checking P x == P y *)
+Fail Definition relevance_unfixed := fun (A:SProp) (P:A -> Prop) x y (v:P x) => v : P y.
+
+(* but the kernel is fine *)
+Definition relevance_unfixed := fun (A:SProp) (P:A -> Prop) x y (v:P x) =>
+ ltac:(exact_no_check v) : P y.
diff --git a/test-suite/success/sprop_hcons.v b/test-suite/success/sprop_hcons.v
new file mode 100644
index 0000000000..14772dd62b
--- /dev/null
+++ b/test-suite/success/sprop_hcons.v
@@ -0,0 +1,52 @@
+(* -*- coq-prog-args: ("-allow-sprop"); -*- *)
+
+(* A bug due to bad hashconsing of case info *)
+
+Inductive sBox (A : SProp) : Type :=
+ sbox : A -> sBox A.
+
+Definition ubox {A : SProp} (bA : sBox A) : A :=
+ match bA with
+ sbox _ X => X
+ end.
+
+Inductive sle : nat -> nat -> SProp :=
+ sle_0 : forall n, sle 0 n
+| sle_S : forall n m : nat, sle n m -> sle (S n) (S m).
+
+Definition sle_Sn (n : nat) : sle n (S n).
+Proof.
+ induction n; constructor; auto.
+Defined.
+
+Definition sle_trans {n m p} (H : sle n m) (H': sle m p) : sle n p.
+Proof.
+ revert H'. revert p. induction H.
+ - intros p H'. apply sle_0.
+ - intros p H'. inversion H'. apply ubox. subst. apply sbox. apply sle_S. apply IHsle;auto.
+Defined.
+
+Lemma sle_Sn_m {n m} : sle n m -> sle n (S m).
+Proof.
+ intros H. destruct n.
+ - constructor.
+ - constructor;auto. assert (H1 : sle n (S n)) by apply sle_Sn.
+ exact (sle_trans H1 H ).
+Defined.
+
+Definition sle_Sn_Sm {n m} : sle (S n) (S m) -> sle n m.
+Proof.
+ intros H.
+ inversion H. apply ubox. subst. apply sbox. exact H2.
+Qed.
+
+
+Notation "g ∘ f" := (sle_trans g f) (at level 40).
+
+Lemma bazz q0 m (f : sle (S q0) (S m)) :
+ sbox _ (sle_Sn q0 ∘ f) = sbox _ (sle_Sn_m (sle_Sn_Sm f)).
+Proof.
+ reflexivity. (* used to fail *)
+ (* NB: exact eq_refl succeeded even with the bug so no guarantee
+ that this test will continue to test the right thing. *)
+Qed.
diff --git a/test-suite/success/unidecls.v b/test-suite/success/unidecls.v
index 7c298c98b6..1bc565cbb5 100644
--- a/test-suite/success/unidecls.v
+++ b/test-suite/success/unidecls.v
@@ -1,4 +1,4 @@
-(* coq-prog-args: ("-top" "unidecls") *)
+(* -*- coq-prog-args: ("-top" "unidecls"); -*- *)
Set Printing Universes.
Module decls.
@@ -46,12 +46,12 @@ Universe secfoo.
Section Foo'.
Fail Universe secfoo.
Universe secfoo2.
- Check Type@{Foo'.secfoo2}.
+ Fail Check Type@{Foo'.secfoo2}.
+ Check Type@{secfoo2}.
Constraint secfoo2 < a.
End Foo'.
Check Type@{secfoo2}.
-Fail Check Type@{Foo'.secfoo2}.
Fail Check eq_refl : Type@{secfoo2} = Type@{a}.
(** Below, u and v are global, fixed universes *)
diff --git a/test-suite/success/univers.v b/test-suite/success/univers.v
index 2863404590..28426b5700 100644
--- a/test-suite/success/univers.v
+++ b/test-suite/success/univers.v
@@ -60,7 +60,7 @@ Qed.
Record U : Type := { A:=Type; a:A }.
-(** Check assignement of sorts to inductives and records. *)
+(** Check assignment of sorts to inductives and records. *)
Variable sh : list nat.
diff --git a/test-suite/tools/update-compat/run.sh b/test-suite/tools/update-compat/run.sh
index 02a2348450..61273c4f37 100755
--- a/test-suite/tools/update-compat/run.sh
+++ b/test-suite/tools/update-compat/run.sh
@@ -6,4 +6,4 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
# we assume that the script lives in test-suite/tools/update-compat/,
# and that update-compat.py lives in dev/tools/
cd "${SCRIPT_DIR}/../../.."
-dev/tools/update-compat.py --assert-unchanged --cur-version=8.9 || exit $?
+dev/tools/update-compat.py --assert-unchanged --master || exit $?
diff --git a/test-suite/unit-tests/lib/pp_big_vect.ml b/test-suite/unit-tests/lib/pp_big_vect.ml
new file mode 100644
index 0000000000..e1cdd290e2
--- /dev/null
+++ b/test-suite/unit-tests/lib/pp_big_vect.ml
@@ -0,0 +1,14 @@
+open OUnit
+open Pp
+
+let pr_big_vect =
+ let n = "pr_big_vect" in
+ n >:: (fun () ->
+ let v = Array.make (1 lsl 20) () in
+ let pp = prvecti_with_sep spc (fun _ _ -> str"x") v in
+ let str = string_of_ppcmds pp in
+ ignore(str))
+
+let tests = [pr_big_vect]
+
+let () = Utest.run_tests __FILE__ (Utest.open_log_out_ch __FILE__) tests
diff --git a/test-suite/unit-tests/printing/proof_diffs_test.ml b/test-suite/unit-tests/printing/proof_diffs_test.ml
index 526cefec44..d0b8d21b69 100644
--- a/test-suite/unit-tests/printing/proof_diffs_test.ml
+++ b/test-suite/unit-tests/printing/proof_diffs_test.ml
@@ -51,26 +51,38 @@ let t () =
assert_equal ~msg:"has `Removed" ~printer:string_of_bool true has_removed
let _ = add_test "diff_str add/remove" t
-(* example of a limitation, not really a test *)
-let t () =
- try
- let _ = diff_str "a" "&gt;" in
- assert_failure "unlexable string gives an exception"
- with _ -> ()
-let _ = add_test "diff_str unlexable" t
-
-(* problematic examples for tokenize_string:
- comments omitted
- quoted string loses quote marks (are escapes supported/handled?)
- char constant split into 2
+(* lexer tweaks:
+ comments are lexed as multiple tokens
+ strings tokens include begin/end quotes and embedded ""
+ single multibyte characters returned even if they're not keywords
+
+ inputs that give a lexer failure (but no use case needs them yet):
+ ".12"
+ unterminated string
+ invalid UTF-8 sequences
*)
let t () =
- List.iter (fun x -> cprintf "'%s' " x) (tokenize_string "(* comment *) \"string\" 'c' xx");
- cprintf "\n"
-let _ = add_test "tokenize_string examples" t
+ let str = "(* comment.field *) ?id () \"str\"\"ing\" \\ := Ж &gt; ∃ 'c' xx" in
+ let toks = tokenize_string str in
+ (*List.iter (fun x -> cprintf "'%s' " x) toks;*)
+ (*cprintf "\n";*)
+ let str_no_white = String.concat "" (String.split_on_char ' ' str) in
+ assert_equal ~printer:(fun x -> x) str_no_white (String.concat "" toks);
+ List.iter (fun s ->
+ assert_equal ~msg:("'" ^ s ^ "' is a single token") ~printer:string_of_bool true (List.mem s toks))
+ [ "(*"; "()"; ":="]
+
+let _ = add_test "tokenize_string/diff_mode in lexer" t
open Pp
+(* example that was failing from #8922 *)
+let t () =
+ Proof_diffs.write_diffs_option "removed";
+ ignore (diff_str "X : ?Goal" "X : forall x : ?Goal0, ?Goal1");
+ Proof_diffs.write_diffs_option "on"
+let _ = add_test "shorten_diff_span failure from #8922" t
+
(* note pp_to_string concatenates adjacent strings, could become one token,
e.g. str " a" ++ str "b " will give a token "ab" *)
(* checks background is present and correct *)