@@ -9,7 +9,7 @@ Module Type Term.
9
9
Parameter Inline term : Type.
10
10
11
11
Parameter Inline tRel : nat -> term.
12
- Parameter Inline tSort : Universe .t -> term.
12
+ Parameter Inline tSort : Sort .t -> term.
13
13
Parameter Inline tProd : aname -> term -> term -> term.
14
14
Parameter Inline tLambda : aname -> term -> term -> term.
15
15
Parameter Inline tLetIn : aname -> term -> term -> term -> term.
@@ -129,7 +129,7 @@ Module Environment (T : Term).
129
129
Import T.
130
130
#[global] Existing Instance subst_instance_constr.
131
131
132
- Definition typ_or_sort := typ_or_sort_ term.
132
+ Definition judgment := judgment_ Sort.t term.
133
133
134
134
(** ** Declarations *)
135
135
Notation context_decl := (context_decl term).
@@ -344,7 +344,7 @@ Module Environment (T : Term).
344
344
Record one_inductive_body := {
345
345
ind_name : ident;
346
346
ind_indices : context; (* Indices of the inductive types, under params *)
347
- ind_sort : Universe .t; (* Sort of the inductive. *)
347
+ ind_sort : Sort .t; (* Sort of the inductive. *)
348
348
ind_type : term; (* Closed arity = forall mind_params, ind_indices, tSort ind_sort *)
349
349
ind_kelim : allowed_eliminations; (* Allowed eliminations *)
350
350
ind_ctors : list constructor_body;
@@ -856,10 +856,10 @@ Module Environment (T : Term).
856
856
Definition primitive_invariants (p : prim_tag) (cdecl : constant_body) :=
857
857
match p with
858
858
| primInt | primFloat =>
859
- [/\ cdecl.(cst_type) = tSort Universe .type0, cdecl.(cst_body) = None &
859
+ [/\ cdecl.(cst_type) = tSort Sort .type0, cdecl.(cst_body) = None &
860
860
cdecl.(cst_universes) = Monomorphic_ctx]
861
861
| primArray =>
862
- let s := Universe.make (Level.lvar 0) in
862
+ let s := sType ( Universe.make' (Level.lvar 0) ) in
863
863
[/\ cdecl.(cst_type) = tImpl (tSort s) (tSort s), cdecl.(cst_body) = None &
864
864
cdecl.(cst_universes) = Polymorphic_ctx array_uctx]
865
865
end .
@@ -882,12 +882,6 @@ Module Environment (T : Term).
882
882
883
883
Definition program : Type := global_env * term.
884
884
885
- (* TODO MOVE AstUtils factorisation *)
886
-
887
- Definition app_context (Γ Γ' : context) : context := Γ' ++ Γ.
888
- Notation "Γ ,,, Γ'" :=
889
- (app_context Γ Γ') (at level 25, Γ' at next level, left associativity).
890
-
891
885
(** Make a lambda/let-in string of abstractions from a context [Γ], ending with term [t]. *)
892
886
893
887
Definition mkLambda_or_LetIn d t :=
@@ -1008,30 +1002,6 @@ Module Environment (T : Term).
1008
1002
Proof . unfold arities_context. now rewrite rev_map_length. Qed .
1009
1003
#[global] Hint Rewrite arities_context_length : len.
1010
1004
1011
- Lemma app_context_nil_l Γ : [] ,,, Γ = Γ.
1012
- Proof .
1013
- unfold app_context. rewrite app_nil_r. reflexivity.
1014
- Qed .
1015
-
1016
- Lemma app_context_assoc Γ Γ' Γ'' : Γ ,,, (Γ' ,,, Γ'') = Γ ,,, Γ' ,,, Γ''.
1017
- Proof . unfold app_context; now rewrite app_assoc. Qed .
1018
-
1019
- Lemma app_context_cons Γ Γ' A : Γ ,,, (Γ' ,, A) = (Γ ,,, Γ') ,, A.
1020
- Proof . exact (app_context_assoc _ _ [A]). Qed .
1021
-
1022
- Lemma app_context_length Γ Γ' : #|Γ ,,, Γ'| = #|Γ'| + #|Γ|.
1023
- Proof . unfold app_context. now rewrite app_length. Qed .
1024
- #[global] Hint Rewrite app_context_length : len.
1025
-
1026
- Lemma nth_error_app_context_ge v Γ Γ' :
1027
- #|Γ'| <= v -> nth_error (Γ ,,, Γ') v = nth_error Γ (v - #|Γ'|).
1028
- Proof . apply nth_error_app_ge. Qed .
1029
-
1030
- Lemma nth_error_app_context_lt v Γ Γ' :
1031
- v < #|Γ'| -> nth_error (Γ ,,, Γ') v = nth_error Γ' v.
1032
- Proof . apply nth_error_app_lt. Qed .
1033
-
1034
-
1035
1005
Definition map_mutual_inductive_body f m :=
1036
1006
match m with
1037
1007
| Build_mutual_inductive_body finite ind_npars ind_pars ind_bodies ind_universes ind_variance =>
@@ -1269,7 +1239,7 @@ End EnvironmentDecideReflectInstances.
1269
1239
Module Type TermUtils (T: Term) (E: EnvironmentSig T).
1270
1240
Import T E.
1271
1241
1272
- Parameter Inline destArity : context -> term -> option (context × Universe .t).
1242
+ Parameter Inline destArity : context -> term -> option (context × Sort .t).
1273
1243
Parameter Inline inds : kername -> Instance.t -> list one_inductive_body -> list term.
1274
1244
1275
1245
End TermUtils.
0 commit comments