diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 09ff17477..279a6b252 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -17,6 +17,22 @@ updates:
interval: "daily"
labels:
- "dependencies"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ target-branch: "coq-8.20"
+ schedule:
+ # Check for updates to GitHub Actions every weekday
+ interval: "daily"
+ labels:
+ - "dependencies"
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ target-branch: "coq-8.19"
+ schedule:
+ # Check for updates to GitHub Actions every weekday
+ interval: "daily"
+ labels:
+ - "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "coq-8.18"
diff --git a/.nix/coq-overlays/equations/default.nix b/.nix/coq-overlays/equations/default.nix
index ffe72ad33..7c0ffb8eb 100644
--- a/.nix/coq-overlays/equations/default.nix
+++ b/.nix/coq-overlays/equations/default.nix
@@ -63,5 +63,5 @@ with lib; (mkCoqDerivation {
maintainers = with maintainers; [ jwiegley ];
};
}).overrideAttrs (o: {
- preBuild = "coq_makefile -f _CoqProject -o Makefile${optionalString (versionAtLeast o.version "1.2.1" || o.version == "dev") ".coq"}";
+ preBuild = "rocq makefile -f _CoqProject -o Makefile${optionalString (versionAtLeast o.version "1.2.1" || o.version == "dev") ".coq"}";
})
diff --git a/.vscode/metacoq.code-workspace b/.vscode/metacoq.code-workspace
index acfd61685..19070be95 100644
--- a/.vscode/metacoq.code-workspace
+++ b/.vscode/metacoq.code-workspace
@@ -7,7 +7,7 @@
"settings": {
// A list of arguments to send to coqtop. Use seperate elements instead of spaces to seperate each argument, especially when a flag expects another trailing argument, e.g. `["-I","./bin"]` instead of `["-I ./bin"]`
- "coqtop.args": [
+ "coqtop.args": [
// "-bt", // get backtraces from Coq on errors
"-R", "utils/theories", "MetaCoq.Utils",
"-R", "common/theories", "MetaCoq.Common",
@@ -90,7 +90,6 @@
],
// When enabled, will trim trailing whitespace when saving a file.
"files.trimTrailingWhitespace": true,
- "coqtop.binPath": "_opam/bin",
"vscoq.path": "_opam/bin/vscoqtop",
"coq-lsp.path": "_opam/bin/coq-lsp",
"files.exclude": {
@@ -107,5 +106,8 @@
"**/Thumbs.db": true
},
"coq-lsp.check_only_on_request": true,
+ "coqtop.binPath": "_opam/bin",
+ "coqtop.coqtopExe": "coqtop",
+ "coqtop.coqidetopExe": "coqidetop",
}
}
diff --git a/DOC.md b/DOC.md
index 399bf42a6..e41cc4740 100644
--- a/DOC.md
+++ b/DOC.md
@@ -2,7 +2,7 @@
## Branches and compatibility
-**tl;dr** You should do your PRs against [coq-8.18](https://github.com/MetaCoq/metacoq/tree/coq-8.16).
+**tl;dr** You should do your PRs against [coq-8.20](https://github.com/MetaCoq/metacoq/tree/coq-8.20).
Coq's kernel API is not stable yet, and changes there are reflected in MetaCoq's reified structures,
so we do not ensure any compatibility from version to version. There is one branch for each Coq version.
@@ -10,7 +10,7 @@ so we do not ensure any compatibility from version to version. There is one bran
The *main branch* or *current branch* is the one which appers when you go on
[https://github.com/MetaCoq/metacoq](https://github.com/MetaCoq/metacoq).
Currently (unless you are reading the README of an outdated branch),
-it is the [coq-8.16](https://github.com/MetaCoq/metacoq/tree/coq-8.16).
+it is the [coq-8.20](https://github.com/MetaCoq/metacoq/tree/coq-8.20).
You should use it both for usage of MetaCoq and development of MetaCoq.
The [main](https://github.com/MetaCoq/metacoq/tree/main) branch is following Coq's master
@@ -21,10 +21,6 @@ stable release of Coq.
-The branches [coq-8.17](https://github.com/MetaCoq/metacoq/tree/coq-8.17) and [coq-8.18](https://github.com/MetaCoq/metacoq/tree/coq-8.18) are being kept in sync.
-The branches [coq-8.6](https://github.com/MetaCoq/metacoq/tree/coq-8.6) to [coq-8.15](https://github.com/MetaCoq/metacoq/tree/coq-8.16) are frozen.
-
-
## Program and Equations
MetaCoq relies on `Program` and `Equations` plugins, however try to avoid `Program` as it
@@ -32,7 +28,7 @@ inserts some JMeq and UIP axioms silently, whereas we try to keep the developmen
You can use `Equations` to do some dependent induction (`dependent induction`,
`dependent destruction`, `depelim`). You may need to add:
```
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
```
## ident vs. qualid. vs kername
@@ -89,7 +85,7 @@ a fresh level when `MetaCoq Strict Unquote Universe Mode` is off.
## Dependency graph between files
-Generated on 2022/07/01, sources [there](https://github.com/MetaCoq/metacoq/tree/coq-8.16/dependency-graph).
+Generated on 2022/07/01, sources [there](https://github.com/MetaCoq/metacoq/tree/coq-8.20/dependency-graph).
/dev/null),)
- OCAMLPATH := $(shell pwd)/template-coq/:$(OCAMLPATH)
+ OCAMLPATH := $(shell pwd)/template-coq/:$(shell pwd)/safechecker-plugin/src:$(shell pwd)/erasure-plugin/src:$(OCAMLPATH)
else
OCAMLPATH := $(shell cygpath -m `pwd`)/template-coq/;$(OCAMLPATH)
endif
diff --git a/common/Makefile b/common/Makefile
index 128708724..096100445 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -25,7 +25,7 @@ mrproper:
rm -f Makefile.coq
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
.merlin: Makefile.coq
$(MAKE) -f $< $@
diff --git a/common/theories/BasicAst.v b/common/theories/BasicAst.v
index 564a026c1..60fecbeca 100644
--- a/common/theories/BasicAst.v
+++ b/common/theories/BasicAst.v
@@ -1,8 +1,8 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect Morphisms Orders Setoid.
+From Stdlib Require Import ssreflect Morphisms Orders Setoid.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Export Kernames.
-From Coq Require Floats.SpecFloat.
+From Stdlib Require Floats.SpecFloat.
From Equations Require Import Equations.
(** Identifiers that are allowed to be anonymous (i.e. "_" in concrete syntax). *)
diff --git a/common/theories/EnvMap.v b/common/theories/EnvMap.v
index 40e01e87e..9b128b2b4 100644
--- a/common/theories/EnvMap.v
+++ b/common/theories/EnvMap.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts.
+From Stdlib Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts.
From MetaCoq.Utils Require Import utils String2pos CanonicalTries.
From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames.
From Equations Require Import Equations.
diff --git a/common/theories/Environment.v b/common/theories/Environment.v
index b7c5005fe..e2a075a97 100644
--- a/common/theories/Environment.v
+++ b/common/theories/Environment.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool ssrfun Morphisms Setoid.
+From Stdlib Require Import ssreflect ssrbool ssrfun Morphisms Setoid.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Primitive Universes.
From Equations.Prop Require Import Classes EqDecInstances.
@@ -218,7 +218,7 @@ Module Environment (T : Term).
decl_body := decl_body x;
decl_type := decl_type x |}.
- (** Count the number of assumptions in a context (i.e. declarations that do not
+ (** Count the number of assumptions in a context (i.e. declarations that do not
contain a body). *)
Fixpoint context_assumptions (Γ : context) : nat :=
match Γ with
@@ -327,7 +327,7 @@ Module Environment (T : Term).
`ind_bodies ,,, ind_params ,,, cstr_args |- cstr_indices`. *)
cstr_indices : list term;
(** Full type of the constructor, which can depend on the inductives in the same block :
- `ind_bodies |- cstr_type`. This should be equal to
+ `ind_bodies |- cstr_type`. This should be equal to
`forall ind_params cstr_args, I ind_params cstr_indices` *)
cstr_type : term;
(** Number of arguments of the constructor, _without_ let-in arguments and _without_ parameters.
@@ -341,7 +341,7 @@ Module Environment (T : Term).
proj_name : ident;
(** Relevance of the projection. *)
proj_relevance : relevance;
- (** Type of the projection, wich can depend on the parameters of the inductive
+ (** Type of the projection, wich can depend on the parameters of the inductive
and on the object we are projecting from : `ind_params ,,, x |- proj_type`. *)
proj_type : term;
}.
@@ -365,21 +365,21 @@ Module Environment (T : Term).
(** Data associated to a single inductive in a mutual inductive block. *)
Record one_inductive_body := {
(** Name of the inductive, without the module path. *)
- ind_name : ident;
+ ind_name : ident;
(** Indices of the inductive, which can depend on the parameters :
`ind_params |- ind_indices`. *)
ind_indices : context;
- (** Sort of the inductive. *)
- ind_sort : Sort.t;
+ (** Sort of the inductive. *)
+ ind_sort : Sort.t;
(** Full type of the inductive. This should be equal to
`forall ind_params ind_indices, tSort ind_sort` *)
- ind_type : term;
+ ind_type : term;
(** Allowed eliminations for the inductive. *)
- ind_kelim : allowed_eliminations;
+ ind_kelim : allowed_eliminations;
(** Constructors of the inductive. Order is important. *)
ind_ctors : list constructor_body;
(** Names and types of primitive projections, if any. *)
- ind_projs : list projection_body;
+ ind_projs : list projection_body;
(** Relevance of the inductive. *)
ind_relevance : relevance }.
diff --git a/common/theories/EnvironmentReflect.v b/common/theories/EnvironmentReflect.v
index 5565d1c76..083f297ef 100644
--- a/common/theories/EnvironmentReflect.v
+++ b/common/theories/EnvironmentReflect.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool ssrfun Morphisms Setoid.
+From Stdlib Require Import ssreflect ssrbool ssrfun Morphisms Setoid.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Primitive Universes Environment Reflect.
From Equations.Prop Require Import Classes EqDecInstances.
diff --git a/common/theories/EnvironmentTyping.v b/common/theories/EnvironmentTyping.v
index 720e4eb00..8e7fab1f4 100644
--- a/common/theories/EnvironmentTyping.v
+++ b/common/theories/EnvironmentTyping.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
-From Coq Require CMorphisms CRelationClasses.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require CMorphisms CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive.
From Equations Require Import Equations.
diff --git a/common/theories/Kernames.v b/common/theories/Kernames.v
index cd0b69e1d..125e98987 100644
--- a/common/theories/Kernames.v
+++ b/common/theories/Kernames.v
@@ -1,8 +1,8 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Lia MSetList OrderedTypeAlt OrderedTypeEx FMapAVL FMapFacts MSetAVL MSetFacts MSetProperties.
+From Stdlib Require Import Lia MSetList OrderedTypeAlt OrderedTypeEx FMapAVL FMapFacts MSetAVL MSetFacts MSetProperties.
From MetaCoq.Utils Require Import utils MCMSets MCFSets.
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
Local Open Scope string_scope2.
diff --git a/common/theories/Primitive.v b/common/theories/Primitive.v
index 278f9d056..2e2cef9ff 100644
--- a/common/theories/Primitive.v
+++ b/common/theories/Primitive.v
@@ -1,6 +1,6 @@
(* Primitive types *)
-From Coq Require Import Uint63 PrimFloat SpecFloat FloatOps ZArith HexadecimalString.
+From Stdlib Require Import Uint63 PrimFloat SpecFloat FloatOps ZArith HexadecimalString.
From MetaCoq.Utils Require Import bytestring MCString.
Local Open Scope bs.
diff --git a/common/theories/Reflect.v b/common/theories/Reflect.v
index 923b0e564..37865f89f 100644
--- a/common/theories/Reflect.v
+++ b/common/theories/Reflect.v
@@ -1,9 +1,9 @@
(* Distributed under the terms of the MIT license. *)
(* For primitive integers and floats *)
-From Coq Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat Floats.FloatAxioms.
+From Stdlib Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat Floats.FloatAxioms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Universes Kernames.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
#[program,global] Instance reflect_prim_int : ReflectEq Numbers.Cyclic.Int63.Uint63.int :=
@@ -260,7 +260,7 @@ Proof.
f_equal. apply uip.
Qed.
-Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
Lemma constraint_lt_irrel (x y : UnivConstraint.t) (l l' : UnivConstraint.lt_ x y) : l = l'.
Proof.
diff --git a/common/theories/Transform.v b/common/theories/Transform.v
index 55785e023..57be9a991 100644
--- a/common/theories/Transform.v
+++ b/common/theories/Transform.v
@@ -3,7 +3,7 @@
(** Generic transofmations from one language to another,
preserving an evaluation relation up-to some observational equality. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
Import bytestring.
diff --git a/common/theories/Universes.v b/common/theories/Universes.v
index eca654b27..0c6a72c17 100644
--- a/common/theories/Universes.v
+++ b/common/theories/Universes.v
@@ -1,8 +1,8 @@
-From Coq Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL.
+From Stdlib Require Import OrdersAlt MSetList MSetAVL MSetFacts MSetProperties MSetDecide FMapAVL.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils MCMSets MCFSets.
From MetaCoq.Common Require Import BasicAst config.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Local Open Scope nat_scope.
Local Open Scope string_scope2.
diff --git a/common/theories/UniversesDec.v b/common/theories/UniversesDec.v
index f73f495c7..fa841c0bc 100644
--- a/common/theories/UniversesDec.v
+++ b/common/theories/UniversesDec.v
@@ -1,4 +1,4 @@
-From Coq Require Import PArith NArith ZArith Lia.
+From Stdlib Require Import PArith NArith ZArith Lia.
From MetaCoq.Utils Require Import MCList MCOption MCUtils.
From MetaCoq.Common Require Import uGraph.
From MetaCoq.Common Require Import Universes.
diff --git a/common/theories/uGraph.v b/common/theories/uGraph.v
index 4a039a202..78eced25d 100644
--- a/common/theories/uGraph.v
+++ b/common/theories/uGraph.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms.
+From Stdlib Require Import ssreflect ssrbool OrderedTypeAlt MSetAVL MSetFacts MSetProperties MSetDecide Morphisms.
From MetaCoq.Utils Require Import utils wGraph.
From MetaCoq.Common Require Import config Universes.
From Equations.Prop Require Import DepElim.
@@ -3079,7 +3079,7 @@ Proof.
Qed.
-Require Import SetoidTactics.
+From Stdlib Require Import SetoidTactics.
#[global] Instance is_graph_of_uctx_proper {cf : checker_flags} G : Proper ((=_cs) ==> iff) (is_graph_of_uctx G).
Proof.
diff --git a/configure.sh b/configure.sh
index fe8ab9c2a..a4a54b408 100755
--- a/configure.sh
+++ b/configure.sh
@@ -8,11 +8,9 @@ make -f Makefile mrproper
# should already be available in $(COQMF_LIB)/user-contrib/MetaCoq/*
# For local builds, we set specific dependencies of each subproject in */metacoq-config
-# CWD=`pwd`
-
-if command -v coqc >/dev/null 2>&1
+if command -v rocq >/dev/null 2>&1
then
- COQLIB=` coqc -where | tr -d '\r' | tr '\\\\' '/'`
+ COQLIB=` rocq c -where | tr -d '\r' | tr '\\\\' '/'`
if [[ "$1" = "local" ]] || [[ "$1" = "--enable-local" ]] || [[ "$1" = "--enable-quick" ]]
then
@@ -78,5 +76,5 @@ then
echo ${PLUGIN_DEMO_DEPS} >> test-suite/plugin-demo/metacoq-config
else
- echo "Error: coqc not found in path"
+ echo "Error: rocq not found in path"
fi
diff --git a/erasure-plugin/Makefile b/erasure-plugin/Makefile
index 1953389f1..7437baee8 100644
--- a/erasure-plugin/Makefile
+++ b/erasure-plugin/Makefile
@@ -9,12 +9,12 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.plugin: _PluginProject
- coq_makefile -f _PluginProject -o Makefile.plugin $(DEPS)
+ rocq makefile -f _PluginProject -o Makefile.plugin $(DEPS)
# Avoid conflicting dependency file creation for the template plugin
sed -e s/coqdeps/coqdeps.plugin/g Makefile.plugin > Makefile.plugin.tmp && mv -f Makefile.plugin.tmp Makefile.plugin
Makefile.erasureplugin: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.erasureplugin $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.erasureplugin $(DEPS)
theory: Makefile.erasureplugin
$(MAKE) -f Makefile.erasureplugin
diff --git a/erasure-plugin/clean_extraction.sh b/erasure-plugin/clean_extraction.sh
index 562a941fa..1e7389a5c 100755
--- a/erasure-plugin/clean_extraction.sh
+++ b/erasure-plugin/clean_extraction.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+SED=`which gsed || which sed`
+
echo "Cleaning result of extraction"
if [ ! -d "src" ]
@@ -9,7 +11,7 @@ fi
shopt -s nullglob # make the for loop do nothnig when there is no *.ml* files
-files=`cat ../template-coq/_PluginProject.in | grep "^[^#].*mli\?$" | sed -e s/gen-src/src/`
+files=`cat ../template-coq/_PluginProject.in | grep "^[^#].*mli\?$" | ${SED} -e s/gen-src/src/`
if [[ ! -f "src/metacoq_erasure_plugin.cmxs" ||
"src/metacoq_erasure_plugin.cmxs" -ot "theories/Extraction.vo" ]]
diff --git a/erasure-plugin/theories/ETransform.v b/erasure-plugin/theories/ETransform.v
index 1e58c8f01..f8a2ce554 100644
--- a/erasure-plugin/theories/ETransform.v
+++ b/erasure-plugin/theories/ETransform.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Environment Transform config BasicAst uGraph.
diff --git a/erasure-plugin/theories/Erasure.v b/erasure-plugin/theories/Erasure.v
index e18bfe218..c92552091 100644
--- a/erasure-plugin/theories/Erasure.v
+++ b/erasure-plugin/theories/Erasure.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Transform config.
From MetaCoq.Template Require Import EtaExpand TemplateProgram.
diff --git a/erasure-plugin/theories/ErasureCorrectness.v b/erasure-plugin/theories/ErasureCorrectness.v
index d5a51f67b..ad2b8ab61 100644
--- a/erasure-plugin/theories/ErasureCorrectness.v
+++ b/erasure-plugin/theories/ErasureCorrectness.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From MetaCoq.Common Require Import Transform config.
From MetaCoq.Utils Require Import bytestring utils.
From MetaCoq.PCUIC Require PCUICAst PCUICAstUtils PCUICProgram.
@@ -428,7 +428,7 @@ Proof.
Qed.
Import MetaCoq.Common.Transform.
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
Module ETransformPresFO.
Section Opt.
diff --git a/erasure-plugin/theories/Loader.v b/erasure-plugin/theories/Loader.v
index 734601448..aa33c3e7b 100644
--- a/erasure-plugin/theories/Loader.v
+++ b/erasure-plugin/theories/Loader.v
@@ -1,4 +1,4 @@
-Require Import String.
+From Stdlib Require Import String.
From MetaCoq.Template Require ExtractableLoader.
Declare ML Module "coq-metacoq-erasure.plugin".
diff --git a/erasure/Makefile b/erasure/Makefile
index e61f05720..df9da1673 100644
--- a/erasure/Makefile
+++ b/erasure/Makefile
@@ -5,7 +5,7 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.erasure: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.erasure $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.erasure $(DEPS)
theory: Makefile.erasure
$(MAKE) -f Makefile.erasure
diff --git a/erasure/theories/EArities.v b/erasure/theories/EArities.v
index 052269c0e..ab556c472 100644
--- a/erasure/theories/EArities.v
+++ b/erasure/theories/EArities.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -16,7 +16,7 @@ From MetaCoq.Erasure Require Import Extract.
Notation "Σ ⊢p s ⇓ t" := (eval Σ s t) (at level 50, s, t at next level) : type_scope.
-Require Import Program.
+From Stdlib Require Import Program.
From Equations Require Import Equations.
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EAstUtils.v b/erasure/theories/EAstUtils.v
index 24e3beeef..81c19260a 100644
--- a/erasure/theories/EAstUtils.v
+++ b/erasure/theories/EAstUtils.v
@@ -3,7 +3,7 @@ From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Kernames.
From MetaCoq.Erasure Require Import EPrimitive EAst.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Global Hint Resolve app_tip_nil : core.
diff --git a/erasure/theories/EBeta.v b/erasure/theories/EBeta.v
index a4b9cd1cf..d80c2c23a 100644
--- a/erasure/theories/EBeta.v
+++ b/erasure/theories/EBeta.v
@@ -1,5 +1,5 @@
-From Coq Require Import List.
-From Coq Require Import String.
+From Stdlib Require Import List.
+From Stdlib Require Import String.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils ELiftSubst EProgram.
diff --git a/erasure/theories/ECSubst.v b/erasure/theories/ECSubst.v
index e5b2e0335..296d967f5 100644
--- a/erasure/theories/ECSubst.v
+++ b/erasure/theories/ECSubst.v
@@ -1,9 +1,9 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction ELiftSubst.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
diff --git a/erasure/theories/ECoInductiveToInductive.v b/erasure/theories/ECoInductiveToInductive.v
index 681b70597..b64a72af5 100644
--- a/erasure/theories/ECoInductiveToInductive.v
+++ b/erasure/theories/ECoInductiveToInductive.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -21,7 +21,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assumes [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EConstructorsAsBlocks.v b/erasure/theories/EConstructorsAsBlocks.v
index a83352c57..0049427fe 100644
--- a/erasure/theories/EConstructorsAsBlocks.v
+++ b/erasure/theories/EConstructorsAsBlocks.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
(* Local Existing Instance extraction_checker_flags. *)
diff --git a/erasure/theories/EDeps.v b/erasure/theories/EDeps.v
index 28dfbbd49..00c05d2e0 100644
--- a/erasure/theories/EDeps.v
+++ b/erasure/theories/EDeps.v
@@ -1,4 +1,4 @@
-From Coq Require Import Arith List.
+From Stdlib Require Import Arith List.
From Equations Require Import Equations.
From MetaCoq.PCUIC Require Import
PCUICPrimitive PCUICAst PCUICAstUtils PCUICTyping PCUICInversion PCUICWeakeningEnv PCUICWeakeningEnvTyp.
diff --git a/erasure/theories/EEnvMap.v b/erasure/theories/EEnvMap.v
index c08a5cf14..10ea3cc86 100644
--- a/erasure/theories/EEnvMap.v
+++ b/erasure/theories/EEnvMap.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool Morphisms Setoid ProofIrrelevance.
+From Stdlib Require Import ssreflect ssrbool Morphisms Setoid ProofIrrelevance.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Kernames EnvMap BasicAst.
diff --git a/erasure/theories/EEtaExpanded.v b/erasure/theories/EEtaExpanded.v
index 870ab6e9c..3a10d4e25 100644
--- a/erasure/theories/EEtaExpanded.v
+++ b/erasure/theories/EEtaExpanded.v
@@ -2,7 +2,7 @@
(* Eta expanded constructors only, see EEtaExpandedFix for the more involved definition where fixpoints are also eta-expanded. *)
-From Coq Require Import Utf8 Program btauto.Algebra.
+From Stdlib Require Import Utf8 Program btauto.Algebra.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames EnvMap BasicAst.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EGlobalEnv EExtends EWellformed ELiftSubst ESpineView ECSubst EWcbvEval EWcbvEvalInd EProgram.
@@ -14,7 +14,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EEtaExpandedFix.v b/erasure/theories/EEtaExpandedFix.v
index aeebbb004..79b076d74 100644
--- a/erasure/theories/EEtaExpandedFix.v
+++ b/erasure/theories/EEtaExpandedFix.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EGlobalEnv EAstUtils EEnvMap EExtends EWellformed.
@@ -218,7 +218,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EExtends.v b/erasure/theories/EExtends.v
index a431160c6..863bd3588 100644
--- a/erasure/theories/EExtends.v
+++ b/erasure/theories/EExtends.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames.
diff --git a/erasure/theories/EGenericGlobalMap.v b/erasure/theories/EGenericGlobalMap.v
index d209122f9..98f7fb71f 100644
--- a/erasure/theories/EGenericGlobalMap.v
+++ b/erasure/theories/EGenericGlobalMap.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Class GenTransform :=
{ gen_transform : GlobalContextMap.t -> term -> term;
diff --git a/erasure/theories/EGenericMapEnv.v b/erasure/theories/EGenericMapEnv.v
index 1fa0d2bed..95efe38dc 100644
--- a/erasure/theories/EGenericMapEnv.v
+++ b/erasure/theories/EGenericMapEnv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Section sec.
diff --git a/erasure/theories/EGlobalEnv.v b/erasure/theories/EGlobalEnv.v
index 18887b1f8..b386707f9 100644
--- a/erasure/theories/EGlobalEnv.v
+++ b/erasure/theories/EGlobalEnv.v
@@ -1,9 +1,9 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst Reflect.
From MetaCoq.Erasure Require Import EAst EAstUtils ELiftSubst EReflect ECSubst.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Import MCMonadNotation.
(** * Global environments
diff --git a/erasure/theories/EImplementBox.v b/erasure/theories/EImplementBox.v
index f49a16a8e..ca0e77300 100644
--- a/erasure/theories/EImplementBox.v
+++ b/erasure/theories/EImplementBox.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
(* Local Existing Instance extraction_checker_flags. *)
@@ -559,7 +559,7 @@ Proof. rewrite /head /decompose_app /= fst_decompose_app_rec //. Qed.
Lemma tApp_mkApps f a : tApp f a = mkApps f [a].
Proof. reflexivity. Qed.
-Require Import EWcbvEvalCstrsAsBlocksInd.
+From MetaCoq.Erasure Require Import EWcbvEvalCstrsAsBlocksInd.
Lemma implement_box_mkApps f args :
implement_box (mkApps f args) = mkApps (implement_box f) (map implement_box args).
diff --git a/erasure/theories/EInduction.v b/erasure/theories/EInduction.v
index a399afa00..3e7ac9a43 100644
--- a/erasure/theories/EInduction.v
+++ b/erasure/theories/EInduction.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import List ssreflect ssrbool.
+From Stdlib Require Import List ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.PCUIC Require Import PCUICSize.
diff --git a/erasure/theories/EInlineProjections.v b/erasure/theories/EInlineProjections.v
index 8be042bea..34a810f73 100644
--- a/erasure/theories/EInlineProjections.v
+++ b/erasure/theories/EInlineProjections.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EExtends
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assumes [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EInlining.v b/erasure/theories/EInlining.v
index caff8e359..c4f373e6e 100644
--- a/erasure/theories/EInlining.v
+++ b/erasure/theories/EInlining.v
@@ -1,4 +1,4 @@
-From Coq Require Import List String Arith Lia ssreflect ssrbool.
+From Stdlib Require Import List String Arith Lia ssreflect ssrbool.
Import ListNotations.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/erasure/theories/ELiftSubst.v b/erasure/theories/ELiftSubst.v
index 2646731c4..92b965ddc 100644
--- a/erasure/theories/ELiftSubst.v
+++ b/erasure/theories/ELiftSubst.v
@@ -2,7 +2,7 @@
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
(** * Lifting and substitution for the AST
@@ -115,7 +115,7 @@ Notation closed t := (closedn 0 t).
Notation subst_rec N M k := (subst N k M) (only parsing).
-Require Import PeanoNat.
+From Stdlib Require Import PeanoNat.
Import Nat.
Lemma lift_rel_ge :
diff --git a/erasure/theories/EOptimizePropDiscr.v b/erasure/theories/EOptimizePropDiscr.v
index c84417735..f0f1d832f 100644
--- a/erasure/theories/EOptimizePropDiscr.v
+++ b/erasure/theories/EOptimizePropDiscr.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -18,7 +18,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assumes [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EPretty.v b/erasure/theories/EPretty.v
index c5016220b..c7fa69b3b 100644
--- a/erasure/theories/EPretty.v
+++ b/erasure/theories/EPretty.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EGlobalEnv.
diff --git a/erasure/theories/EPrimitive.v b/erasure/theories/EPrimitive.v
index 21509f2e7..a1d944d97 100644
--- a/erasure/theories/EPrimitive.v
+++ b/erasure/theories/EPrimitive.v
@@ -4,8 +4,8 @@ From MetaCoq.Common Require Import Universes Primitive Reflect
Environment EnvironmentTyping.
(* From MetaCoq.Erasure Require Import BasicAst. *)
From Equations Require Import Equations.
-From Coq Require Import ssreflect Utf8.
-From Coq Require Import Uint63 SpecFloat.
+From Stdlib Require Import ssreflect Utf8.
+From Stdlib Require Import Uint63 SpecFloat.
Set Universe Polymorphism.
diff --git a/erasure/theories/EProgram.v b/erasure/theories/EProgram.v
index e05c56212..4f3e3360b 100644
--- a/erasure/theories/EProgram.v
+++ b/erasure/theories/EProgram.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Transform config BasicAst.
diff --git a/erasure/theories/EReflect.v b/erasure/theories/EReflect.v
index b784392b6..e6ffe9a57 100644
--- a/erasure/theories/EReflect.v
+++ b/erasure/theories/EReflect.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Reflect.
From MetaCoq.Erasure Require Import EPrimitive EAst EInduction.
diff --git a/erasure/theories/ERemoveParams.v b/erasure/theories/ERemoveParams.v
index a01e774f9..260fc2873 100644
--- a/erasure/theories/ERemoveParams.v
+++ b/erasure/theories/ERemoveParams.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames Primitive BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EReorderCstrs.v b/erasure/theories/EReorderCstrs.v
index 3e3e92bef..0d83f3dae 100644
--- a/erasure/theories/EReorderCstrs.v
+++ b/erasure/theories/EReorderCstrs.v
@@ -1,4 +1,4 @@
-From Coq Require Import List String Arith Lia ssreflect ssrbool Morphisms.
+From Stdlib Require Import List String Arith Lia ssreflect ssrbool Morphisms.
Import ListNotations.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/erasure/theories/ESpineView.v b/erasure/theories/ESpineView.v
index 6278254eb..cf892b458 100644
--- a/erasure/theories/ESpineView.v
+++ b/erasure/theories/ESpineView.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import List ssreflect ssrbool.
+From Stdlib Require Import List ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.Erasure Require Import EAst EAstUtils EInduction EReflect.
diff --git a/erasure/theories/ESubstitution.v b/erasure/theories/ESubstitution.v
index e10ce8159..61211f7bd 100644
--- a/erasure/theories/ESubstitution.v
+++ b/erasure/theories/ESubstitution.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect.
+From Stdlib Require Import Program ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICLiftSubst PCUICTyping
@@ -67,7 +67,7 @@ Proof.
split. eauto. econstructor. eauto.
Qed.
-Require Import ssrbool.
+From Stdlib Require Import ssrbool.
(* TODO: Figure out whether this lemma (and [erases]) should use [strictly_extends_decls] or [extends]. -Jason Gross *)
Lemma erases_extends :
@@ -154,7 +154,7 @@ Proof.
now apply All_local_env_app_inv in X1.
Qed.
-Require Import MetaCoq.PCUIC.PCUICInversion.
+From MetaCoq Require Import PCUIC.PCUICInversion.
Derive Signature for erases.
Lemma erases_ctx_ext (Σ : global_env_ext) Γ Γ' t t' :
diff --git a/erasure/theories/EUnboxing.v b/erasure/theories/EUnboxing.v
index 87f31709f..69d5c55b3 100644
--- a/erasure/theories/EUnboxing.v
+++ b/erasure/theories/EUnboxing.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames Primitive BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EArities
@@ -13,7 +13,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** We assume [Prop = Type] and universes are checked correctly in the following. *)
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/EWcbvEval.v b/erasure/theories/EWcbvEval.v
index ab327a72f..bc5dfead3 100644
--- a/erasure/theories/EWcbvEval.v
+++ b/erasure/theories/EWcbvEval.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst.
From MetaCoq.PCUIC Require PCUICWcbvEval.
@@ -7,7 +7,7 @@ From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils ELiftSubst ECSubst
EWellformed.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Set Default Proof Using "Type*".
diff --git a/erasure/theories/EWcbvEvalCstrsAsBlocksFixLambdaInd.v b/erasure/theories/EWcbvEvalCstrsAsBlocksFixLambdaInd.v
index dfbf65c88..1e8fa9dba 100644
--- a/erasure/theories/EWcbvEvalCstrsAsBlocksFixLambdaInd.v
+++ b/erasure/theories/EWcbvEvalCstrsAsBlocksFixLambdaInd.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program ssreflect ssrbool.
+From Stdlib Require Import Utf8 Program ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction ELiftSubst EWcbvEval EGlobalEnv
diff --git a/erasure/theories/EWcbvEvalCstrsAsBlocksInd.v b/erasure/theories/EWcbvEvalCstrsAsBlocksInd.v
index 44bfbf6a6..2af8f16d8 100644
--- a/erasure/theories/EWcbvEvalCstrsAsBlocksInd.v
+++ b/erasure/theories/EWcbvEvalCstrsAsBlocksInd.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program ssreflect ssrbool.
+From Stdlib Require Import Utf8 Program ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction ELiftSubst EWcbvEval EGlobalEnv
diff --git a/erasure/theories/EWcbvEvalEtaInd.v b/erasure/theories/EWcbvEvalEtaInd.v
index 691d64c78..735d714ad 100644
--- a/erasure/theories/EWcbvEvalEtaInd.v
+++ b/erasure/theories/EWcbvEvalEtaInd.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program ssreflect ssrbool btauto.Algebra.
+From Stdlib Require Import Utf8 Program ssreflect ssrbool btauto.Algebra.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EWcbvEval EGlobalEnv
diff --git a/erasure/theories/EWcbvEvalInd.v b/erasure/theories/EWcbvEvalInd.v
index 8e0f365b2..1936badd2 100644
--- a/erasure/theories/EWcbvEvalInd.v
+++ b/erasure/theories/EWcbvEvalInd.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program ssreflect ssrbool.
+From Stdlib Require Import Utf8 Program ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames BasicAst EnvMap.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils EInduction EWcbvEval EGlobalEnv ECSubst EInduction.
diff --git a/erasure/theories/EWcbvEvalNamed.v b/erasure/theories/EWcbvEvalNamed.v
index 478c313ba..23d750ee2 100644
--- a/erasure/theories/EWcbvEvalNamed.v
+++ b/erasure/theories/EWcbvEvalNamed.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Common Require Import config BasicAst.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require PCUICWcbvEval.
@@ -7,11 +7,11 @@ From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils ELiftSubst ECSubst
EWellformed EWcbvEval.
From MetaCoq.Utils Require Import bytestring MCString.
From MetaCoq.Erasure Require Import EWcbvEvalCstrsAsBlocksFixLambdaInd.
-From Coq Require Import BinaryString.
+From Stdlib Require Import BinaryString.
Import String.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Set Default Proof Using "Type*".
@@ -836,7 +836,7 @@ Proof.
all: firstorder congruence.
Qed.
-Require Import DecimalNat.
+From Stdlib Require Import DecimalNat.
Lemma string_of_nat_empty n :
string_of_nat n <> "".
@@ -858,7 +858,7 @@ Proof.
all: inversion Heq; eauto.
Qed.
-Require Import DecimalNat.
+From Stdlib Require Import DecimalNat.
Lemma string_of_nat_inj n1 n2 :
string_of_nat n1 = string_of_nat n2 -> n1 = n2.
diff --git a/erasure/theories/EWellformed.v b/erasure/theories/EWellformed.v
index 1285b158d..4c659d977 100644
--- a/erasure/theories/EWellformed.v
+++ b/erasure/theories/EWellformed.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 Program.
+From Stdlib Require Import Utf8 Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames Primitive.
From MetaCoq.Erasure Require Import EPrimitive EAst EAstUtils ELiftSubst ECSubst EGlobalEnv.
@@ -12,7 +12,7 @@ Import MCMonadNotation.
From Equations Require Import Equations.
Set Equations Transparent.
Local Set Keyed Unification.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Definition isSome {A} (o : option A) :=
match o with
diff --git a/erasure/theories/EWtAst.v b/erasure/theories/EWtAst.v
index 9c18ac957..29a68bc28 100644
--- a/erasure/theories/EWtAst.v
+++ b/erasure/theories/EWtAst.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Template Require Import utils BasicAst Universes.
From MetaCoq.PCUIC Require Import PCUICPrimitive.
From MetaCoq.Erasure Require Import EAst EAstUtils EInduction ECSubst ELiftSubst EGlobalEnv.
@@ -408,7 +408,7 @@ Section view.
End view.
-From Coq Require Import Relation_Definitions.
+From Stdlib Require Import Relation_Definitions.
Section test_view.
Context (Σ : global_context).
diff --git a/erasure/theories/ErasureCorrectness.v b/erasure/theories/ErasureCorrectness.v
index a53593a34..e382f3d74 100644
--- a/erasure/theories/ErasureCorrectness.v
+++ b/erasure/theories/ErasureCorrectness.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Erasure Require Import ELiftSubst EGlobalEnv EWcbvEval Extract Prelim
@@ -22,8 +22,8 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICGlobalEnv PCUICAst
PCUICInductives.
From MetaCoq.PCUIC Require Import PCUICTactics.
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect.
Local Set Keyed Unification.
diff --git a/erasure/theories/ErasureFunction.v b/erasure/theories/ErasureFunction.v
index 6a1658d13..2a11f5a17 100644
--- a/erasure/theories/ErasureFunction.v
+++ b/erasure/theories/ErasureFunction.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From Equations Require Import Equations.
Set Equations Transparent.
From MetaCoq.Utils Require Import utils.
@@ -359,7 +359,7 @@ Proof.
intuition auto.
Qed.
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
#[export] Instance global_deps_proper : Proper (eq ==> KernameSet.Equal ==> KernameSet.Equal) global_deps.
Proof.
@@ -1468,7 +1468,7 @@ Proof.
eapply erase_irrel_global_env; tea.
Qed.
-Require Import Morphisms.
+From Stdlib Require Import Morphisms.
Global Instance proper_pair_levels_gcs : Proper ((=_lset) ==> GoodConstraintSet.Equal ==> (=_gcs)) (@pair LevelSet.t GoodConstraintSet.t).
Proof.
intros l l' eq gcs gcs' eq'.
diff --git a/erasure/theories/ErasureFunctionProperties.v b/erasure/theories/ErasureFunctionProperties.v
index 534663095..849d97cee 100644
--- a/erasure/theories/ErasureFunctionProperties.v
+++ b/erasure/theories/ErasureFunctionProperties.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From Equations Require Import Equations.
Set Equations Transparent.
From MetaCoq.Utils Require Import utils.
diff --git a/erasure/theories/ErasureProperties.v b/erasure/theories/ErasureProperties.v
index d1a385c1d..344d8a4e4 100644
--- a/erasure/theories/ErasureProperties.v
+++ b/erasure/theories/ErasureProperties.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssreflect ssrbool.
+From Stdlib Require Import Program ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Erasure Require Import EPrimitive ELiftSubst EGlobalEnv EWcbvEval Extract Prelim
@@ -22,7 +22,7 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICGlobalEnv PCUICAst
PCUICInductives.
From MetaCoq.PCUIC Require Import PCUICTactics.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Local Set Keyed Unification.
diff --git a/erasure/theories/Extract.v b/erasure/theories/Extract.v
index 3cb455005..3e79b0053 100644
--- a/erasure/theories/Extract.v
+++ b/erasure/theories/Extract.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program ssrbool.
+From Stdlib Require Import Program ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Primitive.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICPrimitive PCUICTyping
diff --git a/erasure/theories/Prelim.v b/erasure/theories/Prelim.v
index fb1c5de7d..27be99d00 100644
--- a/erasure/theories/Prelim.v
+++ b/erasure/theories/Prelim.v
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICAst PCUICAstUtils
PCUICContextConversion PCUICArities PCUICWellScopedCumulativity PCUICConversion
PCUICWeakeningEnvTyp PCUICClassification.
From MetaCoq.SafeChecker Require Import PCUICErrors.
-From Coq Require Import Program ssreflect.
+From Stdlib Require Import Program ssreflect.
Local Existing Instance extraction_checker_flags.
diff --git a/erasure/theories/Typed/Certifying.v b/erasure/theories/Typed/Certifying.v
index 64920a579..5f6a8f6aa 100644
--- a/erasure/theories/Typed/Certifying.v
+++ b/erasure/theories/Typed/Certifying.v
@@ -1,7 +1,7 @@
(** * Term and proof generation for the certifying transforms *)
-From Coq Require Import List.
-From Coq Require Import Ascii.
-From Coq Require Import String.
+From Stdlib Require Import List.
+From Stdlib Require Import Ascii.
+From Stdlib Require Import String.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Kernames.
From MetaCoq.Template Require Import Ast Checker All.
diff --git a/erasure/theories/Typed/CertifyingBeta.v b/erasure/theories/Typed/CertifyingBeta.v
index c5aac5a25..045e0aed4 100644
--- a/erasure/theories/Typed/CertifyingBeta.v
+++ b/erasure/theories/Typed/CertifyingBeta.v
@@ -1,5 +1,5 @@
-From Coq Require Import List.
-From Coq Require Import String.
+From Stdlib Require Import List.
+From Stdlib Require Import String.
From MetaCoq.Erasure.Typed Require Import Transform.
From MetaCoq.Erasure.Typed Require Import ResultMonad.
From MetaCoq.Erasure.Typed Require Import Utils.
diff --git a/erasure/theories/Typed/CertifyingEta.v b/erasure/theories/Typed/CertifyingEta.v
index 0a0c17e20..1bd7415dd 100644
--- a/erasure/theories/Typed/CertifyingEta.v
+++ b/erasure/theories/Typed/CertifyingEta.v
@@ -4,10 +4,10 @@
we terms are equal to the originals. Since eta-conversion is part of the
Coq's conversion, the proof is essentially [eq_refl].
All dependencies are also expanded.*)
-From Coq Require Import List.
-From Coq Require Import PeanoNat.
-From Coq Require Import Bool.
-From Coq Require Import String.
+From Stdlib Require Import List.
+From Stdlib Require Import PeanoNat.
+From Stdlib Require Import Bool.
+From Stdlib Require Import String.
From MetaCoq.Common Require Import Kernames.
From MetaCoq.Template Require Import All.
From MetaCoq.Erasure.Typed Require Import Erasure.
diff --git a/erasure/theories/Typed/CertifyingInlining.v b/erasure/theories/Typed/CertifyingInlining.v
index b97fc1c27..9ae8e0b7b 100644
--- a/erasure/theories/Typed/CertifyingInlining.v
+++ b/erasure/theories/Typed/CertifyingInlining.v
@@ -2,9 +2,9 @@
(** Essentially, just an adaptaion of the inlining pass on the erased representation.
After the pass is applied we generate proofs that the original and the transformed terms are equal in the theory of Coq. The proofs are just by [eq_refl], since the terms are convertible *)
-From Coq Require Import List.
-From Coq Require Import String.
-From Coq Require Import Bool.
+From Stdlib Require Import List.
+From Stdlib Require Import String.
+From Stdlib Require Import Bool.
From MetaCoq.Erasure.Typed Require Import Transform.
From MetaCoq.Erasure.Typed Require Import CertifyingBeta.
From MetaCoq.Erasure.Typed Require Import ResultMonad.
diff --git a/erasure/theories/Typed/ClosedAux.v b/erasure/theories/Typed/ClosedAux.v
index e24cb2acf..0ddfcee03 100644
--- a/erasure/theories/Typed/ClosedAux.v
+++ b/erasure/theories/Typed/ClosedAux.v
@@ -1,5 +1,5 @@
-From Coq Require Import List.
-From Coq Require Import ssrbool.
+From Stdlib Require Import List.
+From Stdlib Require Import ssrbool.
From MetaCoq.Erasure.Typed Require Import Utils.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Erasure Require Import EPrimitive EAst.
diff --git a/erasure/theories/Typed/Erasure.v b/erasure/theories/Typed/Erasure.v
index 1ac5ddf0f..d02307bf0 100644
--- a/erasure/theories/Typed/Erasure.v
+++ b/erasure/theories/Typed/Erasure.v
@@ -1,4 +1,4 @@
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Erasure.Typed Require Import Utils.
From MetaCoq.Erasure.Typed Require Import ExAst.
From Equations Require Import Equations.
diff --git a/erasure/theories/Typed/ErasureCorrectness.v b/erasure/theories/Typed/ErasureCorrectness.v
index d61b48c2a..7d8f6a2bc 100644
--- a/erasure/theories/Typed/ErasureCorrectness.v
+++ b/erasure/theories/Typed/ErasureCorrectness.v
@@ -12,7 +12,7 @@ From MetaCoq.PCUIC Require Import PCUICTyping.
From MetaCoq.PCUIC Require Import PCUICAst.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Kernames.
-From Coq Require Import List.
+From Stdlib Require Import List.
Import ListNotations.
Import PCUICEnvironment.
diff --git a/erasure/theories/Typed/ExAst.v b/erasure/theories/Typed/ExAst.v
index 345111a3f..219294635 100644
--- a/erasure/theories/Typed/ExAst.v
+++ b/erasure/theories/Typed/ExAst.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Kernames.
From MetaCoq.Common Require Import BasicAst.
diff --git a/erasure/theories/Typed/Extraction.v b/erasure/theories/Typed/Extraction.v
index 92a62bd91..7c171fa37 100644
--- a/erasure/theories/Typed/Extraction.v
+++ b/erasure/theories/Typed/Extraction.v
@@ -1,5 +1,5 @@
(** This file provides the main function for invoking our extraction. *)
-From Coq Require Import String.
+From Stdlib Require Import String.
From MetaCoq.Erasure.Typed Require Import Erasure.
From MetaCoq.Erasure.Typed Require Import Optimize.
From MetaCoq.Erasure.Typed Require OptimizePropDiscr.
diff --git a/erasure/theories/Typed/ExtractionCorrectness.v b/erasure/theories/Typed/ExtractionCorrectness.v
index 394a6430b..a3f5e2f45 100644
--- a/erasure/theories/Typed/ExtractionCorrectness.v
+++ b/erasure/theories/Typed/ExtractionCorrectness.v
@@ -1,4 +1,4 @@
-From Coq Require Import List ssreflect ssrbool.
+From Stdlib Require Import List ssreflect ssrbool.
From MetaCoq.Erasure.Typed Require Import ErasureCorrectness.
From MetaCoq.Erasure.Typed Require Import ExAst.
From MetaCoq.Erasure.Typed Require Import Extraction.
@@ -579,7 +579,7 @@ Proof.
now eapply PCUICWfEnvImpl.wf_fresh_globals.
Qed.
-From Coq Require Import String.
+From Stdlib Require Import String.
Local Open Scope string_scope.
Import MCMonadNotation.
diff --git a/erasure/theories/Typed/Optimize.v b/erasure/theories/Typed/Optimize.v
index 9d1c34445..6739637e1 100644
--- a/erasure/theories/Typed/Optimize.v
+++ b/erasure/theories/Typed/Optimize.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Erasure.Typed Require Import ClosedAux.
From MetaCoq.Erasure.Typed Require Import ExAst.
From MetaCoq.Erasure.Typed Require Import Transform.
@@ -760,7 +760,7 @@ Import MCMonadNotation.
Definition throwIf (b : bool) (err : string) : (fun x => result x string) unit :=
if b then Err err else Ok tt.
-From Coq Require Import String.
+From Stdlib Require Import String.
Definition dearg_transform
(overridden_masks : kername -> option bitmask)
diff --git a/erasure/theories/Typed/OptimizeCorrectness.v b/erasure/theories/Typed/OptimizeCorrectness.v
index d4f69390b..096e994af 100644
--- a/erasure/theories/Typed/OptimizeCorrectness.v
+++ b/erasure/theories/Typed/OptimizeCorrectness.v
@@ -4,11 +4,11 @@ From MetaCoq.Erasure.Typed Require Import ExAst.
From MetaCoq.Erasure.Typed Require Import Optimize.
From MetaCoq.Erasure.Typed Require Import Transform.
From MetaCoq.Erasure.Typed Require Import WcbvEvalAux.
-From Coq Require Import Btauto.
-From Coq Require Import btauto.Algebra.
-From Coq Require Import List.
-From Coq Require Import ssreflect ssrbool.
-From Coq Require Import PeanoNat.
+From Stdlib Require Import Btauto.
+From Stdlib Require Import btauto.Algebra.
+From Stdlib Require Import List.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require Import PeanoNat.
From Equations Require Import Equations.
From MetaCoq.Erasure Require Import EPrimitive EAstUtils.
From MetaCoq.Erasure Require Import ECSubst.
@@ -2204,7 +2204,7 @@ Proof.
cbn.
now propify.
Qed.
-(* From Coq Require Import ssreflect.
+(* From Stdlib Require Import ssreflect.
Lemma wellformed_dearg_single' (efl := all_env_flags) Σ k t args mask :
wellformed (trans_env (dearg_env Σ)) k t ->
Forall (wellformed (trans_env (dearg_env Σ)) k) args ->
@@ -5125,7 +5125,7 @@ Proof.
Qed.
Import MCMonadNotation ResultMonad.
-From Coq Require Import String.
+From Stdlib Require Import String.
Definition compute_masks overridden_masks (do_trim_const_masks do_trim_ctor_masks : bool) Σ : result dearg_set bytestring.string :=
let (const_masks, ind_masks) := Utils.timed "Dearg analysis" (fun _ => analyze_env overridden_masks Σ) in
let const_masks := (if do_trim_const_masks then trim_const_masks else id) const_masks in
diff --git a/erasure/theories/Typed/TypeAnnotations.v b/erasure/theories/Typed/TypeAnnotations.v
index 23872bf8a..0bde4681e 100644
--- a/erasure/theories/Typed/TypeAnnotations.v
+++ b/erasure/theories/Typed/TypeAnnotations.v
@@ -6,7 +6,8 @@ From MetaCoq.Erasure.Typed Require Import Extraction.
From MetaCoq.Erasure.Typed Require Import Optimize.
From MetaCoq.Erasure.Typed Require Import Transform.
From MetaCoq.Erasure.Typed Require Import ResultMonad.
-From Coq Require Import VectorDef.
+Local Set Warnings "-warn-library-file-stdlib-vector".
+From Stdlib Require Import VectorDef.
From Equations Require Import Equations.
From MetaCoq.Erasure Require Import Extract.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils.
diff --git a/examples/Makefile b/examples/Makefile
index 73691022f..2561f9caf 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -4,7 +4,7 @@ examples: Makefile.coq
$(MAKE) -f Makefile.coq TIMED=$(TIMED)
Makefile.coq: Makefile _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
_CoqProject: _CoqProject.in metacoq-config
cat metacoq-config > _CoqProject
diff --git a/examples/constructor_tac.v b/examples/constructor_tac.v
index 0777cf86a..2c53115d8 100644
--- a/examples/constructor_tac.v
+++ b/examples/constructor_tac.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Template Require Import All Loader.
Import MCMonadNotation.
Open Scope bs.
diff --git a/examples/demo.v b/examples/demo.v
index 337197ef5..5dbf80789 100644
--- a/examples/demo.v
+++ b/examples/demo.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
From MetaCoq.Utils Require Import utils.
From MetaCoq.Template Require Import All.
-From Coq Require Init.
+From Stdlib Require Init.
Import MCMonadNotation.
@@ -73,7 +73,7 @@ MetaCoq Quote Definition add'_syntax := Eval compute in add'.
(** Reflecting definitions **)
Check Coq.Init.Datatypes.nat.
-MetaCoq Unquote Definition zero_from_syntax :=
+MetaCoq Unquote Definition zero_from_syntax :=
(Ast.tConstruct (mkInd (MPfile ["Datatypes"; "Init"; "Corelib"], "nat") 0) 0 []).
Set Printing All.
(* the function unquote_kn in reify.ml4 is not yet implemented *)
diff --git a/html/resources/header.html b/html/resources/header.html
index cc81721b4..5a633a782 100644
--- a/html/resources/header.html
+++ b/html/resources/header.html
@@ -19,7 +19,7 @@
Project Page
- Index
+ Index
Table of Contents
diff --git a/make-opam-files.sh b/make-opam-files.sh
index 38bbba529..11e0f122e 100755
--- a/make-opam-files.sh
+++ b/make-opam-files.sh
@@ -1,17 +1,17 @@
#/usr/bin/env bash
-if (($# < 3))
+if (($# < 4))
then
- echo "Usage: make-opam-files.sh ../opam/released/packages "
+ echo "Usage: make-opam-files.sh ../opam/released/packages "
exit 0
fi
-archive=`basename $3`
-tag=${archive/.tar.gz/}
+archive=`basename $4`
+tag=$3
echo "Target directory: " $1
echo "Target version: " $2
-echo "Releases package: " $3
+echo "Releases package: " $4
echo "Archive:" $archive
echo "Tag:" $tag
@@ -21,7 +21,7 @@ then
rm $archive
fi
-wget $3
+wget $4
hash=`shasum -a 512 $archive | cut -f 1 -d " "`
diff --git a/pcuic/Makefile b/pcuic/Makefile
index c3359c694..61dffbf71 100644
--- a/pcuic/Makefile
+++ b/pcuic/Makefile
@@ -5,7 +5,7 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
coq: Makefile.coq
$(MAKE) -f Makefile.coq
diff --git a/pcuic/_PluginProject.in b/pcuic/_PluginProject.in
index a2b280da0..379cc8f2a 100644
--- a/pcuic/_PluginProject.in
+++ b/pcuic/_PluginProject.in
@@ -13,7 +13,7 @@ src/signature.ml
src/init.mli
src/init.ml
-# From Coq
+# From Stdlib
# src/cRelationClasses.mli
# src/cRelationClasses.ml
# src/relation.mli
diff --git a/pcuic/theories/Bidirectional/BDFromPCUIC.v b/pcuic/theories/Bidirectional/BDFromPCUIC.v
index e8f2d5220..9c5175560 100644
--- a/pcuic/theories/Bidirectional/BDFromPCUIC.v
+++ b/pcuic/theories/Bidirectional/BDFromPCUIC.v
@@ -1,12 +1,12 @@
-From Coq Require Import Bool List Arith Lia.
+From Stdlib Require Import Bool List Arith Lia.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICGlobalEnv PCUICAst PCUICAstUtils PCUICInduction PCUICLiftSubst PCUICTyping PCUICEquality PCUICArities PCUICInversion PCUICInductives PCUICInductiveInversion PCUICReduction PCUICSubstitution PCUICConversion PCUICCumulativity PCUICWfUniverses PCUICValidity PCUICContextConversion PCUICSpine PCUICOnFreeVars PCUICWfUniverses PCUICClosed PCUICWellScopedCumulativity PCUICSR PCUICClosedTyp PCUICUnivSubstitutionConv PCUICWeakeningEnvTyp PCUICWeakeningEnv.
From MetaCoq.PCUIC Require Import BDTyping BDToPCUIC.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/Bidirectional/BDStrengthening.v b/pcuic/theories/Bidirectional/BDStrengthening.v
index 0d898be85..f66dcc13f 100644
--- a/pcuic/theories/Bidirectional/BDStrengthening.v
+++ b/pcuic/theories/Bidirectional/BDStrengthening.v
@@ -1,5 +1,5 @@
-From Coq Require Import Bool List Arith Lia.
-From Coq Require String.
+From Stdlib Require Import Bool List Arith Lia.
+From Stdlib Require String.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config.
@@ -10,8 +10,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICGlobalEnv
From MetaCoq.PCUIC Require Import BDTyping BDToPCUIC BDFromPCUIC.
-Require Import ssreflect ssrbool.
-From Coq.Program Require Import Equality.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib.Program Require Import Equality.
Ltac case_inequalities :=
match goal with
diff --git a/pcuic/theories/Bidirectional/BDToPCUIC.v b/pcuic/theories/Bidirectional/BDToPCUIC.v
index 2fd27e6d3..b63f177b2 100644
--- a/pcuic/theories/Bidirectional/BDToPCUIC.v
+++ b/pcuic/theories/Bidirectional/BDToPCUIC.v
@@ -1,12 +1,12 @@
-From Coq Require Import Bool List Arith Lia.
+From Stdlib Require Import Bool List Arith Lia.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction PCUICLiftSubst PCUICTyping PCUICInversion PCUICInductives PCUICInductiveInversion PCUICEquality PCUICUnivSubst PCUICClosed PCUICSubstitution PCUICValidity PCUICCumulativity PCUICInductives PCUICWfUniverses PCUICContexts PCUICSpine PCUICSR PCUICWellScopedCumulativity PCUICConversion PCUICOnFreeVars PCUICWeakeningTyp PCUICUnivSubstitutionTyp PCUICClosedTyp PCUICUnivSubstitutionConv.
From MetaCoq.PCUIC Require Import BDTyping.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
(** Various generic lemmas missing from the MetaCoq library *)
diff --git a/pcuic/theories/Bidirectional/BDTyping.v b/pcuic/theories/Bidirectional/BDTyping.v
index a384ca756..96a9aa10b 100644
--- a/pcuic/theories/Bidirectional/BDTyping.v
+++ b/pcuic/theories/Bidirectional/BDTyping.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Bool List Arith Lia.
-From Coq Require String.
+From Stdlib Require Import Bool List Arith Lia.
+From Stdlib Require String.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -9,10 +9,10 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
PCUICPosition PCUICTyping PCUICCumulativity PCUICReduction.
From MetaCoq.Utils Require Export LibHypsNaming.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Asymmetric Patterns.
-Require Import Equations.Type.Relation.
-Require Import Equations.Prop.DepElim.
+From Equations.Type Require Import Relation.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Implicit Types (cf : checker_flags) (Σ : global_env_ext) (Γ : context).
diff --git a/pcuic/theories/Bidirectional/BDUnique.v b/pcuic/theories/Bidirectional/BDUnique.v
index baba70a9f..090fbbe04 100644
--- a/pcuic/theories/Bidirectional/BDUnique.v
+++ b/pcuic/theories/Bidirectional/BDUnique.v
@@ -1,13 +1,19 @@
-From Coq Require Import Bool List Arith Lia.
+From Stdlib Require Import Bool List Arith Lia.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config.
-From MetaCoq.PCUIC Require Import PCUICGlobalEnv PCUICAst PCUICAstUtils PCUICTactics PCUICInduction PCUICLiftSubst PCUICTyping PCUICEquality PCUICArities PCUICInversion PCUICReduction PCUICSubstitution PCUICConversion PCUICCumulativity PCUICGeneration PCUICWfUniverses PCUICContextConversion PCUICContextSubst PCUICContexts PCUICSpine PCUICWfUniverses PCUICUnivSubst PCUICClosed PCUICInductives PCUICValidity PCUICInductiveInversion PCUICConfluence PCUICWellScopedCumulativity PCUICSR PCUICOnFreeVars PCUICClosedTyp.
+From MetaCoq.PCUIC Require Import PCUICGlobalEnv PCUICAst PCUICAstUtils PCUICTactics
+ PCUICInduction PCUICLiftSubst PCUICTyping PCUICEquality PCUICArities PCUICInversion
+ PCUICReduction PCUICSubstitution PCUICConversion PCUICCumulativity PCUICGeneration
+ PCUICWfUniverses PCUICContextConversion PCUICContextSubst PCUICContexts PCUICSpine
+ PCUICWfUniverses PCUICUnivSubst PCUICClosed PCUICInductives PCUICValidity
+ PCUICInductiveInversion PCUICConfluence PCUICWellScopedCumulativity PCUICSR
+ PCUICOnFreeVars PCUICClosedTyp.
From MetaCoq.PCUIC Require Import BDTyping BDToPCUIC BDFromPCUIC.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Equations.Type Require Import Relation Relation_Properties.
+From Equations.Prop Require Import DepElim.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/Conversion/PCUICClosedConv.v b/pcuic/theories/Conversion/PCUICClosedConv.v
index 2443d5f6d..4002cf135 100644
--- a/pcuic/theories/Conversion/PCUICClosedConv.v
+++ b/pcuic/theories/Conversion/PCUICClosedConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICOnFreeVars PCUICTyping PCUICReduction PCUICGlobalEnv PCUICWeakeningEnv
PCUICEquality.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/Conversion/PCUICInstConv.v b/pcuic/theories/Conversion/PCUICInstConv.v
index 58e6951d8..e6708abf8 100644
--- a/pcuic/theories/Conversion/PCUICInstConv.v
+++ b/pcuic/theories/Conversion/PCUICInstConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICTactics PCUICAstUtils PCUICCases PCUICInduction
@@ -10,9 +10,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICTactics PCUICAstUtils
PCUICGuardCondition PCUICUnivSubstitutionConv PCUICOnFreeVars PCUICOnFreeVarsConv.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
Set Keyed Unification.
Set Default Goal Selector "!".
diff --git a/pcuic/theories/Conversion/PCUICNamelessConv.v b/pcuic/theories/Conversion/PCUICNamelessConv.v
index 75517dcbf..6a831594d 100644
--- a/pcuic/theories/Conversion/PCUICNamelessConv.v
+++ b/pcuic/theories/Conversion/PCUICNamelessConv.v
@@ -1,13 +1,13 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICInduction PCUICCases
PCUICLiftSubst PCUICEquality PCUICReduction PCUICCumulativitySpec PCUICCumulativity PCUICPosition PCUICUnivSubst
PCUICNamelessDef PCUICGuardCondition PCUICClosedConv PCUICClosedTyp PCUICUnivSubstitutionConv
PCUICClosed PCUICSigmaCalculus PCUICTyping (* for context manipulations *).
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/Conversion/PCUICOnFreeVarsConv.v b/pcuic/theories/Conversion/PCUICOnFreeVarsConv.v
index 291ffba2e..53c61fc83 100644
--- a/pcuic/theories/Conversion/PCUICOnFreeVarsConv.v
+++ b/pcuic/theories/Conversion/PCUICOnFreeVarsConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICOnFreeVars PCUICTyping PCUICReduction PCUICGlobalEnv PCUICWeakeningEnvConv PCUICClosedConv
PCUICWeakeningEnvTyp PCUICInstDef PCUICRenameDef PCUICRenameConv.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Lemma on_free_vars_rename P f t :
diff --git a/pcuic/theories/Conversion/PCUICRenameConv.v b/pcuic/theories/Conversion/PCUICRenameConv.v
index f3aad9ee0..fba298df2 100644
--- a/pcuic/theories/Conversion/PCUICRenameConv.v
+++ b/pcuic/theories/Conversion/PCUICRenameConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICPrimitive PCUICAst PCUICOnOne PCUICAstUtils PCUICCases PCUICInduction
@@ -9,9 +9,9 @@ From MetaCoq.PCUIC Require Import PCUICPrimitive PCUICAst PCUICOnOne PCUICAstUti
PCUICWeakeningEnvTyp PCUICClosedConv PCUICClosedTyp PCUICViews
PCUICTyping.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
(** * Type preservation for σ-calculus operations *)
diff --git a/pcuic/theories/Conversion/PCUICUnivSubstitutionConv.v b/pcuic/theories/Conversion/PCUICUnivSubstitutionConv.v
index 63299e932..074bf0ce3 100644
--- a/pcuic/theories/Conversion/PCUICUnivSubstitutionConv.v
+++ b/pcuic/theories/Conversion/PCUICUnivSubstitutionConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect CRelationClasses.
+From Stdlib Require Import ssreflect CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICInduction
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICInducti
PCUICReduction PCUICWeakeningEnv
PCUICClosed PCUICPosition.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Implicit Types (cf : checker_flags).
@@ -1738,8 +1738,8 @@ Qed.
Definition wf_global_ext {cf : checker_flags} Σ ext := wf_ext_wk (Σ, ext).
-Require Import Morphisms.
-Require Import ssreflect.
+From Stdlib Require Import Morphisms.
+From Stdlib Require Import ssreflect.
Set SimplIsCbn.
Section SubstIdentity.
diff --git a/pcuic/theories/Conversion/PCUICWeakeningConfigConv.v b/pcuic/theories/Conversion/PCUICWeakeningConfigConv.v
index 8dadbaf65..3cf2670cd 100644
--- a/pcuic/theories/Conversion/PCUICWeakeningConfigConv.v
+++ b/pcuic/theories/Conversion/PCUICWeakeningConfigConv.v
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
(* PCUICGuardCondition *) (* PCUICGlobalEnv *).
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
Implicit Types (cf : checker_flags).
diff --git a/pcuic/theories/Conversion/PCUICWeakeningConv.v b/pcuic/theories/Conversion/PCUICWeakeningConv.v
index 239d04e6c..d85d6aba0 100644
--- a/pcuic/theories/Conversion/PCUICWeakeningConv.v
+++ b/pcuic/theories/Conversion/PCUICWeakeningConv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICSigmaCalculus PCUICRenameDef PCUICRenameConv PCUICOnFreeVars
PCUICClosedConv PCUICClosedTyp.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/Conversion/PCUICWeakeningEnvConv.v b/pcuic/theories/Conversion/PCUICWeakeningEnvConv.v
index 335ef405c..4e9db4093 100644
--- a/pcuic/theories/Conversion/PCUICWeakeningEnvConv.v
+++ b/pcuic/theories/Conversion/PCUICWeakeningEnvConv.v
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
(* PCUICGuardCondition *) (* PCUICGlobalEnv *).
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
Implicit Types (cf : checker_flags).
diff --git a/pcuic/theories/PCUICAlpha.v b/pcuic/theories/PCUICAlpha.v
index b0d746fbe..b11f1b9d8 100644
--- a/pcuic/theories/PCUICAlpha.v
+++ b/pcuic/theories/PCUICAlpha.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool CRelationClasses CMorphisms.
+From Stdlib Require Import ssreflect ssrbool CRelationClasses CMorphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics
diff --git a/pcuic/theories/PCUICArities.v b/pcuic/theories/PCUICArities.v
index a6e0d7668..fe5060d06 100644
--- a/pcuic/theories/PCUICArities.v
+++ b/pcuic/theories/PCUICArities.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses ProofIrrelevance ssreflect ssrbool.
+From Stdlib Require Import CRelationClasses ProofIrrelevance ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
@@ -12,8 +12,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICWeakeningConv PCUICWeakeningTyp PCUICGeneration PCUICUtils PCUICContexts
PCUICWellScopedCumulativity PCUICConversion PCUICOnFreeVars.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation_Properties.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation_Properties.
From Equations Require Import Equations.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/PCUICAst.v b/pcuic/theories/PCUICAst.v
index 7c802bfcd..fdae45cc9 100644
--- a/pcuic/theories/PCUICAst.v
+++ b/pcuic/theories/PCUICAst.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool Morphisms.
+From Stdlib Require Import ssreflect ssrbool Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Export Primitive Universes BasicAst Environment Reflect.
From MetaCoq.Common Require EnvironmentTyping.
diff --git a/pcuic/theories/PCUICCSubst.v b/pcuic/theories/PCUICCSubst.v
index 7aa1b949f..cba6a4f12 100644
--- a/pcuic/theories/PCUICCSubst.v
+++ b/pcuic/theories/PCUICCSubst.v
@@ -1,11 +1,11 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst
PCUICUnivSubst PCUICTyping PCUICInduction PCUICReduction PCUICClosed.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
(** * Closed single substitution:
diff --git a/pcuic/theories/PCUICCanonicity.v b/pcuic/theories/PCUICCanonicity.v
index 84b881bb8..840f4889f 100644
--- a/pcuic/theories/PCUICCanonicity.v
+++ b/pcuic/theories/PCUICCanonicity.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUtils
diff --git a/pcuic/theories/PCUICCasesContexts.v b/pcuic/theories/PCUICCasesContexts.v
index 500bbee39..073dc2330 100644
--- a/pcuic/theories/PCUICCasesContexts.v
+++ b/pcuic/theories/PCUICCasesContexts.v
@@ -1,13 +1,13 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 ssreflect ssrbool.
+From Stdlib Require Import Utf8 ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
PCUICLiftSubst PCUICEquality PCUICSigmaCalculus.
-Require Import Equations.Type.Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Equations.Type Require Import Relation_Properties.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Local Set SimplIsCbn.
diff --git a/pcuic/theories/PCUICCasesHelper.v b/pcuic/theories/PCUICCasesHelper.v
index 82ef47711..4755e344e 100644
--- a/pcuic/theories/PCUICCasesHelper.v
+++ b/pcuic/theories/PCUICCasesHelper.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool ssrfun.
+From Stdlib Require Import ssreflect ssrbool ssrfun.
Set Warnings "-notation-overridden".
From MetaCoq.Utils Require Import utils monad_utils.
Set Warnings "notation-overridden".
diff --git a/pcuic/theories/PCUICClassification.v b/pcuic/theories/PCUICClassification.v
index c76e23e21..731b0a0cd 100644
--- a/pcuic/theories/PCUICClassification.v
+++ b/pcuic/theories/PCUICClassification.v
@@ -17,9 +17,9 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICAst PCUICAstUtils PCUICTactic
Local Existing Instance config.extraction_checker_flags.
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect ssrbool.
-Require Import Equations.Type.Relation_Properties.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Type Require Import Relation_Properties.
Set Default Proof Using "Type*".
diff --git a/pcuic/theories/PCUICConfluence.v b/pcuic/theories/PCUICConfluence.v
index 8cc111918..944252f3b 100644
--- a/pcuic/theories/PCUICConfluence.v
+++ b/pcuic/theories/PCUICConfluence.v
@@ -17,12 +17,12 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICTactics
so we also have [red_confluence]: as long as the starting contexts and terms are well-scoped
confluence holds. *)
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import CRelationClasses CMorphisms.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
+From Stdlib Require Import CRelationClasses CMorphisms.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation Relation_Properties.
Local Ltac intuition_solver ::= auto with *.
@@ -1403,6 +1403,16 @@ Proof.
eapply eq_term_upto_univ_napp_flip; [..|eassumption]; tc.
Qed.
+Lemma flip_PreOrder {A} (R : A -> A -> Prop) :
+ RelationClasses.PreOrder R ->
+ RelationClasses.PreOrder (flip R).
+Proof.
+ intro H.
+ split.
+ - apply H.
+ - intros x y z r r'. eapply H. all: eassumption.
+Qed.
+
Lemma red1_eq_term_upto_univ_r {Σ Σ' cmp_universe cmp_sort pb napp Γ u v u'} :
RelationClasses.PreOrder (cmp_universe Conv) ->
RelationClasses.PreOrder (cmp_universe pb) ->
@@ -1420,7 +1430,7 @@ Lemma red1_eq_term_upto_univ_r {Σ Σ' cmp_universe cmp_sort pb napp Γ u v u'}
Proof.
intros preorder_univ_conv preorder_sort_pb preorder_sort_conv preoder_sort_pb sub_univ sub_sort hsubst_univ hsubst_sort_conv hsubst_sort_pb h uv.
destruct (@red1_eq_term_upto_univ_l Σ Σ' (fun pb => flip (cmp_universe pb)) (fun pb => flip (cmp_sort pb)) pb napp Γ u v u') as (v' & r & e).
- all: eauto using RelationClasses.flip_PreOrder.
+ all: eauto using flip_PreOrder.
1,2: intros ??; unfold flip; cbn; eauto.
- red. intros s u1 u2 ru.
eapply cmp_universe_instance_flip in ru; cbnr.
diff --git a/pcuic/theories/PCUICConsistency.v b/pcuic/theories/PCUICConsistency.v
index ae4c67e07..3bbfa8142 100644
--- a/pcuic/theories/PCUICConsistency.v
+++ b/pcuic/theories/PCUICConsistency.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUtils
diff --git a/pcuic/theories/PCUICContextConversion.v b/pcuic/theories/PCUICContextConversion.v
index 1386ffde9..a5ac6c82d 100644
--- a/pcuic/theories/PCUICContextConversion.v
+++ b/pcuic/theories/PCUICContextConversion.v
@@ -9,7 +9,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils
PCUICContextReduction PCUICOnFreeVars PCUICWellScopedCumulativity
PCUICGuardCondition PCUICClosedTyp.
-From Coq Require Import CRelationClasses ssreflect ssrbool.
+From Stdlib Require Import CRelationClasses ssreflect ssrbool.
From Equations Require Import Equations.
Arguments red_ctx : clear implicits.
diff --git a/pcuic/theories/PCUICContextReduction.v b/pcuic/theories/PCUICContextReduction.v
index 3b6c6814d..831a043f2 100644
--- a/pcuic/theories/PCUICContextReduction.v
+++ b/pcuic/theories/PCUICContextReduction.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICTactics
@@ -8,8 +8,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICTactics
PCUICTyping PCUICOnFreeVars PCUICSubstitution
PCUICRenameDef PCUICRenameConv PCUICInstDef PCUICInstConv.
-Require Import ssreflect ssrbool.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/pcuic/theories/PCUICContextSubst.v b/pcuic/theories/PCUICContextSubst.v
index dec36f3fc..deacc64f3 100644
--- a/pcuic/theories/PCUICContextSubst.v
+++ b/pcuic/theories/PCUICContextSubst.v
@@ -4,7 +4,7 @@ From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICLiftSubst.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
(** * Substitution lemmas for typing derivations. *)
@@ -331,7 +331,7 @@ Proof.
move=> /mk_ctx_subst_spec /context_subst_length //.
Qed.
-From Coq Require Import ssrbool.
+From Stdlib Require Import ssrbool.
From MetaCoq.PCUIC Require Import PCUICClosed.
Lemma closedn_ctx_subst_forall n Δ l s :
context_subst Δ l s ->
diff --git a/pcuic/theories/PCUICContexts.v b/pcuic/theories/PCUICContexts.v
index ef851544b..1e2941805 100644
--- a/pcuic/theories/PCUICContexts.v
+++ b/pcuic/theories/PCUICContexts.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
From MetaCoq.Utils Require Import utils.
-From Coq Require Import CRelationClasses ProofIrrelevance.
+From Stdlib Require Import CRelationClasses ProofIrrelevance.
From MetaCoq.Common Require Import config Universes BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduction
PCUICReflect PCUICLiftSubst PCUICUnivSubst PCUICTyping
@@ -10,9 +10,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICWeakeningTyp PCUICWeakeningConv PCUICGeneration PCUICUtils.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation_Properties.
-Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation_Properties.
+From Stdlib Require Import ssreflect ssrbool.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICConvCumInversion.v b/pcuic/theories/PCUICConvCumInversion.v
index 081228367..b08976195 100644
--- a/pcuic/theories/PCUICConvCumInversion.v
+++ b/pcuic/theories/PCUICConvCumInversion.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICContextConversion PCUICContextReduction
PCUICCumulativity PCUICConversion PCUICEquality PCUICLiftSubst PCUICNormal PCUICReduction PCUICTyping
diff --git a/pcuic/theories/PCUICConversion.v b/pcuic/theories/PCUICConversion.v
index 3c805bb18..a71adc274 100644
--- a/pcuic/theories/PCUICConversion.v
+++ b/pcuic/theories/PCUICConversion.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases PCUICLiftSubst PCUICTyping PCUICOnOne
@@ -9,9 +9,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases
PCUICWeakeningConv PCUICWeakeningTyp PCUICUnivSubst
PCUICWellScopedCumulativity PCUICUnivSubstitutionConv PCUICInduction.
-Require Import CRelationClasses CMorphisms.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import CRelationClasses CMorphisms.
+From Equations.Type Require Import Relation Relation_Properties.
+From Equations.Prop Require Import DepElim.
(** We develop the equational theory generated by the conversion relation.
diff --git a/pcuic/theories/PCUICCumulProp.v b/pcuic/theories/PCUICCumulProp.v
index 129f87810..40fa00288 100644
--- a/pcuic/theories/PCUICCumulProp.v
+++ b/pcuic/theories/PCUICCumulProp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes.
From MetaCoq.PCUIC Require Import PCUICTyping PCUICAst PCUICAstUtils PCUICTactics
@@ -13,10 +13,10 @@ From MetaCoq.PCUIC Require Import PCUICTyping PCUICAst PCUICAstUtils PCUICTactic
PCUICWellScopedCumulativity
PCUICInductiveInversion.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
+From Equations.Type Require Import Relation Relation_Properties.
Require Equations.Prop.DepElim.
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Implicit Types (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICCumulativity.v b/pcuic/theories/PCUICCumulativity.v
index 318be8f28..26c1435a3 100644
--- a/pcuic/theories/PCUICCumulativity.v
+++ b/pcuic/theories/PCUICCumulativity.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From Equations.Type Require Import Relation Relation_Properties.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst.
diff --git a/pcuic/theories/PCUICCumulativitySpec.v b/pcuic/theories/PCUICCumulativitySpec.v
index 10164a8e6..fe66a85b1 100644
--- a/pcuic/theories/PCUICCumulativitySpec.v
+++ b/pcuic/theories/PCUICCumulativitySpec.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From Equations.Type Require Import Relation Relation_Properties.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst Reflect.
diff --git a/pcuic/theories/PCUICElimination.v b/pcuic/theories/PCUICElimination.v
index b5341a278..6609b531d 100644
--- a/pcuic/theories/PCUICElimination.v
+++ b/pcuic/theories/PCUICElimination.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssrbool.
+From Stdlib Require Import ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCasesContexts
@@ -15,7 +15,7 @@ From MetaCoq.PCUIC Require Import PCUICInductiveInversion PCUICOnFreeVars PCUICE
Require Equations.Prop.DepElim.
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICEquality.v b/pcuic/theories/PCUICEquality.v
index 494aa21b5..c77712712 100644
--- a/pcuic/theories/PCUICEquality.v
+++ b/pcuic/theories/PCUICEquality.v
@@ -1,11 +1,11 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CMorphisms.
+From Stdlib Require Import CMorphisms.
From MetaCoq.Utils Require Import LibHypsNaming utils.
From MetaCoq.Common Require Import config Reflect.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICLiftSubst PCUICReflect.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Equations With UIP.
diff --git a/pcuic/theories/PCUICEtaExpand.v b/pcuic/theories/PCUICEtaExpand.v
index 4da68699b..6bc9b5608 100644
--- a/pcuic/theories/PCUICEtaExpand.v
+++ b/pcuic/theories/PCUICEtaExpand.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
diff --git a/pcuic/theories/PCUICExpandLets.v b/pcuic/theories/PCUICExpandLets.v
index 76aa43586..03a406ae9 100644
--- a/pcuic/theories/PCUICExpandLets.v
+++ b/pcuic/theories/PCUICExpandLets.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-(* From Coq Require Import Uint63 FloatOps FloatAxioms. *)
+(* From Stdlib Require Import Uint63 FloatOps FloatAxioms. *)
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICTyping PCUICProgram.
diff --git a/pcuic/theories/PCUICExpandLetsCorrectness.v b/pcuic/theories/PCUICExpandLetsCorrectness.v
index 929de9afd..d1c492a54 100644
--- a/pcuic/theories/PCUICExpandLetsCorrectness.v
+++ b/pcuic/theories/PCUICExpandLetsCorrectness.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool Utf8 CRelationClasses.
+From Stdlib Require Import ssreflect ssrbool Utf8 CRelationClasses.
From Equations.Type Require Import Relation Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Warnings "-notation-overridden".
@@ -1089,7 +1089,7 @@ Proof.
rewrite (trans_cstr_branch_context p i) //.
Qed.
-Require Import PCUICContexts.
+From MetaCoq.PCUIC Require Import PCUICContexts.
Lemma eq_names_smash_context Γ :
All2 (fun x y => decl_name x = decl_name y) (smash_context [] (trans_local Γ)) (smash_context [] Γ).
@@ -1201,7 +1201,7 @@ Proof.
now rewrite (declared_minductive_ind_npars declc).
Qed.
-Require Import PCUICSpine.
+From MetaCoq.PCUIC Require Import PCUICSpine.
Lemma trans_reln l p Γ : map trans (SE.reln l p Γ) =
reln (map trans l) p (trans_local Γ).
@@ -1298,7 +1298,7 @@ Proof.
destruct y as [na' [b|] ty]; cbn; auto.
Qed.
-Require Import Morphisms.
+From Stdlib Require Import Morphisms.
#[global] Instance map2_Proper {A B C} : Morphisms.Proper (pointwise_relation A (pointwise_relation B (@eq C)) ==> eq ==> eq ==> eq) map2.
Proof.
intros f g Hfg ? ? -> ? ? ->.
@@ -1739,7 +1739,7 @@ Proof.
eapply is_open_term_lift. 2-3:now len. apply ont.
Qed.
-Require Import PCUICSubstitution.
+From MetaCoq.PCUIC Require Import PCUICSubstitution.
Lemma untyped_subslet_lift (Γ Δ : context) s Δ' :
untyped_subslet Γ s Δ' ->
@@ -5569,7 +5569,7 @@ Proof.
destruct (decl_body c); lia.
Qed.
-Require Import PCUICLiftSubst PCUICContexts PCUICOnFreeVars.
+From MetaCoq.PCUIC Require Import PCUICLiftSubst PCUICContexts PCUICOnFreeVars.
Lemma expand_lets_tFix Γ mfix idx k :
expand_lets_k Γ k (tFix mfix idx) = tFix (List.map (map_def (expand_lets_k Γ k) (expand_lets_k Γ (#|mfix| + k))) mfix) idx.
diff --git a/pcuic/theories/PCUICFirstorder.v b/pcuic/theories/PCUICFirstorder.v
index 2376250ef..e7eb782dd 100644
--- a/pcuic/theories/PCUICFirstorder.v
+++ b/pcuic/theories/PCUICFirstorder.v
@@ -1,4 +1,4 @@
-From Coq Require Import Program ssreflect ssrbool List.
+From Stdlib Require Import Program ssreflect ssrbool List.
From MetaCoq.Utils Require Import utils MCRelations.
From MetaCoq.Common Require Import config Kernames.
diff --git a/pcuic/theories/PCUICGeneration.v b/pcuic/theories/PCUICGeneration.v
index e844a3790..1b560a380 100644
--- a/pcuic/theories/PCUICGeneration.v
+++ b/pcuic/theories/PCUICGeneration.v
@@ -2,7 +2,7 @@
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICLiftSubst PCUICTyping.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Section Generation.
diff --git a/pcuic/theories/PCUICGlobalEnv.v b/pcuic/theories/PCUICGlobalEnv.v
index 3abe5276e..bb64520d3 100644
--- a/pcuic/theories/PCUICGlobalEnv.v
+++ b/pcuic/theories/PCUICGlobalEnv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ProofIrrelevance.
+From Stdlib Require Import ProofIrrelevance.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
diff --git a/pcuic/theories/PCUICInductiveInversion.v b/pcuic/theories/PCUICInductiveInversion.v
index 4749f5a06..7593dbab0 100644
--- a/pcuic/theories/PCUICInductiveInversion.v
+++ b/pcuic/theories/PCUICInductiveInversion.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8.
+From Stdlib Require Import Utf8.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduction
@@ -16,11 +16,11 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICConversion PCUICInversion PCUICContexts PCUICArities
PCUICSpine PCUICInductives PCUICWellScopedCumulativity PCUICValidity.
-Require Import Equations.Type.Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Equations.Type Require Import Relation_Properties.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Derive Subterm for term.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Local Set SimplIsCbn.
diff --git a/pcuic/theories/PCUICInductives.v b/pcuic/theories/PCUICInductives.v
index 6beae8f77..79703abae 100644
--- a/pcuic/theories/PCUICInductives.v
+++ b/pcuic/theories/PCUICInductives.v
@@ -14,9 +14,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICConversion PCUICGlobalEnv PCUICInversion PCUICContexts PCUICArities
PCUICParallelReduction PCUICWfUniverses PCUICSpine.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Local Set SimplIsCbn.
diff --git a/pcuic/theories/PCUICInversion.v b/pcuic/theories/PCUICInversion.v
index ec70dbba1..627d294ed 100644
--- a/pcuic/theories/PCUICInversion.v
+++ b/pcuic/theories/PCUICInversion.v
@@ -1,12 +1,12 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICCases PCUICLiftSubst PCUICUnivSubst
PCUICTyping PCUICCumulativity PCUICConfluence PCUICConversion
PCUICOnFreeVars PCUICClosedTyp PCUICWellScopedCumulativity.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
(* TODO: make wf arguments implicit *)
Section Inversion.
diff --git a/pcuic/theories/PCUICNormal.v b/pcuic/theories/PCUICNormal.v
index afeafcc68..77e3a71ae 100644
--- a/pcuic/theories/PCUICNormal.v
+++ b/pcuic/theories/PCUICNormal.v
@@ -1,14 +1,13 @@
(* Distributed under the terms of the MIT license. *)
From Equations Require Import Equations.
-From Coq Require Import Bool String List Program BinPos Compare_dec Arith Lia.
+From Stdlib Require Import Bool String List Program BinPos Compare_dec Arith Lia.
From MetaCoq.Utils Require Import utils monad_utils.
-From MetaCoq.Common
-Require Import config Universes BasicAst.
+From MetaCoq.Common Require Import config Universes BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICOnOne PCUICCases
PCUICContextReduction PCUICEquality PCUICLiftSubst PCUICTyping PCUICWeakeningEnvConv
PCUICWeakeningEnvTyp PCUICReduction PCUICClosedTyp
PCUICInduction PCUICRedTypeIrrelevance PCUICOnFreeVars PCUICEtaExpand.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Set Asymmetric Patterns.
(* Require Import Equations.Type.DepElim. *)
@@ -1172,7 +1171,7 @@ Ltac inv_on_free_vars :=
rewrite -> test_context_k_closed_on_free_vars_ctx in H
end.
-Require Import PCUICWellScopedCumulativity PCUICOnFreeVars PCUICConfluence PCUICSR PCUICConversion PCUICSubstitution.
+From MetaCoq.PCUIC Require Import PCUICWellScopedCumulativity PCUICOnFreeVars PCUICConfluence PCUICSR PCUICConversion PCUICSubstitution.
Lemma red_ctx_rel_subst {cf : checker_flags} {Σ : global_env_ext} {wfΣ : wf Σ} P Γ Γ' s s' Δ :
All2 (red Σ Γ) s s' ->
diff --git a/pcuic/theories/PCUICNormalization.v b/pcuic/theories/PCUICNormalization.v
index f1594751b..7f023755e 100644
--- a/pcuic/theories/PCUICNormalization.v
+++ b/pcuic/theories/PCUICNormalization.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUtils
diff --git a/pcuic/theories/PCUICParallelReduction.v b/pcuic/theories/PCUICParallelReduction.v
index 8c6dfad46..f369c31a0 100644
--- a/pcuic/theories/PCUICParallelReduction.v
+++ b/pcuic/theories/PCUICParallelReduction.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import RelationClasses CRelationClasses.
+From Stdlib Require Import RelationClasses CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICUtils PCUICOnOne PCUICAst PCUICAstUtils PCUICTactics PCUICDepth PCUICCases
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICUtils PCUICOnOne PCUICAst PCUICAstUtils P
PCUICRenameDef PCUICRenameConv PCUICInstDef PCUICInstConv PCUICOnFreeVars
PCUICWeakeningConv PCUICWeakeningTyp PCUICSubstitution.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Set Default Proof Using "Type*".
@@ -235,7 +235,7 @@ Section ParallelReduction.
| _ => false
end.
- Reserved Notation "'pred1_ctx'" (at level 8).
+ Reserved Notation "'pred1_ctx'" (at level 0).
Reserved Notation "'pred1_ctx_over' Γ Γ'" (at level 200, Γ, Γ' at level 9).
Inductive pred1 (Γ Γ' : context) : term -> term -> Type :=
diff --git a/pcuic/theories/PCUICParallelReductionConfluence.v b/pcuic/theories/PCUICParallelReductionConfluence.v
index 8b7611754..261bc3b74 100644
--- a/pcuic/theories/PCUICParallelReductionConfluence.v
+++ b/pcuic/theories/PCUICParallelReductionConfluence.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require CMorphisms.
+From Stdlib Require CMorphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICTactics PCUICSize PCUICLiftSubst
@@ -9,8 +9,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICTactics
PCUICViews PCUICParallelReduction.
-Require Import ssreflect ssrbool.
-Require Import Morphisms CRelationClasses.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require Import Morphisms CRelationClasses.
From Equations Require Import Equations.
Add Search Blacklist "pred1_rect".
diff --git a/pcuic/theories/PCUICPrincipality.v b/pcuic/theories/PCUICPrincipality.v
index 7838e1513..1e87231e8 100644
--- a/pcuic/theories/PCUICPrincipality.v
+++ b/pcuic/theories/PCUICPrincipality.v
@@ -10,8 +10,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICSR PCUICCumulProp PCUICWfUniverses
PCUICOnFreeVars PCUICWellScopedCumulativity.
-Require Import ssreflect ssrbool.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Equations With UIP.
@@ -364,7 +364,7 @@ Lemma principal_type_ind {cf:checker_flags} {Σ Γ c ind ind' u u' args args'} {
(∑ ui',
cmp_ind_universes Σ ind #|args| ui' u *
cmp_ind_universes Σ ind' #|args'| ui' u') *
- ws_cumul_pb_terms Σ Γ args args' *
+ ws_cumul_pb_terms Σ Γ args args' *
(ind = ind').
Proof.
intros h h'.
@@ -375,7 +375,7 @@ Proof.
eapply invert_red_mkApps_tInd in redl as [args'' [-> eq0]]; auto.
eapply invert_red_mkApps_tInd in redr as [args''' [eqnf eq1]]; auto.
solve_discr.
- repeat split; eauto.
+ repeat split; eauto.
assert (#|args| = #|args'|).
now rewrite -(All2_length eqargs) -(All2_length eqargs') (All2_length a) (All2_length a0).
transitivity l'. now symmetry.
diff --git a/pcuic/theories/PCUICProgram.v b/pcuic/theories/PCUICProgram.v
index f9de73504..ec3f4df30 100644
--- a/pcuic/theories/PCUICProgram.v
+++ b/pcuic/theories/PCUICProgram.v
@@ -1,5 +1,5 @@
(** * Definition of programs in template-coq, well-typed terms and provided transformations **)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config EnvMap.
From MetaCoq.PCUIC Require Import PCUICAstUtils PCUICAst PCUICGlobalEnv PCUICTyping.
diff --git a/pcuic/theories/PCUICProgress.v b/pcuic/theories/PCUICProgress.v
index 522e886eb..8a88d4c2c 100644
--- a/pcuic/theories/PCUICProgress.v
+++ b/pcuic/theories/PCUICProgress.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICTyping PCUICEquality PCUICAst PCUICAstUtils
diff --git a/pcuic/theories/PCUICRedTypeIrrelevance.v b/pcuic/theories/PCUICRedTypeIrrelevance.v
index 8e5b8b12c..b9af5fbbf 100644
--- a/pcuic/theories/PCUICRedTypeIrrelevance.v
+++ b/pcuic/theories/PCUICRedTypeIrrelevance.v
@@ -1,11 +1,11 @@
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTyping PCUICLiftSubst
PCUICReduction PCUICContextReduction.
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
(** Types and names of variables are irrelevant during reduction.
More precisely, we only need to preserve bodies of let declarations
diff --git a/pcuic/theories/PCUICReduction.v b/pcuic/theories/PCUICReduction.v
index b73119528..e8595ef71 100644
--- a/pcuic/theories/PCUICReduction.v
+++ b/pcuic/theories/PCUICReduction.v
@@ -5,8 +5,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils
PCUICLiftSubst PCUICUnivSubst PCUICInduction PCUICPrimitive
PCUICCases PCUICClosed PCUICTactics.
-Require Import ssreflect.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
Set Equations Transparent.
@@ -2159,7 +2159,7 @@ Proof.
Qed.
(* TODO Find a better place for this. *)
-Require Import PCUICPosition.
+From MetaCoq.PCUIC Require Import PCUICPosition.
Section Stacks.
Context (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICSN.v b/pcuic/theories/PCUICSN.v
index a8a2af995..08ef5135f 100644
--- a/pcuic/theories/PCUICSN.v
+++ b/pcuic/theories/PCUICSN.v
@@ -6,8 +6,8 @@ From MetaCoq.PCUIC Require Import
PCUICReduction PCUICEquality PCUICConfluence PCUICUnivSubstitutionConv
PCUICUnivSubstitutionTyp.
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect.
(** We assume normalization of the reduction.
We state is as well-foundedness of the reduction.
diff --git a/pcuic/theories/PCUICSR.v b/pcuic/theories/PCUICSR.v
index 28b2a568a..0087e602e 100644
--- a/pcuic/theories/PCUICSR.v
+++ b/pcuic/theories/PCUICSR.v
@@ -13,10 +13,10 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICUtils
PCUICWellScopedCumulativity PCUICGuardCondition
PCUICParallelReduction PCUICSpine PCUICInductives PCUICInductiveInversion PCUICSigmaCalculus.
-Require Import ssreflect ssrbool Utf8.
+From Stdlib Require Import ssreflect ssrbool Utf8.
From Equations Require Import Equations.
From Equations.Type Require Import Relation Relation_Properties.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Local Set SimplIsCbn.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
@@ -245,7 +245,7 @@ Proof.
intros; now eapply conv_context_rel_reln.
Qed.
-Require Import PCUICOnFreeVars.
+From MetaCoq.PCUIC Require Import PCUICOnFreeVars.
Lemma eq_context_alpha_conv {cf} {Σ} {wfΣ : wf Σ} Γ Δ Δ' :
eq_context_upto_names Δ Δ' ->
diff --git a/pcuic/theories/PCUICSafeLemmata.v b/pcuic/theories/PCUICSafeLemmata.v
index 7bc9cffb9..2f82f989a 100644
--- a/pcuic/theories/PCUICSafeLemmata.v
+++ b/pcuic/theories/PCUICSafeLemmata.v
@@ -13,8 +13,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
PCUICOnFreeVars PCUICSpine PCUICInductives
PCUICWeakeningConv PCUICWeakeningTyp PCUICContexts PCUICInductiveInversion.
-Require Import ssreflect ssrbool.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
Local Set Keyed Unification.
diff --git a/pcuic/theories/PCUICSigmaCalculus.v b/pcuic/theories/PCUICSigmaCalculus.v
index e7a81366e..a036ae84d 100644
--- a/pcuic/theories/PCUICSigmaCalculus.v
+++ b/pcuic/theories/PCUICSigmaCalculus.v
@@ -1,12 +1,12 @@
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
PCUICLiftSubst.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
Set Keyed Unification.
Set Default Goal Selector "!".
diff --git a/pcuic/theories/PCUICSpine.v b/pcuic/theories/PCUICSpine.v
index 342b2cd43..9263b0c4f 100644
--- a/pcuic/theories/PCUICSpine.v
+++ b/pcuic/theories/PCUICSpine.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 CRelationClasses ProofIrrelevance.
+From Stdlib Require Import Utf8 CRelationClasses ProofIrrelevance.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduction
@@ -16,10 +16,10 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICWeakeningConv PCUICWeakeningTyp PCUICGeneration PCUICUtils PCUICContexts
PCUICArities.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation_Properties.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation_Properties.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICSubstitution.v b/pcuic/theories/PCUICSubstitution.v
index 854f75ee2..1ec2c7322 100644
--- a/pcuic/theories/PCUICSubstitution.v
+++ b/pcuic/theories/PCUICSubstitution.v
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICReduction PCUICWeakeningConv PCUICWeakeningTyp PCUICCumulativity PCUICUnivSubstitutionConv
PCUICRenameDef PCUICRenameConv PCUICInstDef PCUICInstConv PCUICInstTyp PCUICOnFreeVars.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
(** * Substitution lemmas for typing derivations. Substitution is now derived from a general
@@ -1247,7 +1247,7 @@ Proof.
apply (subst_compare_decl p).
Qed.
-From Coq Require Import ssrbool.
+From Stdlib Require Import ssrbool.
Section CtxReduction.
Context {cf : checker_flags}.
diff --git a/pcuic/theories/PCUICTelescopes.v b/pcuic/theories/PCUICTelescopes.v
index f9884535f..d03798eb1 100644
--- a/pcuic/theories/PCUICTelescopes.v
+++ b/pcuic/theories/PCUICTelescopes.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Utf8 CRelationClasses ProofIrrelevance.
+From Stdlib Require Import Utf8 CRelationClasses ProofIrrelevance.
From MetaCoq.Common Require Import config Universes utils BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduction
PCUICReflect PCUICLiftSubst PCUICSigmaCalculus
@@ -16,10 +16,10 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICInduc
PCUICWeakeningConv PCUICWeakeningTyp PCUICGeneration PCUICUtils PCUICContexts
PCUICArities PCUICSpine.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation_Properties.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation_Properties.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Implicit Types (cf : checker_flags) (Σ : global_env_ext).
diff --git a/pcuic/theories/PCUICTypedAst.v b/pcuic/theories/PCUICTypedAst.v
index c8d97d745..c5d4e64be 100644
--- a/pcuic/theories/PCUICTypedAst.v
+++ b/pcuic/theories/PCUICTypedAst.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Common Require Export utils Universes BasicAst Environment Reflect.
From MetaCoq.Common Require EnvironmentTyping.
From MetaCoq.PCUIC Require Export PCUICPrimitive.
diff --git a/pcuic/theories/PCUICTyping.v b/pcuic/theories/PCUICTyping.v
index 8ea666590..604d328ec 100644
--- a/pcuic/theories/PCUICTyping.v
+++ b/pcuic/theories/PCUICTyping.v
@@ -11,8 +11,8 @@ Import MCMonadNotation.
(* TODO: remove this export *)
From MetaCoq.Utils Require Export LibHypsNaming.
-Require Import ssreflect ssrbool.
-Require Import Equations.Type.Relation.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Type Require Import Relation.
From Equations Require Import Equations.
Set Equations With UIP.
diff --git a/pcuic/theories/PCUICValidity.v b/pcuic/theories/PCUICValidity.v
index 817c746b1..51a6d3556 100644
--- a/pcuic/theories/PCUICValidity.v
+++ b/pcuic/theories/PCUICValidity.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst
@@ -13,8 +13,8 @@ From MetaCoq.PCUIC Require Import PCUICAst
PCUICWellScopedCumulativity PCUICContexts PCUICWfUniverses.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect ssrbool.
Derive Signature for typing.
diff --git a/pcuic/theories/PCUICWcbvEval.v b/pcuic/theories/PCUICWcbvEval.v
index d04ba3361..ec432b554 100644
--- a/pcuic/theories/PCUICWcbvEval.v
+++ b/pcuic/theories/PCUICWcbvEval.v
@@ -1,12 +1,12 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From MetaCoq.Common Require Import config.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst
PCUICUnivSubst PCUICTyping PCUICGlobalEnv PCUICReduction PCUICClosed PCUICCSubst
PCUICClosedTyp PCUICEtaExpand. (* Due to reliance on wf Σ instead of closed_env Σ *)
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
(** * Weak-head call-by-value evaluation strategy.
diff --git a/pcuic/theories/PCUICWeakeningConfig.v b/pcuic/theories/PCUICWeakeningConfig.v
index 4c7255807..f3fe7583a 100644
--- a/pcuic/theories/PCUICWeakeningConfig.v
+++ b/pcuic/theories/PCUICWeakeningConfig.v
@@ -1,12 +1,12 @@
(* Distributed under the terms of the MIT license. *)
-From Coq.ssr Require Import ssreflect ssrbool.
+From Stdlib.ssr Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTyping.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import LibHypsNaming.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
diff --git a/pcuic/theories/PCUICWeakeningConfigSN.v b/pcuic/theories/PCUICWeakeningConfigSN.v
index 4c064ef28..0a02890d5 100644
--- a/pcuic/theories/PCUICWeakeningConfigSN.v
+++ b/pcuic/theories/PCUICWeakeningConfigSN.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect Wellfounded.Inclusion.
+From Stdlib Require Import ssreflect Wellfounded.Inclusion.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICSN PCUICTyping PCUICSafeLemmata PCUICWeakeningConfigTyp.
Import PCUICEnvironment.
diff --git a/pcuic/theories/PCUICWeakeningEnv.v b/pcuic/theories/PCUICWeakeningEnv.v
index 9c01bb0f8..99a00ec7f 100644
--- a/pcuic/theories/PCUICWeakeningEnv.v
+++ b/pcuic/theories/PCUICWeakeningEnv.v
@@ -5,7 +5,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTyping.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import LibHypsNaming.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
Implicit Types (cf : checker_flags).
diff --git a/pcuic/theories/PCUICWeakeningEnvSN.v b/pcuic/theories/PCUICWeakeningEnvSN.v
index 1cb8d4abe..ebd707c24 100644
--- a/pcuic/theories/PCUICWeakeningEnvSN.v
+++ b/pcuic/theories/PCUICWeakeningEnvSN.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect Wellfounded.Inclusion.
+From Stdlib Require Import ssreflect Wellfounded.Inclusion.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICSN PCUICTyping PCUICSafeLemmata PCUICWeakeningEnvTyp.
Import PCUICEnvironment.
diff --git a/pcuic/theories/PCUICWellScopedCumulativity.v b/pcuic/theories/PCUICWellScopedCumulativity.v
index 24c749098..efa7998bf 100644
--- a/pcuic/theories/PCUICWellScopedCumulativity.v
+++ b/pcuic/theories/PCUICWellScopedCumulativity.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst PCUICTyping PCUICCumulativity
@@ -8,9 +8,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst PCUICTyp
PCUICParallelReduction PCUICParallelReductionConfluence PCUICClosedConv PCUICClosedTyp
PCUICRedTypeIrrelevance PCUICOnFreeVars PCUICConfluence PCUICSubstitution.
-Require Import CRelationClasses CMorphisms.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
+From Stdlib Require Import CRelationClasses CMorphisms.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
Local Ltac intuition_solver ::= auto with *.
diff --git a/pcuic/theories/PCUICWfUniverses.v b/pcuic/theories/PCUICWfUniverses.v
index 63624b8ad..e7d4568a7 100644
--- a/pcuic/theories/PCUICWfUniverses.v
+++ b/pcuic/theories/PCUICWfUniverses.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -9,8 +9,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICUnivSubst PCUICUnivSubstitutionConv.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.PCUIC Require Import PCUICInduction.
diff --git a/pcuic/theories/PCUICWtCumulativity.v b/pcuic/theories/PCUICWtCumulativity.v
index a04c977cf..edcfd01df 100644
--- a/pcuic/theories/PCUICWtCumulativity.v
+++ b/pcuic/theories/PCUICWtCumulativity.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Common Require Import config utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst PCUICTyping PCUICCumulativity
PCUICReduction PCUICWeakeningConv PCUICWeakeningTyp PCUICEquality PCUICUnivSubstitutionConv
@@ -8,9 +8,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICLiftSubst PCUICTyp
PCUICRedTypeIrrelevance PCUICOnFreeVars PCUICConfluence PCUICSubstitution
PCUICWellScopedCumulativity PCUICArities.
-Require Import CRelationClasses CMorphisms.
-Require Import Equations.Prop.DepElim.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
+From Stdlib Require Import CRelationClasses CMorphisms.
+From Equations.Prop Require Import DepElim.
+From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
(* High-level lemmas about well-typed ws_cumul_pb *)
diff --git a/pcuic/theories/Syntax/PCUICCases.v b/pcuic/theories/Syntax/PCUICCases.v
index 926470d89..18540b19e 100644
--- a/pcuic/theories/Syntax/PCUICCases.v
+++ b/pcuic/theories/Syntax/PCUICCases.v
@@ -1,12 +1,12 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Reflect.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils.
Import Reflect. (* Reflect.eqb has priority over String.eqb *)
-Require Import ssreflect.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/pcuic/theories/Syntax/PCUICClosed.v b/pcuic/theories/Syntax/PCUICClosed.v
index 1acaabc5d..682f13795 100644
--- a/pcuic/theories/Syntax/PCUICClosed.v
+++ b/pcuic/theories/Syntax/PCUICClosed.v
@@ -1,10 +1,10 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction PCUICUnivSubst PCUICLiftSubst PCUICSigmaCalculus.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
(** * Lemmas about the [closedn] predicate *)
diff --git a/pcuic/theories/Syntax/PCUICDepth.v b/pcuic/theories/Syntax/PCUICDepth.v
index ede5c7f42..d5deb67ff 100644
--- a/pcuic/theories/Syntax/PCUICDepth.v
+++ b/pcuic/theories/Syntax/PCUICDepth.v
@@ -1,8 +1,8 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect Program Lia BinPos Compare_dec Bool.
+From Stdlib Require Import ssreflect Program Lia BinPos Compare_dec Bool.
From MetaCoq.Utils Require Import utils LibHypsNaming.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICSize PCUICInduction.
-From Coq Require Import List.
+From Stdlib Require Import List.
From Equations Require Import Equations.
From Equations.Prop Require Import Subterm.
Import PCUICEnvTyping.
diff --git a/pcuic/theories/Syntax/PCUICInduction.v b/pcuic/theories/Syntax/PCUICInduction.v
index 23ffeb79d..c48208218 100644
--- a/pcuic/theories/Syntax/PCUICInduction.v
+++ b/pcuic/theories/Syntax/PCUICInduction.v
@@ -1,8 +1,8 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect Program Lia BinPos Compare_dec Bool.
+From Stdlib Require Import ssreflect Program Lia BinPos Compare_dec Bool.
From MetaCoq.Utils Require Import utils LibHypsNaming.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICSize.
-From Coq Require Import List.
+From Stdlib Require Import List.
From Equations Require Import Equations.
From Equations.Prop Require Import Subterm.
diff --git a/pcuic/theories/Syntax/PCUICInstDef.v b/pcuic/theories/Syntax/PCUICInstDef.v
index 714ff1840..630e5ed60 100644
--- a/pcuic/theories/Syntax/PCUICInstDef.v
+++ b/pcuic/theories/Syntax/PCUICInstDef.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -7,9 +7,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICTyping PCUICEquality PCUICOnFreeVars
PCUICSigmaCalculus PCUICRenameDef.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
Set Keyed Unification.
Set Default Goal Selector "!".
diff --git a/pcuic/theories/Syntax/PCUICLiftSubst.v b/pcuic/theories/Syntax/PCUICLiftSubst.v
index a46726ede..fc97cb2c2 100644
--- a/pcuic/theories/Syntax/PCUICLiftSubst.v
+++ b/pcuic/theories/Syntax/PCUICLiftSubst.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import ssreflect Morphisms.
+From Stdlib Require Import ssreflect Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction.
Import Nat.
diff --git a/pcuic/theories/Syntax/PCUICNamelessDef.v b/pcuic/theories/Syntax/PCUICNamelessDef.v
index 4f3376eed..4a94c7357 100644
--- a/pcuic/theories/Syntax/PCUICNamelessDef.v
+++ b/pcuic/theories/Syntax/PCUICNamelessDef.v
@@ -1,12 +1,12 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICLiftSubst PCUICEquality PCUICTyping PCUICPosition PCUICUnivSubst
PCUICSigmaCalculus (* for context manipulations *).
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/Syntax/PCUICOnFreeVars.v b/pcuic/theories/Syntax/PCUICOnFreeVars.v
index ee5d19d2e..17245c007 100644
--- a/pcuic/theories/Syntax/PCUICOnFreeVars.v
+++ b/pcuic/theories/Syntax/PCUICOnFreeVars.v
@@ -1,13 +1,13 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
-Require Import ssreflect ssrfun ssrbool.
+From Stdlib Require Import Morphisms.
+From Stdlib Require Import ssreflect ssrfun ssrbool.
From MetaCoq.Utils Require Import utils MCPred.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
PCUICLiftSubst PCUICUnivSubst
PCUICEquality PCUICSigmaCalculus PCUICClosed.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Equations With UIP.
diff --git a/pcuic/theories/Syntax/PCUICPosition.v b/pcuic/theories/Syntax/PCUICPosition.v
index 476804ef7..e5968880c 100644
--- a/pcuic/theories/Syntax/PCUICPosition.v
+++ b/pcuic/theories/Syntax/PCUICPosition.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses ssrbool.
+From Stdlib Require Import RelationClasses ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICInduction
@@ -11,7 +11,7 @@ Import MCMonadNotation.
Import MCMonadNotation.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Local Set Keyed Unification.
@@ -1780,7 +1780,7 @@ Definition context_env_clos (R : context -> term -> term -> Type) Γ u v :=
R (Γ ,,, stack_context π) u' v' ×
(u = zipc u' π /\ v = zipc v' π).
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
(* Lemma fill_mfix_hole_length mfix t : #|fill_mfix_hole mfix t| = #| *)
diff --git a/pcuic/theories/Syntax/PCUICReflect.v b/pcuic/theories/Syntax/PCUICReflect.v
index d9b2c0cb2..986dd7886 100644
--- a/pcuic/theories/Syntax/PCUICReflect.v
+++ b/pcuic/theories/Syntax/PCUICReflect.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
From MetaCoq.PCUIC Require Import PCUICAst PCUICInduction.
diff --git a/pcuic/theories/Syntax/PCUICRenameDef.v b/pcuic/theories/Syntax/PCUICRenameDef.v
index abe0bfaf6..c031ba433 100644
--- a/pcuic/theories/Syntax/PCUICRenameDef.v
+++ b/pcuic/theories/Syntax/PCUICRenameDef.v
@@ -1,14 +1,14 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
PCUICLiftSubst PCUICUnivSubst PCUICOnFreeVars
PCUICSigmaCalculus PCUICTyping.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
(** * Type preservation for σ-calculus operations *)
diff --git a/pcuic/theories/Syntax/PCUICTactics.v b/pcuic/theories/Syntax/PCUICTactics.v
index 089c16e31..efb3c4572 100644
--- a/pcuic/theories/Syntax/PCUICTactics.v
+++ b/pcuic/theories/Syntax/PCUICTactics.v
@@ -1,5 +1,5 @@
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config BasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICLiftSubst
diff --git a/pcuic/theories/Syntax/PCUICUnivSubst.v b/pcuic/theories/Syntax/PCUICUnivSubst.v
index e1f4347ef..bd87dad17 100644
--- a/pcuic/theories/Syntax/PCUICUnivSubst.v
+++ b/pcuic/theories/Syntax/PCUICUnivSubst.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction.
diff --git a/pcuic/theories/Syntax/PCUICViews.v b/pcuic/theories/Syntax/PCUICViews.v
index 59240260b..2b9c221f6 100644
--- a/pcuic/theories/Syntax/PCUICViews.v
+++ b/pcuic/theories/Syntax/PCUICViews.v
@@ -1,11 +1,11 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require CMorphisms.
+From Stdlib Require CMorphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils PCUICReflect.
-Require Import ssreflect ssrbool.
-Require Import Morphisms CRelationClasses.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require Import Morphisms CRelationClasses.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/pcuic/theories/Typing/PCUICClosedTyp.v b/pcuic/theories/Typing/PCUICClosedTyp.v
index 9b289cebf..9e26d92c0 100644
--- a/pcuic/theories/Typing/PCUICClosedTyp.v
+++ b/pcuic/theories/Typing/PCUICClosedTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICOnFreeVars PCUICTyping PCUICReduction PCUICGlobalEnv PCUICWeakeningEnvConv PCUICClosedConv
PCUICWeakeningEnv PCUICWeakeningEnvTyp.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Lemma declared_projection_closed_ind {cf:checker_flags} {Σ : global_env} {wfΣ : wf Σ}{mdecl idecl cdecl p pdecl} :
diff --git a/pcuic/theories/Typing/PCUICContextConversionTyp.v b/pcuic/theories/Typing/PCUICContextConversionTyp.v
index f4f0f23b2..51864f423 100644
--- a/pcuic/theories/Typing/PCUICContextConversionTyp.v
+++ b/pcuic/theories/Typing/PCUICContextConversionTyp.v
@@ -9,7 +9,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICOnOne PCUICAstUtils
PCUICContextReduction PCUICOnFreeVars PCUICWellScopedCumulativity
PCUICGuardCondition PCUICConversion PCUICContextConversion PCUICClosedTyp.
-From Coq Require Import CRelationClasses ssreflect ssrbool.
+From Stdlib Require Import CRelationClasses ssreflect ssrbool.
From Equations Require Import Equations.
Arguments red_ctx : clear implicits.
diff --git a/pcuic/theories/Typing/PCUICInstTyp.v b/pcuic/theories/Typing/PCUICInstTyp.v
index bc02ccc47..78f03bb3d 100644
--- a/pcuic/theories/Typing/PCUICInstTyp.v
+++ b/pcuic/theories/Typing/PCUICInstTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases PCUICInduction
@@ -9,9 +9,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases
PCUICSigmaCalculus PCUICRenameDef PCUICRenameConv PCUICWeakeningConv PCUICWeakeningTyp PCUICInstDef PCUICInstConv
PCUICGuardCondition PCUICUnivSubstitutionConv PCUICOnFreeVars PCUICOnFreeVarsConv PCUICClosedTyp PCUICClosedTyp.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
Set Keyed Unification.
Set Default Goal Selector "!".
diff --git a/pcuic/theories/Typing/PCUICNamelessTyp.v b/pcuic/theories/Typing/PCUICNamelessTyp.v
index 5626b060c..c9e2019fd 100644
--- a/pcuic/theories/Typing/PCUICNamelessTyp.v
+++ b/pcuic/theories/Typing/PCUICNamelessTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
@@ -7,8 +7,8 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICNamelessDef PCUICGuardCondition PCUICNamelessConv PCUICConversion
PCUICWellScopedCumulativity PCUICOnFreeVars PCUICOnFreeVarsConv PCUICConfluence PCUICClosedTyp PCUICClosed
PCUICSigmaCalculus (* for context manipulations *).
-Require Import Equations.Prop.DepElim.
-Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
+From Stdlib Require Import ssreflect ssrbool.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/Typing/PCUICRenameTyp.v b/pcuic/theories/Typing/PCUICRenameTyp.v
index 4f0554c89..f524e71da 100644
--- a/pcuic/theories/Typing/PCUICRenameTyp.v
+++ b/pcuic/theories/Typing/PCUICRenameTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases PCUICInduction
@@ -8,9 +8,9 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICCases
PCUICSigmaCalculus PCUICClosed PCUICOnFreeVars PCUICOnFreeVarsConv PCUICGuardCondition PCUICTyping
PCUICWeakeningEnvConv PCUICWeakeningEnvTyp PCUICClosedConv PCUICClosedTyp PCUICRenameConv.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
Set Equations With UIP.
(** * Type preservation for σ-calculus operations *)
diff --git a/pcuic/theories/Typing/PCUICUnivSubstitutionTyp.v b/pcuic/theories/Typing/PCUICUnivSubstitutionTyp.v
index d1044db12..d6803ba72 100644
--- a/pcuic/theories/Typing/PCUICUnivSubstitutionTyp.v
+++ b/pcuic/theories/Typing/PCUICUnivSubstitutionTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect CRelationClasses.
+From Stdlib Require Import ssreflect CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Universes uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction PCUICOnFreeVars
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction PCUICOnF
PCUICCases PCUICCumulativity PCUICTyping PCUICReduction PCUICWeakeningEnv PCUICWeakeningEnvTyp
PCUICClosed PCUICPosition PCUICGuardCondition PCUICUnivSubstitutionConv.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
(** * Universe Substitution lemmas for typing derivations. *)
diff --git a/pcuic/theories/Typing/PCUICWeakeningConfigTyp.v b/pcuic/theories/Typing/PCUICWeakeningConfigTyp.v
index 916e2bc95..e0cda92fa 100644
--- a/pcuic/theories/Typing/PCUICWeakeningConfigTyp.v
+++ b/pcuic/theories/Typing/PCUICWeakeningConfigTyp.v
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
PCUICWeakeningConfig PCUICWeakeningConfigConv.
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
Implicit Types (cf : checker_flags).
diff --git a/pcuic/theories/Typing/PCUICWeakeningEnvTyp.v b/pcuic/theories/Typing/PCUICWeakeningEnvTyp.v
index 721fe0a39..59bbd676a 100644
--- a/pcuic/theories/Typing/PCUICWeakeningEnvTyp.v
+++ b/pcuic/theories/Typing/PCUICWeakeningEnvTyp.v
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
PCUICWeakeningEnv PCUICWeakeningEnvConv.
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Set Default Goal Selector "!".
Implicit Types (cf : checker_flags).
diff --git a/pcuic/theories/Typing/PCUICWeakeningTyp.v b/pcuic/theories/Typing/PCUICWeakeningTyp.v
index 19ee9264b..119f130be 100644
--- a/pcuic/theories/Typing/PCUICWeakeningTyp.v
+++ b/pcuic/theories/Typing/PCUICWeakeningTyp.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Morphisms.
+From Stdlib Require Import Morphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInduction
@@ -8,7 +8,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases PCUICInducti
PCUICSigmaCalculus PCUICRenameDef PCUICRenameConv PCUICRenameTyp PCUICOnFreeVars
PCUICClosedConv PCUICClosedTyp PCUICWeakeningConv.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
Implicit Types cf : checker_flags.
diff --git a/pcuic/theories/utils/PCUICAstUtils.v b/pcuic/theories/utils/PCUICAstUtils.v
index 2ccc7d506..853dd80fc 100644
--- a/pcuic/theories/utils/PCUICAstUtils.v
+++ b/pcuic/theories/utils/PCUICAstUtils.v
@@ -3,7 +3,7 @@ From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import uGraph Reflect.
From MetaCoq.PCUIC Require Import PCUICAst PCUICSize.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
Set Equations Transparent.
@@ -173,7 +173,7 @@ Proof.
induction l in f, l' |- *; simpl; auto; rewrite IHl ?app_nil_r; auto.
Qed.
-Require Import ssrbool.
+From Stdlib Require Import ssrbool.
Lemma decompose_app_mkApps f l :
~~ isApp f -> decompose_app (mkApps f l) = (f, l).
diff --git a/pcuic/theories/utils/PCUICOnOne.v b/pcuic/theories/utils/PCUICOnOne.v
index 711fe9c5b..44c207962 100644
--- a/pcuic/theories/utils/PCUICOnOne.v
+++ b/pcuic/theories/utils/PCUICOnOne.v
@@ -3,8 +3,8 @@ From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst.
-Require Import ssreflect.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect.
+From Equations.Prop Require Import DepElim.
From Equations.Type Require Import Relation Relation_Properties.
From Equations Require Import Equations.
Set Equations Transparent.
diff --git a/pcuic/theories/utils/PCUICPrimitive.v b/pcuic/theories/utils/PCUICPrimitive.v
index 0d680271b..af1bee62b 100644
--- a/pcuic/theories/utils/PCUICPrimitive.v
+++ b/pcuic/theories/utils/PCUICPrimitive.v
@@ -3,8 +3,8 @@ From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Universes BasicAst Primitive Reflect
Environment EnvironmentTyping.
From Equations Require Import Equations.
-From Coq Require Import ssreflect.
-From Coq Require Import Uint63 SpecFloat.
+From Stdlib Require Import ssreflect.
+From Stdlib Require Import Uint63 SpecFloat.
Record array_model {term : Type} :=
{ array_level : Level.t;
diff --git a/pcuic/theories/utils/PCUICSize.v b/pcuic/theories/utils/PCUICSize.v
index 0d62b37da..959c8dde9 100644
--- a/pcuic/theories/utils/PCUICSize.v
+++ b/pcuic/theories/utils/PCUICSize.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
From MetaCoq.Utils Require Import utils.
From MetaCoq.PCUIC Require Import PCUICAst.
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Definition def_size (size : term -> nat) (x : def term)
:= size (dtype x) + size (dbody x).
diff --git a/pcuic/theories/utils/PCUICUtils.v b/pcuic/theories/utils/PCUICUtils.v
index 8ed7acbe0..ea7076162 100644
--- a/pcuic/theories/utils/PCUICUtils.v
+++ b/pcuic/theories/utils/PCUICUtils.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
diff --git a/quotation/Makefile b/quotation/Makefile
index 34cd87f21..f662cfb43 100644
--- a/quotation/Makefile
+++ b/quotation/Makefile
@@ -5,7 +5,7 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.quotation: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.quotation $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.quotation $(DEPS)
theory: Makefile.quotation
$(MAKE) -f Makefile.quotation
diff --git a/quotation/theories/CommonUtils.v b/quotation/theories/CommonUtils.v
index bbb28c74a..6a315d9eb 100644
--- a/quotation/theories/CommonUtils.v
+++ b/quotation/theories/CommonUtils.v
@@ -1,8 +1,8 @@
From MetaCoq.Utils Require Import utils monad_utils MCList.
From MetaCoq.Common Require Import Kernames MonadBasicAst.
From MetaCoq.Template Require MonadAst TemplateMonad Ast Loader.
-Require Import Equations.Prop.Classes.
-Require Import Coq.Lists.List.
+From Equations.Prop Require Import Classes.
+From Stdlib Require Import Lists.List.
Import ListNotations.
Local Unset Universe Minimization ToSet.
diff --git a/quotation/theories/ToPCUIC/Common/Environment.v b/quotation/theories/ToPCUIC/Common/Environment.v
index 713bbb07e..0d56c267f 100644
--- a/quotation/theories/ToPCUIC/Common/Environment.v
+++ b/quotation/theories/ToPCUIC/Common/Environment.v
@@ -1,4 +1,4 @@
-From Coq Require Import Structures.Equalities Lists.List Lists.ListDec.
+From Stdlib Require Import Structures.Equalities Lists.List Lists.ListDec.
From MetaCoq.Utils Require Import MCProd All_Forall ReflectEq MCRelations MCReflect.
From MetaCoq.Common Require Import Environment Universes.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/Init.v b/quotation/theories/ToPCUIC/Init.v
index 8e82dfa99..3e4d05cec 100644
--- a/quotation/theories/ToPCUIC/Init.v
+++ b/quotation/theories/ToPCUIC/Init.v
@@ -5,8 +5,8 @@ From MetaCoq.Common Require Import MonadBasicAst.
From MetaCoq.PCUIC Require Import PCUICAst PCUICMonadAst.
From MetaCoq.TemplatePCUIC Require Import PCUICTemplateMonad Loader.
From MetaCoq.Quotation Require Export CommonUtils.
-Require Import Equations.Prop.Classes.
-Require Import Stdlib.Lists.List.
+From Equations.Prop Require Import Classes.
+From Stdlib Require Import Lists.List.
Export TemplateMonad.Common (export, local, global).
Import ListNotations.
@@ -597,7 +597,7 @@ Definition tmDeclareQuotationOfModule {debug:debug_opt} (include_submodule : sub
Global Arguments tmDeclareQuotationOfModule {_%_bool} _ _ _%_bs.
(*
-Require Import MSetPositive.
+From Stdlib Require Import MSetPositive.
Instance: debug_opt := true.
MetaCoq Run (tmMakeQuotationOfModule None "Stdlib.MSets.MSetPositive.PositiveSet"%bs).
*)
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
index eabe330f5..ea4a794b4 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapAVL.
-From Coq.Structures Require Import Equalities OrdersAlt.
+From Stdlib.FSets Require Import FMapAVL.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib.Structures Require Import OrdersAlt.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
index f2cd5fcc5..420532f51 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapFacts.
-From Coq.Structures Require Import Orders.
+From Stdlib.FSets Require Import FMapFacts.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
index b9f7919b8..cb5661514 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapInterface.
-From Coq.Structures Require Import Orders.
+From Stdlib.FSets Require Import FMapInterface.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
Module Type QuotationOfWSfun (E : DecidableTypeOrig) (Import M : WSfun E).
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapList/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapList/Sig.v
index 32cdde1b7..3e06febae 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapList/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/FSets/FMapList/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapList.
-From Coq.Structures Require Import Equalities OrdersAlt.
+From Stdlib.FSets Require Import FMapList.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib.Structures Require Import OrdersAlt.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
index 12c6750f0..37eb21ba7 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Orders.
-From Coq.MSets Require Import MSetAVL.
+From Stdlib.Structures Require Import Orders.
+From Stdlib.MSets Require Import MSetAVL.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
index 10f2077d6..cca388930 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface MSetDecide.
+From Stdlib.MSets Require Import MSetInterface MSetDecide.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
index e909b97cc..8b9393f04 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetFacts.
+From Stdlib.MSets Require Import MSetFacts.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
index b1e819c6e..a78c196fd 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface.
+From Stdlib.MSets Require Import MSetInterface.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
Module Type QuotationOfWSetsOn (E : DecidableType) (Import W : WSetsOn E).
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetList/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetList/Sig.v
index a6c66f2b8..7525b2fff 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetList/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetList/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Equalities Orders.
-From Coq.MSets Require Import MSetList.
+From Stdlib.Structures Require Import Equalities Orders.
+From Stdlib.MSets Require Import MSetList.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib.MSets Require Import MSetInterface.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
index ea47c93cb..d75788c0f 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetProperties.
+From Stdlib.MSets Require Import MSetProperties.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib.Structures Require Import OrdersFacts.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Equalities/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Equalities/Sig.v
index 180ab5340..dc457123c 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Equalities/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Equalities/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities.
+From Stdlib.Structures Require Import Equalities.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
Module Type QuotationOfTyp (Import T : Typ).
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Orders/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Orders/Sig.v
index 4215548fa..fdc04286a 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Orders/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/Orders/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Orders.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib Require Export Structures.Equalities.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
index 8741e17eb..f8f6c371a 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Equalities OrdersAlt.
-From Coq.Structures Require OrderedType.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
+From Stdlib.Structures Require OrderedType.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
Import List.ListNotations.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
index c811c8f60..28b5d9af9 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities Orders OrdersFacts.
+From Stdlib.Structures Require Import Equalities Orders OrdersFacts.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
index fad3e214b..cf67409b2 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities Orders OrdersTac.
+From Stdlib.Structures Require Import Equalities Orders OrdersTac.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Utils/MCFSets/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Utils/MCFSets/Sig.v
index 86dc7e0d7..aa917f094 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Utils/MCFSets/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Utils/MCFSets/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Orders OrdersAlt.
-From Coq.FSets Require Import FMapInterface.
+From Stdlib.Structures Require Import Orders OrdersAlt.
+From Stdlib.FSets Require Import FMapInterface.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
diff --git a/quotation/theories/ToPCUIC/QuotationOf/Utils/MCMSets/Sig.v b/quotation/theories/ToPCUIC/QuotationOf/Utils/MCMSets/Sig.v
index e03490516..58d2f96a5 100644
--- a/quotation/theories/ToPCUIC/QuotationOf/Utils/MCMSets/Sig.v
+++ b/quotation/theories/ToPCUIC/QuotationOf/Utils/MCMSets/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface.
+From Stdlib.MSets Require Import MSetInterface.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
Import List.ListNotations.
diff --git a/quotation/theories/ToPCUIC/Stdlib/Bool.v b/quotation/theories/ToPCUIC/Stdlib/Bool.v
index f42ed3203..e12e6e545 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Bool.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Bool.v
@@ -1,5 +1,5 @@
From MetaCoq.Quotation.ToPCUIC Require Import Stdlib.Init.
-From Coq.Bool Require Import Bool IfProp.
+From Stdlib.Bool Require Import Bool IfProp.
#[export] Instance quote_reflect {P : Prop} {qP : quotation_of P} {quoteP : ground_quotable P} {quote_negP : ground_quotable (~P)} {b} : ground_quotable (reflect P b) := ltac:(destruct 1; exact _).
#[export] Instance quote_IfProp {A B : Prop} {qA : quotation_of A} {qB : quotation_of B} {quoteA : ground_quotable A} {quoteB : ground_quotable B} {b} : ground_quotable (IfProp A B b) := ltac:(destruct b; adjust_ground_quotable_by_econstructor_inversion ()).
diff --git a/quotation/theories/ToPCUIC/Stdlib/FSets.v b/quotation/theories/ToPCUIC/Stdlib/FSets.v
index f3487d27a..92625e1c5 100644
--- a/quotation/theories/ToPCUIC/Stdlib/FSets.v
+++ b/quotation/theories/ToPCUIC/Stdlib/FSets.v
@@ -1,4 +1,4 @@
-From Coq Require Import Structures.Equalities Structures.OrdersAlt FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
+From Stdlib Require Import Structures.Equalities Structures.OrdersAlt FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
From MetaCoq.Utils Require Import MCUtils MCFSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC Require Import (hints) Stdlib.Numbers Stdlib.Init Stdlib.Lists.
diff --git a/quotation/theories/ToPCUIC/Stdlib/Floats.v b/quotation/theories/ToPCUIC/Stdlib/Floats.v
index e51d95808..aa8437d29 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Floats.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Floats.v
@@ -1,4 +1,4 @@
-From Coq.Floats Require Import FloatClass Floats PrimFloat SpecFloat.
+From Stdlib.Floats Require Import FloatClass Floats PrimFloat SpecFloat.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC Require Import (hints) Stdlib.Init Stdlib.Numbers.
diff --git a/quotation/theories/ToPCUIC/Stdlib/Init.v b/quotation/theories/ToPCUIC/Stdlib/Init.v
index b0a969fa0..053b663a7 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Init.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Init.v
@@ -1,9 +1,9 @@
-Require Import Coq.Lists.List.
+From Stdlib Require Import Lists.List.
From MetaCoq.Quotation.ToPCUIC Require Export Init.
From MetaCoq.Utils Require Export bytestring. (* for display of quoted objects *)
From MetaCoq.Utils Require Export ReflectEq.
From MetaCoq.Utils Require Import All_Forall.
-Require Import Equations.Prop.Classes.
+From Equations.Prop Require Import Classes.
Import ListNotations.
Export Quotation.ToPCUIC.Init.Instances.
diff --git a/quotation/theories/ToPCUIC/Stdlib/Lists.v b/quotation/theories/ToPCUIC/Stdlib/Lists.v
index e2bab5dfc..19b6abc03 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Lists.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Lists.v
@@ -1,5 +1,5 @@
-Require Import Coq.Lists.List.
-Require Import Coq.Lists.ListDec.
+From Stdlib Require Import Lists.List.
+From Stdlib Require Import Lists.ListDec.
From MetaCoq.Utils Require Import ReflectEq.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC Require Import (hints) Stdlib.Init.
diff --git a/quotation/theories/ToPCUIC/Stdlib/MSets.v b/quotation/theories/ToPCUIC/Stdlib/MSets.v
index 48410fa03..b88f16646 100644
--- a/quotation/theories/ToPCUIC/Stdlib/MSets.v
+++ b/quotation/theories/ToPCUIC/Stdlib/MSets.v
@@ -1,4 +1,4 @@
-From Coq Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
+From Stdlib Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToPCUIC Require Import Init.
From MetaCoq.Quotation.ToPCUIC Require Import (hints) Stdlib.Numbers Stdlib.Init Stdlib.Lists.
diff --git a/quotation/theories/ToPCUIC/Stdlib/Numbers.v b/quotation/theories/ToPCUIC/Stdlib/Numbers.v
index 1b674023d..a78e605b6 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Numbers.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Numbers.v
@@ -1,11 +1,11 @@
-From Coq.Numbers Require Import BinNums DecimalFacts HexadecimalFacts
+From Stdlib.Numbers Require Import BinNums DecimalFacts HexadecimalFacts
Cyclic.Int63.PrimInt63 Cyclic.Int63.Uint63
Cyclic.Abstract.CyclicAxioms
Cyclic.Abstract.DoubleType
Cyclic.Int63.CarryType
.
-From Coq Require Import ZArith.
+From Stdlib Require Import ZArith.
From MetaCoq.Quotation.ToPCUIC Require Import Stdlib.Init.
#[export] Instance quote_positive : ground_quotable positive := ltac:(induction 1; exact _).
diff --git a/quotation/theories/ToPCUIC/Stdlib/Strings.v b/quotation/theories/ToPCUIC/Stdlib/Strings.v
index b73848459..0a6af781c 100644
--- a/quotation/theories/ToPCUIC/Stdlib/Strings.v
+++ b/quotation/theories/ToPCUIC/Stdlib/Strings.v
@@ -1,4 +1,4 @@
-Require Import Coq.Strings.String Coq.Strings.Ascii.
+From Stdlib Require Import Strings.String Strings.Ascii.
From MetaCoq.Quotation.ToPCUIC Require Import Stdlib.Init.
#[export] Instance quote_ascii : ground_quotable Ascii.ascii := (ltac:(induction 1; exact _)).
diff --git a/quotation/theories/ToPCUIC/Stdlib/ssr.v b/quotation/theories/ToPCUIC/Stdlib/ssr.v
index ae1d3cf1a..cae902753 100644
--- a/quotation/theories/ToPCUIC/Stdlib/ssr.v
+++ b/quotation/theories/ToPCUIC/Stdlib/ssr.v
@@ -1,5 +1,5 @@
From MetaCoq.Quotation.ToPCUIC Require Import Stdlib.Init.
-From Coq.ssr Require Import ssrbool ssreflect.
+From Stdlib.ssr Require Import ssrbool ssreflect.
#[export] Instance quote_if_spec {A b vT vF} {not_b:Prop} {b' a} {qA : quotation_of A} {qvT : quotation_of vT} {qvF : quotation_of vF} {qnot_b : quotation_of not_b} {quote_not_b : ground_quotable not_b} : ground_quotable (@if_spec A b vT vF not_b b' a) := ltac:(destruct 1; exact _).
#[export] Instance quote_alt_spec {P:Prop} {b b'} {qP : quotation_of P} {quoteP : ground_quotable P} : ground_quotable (@alt_spec P b b') := ltac:(destruct 1; exact _).
diff --git a/quotation/theories/ToTemplate/Common/Environment.v b/quotation/theories/ToTemplate/Common/Environment.v
index f22f618b7..c01926150 100644
--- a/quotation/theories/ToTemplate/Common/Environment.v
+++ b/quotation/theories/ToTemplate/Common/Environment.v
@@ -1,4 +1,4 @@
-From Coq Require Import Structures.Equalities Lists.List Lists.ListDec.
+From Stdlib Require Import Structures.Equalities Lists.List Lists.ListDec.
From MetaCoq.Utils Require Import MCProd All_Forall ReflectEq MCRelations MCReflect.
From MetaCoq.Common Require Import Environment Universes.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/Init.v b/quotation/theories/ToTemplate/Init.v
index d469ddf85..6329a20dd 100644
--- a/quotation/theories/ToTemplate/Init.v
+++ b/quotation/theories/ToTemplate/Init.v
@@ -3,8 +3,8 @@ From MetaCoq.Utils Require Import utils MCList.
From MetaCoq.Common Require Import MonadBasicAst.
From MetaCoq.Template Require Import MonadAst TemplateMonad Ast Loader.
From MetaCoq.Quotation Require Export CommonUtils.
-Require Import Equations.Prop.Classes.
-Require Import Stdlib.Lists.List.
+From Equations.Prop Require Import Classes.
+From Stdlib Require Import Lists.List.
Export TemplateMonad.Common (export, local, global).
Import ListNotations.
@@ -610,7 +610,7 @@ Definition tmDeclareQuotationOfModule {debug:debug_opt} (include_submodule : sub
Global Arguments tmDeclareQuotationOfModule {_%_bool} _ _ _%_bs.
(*
-Require Import MSetPositive.
+From Stdlib Require Import MSetPositive.
Instance: debug_opt := true.
MetaCoq Run (tmMakeQuotationOfModule None "Stdlib.MSets.MSetPositive.PositiveSet"%bs).
*)
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
index d1fad9785..417ee9eac 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapAVL/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapAVL.
-From Coq.Structures Require Import Equalities OrdersAlt.
+From Stdlib.FSets Require Import FMapAVL.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib.Structures Require Import OrdersAlt.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
index 487d0cc50..56b0662b2 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapFacts/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapFacts.
-From Coq.Structures Require Import Orders.
+From Stdlib.FSets Require Import FMapFacts.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
index 16b9e0e11..387960f6a 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapInterface/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapInterface.
-From Coq.Structures Require Import Orders.
+From Stdlib.FSets Require Import FMapInterface.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Quotation.ToTemplate Require Import Init.
Module Type QuotationOfWSfun (E : DecidableTypeOrig) (Import M : WSfun E).
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapList/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapList/Sig.v
index 838412296..761b0cdb9 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapList/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/FSets/FMapList/Sig.v
@@ -1,5 +1,5 @@
-From Coq.FSets Require Import FMapList.
-From Coq.Structures Require Import Equalities OrdersAlt.
+From Stdlib.FSets Require Import FMapList.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib.Structures Require Import OrdersAlt.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
index caf4d1283..7cccf86f7 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetAVL/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Orders.
-From Coq.MSets Require Import MSetAVL.
+From Stdlib.Structures Require Import Orders.
+From Stdlib.MSets Require Import MSetAVL.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
index ae8454047..24b98f75e 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetDecide/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface MSetDecide.
+From Stdlib.MSets Require Import MSetInterface MSetDecide.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
index c301b7608..8a84995bb 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetFacts/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetFacts.
+From Stdlib.MSets Require Import MSetFacts.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
index 8f34c6812..55b4cd142 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetInterface/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface.
+From Stdlib.MSets Require Import MSetInterface.
From MetaCoq.Quotation.ToTemplate Require Import Init.
Module Type QuotationOfWSetsOn (E : DecidableType) (Import W : WSetsOn E).
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetList/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetList/Sig.v
index e2b481d6d..d927640c9 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetList/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetList/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Equalities Orders.
-From Coq.MSets Require Import MSetList.
+From Stdlib.Structures Require Import Equalities Orders.
+From Stdlib.MSets Require Import MSetList.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib.MSets Require Import MSetInterface.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
index 23afa330d..81799b061 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/MSets/MSetProperties/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetProperties.
+From Stdlib.MSets Require Import MSetProperties.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib.Structures Require Import OrdersFacts.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Equalities/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Equalities/Sig.v
index b3feb8a62..a1c1aff66 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Equalities/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Equalities/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities.
+From Stdlib.Structures Require Import Equalities.
From MetaCoq.Quotation.ToTemplate Require Import Init.
Module Type QuotationOfTyp (Import T : Typ).
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Orders/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Orders/Sig.v
index 09ff67976..cb25d3483 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Orders/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/Orders/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Orders.
+From Stdlib.Structures Require Import Orders.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib Require Export Structures.Equalities.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
index 96bb694cb..4a148c3c4 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersAlt/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Equalities OrdersAlt.
-From Coq.Structures Require OrderedType.
+From Stdlib.Structures Require Import Equalities OrdersAlt.
+From Stdlib.Structures Require OrderedType.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
Import List.ListNotations.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
index 5ea261908..cc958adb5 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersFacts/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities Orders OrdersFacts.
+From Stdlib.Structures Require Import Equalities Orders OrdersFacts.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
index ea617b8bb..062d6dfed 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Stdlib/Structures/OrdersTac/Sig.v
@@ -1,4 +1,4 @@
-From Coq.Structures Require Import Equalities Orders OrdersTac.
+From Stdlib.Structures Require Import Equalities Orders OrdersTac.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate.QuotationOf.Stdlib Require Export Structures.Orders.Sig.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Utils/MCFSets/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Utils/MCFSets/Sig.v
index cfb095dc8..54cb8636f 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Utils/MCFSets/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Utils/MCFSets/Sig.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Orders OrdersAlt.
-From Coq.FSets Require Import FMapInterface.
+From Stdlib.Structures Require Import Orders OrdersAlt.
+From Stdlib.FSets Require Import FMapInterface.
From MetaCoq.Utils Require Import MCFSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
diff --git a/quotation/theories/ToTemplate/QuotationOf/Utils/MCMSets/Sig.v b/quotation/theories/ToTemplate/QuotationOf/Utils/MCMSets/Sig.v
index bab1b09e6..7addc5165 100644
--- a/quotation/theories/ToTemplate/QuotationOf/Utils/MCMSets/Sig.v
+++ b/quotation/theories/ToTemplate/QuotationOf/Utils/MCMSets/Sig.v
@@ -1,4 +1,4 @@
-From Coq.MSets Require Import MSetInterface.
+From Stdlib.MSets Require Import MSetInterface.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
Import List.ListNotations.
diff --git a/quotation/theories/ToTemplate/Stdlib/Bool.v b/quotation/theories/ToTemplate/Stdlib/Bool.v
index 46f477169..45287f470 100644
--- a/quotation/theories/ToTemplate/Stdlib/Bool.v
+++ b/quotation/theories/ToTemplate/Stdlib/Bool.v
@@ -1,5 +1,5 @@
From MetaCoq.Quotation.ToTemplate Require Import Stdlib.Init.
-From Coq.Bool Require Import Bool IfProp.
+From Stdlib.Bool Require Import Bool IfProp.
#[export] Instance quote_reflect {P : Prop} {qP : quotation_of P} {quoteP : ground_quotable P} {quote_negP : ground_quotable (~P)} {b} : ground_quotable (reflect P b) := ltac:(destruct 1; exact _).
#[export] Instance quote_IfProp {A B : Prop} {qA : quotation_of A} {qB : quotation_of B} {quoteA : ground_quotable A} {quoteB : ground_quotable B} {b} : ground_quotable (IfProp A B b) := ltac:(destruct b; adjust_ground_quotable_by_econstructor_inversion ()).
diff --git a/quotation/theories/ToTemplate/Stdlib/FSets.v b/quotation/theories/ToTemplate/Stdlib/FSets.v
index 448ed52b4..6817ee197 100644
--- a/quotation/theories/ToTemplate/Stdlib/FSets.v
+++ b/quotation/theories/ToTemplate/Stdlib/FSets.v
@@ -1,4 +1,4 @@
-From Coq Require Import Structures.Equalities Structures.OrdersAlt FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
+From Stdlib Require Import Structures.Equalities Structures.OrdersAlt FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
From MetaCoq.Utils Require Import MCUtils MCFSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate Require Import (hints) Stdlib.Numbers Stdlib.Init Stdlib.Lists.
diff --git a/quotation/theories/ToTemplate/Stdlib/Floats.v b/quotation/theories/ToTemplate/Stdlib/Floats.v
index 3c95e730c..66c15e8d6 100644
--- a/quotation/theories/ToTemplate/Stdlib/Floats.v
+++ b/quotation/theories/ToTemplate/Stdlib/Floats.v
@@ -1,4 +1,4 @@
-From Coq.Floats Require Import FloatClass Floats PrimFloat SpecFloat.
+From Stdlib.Floats Require Import FloatClass Floats PrimFloat SpecFloat.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate Require Import (hints) Stdlib.Init Stdlib.Numbers.
diff --git a/quotation/theories/ToTemplate/Stdlib/Init.v b/quotation/theories/ToTemplate/Stdlib/Init.v
index 0151e2ad0..3d2711f32 100644
--- a/quotation/theories/ToTemplate/Stdlib/Init.v
+++ b/quotation/theories/ToTemplate/Stdlib/Init.v
@@ -1,9 +1,9 @@
-Require Import Coq.Lists.List.
+From Stdlib Require Import Lists.List.
From MetaCoq.Quotation.ToTemplate Require Export Init.
From MetaCoq.Utils Require Export bytestring. (* for display of quoted objects *)
From MetaCoq.Utils Require Export ReflectEq.
From MetaCoq.Utils Require Import All_Forall.
-Require Import Equations.Prop.Classes.
+From Equations.Prop Require Import Classes.
Import ListNotations.
Export Quotation.ToTemplate.Init.Instances.
diff --git a/quotation/theories/ToTemplate/Stdlib/Lists.v b/quotation/theories/ToTemplate/Stdlib/Lists.v
index 1eda7a122..45c3dc76d 100644
--- a/quotation/theories/ToTemplate/Stdlib/Lists.v
+++ b/quotation/theories/ToTemplate/Stdlib/Lists.v
@@ -1,5 +1,5 @@
-Require Import Coq.Lists.List.
-Require Import Coq.Lists.ListDec.
+From Stdlib Require Import Lists.List.
+From Stdlib Require Import Lists.ListDec.
From MetaCoq.Utils Require Import ReflectEq.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate Require Import (hints) Stdlib.Init.
diff --git a/quotation/theories/ToTemplate/Stdlib/MSets.v b/quotation/theories/ToTemplate/Stdlib/MSets.v
index e0676267b..df7e80ada 100644
--- a/quotation/theories/ToTemplate/Stdlib/MSets.v
+++ b/quotation/theories/ToTemplate/Stdlib/MSets.v
@@ -1,4 +1,4 @@
-From Coq Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
+From Stdlib Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
From MetaCoq.Utils Require Import MCMSets.
From MetaCoq.Quotation.ToTemplate Require Import Init.
From MetaCoq.Quotation.ToTemplate Require Import (hints) Stdlib.Numbers Stdlib.Init Stdlib.Lists.
diff --git a/quotation/theories/ToTemplate/Stdlib/Numbers.v b/quotation/theories/ToTemplate/Stdlib/Numbers.v
index f4473e30b..ad1ee32b4 100644
--- a/quotation/theories/ToTemplate/Stdlib/Numbers.v
+++ b/quotation/theories/ToTemplate/Stdlib/Numbers.v
@@ -1,10 +1,10 @@
-From Coq.Numbers Require Import BinNums DecimalFacts HexadecimalFacts
+From Stdlib.Numbers Require Import BinNums DecimalFacts HexadecimalFacts
Cyclic.Int63.PrimInt63 Cyclic.Int63.Uint63
Cyclic.Abstract.CyclicAxioms
Cyclic.Abstract.DoubleType
Cyclic.Int63.CarryType
.
-From Coq Require Import ZArith.
+From Stdlib Require Import ZArith.
From MetaCoq.Quotation.ToTemplate Require Import Stdlib.Init.
#[export] Instance quote_positive : ground_quotable positive := ltac:(induction 1; exact _).
diff --git a/quotation/theories/ToTemplate/Stdlib/Strings.v b/quotation/theories/ToTemplate/Stdlib/Strings.v
index b7e68b141..5727b9626 100644
--- a/quotation/theories/ToTemplate/Stdlib/Strings.v
+++ b/quotation/theories/ToTemplate/Stdlib/Strings.v
@@ -1,4 +1,4 @@
-Require Import Coq.Strings.String Coq.Strings.Ascii.
+From Stdlib Require Import Strings.String Strings.Ascii.
From MetaCoq.Quotation.ToTemplate Require Import Stdlib.Init.
#[export] Instance quote_ascii : ground_quotable Ascii.ascii := (ltac:(induction 1; exact _)).
diff --git a/quotation/theories/ToTemplate/Stdlib/ssr.v b/quotation/theories/ToTemplate/Stdlib/ssr.v
index ea05b511a..ad55ac4de 100644
--- a/quotation/theories/ToTemplate/Stdlib/ssr.v
+++ b/quotation/theories/ToTemplate/Stdlib/ssr.v
@@ -1,5 +1,5 @@
From MetaCoq.Quotation.ToTemplate Require Import Stdlib.Init.
-From Coq.ssr Require Import ssrbool ssreflect.
+From Stdlib.ssr Require Import ssrbool ssreflect.
#[export] Instance quote_if_spec {A b vT vF} {not_b:Prop} {b' a} {qA : quotation_of A} {qvT : quotation_of vT} {qvF : quotation_of vF} {qnot_b : quotation_of not_b} {quote_not_b : ground_quotable not_b} : ground_quotable (@if_spec A b vT vF not_b b' a) := ltac:(destruct 1; exact _).
#[export] Instance quote_alt_spec {P:Prop} {b b'} {qP : quotation_of P} {quoteP : ground_quotable P} : ground_quotable (@alt_spec P b b') := ltac:(destruct 1; exact _).
diff --git a/safechecker-plugin/Makefile b/safechecker-plugin/Makefile
index 7b3bf878c..b068688ae 100644
--- a/safechecker-plugin/Makefile
+++ b/safechecker-plugin/Makefile
@@ -9,12 +9,12 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.plugin: _PluginProject
- coq_makefile -f _PluginProject -o Makefile.plugin $(DEPS)
+ rocq makefile -f _PluginProject -o Makefile.plugin $(DEPS)
# Avoid conflicting dependency file creation for the template plugin
sed -e s/coqdeps/coqdeps.plugin/g Makefile.plugin > Makefile.plugin.tmp && mv -f Makefile.plugin.tmp Makefile.plugin
Makefile.safecheckerplugin: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.safecheckerplugin $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.safecheckerplugin $(DEPS)
theory: Makefile.safecheckerplugin
$(MAKE) -f Makefile.safecheckerplugin
diff --git a/safechecker-plugin/clean_extraction.sh b/safechecker-plugin/clean_extraction.sh
index c1d6d1564..1ea430821 100755
--- a/safechecker-plugin/clean_extraction.sh
+++ b/safechecker-plugin/clean_extraction.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+SED=`which gsed | which sed`
+
echo "Cleaning result of extraction"
if [ ! -d "src" ]
@@ -30,9 +32,11 @@ then
cd ..
# confusion between Init.Wf and Program.Wf
- mv src/wf.ml src/wf0.ml
- mv src/wf.mli src/wf0.mli
- sed -i.bak src/pCUICSafeChecker.ml -e 's/open Wf/open Wf0/'
+ if [ -f src/wf.ml ]; then
+ mv src/wf.ml src/wf0.ml
+ mv src/wf.mli src/wf0.mli
+ ${SED} -i -e "s/open Wf/open Wf0/" src/pCUICSafeChecker.ml
+ fi;
# Remove extracted modules already linked in the template_coq plugin.
echo "Removing:" $files
diff --git a/safechecker-plugin/src/pCUICSafeChecker.ml-e b/safechecker-plugin/src/pCUICSafeChecker.ml-e
new file mode 100644
index 000000000..1553563eb
--- /dev/null
+++ b/safechecker-plugin/src/pCUICSafeChecker.ml-e
@@ -0,0 +1,2636 @@
+open All_Forall
+open BasicAst
+open Byte
+open Datatypes
+open Kernames
+open List0
+open ListDef
+open MCList
+open Nat0
+open PCUICAst
+open PCUICAstUtils
+open PCUICEqualityDec
+open PCUICErrors
+open PCUICReflect
+open PCUICSafeConversion
+open PCUICSafeReduce
+open PCUICTypeChecker
+open PCUICWfEnv
+open PeanoNat
+open Reflect
+open ReflectEq
+open Specif
+open Universes0
+open Wf
+open Bytestring
+open Config0
+open Monad_utils
+open UGraph0
+
+type __ = Obj.t
+let __ = let rec f _ = Obj.repr f in Obj.repr f
+
+(** val check_eq_true_lazy :
+ 'a1 coq_Monad -> ('a2, 'a1) coq_MonadExc -> bool -> (unit -> 'a2) -> 'a1 **)
+
+let check_eq_true_lazy m mE b fe =
+ if b then ret m __ else raise mE (fe ())
+
+type coq_X_env_ext_type = __
+
+type coq_X_env_type = __
+
+(** val check_wf_type :
+ checker_flags -> abstract_env_impl -> kername -> coq_X_env_ext_type ->
+ term -> (coq_X_env_ext_type, __) coq_EnvCheck **)
+
+let check_wf_type cf x_impl kn x_ext t0 =
+ wrap_error x_ext (string_of_kername kn)
+ (typing_error_forget (check_isType cf x_impl x_ext [] t0))
+
+(** val check_wf_judgement :
+ checker_flags -> abstract_env_impl -> kername -> coq_X_env_ext_type ->
+ term -> term -> (coq_X_env_ext_type, __) coq_EnvCheck **)
+
+let check_wf_judgement cf x_impl kn x_ext t0 ty =
+ wrap_error x_ext (string_of_kername kn)
+ (typing_error_forget (check cf x_impl x_ext [] t0 ty))
+
+(** val infer_term :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> term ->
+ (coq_X_env_ext_type, (term, __) sigT) coq_EnvCheck **)
+
+let infer_term cf x_impl x_ext t0 =
+ wrap_error x_ext (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x70, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x6c, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x6d, String.EmptyString))))))))))))))))))))))))))
+ (typing_error_forget (infer cf x_impl x_ext [] t0))
+
+(** val abstract_env_ext_empty : checker_flags -> abstract_env_impl -> __ **)
+
+let abstract_env_ext_empty cf x_impl =
+ abstract_env_empty_ext cf x_impl (abstract_env_empty cf x_impl)
+
+(** val check_fresh :
+ checker_flags -> abstract_env_impl -> kername ->
+ PCUICEnvironment.global_declarations -> (coq_X_env_ext_type, __)
+ coq_EnvCheck **)
+
+let rec check_fresh cf x_impl id = function
+| [] -> Obj.magic ret envcheck_monad __
+| g :: env0 ->
+ let g0 = Obj.magic g in
+ let env1 = Obj.magic env0 in
+ Obj.magic bind envcheck_monad (Obj.magic check_fresh cf x_impl id env1)
+ (fun _ ->
+ let filtered_var = eq_constant id (fst g0) in
+ if filtered_var
+ then EnvError ((abstract_env_ext_empty cf x_impl), (AlreadyDeclared
+ (string_of_kername id)))
+ else ret envcheck_monad __)
+
+(** val check_udecl :
+ checker_flags -> abstract_env_impl -> String.t -> coq_X_env_type ->
+ universes_decl -> (coq_X_env_ext_type, (VSet.t * GoodConstraintSet.t, __)
+ sigT) coq_EnvCheck **)
+
+let check_udecl cf x_impl id x udecl =
+ let levels0 = levels_of_udecl udecl in
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc) (LevelSet.for_all Level.is_var levels0)
+ (fun _ -> ((abstract_env_empty_ext cf x_impl x), (IllFormedDecl (id,
+ (Msg
+ (String.append (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20, (String.String
+ (Coq_x66, (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x73, (String.String (Coq_x68, (String.String
+ (Coq_x20, (String.String (Coq_x6c, (String.String (Coq_x65,
+ (String.String (Coq_x76, (String.String (Coq_x65, (String.String
+ (Coq_x6c, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))
+ (print_lset levels0))))))))
+ (fun _ ->
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ (ConstraintSet.for_all (fun pat ->
+ let (p, l2) = pat in
+ let (l1, _) = p in
+ (&&)
+ (abstract_env_level_mem' cf
+ (abstract_env_impl_abstract_env_struct cf x_impl)
+ (abstract_env_empty_ext cf x_impl x) levels0 l1)
+ (abstract_env_level_mem' cf
+ (abstract_env_impl_abstract_env_struct cf x_impl)
+ (abstract_env_empty_ext cf x_impl x) levels0 l2))
+ (constraints_of_udecl udecl))
+ (fun _ -> ((abstract_env_empty_ext cf x_impl x), (IllFormedDecl (id,
+ (Msg
+ (String.append (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x65, (String.String (Coq_x64,
+ (String.String (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x6c, (String.String (Coq_x20, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))
+ (String.append (print_lset levels0)
+ (String.append (String.String (Coq_x20, (String.String (Coq_x7c,
+ (String.String (Coq_x3d, (String.String (Coq_x20,
+ String.EmptyString))))))))
+ (print_constraint_set (constraints_of_udecl udecl)))))))))))
+ (fun _ ->
+ match gc_of_uctx cf (uctx_of_udecl udecl) with
+ | Some uctx' ->
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ ((abstract_env_impl_abstract_env_struct cf x_impl).abstract_env_is_consistent
+ x uctx')
+ ((abstract_env_empty_ext cf x_impl x), (IllFormedDecl (id, (Msg
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x61, (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x66, (String.String
+ (Coq_x69, (String.String (Coq_x61, (String.String (Coq_x62,
+ (String.String (Coq_x6c, (String.String (Coq_x65,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret (Obj.magic envcheck_monad) (Coq_existT (uctx', __)))
+ | None ->
+ raise (Obj.magic envcheck_monad_exc)
+ ((abstract_env_empty_ext cf x_impl x), (IllFormedDecl (id, (Msg
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x69, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String (Coq_x6c,
+ (String.String (Coq_x79, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x61, (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x66, (String.String
+ (Coq_x69, (String.String (Coq_x61, (String.String (Coq_x62,
+ (String.String (Coq_x6c, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+(** val make_abstract_env_ext :
+ checker_flags -> abstract_env_impl -> coq_X_env_type -> kername ->
+ universes_decl -> (coq_X_env_ext_type, coq_X_env_ext_type) coq_EnvCheck **)
+
+let make_abstract_env_ext cf x_impl x id ext = match ext with
+| Monomorphic_ctx ->
+ Obj.magic ret envcheck_monad (abstract_env_empty_ext cf x_impl x)
+| Polymorphic_ctx _ ->
+ Obj.magic bind envcheck_monad
+ (Obj.magic check_udecl cf x_impl (string_of_kername id) x ext) (fun _ ->
+ let x' =
+ abstract_env_add_udecl cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x ext
+ in
+ ret envcheck_monad x')
+
+(** val check_type_wf_env :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> term -> term -> __ typing_result **)
+
+let check_type_wf_env cf x_impl x_ext _UU0393_ t0 t1 =
+ typing_error_forget (check cf x_impl x_ext _UU0393_ t0 t1)
+
+(** val infer_type_wf_env :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> term -> (Sort.t, __) sigT typing_result **)
+
+let infer_type_wf_env cf x_impl x_ext _UU0393_ t0 =
+ bind (Obj.magic typing_monad)
+ (typing_error_forget
+ (infer_type cf x_impl x_ext (fun x _ -> infer cf x_impl x_ext x)
+ _UU0393_ t0))
+ (fun x ->
+ let Coq_existT (y, _) = x in
+ ret (Obj.magic typing_monad) (Coq_existT (y, __)))
+
+(** val check_context_wf_env :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> __ typing_result **)
+
+let check_context_wf_env cf x_impl x_ext _UU0393_ =
+ typing_error_forget
+ (check_context cf x_impl x_ext (fun x _ -> infer cf x_impl x_ext x)
+ _UU0393_)
+
+(** val check_type_local_ctx :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> PCUICEnvironment.context -> Sort.t -> __
+ typing_result **)
+
+let rec check_type_local_ctx cf x_impl x_ext _UU0393_ _UU0394_ s =
+ match _UU0394_ with
+ | [] ->
+ let filtered_var =
+ abstract_env_ext_wf_sortb cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x_ext s
+ in
+ if filtered_var
+ then Obj.magic ret typing_monad __
+ else Obj.magic raise monad_exc (Msg (String.String (Coq_x49,
+ (String.String (Coq_x6c, (String.String (Coq_x6c, (String.String
+ (Coq_x2d, (String.String (Coq_x66, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x64, (String.String (Coq_x20,
+ (String.String (Coq_x75, (String.String (Coq_x6e, (String.String
+ (Coq_x69, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x72, (String.String (Coq_x73, (String.String
+ (Coq_x65, String.EmptyString)))))))))))))))))))))))))))))))))))))))
+ | c :: _UU0394_0 ->
+ let { decl_name = _; decl_body = decl_body0; decl_type = ty } = c in
+ (match decl_body0 with
+ | Some b ->
+ let b0 = Obj.magic b in
+ let ty0 = Obj.magic ty in
+ let _UU0394_1 = Obj.magic _UU0394_0 in
+ Obj.magic bind typing_monad
+ (Obj.magic check_type_local_ctx cf x_impl x_ext _UU0393_ _UU0394_1 s)
+ (fun _ ->
+ bind typing_monad
+ (Obj.magic check_type_wf_env cf x_impl x_ext
+ (app_context _UU0393_ _UU0394_1) b0 ty0)
+ (fun _ -> ret typing_monad __))
+ | None ->
+ let ty0 = Obj.magic ty in
+ let _UU0394_1 = Obj.magic _UU0394_0 in
+ Obj.magic bind typing_monad
+ (Obj.magic check_type_local_ctx cf x_impl x_ext _UU0393_ _UU0394_1 s)
+ (fun _ ->
+ bind typing_monad
+ (Obj.magic check_type_wf_env cf x_impl x_ext
+ (app_context _UU0393_ _UU0394_1) ty0 (Coq_tSort s))
+ (fun _ -> ret typing_monad __)))
+
+(** val infer_sorts_local_ctx :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> PCUICEnvironment.context -> (Sort.t list, __)
+ sigT typing_result **)
+
+let rec infer_sorts_local_ctx cf x_impl x_ext _UU0393_ = function
+| [] -> Obj.magic ret typing_monad (Coq_existT ([], __))
+| c :: _UU0394_0 ->
+ let { decl_name = _; decl_body = decl_body0; decl_type = ty } = c in
+ (match decl_body0 with
+ | Some b ->
+ let b0 = Obj.magic b in
+ let ty0 = Obj.magic ty in
+ let _UU0394_1 = Obj.magic _UU0394_0 in
+ Obj.magic bind typing_monad
+ (Obj.magic infer_sorts_local_ctx cf x_impl x_ext _UU0393_ _UU0394_1)
+ (fun x ->
+ let Coq_existT (_UU0394_s, _) = x in
+ bind typing_monad
+ (Obj.magic check_type_wf_env cf x_impl x_ext
+ (app_context _UU0393_ _UU0394_1) b0 ty0)
+ (fun _ -> ret typing_monad (Coq_existT (_UU0394_s, __))))
+ | None ->
+ let ty0 = Obj.magic ty in
+ let _UU0394_1 = Obj.magic _UU0394_0 in
+ Obj.magic bind typing_monad
+ (Obj.magic infer_sorts_local_ctx cf x_impl x_ext _UU0393_ _UU0394_1)
+ (fun x ->
+ let Coq_existT (_UU0394_s, _) = x in
+ bind typing_monad
+ (Obj.magic infer_type_wf_env cf x_impl x_ext
+ (app_context _UU0393_ _UU0394_1) ty0)
+ (fun x0 ->
+ let Coq_existT (tys, _) = x0 in
+ ret typing_monad (Coq_existT ((tys :: _UU0394_s), __)))))
+
+(** val check_eq_term :
+ checker_flags -> abstract_env_impl -> conv_pb -> coq_X_env_ext_type ->
+ term -> term -> __ typing_result **)
+
+let check_eq_term cf x_impl pb x_ext t0 u =
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (eqb_term_upto_univ_napp
+ (abstract_env_compare_universe cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x_ext)
+ (abstract_env_compare_sort cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x_ext)
+ (abstract_env_compare_global_instance cf x_impl x_ext) pb O t0 u)
+ (Msg (String.String (Coq_x54, (String.String (Coq_x65, (String.String
+ (Coq_x72, (String.String (Coq_x6d, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String (Coq_x65,
+ (String.String (Coq_x71, (String.String (Coq_x75, (String.String
+ (Coq_x61, (String.String (Coq_x6c,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret (Obj.magic typing_monad) __)
+
+(** val check_eq_decl :
+ checker_flags -> abstract_env_impl -> conv_pb -> coq_X_env_ext_type ->
+ term context_decl -> term context_decl -> __ typing_result **)
+
+let check_eq_decl cf x_impl pb x_ext d d' =
+ let { decl_name = na; decl_body = decl_body0; decl_type = ty } = d in
+ (match decl_body0 with
+ | Some b ->
+ let { decl_name = na'; decl_body = decl_body1; decl_type = ty' } = d' in
+ (match decl_body1 with
+ | Some b' ->
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (eqb_binder_annot na na') (Msg (String.String (Coq_x42,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x64, (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x63, (String.String (Coq_x68,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_term cf x_impl Conv x_ext b b') (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_term cf x_impl pb x_ext ty ty') (fun _ ->
+ ret (Obj.magic typing_monad) __)))
+ | None ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x79, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x61, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x63, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x75, (String.String (Coq_x6d, (String.String
+ (Coq_x75, (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x76, (String.String (Coq_x69, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x20, (String.String
+ (Coq_x6f, (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x74, (String.String (Coq_x65,
+ (String.String (Coq_x78, (String.String (Coq_x74, (String.String
+ (Coq_x73, (String.String (Coq_x3a, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x63, (String.String (Coq_x68,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | None ->
+ let { decl_name = na'; decl_body = decl_body1; decl_type = ty' } = d' in
+ (match decl_body1 with
+ | Some _ ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x79, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x61, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x63, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x75, (String.String (Coq_x6d, (String.String
+ (Coq_x75, (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x76, (String.String (Coq_x69, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x20, (String.String
+ (Coq_x6f, (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x74, (String.String (Coq_x65,
+ (String.String (Coq_x78, (String.String (Coq_x74, (String.String
+ (Coq_x73, (String.String (Coq_x3a, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x63, (String.String (Coq_x68,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | None ->
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (eqb_binder_annot na na') (Msg (String.String (Coq_x42,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x64, (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x63, (String.String (Coq_x68,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_term cf x_impl pb x_ext ty ty') (fun _ ->
+ ret (Obj.magic typing_monad) __))))
+
+(** val check_compare_context :
+ checker_flags -> abstract_env_impl -> conv_pb -> coq_X_env_ext_type ->
+ term context_decl list -> term context_decl list -> __ typing_result **)
+
+let rec check_compare_context cf x_impl pb x_ext _UU0393_ _UU0394_ =
+ match _UU0393_ with
+ | [] ->
+ (match _UU0394_ with
+ | [] -> ret (Obj.magic typing_monad) __
+ | _ :: _ ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x73, (String.String (Coq_x5f, (String.String
+ (Coq_x63, (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x75, (String.String (Coq_x6c, (String.String
+ (Coq_x5f, (String.String (Coq_x70, (String.String (Coq_x62,
+ (String.String (Coq_x20, (String.String (Coq_x6f, (String.String
+ (Coq_x66, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x78,
+ (String.String (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x3a, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x78,
+ (String.String (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x68, (String.String (Coq_x61, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x61, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x74, (String.String (Coq_x68,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | decl :: _UU0393_0 ->
+ (match _UU0394_ with
+ | [] ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x73, (String.String (Coq_x5f, (String.String
+ (Coq_x63, (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x75, (String.String (Coq_x6c, (String.String
+ (Coq_x5f, (String.String (Coq_x70, (String.String (Coq_x62,
+ (String.String (Coq_x20, (String.String (Coq_x6f, (String.String
+ (Coq_x66, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x78,
+ (String.String (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x3a, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x78,
+ (String.String (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x68, (String.String (Coq_x61, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x61, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x74, (String.String (Coq_x68,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | decl' :: _UU0394_0 ->
+ bind (Obj.magic typing_monad)
+ (check_compare_context cf x_impl pb x_ext _UU0393_0 _UU0394_0)
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_decl cf x_impl pb x_ext decl decl') (fun _ ->
+ ret (Obj.magic typing_monad) __)))
+
+(** val check_leq_terms :
+ checker_flags -> abstract_env_impl -> conv_pb -> coq_X_env_ext_type ->
+ term list -> term list -> __ typing_result **)
+
+let rec check_leq_terms cf x_impl pb x_ext l l' =
+ match l with
+ | [] ->
+ (match l' with
+ | [] -> ret (Obj.magic typing_monad) __
+ | _ :: _ ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x73, (String.String (Coq_x5f, (String.String
+ (Coq_x63, (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x75, (String.String (Coq_x6c, (String.String
+ (Coq_x5f, (String.String (Coq_x70, (String.String (Coq_x62,
+ (String.String (Coq_x20, (String.String (Coq_x6f, (String.String
+ (Coq_x66, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x6d, (String.String (Coq_x20, (String.String (Coq_x6c,
+ (String.String (Coq_x69, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x73, (String.String (Coq_x3a,
+ (String.String (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x69, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String (Coq_x68,
+ (String.String (Coq_x61, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x73, (String.String (Coq_x61,
+ (String.String (Coq_x6d, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x6c, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x67, (String.String
+ (Coq_x74, (String.String (Coq_x68,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | t0 :: l0 ->
+ (match l' with
+ | [] ->
+ raise (Obj.magic monad_exc) (Msg (String.String (Coq_x57,
+ (String.String (Coq_x68, (String.String (Coq_x69, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6b,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x73, (String.String (Coq_x5f, (String.String
+ (Coq_x63, (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x75, (String.String (Coq_x6c, (String.String
+ (Coq_x5f, (String.String (Coq_x70, (String.String (Coq_x62,
+ (String.String (Coq_x20, (String.String (Coq_x6f, (String.String
+ (Coq_x66, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x6d, (String.String (Coq_x20, (String.String (Coq_x6c,
+ (String.String (Coq_x69, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x73, (String.String (Coq_x3a,
+ (String.String (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x69, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String (Coq_x68,
+ (String.String (Coq_x61, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x73, (String.String (Coq_x61,
+ (String.String (Coq_x6d, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x6c, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x67, (String.String
+ (Coq_x74, (String.String (Coq_x68,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | t' :: l'0 ->
+ bind (Obj.magic typing_monad)
+ (check_leq_terms cf x_impl pb x_ext l0 l'0) (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_term cf x_impl pb x_ext t0 t') (fun _ ->
+ ret (Obj.magic typing_monad) __)))
+
+(** val isRel_n : nat -> term -> __ typing_result **)
+
+let isRel_n n = function
+| Coq_tRel k ->
+ let k0 = Obj.magic k in
+ let filtered_var = reflect_nat k0 n in
+ if filtered_var
+ then Obj.magic ret typing_monad __
+ else Obj.magic raise monad_exc (Msg (String.String (Coq_x44, (String.String
+ (Coq_x65, (String.String (Coq_x2d, (String.String (Coq_x62,
+ (String.String (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x69, (String.String (Coq_x6a, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x65, (String.String
+ (Coq_x72, (String.String (Coq_x72, (String.String (Coq_x6f,
+ (String.String (Coq_x72,
+ String.EmptyString)))))))))))))))))))))))))))))))
+| _ ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x69, (String.String
+ (Coq_x73, (String.String (Coq_x52, (String.String (Coq_x65,
+ (String.String (Coq_x6c, (String.String (Coq_x5f, (String.String
+ (Coq_x6e, (String.String (Coq_x3a, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x20, (String.String (Coq_x76, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x69,
+ (String.String (Coq_x61, (String.String (Coq_x62, (String.String
+ (Coq_x6c, (String.String (Coq_x65,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))
+
+(** val decompose_cstr_concl :
+ PCUICEnvironment.mutual_inductive_body -> nat -> term context_decl list
+ -> term -> (term list, __) sigT typing_result **)
+
+let decompose_cstr_concl mdecl k argctx t0 =
+ let filtered_var = decompose_app t0 in
+ let (hd, args) = filtered_var in
+ let hd0 = Obj.magic hd in
+ let args0 = Obj.magic args in
+ Obj.magic bind typing_monad
+ (Obj.magic isRel_n
+ (add (sub (length (PCUICEnvironment.ind_bodies mdecl)) k)
+ (length (app_context (PCUICEnvironment.ind_params mdecl) argctx)))
+ hd0)
+ (fun _ -> ret typing_monad (Coq_existT (args0, __)))
+
+(** val check_constructor :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> nat ->
+ PCUICEnvironment.mutual_inductive_body ->
+ PCUICEnvironment.constructor_body -> (coq_X_env_ext_type,
+ (constructor_univs, __) sigT) coq_EnvCheck **)
+
+let check_constructor cf x_impl x_ext ind mdecl cdecl =
+ bind (Obj.magic envcheck_monad)
+ (wrap_error x_ext
+ (String.append (String.String (Coq_x57, (String.String (Coq_x68,
+ (String.String (Coq_x69, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6b, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x67, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x79,
+ (String.String (Coq_x70, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x6f, (String.String (Coq_x66,
+ (String.String (Coq_x20, (String.String (Coq_x63, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x6f, (String.String (Coq_x72, (String.String
+ (Coq_x3a, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (PCUICEnvironment.cstr_name cdecl))
+ (Obj.magic infer_type_wf_env cf x_impl x_ext
+ (PCUICEnvironment.arities_context (PCUICEnvironment.ind_bodies mdecl))
+ (PCUICEnvironment.cstr_type cdecl)))
+ (fun _ ->
+ let filtered_var =
+ decompose_prod_n_assum [] (length (PCUICEnvironment.ind_params mdecl))
+ (PCUICEnvironment.cstr_type cdecl)
+ in
+ (match filtered_var with
+ | Some p ->
+ let (params, concl) = p in
+ Obj.magic bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (check_eq_true typing_monad monad_exc
+ (eqb_ctx params (PCUICEnvironment.ind_params mdecl)) (Msg
+ (String.String (Coq_x43, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x70, (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x74, (String.String (Coq_x65,
+ (String.String (Coq_x72, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x63, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x70, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x61, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x6f, (String.String
+ (Coq_x66, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x6d, (String.String (Coq_x75,
+ (String.String (Coq_x74, (String.String (Coq_x75, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ let filtered_var0 = decompose_prod_assum [] concl in
+ let (args, concl0) = filtered_var0 in
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (check_eq_true typing_monad monad_exc
+ (reflect_nat (PCUICEnvironment.context_assumptions args)
+ (PCUICEnvironment.cstr_arity cdecl))
+ (Msg (String.String (Coq_x43, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x67, (String.String (Coq_x75,
+ (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x6d,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x63, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67,
+ (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x75,
+ (String.String (Coq_x6d, (String.String (Coq_x62,
+ (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x6c,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (check_eq_true typing_monad monad_exc
+ (eqb_ctx args (PCUICEnvironment.cstr_args cdecl)) (Msg
+ (String.String (Coq_x43, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x67, (String.String (Coq_x75,
+ (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x6d,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x63, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67,
+ (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x74, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x6c,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (Obj.magic decompose_cstr_concl mdecl ind args concl0))
+ (fun x ->
+ let Coq_existT (conclargs, _) = x in
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (check_eq_true typing_monad monad_exc
+ (reflect_list eqb_term_reflect
+ (firstn (PCUICEnvironment.ind_npars mdecl) conclargs)
+ (PCUICEnvironment.to_extended_list_k
+ (PCUICEnvironment.ind_params mdecl) (length args)))
+ (Msg (String.String (Coq_x50, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61,
+ (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x74, (String.String (Coq_x65,
+ (String.String (Coq_x72, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x75,
+ (String.String (Coq_x73, (String.String (Coq_x69,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x79,
+ (String.String (Coq_x70, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x63,
+ (String.String (Coq_x68, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x70, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61,
+ (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x74, (String.String (Coq_x65,
+ (String.String (Coq_x72, (String.String (Coq_x73,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (check_eq_true typing_monad monad_exc
+ (reflect_list eqb_term_reflect
+ (skipn (PCUICEnvironment.ind_npars mdecl) conclargs)
+ (PCUICEnvironment.cstr_indices cdecl))
+ (Msg (String.String (Coq_x49, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x69,
+ (String.String (Coq_x63, (String.String (Coq_x65,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x63, (String.String (Coq_x6c,
+ (String.String (Coq_x75, (String.String (Coq_x73,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x66,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x6d,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x63, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x69, (String.String (Coq_x63,
+ (String.String (Coq_x65, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x6c,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext (PCUICEnvironment.cstr_name cdecl)
+ (Obj.magic infer_sorts_local_ctx cf x_impl x_ext
+ (app_context
+ (PCUICEnvironment.arities_context
+ (PCUICEnvironment.ind_bodies mdecl))
+ (PCUICEnvironment.ind_params mdecl))
+ args))
+ (fun x0 ->
+ let Coq_existT (cs, _) = x0 in
+ ret envcheck_monad (Coq_existT (cs, __)))))))))
+ | None ->
+ Obj.magic raise envcheck_monad_exc (x_ext, (IllFormedDecl
+ ((PCUICEnvironment.cstr_name cdecl), (Msg (String.String (Coq_x4e,
+ (String.String (Coq_x6f, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x75, (String.String
+ (Coq_x67, (String.String (Coq_x68, (String.String (Coq_x20,
+ (String.String (Coq_x70, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x61, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x73, (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x79, (String.String (Coq_x70, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+(** val coq_All_sigma :
+ 'a1 list -> ('a1, ('a2, 'a3) sigT) coq_All -> ('a2 list, ('a1, 'a2, 'a3)
+ coq_All2) sigT **)
+
+let rec coq_All_sigma _ = function
+| All_nil -> Coq_existT ([], All2_nil)
+| All_cons (x, l, px, pl) ->
+ let Coq_existT (l', pl') = coq_All_sigma l pl in
+ Coq_existT (((projT1 px) :: l'), (All2_cons (x, (projT1 px), l, l',
+ (projT2 px), pl')))
+
+(** val check_constructors_univs :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> ident ->
+ PCUICEnvironment.mutual_inductive_body -> nat ->
+ PCUICEnvironment.constructor_body list -> (coq_X_env_ext_type,
+ (constructor_univs list, __) sigT) coq_EnvCheck **)
+
+let check_constructors_univs cf x_impl x_ext _ mdecl ind cstrs =
+ bind (Obj.magic envcheck_monad)
+ (monad_All (Obj.magic envcheck_monad) (fun d ->
+ Obj.magic check_constructor cf x_impl x_ext ind mdecl d) cstrs)
+ (fun css ->
+ let Coq_existT (cs, _) = coq_All_sigma cstrs css in
+ ret (Obj.magic envcheck_monad) (Coq_existT (cs, __)))
+
+type prod_letin_view =
+| Coq_prod_letin_tProd of aname * term * term
+| Coq_prod_letin_tLetIn of aname * term * term * term
+| Coq_prod_letin_other of term
+
+(** val prod_letin_viewc : term -> prod_letin_view **)
+
+let prod_letin_viewc = function
+| Coq_tProd (na, a, b) -> Coq_prod_letin_tProd (na, a, b)
+| Coq_tLetIn (na, b, b0, t1) -> Coq_prod_letin_tLetIn (na, b, b0, t1)
+| x -> Coq_prod_letin_other x
+
+(** val isRel : term -> (nat, __) sigT typing_result **)
+
+let isRel = function
+| Coq_tRel k ->
+ let k0 = Obj.magic k in Obj.magic ret typing_monad (Coq_existT (k0, __))
+| _ ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x69, (String.String
+ (Coq_x73, (String.String (Coq_x52, (String.String (Coq_x65,
+ (String.String (Coq_x6c, (String.String (Coq_x3a, (String.String
+ (Coq_x20, (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x20, (String.String
+ (Coq_x61, (String.String (Coq_x20, (String.String (Coq_x76,
+ (String.String (Coq_x61, (String.String (Coq_x72, (String.String
+ (Coq_x69, (String.String (Coq_x61, (String.String (Coq_x62,
+ (String.String (Coq_x6c, (String.String (Coq_x65,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))
+
+(** val check_positive_cstr_arg_func :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ (PCUICEnvironment.mutual_inductive_body, (PCUICEnvironment.context,
+ (term, (__, term context_decl list) sigT) sigT) sigT) sigT -> __
+ typing_result **)
+
+let check_positive_cstr_arg_func _ _ _ =
+ coq_Fix_sub (fun recarg check_positive_cstr_arg' ->
+ let mdecl = projT1 recarg in
+ let _UU0393_ = projT1 (projT2 recarg) in
+ let t0 = projT1 (projT2 (projT2 recarg)) in
+ let _UU0394_ = projT2 (projT2 (projT2 (projT2 recarg))) in
+ let check_positive_cstr_arg0 = fun mdecl0 _UU0393_0 t1 _UU0394_0 ->
+ check_positive_cstr_arg' (Coq_existT (mdecl0, (Coq_existT (_UU0393_0,
+ (Coq_existT (t1, (Coq_existT (__, _UU0394_0))))))))
+ in
+ let filtered_var = closedn (length _UU0394_) t0 in
+ if filtered_var
+ then Obj.magic ret typing_monad __
+ else let filtered_var0 = prod_letin_viewc t0 in
+ (match filtered_var0 with
+ | Coq_prod_letin_tProd (na, ty, t1) ->
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (closedn (length _UU0394_) ty) (Msg (String.String (Coq_x4e,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x2d, (String.String (Coq_x70,
+ (String.String (Coq_x6f, (String.String (Coq_x73,
+ (String.String (Coq_x69, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x63,
+ (String.String (Coq_x63, (String.String (Coq_x75,
+ (String.String (Coq_x72, (String.String (Coq_x72,
+ (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x63, (String.String (Coq_x65,
+ (String.String (Coq_x2e,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind typing_monad
+ (Obj.magic check_positive_cstr_arg0 mdecl
+ ((PCUICEnvironment.vass na ty) :: _UU0393_) t1
+ ((PCUICEnvironment.vass na ty) :: _UU0394_))
+ (fun _ -> ret typing_monad __))
+ | Coq_prod_letin_tLetIn (_, b, _, t1) ->
+ Obj.magic bind typing_monad
+ (Obj.magic check_positive_cstr_arg0 mdecl _UU0393_
+ (subst (b :: []) O t1) _UU0394_)
+ (fun _ -> ret typing_monad __)
+ | Coq_prod_letin_other t1 ->
+ let filtered_var1 = decompose_app t1 in
+ let (hd, args) = filtered_var1 in
+ Obj.magic bind typing_monad (Obj.magic isRel hd) (fun x ->
+ let Coq_existT (hdrel, _) = x in
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ ((&&) (Nat.leb (length _UU0394_) hdrel)
+ (Nat.ltb hdrel
+ (add (length _UU0394_)
+ (length (PCUICEnvironment.ind_bodies mdecl)))))
+ (Msg (String.String (Coq_x43, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x75,
+ (String.String (Coq_x73, (String.String (Coq_x69,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70,
+ (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (forallb (closedn (length _UU0394_)) args) (Msg
+ (String.String (Coq_x43, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x75,
+ (String.String (Coq_x73, (String.String (Coq_x69,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67,
+ (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x74, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x72,
+ (String.String (Coq_x65, (String.String (Coq_x66,
+ (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x79,
+ (String.String (Coq_x70, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x62,
+ (String.String (Coq_x65, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x67,
+ (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x65, (String.String (Coq_x66,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x65, (String.String (Coq_x64,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ let filtered_var2 =
+ nth_error (List0.rev (PCUICEnvironment.ind_bodies mdecl))
+ (sub hdrel (length _UU0394_))
+ in
+ (match filtered_var2 with
+ | Some i ->
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (reflect_nat (ind_realargs i) (length args)) (Msg
+ (String.String (Coq_x50, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x61,
+ (String.String (Coq_x6c, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x70,
+ (String.String (Coq_x70, (String.String (Coq_x6c,
+ (String.String (Coq_x69, (String.String (Coq_x63,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x66,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret typing_monad __)
+ | None -> assert false (* absurd case *)))))))
+
+(** val check_positive_cstr_arg :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.mutual_inductive_body -> PCUICEnvironment.context ->
+ term -> term context_decl list -> __ typing_result **)
+
+let check_positive_cstr_arg cf x_impl x_ext mdecl _UU0393_ t0 _UU0394_ =
+ check_positive_cstr_arg_func cf x_impl x_ext (Coq_existT (mdecl,
+ (Coq_existT (_UU0393_, (Coq_existT (t0, (Coq_existT (__, _UU0394_))))))))
+
+(** val check_positive_cstr_func :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ (PCUICEnvironment.mutual_inductive_body, (nat, (PCUICEnvironment.context,
+ (term, (__, term context_decl list) sigT) sigT) sigT) sigT) sigT -> __
+ typing_result **)
+
+let check_positive_cstr_func cf x_impl x_ext =
+ coq_Fix_sub (fun recarg check_positive_cstr' ->
+ let mdecl = projT1 recarg in
+ let n = projT1 (projT2 recarg) in
+ let _UU0393_ = projT1 (projT2 (projT2 recarg)) in
+ let t0 = projT1 (projT2 (projT2 (projT2 recarg))) in
+ let _UU0394_ = projT2 (projT2 (projT2 (projT2 (projT2 recarg)))) in
+ let check_positive_cstr0 = fun mdecl0 n0 _UU0393_0 t1 _UU0394_0 ->
+ check_positive_cstr' (Coq_existT (mdecl0, (Coq_existT (n0, (Coq_existT
+ (_UU0393_0, (Coq_existT (t1, (Coq_existT (__, _UU0394_0))))))))))
+ in
+ let filtered_var = prod_letin_viewc t0 in
+ (match filtered_var with
+ | Coq_prod_letin_tProd (na, ty, t1) ->
+ let na0 = Obj.magic na in
+ let ty0 = Obj.magic ty in
+ let t2 = Obj.magic t1 in
+ Obj.magic bind typing_monad
+ (Obj.magic check_positive_cstr_arg cf x_impl x_ext mdecl _UU0393_
+ ty0 _UU0394_)
+ (fun _ ->
+ bind typing_monad
+ (Obj.magic check_positive_cstr0 mdecl n
+ ((PCUICEnvironment.vass na0 ty0) :: _UU0393_) t2
+ ((PCUICEnvironment.vass na0 ty0) :: _UU0394_))
+ (fun _ -> ret typing_monad __))
+ | Coq_prod_letin_tLetIn (_, b, _, t1) ->
+ let b0 = Obj.magic b in
+ let t2 = Obj.magic t1 in
+ Obj.magic bind typing_monad
+ (Obj.magic check_positive_cstr0 mdecl n _UU0393_
+ (subst (b0 :: []) O t2) _UU0394_)
+ (fun _ -> ret typing_monad __)
+ | Coq_prod_letin_other t1 ->
+ let t2 = Obj.magic t1 in
+ let filtered_var0 = decompose_app t2 in
+ let (hd, indices) = filtered_var0 in
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (eqb_term_reflect hd (Coq_tRel
+ (add (sub (length (PCUICEnvironment.ind_bodies mdecl)) (S n))
+ (length _UU0394_))))
+ (Msg (String.String (Coq_x43, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x63, (String.String
+ (Coq_x6c, (String.String (Coq_x75, (String.String (Coq_x73,
+ (String.String (Coq_x69, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String (Coq_x6e,
+ (String.String (Coq_x73, (String.String (Coq_x74, (String.String
+ (Coq_x72, (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x72, (String.String (Coq_x69, (String.String
+ (Coq_x67, (String.String (Coq_x68, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x64, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x69, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x79, (String.String (Coq_x70, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (forallb (closedn (length _UU0394_)) indices) (Msg
+ (String.String (Coq_x41, (String.String (Coq_x72, (String.String
+ (Coq_x67, (String.String (Coq_x75, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x6e, (String.String
+ (Coq_x74, (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x66, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x75, (String.String (Coq_x63, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x63, (String.String (Coq_x6c, (String.String (Coq_x75,
+ (String.String (Coq_x73, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x66, (String.String
+ (Coq_x20, (String.String (Coq_x61, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x6d, (String.String (Coq_x65, (String.String (Coq_x6e,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x65, (String.String (Coq_x6c, (String.String (Coq_x66,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret typing_monad __))))
+
+(** val check_positive_cstr :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.mutual_inductive_body -> nat -> PCUICEnvironment.context
+ -> term -> term context_decl list -> __ typing_result **)
+
+let check_positive_cstr cf x_impl x_ext mdecl n _UU0393_ t0 _UU0394_ =
+ check_positive_cstr_func cf x_impl x_ext (Coq_existT (mdecl, (Coq_existT
+ (n, (Coq_existT (_UU0393_, (Coq_existT (t0, (Coq_existT (__,
+ _UU0394_))))))))))
+
+(** val check_variance :
+ checker_flags -> abstract_env_impl -> coq_X_env_type -> kername ->
+ universes_decl -> Variance.t list option -> (coq_X_env_ext_type, __)
+ coq_EnvCheck **)
+
+let check_variance cf x_impl x id univs = function
+| Some l ->
+ (match inspect (variance_universes univs l) with
+ | Some p ->
+ let (p0, _) = p in
+ let (u, _) = p0 in
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ (reflect_nat (length l) (length (polymorphic_instance univs)))
+ ((abstract_env_empty_ext cf x_impl (abstract_env_empty cf x_impl)),
+ (IllFormedDecl ((string_of_kername id), (Msg (String.String
+ (Coq_x56, (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x69, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x63, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x61, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x6f, (String.String (Coq_x65,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x68, (String.String
+ (Coq_x61, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x72, (String.String (Coq_x69, (String.String
+ (Coq_x67, (String.String (Coq_x68, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x6e, (String.String (Coq_x67,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic envcheck_monad)
+ (Obj.magic make_abstract_env_ext cf x_impl x id u) (fun _ ->
+ ret (Obj.magic envcheck_monad) __))
+ | None ->
+ raise (Obj.magic envcheck_monad_exc)
+ ((abstract_env_empty_ext cf x_impl (abstract_env_empty cf x_impl)),
+ (IllFormedDecl ((string_of_kername id), (Msg (String.String (Coq_x49,
+ (String.String (Coq_x6c, (String.String (Coq_x6c, (String.String
+ (Coq_x2d, (String.String (Coq_x66, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x64, (String.String (Coq_x20,
+ (String.String (Coq_x76, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x69, (String.String (Coq_x61,
+ (String.String (Coq_x6e, (String.String (Coq_x63, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x6e, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+| None -> ret (Obj.magic envcheck_monad) __
+
+(** val check_cstr_variance :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ PCUICEnvironment.mutual_inductive_body -> kername ->
+ PCUICEnvironment.context -> PCUICEnvironment.constructor_body ->
+ (coq_X_env_ext_type, __) coq_EnvCheck **)
+
+let check_cstr_variance cf x_impl x mdecl id _ cs =
+ let filtered_var = PCUICEnvironment.ind_variance mdecl in
+ (match filtered_var with
+ | Some v ->
+ let v0 = Obj.magic v in
+ let univs = PCUICEnvironment.ind_universes mdecl in
+ let filtered_var0 = variance_universes univs v0 in
+ (match filtered_var0 with
+ | Some p ->
+ let (p0, u') = p in
+ let (univs0, u) = p0 in
+ Obj.magic bind envcheck_monad
+ (Obj.magic make_abstract_env_ext cf x_impl x id univs0) (fun x0 ->
+ bind envcheck_monad
+ (wrap_error x0 (string_of_kername id)
+ (Obj.magic check_compare_context cf x_impl Cumul x0
+ (subst_instance PCUICEnvironment.subst_instance_context u
+ (PCUICEnvironment.expand_lets_ctx
+ (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.smash_context []
+ (PCUICEnvironment.cstr_args cs))))
+ (subst_instance PCUICEnvironment.subst_instance_context u'
+ (PCUICEnvironment.expand_lets_ctx
+ (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.smash_context []
+ (PCUICEnvironment.cstr_args cs))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x0 (string_of_kername id)
+ (Obj.magic check_leq_terms cf x_impl Conv x0
+ (map
+ (let g0 = subst_instance subst_instance_constr u in
+ let f0 =
+ PCUICEnvironment.expand_lets
+ (app_context (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.cstr_args cs))
+ in
+ (fun x1 -> g0 (f0 x1)))
+ (PCUICEnvironment.cstr_indices cs))
+ (map
+ (let g0 = subst_instance subst_instance_constr u' in
+ let f0 =
+ PCUICEnvironment.expand_lets
+ (app_context (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.cstr_args cs))
+ in
+ (fun x1 -> g0 (f0 x1)))
+ (PCUICEnvironment.cstr_indices cs))))
+ (fun _ -> ret envcheck_monad __)))
+ | None -> assert false (* absurd case *))
+ | None -> Obj.magic ret envcheck_monad __)
+
+(** val monad_All_All :
+ 'a3 coq_Monad -> ('a4 -> __ -> 'a3) -> 'a4 list -> 'a3 **)
+
+let rec monad_All_All m f = function
+| [] -> ret m __
+| a :: l0 ->
+ bind m (f a __) (fun _ -> bind m (monad_All_All m f l0) (fun _ -> ret m __))
+
+(** val monad_lift_ext_obligation_1 :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ coq_X_env_ext_type -> (PCUICEnvironment.global_env -> __ -> 'a1) ->
+ PCUICEnvironment.global_env_ext -> 'a1 **)
+
+let monad_lift_ext_obligation_1 _ _ _ _ f _UU03a3_ =
+ f (PCUICEnvironment.fst_ctx _UU03a3_) __
+
+(** val monad_lift_ext :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ coq_X_env_ext_type -> 'a1 coq_Monad -> 'a1 -> 'a1 **)
+
+let monad_lift_ext cf x_impl x x_ext m x0 =
+ bind m x0 (fun f ->
+ ret m (fun _UU03a3_ _ ->
+ monad_lift_ext_obligation_1 cf x_impl x x_ext f _UU03a3_))
+
+(** val check_constructors :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ coq_X_env_ext_type -> kername -> PCUICEnvironment.mutual_inductive_body
+ -> nat -> PCUICEnvironment.one_inductive_body -> PCUICEnvironment.context
+ -> (coq_X_env_ext_type, (constructor_univs list, __) sigT) coq_EnvCheck **)
+
+let check_constructors cf x_impl x x_ext id mdecl n idecl indices =
+ bind (Obj.magic envcheck_monad)
+ (check_constructors_univs cf x_impl x_ext (string_of_kername id) mdecl (S
+ n) (PCUICEnvironment.ind_ctors idecl))
+ (fun x0 ->
+ let Coq_existT (cs, _) = x0 in
+ let cs0 = Obj.magic cs in
+ Obj.magic bind envcheck_monad
+ (wrap_error x_ext (string_of_kername id)
+ (monad_All_All typing_monad (fun x1 _ ->
+ Obj.magic check_positive_cstr cf x_impl x_ext mdecl n
+ (PCUICEnvironment.arities_context
+ (PCUICEnvironment.ind_bodies mdecl))
+ (PCUICEnvironment.cstr_type x1) [])
+ (PCUICEnvironment.ind_ctors idecl)))
+ (fun _ ->
+ bind envcheck_monad
+ (monad_All_All envcheck_monad (fun cs1 _ ->
+ monad_lift_ext cf x_impl x x_ext envcheck_monad
+ (Obj.magic check_cstr_variance cf x_impl x mdecl id indices cs1))
+ (PCUICEnvironment.ind_ctors idecl))
+ (fun _ ->
+ bind envcheck_monad
+ (monad_All envcheck_monad (fun cs1 ->
+ let filtered_var = cf.lets_in_constructor_types in
+ if filtered_var
+ then ret envcheck_monad __
+ else let filtered_var0 =
+ PCUICEnvironment.is_assumption_context
+ (PCUICEnvironment.cstr_args cs1)
+ in
+ if filtered_var0
+ then ret envcheck_monad __
+ else EnvError (x_ext, (IllFormedDecl ((String.String
+ (Coq_x4e, (String.String (Coq_x6f, (String.String
+ (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x20, (String.String (Coq_x63, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x73, (String.String (Coq_x74, (String.String
+ (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x72, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6c, (String.String (Coq_x6c, (String.String
+ (Coq_x6f, (String.String (Coq_x77, (String.String
+ (Coq_x65, (String.String (Coq_x64, (String.String
+ (Coq_x2c, (String.String (Coq_x20, (String.String
+ (Coq_x79, (String.String (Coq_x6f, (String.String
+ (Coq_x75, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x65, (String.String
+ (Coq_x65, (String.String (Coq_x64, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x20, (String.String
+ (Coq_x73, (String.String (Coq_x65, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String
+ (Coq_x6b, (String.String (Coq_x65, (String.String
+ (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x66, (String.String (Coq_x6c, (String.String
+ (Coq_x61, (String.String (Coq_x67, (String.String
+ (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x73, (String.String (Coq_x5f, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x5f, (String.String (Coq_x63, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x73, (String.String (Coq_x74, (String.String
+ (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x72, (String.String
+ (Coq_x5f, (String.String (Coq_x74, (String.String
+ (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x20, (String.String
+ (Coq_x5b, (String.String (Coq_x74, (String.String
+ (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x65, (String.String (Coq_x5d, (String.String
+ (Coq_x2e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))),
+ (Msg (String.String (Coq_x4e, (String.String
+ (Coq_x6f, (String.String (Coq_x20, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x79, (String.String
+ (Coq_x70, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String
+ (Coq_x6c, (String.String (Coq_x6f, (String.String
+ (Coq_x77, (String.String (Coq_x65, (String.String
+ (Coq_x64, (String.String (Coq_x2c, (String.String
+ (Coq_x20, (String.String (Coq_x79, (String.String
+ (Coq_x6f, (String.String (Coq_x75, (String.String
+ (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x65, (String.String (Coq_x65, (String.String
+ (Coq_x64, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x63, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6b, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x20, (String.String (Coq_x66, (String.String
+ (Coq_x6c, (String.String (Coq_x61, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x74, (String.String (Coq_x73, (String.String
+ (Coq_x5f, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x5f, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x5f, (String.String
+ (Coq_x74, (String.String (Coq_x79, (String.String
+ (Coq_x70, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x20, (String.String (Coq_x5b, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String
+ (Coq_x75, (String.String (Coq_x65, (String.String
+ (Coq_x5d, (String.String (Coq_x2e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (PCUICEnvironment.ind_ctors idecl))
+ (fun _ -> ret envcheck_monad (Coq_existT (cs0, __))))))
+
+(** val check_projection :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> kername ->
+ PCUICEnvironment.mutual_inductive_body -> nat ->
+ PCUICEnvironment.one_inductive_body -> PCUICEnvironment.context ->
+ PCUICEnvironment.constructor_body -> constructor_univs -> nat ->
+ PCUICEnvironment.projection_body -> __ typing_result **)
+
+let check_projection _ _ _ mind mdecl i _ _ cdecl _ k p =
+ let _UU0393_ =
+ PCUICEnvironment.smash_context []
+ (app (PCUICEnvironment.cstr_args cdecl)
+ (PCUICEnvironment.ind_params mdecl))
+ in
+ let filtered_var =
+ nth_error _UU0393_
+ (sub
+ (PCUICEnvironment.context_assumptions
+ (PCUICEnvironment.cstr_args cdecl))
+ (S k))
+ in
+ (match filtered_var with
+ | Some decl ->
+ let decl0 = Obj.magic decl in
+ let u = abstract_instance (PCUICEnvironment.ind_universes mdecl) in
+ let ind = { inductive_mind = mind; inductive_ind = i } in
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (reflect_name decl0.decl_name.binder_name (Coq_nNamed
+ (PCUICEnvironment.proj_name p)))
+ (Msg (String.String (Coq_x50, (String.String (Coq_x72,
+ (String.String (Coq_x6f, (String.String (Coq_x6a, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x61, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x6f, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x6d, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x63, (String.String
+ (Coq_x68, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67, (String.String
+ (Coq_x75, (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x62, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x61, (String.String
+ (Coq_x6d, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (reflect_relevance decl0.decl_name.binder_relevance
+ (PCUICEnvironment.proj_relevance p))
+ (Msg (String.String (Coq_x50, (String.String (Coq_x72,
+ (String.String (Coq_x6f, (String.String (Coq_x6a, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x72,
+ (String.String (Coq_x65, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x76, (String.String (Coq_x61,
+ (String.String (Coq_x6e, (String.String (Coq_x63, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x6f, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x6d, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x63, (String.String
+ (Coq_x68, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67, (String.String
+ (Coq_x75, (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x62, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x72, (String.String (Coq_x65, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x76,
+ (String.String (Coq_x61, (String.String (Coq_x6e, (String.String
+ (Coq_x63, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (eqb_term_reflect (PCUICEnvironment.proj_type p)
+ (subst (inds mind u (PCUICEnvironment.ind_bodies mdecl)) (S
+ (PCUICEnvironment.ind_npars mdecl))
+ (subst
+ (PCUICEnvironment.projs ind
+ (PCUICEnvironment.ind_npars mdecl) k)
+ O (lift (S O) k decl0.decl_type))))
+ (Msg (String.String (Coq_x50, (String.String (Coq_x72,
+ (String.String (Coq_x6f, (String.String (Coq_x6a, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x6f, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x6d, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x63, (String.String
+ (Coq_x68, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x67, (String.String
+ (Coq_x75, (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x6e, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x79,
+ (String.String (Coq_x70, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret typing_monad __)))
+ | None -> assert false (* absurd case *))
+
+(** val monad_Alli_nth_gen_forall :
+ 'a3 coq_Monad -> 'a4 list -> nat -> (nat -> 'a4 -> __ -> 'a3) -> 'a3 **)
+
+let rec monad_Alli_nth_gen_forall m l k f =
+ match l with
+ | [] -> ret m __
+ | a :: l0 ->
+ bind m (f O a __) (fun _ ->
+ bind m
+ (monad_Alli_nth_gen_forall m l0 (S k) (fun n x _ ->
+ bind m (f (S n) x __) (fun _ -> ret m __)))
+ (fun _ -> ret m __))
+
+(** val monad_Alli_nth_forall :
+ 'a3 coq_Monad -> 'a4 list -> (nat -> 'a4 -> __ -> 'a3) -> 'a3 **)
+
+let monad_Alli_nth_forall m l f =
+ monad_Alli_nth_gen_forall m l O f
+
+(** val check_projections_cs :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> kername ->
+ PCUICEnvironment.mutual_inductive_body -> nat ->
+ PCUICEnvironment.one_inductive_body -> PCUICEnvironment.context ->
+ PCUICEnvironment.constructor_body -> constructor_univs -> __ typing_result **)
+
+let check_projections_cs cf x_impl x_ext mind mdecl i idecl indices cdecl cs =
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (eqb_ctx [] indices) (Msg (String.String (Coq_x50, (String.String
+ (Coq_x72, (String.String (Coq_x69, (String.String (Coq_x6d,
+ (String.String (Coq_x69, (String.String (Coq_x74, (String.String
+ (Coq_x69, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x72, (String.String
+ (Coq_x65, (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x64, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x61, (String.String (Coq_x6e, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x68, (String.String
+ (Coq_x61, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x64, (String.String (Coq_x69,
+ (String.String (Coq_x63, (String.String (Coq_x65, (String.String
+ (Coq_x73,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (reflect_allowed_eliminations (PCUICEnvironment.ind_kelim idecl)
+ IntoAny)
+ (Msg (String.String (Coq_x50, (String.String (Coq_x72, (String.String
+ (Coq_x69, (String.String (Coq_x6d, (String.String (Coq_x69,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x72, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x64, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x6d, (String.String (Coq_x75,
+ (String.String (Coq_x73, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x62, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x65, (String.String
+ (Coq_x6c, (String.String (Coq_x69, (String.String (Coq_x6d,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x61, (String.String (Coq_x62, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x54, (String.String (Coq_x79, (String.String
+ (Coq_x70, (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (check_eq_true (Obj.magic typing_monad) (Obj.magic monad_exc)
+ (reflect_nat (length (PCUICEnvironment.ind_projs idecl))
+ (PCUICEnvironment.context_assumptions
+ (PCUICEnvironment.cstr_args cdecl)))
+ (Msg (String.String (Coq_x49, (String.String (Coq_x6e,
+ (String.String (Coq_x76, (String.String (Coq_x61, (String.String
+ (Coq_x6c, (String.String (Coq_x69, (String.String (Coq_x64,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x75, (String.String (Coq_x6d, (String.String (Coq_x62,
+ (String.String (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x20, (String.String (Coq_x6f, (String.String (Coq_x66,
+ (String.String (Coq_x20, (String.String (Coq_x70, (String.String
+ (Coq_x72, (String.String (Coq_x6f, (String.String (Coq_x6a,
+ (String.String (Coq_x65, (String.String (Coq_x63, (String.String
+ (Coq_x74, (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind (Obj.magic typing_monad)
+ (monad_Alli_nth_forall (Obj.magic typing_monad)
+ (PCUICEnvironment.ind_projs idecl) (fun n p _ ->
+ check_projection cf x_impl x_ext mind mdecl i idecl indices cdecl
+ cs n p))
+ (fun _ -> ret (Obj.magic typing_monad) __))))
+
+(** val check_projections :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type -> kername ->
+ PCUICEnvironment.mutual_inductive_body -> nat ->
+ PCUICEnvironment.one_inductive_body -> PCUICEnvironment.context ->
+ constructor_univs list -> __ typing_result **)
+
+let check_projections cf x_impl x_ext mind mdecl i idecl indices cs =
+ let filtered_var = PCUICEnvironment.ind_projs idecl in
+ (match filtered_var with
+ | [] -> Obj.magic ret typing_monad __
+ | _ :: _ ->
+ let filtered_var0 = PCUICEnvironment.ind_ctors idecl in
+ (match filtered_var0 with
+ | [] ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x50,
+ (String.String (Coq_x72, (String.String (Coq_x6f, (String.String
+ (Coq_x6a, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x63, (String.String
+ (Coq_x61, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x6c, (String.String (Coq_x79, (String.String (Coq_x20,
+ (String.String (Coq_x62, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x6c, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x64, (String.String (Coq_x20, (String.String
+ (Coq_x66, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x69, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x67,
+ (String.String (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x72,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | cdecl :: l ->
+ (match l with
+ | [] ->
+ (match cs with
+ | [] ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x50,
+ (String.String (Coq_x72, (String.String (Coq_x6f,
+ (String.String (Coq_x6a, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x61, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x6c,
+ (String.String (Coq_x79, (String.String (Coq_x20,
+ (String.String (Coq_x62, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x64, (String.String (Coq_x20,
+ (String.String (Coq_x66, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x77, (String.String (Coq_x69,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x67, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | cs0 :: l0 ->
+ (match l0 with
+ | [] ->
+ Obj.magic bind typing_monad
+ (Obj.magic check_projections_cs cf x_impl x_ext mind mdecl
+ i idecl indices cdecl cs0)
+ (fun _ -> ret typing_monad __)
+ | _ :: _ ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x50,
+ (String.String (Coq_x72, (String.String (Coq_x6f,
+ (String.String (Coq_x6a, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x63,
+ (String.String (Coq_x61, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x6c,
+ (String.String (Coq_x79, (String.String (Coq_x20,
+ (String.String (Coq_x62, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x64, (String.String (Coq_x20,
+ (String.String (Coq_x66, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x77, (String.String (Coq_x69,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x20, (String.String (Coq_x73,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x67, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ | _ :: _ ->
+ Obj.magic raise monad_exc (Msg (String.String (Coq_x50,
+ (String.String (Coq_x72, (String.String (Coq_x6f, (String.String
+ (Coq_x6a, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x63, (String.String
+ (Coq_x61, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x6e, (String.String
+ (Coq_x6c, (String.String (Coq_x79, (String.String (Coq_x20,
+ (String.String (Coq_x62, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x6c, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x64, (String.String (Coq_x20, (String.String
+ (Coq_x66, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x20, (String.String (Coq_x61, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x77,
+ (String.String (Coq_x69, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x20, (String.String (Coq_x61,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x67,
+ (String.String (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x6f, (String.String (Coq_x72,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+(** val checkb_constructors_smaller :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ constructor_univs list -> Sort.t -> bool **)
+
+let checkb_constructors_smaller cf x_impl x_ext cs ind_sort0 =
+ forallb
+ (forallb (fun argsort ->
+ abstract_env_compare_sort cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x_ext Cumul argsort
+ ind_sort0))
+ cs
+
+(** val do_check_ind_sorts :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.context -> allowed_eliminations ->
+ PCUICEnvironment.context -> constructor_univs list -> Sort.t -> __
+ typing_result **)
+
+let do_check_ind_sorts cf x_impl x_ext params kelim indices cs ind_sort0 = match ind_sort0 with
+| Sort.Coq_sProp ->
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (allowed_eliminations_subset kelim (elim_sort_prop_ind cs)) (Msg
+ (String.String (Coq_x49, (String.String (Coq_x6e, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x72, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x6c, (String.String
+ (Coq_x6c, (String.String (Coq_x6f, (String.String (Coq_x77,
+ (String.String (Coq_x65, (String.String (Coq_x64, (String.String
+ (Coq_x5f, (String.String (Coq_x65, (String.String (Coq_x6c,
+ (String.String (Coq_x69, (String.String (Coq_x6d, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x66, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret typing_monad __)
+| Sort.Coq_sSProp ->
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (allowed_eliminations_subset kelim (elim_sort_sprop_ind cs)) (Msg
+ (String.String (Coq_x49, (String.String (Coq_x6e, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x72, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x6c, (String.String
+ (Coq_x6c, (String.String (Coq_x6f, (String.String (Coq_x77,
+ (String.String (Coq_x65, (String.String (Coq_x64, (String.String
+ (Coq_x5f, (String.String (Coq_x65, (String.String (Coq_x6c,
+ (String.String (Coq_x69, (String.String (Coq_x6d, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x6f, (String.String (Coq_x6e, (String.String (Coq_x20,
+ (String.String (Coq_x66, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ -> ret typing_monad __)
+| Sort.Coq_sType _ ->
+ Obj.magic bind typing_monad
+ (check_eq_true typing_monad monad_exc
+ (checkb_constructors_smaller cf x_impl x_ext cs ind_sort0) (Msg
+ (String.String (Coq_x49, (String.String (Coq_x6e, (String.String
+ (Coq_x63, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x72, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x64, (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x73, (String.String (Coq_x6f, (String.String
+ (Coq_x72, (String.String (Coq_x74, (String.String (Coq_x3a,
+ (String.String (Coq_x20, (String.String (Coq_x54, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x67,
+ (String.String (Coq_x75, (String.String (Coq_x6d, (String.String
+ (Coq_x65, (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x75, (String.String (Coq_x6e, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65, (String.String
+ (Coq_x72, (String.String (Coq_x73, (String.String (Coq_x65,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x6e, (String.String
+ (Coq_x6f, (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x73, (String.String (Coq_x6d, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x61, (String.String (Coq_x6e, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x65, (String.String (Coq_x64,
+ (String.String (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x64, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74, (String.String
+ (Coq_x69, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x6f, (String.String (Coq_x72, (String.String (Coq_x74,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ let filtered_var = cf.indices_matter in
+ if filtered_var
+ then bind typing_monad
+ (Obj.magic check_type_local_ctx cf x_impl x_ext params indices
+ ind_sort0)
+ (fun _ -> ret typing_monad __)
+ else ret typing_monad __)
+
+(** val check_indices :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ PCUICEnvironment.mutual_inductive_body -> kername -> term context_decl
+ list -> (coq_X_env_ext_type, __) coq_EnvCheck **)
+
+let check_indices cf x_impl x mdecl id indices =
+ let filtered_var = PCUICEnvironment.ind_variance mdecl in
+ (match filtered_var with
+ | Some v ->
+ let v0 = Obj.magic v in
+ let univs = PCUICEnvironment.ind_universes mdecl in
+ let filtered_var0 = variance_universes univs v0 in
+ (match filtered_var0 with
+ | Some p ->
+ let (p0, u') = p in
+ let (univs0, u) = p0 in
+ Obj.magic bind envcheck_monad
+ (Obj.magic make_abstract_env_ext cf x_impl x id univs0) (fun x0 ->
+ bind envcheck_monad
+ (wrap_error x0 (string_of_kername id)
+ (Obj.magic check_compare_context cf x_impl Cumul x0
+ (subst_instance PCUICEnvironment.subst_instance_context u
+ (PCUICEnvironment.expand_lets_ctx
+ (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.smash_context [] indices)))
+ (subst_instance PCUICEnvironment.subst_instance_context u'
+ (PCUICEnvironment.expand_lets_ctx
+ (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.smash_context [] indices)))))
+ (fun _ -> ret envcheck_monad __))
+ | None -> assert false (* absurd case *))
+ | None -> Obj.magic ret envcheck_monad __)
+
+(** val check_ind_types :
+ checker_flags -> abstract_env_impl -> coq_X_env_ext_type ->
+ PCUICEnvironment.mutual_inductive_body -> (coq_X_env_ext_type, __)
+ coq_EnvCheck **)
+
+let check_ind_types cf x_impl x_ext mdecl =
+ bind (Obj.magic envcheck_monad)
+ (monad_All (Obj.magic envcheck_monad) (fun ind ->
+ wrap_error x_ext (PCUICEnvironment.ind_name ind)
+ (Obj.magic infer_type_wf_env cf x_impl x_ext []
+ (PCUICEnvironment.ind_type ind)))
+ (PCUICEnvironment.ind_bodies mdecl))
+ (fun _ -> ret (Obj.magic envcheck_monad) __)
+
+(** val check_one_ind_body :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ coq_X_env_ext_type -> kername -> PCUICEnvironment.mutual_inductive_body
+ -> nat -> PCUICEnvironment.one_inductive_body -> (coq_X_env_ext_type, __)
+ coq_EnvCheck **)
+
+let check_one_ind_body cf x_impl x x_ext mind mdecl i idecl =
+ let id = string_of_kername mind in
+ bind (Obj.magic envcheck_monad)
+ (wrap_error x_ext id
+ (match destArity [] (PCUICEnvironment.ind_type idecl) with
+ | Some p -> ret (Obj.magic typing_monad) (Coq_existT (p, __))
+ | None ->
+ raise (Obj.magic monad_exc) (NotAnArity
+ (PCUICEnvironment.ind_type idecl))))
+ (fun x0 ->
+ let Coq_existT (ctxinds, _) = x0 in
+ let ctxinds0 = Obj.magic ctxinds in
+ let filtered_var =
+ split_at
+ (sub (length (fst ctxinds0))
+ (length (PCUICEnvironment.ind_params mdecl)))
+ (fst ctxinds0)
+ in
+ let (indices, params) = filtered_var in
+ Obj.magic bind envcheck_monad
+ (wrap_error x_ext id
+ (check_eq_true typing_monad monad_exc
+ (Sort.reflect_eq_sort Universe.levelexprset_reflect (snd ctxinds0)
+ (PCUICEnvironment.ind_sort idecl))
+ (Msg (String.String (Coq_x49, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x75, (String.String
+ (Coq_x63, (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x62, (String.String (Coq_x6f,
+ (String.String (Coq_x64, (String.String (Coq_x79, (String.String
+ (Coq_x20, (String.String (Coq_x73, (String.String (Coq_x6f,
+ (String.String (Coq_x72, (String.String (Coq_x74, (String.String
+ (Coq_x20, (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x65, (String.String (Coq_x73, (String.String
+ (Coq_x20, (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x20, (String.String
+ (Coq_x6d, (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x63, (String.String (Coq_x68, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x73, (String.String (Coq_x6f, (String.String (Coq_x72,
+ (String.String (Coq_x74, (String.String (Coq_x20, (String.String
+ (Coq_x6f, (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64, (String.String
+ (Coq_x75, (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x70, (String.String
+ (Coq_x65,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext id
+ (check_eq_true typing_monad monad_exc
+ (eqb_ctx params (PCUICEnvironment.ind_params mdecl)) (Msg
+ (String.String (Coq_x49, (String.String (Coq_x6e, (String.String
+ (Coq_x64, (String.String (Coq_x75, (String.String (Coq_x63,
+ (String.String (Coq_x74, (String.String (Coq_x69, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x72, (String.String
+ (Coq_x69, (String.String (Coq_x74, (String.String (Coq_x79,
+ (String.String (Coq_x20, (String.String (Coq_x70, (String.String
+ (Coq_x61, (String.String (Coq_x72, (String.String (Coq_x61,
+ (String.String (Coq_x6d, (String.String (Coq_x65, (String.String
+ (Coq_x74, (String.String (Coq_x65, (String.String (Coq_x72,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x6f, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f, (String.String
+ (Coq_x74, (String.String (Coq_x20, (String.String (Coq_x6d,
+ (String.String (Coq_x61, (String.String (Coq_x74, (String.String
+ (Coq_x63, (String.String (Coq_x68, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68, (String.String
+ (Coq_x65, (String.String (Coq_x20, (String.String (Coq_x70,
+ (String.String (Coq_x61, (String.String (Coq_x72, (String.String
+ (Coq_x61, (String.String (Coq_x6d, (String.String (Coq_x65,
+ (String.String (Coq_x74, (String.String (Coq_x65, (String.String
+ (Coq_x72, (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x6f, (String.String (Coq_x66, (String.String
+ (Coq_x20, (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x6d, (String.String (Coq_x75, (String.String (Coq_x74,
+ (String.String (Coq_x75, (String.String (Coq_x61, (String.String
+ (Coq_x6c, (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x65, (String.String (Coq_x63, (String.String
+ (Coq_x6c, (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x74, (String.String
+ (Coq_x69, (String.String (Coq_x6f, (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext id
+ (check_eq_true typing_monad monad_exc
+ (eqb_ctx indices (PCUICEnvironment.ind_indices idecl)) (Msg
+ (String.String (Coq_x49, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x75,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x61, (String.String (Coq_x72,
+ (String.String (Coq_x69, (String.String (Coq_x74,
+ (String.String (Coq_x79, (String.String (Coq_x20,
+ (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x64, (String.String (Coq_x69,
+ (String.String (Coq_x63, (String.String (Coq_x65,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x64, (String.String (Coq_x6f,
+ (String.String (Coq_x20, (String.String (Coq_x6e,
+ (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x6d,
+ (String.String (Coq_x61, (String.String (Coq_x74,
+ (String.String (Coq_x63, (String.String (Coq_x68,
+ (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65,
+ (String.String (Coq_x20, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x64,
+ (String.String (Coq_x69, (String.String (Coq_x63,
+ (String.String (Coq_x65, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x74, (String.String (Coq_x68,
+ (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x6d, (String.String (Coq_x75,
+ (String.String (Coq_x74, (String.String (Coq_x75,
+ (String.String (Coq_x61, (String.String (Coq_x6c,
+ (String.String (Coq_x20, (String.String (Coq_x64,
+ (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x6f, (String.String (Coq_x6e,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (Obj.magic check_constructors cf x_impl x x_ext mind mdecl i
+ idecl (PCUICEnvironment.ind_indices idecl))
+ (fun x1 ->
+ let Coq_existT (cs, _) = x1 in
+ bind envcheck_monad
+ (wrap_error x_ext
+ (String.append (String.String (Coq_x43, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6b, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x67,
+ (String.String (Coq_x20, (String.String (Coq_x70,
+ (String.String (Coq_x72, (String.String (Coq_x6f,
+ (String.String (Coq_x6a, (String.String (Coq_x65,
+ (String.String (Coq_x63, (String.String (Coq_x74,
+ (String.String (Coq_x69, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x20, (String.String (Coq_x6f,
+ (String.String (Coq_x66, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))
+ id)
+ (Obj.magic check_projections cf x_impl x_ext mind mdecl i
+ idecl (PCUICEnvironment.ind_indices idecl) cs))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext
+ (String.append (String.String (Coq_x43, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x63, (String.String (Coq_x6b, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String
+ (Coq_x67, (String.String (Coq_x20, (String.String
+ (Coq_x75, (String.String (Coq_x6e, (String.String
+ (Coq_x69, (String.String (Coq_x76, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String
+ (Coq_x73, (String.String (Coq_x65, (String.String
+ (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x6f, (String.String (Coq_x66, (String.String
+ (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))
+ id)
+ (Obj.magic do_check_ind_sorts cf x_impl x_ext
+ (PCUICEnvironment.ind_params mdecl)
+ (PCUICEnvironment.ind_kelim idecl)
+ (PCUICEnvironment.ind_indices idecl) cs (snd ctxinds0)))
+ (fun _ ->
+ bind envcheck_monad
+ (Obj.magic check_indices cf x_impl x mdecl mind
+ (PCUICEnvironment.ind_indices idecl))
+ (fun _ -> ret envcheck_monad __))))))))
+
+(** val check_wf_decl :
+ checker_flags -> abstract_env_impl -> coq_X_env_type ->
+ coq_X_env_ext_type -> kername -> PCUICEnvironment.global_decl ->
+ (coq_X_env_ext_type, __) coq_EnvCheck **)
+
+let check_wf_decl cf x_impl x x_ext kn = function
+| PCUICEnvironment.ConstantDecl cst ->
+ let cst0 = Obj.magic cst in
+ let filtered_var = PCUICEnvironment.cst_body cst0 in
+ (match filtered_var with
+ | Some term0 ->
+ Obj.magic bind envcheck_monad
+ (Obj.magic check_wf_judgement cf x_impl kn x_ext term0
+ (PCUICEnvironment.cst_type cst0))
+ (fun _ -> ret envcheck_monad __)
+ | None ->
+ Obj.magic bind envcheck_monad
+ (Obj.magic check_wf_type cf x_impl kn x_ext
+ (PCUICEnvironment.cst_type cst0))
+ (fun _ -> ret envcheck_monad __))
+| PCUICEnvironment.InductiveDecl mdecl ->
+ let mdecl0 = Obj.magic mdecl in
+ let id = string_of_kername kn in
+ Obj.magic bind envcheck_monad
+ (Obj.magic check_variance cf x_impl x kn
+ (PCUICEnvironment.ind_universes mdecl0)
+ (PCUICEnvironment.ind_variance mdecl0))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext id
+ (Obj.magic check_context_wf_env cf x_impl x_ext
+ (PCUICEnvironment.ind_params mdecl0)))
+ (fun _ ->
+ bind envcheck_monad
+ (wrap_error x_ext id
+ (check_eq_nat typing_monad monad_exc
+ (PCUICEnvironment.context_assumptions
+ (PCUICEnvironment.ind_params mdecl0))
+ (PCUICEnvironment.ind_npars mdecl0) (Msg (String.String (Coq_x77,
+ (String.String (Coq_x72, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x67, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x75, (String.String
+ (Coq_x6d, (String.String (Coq_x62, (String.String (Coq_x65,
+ (String.String (Coq_x72, (String.String (Coq_x20, (String.String
+ (Coq_x6f, (String.String (Coq_x66, (String.String (Coq_x20,
+ (String.String (Coq_x70, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x61, (String.String (Coq_x6d,
+ (String.String (Coq_x65, (String.String (Coq_x74, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x73,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ bind envcheck_monad
+ (Obj.magic check_ind_types cf x_impl x_ext mdecl0) (fun _ ->
+ bind envcheck_monad
+ (monad_Alli_nth_forall envcheck_monad
+ (PCUICEnvironment.ind_bodies mdecl0) (fun i oib _ ->
+ Obj.magic check_one_ind_body cf x_impl x x_ext kn mdecl0 i oib))
+ (fun _ -> ret envcheck_monad __)))))
+
+(** val check_univs :
+ checker_flags -> abstract_env_impl -> ContextSet.t ->
+ Environment.Retroknowledge.t -> (coq_X_env_ext_type, coq_X_env_type)
+ coq_EnvCheck **)
+
+let check_univs cf x_impl univs retro =
+ let id = String.String (Coq_x74, (String.String (Coq_x6f, (String.String
+ (Coq_x70, (String.String (Coq_x6c, (String.String (Coq_x65,
+ (String.String (Coq_x76, (String.String (Coq_x65, (String.String
+ (Coq_x6c, String.EmptyString)))))))))))))))
+ in
+ let levels0 = ContextSet.levels univs in
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc) (LevelSet.mem Level.Coq_lzero levels0)
+ (fun _ -> ((abstract_env_ext_empty cf x_impl), (IllFormedDecl (id, (Msg
+ (String.append (String.String (Coq_x53, (String.String (Coq_x65,
+ (String.String (Coq_x74, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x69, (String.String
+ (Coq_x6e, (String.String (Coq_x20, (String.String (Coq_x74,
+ (String.String (Coq_x68, (String.String (Coq_x65, (String.String
+ (Coq_x20, (String.String (Coq_x67, (String.String (Coq_x6c,
+ (String.String (Coq_x6f, (String.String (Coq_x62, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String (Coq_x20,
+ (String.String (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x6c,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (print_lset levels0))))))))
+ (fun _ ->
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ (LevelSet.for_all (fun l -> negb (Level.is_var l)) levels0) (fun _ ->
+ ((abstract_env_ext_empty cf x_impl), (IllFormedDecl (id, (Msg
+ (String.append (String.String (Coq_x76, (String.String (Coq_x61,
+ (String.String (Coq_x72, (String.String (Coq_x69, (String.String
+ (Coq_x61, (String.String (Coq_x62, (String.String (Coq_x6c,
+ (String.String (Coq_x65, (String.String (Coq_x20, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x6c, (String.String
+ (Coq_x20, (String.String (Coq_x69, (String.String (Coq_x6e,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x68, (String.String (Coq_x65, (String.String (Coq_x20,
+ (String.String (Coq_x67, (String.String (Coq_x6c, (String.String
+ (Coq_x6f, (String.String (Coq_x62, (String.String (Coq_x61,
+ (String.String (Coq_x6c, (String.String (Coq_x20, (String.String
+ (Coq_x6c, (String.String (Coq_x65, (String.String (Coq_x76,
+ (String.String (Coq_x65, (String.String (Coq_x6c, (String.String
+ (Coq_x73, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (print_lset levels0))))))))
+ (fun _ ->
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ (ConstraintSet.for_all (fun c ->
+ (&&) (LevelSet.mem (fst (fst c)) levels0)
+ (LevelSet.mem (snd c) levels0))
+ (ContextSet.constraints univs))
+ (fun _ -> ((abstract_env_ext_empty cf x_impl), (IllFormedDecl (id,
+ (Msg
+ (String.append (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x20, (String.String
+ (Coq_x64, (String.String (Coq_x65, (String.String (Coq_x63,
+ (String.String (Coq_x6c, (String.String (Coq_x61, (String.String
+ (Coq_x72, (String.String (Coq_x65, (String.String (Coq_x64,
+ (String.String (Coq_x20, (String.String (Coq_x6c, (String.String
+ (Coq_x65, (String.String (Coq_x76, (String.String (Coq_x65,
+ (String.String (Coq_x6c, (String.String (Coq_x20, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x20,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))
+ (String.append (print_lset levels0)
+ (String.append (String.String (Coq_x20, (String.String
+ (Coq_x7c, (String.String (Coq_x3d, (String.String (Coq_x20,
+ String.EmptyString))))))))
+ (print_constraint_set (ContextSet.constraints univs)))))))))))
+ (fun _ ->
+ match gc_of_uctx cf univs with
+ | Some uctx ->
+ bind (Obj.magic envcheck_monad)
+ (check_eq_true_lazy (Obj.magic envcheck_monad)
+ (Obj.magic envcheck_monad_exc)
+ (abstract_env_is_consistent_empty cf x_impl uctx) (fun _ ->
+ ((abstract_env_ext_empty cf x_impl), (IllFormedDecl (id, (Msg
+ (String.String (Coq_x63, (String.String (Coq_x6f,
+ (String.String (Coq_x6e, (String.String (Coq_x73,
+ (String.String (Coq_x74, (String.String (Coq_x72,
+ (String.String (Coq_x61, (String.String (Coq_x69,
+ (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20,
+ (String.String (Coq_x6e, (String.String (Coq_x6f,
+ (String.String (Coq_x74, (String.String (Coq_x20,
+ (String.String (Coq_x73, (String.String (Coq_x61,
+ (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x66,
+ (String.String (Coq_x69, (String.String (Coq_x61,
+ (String.String (Coq_x62, (String.String (Coq_x6c,
+ (String.String (Coq_x65,
+ String.EmptyString))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+ (fun _ ->
+ ret (Obj.magic envcheck_monad)
+ (abstract_env_init cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) univs retro))
+ | None ->
+ raise (Obj.magic envcheck_monad_exc)
+ ((abstract_env_ext_empty cf x_impl), (IllFormedDecl (id, (Msg
+ (String.String (Coq_x63, (String.String (Coq_x6f, (String.String
+ (Coq_x6e, (String.String (Coq_x73, (String.String (Coq_x74,
+ (String.String (Coq_x72, (String.String (Coq_x61, (String.String
+ (Coq_x69, (String.String (Coq_x6e, (String.String (Coq_x74,
+ (String.String (Coq_x73, (String.String (Coq_x20, (String.String
+ (Coq_x74, (String.String (Coq_x72, (String.String (Coq_x69,
+ (String.String (Coq_x76, (String.String (Coq_x69, (String.String
+ (Coq_x61, (String.String (Coq_x6c, (String.String (Coq_x6c,
+ (String.String (Coq_x79, (String.String (Coq_x20, (String.String
+ (Coq_x6e, (String.String (Coq_x6f, (String.String (Coq_x74,
+ (String.String (Coq_x20, (String.String (Coq_x73, (String.String
+ (Coq_x61, (String.String (Coq_x74, (String.String (Coq_x69,
+ (String.String (Coq_x73, (String.String (Coq_x66, (String.String
+ (Coq_x69, (String.String (Coq_x61, (String.String (Coq_x62,
+ (String.String (Coq_x6c, (String.String (Coq_x65,
+ String.EmptyString)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
+
+(** val check_wf_decls :
+ checker_flags -> abstract_env_impl -> ContextSet.t ->
+ Environment.Retroknowledge.t -> PCUICEnvironment.global_declarations ->
+ (coq_X_env_ext_type, coq_X_env_type) coq_EnvCheck **)
+
+let check_wf_decls cf x_impl univs retro decls =
+ let rec check_wf_decls0 univs0 retro0 = function
+ | [] ->
+ Obj.magic (fun _ ->
+ bind envcheck_monad (Obj.magic check_univs cf x_impl univs0 retro0)
+ (fun x -> ret envcheck_monad x))
+ | d :: decls1 ->
+ let d0 = Obj.magic d in
+ let decls2 = Obj.magic decls1 in
+ Obj.magic (fun _ ->
+ bind envcheck_monad (Obj.magic check_wf_decls0 univs0 retro0 decls2 __)
+ (fun x ->
+ bind envcheck_monad (Obj.magic check_fresh cf x_impl (fst d0) decls2)
+ (fun _ ->
+ let udecl = universes_decl_of_decl (snd d0) in
+ bind envcheck_monad
+ (Obj.magic make_abstract_env_ext cf x_impl x (fst d0) udecl)
+ (fun x' ->
+ bind envcheck_monad
+ (Obj.magic check_wf_decl cf x_impl x x' (fst d0) (snd d0))
+ (fun _ ->
+ ret envcheck_monad
+ (abstract_env_add_decl cf
+ (abstract_env_impl_abstract_env_struct cf x_impl) x
+ (fst d0) (snd d0)))))))
+ in check_wf_decls0 univs retro decls __
+
+(** val check_wf_env :
+ checker_flags -> abstract_env_impl -> PCUICEnvironment.global_env ->
+ (coq_X_env_ext_type, coq_X_env_type) coq_EnvCheck **)
+
+let check_wf_env cf x_impl _UU03a3_ =
+ bind (Obj.magic envcheck_monad)
+ (check_wf_decls cf x_impl (PCUICEnvironment.universes _UU03a3_)
+ (PCUICEnvironment.retroknowledge _UU03a3_)
+ (PCUICEnvironment.declarations _UU03a3_))
+ (fun x -> ret (Obj.magic envcheck_monad) x)
+
+(** val check_wf_ext :
+ checker_flags -> abstract_env_impl -> PCUICEnvironment.global_env_ext ->
+ (coq_X_env_ext_type, coq_X_env_ext_type) coq_EnvCheck **)
+
+let check_wf_ext cf x_impl _UU03a3_ =
+ bind (Obj.magic envcheck_monad) (check_wf_env cf x_impl (fst _UU03a3_))
+ (fun x ->
+ bind (Obj.magic envcheck_monad)
+ (make_abstract_env_ext cf x_impl x ((MPfile []), (String.String
+ (Coq_x74, (String.String (Coq_x6f, (String.String (Coq_x70,
+ (String.String (Coq_x6c, (String.String (Coq_x65, (String.String
+ (Coq_x76, (String.String (Coq_x65, (String.String (Coq_x6c,
+ (String.String (Coq_x20, (String.String (Coq_x74, (String.String
+ (Coq_x65, (String.String (Coq_x72, (String.String (Coq_x6d,
+ String.EmptyString))))))))))))))))))))))))))) (snd _UU03a3_))
+ (fun x' -> ret (Obj.magic envcheck_monad) x'))
+
+type 'a coq_EnvCheck_X_env_ext_type = (coq_X_env_ext_type, 'a) coq_EnvCheck
+
+(** val coq_Monad_EnvCheck_X_env_ext_type :
+ checker_flags -> abstract_env_impl -> checker_flags -> __
+ coq_EnvCheck_X_env_ext_type coq_Monad **)
+
+let coq_Monad_EnvCheck_X_env_ext_type _ _ _ =
+ envcheck_monad
+
+(** val typecheck_program :
+ checker_flags -> abstract_env_impl -> PCUICEnvironment.program ->
+ universes_decl -> (term, coq_X_env_ext_type) sigT
+ coq_EnvCheck_X_env_ext_type **)
+
+let typecheck_program cf x_impl p _UU03c6_ =
+ bind (Obj.magic coq_Monad_EnvCheck_X_env_ext_type cf x_impl cf)
+ (Obj.magic check_wf_ext cf x_impl ((fst p), _UU03c6_)) (fun x ->
+ let xx = Obj.magic x in
+ Obj.magic bind (coq_Monad_EnvCheck_X_env_ext_type cf x_impl cf)
+ (Obj.magic infer_term cf x_impl xx (snd p)) (fun inft ->
+ ret (coq_Monad_EnvCheck_X_env_ext_type cf x_impl cf) (Coq_existT
+ ((projT1 inft), xx))))
diff --git a/safechecker-plugin/theories/SafeTemplateChecker.v b/safechecker-plugin/theories/SafeTemplateChecker.v
index 511756ec2..dfd62101a 100644
--- a/safechecker-plugin/theories/SafeTemplateChecker.v
+++ b/safechecker-plugin/theories/SafeTemplateChecker.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Program.
+From Stdlib Require Import Program.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Template Require Import AstUtils.
diff --git a/safechecker/Makefile b/safechecker/Makefile
index 8cf42221e..94c116aa2 100644
--- a/safechecker/Makefile
+++ b/safechecker/Makefile
@@ -5,7 +5,7 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.safechecker: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.safechecker $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.safechecker $(DEPS)
theory: Makefile.safechecker
$(MAKE) -f Makefile.safechecker
diff --git a/safechecker/theories/PCUICEqualityDec.v b/safechecker/theories/PCUICEqualityDec.v
index 40014fa3b..c699262c0 100644
--- a/safechecker/theories/PCUICEqualityDec.v
+++ b/safechecker/theories/PCUICEqualityDec.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ProofIrrelevance ssreflect ssrbool btauto.Algebra.
+From Stdlib Require Import ProofIrrelevance ssreflect ssrbool btauto.Algebra.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICPrimitive PCUICTactics
@@ -7,7 +7,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICPrimitive PCUICTac
PCUICCumulativity PCUICEquality PCUICWfUniverses
PCUICInduction.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Local Set Keyed Unification.
diff --git a/safechecker/theories/PCUICErrors.v b/safechecker/theories/PCUICErrors.v
index bc31cc2d6..ae1c364d0 100644
--- a/safechecker/theories/PCUICErrors.v
+++ b/safechecker/theories/PCUICErrors.v
@@ -4,7 +4,7 @@ From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICPretty.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Local Set Keyed Unification.
Set Equations Transparent.
diff --git a/safechecker/theories/PCUICRetypingEnvIrrelevance.v b/safechecker/theories/PCUICRetypingEnvIrrelevance.v
index 58125bc06..0fc76e61f 100644
--- a/safechecker/theories/PCUICRetypingEnvIrrelevance.v
+++ b/safechecker/theories/PCUICRetypingEnvIrrelevance.v
@@ -1,10 +1,10 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool Utf8.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool Utf8.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
-From Coq Require Import Bool String List Program.
+From Stdlib Require Import Bool String List Program.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICTyping PCUICValidity PCUICSN
diff --git a/safechecker/theories/PCUICSafeChecker.v b/safechecker/theories/PCUICSafeChecker.v
index 9a43e0a71..48dd97e8e 100644
--- a/safechecker/theories/PCUICSafeChecker.v
+++ b/safechecker/theories/PCUICSafeChecker.v
@@ -21,13 +21,13 @@ From MetaCoq.SafeChecker Require Import PCUICEqualityDec PCUICSafeReduce PCUICEr
PCUICSafeConversion PCUICWfReduction PCUICWfEnv PCUICTypeChecker.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Local Set Keyed Unification.
Set Equations Transparent.
Import MCMonadNotation.
-Require Import Morphisms.
+From Stdlib Require Import Morphisms.
Implicit Types (cf : checker_flags).
@@ -555,7 +555,7 @@ Section CheckEnv.
Program Definition wf_env_check_cumul_decl X_ext {normalization_in : forall Σ, wf_ext Σ -> Σ ∼_ext X_ext -> NormalizationIn Σ} le Γ d d' :=
check_ws_cumul_pb_decl X_impl X_ext le Γ d d'.
- Program Fixpoint wf_env_check_ws_cumul_ctx (le : conv_pb) X_ext {normalization_in : forall Σ, wf_ext Σ -> Σ ∼_ext X_ext -> NormalizationIn Σ} Γ Δ Δ'
+ Program Definition wf_env_check_ws_cumul_ctx (le : conv_pb) X_ext {normalization_in : forall Σ, wf_ext Σ -> Σ ∼_ext X_ext -> NormalizationIn Σ} Γ Δ Δ'
(wfΔ : forall Σ, abstract_env_ext_rel X_ext Σ -> ∥ wf_local Σ (Γ ,,, Δ) ∥)
(wfΔ' : forall Σ, abstract_env_ext_rel X_ext Σ -> ∥ wf_local Σ (Γ ,,, Δ') ∥) :
typing_result (forall Σ, abstract_env_ext_rel X_ext Σ -> ∥ ws_cumul_ctx_pb_rel le Σ Γ Δ Δ' ∥) :=
diff --git a/safechecker/theories/PCUICSafeConversion.v b/safechecker/theories/PCUICSafeConversion.v
index a4ebfc55a..0fea4a8b7 100644
--- a/safechecker/theories/PCUICSafeConversion.v
+++ b/safechecker/theories/PCUICSafeConversion.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ProofIrrelevance ssreflect ssrbool.
+From Stdlib Require Import ProofIrrelevance ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -13,7 +13,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
PCUICClosed PCUICClosedTyp PCUICConvCumInversion .
From MetaCoq.SafeChecker Require Import PCUICErrors PCUICWfEnv PCUICSafeReduce PCUICEqualityDec.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Local Set Keyed Unification.
diff --git a/safechecker/theories/PCUICSafeReduce.v b/safechecker/theories/PCUICSafeReduce.v
index e434d90dc..44e2d87db 100644
--- a/safechecker/theories/PCUICSafeReduce.v
+++ b/safechecker/theories/PCUICSafeReduce.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import RelationClasses.
+From Stdlib Require Import RelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
@@ -13,7 +13,7 @@ From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils
From MetaCoq.SafeChecker Require Import PCUICErrors PCUICWfReduction PCUICWfEnv.
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Equations Transparent.
Set Equations With UIP.
diff --git a/safechecker/theories/PCUICSafeRetyping.v b/safechecker/theories/PCUICSafeRetyping.v
index 467e12876..95fd610ba 100644
--- a/safechecker/theories/PCUICSafeRetyping.v
+++ b/safechecker/theories/PCUICSafeRetyping.v
@@ -1,9 +1,9 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool Utf8.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool Utf8.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
-From Coq Require Import Bool String List Program.
+From Stdlib Require Import Bool String List Program.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import config uGraph.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICTactics PCUICArities PCUICInduction
@@ -40,7 +40,7 @@ Set Equations Transparent.
Add Search Blacklist "_graph_mut".
Add Search Blacklist "obligation".
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Lemma into_ws_cumul_pb_terms_Algo {cf : checker_flags} {Σ : global_env_ext} {wfΣ : wf Σ} {Γ l l'} :
All2 (convAlgo Σ Γ) l l' ->
diff --git a/safechecker/theories/PCUICTypeChecker.v b/safechecker/theories/PCUICTypeChecker.v
index 21af8b0e2..b7cd6b108 100644
--- a/safechecker/theories/PCUICTypeChecker.v
+++ b/safechecker/theories/PCUICTypeChecker.v
@@ -24,7 +24,7 @@ From MetaCoq.SafeChecker Require Import PCUICEqualityDec PCUICSafeReduce PCUICEr
PCUICSafeConversion PCUICWfReduction PCUICWfEnv.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Stdlib Require Import Program.
Local Set Keyed Unification.
diff --git a/safechecker/theories/PCUICWfEnv.v b/safechecker/theories/PCUICWfEnv.v
index d46644153..1c7a58e69 100644
--- a/safechecker/theories/PCUICWfEnv.v
+++ b/safechecker/theories/PCUICWfEnv.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph EnvMap.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICEquality PCUICReduction
@@ -162,9 +162,9 @@ Proof.
now rewrite (abstract_env_irr X H H0).
Defined.
-Require Import MSetFacts.
+From Stdlib Require Import MSetFacts.
-Require Import Morphisms.
+From Stdlib Require Import Morphisms.
Global Instance consistent_proper : Proper (CS.Equal ==> iff) consistent.
Proof.
diff --git a/safechecker/theories/PCUICWfEnvImpl.v b/safechecker/theories/PCUICWfEnvImpl.v
index d857c218b..aa478ffb2 100644
--- a/safechecker/theories/PCUICWfEnvImpl.v
+++ b/safechecker/theories/PCUICWfEnvImpl.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config uGraph EnvMap.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICEquality PCUICReduction
diff --git a/safechecker/theories/PCUICWfReduction.v b/safechecker/theories/PCUICWfReduction.v
index 1452b7933..8e88938a3 100644
--- a/safechecker/theories/PCUICWfReduction.v
+++ b/safechecker/theories/PCUICWfReduction.v
@@ -13,7 +13,7 @@ From MetaCoq.SafeChecker Require Import PCUICWfEnv.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
Local Set Keyed Unification.
Set Equations Transparent.
diff --git a/template-coq/META.coq-metacoq-template-ocaml b/template-coq/META.coq-metacoq-template-ocaml
index 043216915..664db5cd0 100644
--- a/template-coq/META.coq-metacoq-template-ocaml
+++ b/template-coq/META.coq-metacoq-template-ocaml
@@ -10,4 +10,4 @@ package "plugin" (
plugin(native) = "metacoq_template_plugin.cmxs"
)
-directory = "."
\ No newline at end of file
+directory = "."
diff --git a/template-coq/Makefile b/template-coq/Makefile
index 972ccdc11..da23ab2b8 100644
--- a/template-coq/Makefile
+++ b/template-coq/Makefile
@@ -14,15 +14,15 @@ _TemplateCoqProject: _TemplateCoqProject.in metacoq-config
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
Makefile.plugin: _PluginProject
- coq_makefile -f _PluginProject -o Makefile.plugin
+ rocq makefile -f _PluginProject -o Makefile.plugin
# Avoid conflicting dependency file creation for the template plugin
sed -e s/coqdeps/coqdeps.plugin/g Makefile.plugin > Makefile.plugin.tmp && mv -f Makefile.plugin.tmp Makefile.plugin
Makefile.template: _TemplateCoqProject
- coq_makefile -f _TemplateCoqProject -o Makefile.template
+ rocq makefile -f _TemplateCoqProject -o Makefile.template
# Avoid conflicting dependency file creation for the template plugin
sed -e s/coqdeps/coqdeps.template/g Makefile.template > Makefile.template.tmp && mv -f Makefile.template.tmp Makefile.template
diff --git a/template-coq/_TemplateCoqProject.in b/template-coq/_TemplateCoqProject.in
index e397f8a22..8b79cdf37 100644
--- a/template-coq/_TemplateCoqProject.in
+++ b/template-coq/_TemplateCoqProject.in
@@ -24,6 +24,7 @@ src/plugin_core.mli
src/plugin_core.ml
theories/Loader.v
+theories/Lib.v
theories/All.v
# A checker of well-formedness in MetaCoq and Coq
diff --git a/template-coq/src/constr_reification.ml b/template-coq/src/constr_reification.ml
index d56ead567..927e0d969 100644
--- a/template-coq/src/constr_reification.ml
+++ b/template-coq/src/constr_reification.ml
@@ -55,13 +55,13 @@ struct
let resolve (tm : string) : Constr.t Lazy.t =
lazy (
- let tm_ref = Coqlib.lib_ref tm in
+ let tm_ref = Rocqlib.lib_ref tm in
UnivGen.constr_of_monomorphic_global (Global.env ()) tm_ref
)
(* gen_constant_in_modules contrib_name [path] tm *)
let resolve_ref (tm : string) : Names.GlobRef.t Lazy.t =
- lazy (Coqlib.lib_ref tm)
+ lazy (Rocqlib.lib_ref tm)
let ast s = resolve ("metacoq.ast." ^ s)
let template s = resolve ("metacoq.template." ^ s)
diff --git a/template-coq/src/genbytes.ml b/template-coq/src/genbytes.ml
index 6a39256cb..bcb642787 100644
--- a/template-coq/src/genbytes.ml
+++ b/template-coq/src/genbytes.ml
@@ -1,7 +1,7 @@
-(*
+(*
Printf.printf "let int_of_byte = \n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "| Coq_x%02x -> %i\n" i i
done *)
(*
@@ -9,30 +9,30 @@ Printf.printf "open Byte\n";;
Printf.printf "let char_of_byte = function\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "| Coq_x%02x -> '\\%03i'\n" i i
done;;
Printf.printf "let byte_of_char = function\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "| '\\%03i' -> Coq_x%02x\n" i i
done;;
*)
(*
-Printf.printf "From Coq Require Import Byte.\n\n";;
+Printf.printf "From Stdlib Require Import Byte.\n\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "Definition is_byte_x%02x (b : byte) := match b with | x%02x => true | _ => false end.\n" i i
done;;
Printf.printf "Definition eqb (b b' : byte) :=\n match b with\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf " | x%02x => is_byte_x%02x b'\n" i i
done;;
Printf.printf" end.\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "Definition compare_byte_x%02x (b : byte) :=\n" i;
Printf.printf " match b with\n";
if i != 0 then Printf.printf " ";
@@ -48,13 +48,13 @@ done;;
Printf.printf "Definition compare (b b' : byte) :=\n match b with\n";;
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf " | x%02x => compare_byte_x%02x b'\n" i i
done;;
Printf.printf" end.\n";;
*)
-for i = 0 to 255 do
+for i = 0 to 255 do
Printf.printf "| x%02x -> <%%x%02x%%>\n" i i
done
diff --git a/template-coq/src/template_monad.ml b/template-coq/src/template_monad.ml
index ea43aa855..83026245f 100644
--- a/template-coq/src/template_monad.ml
+++ b/template-coq/src/template_monad.ml
@@ -3,7 +3,7 @@ open GlobRef
open Pp
let resolve (tm : string) : GlobRef.t Lazy.t =
- lazy (Coqlib.lib_ref tm)
+ lazy (Rocqlib.lib_ref tm)
let r_template_monad_prop_p s = resolve ("metacoq.templatemonad.prop." ^ s)
let r_template_monad_type_p s = resolve ("metacoq.templatemonad.type." ^ s)
diff --git a/template-coq/src/tm_util.ml b/template-coq/src/tm_util.ml
index 4004601ef..73e974a21 100644
--- a/template-coq/src/tm_util.ml
+++ b/template-coq/src/tm_util.ml
@@ -4,7 +4,7 @@ let contrib_name = "template-coq"
let gen_constant_in_modules s =
lazy (
- let tm_ref = Coqlib.lib_ref s in
+ let tm_ref = Rocqlib.lib_ref s in
UnivGen.constr_of_monomorphic_global (Global.env ()) tm_ref
)
(* lazy (Universes.constr_of_global (Coqlib.gen_reference_in_modules locstr dirs s)) *)
diff --git a/template-coq/theories/All.v b/template-coq/theories/All.v
index da3efc961..02d712423 100644
--- a/template-coq/theories/All.v
+++ b/template-coq/theories/All.v
@@ -16,4 +16,5 @@ From MetaCoq.Template Require Export
UnivSubst (* Substitution of universe instances *)
Typing (* Typing judgment *)
TemplateMonad (* The TemplateMonad *)
- Loader (* The plugin *).
+ Loader (* The plugin *)
+ Lib (* Meta-programming facilities *).
\ No newline at end of file
diff --git a/template-coq/theories/Ast.v b/template-coq/theories/Ast.v
index aa70608f6..6f36b1e8d 100644
--- a/template-coq/theories/Ast.v
+++ b/template-coq/theories/Ast.v
@@ -3,8 +3,8 @@ From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Export Environment EnvironmentTyping Universes BasicAst.
(* For primitive integers and floats *)
-From Coq Require Uint63 Floats.PrimFloat Floats.SpecFloat PArray PrimString.
-From Coq Require Import ssreflect Morphisms.
+From Stdlib Require Uint63 Floats.PrimFloat Floats.SpecFloat PArray PrimString.
+From Stdlib Require Import ssreflect Morphisms.
(** * AST of Coq kernel terms and kernel data structures
diff --git a/template-coq/theories/AstUtils.v b/template-coq/theories/AstUtils.v
index 13a19a57b..b48d54def 100644
--- a/template-coq/theories/AstUtils.v
+++ b/template-coq/theories/AstUtils.v
@@ -1,11 +1,13 @@
(* For primitive integers and floats *)
-From Coq Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat.
+From Stdlib Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat.
(* Distributed under the terms of the MIT license. *)
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Import BasicAst Primitive Environment.
From MetaCoq.Template Require Import Ast.
-Require Import ssreflect ssrbool.
-Require Import ZArith.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require Import ZArith.
+
+#[local] Set Universe Polymorphism.
(** Raw term printing *)
@@ -464,3 +466,254 @@ Ltac nth_leb_simpl :=
replace n' with n in H' by lia; rewrite -> H in H'; injection H'; intros; subst
| _ => lia || congruence || solve [repeat (f_equal; try lia)]
end.
+
+(** * Traversal functions. *)
+
+Section TraverseWithBinders.
+Context {Acc : Type} {A : Type} (a : A) (lift : aname -> A -> A).
+
+Definition lift_names : list aname -> A -> A :=
+ fun names a => List.fold_right lift a names.
+
+Definition map_predicate_with_binders (f : A -> term -> term) (p : predicate term) : predicate term :=
+ let a_return := lift_names p.(pcontext) a in
+ {| puinst := p.(puinst)
+ ; pparams := List.map (f a) p.(pparams)
+ ; pcontext := p.(pcontext)
+ ; preturn := f a_return p.(preturn) |}.
+
+Definition map_branch_with_binders (f : A -> term -> term) (b : branch term) : branch term :=
+ let a_body := lift_names b.(bcontext) a in
+ {| bcontext := b.(bcontext) ; bbody := f a_body b.(bbody) |}.
+
+(** [map_term_with_binders a lift f t] maps [f] on the immediate subterms of [t].
+ It carries an extra data [a] (typically a lift index) which is processed by [lift]
+ (which typically add 1 to [a]) at each binder traversal.
+ It is not recursive and the order in which subterms are processed is not specified. *)
+Definition map_term_with_binders (f : A -> term -> term) (t : term) : term :=
+ match t with
+ | tRel _ | tVar _ | tSort _ | tConst _ _ | tInd _ _ | tConstruct _ _ _ | tInt _ | tFloat _ | tString _ => t
+ | tEvar n ts => tEvar n (List.map (f a) ts)
+ | tCast b k t => tCast (f a b) k (f a t)
+ | tProd name ty body => tProd name (f a ty) (f (lift name a) body)
+ | tLambda name ty body => tLambda name (f a ty) (f (lift name a) body)
+ | tLetIn name def ty body => tLetIn name (f a def) (f a ty) (f (lift name a) body)
+ | tApp func args => tApp (f a func) (List.map (f a) args)
+ | tProj proj t => tProj proj (f a t)
+ (* For [tFix] and [tCoFix] we have to take care to lift [a]
+ only when processing the body of the (co)fixpoint. *)
+ | tFix defs i =>
+ let a_body := lift_names (List.map dname defs) a in
+ let on_def := map_def (f a) (f a_body) in
+ tFix (List.map on_def defs) i
+ | tCoFix defs i =>
+ let a_body := lift_names (List.map dname defs) a in
+ let on_def := map_def (f a) (f a_body) in
+ tCoFix (List.map on_def defs) i
+ | tCase ci pred x branches =>
+ tCase ci (map_predicate_with_binders f pred) (f a x) (List.map (map_branch_with_binders f) branches)
+ | tArray l t def ty => tArray l (List.map (f a) t) (f a def) (f a ty)
+ end.
+
+Definition fold_predicate_with_binders (f : A -> Acc -> term -> Acc) (acc : Acc) (p : predicate term) : Acc :=
+ let a_return := lift_names p.(pcontext) a in
+ let acc := List.fold_left (f a) p.(pparams) acc in
+ f a_return acc p.(preturn).
+
+Definition fold_branch_with_binders (f : A -> Acc -> term -> Acc) (acc : Acc) (b : branch term) : Acc :=
+ let a_body := lift_names b.(bcontext) a in
+ f a_body acc b.(bbody).
+
+(** Fold version of [map_term_with_binders]. *)
+Definition fold_term_with_binders (f : A -> Acc -> term -> Acc) (acc : Acc) (t : term) : Acc :=
+ match t with
+ | tRel _ | tVar _ | tSort _ | tConst _ _ | tInd _ _
+ | tConstruct _ _ _ | tInt _ | tFloat _ | tString _ => acc
+ | tEvar n ts => List.fold_left (f a) ts acc
+ | tCast b k t => let acc := f a acc b in f a acc t
+ | tProd name ty body => let acc := f a acc ty in f (lift name a) acc body
+ | tLambda name ty body => let acc := f a acc ty in f (lift name a) acc body
+ | tLetIn name def ty body =>
+ let acc := f a acc def in
+ let acc := f a acc ty in
+ f (lift name a) acc body
+ | tApp func args => List.fold_left (f a) (func :: args) acc
+ | tProj proj t => f a acc t
+ | tFix defs i =>
+ let a_body := lift_names (List.map dname defs) a in
+ let acc := List.fold_left (f a) (List.map dtype defs) acc in
+ List.fold_left (f a_body) (List.map dbody defs) acc
+ | tCoFix defs i =>
+ let a_body := lift_names (List.map dname defs) a in
+ let acc := List.fold_left (f a) (List.map dtype defs) acc in
+ List.fold_left (f a_body) (List.map dbody defs) acc
+ | tCase ci pred x branches =>
+ let acc := fold_predicate_with_binders f acc pred in
+ let acc := f a acc x in
+ List.fold_left (fold_branch_with_binders f) branches acc
+ | tArray l t def ty =>
+ let acc := List.fold_left (f a) t acc in
+ let acc := f a acc def in
+ f a acc ty
+ end.
+
+End TraverseWithBinders.
+
+Section TraverseWithBindersM.
+Import MCMonadNotation.
+
+Context {M : Type -> Type} `{Monad M} {Acc : Type} {A : Type} {a : A} {liftM : aname -> A -> M A}.
+
+Definition lift_namesM (names : list aname) (a : A) : M A :=
+ let fix loop names a :=
+ match names with
+ | [] => ret a
+ | n :: names => loop names =<< liftM n a
+ end
+ in
+ loop (List.rev names) a.
+
+Definition map_defM {A B} (tyf bodyf : A -> M B) (d : def A) : M (def B) :=
+ mlet dtype <- tyf d.(dtype) ;;
+ mlet dbody <- bodyf d.(dbody) ;;
+ ret (mkdef _ d.(dname) dtype dbody d.(rarg)).
+
+Definition map_predicate_with_bindersM (f : A -> term -> M term) (p : predicate term) : M (predicate term) :=
+ mlet a_return <- lift_namesM p.(pcontext) a ;;
+ mlet pparams <- monad_map (f a) p.(pparams) ;;
+ mlet preturn <- f a_return p.(preturn) ;;
+ ret (mk_predicate p.(puinst) pparams p.(pcontext) preturn).
+
+Definition map_branch_with_bindersM (f : A -> term -> M term) (b : branch term) : M (branch term) :=
+ mlet a_body <- lift_namesM b.(bcontext) a ;;
+ mlet bbody <- f a_body b.(bbody) ;;
+ ret (mk_branch b.(bcontext) bbody).
+
+(** Monadic variant of [map_term_with_binders]. *)
+Definition map_term_with_bindersM (f : A -> term -> M term) (t : term) : M term :=
+ match t with
+ | tRel _ | tVar _ | tSort _ | tConst _ _ | tInd _ _
+ | tConstruct _ _ _ | tInt _ | tFloat _ | tString _ => ret t
+ | tEvar n ts =>
+ mlet ts <- monad_map (f a) ts ;;
+ ret (tEvar n ts)
+ | tCast b k t =>
+ mlet b <- f a b ;;
+ mlet t <- f a t ;;
+ ret (tCast b k t)
+ | tProd name ty body =>
+ mlet ty <- f a ty ;;
+ mlet a_body <- liftM name a ;;
+ mlet body <- f a_body body ;;
+ ret (tProd name ty body)
+ | tLambda name ty body =>
+ mlet ty <- f a ty ;;
+ mlet a_body <- liftM name a ;;
+ mlet body <- f a_body body ;;
+ ret (tLambda name ty body)
+ | tLetIn name def ty body =>
+ mlet def <- f a def ;;
+ mlet ty <- f a ty ;;
+ mlet a_body <- liftM name a ;;
+ mlet body <- f a_body body ;;
+ ret (tLetIn name def ty body)
+ | tApp func args =>
+ mlet func <- f a func ;;
+ mlet args <- monad_map (f a) args ;;
+ ret (tApp func args)
+ | tProj proj t =>
+ mlet t <- f a t ;;
+ ret (tProj proj t)
+ (* For [tFix] and [tCoFix] we have to take care to lift [a]
+ only when processing the body of the (co)fixpoint. *)
+ | tFix defs i =>
+ mlet a_body <- lift_namesM (List.map dname defs) a ;;
+ let on_def := map_defM (f a) (f a_body) in
+ mlet defs <- monad_map on_def defs ;;
+ ret (tFix defs i)
+ | tCoFix defs i =>
+ mlet a_body <- lift_namesM (List.map dname defs) a ;;
+ let on_def := map_defM (f a) (f a_body) in
+ mlet defs <- monad_map on_def defs ;;
+ ret (tCoFix defs i)
+ | tCase ci pred x branches =>
+ mlet pred <- map_predicate_with_bindersM f pred ;;
+ mlet x <- f a x ;;
+ mlet branches <- monad_map (map_branch_with_bindersM f) branches ;;
+ ret (tCase ci pred x branches)
+ | tArray l t def ty =>
+ mlet t <- monad_map (f a) t ;;
+ mlet def <- f a def ;;
+ mlet ty <- f a ty ;;
+ ret (tArray l t def ty)
+ end.
+
+Definition fold_predicate_with_bindersM (f : A -> Acc -> term -> M Acc) (acc : Acc) (p : predicate term) : M Acc :=
+ mlet a_return <- lift_namesM p.(pcontext) a ;;
+ mlet acc <- monad_fold_left (f a) p.(pparams) acc ;;
+ f a_return acc p.(preturn).
+
+Definition fold_branch_with_bindersM (f : A -> Acc -> term -> M Acc) (acc : Acc) (b : branch term) : M Acc :=
+ mlet a_body <- lift_namesM b.(bcontext) a ;;
+ f a_body acc b.(bbody).
+
+(** Monadic variant of [fold_term_with_binders]. *)
+Definition fold_term_with_bindersM (f : A -> Acc -> term -> M Acc) (acc : Acc) (t : term) : M Acc :=
+ match t with
+ | tRel _ | tVar _ | tSort _ | tConst _ _ | tInd _ _
+ | tConstruct _ _ _ | tInt _ | tFloat _ | tString _ => ret acc
+ | tEvar n ts => monad_fold_left (f a) ts acc
+ | tCast b k t => mlet acc <- f a acc b ;; f a acc t
+ | tProd name ty body =>
+ mlet a_body <- liftM name a ;;
+ mlet acc <- f a acc ty ;;
+ f a_body acc body
+ | tLambda name ty body =>
+ mlet a_body <- liftM name a ;;
+ mlet acc <- f a acc ty ;;
+ f a_body acc body
+ | tLetIn name def ty body =>
+ mlet a_body <- liftM name a ;;
+ mlet def <- f a acc def ;;
+ mlet acc <- f a acc ty ;;
+ f a_body acc body
+ | tApp func args => monad_fold_left (f a) (func :: args) acc
+ | tProj proj t => f a acc t
+ | tFix defs i =>
+ mlet a_body <- lift_namesM (List.map dname defs) a ;;
+ mlet acc <- monad_fold_left (f a) (List.map dtype defs) acc ;;
+ monad_fold_left (f a_body) (List.map dbody defs) acc
+ | tCoFix defs i =>
+ mlet a_body <- lift_namesM (List.map dname defs) a ;;
+ mlet acc <- monad_fold_left (f a) (List.map dtype defs) acc ;;
+ monad_fold_left (f a_body) (List.map dbody defs) acc
+ | tCase ci pred x branches =>
+ mlet acc <- fold_predicate_with_bindersM f acc pred ;;
+ mlet acc <- f a acc x ;;
+ monad_fold_left (fold_branch_with_bindersM f) branches acc
+ | tArray l t def ty =>
+ mlet acc <- monad_fold_left (f a) t acc ;;
+ mlet acc <- f a acc def ;;
+ f a acc ty
+ end.
+
+End TraverseWithBindersM.
+
+
+(** [map_term f t] maps [f] on the immediate subterms of [t].
+ It is not recursive and the order in which subterms are processed is not specified. *)
+Definition map_term (f : term -> term) (t : term) : term :=
+ @map_term_with_binders unit tt (fun _ _ => tt) (fun _ => f) t.
+
+(** Monadic variant of [map_term]. *)
+Definition map_termM {M} `{Monad M} (f : term -> M term) (t : term) : M term :=
+ @map_term_with_bindersM M _ unit tt (fun _ _ => ret tt) (fun _ => f) t.
+
+(** [fold_term f acc t] folds [f] on the immediate subterms of [t].
+ It is not recursive and the order in which subterms are processed is not specified. *)
+Definition fold_term {Acc} (f : Acc -> term -> Acc) (acc : Acc) (t : term) : Acc :=
+ @fold_term_with_binders Acc unit tt (fun _ _ => tt) (fun _ => f) acc t.
+
+(** Monadic variant of [fold_term]. *)
+Definition fold_termM {M} `{Monad M} {Acc} (f : Acc -> term -> M Acc) (acc : Acc) (t : term) : M Acc :=
+ @fold_term_with_bindersM M _ Acc unit tt (fun _ _ => ret tt) (fun _ => f) acc t.
\ No newline at end of file
diff --git a/template-coq/theories/EtaExpand.v b/template-coq/theories/EtaExpand.v
index a36212f92..65fff3459 100644
--- a/template-coq/theories/EtaExpand.v
+++ b/template-coq/theories/EtaExpand.v
@@ -6,7 +6,7 @@
All dependencies are also expanded.*)
-From Coq Require Import List PeanoNat Bool Lia.
+From Stdlib Require Import List PeanoNat Bool Lia.
From MetaCoq.Utils Require Import utils monad_utils.
From MetaCoq.Common Require Export
uGraph (* The graph of universes *)
@@ -57,7 +57,7 @@ Section Eta.
let prev_args := map (lift0 needed) args in
let eta_args := rev_map tRel (seq 0 needed) in
let remaining := firstn needed (skipn #|args| (rev (smash_context [] (decompose_prod_assum [] ty).1))) in
- let remaining_subst := subst_context (rev args) 0 remaining in
+ let remaining_subst := rev (subst_context (rev args) 0 (rev remaining)) in
fold_right (fun d b => Ast.tLambda d.(decl_name) d.(decl_type) b) (mkApps (lift0 needed t) (prev_args ++ eta_args)) remaining_subst.
Definition eta_constructor (ind : inductive) c u args :=
@@ -1253,7 +1253,7 @@ Qed.
Arguments tVar _%_bs.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Open Scope bs_scope.
Fixpoint lookup_global_env (Σ : global_declarations) (kn : kername) {struct Σ} : option (global_decl × global_declarations) :=
diff --git a/template-coq/theories/Extraction.v b/template-coq/theories/Extraction.v
index 9af1bba3f..1f9d58d5a 100644
--- a/template-coq/theories/Extraction.v
+++ b/template-coq/theories/Extraction.v
@@ -5,12 +5,12 @@
should use these same directives for consistency.
*)
-From Coq Require Ascii Extraction ZArith NArith.
+From Stdlib Require Ascii Extraction ZArith NArith.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Reflect config.
From MetaCoq.Template Require Import Ast Induction.
-From Coq Require Import FSets ExtrOcamlBasic ExtrOCamlFloats ExtrOCamlInt63 ExtrOCamlPString.
+From Stdlib Require Import FSets ExtrOcamlBasic ExtrOCamlFloats ExtrOCamlInt63 ExtrOCamlPString.
Extract Inductive Equations.Init.sigma => "( * )" ["(,)"].
Extract Constant Equations.Init.pr1 => "fst".
diff --git a/template-coq/theories/Lib.v b/template-coq/theories/Lib.v
new file mode 100644
index 000000000..4a5e549fd
--- /dev/null
+++ b/template-coq/theories/Lib.v
@@ -0,0 +1,166 @@
+From MetaCoq.Common Require Import uGraph.
+From MetaCoq.Template Require Import Ast TemplateMonad Loader Checker.
+From MetaCoq.Utils Require Import utils.
+
+#[local] Set Universe Polymorphism.
+
+(** * Commands. *)
+
+(** Quote a term. *)
+Notation "'$quote' x" :=
+ ltac:((let p y := exact y in quote_term x p))
+ (at level 0, only parsing).
+
+(** Run a template program. *)
+Notation "'$run' f" :=
+ ltac:(
+ let p y := exact y in
+ run_template_program f p
+ ) (at level 0, only parsing).
+
+(** Quote and term and its environment. *)
+Notation "'$quote_rec' x" :=
+ ($run (tmQuoteRec x))
+ (at level 0, only parsing).
+
+(** Unquote a term (using [tmUnquote]). *)
+Notation "'$unquote' x" :=
+ ltac:(
+ let p y :=
+ match y with
+ | existT_typed_term ?T ?b => exact b
+ end
+ in
+ run_template_program (tmUnquote x) p
+ ) (at level 0, only parsing).
+
+(** Unquote a term (using [tmUnquoteTyped]). *)
+Notation "'$unquote' x : T" :=
+ ($run (tmUnquoteTyped T x))
+ (at level 0, T at level 100, x at next level, only parsing).
+
+(** [unfold_toplevel x] replaces the constant [x] by its definition.
+ Fails if [x] is not a constant. *)
+Definition unfold_toplevel {A} (x : A) : TemplateMonad A :=
+ tmBind (tmQuote x) (fun y =>
+ match y with
+ | tConst na _ => tmEval (Common.unfold na) x
+ | _ => tmFail "unfold_toplevel: not a constant"%bs
+ end).
+
+(** Quote the _definition_ of a constant. *)
+Notation "'$quote_def' x" :=
+ ($run (tmBind (unfold_toplevel x) tmQuote))
+ (at level 0, only parsing).
+
+(** [get_kername t] returns the kernel name of [t].
+ Fails if [t] is not of the form [tConst _ _]. *)
+Definition get_kername (t : term) : TemplateMonad kername :=
+ match t with
+ | tConst c u => tmReturn c
+ | _ => tmFail "get_kername: not a constant"%bs
+ end.
+
+(** Get the kernel name of a constant. *)
+Notation "'$name' x" :=
+ ($run (get_kername ($quote x)))
+ (at level 0, only parsing).
+
+(** Recursively quote the _definition_ of a constant. *)
+Notation "'$quote_def_rec' x" :=
+ ($run (tmBind (unfold_toplevel x) tmQuoteRec))
+ (at level 0, only parsing).
+
+(** * Useful shortcuts. *)
+
+(** [term_eqb t1 t2] checks if [t1] and [t2] are equal modulo alpha equivalence. *)
+Definition term_eqb (t1 t2 : term) :=
+ @eq_term config.default_checker_flags init_graph t1 t2.
+
+(** Short-form notation for [tLambda]. *)
+Notation tLam x A b :=
+ (tLambda {| binder_name := nNamed x; binder_relevance := Relevant |} A b).
+
+(** Short-form notation for [tProd]. *)
+Notation tPro x A b :=
+ (tProd {| binder_name := nNamed x; binder_relevance := Relevant |} A b).
+
+(** Short-form notation for [tLetIn]. *)
+Notation tLet x A t b :=
+ (tLetIn {| binder_name := nNamed x; binder_relevance := Relevant |} t A b).
+
+Notation "'__'" := (hole) (no associativity, at level 0).
+
+(** * Monadic notations. *)
+
+(** These notations replace the default ones from Utils.monad_utils
+ by equivalent ones which are specialized to the TemplateMonad.
+ This helps avoid typeclass errors. *)
+Module TemplateMonadNotations.
+
+Declare Scope tm_scope.
+Delimit Scope tm_scope with tm.
+
+Notation "c >>= f" :=
+ (tmBind c f)
+ (at level 50, left associativity) : tm_scope.
+
+Notation "f =<< c" :=
+ (c >>= f)%tm
+ (at level 51, right associativity) : tm_scope.
+
+Notation "'mlet' x <- c1 ;; c2" :=
+ (c1 >>= (fun x => c2))%tm
+ (at level 100, c1 at next level, right associativity, x pattern) : tm_scope.
+
+Notation "'mlet' ' pat <- c1 ;; c2" :=
+ (c1 >>= (fun x => match x with pat => c2 end))%tm
+ (at level 100, pat pattern, c1 at next level, right associativity) : tm_scope.
+
+Notation "x <- c1 ;; c2" :=
+ (c1 >>= (fun x => c2))%tm
+ (at level 100, c1 at next level, right associativity) : tm_scope.
+
+Notation "' pat <- c1 ;; c2" :=
+ (c1 >>= (fun x => match x with pat => c2 end))%tm
+ (at level 100, pat pattern, c1 at next level, right associativity) : tm_scope.
+
+Notation "e1 ;; e2" :=
+ (_ <- e1%tm ;; e2%tm)%tm
+ (at level 100, right associativity) : tm_scope.
+
+End TemplateMonadNotations.
+
+(** * Packed inductives and constructors. *)
+
+(** In MetaCoq.Template the information related to an inductive type is spread accross
+ three different datatypes : [inductive], [one_inductive_body] and [mutual_inductive_body].
+ One often needs access to all three : [packed_inductive] packages them in a single datatype. *)
+Record packed_inductive :=
+ { pi_ind : inductive
+ ; pi_body : one_inductive_body
+ ; pi_mbody : mutual_inductive_body }.
+
+(** Same as [packed_inductive] but for constructors. *)
+Record packed_constructor :=
+ { (** The inductive this constructor belongs to. *)
+ pc_pi : packed_inductive
+ ; (** The index of this constructor. *)
+ pc_idx : nat
+ ; (** The body of this constructor. *)
+ pc_body : constructor_body }.
+
+(** [pi_ctors pi] returns the list of [packed_constructors] of the
+ packed inductive [pi]. *)
+Definition pi_ctors (pi : packed_inductive) : list packed_constructor :=
+ mapi (fun i ctor => {| pc_pi := pi ; pc_idx := i ; pc_body := ctor |}) pi.(pi_body).(ind_ctors).
+
+(** [pi_block pi] returns the list of packed inductives in the same block
+ as [pi], including [pi] itself, ordered from first to last. *)
+Definition pi_block (pi : packed_inductive) : list packed_inductive :=
+ mapi
+ (fun i body =>
+ {| pi_ind := {| inductive_mind := pi.(pi_ind).(inductive_mind) ; inductive_ind := i |}
+ ; pi_body := body
+ ; pi_mbody := pi.(pi_mbody) |})
+ pi.(pi_mbody).(ind_bodies).
\ No newline at end of file
diff --git a/template-coq/theories/LiftSubst.v b/template-coq/theories/LiftSubst.v
index ddf438178..b3a2f64f0 100644
--- a/template-coq/theories/LiftSubst.v
+++ b/template-coq/theories/LiftSubst.v
@@ -2,7 +2,7 @@
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import Environment.
From MetaCoq.Template Require Import Ast AstUtils Induction WfAst.
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
(** * Lifting and substitution for the AST
@@ -52,7 +52,7 @@ Ltac easy ::= easy0 || solve [intuition eauto 3 with core terms].
Notation subst_rec N M k := (subst N k M) (only parsing).
-Require Import PeanoNat.
+From Stdlib Require Import PeanoNat.
Import Nat.
Lemma lift_rel_ge :
diff --git a/template-coq/theories/Reduction.v b/template-coq/theories/Reduction.v
index 2b959a32d..08b3fb6f4 100644
--- a/template-coq/theories/Reduction.v
+++ b/template-coq/theories/Reduction.v
@@ -5,7 +5,7 @@ From MetaCoq.Template Require Import Ast AstUtils WfAst Induction LiftSubst
UnivSubst TermEquality Typing.
From Equations Require Import Equations.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Lemma red1_tApp_mkApps_l Σ Γ M1 N1 M2 :
red1 Σ Γ M1 N1 -> red1 Σ Γ (tApp M1 M2) (mkApps N1 M2).
diff --git a/template-coq/theories/ReflectAst.v b/template-coq/theories/ReflectAst.v
index da02db367..c6e3e7adf 100644
--- a/template-coq/theories/ReflectAst.v
+++ b/template-coq/theories/ReflectAst.v
@@ -1,10 +1,10 @@
(* Distributed under the terms of the MIT license. *)
(* For primitive integers and floats *)
-From Coq Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat Floats.FloatAxioms.
+From Stdlib Require Numbers.Cyclic.Int63.Uint63 Floats.PrimFloat Floats.FloatAxioms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import BasicAst Reflect Environment EnvironmentReflect.
From MetaCoq.Template Require Import AstUtils Ast Induction.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
Local Infix "==?" := eqb (at level 20).
diff --git a/template-coq/theories/TemplateCheckWf.v b/template-coq/theories/TemplateCheckWf.v
index da3382bc5..a44f887e6 100644
--- a/template-coq/theories/TemplateCheckWf.v
+++ b/template-coq/theories/TemplateCheckWf.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Common Require Import config Transform.
From MetaCoq.Template Require Import TemplateProgram Pretty EtaExpand All Loader.
Import ListNotations.
@@ -50,7 +50,7 @@ Fixpoint wfterm (t : term) : bool :=
| _ => true
end.
-From Coq Require Import ssrbool.
+From Stdlib Require Import ssrbool.
Definition wf_global_decl d :=
match d with
diff --git a/template-coq/theories/TemplateEnvMap.v b/template-coq/theories/TemplateEnvMap.v
index f9f975daf..50504ec06 100644
--- a/template-coq/theories/TemplateEnvMap.v
+++ b/template-coq/theories/TemplateEnvMap.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations Require Import Equations.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Kernames EnvMap.
diff --git a/template-coq/theories/TermEquality.v b/template-coq/theories/TermEquality.v
index d37bd614c..3eb098a66 100644
--- a/template-coq/theories/TermEquality.v
+++ b/template-coq/theories/TermEquality.v
@@ -1,10 +1,10 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CMorphisms.
+From Stdlib Require Import CMorphisms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Reflect Environment EnvironmentTyping.
From MetaCoq.Template Require Import Ast AstUtils Induction.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
Set Equations With UIP.
diff --git a/template-coq/theories/Typing.v b/template-coq/theories/Typing.v
index c9d83dd4c..6e73f6f9c 100644
--- a/template-coq/theories/Typing.v
+++ b/template-coq/theories/Typing.v
@@ -2,7 +2,7 @@
(** This defines relation operators in Type *)
From Equations.Type Require Import Relation.
From Equations Require Import Equations.
-From Coq Require Import ssreflect Wellfounded Relation_Operators CRelationClasses.
+From Stdlib Require Import ssreflect Wellfounded Relation_Operators CRelationClasses.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Environment Primitive EnvironmentTyping Reflect.
From MetaCoq.Template Require Import Ast AstUtils LiftSubst UnivSubst ReflectAst TermEquality WfAst.
diff --git a/template-coq/theories/TypingWf.v b/template-coq/theories/TypingWf.v
index 5ea456395..dcf8e3273 100644
--- a/template-coq/theories/TypingWf.v
+++ b/template-coq/theories/TypingWf.v
@@ -1,6 +1,6 @@
(* Distributed under the terms of the MIT license. *)
-Require Import ssreflect ssrbool.
-Require PeanoNat.
+From Stdlib Require Import ssreflect ssrbool.
+From Stdlib Require PeanoNat.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Reflect.
From MetaCoq.Template Require Import Ast AstUtils Induction UnivSubst WfAst Typing.
diff --git a/template-coq/theories/WcbvEval.v b/template-coq/theories/WcbvEval.v
index a669dc1c2..1d48dde3b 100644
--- a/template-coq/theories/WcbvEval.v
+++ b/template-coq/theories/WcbvEval.v
@@ -1,11 +1,11 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import CRelationClasses.
+From Stdlib Require Import CRelationClasses.
From MetaCoq.Utils Require Import utils MCList.
From MetaCoq.Common Require Import config Environment Reflect.
From MetaCoq.Template Require Import Ast AstUtils LiftSubst UnivSubst WfAst TypingWf Typing.
-Require Import ssreflect ssrbool.
-Require Import Equations.Prop.DepElim.
+From Stdlib Require Import ssreflect ssrbool.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
(** * Weak-head call-by-value evaluation strategy.
diff --git a/template-coq/theories/WfAst.v b/template-coq/theories/WfAst.v
index d2a757eed..8295d7e7d 100644
--- a/template-coq/theories/WfAst.v
+++ b/template-coq/theories/WfAst.v
@@ -3,7 +3,7 @@ From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Template Require Import Ast AstUtils Induction UnivSubst.
From Equations Require Import Equations.
-Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
(** * Well-formedness of terms and types in typing derivations
@@ -225,7 +225,7 @@ Proof.
intros; try cbn; econstructor; simpl; eauto; try solve [solve_all].
destruct l; cbn in *. auto. discriminate. now rewrite length_map.
Qed.
-Require Import PeanoNat.
+From Stdlib Require Import PeanoNat.
Import Nat.
Lemma wf_subst Σ ts k u : All (wf Σ) ts -> wf Σ u -> wf Σ (subst ts k u).
diff --git a/template-pcuic/Makefile b/template-pcuic/Makefile
index c8512874a..8955bbbaa 100644
--- a/template-pcuic/Makefile
+++ b/template-pcuic/Makefile
@@ -5,7 +5,7 @@ _CoqProject: _CoqProject.in metacoq-config
cat _CoqProject.in >> _CoqProject
Makefile.templatepcuic: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.templatepcuic $(DEPS)
+ rocq makefile -f _CoqProject -o Makefile.templatepcuic $(DEPS)
theory: Makefile.templatepcuic
$(MAKE) -f Makefile.templatepcuic
diff --git a/template-pcuic/metacoq-config b/template-pcuic/metacoq-config
deleted file mode 100644
index 00bfe61cd..000000000
--- a/template-pcuic/metacoq-config
+++ /dev/null
@@ -1,2 +0,0 @@
-# DO NOT EDIT THIS FILE: autogenerated from ./configure.sh
--R ../utils/theories MetaCoq.Utils -R ../common/theories MetaCoq.Common -R ../pcuic/theories MetaCoq.PCUIC -R ../template-coq/theories MetaCoq.Template -I ../template-coq
diff --git a/template-pcuic/theories/PCUICToTemplate.v b/template-pcuic/theories/PCUICToTemplate.v
index f97a7ffda..1fd768f32 100644
--- a/template-pcuic/theories/PCUICToTemplate.v
+++ b/template-pcuic/theories/PCUICToTemplate.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Uint63 FloatOps FloatAxioms.
+From Stdlib Require Import Uint63 FloatOps FloatAxioms.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICCases.
Set Warnings "-notation-overridden".
From MetaCoq.Utils Require Import utils.
diff --git a/template-pcuic/theories/PCUICToTemplateCorrectness.v b/template-pcuic/theories/PCUICToTemplateCorrectness.v
index cbcdb506f..3b7a1f1ee 100644
--- a/template-pcuic/theories/PCUICToTemplateCorrectness.v
+++ b/template-pcuic/theories/PCUICToTemplateCorrectness.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool Utf8 CRelationClasses.
+From Stdlib Require Import ssreflect ssrbool Utf8 CRelationClasses.
From Equations.Type Require Import Relation Relation_Properties.
From MetaCoq.PCUIC Require Import PCUICAst PCUICAstUtils PCUICInduction
PCUICLiftSubst PCUICEquality PCUICReduction PCUICCasesContexts PCUICTactics
@@ -24,7 +24,7 @@ Import MCMonadNotation.
Implicit Types cf : checker_flags. (* Use {cf} to parameterize by checker_flags where needed *)
Set Default Proof Using "Type*".
-Require Import Equations.Prop.DepElim.
+From Equations.Prop Require Import DepElim.
From Equations Require Import Equations.
(** Translation from PCUIC back to template-coq terms.
@@ -1098,7 +1098,7 @@ Proof.
destruct y as [na' [b|] ty]; cbn; auto.
Qed.
-Require Import Morphisms.
+From Stdlib Require Import Morphisms.
#[global]
Instance map2_Proper {A B C} : Morphisms.Proper (pointwise_relation A (pointwise_relation B (@eq C)) ==> eq ==> eq ==> eq) map2.
Proof.
diff --git a/template-pcuic/theories/PCUICTransform.v b/template-pcuic/theories/PCUICTransform.v
index 8bafdc8c5..ad77de591 100644
--- a/template-pcuic/theories/PCUICTransform.v
+++ b/template-pcuic/theories/PCUICTransform.v
@@ -1,5 +1,5 @@
(** * Definition of programs in template-coq, well-typed terms and provided transformations **)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Transform.
From MetaCoq.Template Require TemplateProgram.
diff --git a/template-pcuic/theories/TemplateMonadToPCUIC.v b/template-pcuic/theories/TemplateMonadToPCUIC.v
index fedee03ed..c3a125f0b 100644
--- a/template-pcuic/theories/TemplateMonadToPCUIC.v
+++ b/template-pcuic/theories/TemplateMonadToPCUIC.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Uint63 FloatOps FloatAxioms.
+From Stdlib Require Import Uint63 FloatOps FloatAxioms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Primitive EnvMap.
From MetaCoq.Common Require Import MonadBasicAst.
diff --git a/template-pcuic/theories/TemplateToPCUIC.v b/template-pcuic/theories/TemplateToPCUIC.v
index f7ec265c8..42dfbefe2 100644
--- a/template-pcuic/theories/TemplateToPCUIC.v
+++ b/template-pcuic/theories/TemplateToPCUIC.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Uint63 FloatOps FloatAxioms.
+From Stdlib Require Import Uint63 FloatOps FloatAxioms.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config Primitive EnvMap.
From MetaCoq.Template Require AstUtils TemplateProgram.
diff --git a/template-pcuic/theories/TemplateToPCUICCorrectness.v b/template-pcuic/theories/TemplateToPCUICCorrectness.v
index 8bd267daf..894688c18 100644
--- a/template-pcuic/theories/TemplateToPCUICCorrectness.v
+++ b/template-pcuic/theories/TemplateToPCUICCorrectness.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config EnvMap.
From MetaCoq.Template Require Ast TypingWf WfAst TermEquality.
@@ -2557,7 +2557,7 @@ Proof.
Qed.
From MetaCoq.PCUIC Require Import PCUICInstDef PCUICInstConv.
-Require Import ssrbool.
+From Stdlib Require Import ssrbool.
(* Lemma closed_ctx_map2_set_binder_name (n : nat) (bctx : list aname) (ctx : list context_decl) :
closedn_ctx n ctx -> closedn_ctx n (map2_bias_left set_binder_name dummy_decl bctx ctx).
Proof.
diff --git a/template-pcuic/theories/TemplateToPCUICExpanded.v b/template-pcuic/theories/TemplateToPCUICExpanded.v
index 402aff766..7ee36ea6c 100644
--- a/template-pcuic/theories/TemplateToPCUICExpanded.v
+++ b/template-pcuic/theories/TemplateToPCUICExpanded.v
@@ -1,5 +1,5 @@
From Equations Require Import Equations.
-From Coq Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Template Require Ast TypingWf WfAst TermEquality EtaExpand TemplateProgram.
diff --git a/template-pcuic/theories/TemplateToPCUICWcbvEval.v b/template-pcuic/theories/TemplateToPCUICWcbvEval.v
index 3f94cfc75..dd0c696a5 100644
--- a/template-pcuic/theories/TemplateToPCUICWcbvEval.v
+++ b/template-pcuic/theories/TemplateToPCUICWcbvEval.v
@@ -1,5 +1,5 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import ssreflect ssrbool.
+From Stdlib Require Import ssreflect ssrbool.
From MetaCoq.Utils Require Import utils.
From MetaCoq.Common Require Import config.
From MetaCoq.Template Require Ast TypingWf WfAst TermEquality TypingWf WcbvEval.
diff --git a/test-suite/CheckerTest.v b/test-suite/CheckerTest.v
index eac8ea027..8de19eb44 100644
--- a/test-suite/CheckerTest.v
+++ b/test-suite/CheckerTest.v
@@ -1,5 +1,5 @@
(* -*- coq-prog-args : ("-type-in-type") -*- *)
-Require Import MetaCoq.Checker.Loader.
+From MetaCoq Require Import Checker.Loader.
Definition foo := 2 * 2.
MetaCoq Check foo.
diff --git a/test-suite/Makefile b/test-suite/Makefile
index af1bd69fa..ad6b7004e 100644
--- a/test-suite/Makefile
+++ b/test-suite/Makefile
@@ -6,7 +6,7 @@ bugs: Makefile.coq
$(MAKE) -f Makefile.coq TIMED=$(TIMED)
Makefile.coq: Makefile _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
_CoqProject: _CoqProject.in metacoq-config
cat metacoq-config > _CoqProject
diff --git a/test-suite/Makefile.coq.local b/test-suite/Makefile.coq.local
index 0d291067b..624872657 100644
--- a/test-suite/Makefile.coq.local
+++ b/test-suite/Makefile.coq.local
@@ -11,3 +11,5 @@ ifeq '$(METACOQ_CONFIG)' 'local'
endif
export OCAMLPATH
endif
+
+COQEXTRAFLAGS=-quiet
\ No newline at end of file
diff --git a/test-suite/TypeAnnotationTests.v b/test-suite/TypeAnnotationTests.v
index 9996e2a7f..3d5875b69 100644
--- a/test-suite/TypeAnnotationTests.v
+++ b/test-suite/TypeAnnotationTests.v
@@ -1,5 +1,5 @@
-From Coq Require Import List.
-From Coq Require Import String.
+From Stdlib Require Import List.
+From Stdlib Require Import String.
From MetaCoq.TypedExtraction Require Import Utils.
From MetaCoq.TypedExtraction Require Import Annotations.
From MetaCoq.TypedExtraction Require Import ExAst.
diff --git a/test-suite/bug1.v b/test-suite/bug1.v
index c4c056aec..099e609ab 100644
--- a/test-suite/bug1.v
+++ b/test-suite/bug1.v
@@ -1,7 +1,7 @@
(** Reported by Randy Pollack **)
-Require Import MetaCoq.Template.Loader.
-Require Import List.
+From MetaCoq Require Import Template.Loader.
+From Stdlib Require Import List.
Fixpoint fibrec (n:nat) (fs:list nat) {struct n} : nat :=
match n with
| 0 => hd 0 fs
diff --git a/test-suite/bug2.v b/test-suite/bug2.v
index 38ae2b76d..f0fa4e078 100644
--- a/test-suite/bug2.v
+++ b/test-suite/bug2.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Definition I (t:Type) (x:t) : t := x.
Definition II := I (forall t:Type, t -> t) I.
diff --git a/test-suite/bug5.v b/test-suite/bug5.v
index f1ce28e4b..c850b0db5 100644
--- a/test-suite/bug5.v
+++ b/test-suite/bug5.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
MetaCoq Quote Recursively Definition aterm := Ast.term.
(*Time MetaCoq Quote Recursively Definition aterm' := aterm.*)
diff --git a/test-suite/bug6.v b/test-suite/bug6.v
index 45e724e4e..4f09ed2b3 100644
--- a/test-suite/bug6.v
+++ b/test-suite/bug6.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Import bytestring.
Definition I (t:Type) (x:t) : t := x.
diff --git a/test-suite/bug7.v b/test-suite/bug7.v
index 364893d8b..cbe1f6f66 100644
--- a/test-suite/bug7.v
+++ b/test-suite/bug7.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Axiom a_nat : nat.
diff --git a/test-suite/bug8.v b/test-suite/bug8.v
index 403d4c69c..f2ec910f8 100644
--- a/test-suite/bug8.v
+++ b/test-suite/bug8.v
@@ -1,3 +1,3 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Local Open Scope string_scope.
MetaCoq Quote Recursively Definition p_NN := nat.
\ No newline at end of file
diff --git a/test-suite/bug_quote_pstring.v b/test-suite/bug_quote_pstring.v
index 2142d4d2d..d60226a99 100644
--- a/test-suite/bug_quote_pstring.v
+++ b/test-suite/bug_quote_pstring.v
@@ -1,7 +1,7 @@
(* See PR #1109. *)
From MetaCoq.Template Require Import All.
-From Coq Require Import PrimString.
+From Stdlib Require Import PrimString.
MetaCoq Quote Definition quote_test := "quote_me"%pstring.
MetaCoq Unquote Definition unquote_test := (tString "unquote_me"%pstring).
diff --git a/test-suite/case.v b/test-suite/case.v
index 982e38ce7..d34c02f9f 100644
--- a/test-suite/case.v
+++ b/test-suite/case.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Definition f := fun (n : nat) =>
match n with
diff --git a/test-suite/castprop.v b/test-suite/castprop.v
index 3fc76da7a..7cac34ac1 100644
--- a/test-suite/castprop.v
+++ b/test-suite/castprop.v
@@ -1,6 +1,6 @@
From MetaCoq.Utils Require Import utils.
From MetaCoq.Template Require Import Loader.
-Require Import String.
+From Stdlib Require Import String.
Set Template Cast Propositions.
Definition foo (x : nat) (p : True) := p.
diff --git a/test-suite/cofix.v b/test-suite/cofix.v
index 39d83550d..5c1a3d115 100644
--- a/test-suite/cofix.v
+++ b/test-suite/cofix.v
@@ -1,5 +1,5 @@
-Require Import MetaCoq.Template.Loader.
-Require Import Streams.
+From MetaCoq Require Import Template.Loader.
+From Stdlib Require Import Streams.
CoFixpoint ones := Cons 1 ones.
diff --git a/test-suite/erasure_live_test.v b/test-suite/erasure_live_test.v
index e0e685240..3d2513ef7 100644
--- a/test-suite/erasure_live_test.v
+++ b/test-suite/erasure_live_test.v
@@ -1,4 +1,4 @@
-From Coq Require Import Recdef.
+From Stdlib Require Import Recdef.
From MetaCoq.Template Require Import TemplateMonad Loader.
(* From MetaCoq.SafeChecker Require Import SafeTemplateChecker. *)
@@ -7,7 +7,7 @@ From MetaCoq.TemplatePCUIC Require Import TemplateToPCUIC PCUICToTemplate.
From MetaCoq.ErasurePlugin Require Import Erasure.
-From Coq Require Import String.
+From Stdlib Require Import String.
Local Open Scope string_scope.
From MetaCoq.Utils Require Import utils bytestring.
@@ -74,14 +74,14 @@ Set MetaCoq Timing.
Time MetaCoq Run (tmEval hnf vplus0123 >>= erase).
(** Cofix *)
-From Coq Require Import StreamMemo.
+From Stdlib Require Import StreamMemo.
MetaCoq Quote Recursively Definition memo := memo_make.
Definition testmemo := Eval lazy in test memo.
(** Cofix *)
-From Coq Require Import StreamMemo.
+From Stdlib Require Import StreamMemo.
(** Ackermann **)
Fixpoint ack (n m:nat) {struct n} : nat :=
@@ -144,7 +144,7 @@ MetaCoq Quote Recursively Definition p_arden_size := arden_size.
Definition P_arden_size := Eval lazy in test p_arden_size.
(** SASL tautology function: variable arity **)
-From Coq Require Import Bool.
+From Stdlib Require Import Bool.
Fixpoint tautArg (n:nat) : Type :=
match n with
| 0 => bool
@@ -327,11 +327,11 @@ Qed.
*)
End HetList.
-Require Import Coq.Arith.Compare_dec.
-Require Import Coq.Arith.PeanoNat.
-Require Import Coq.Arith.Peano_dec.
-Require Import Arith Init.Wf.
-Require Import Program.
+From Stdlib Require Import Arith.Compare_dec.
+From Stdlib Require Import Arith.PeanoNat.
+From Stdlib Require Import Arith.Peano_dec.
+From Stdlib Require Import Arith Init.Wf.
+From Stdlib Require Import Program.
Program Fixpoint provedCopy (n:nat) {wf lt n} : nat :=
match n with 0 => 0 | S k => S (provedCopy k) end.
@@ -363,7 +363,7 @@ provedCopy). *)
Print P_provedCopyx.
-From Coq Require Import Streams.
+From Stdlib Require Import Streams.
CoFixpoint ones : Stream nat := Cons 1 ones.
diff --git a/test-suite/erasure_test.v b/test-suite/erasure_test.v
index f966b28ed..4e071f1f9 100644
--- a/test-suite/erasure_test.v
+++ b/test-suite/erasure_test.v
@@ -47,7 +47,7 @@ MetaCoq Erase ((fun (X : Set) (x : X) (e : x = x) =>
MetaCoq Erase ((fun (X : Set) (x : X) => x) True I).
(* MetaCoq Quote Recursively Definition foo := List.map. *)
-Require Import List.
+From Stdlib Require Import List.
Import ListNotations.
MetaCoq Erase (map negb [true; false]).
diff --git a/test-suite/evars.v b/test-suite/evars.v
index 313c0b104..32bc8fb4d 100644
--- a/test-suite/evars.v
+++ b/test-suite/evars.v
@@ -1,4 +1,4 @@
-From Coq Require Import String List.
+From Stdlib Require Import String List.
From MetaCoq.Template Require Import Ast Loader.
Import ListNotations.
Definition bAnon := {| binder_name := nAnon; binder_relevance := Relevant |}.
diff --git a/test-suite/extractable.v b/test-suite/extractable.v
index 384fa96a6..1973f0a89 100644
--- a/test-suite/extractable.v
+++ b/test-suite/extractable.v
@@ -1,5 +1,5 @@
-Require Import Coq.Strings.String.
-Require Import Coq.Lists.List.
+From Stdlib Require Import Strings.String.
+From Stdlib Require Import Lists.List.
From MetaCoq.Common Require Import
BasicAst.
From MetaCoq.Template Require Import
diff --git a/test-suite/hnf_ctor.v b/test-suite/hnf_ctor.v
index 8e95e008c..9a398e903 100644
--- a/test-suite/hnf_ctor.v
+++ b/test-suite/hnf_ctor.v
@@ -1,5 +1,5 @@
-Require Import Coq.Strings.String.
-Require Import MetaCoq.Template.Loader.
+From Stdlib Require Import Strings.String.
+From MetaCoq Require Import Template.Loader.
Inductive U : Type :=
| TT : id U.
diff --git a/test-suite/inferind.v b/test-suite/inferind.v
index c45953788..e0596f2eb 100644
--- a/test-suite/inferind.v
+++ b/test-suite/inferind.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Template Require Import All.
Import ListNotations.
diff --git a/test-suite/inferindunivs.v b/test-suite/inferindunivs.v
index b39f59fd3..3d7f7c982 100644
--- a/test-suite/inferindunivs.v
+++ b/test-suite/inferindunivs.v
@@ -1,4 +1,4 @@
-From Coq Require Import List.
+From Stdlib Require Import List.
From MetaCoq.Template Require Import All Loader.
Import Ast.Env.
Import ListNotations.
diff --git a/test-suite/int.v b/test-suite/int.v
index 65a655c25..d8283d368 100644
--- a/test-suite/int.v
+++ b/test-suite/int.v
@@ -1,5 +1,5 @@
-Require Import MetaCoq.Template.Loader.
-Require Import Uint63.
+From MetaCoq Require Import Template.Loader.
+From Stdlib Require Import Uint63.
Definition n : Uint63.int := 42.
Import List.ListNotations.
diff --git a/test-suite/issue27.v b/test-suite/issue27.v
index 8414b0fa4..bada389ba 100644
--- a/test-suite/issue27.v
+++ b/test-suite/issue27.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.All.
+From MetaCoq Require Import Template.All.
Require Export List.
Open Scope bs_scope.
MetaCoq Run (tmLemma "test" (@nil nat = @nil nat)).
diff --git a/test-suite/issue28.v b/test-suite/issue28.v
index 4ed97ca0c..e3d287e6b 100644
--- a/test-suite/issue28.v
+++ b/test-suite/issue28.v
@@ -1,5 +1,5 @@
-Require Import MetaCoq.Template.All MetaCoq.Utils.bytestring MetaCoq.Template.Pretty.
-Require Export List.
+From MetaCoq Require Import Template.All Utils.bytestring Template.Pretty.
+From Stdlib Require Export List.
Open Scope bs_scope.
Import ListNotations.
Import MCMonadNotation.
diff --git a/test-suite/letin.v b/test-suite/letin.v
index f0cbadc5f..59890b9e7 100644
--- a/test-suite/letin.v
+++ b/test-suite/letin.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Local Open Scope string_scope.
diff --git a/test-suite/modules_sections.v b/test-suite/modules_sections.v
index 305d26ae7..fa1530712 100644
--- a/test-suite/modules_sections.v
+++ b/test-suite/modules_sections.v
@@ -56,7 +56,7 @@ MetaCoq Run (bc <- tmQuote b ;;
bc <- tmUnquote bc ;;
tmPrint bc).
-Require Import MetaCoq.Template.Pretty.
+From MetaCoq Require Import Template.Pretty.
Check (eq_refl : print_term (empty_ext empty_global_env) [] true
(tConst (MPfile ["test"; "Examples"; "MetaCoq"], "b") [])
= "MetaCoq.Examples.test.b").
diff --git a/test-suite/mutind.v b/test-suite/mutind.v
index 50cfc7740..0e442fa49 100644
--- a/test-suite/mutind.v
+++ b/test-suite/mutind.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.Loader.
+From MetaCoq Require Import Template.Loader.
Section with_T.
Variable T : Type.
diff --git a/test-suite/opaque.v b/test-suite/opaque.v
index 99c186a6a..75e906db6 100644
--- a/test-suite/opaque.v
+++ b/test-suite/opaque.v
@@ -1,4 +1,4 @@
-From Coq Require Import List Nat.
+From Stdlib Require Import List Nat.
From MetaCoq.Template Require Import All.
Import MCMonadNotation ListNotations.
diff --git a/test-suite/plugin-demo/Makefile b/test-suite/plugin-demo/Makefile
index 3f53a81b6..6754bf7b6 100644
--- a/test-suite/plugin-demo/Makefile
+++ b/test-suite/plugin-demo/Makefile
@@ -5,15 +5,15 @@ coq: Makefile.coq
cd gen-src && ./to-lower.sh
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
Makefile.plugin: _PluginProject
- coq_makefile -f _PluginProject -o Makefile.plugin
+ rocq makefile -f _PluginProject -o Makefile.plugin
_CoqProject: _CoqProject.in metacoq-config
cat metacoq-config > _CoqProject
cat _CoqProject.in >> _CoqProject
-
+
_PluginProject: _PluginProject.in metacoq-config
cat metacoq-config > _PluginProject
cat _PluginProject.in >> _PluginProject
diff --git a/test-suite/plugin-demo/test/test.v b/test-suite/plugin-demo/test/test.v
index 4ddb504e5..e8fadd6f3 100644
--- a/test-suite/plugin-demo/test/test.v
+++ b/test-suite/plugin-demo/test/test.v
@@ -1,4 +1,4 @@
-Require Import Coq.Strings.String.
+From Stdlib Require Import Strings.String.
From MetaCoq.ExtractedPluginDemo Require Import Lens Loader.
Set Primitive Projections.
diff --git a/test-suite/plugin-demo/theories/MyPlugin.v b/test-suite/plugin-demo/theories/MyPlugin.v
index eb1194317..557e0eb61 100644
--- a/test-suite/plugin-demo/theories/MyPlugin.v
+++ b/test-suite/plugin-demo/theories/MyPlugin.v
@@ -1,4 +1,4 @@
-Require Import Coq.Lists.List.
+From Stdlib Require Import Lists.List.
From MetaCoq.Utils Require Import bytestring.
From MetaCoq.Common Require Import BasicAst.
From MetaCoq.Template Require Import Ast Loader TemplateMonad.Extractable.
@@ -58,7 +58,7 @@ Definition tmResolve (nm : String.t) : TM (option kername) :=
(* ^^ Everything above here is generic *)
-Require Import MetaCoq.ExtractedPluginDemo.Lens.
+From MetaCoq Require Import ExtractedPluginDemo.Lens.
Set Primitive Projections.
Set Universe Polymorphism.
@@ -80,8 +80,8 @@ Definition prepend (ls : String.t) (i : ident) : ident :=
Definition cBuild_Lens := <% Build_Lens %>.
-Require Import Coq.Lists.List.
-Require Import Coq.Bool.Bool.
+From Stdlib Require Import Lists.List.
+From Stdlib Require Import Bool.Bool.
(* check to see if Var 0 is referenced in any of the terms *)
diff --git a/test-suite/primitive.v b/test-suite/primitive.v
index e42461733..c2e6f0179 100644
--- a/test-suite/primitive.v
+++ b/test-suite/primitive.v
@@ -1,6 +1,6 @@
-From Coq Require Import String.
+From Stdlib Require Import String.
From MetaCoq.Template Require Import monad_utils All.
-From Coq.Numbers.Cyclic Require Import PrimInt63 Sint63.
+From Stdlib.Numbers.Cyclic Require Import PrimInt63 Sint63.
Local Open Scope string_scope.
Local Open Scope sint63_scope.
@@ -24,7 +24,7 @@ MetaCoq Run (eval_hnf bigint >>=
tmLemma "foo'" (bigint + 1 = unq)%int63 >>=
fun x => tmPrint x)).
-From Coq Require Import PrimFloat.
+From Stdlib Require Import PrimFloat.
Definition f := (- (of_uint63 bigint / 3))%float.
Eval lazy in f.
diff --git a/test-suite/proj.v b/test-suite/proj.v
index 27efd8bde..3bca1c09b 100644
--- a/test-suite/proj.v
+++ b/test-suite/proj.v
@@ -38,7 +38,7 @@ MetaCoq Test Quote ((pair' _ _ true 4).(snd')).
MetaCoq Test Quote prod'.
-Require Import List String.
+From Stdlib Require Import List String.
Import ListNotations.
diff --git a/test-suite/reduction_test.v b/test-suite/reduction_test.v
index c45cb22dd..41a180dce 100644
--- a/test-suite/reduction_test.v
+++ b/test-suite/reduction_test.v
@@ -1,10 +1,10 @@
-From Coq Require Import Recdef.
+From Stdlib Require Import Recdef.
From MetaCoq.Utils Require Import bytestring.
From MetaCoq.Template Require Import TemplateMonad Loader.
(* From MetaCoq.SafeChecker Require Import SafeTemplateChecker. *)
From MetaCoq.PCUIC Require Import PCUICEquality PCUICAst PCUICReflect PCUICSafeLemmata PCUICTyping PCUICNormal PCUICAstUtils PCUICSN.
From MetaCoq.TemplatePCUIC Require Import TemplateToPCUIC PCUICToTemplate.
-From Coq Require Import String.
+From Stdlib Require Import String.
Local Open Scope string_scope.
From MetaCoq.Utils Require Import utils bytestring.
diff --git a/test-suite/safechecker_test.v b/test-suite/safechecker_test.v
index 44cc847d0..c1cfa3d0e 100644
--- a/test-suite/safechecker_test.v
+++ b/test-suite/safechecker_test.v
@@ -1,6 +1,6 @@
From MetaCoq.Template Require Import Loader.
From MetaCoq.SafeCheckerPlugin Require Import Loader.
-Require Import MetaCoq.SafeCheckerPlugin.SafeTemplateChecker.
+From MetaCoq Require Import SafeCheckerPlugin.SafeTemplateChecker.
Local Open Scope string_scope.
diff --git a/test-suite/sprop_tests.v b/test-suite/sprop_tests.v
index 720f51b19..70c4ce5ca 100644
--- a/test-suite/sprop_tests.v
+++ b/test-suite/sprop_tests.v
@@ -1,5 +1,5 @@
-Require Import String List.
-Require Import MetaCoq.Template.All.
+From Stdlib Require Import String List.
+From MetaCoq Require Import Template.All.
Import ListNotations MCMonadNotation.
Open Scope bs.
diff --git a/test-suite/tmFix.v b/test-suite/tmFix.v
index 8e91f4911..a33b8b837 100644
--- a/test-suite/tmFix.v
+++ b/test-suite/tmFix.v
@@ -1,8 +1,8 @@
From Ltac2 Require Import Ltac2.
-From Coq Require Import Lists.List.
-From Coq Require Import Lia.
-From Coq Require Import Arith.
-From Coq Require Import NArith.
+From Stdlib Require Import Lists.List.
+From Stdlib Require Import Lia.
+From Stdlib Require Import Arith.
+From Stdlib Require Import NArith.
From MetaCoq.Utils Require Import monad_utils.
From MetaCoq.Template Require Import Loader TemplateMonad.Core.
diff --git a/test-suite/tmFreshName.v b/test-suite/tmFreshName.v
index bf76fb57e..7dbc69ccb 100644
--- a/test-suite/tmFreshName.v
+++ b/test-suite/tmFreshName.v
@@ -1,5 +1,5 @@
-Require Import List Arith.
-Require Import MetaCoq.Template.All.
+From Stdlib Require Import List Arith.
+From MetaCoq Require Import Template.All.
Import ListNotations MCMonadNotation.
diff --git a/test-suite/tmInferInstance.v b/test-suite/tmInferInstance.v
index c0e2d1287..3d1e5182a 100644
--- a/test-suite/tmInferInstance.v
+++ b/test-suite/tmInferInstance.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Template.All.
+From MetaCoq Require Import Template.All.
Require Export String List.
Import MCMonadNotation.
diff --git a/test-suite/univ.v b/test-suite/univ.v
index d9de31ea6..17a84558d 100644
--- a/test-suite/univ.v
+++ b/test-suite/univ.v
@@ -1,5 +1,5 @@
From MetaCoq.Template Require Import All.
-Require Import List Arith.
+From Stdlib Require Import List Arith.
Import ListNotations MCMonadNotation.
Open Scope bs_scope.
@@ -148,8 +148,8 @@ Polymorphic Inductive foo3@{i j k l} (A : Type@{i}) (B : Type@{j}) : Type@{k} :=
MetaCoq Quote Recursively Definition qfoo3 := foo3.
(* Compute qfoo3. *)
-Require Import MetaCoq.Utils.monad_utils. Import MCMonadNotation.
-Require Import MetaCoq.Template.TemplateMonad.Core.
+From MetaCoq Require Import Utils.monad_utils. Import MCMonadNotation.
+From MetaCoq Require Import Template.TemplateMonad.Core.
(* MetaCoq Run (tmQuoteInductive (cp "foo") >>= tmPrint).
MetaCoq Run (tmQuoteInductive (cp "foo2") >>= tmPrint).
@@ -161,8 +161,8 @@ MetaCoq Quote Recursively Definition qTT := TT.
Polymorphic Inductive TT2@{i j} : Type@{j} := tt2 : Type@{i} -> TT2.
MetaCoq Quote Recursively Definition qTT2 := TT2.
-Require Import MetaCoq.Utils.utils.
-Require Import List. Import ListNotations.
+From MetaCoq Require Import Utils.utils.
+From Stdlib Require Import List. Import ListNotations.
Module toto.
@@ -229,7 +229,7 @@ Polymorphic Definition Funtp@{i} (A B: Type@{i}) := A->B.
Polymorphic Definition F@{i} := Type@{i}.
MetaCoq Quote Definition qT := Eval compute in F.
-Require Import List. Import ListNotations.
+From Stdlib Require Import List. Import ListNotations.
(* NOTE: the command below doesn't work -- gives Error: Anomaly "Universe Var(1) undefined." *)
(* Fail MetaCoq Unquote Definition T'2 := *)
(* (tSort (Universe.make (Level.lvar 1))). *)
diff --git a/test-suite/vs.v b/test-suite/vs.v
index 4ba7aabfa..1060bb41a 100755
--- a/test-suite/vs.v
+++ b/test-suite/vs.v
@@ -1,15 +1,15 @@
(* basic.v *)
-Require Import BinPos.
-Require Import Lia.
-Require Import Recdef.
-Require Import Stdlib.Lists.List.
-Require Import ZArith.
-Require Import NArith.
-Require Import List Orders POrderedType.
-Require Import Sorted.
-Require Import Stdlib.Sorting.Mergesort.
-Require Import Permutation.
+From Stdlib Require Import BinPos.
+From Stdlib Require Import Lia.
+From Stdlib Require Import Recdef.
+From Stdlib Require Import Lists.List.
+From Stdlib Require Import ZArith.
+From Stdlib Require Import NArith.
+From Stdlib Require Import List Orders POrderedType.
+From Stdlib Require Import Sorted.
+From Stdlib Require Import Sorting.Mergesort.
+From Stdlib Require Import Permutation.
Set Implicit Arguments.
Unset Strict Implicit.
@@ -406,8 +406,8 @@ Qed.
(* clauses.v *)
Unset Implicit Arguments.
-Require Import ZArith List Recdef Stdlib.MSets.MSetInterface Stdlib.Sorting.Mergesort
- Permutation Stdlib.MSets.MSetAVL Stdlib.MSets.MSetRBT.
+From Stdlib Require Import ZArith List Recdef MSets.MSetInterface Sorting.Mergesort
+ Permutation MSets.MSetAVL MSets.MSetRBT.
(** The clause datatype and related definitions and lemmas *)
@@ -958,7 +958,7 @@ constructor 2; auto.
inversion H1; clear H1; subst; simpl; auto.
Qed.
-Require Import Finite_sets_facts.
+From Stdlib Require Import Finite_sets_facts.
(* from msl/Axioms.v: *)
diff --git a/translations/Makefile b/translations/Makefile
index 89e05f363..bbc875a30 100644
--- a/translations/Makefile
+++ b/translations/Makefile
@@ -2,11 +2,11 @@ all: Makefile.coq
$(MAKE) -f Makefile.coq TIMED=$(TIMED)
_CoqProject: _CoqProject.in metacoq-config
- cat metacoq-config > _CoqProject
+ cat metacoq-config > _CoqProject
cat _CoqProject.in >> _CoqProject
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
clean: Makefile.coq
$(MAKE) -f Makefile.coq clean
diff --git a/translations/param_generous_unpacked.v b/translations/param_generous_unpacked.v
index 616655691..11f18dbd7 100644
--- a/translations/param_generous_unpacked.v
+++ b/translations/param_generous_unpacked.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
From MetaCoq.Template Require Import utils All.
From MetaCoq.Translations Require Import translation_utils.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
(* Import BasicAst. *)
Reserved Notation "'tsl_ty_param'".
@@ -594,5 +594,5 @@ elim/typing_ind: H => {Γ t T} Γ.
-Require Import Vector.
+From Stdlib Require Import Vector.
(* MetaCoq Run (ΣE <- tTranslate ([],[]) "nat" ;; *)
diff --git a/translations/param_original.v b/translations/param_original.v
index 2173bcc0b..d60914b52 100644
--- a/translations/param_original.v
+++ b/translations/param_original.v
@@ -257,7 +257,7 @@ Module Vectors.
MetaCoq Run (Translate nat_TC "t").
End Vectors.
-Require Import Even.
+From Stdlib Require Import Even.
MetaCoq Run (Translate nat_TC "even").
Definition rev_type := forall A, list A -> list A.
@@ -267,7 +267,7 @@ MetaCoq Run (TC <- Translate emptyTC "list" ;;
-Require Import MiniHoTT.
+From Stdlib Require Import MiniHoTT.
Module Axioms.
Definition UIP := forall A (x y : A) (p q : x = y), p = q.
diff --git a/utils/Makefile b/utils/Makefile
index dd316847e..b62a205a4 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -21,7 +21,7 @@ mrproper:
rm -f Makefile.coq
Makefile.coq: _CoqProject
- coq_makefile -f _CoqProject -o Makefile.coq
+ rocq makefile -f _CoqProject -o Makefile.coq
.merlin: Makefile.coq
$(MAKE) -f $< $@
diff --git a/utils/theories/All_Forall.v b/utils/theories/All_Forall.v
index f4e835245..d65849b43 100644
--- a/utils/theories/All_Forall.v
+++ b/utils/theories/All_Forall.v
@@ -1,4 +1,4 @@
-From Coq Require Import List Bool Arith ssreflect ssrbool Morphisms Lia Utf8.
+From Stdlib Require Import List Bool Arith ssreflect ssrbool Morphisms Lia Utf8.
From MetaCoq.Utils Require Import MCPrelude MCReflect MCList MCRelations MCProd MCOption.
From Equations Require Import Equations.
diff --git a/utils/theories/ByteCompare.v b/utils/theories/ByteCompare.v
index b83f5691e..3b23f03b1 100644
--- a/utils/theories/ByteCompare.v
+++ b/utils/theories/ByteCompare.v
@@ -1,4 +1,4 @@
-From Coq Require Import Strings.Byte NArith.BinNat.
+From Stdlib Require Import Strings.Byte NArith.BinNat.
(* To make byte comparison more efficient and avoid reallocating the same number
many times, we precompute the representation in N. *)
diff --git a/utils/theories/ByteCompareSpec.v b/utils/theories/ByteCompareSpec.v
index 207588924..6526f6a74 100644
--- a/utils/theories/ByteCompareSpec.v
+++ b/utils/theories/ByteCompareSpec.v
@@ -1,4 +1,4 @@
-From Coq Require Import Strings.Byte NArith Eqdep_dec.
+From Stdlib Require Import Strings.Byte NArith Eqdep_dec.
From MetaCoq.Utils Require Import ReflectEq ByteCompare.
From Equations Require Import Equations.
@@ -40,7 +40,7 @@ Proof.
- constructor. now rewrite <- eq.
Qed.
-Require Import MCCompare.
+From MetaCoq Require Import MCCompare.
Definition lt x y := compare x y = Lt.
@@ -76,7 +76,7 @@ Proof.
- constructor. red. now rewrite compare_opp, comp.
Qed.
-From Coq Require Import Lia.
+From Stdlib Require Import Lia.
Lemma lt_trans x y z : lt x y -> lt y z -> lt x z.
Proof.
diff --git a/utils/theories/ByteCompare_opt.v b/utils/theories/ByteCompare_opt.v
index 9502d44dd..f79f713dd 100644
--- a/utils/theories/ByteCompare_opt.v
+++ b/utils/theories/ByteCompare_opt.v
@@ -1,4 +1,4 @@
-From Coq Require Import Byte.
+From Stdlib Require Import Byte.
Definition is_byte_x00 (b : byte) := match b with | x00 => true | _ => false end.
Definition is_byte_x01 (b : byte) := match b with | x01 => true | _ => false end.
diff --git a/utils/theories/LibHypsNaming.v b/utils/theories/LibHypsNaming.v
index 550ae20d3..c7e70e8b1 100644
--- a/utils/theories/LibHypsNaming.v
+++ b/utils/theories/LibHypsNaming.v
@@ -14,7 +14,7 @@
(* Comment this and the Z-dependent lines below if you don't want
ZArith to be loaded *)
-Require Import ZArith.
+From Stdlib Require Import ZArith.
(** ** The custom renaming tactic
This tactic should be redefined along a coq development, it should
@@ -70,12 +70,12 @@ Ltac fallback_rename_hyp h th :=
| false = Nat.eqb _ _ => fresh "beqnat_false"
| Nat.eqb _ _ = false => fresh "beqnat_false"
| Nat.eqb _ _ = _ => fresh "beqnat"
- | Zeq_bool _ _ = true => fresh "eq_Z_true"
- | Zeq_bool _ _ = false => fresh "eq_Z_false"
- | true = Zeq_bool _ _ => fresh "eq_Z_true"
- | false = Zeq_bool _ _ => fresh "eq_Z_false"
- | Zeq_bool _ _ = _ => fresh "eq_Z"
- | _ = Zeq_bool _ _ => fresh "eq_Z"
+ | Z.eqb _ _ = true => fresh "eq_Z_true"
+ | Z.eqb _ _ = false => fresh "eq_Z_false"
+ | true = Z.eqb _ _ => fresh "eq_Z_true"
+ | false = Z.eqb _ _ => fresh "eq_Z_false"
+ | Z.eqb _ _ = _ => fresh "eq_Z"
+ | _ = Z.eqb _ _ => fresh "eq_Z"
| ?f = _ => fresh "eq_" f
| ?f _ = _ => fresh "eq_" f
| ?f _ _ = _ => fresh "eq_" f
diff --git a/utils/theories/MCArith.v b/utils/theories/MCArith.v
index b0a076adb..81d97ccaa 100644
--- a/utils/theories/MCArith.v
+++ b/utils/theories/MCArith.v
@@ -1,4 +1,4 @@
-From Coq Require Import Arith ZArith Lia.
+From Stdlib Require Import Arith ZArith Lia.
Inductive BoolSpecSet (P Q : Prop) : bool -> Set :=
BoolSpecT : P -> BoolSpecSet P Q true | BoolSpecF : Q -> BoolSpecSet P Q false.
@@ -61,7 +61,7 @@ Qed.
(* Missing rewriting theory on natural number orders *)
-Require Import Morphisms Morphisms_Prop.
+From Stdlib Require Import Morphisms Morphisms_Prop.
#[export] Instance proper_S_lt : Morphisms.Proper (lt ==> lt)%signature S.
Proof. red. intros x y h. lia. Qed.
#[export] Instance proper_add_lt_r : Morphisms.Proper (eq ==> lt ==> lt)%signature Nat.add.
diff --git a/utils/theories/MCCompare.v b/utils/theories/MCCompare.v
index 2597bcfe7..537dbfe2a 100644
--- a/utils/theories/MCCompare.v
+++ b/utils/theories/MCCompare.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect Extraction OrderedType Orders.
+From Stdlib Require Import ssreflect Extraction OrderedType Orders.
From Equations Require Import Equations.
Lemma CompareSpec_Proper : Proper (iff ==> iff ==> iff ==> Logic.eq ==> iff) CompareSpec.
diff --git a/utils/theories/MCFSets.v b/utils/theories/MCFSets.v
index 919b1d982..ed4ecd8bf 100644
--- a/utils/theories/MCFSets.v
+++ b/utils/theories/MCFSets.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Equalities Orders OrdersAlt.
-From Coq.FSets Require Import FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
+From Stdlib.Structures Require Import Equalities Orders OrdersAlt.
+From Stdlib.FSets Require Import FMapInterface FMapList FMapAVL FMapFullAVL FMapFacts.
From MetaCoq.Utils Require Import MCReflect MCUtils.
From MetaCoq.Utils.MCTactics Require Import SpecializeUnderBindersBy DestructHead SplitInContext.
From Equations.Prop Require Import Classes.
diff --git a/utils/theories/MCList.v b/utils/theories/MCList.v
index 1b699da01..a9721cfab 100644
--- a/utils/theories/MCList.v
+++ b/utils/theories/MCList.v
@@ -293,7 +293,7 @@ Proof.
intros. simpl. rewrite H. congruence.
Defined.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
Lemma map_skipn {A B} (f : A -> B) (l : list A) (n : nat) : map f (skipn n l) = skipn n (map f l).
Proof.
diff --git a/utils/theories/MCListable.v b/utils/theories/MCListable.v
index dee720445..a6fcbeccf 100644
--- a/utils/theories/MCListable.v
+++ b/utils/theories/MCListable.v
@@ -1,6 +1,6 @@
-From Coq Require Import Lia Arith Bool List Program.
+From Stdlib Require Import Lia Arith Bool List Program.
From MetaCoq.Utils Require Import MCPrelude ReflectEq.
-From Coq.ssr Require Import ssreflect.
+From Stdlib.ssr Require Import ssreflect.
From Equations Require Import Equations.
Import ListNotations.
diff --git a/utils/theories/MCMSets.v b/utils/theories/MCMSets.v
index d256c23a0..24410aca1 100644
--- a/utils/theories/MCMSets.v
+++ b/utils/theories/MCMSets.v
@@ -1,5 +1,5 @@
-From Coq.Structures Require Import Orders.
-From Coq.MSets Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
+From Stdlib.Structures Require Import Orders.
+From Stdlib.MSets Require Import MSetInterface MSetList MSetAVL MSetFacts MSetProperties MSetDecide.
From MetaCoq.Utils Require Import MCReflect.
From Equations.Prop Require Import Classes.
diff --git a/utils/theories/MCOption.v b/utils/theories/MCOption.v
index 05bf8efd0..c3940cdea 100644
--- a/utils/theories/MCOption.v
+++ b/utils/theories/MCOption.v
@@ -1,4 +1,4 @@
-From Coq Require Import List ssreflect ssrbool Arith Morphisms Relation_Definitions.
+From Stdlib Require Import List ssreflect ssrbool Arith Morphisms Relation_Definitions.
From MetaCoq.Utils Require Import MCPrelude MCList MCProd MCReflect ReflectEq.
diff --git a/utils/theories/MCPred.v b/utils/theories/MCPred.v
index 7da5924f8..a8cd3d3fa 100644
--- a/utils/theories/MCPred.v
+++ b/utils/theories/MCPred.v
@@ -1,4 +1,4 @@
-From Coq Require Import List Bool Arith ssreflect ssrbool Morphisms Lia.
+From Stdlib Require Import List Bool Arith ssreflect ssrbool Morphisms Lia.
From MetaCoq.Utils Require Import MCPrelude MCReflect MCList MCRelations MCProd MCOption.
From Equations Require Import Equations.
diff --git a/utils/theories/MCPrelude.v b/utils/theories/MCPrelude.v
index e58b53442..0eec166d5 100644
--- a/utils/theories/MCPrelude.v
+++ b/utils/theories/MCPrelude.v
@@ -1,4 +1,4 @@
-Require Import Ascii String ZArith Lia Morphisms.
+From Stdlib Require Import Ascii String ZArith Lia Morphisms.
From Equations Require Import Equations.
Set Equations Transparent.
@@ -114,7 +114,7 @@ Hint Extern 10 (@eq nat _ _) => lia : terms.
Ltac easy ::= easy0 || solve [intuition eauto 3 with core terms].
-From Coq Require btauto.Algebra.
+From Stdlib Require btauto.Algebra.
#[global]
Hint Extern 5 => progress Algebra.bool : core.
diff --git a/utils/theories/MCProd.v b/utils/theories/MCProd.v
index 3f8a0162b..12fa5104b 100644
--- a/utils/theories/MCProd.v
+++ b/utils/theories/MCProd.v
@@ -1,6 +1,6 @@
-From Coq Require Import Bool RelationClasses.
-Require Import ssreflect.
-Require Import CRelationClasses.
+From Stdlib Require Import Bool RelationClasses.
+From Stdlib Require Import ssreflect.
+From Stdlib Require Import CRelationClasses.
Local Coercion is_true : bool >-> Sortclass.
diff --git a/utils/theories/MCReflect.v b/utils/theories/MCReflect.v
index 9ec78f43c..7e3468099 100644
--- a/utils/theories/MCReflect.v
+++ b/utils/theories/MCReflect.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
-From Coq Require Import Bool.
+From Stdlib Require Import Bool.
From MetaCoq.Utils Require Import MCPrelude.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
(** * Notion of reflection for Type-based properties *)
diff --git a/utils/theories/MCRelations.v b/utils/theories/MCRelations.v
index a2fe36e2b..a28d10fbd 100644
--- a/utils/theories/MCRelations.v
+++ b/utils/theories/MCRelations.v
@@ -1,7 +1,7 @@
(* Distributed under the terms of the MIT license. *)
-Require Import ssreflect.
-Require Import Equations.Type.Relation Equations.Type.Relation_Properties.
-Require Import CRelationClasses.
+From Stdlib Require Import ssreflect.
+From Equations.Type Require Import Relation Relation_Properties.
+From Stdlib Require Import CRelationClasses.
Require RelationClasses.
#[global] Hint Mode Reflexive ! ! : typeclass_instances.
diff --git a/utils/theories/MCString.v b/utils/theories/MCString.v
index 898aaa909..cafb1abdf 100644
--- a/utils/theories/MCString.v
+++ b/utils/theories/MCString.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool Decimal DecimalString ZArith.
+From Stdlib Require Import ssreflect ssrbool Decimal DecimalString ZArith.
From MetaCoq.Utils Require Import MCCompare bytestring ReflectEq.
Local Open Scope bs.
diff --git a/utils/theories/MCTactics/DestructHead.v b/utils/theories/MCTactics/DestructHead.v
index 5424dba37..924a685ed 100644
--- a/utils/theories/MCTactics/DestructHead.v
+++ b/utils/theories/MCTactics/DestructHead.v
@@ -1,5 +1,5 @@
-Require Import MetaCoq.Utils.MCTactics.Head.
-Require Import MetaCoq.Utils.MCTactics.DestructHyps.
+From MetaCoq Require Import Utils.MCTactics.Head.
+From MetaCoq Require Import Utils.MCTactics.DestructHyps.
Ltac destruct_head_matcher T HT :=
match head HT with
diff --git a/utils/theories/MCTactics/GeneralizeOverHoles.v b/utils/theories/MCTactics/GeneralizeOverHoles.v
index 2ee552979..27450c82e 100644
--- a/utils/theories/MCTactics/GeneralizeOverHoles.v
+++ b/utils/theories/MCTactics/GeneralizeOverHoles.v
@@ -1,5 +1,5 @@
-Require Import MetaCoq.Utils.MCTactics.Zeta1.
-Require Import Coq.ssr.ssreflect.
+From MetaCoq Require Import Utils.MCTactics.Zeta1.
+From Stdlib Require Import ssr.ssreflect.
Ltac generalize_over_holes tac :=
zeta1 (ltac:(let H := fresh in
diff --git a/utils/theories/MCTactics/InHypUnderBindersDo.v b/utils/theories/MCTactics/InHypUnderBindersDo.v
index d53adc674..b31d67cc6 100644
--- a/utils/theories/MCTactics/InHypUnderBindersDo.v
+++ b/utils/theories/MCTactics/InHypUnderBindersDo.v
@@ -1,6 +1,6 @@
-Require Import MetaCoq.Utils.MCTactics.SpecializeBy.
-Require Import MetaCoq.Utils.MCTactics.GeneralizeOverHoles.
-Require Import MetaCoq.Utils.MCTactics.UniquePose.
+From MetaCoq Require Import Utils.MCTactics.SpecializeBy.
+From MetaCoq Require Import Utils.MCTactics.GeneralizeOverHoles.
+From MetaCoq Require Import Utils.MCTactics.UniquePose.
Ltac guarded_in_hyp_term_under_binders_do' guard_tac H tac :=
let is_transparent := match goal with
diff --git a/utils/theories/MCTactics/SpecializeUnderBindersBy.v b/utils/theories/MCTactics/SpecializeUnderBindersBy.v
index 9b701dde5..76f3e1d66 100644
--- a/utils/theories/MCTactics/SpecializeUnderBindersBy.v
+++ b/utils/theories/MCTactics/SpecializeUnderBindersBy.v
@@ -1,6 +1,6 @@
-Require Import MetaCoq.Utils.MCTactics.SpecializeBy.
-Require Import MetaCoq.Utils.MCTactics.UniquePose.
-Require Import MetaCoq.Utils.MCTactics.GeneralizeOverHoles.
+From MetaCoq Require Import Utils.MCTactics.SpecializeBy.
+From MetaCoq Require Import Utils.MCTactics.UniquePose.
+From MetaCoq Require Import Utils.MCTactics.GeneralizeOverHoles.
Ltac guarded_specialize_term_under_binders_by' guard_tac H tac :=
lazymatch type of H with
diff --git a/utils/theories/MCTactics/UniquePose.v b/utils/theories/MCTactics/UniquePose.v
index 1c1342bef..d339d909c 100644
--- a/utils/theories/MCTactics/UniquePose.v
+++ b/utils/theories/MCTactics/UniquePose.v
@@ -1,4 +1,4 @@
-Require Import MetaCoq.Utils.MCTactics.FindHyp.
+From MetaCoq.Utils Require Import MCTactics.FindHyp.
(** [pose proof defn], but only if no hypothesis of the same type exists.
most useful for proofs of a proposition *)
diff --git a/utils/theories/MCUtils.v b/utils/theories/MCUtils.v
index 15dba02bb..77be98d8b 100644
--- a/utils/theories/MCUtils.v
+++ b/utils/theories/MCUtils.v
@@ -1,4 +1,4 @@
-From Coq Require Import Nat ZArith Bool.
+From Stdlib Require Import Nat ZArith Bool.
From MetaCoq.Utils Require Export MCPrelude
MCReflect
@@ -202,7 +202,7 @@ Qed.
Axiom todo : string -> forall {A}, A.
Ltac todo s := exact (todo s).
-From Coq Require Import Extraction.
+From Stdlib Require Import Extraction.
Extract Constant todo => "fun s -> failwith (Caml_bytestring.caml_string_of_bytestring s)".
From Ltac2 Require Import Init.
diff --git a/utils/theories/MC_ExtrOCamlInt63.v b/utils/theories/MC_ExtrOCamlInt63.v
index 3d931bf57..2132f3aee 100644
--- a/utils/theories/MC_ExtrOCamlInt63.v
+++ b/utils/theories/MC_ExtrOCamlInt63.v
@@ -10,7 +10,7 @@
(** Extraction to OCaml of native 63-bit machine integers. *)
-From Coq Require Uint63 Sint63 Extraction.
+From Stdlib Require Uint63 Sint63 Extraction.
(** Basic data types used by some primitive operators. *)
diff --git a/utils/theories/MC_ExtrOCamlNatInt.v b/utils/theories/MC_ExtrOCamlNatInt.v
index 620dbd648..4323b9187 100644
--- a/utils/theories/MC_ExtrOCamlNatInt.v
+++ b/utils/theories/MC_ExtrOCamlNatInt.v
@@ -12,8 +12,8 @@
Require Coq.extraction.Extraction.
-Require Import Arith Even Div2 EqNat Euclid.
-Require Import ExtrOcamlBasic.
+From Stdlib Require Import Arith Even Div2 EqNat Euclid.
+From Stdlib Require Import ExtrOcamlBasic.
(** Disclaimer: trying to obtain efficient certified programs
by extracting [nat] into [int] is definitively *not* a good idea:
diff --git a/utils/theories/MC_ExtrOCamlZPosInt.v b/utils/theories/MC_ExtrOCamlZPosInt.v
index dcc9efaae..6e74c80e4 100644
--- a/utils/theories/MC_ExtrOCamlZPosInt.v
+++ b/utils/theories/MC_ExtrOCamlZPosInt.v
@@ -1,5 +1,5 @@
-From Coq Require Import Extraction NArith ZArith.
+From Stdlib Require Import Extraction NArith ZArith.
(** Disclaimer: trying to obtain efficient certified programs
by extracting [Z] into [int] is definitively *not* a good idea.
diff --git a/utils/theories/ReflectEq.v b/utils/theories/ReflectEq.v
index 7eda6a046..60a23cb52 100644
--- a/utils/theories/ReflectEq.v
+++ b/utils/theories/ReflectEq.v
@@ -1,4 +1,4 @@
-From Coq Require Import ssreflect ssrbool List.
+From Stdlib Require Import ssreflect ssrbool List.
From Equations Require Import Equations.
Import ListNotations.
diff --git a/utils/theories/Show.v b/utils/theories/Show.v
index e0c08e214..5f1d6ed36 100644
--- a/utils/theories/Show.v
+++ b/utils/theories/Show.v
@@ -1,4 +1,4 @@
-From Coq Require Import PArith Sint63 String Uint63 PrimFloat SpecFloat FloatOps PString.
+From Stdlib Require Import PArith Sint63 String Uint63 PrimFloat SpecFloat FloatOps PString.
From MetaCoq.Utils Require Import bytestring MCString.
(* Circumventing https://github.com/coq/coq/issues/19150 (via PString). *)
diff --git a/utils/theories/bytestring.v b/utils/theories/bytestring.v
index a0b6ea0cf..68c62602e 100644
--- a/utils/theories/bytestring.v
+++ b/utils/theories/bytestring.v
@@ -6,10 +6,10 @@
* see repository root for details.
*)
-Require Coq.Strings.String ssrbool.
-Require Import ssreflect.
-Require Import Coq.NArith.NArith.
-From Coq Require Import Lia.
+From Stdlib Require Strings.String ssrbool.
+From Stdlib Require Import ssreflect.
+From Stdlib Require Import NArith.NArith.
+From Stdlib Require Import Lia.
From Equations Require Import Equations.
Set Primitive Projections.
Set Default Proof Using "Type".
@@ -196,7 +196,7 @@ Notation "x ++ y" := (String.append x y) : bs_scope.
Import String.
(** comparison *)
-From Coq Require Import Orders OrderedType OrdersAlt.
+From Stdlib Require Import Orders OrderedType OrdersAlt.
Lemma to_N_inj : forall x y, Byte.to_N x = Byte.to_N y <-> x = y.
Proof.
diff --git a/utils/theories/canonicaltries/CanonicalTries.v b/utils/theories/canonicaltries/CanonicalTries.v
index 7b358173c..4b5ecbea4 100644
--- a/utils/theories/canonicaltries/CanonicalTries.v
+++ b/utils/theories/canonicaltries/CanonicalTries.v
@@ -5,7 +5,7 @@
Copyright: Andrew W. Appel and Inria.
License: BSD-3-Clause. *)
-From Coq Require Import Program FunctionalExtensionality.
+From Stdlib Require Import Program FunctionalExtensionality.
From MetaCoq.Utils Require Import String2pos.
(* To avoid useless definitions of inductors in extracted code. *)
diff --git a/utils/theories/canonicaltries/String2pos.v b/utils/theories/canonicaltries/String2pos.v
index b722258e1..cb1dda0fc 100644
--- a/utils/theories/canonicaltries/String2pos.v
+++ b/utils/theories/canonicaltries/String2pos.v
@@ -1,7 +1,7 @@
(** Convert strings to positive numbers.
The encoding used is the trivial one (8 bits per character). *)
-From Coq Require Import String Ascii ZArith Extraction.
+From Stdlib Require Import String Ascii ZArith Extraction.
From Equations Require Import Equations.
Inductive positive : Set :=
diff --git a/utils/theories/monad_utils.v b/utils/theories/monad_utils.v
index e417e82ba..37123403d 100644
--- a/utils/theories/monad_utils.v
+++ b/utils/theories/monad_utils.v
@@ -1,4 +1,4 @@
-Require Import Arith List.
+From Stdlib Require Import Arith List.
From MetaCoq.Utils Require Import All_Forall MCSquash.
From Equations Require Import Equations.
Coercion is_true : bool >-> Sortclass.
diff --git a/utils/theories/utils.v b/utils/theories/utils.v
index 494979635..5a72a35fd 100644
--- a/utils/theories/utils.v
+++ b/utils/theories/utils.v
@@ -4,7 +4,7 @@
(** If you don't want to have the following scopes opened you should *)
(** not import this file or close them. *)
-From Coq Require Export Bool ZArith Arith Lia List.
+From Stdlib Require Export Bool ZArith Arith Lia List.
From MetaCoq.Utils Require Export MCUtils monad_utils.
diff --git a/utils/theories/wGraph.v b/utils/theories/wGraph.v
index 2c6bd1d47..ad5a73d23 100644
--- a/utils/theories/wGraph.v
+++ b/utils/theories/wGraph.v
@@ -1,7 +1,7 @@
-Require Import ZArith Zcompare Lia ssrbool.
-Require Import MSetAVL MSetFacts MSetProperties.
+From Stdlib Require Import ZArith Zcompare Lia ssrbool.
+From Stdlib Require Import MSetAVL MSetFacts MSetProperties.
From MetaCoq.Utils Require Import MCUtils.
-Require Import ssreflect.
+From Stdlib Require Import ssreflect.
From Equations Require Import Equations.
Local Open Scope Z_scope.
@@ -274,7 +274,7 @@ End Nbar.
Import Nbar.
-Require Import MSetDecide MSetInterface.
+From Stdlib Require Import MSetDecide MSetInterface.
Module WeightedGraph (V : UsualOrderedType) (VSet : MSetInterface.S with Module E := V).
Module VSetFact := WFactsOn V VSet.