@@ -144,23 +144,23 @@ Reserved Notation "'wf_local' Σ Γ " (at level 9, Σ, Γ at next level).
144144
145145Reserved Notation " Σ ;;; Γ |- t : T " (at level 50, Γ, t, T at next level).
146146
147- Variant case_side_conditions `{checker_flags} wf_local_fun typing Σ Γ ci p ps mdecl idecl indices predctx :=
147+ Variant case_side_conditions `{checker_flags} wf_local_funΣ typingΣ Σ Γ ci p ps mdecl idecl indices predctx :=
148148| case_side_info
149149 (eq_npars : mdecl.(ind_npars) = ci.(ci_npar))
150150 (wf_pred : wf_predicate mdecl idecl p)
151151 (cons : consistent_instance_ext Σ (ind_universes mdecl) p.(puinst))
152- (wf_pctx : wf_local_fun Σ (Γ ,,, predctx))
152+ (wf_pctx : wf_local_funΣ (Γ ,,, predctx))
153153 (* The predicate context is fixed, it is only used as a cache for information from the
154154 global environment *)
155155 (conv_pctx : eq_context_upto_names p.(pcontext) (ind_predicate_context ci.(ci_ind) mdecl idecl))
156156 (allowed_elim : is_allowed_elimination Σ idecl.(ind_kelim) ps)
157157 (elim_relevance : isSortRel ps ci.(ci_relevance))
158- (ind_inst : ctx_inst (typing Σ) Γ (p.(pparams) ++ indices)
158+ (ind_inst : ctx_inst typingΣ Γ (p.(pparams) ++ indices)
159159 (List.rev (subst_instance p.(puinst)
160160 (ind_params mdecl ,,, ind_indices idecl : context))))
161161 (not_cofinite : isCoFinite mdecl.(ind_finite) = false).
162162
163- Variant case_branch_typing `{checker_flags} wf_local_fun typing Σ Γ (ci:case_info) p ps mdecl idecl ptm brs :=
163+ Variant case_branch_typing `{checker_flags} wf_local_funΣ typingΣ Γ (ci:case_info) p ps mdecl idecl ptm brs :=
164164| case_branch_info
165165 (wf_brs : wf_branches idecl brs)
166166 (brs_ty :
@@ -169,23 +169,23 @@ Variant case_branch_typing `{checker_flags} wf_local_fun typing Σ Γ (ci:case_i
169169 parameters and universe instance *)
170170 eq_context_upto_names br.(bcontext) (cstr_branch_context ci mdecl cdecl) ×
171171 let brctxty := case_branch_type ci.(ci_ind) mdecl idecl p br ptm i cdecl in
172- (wf_local_fun Σ (Γ ,,, brctxty.1) ×
173- ((typing Σ (Γ ,,, brctxty.1) br.(bbody) (brctxty.2)) ×
174- (typing Σ (Γ ,,, brctxty.1) brctxty.2 (tSort ps)))))
172+ (wf_local_funΣ (Γ ,,, brctxty.1) ×
173+ ((typingΣ (Γ ,,, brctxty.1) br.(bbody) (brctxty.2)) ×
174+ (typingΣ (Γ ,,, brctxty.1) brctxty.2 (tSort ps)))))
175175 0 idecl.(ind_ctors) brs).
176176
177177Variant primitive_typing_hyps `{checker_flags}
178- (typing : forall (Σ : global_env_ext) (Γ : context), term -> term -> Type )
178+ (typingΣ : forall (Γ : context), term -> term -> Type )
179179 Σ Γ : prim_val term -> Type :=
180- | prim_int_hyps i : primitive_typing_hyps typing Σ Γ (primInt; primIntModel i)
181- | prim_float_hyps f : primitive_typing_hyps typing Σ Γ (primFloat; primFloatModel f)
182- | prim_string_hyps s : primitive_typing_hyps typing Σ Γ (primString; primStringModel s)
180+ | prim_int_hyps i : primitive_typing_hyps typingΣ Σ Γ (primInt; primIntModel i)
181+ | prim_float_hyps f : primitive_typing_hyps typingΣ Σ Γ (primFloat; primFloatModel f)
182+ | prim_string_hyps s : primitive_typing_hyps typingΣ Σ Γ (primString; primStringModel s)
183183| prim_array_hyps a
184184 (wfl : wf_universe Σ (Universe.make' a.(array_level)))
185- (hty : typing Σ Γ a.(array_type) (tSort (sType (Universe .make' a.(array_level)))))
186- (hdef : typing Σ Γ a.(array_default) a.(array_type))
187- (hvalue : All (fun x => typing Σ Γ x a.(array_type)) a.(array_value)) :
188- primitive_typing_hyps typing Σ Γ (primArray; primArrayModel a).
185+ (hty : typingΣ Γ a.(array_type) (tSort (sType (Universe .make' a.(array_level)))))
186+ (hdef : typingΣ Γ a.(array_default) a.(array_type))
187+ (hvalue : All (fun x => typingΣ Γ x a.(array_type)) a.(array_value)) :
188+ primitive_typing_hyps typingΣ Σ Γ (primArray; primArrayModel a).
189189Derive Signature for primitive_typing_hyps.
190190
191191Equations prim_type (p : prim_val term) (cst : kername) : term :=
@@ -253,9 +253,9 @@ Inductive typing `{checker_flags} (Σ : global_env_ext) (Γ : context) : term ->
253253 declared_inductive Σ ci.(ci_ind) mdecl idecl ->
254254 Σ ;;; Γ ,,, predctx |- p.(preturn) : tSort ps ->
255255 Σ ;;; Γ |- c : mkApps (tInd ci.(ci_ind) p.(puinst)) (p.(pparams) ++ indices) ->
256- case_side_conditions (fun Σ Γ => wf_local Σ Γ) typing Σ Γ ci p ps
256+ case_side_conditions (fun Γ => wf_local Σ Γ) ( typing Σ) Σ Γ ci p ps
257257 mdecl idecl indices predctx ->
258- case_branch_typing (fun Σ Γ => wf_local Σ Γ) typing Σ Γ ci p ps
258+ case_branch_typing (fun Γ => wf_local Σ Γ) ( typing Σ) Γ ci p ps
259259 mdecl idecl ptm brs ->
260260 Σ ;;; Γ |- tCase ci p c brs : mkApps ptm (indices ++ [c])
261261
@@ -288,7 +288,7 @@ Inductive typing `{checker_flags} (Σ : global_env_ext) (Γ : context) : term ->
288288 primitive_constant Σ (prim_val_tag p) = Some prim_ty ->
289289 declared_constant Σ prim_ty cdecl ->
290290 primitive_invariants (prim_val_tag p) cdecl ->
291- primitive_typing_hyps typing Σ Γ p ->
291+ primitive_typing_hyps ( typing Σ) Σ Γ p ->
292292 Σ ;;; Γ |- tPrim p : prim_type p prim_ty
293293
294294| type_Cumul : forall t A B s,
@@ -422,7 +422,7 @@ Section PrimitiveSize.
422422 Context {cf} (typing : global_env_ext -> context -> term -> term -> Type )
423423 (typing_size : forall {Σ Γ t T}, typing Σ Γ t T -> size).
424424
425- Definition primitive_typing_hyps_size Σ Γ p (h : primitive_typing_hyps typing Σ Γ p) : size.
425+ Definition primitive_typing_hyps_size Σ Γ p (h : primitive_typing_hyps ( typing Σ) Σ Γ p) : size.
426426 destruct h.
427427 - exact 0.
428428 - exact 0.
@@ -805,8 +805,8 @@ Lemma typing_ind_env_app_size `{cf : checker_flags} :
805805 primitive_constant Σ (prim_val_tag p) = Some prim_ty ->
806806 declared_constant Σ prim_ty cdecl ->
807807 primitive_invariants (prim_val_tag p) cdecl ->
808- primitive_typing_hyps typing Σ Γ p ->
809- primitive_typing_hyps P Σ Γ p ->
808+ primitive_typing_hyps ( typing Σ) Σ Γ p ->
809+ primitive_typing_hyps (P Σ) Σ Γ p ->
810810 P Σ Γ (tPrim p) (prim_type p prim_ty)) ->
811811
812812 (forall Σ (wfΣ : wf Σ.1) (Γ : context) (wfΓ : wf_local Σ Γ) (t A B : term) s,
@@ -1268,8 +1268,8 @@ Lemma typing_ind_env `{cf : checker_flags} :
12681268 primitive_constant Σ (prim_val_tag p) = Some prim_ty ->
12691269 declared_constant Σ prim_ty cdecl ->
12701270 primitive_invariants (prim_val_tag p) cdecl ->
1271- primitive_typing_hyps typing Σ Γ p ->
1272- primitive_typing_hyps P Σ Γ p ->
1271+ primitive_typing_hyps ( typing Σ) Σ Γ p ->
1272+ primitive_typing_hyps (P Σ) Σ Γ p ->
12731273 P Σ Γ (tPrim p) (prim_type p prim_ty)) ->
12741274
12751275 (forall Σ (wfΣ : wf Σ.1) (Γ : context) (wfΓ : wf_local Σ Γ) (t A B : term) s,
0 commit comments