fact
stringlengths 2
32.6k
| type
stringclasses 10
values | library
stringclasses 5
values | imports
stringclasses 205
values | filename
stringclasses 216
values | symbolic_name
stringlengths 1
67
| index_level
int64 0
10.5k
|
---|---|---|---|---|---|---|
{Pc Qc Ps Qs} {j} : forall tu: lift_sorting Pc Ps j, let s := tu.2.π1 in option_default (fun tm => Pc tm (j_typ j) -> Qc tm (j_typ j)) (j_term j) unit -> (Ps (j_typ j) s -> Qs (j_typ j) s) -> lift_sorting Qc Qs j. Proof. relativize (lift_sorting Qc Qs j). 1: apply lift_sorting_f_it_impl with (f := id). destruct j, j_term => //. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_it_impl | 400 |
{Pc Qc Ps Qs tm t u} : forall f fu, lift_sorting Pc Ps (Judge tm t u) -> (forall t T, Pc t T -> Qc (f t) (f T)) -> (forall t u, Ps t u -> Qs (f t) (fu u)) -> lift_sorting Qc Qs (Judge (option_map f tm) (f t) (option_map fu u)). Proof. intros ?? tu ??. apply lift_sorting_fu_it_impl with (tu := tu); auto. destruct tm => //=. auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_fu_impl | 401 |
{P Q tm t u} : forall f fu, lift_typing0 P (Judge tm t u) -> (forall t T, P t T -> Q (f t) (f T)) -> (forall u, f (tSort u) = tSort (fu u)) -> lift_typing0 Q (Judge (option_map f tm) (f t) (option_map fu u)). Proof. intros ?? HT HPQ Hf. apply lift_sorting_fu_impl with (1 := HT); tas. intros; rewrite -Hf; now apply HPQ. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_fu_impl | 402 |
{Pc Qc Ps Qs j} : forall f, lift_sorting Pc Ps j -> (forall t T, Pc t T -> Qc (f t) (f T)) -> (forall t u, Ps t u -> Qs (f t) u) -> lift_sorting Qc Qs (judgment_map f j). Proof. intros ? tu ??. apply lift_sorting_f_it_impl with (tu := tu); auto. destruct j_term => //=. auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_f_impl | 403 |
{P Q j} : forall f, lift_typing0 P j -> (forall t T, P t T -> Q (f t) (f T)) -> (forall u, f (tSort u) = tSort u) -> lift_typing0 Q (judgment_map f j). Proof. intros ? HT HPQ Hf. apply lift_sorting_f_impl with (1 := HT); tas. intros; rewrite -Hf; now apply HPQ. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_f_impl | 404 |
{P} f j : lift_typing0 (fun t T => P (f t) (f T)) j -> (forall u, f (tSort u) = tSort u) -> lift_typing0 P (judgment_map f j). Proof. intros HT Hf. apply lift_typing_f_impl with (1 := HT) => //. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_map | 405 |
{P} f fu {tm ty u} : lift_typing0 (fun t T => P (f t) (f T)) (Judge tm ty u) -> (forall u, f (tSort u) = tSort (fu u)) -> lift_typing0 P (Judge (option_map f tm) (f ty) (option_map fu u)). Proof. intros HT. eapply lift_typing_fu_impl with (1 := HT) => //. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_mapu | 406 |
{Pc Qc Ps Qs j} : lift_sorting Pc Ps j -> (forall t T, Pc t T -> Qc t T) -> (forall t u, Ps t u -> Qs t u) -> lift_sorting Qc Qs j. Proof. intros tu ??. apply lift_sorting_it_impl with (tu := tu); auto. destruct j_term => //=. auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_impl | 407 |
{P Q j} : lift_typing0 P j -> (forall t T, P t T -> Q t T) -> lift_typing0 Q j. Proof. intros HT HPQ. apply lift_sorting_impl with (1 := HT); tas. intros; now apply HPQ. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_impl | 408 |
context -> Type := | localenv_nil : All_local_env [] | localenv_cons_abs Γ na t : All_local_env Γ -> typing Γ (j_vass na t) -> All_local_env (Γ ,, vass na t) | localenv_cons_def Γ na b t : All_local_env Γ -> typing Γ (j_vdef na b t) -> All_local_env (Γ ,, vdef na b t). | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env | 409 |
{typing Γ na bo t} : All_local_env typing Γ -> typing Γ (TermoptTyp bo t) -> All_local_env typing (Γ ,, mkdecl na bo t) := match bo with None => localenv_cons_abs | Some b => localenv_cons_def end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | localenv_cons | 410 |
{P Γ decl} : All_local_env P Γ -> on_local_decl P Γ decl -> All_local_env P (Γ ,, decl) := match decl with mkdecl na bo t => localenv_cons end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_snoc | 411 |
{typing Γ decl} : All_local_env typing (Γ ,, decl) -> All_local_env typing Γ × on_local_decl typing Γ decl. Proof. intros wfΓ; depelim wfΓ. all: split; assumption. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_tip | 412 |
typing P : P [] -> (forall Γ decl, P Γ -> on_local_decl typing Γ decl -> P (Γ ,, decl)) -> forall Γ, All_local_env typing Γ -> P Γ. Proof. induction Γ => //. move/All_local_env_tip => [] ??. now apply X0. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_ind1 | 413 |
(P : context -> judgment -> Type) f Γ : All_local_env (fun Γ j => P (map (map_decl f) Γ) (judgment_map f j)) Γ -> All_local_env P (map (map_decl f) Γ). Proof using Type. induction 1; econstructor; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_map | 414 |
P f Γ : All_local_env (fun Γ j => P (fold_context_k f Γ) (judgment_map (f #|Γ|) j)) Γ <~> All_local_env P (fold_context_k f Γ). Proof. split. - induction 1; simpl; try unfold snoc; rewrite ?fold_context_k_snoc0; try constructor; auto. - induction Γ; simpl; try unfold snoc; rewrite ?fold_context_k_snoc0; intros H. * constructor. * destruct a as [na [b|] ty]; depelim H; specialize (IHΓ H); constructor; simpl; auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_fold | 415 |
(P Q : context -> judgment -> Type) l : All_local_env P l -> (forall Γ decl, P Γ (j_decl decl) -> Q Γ (j_decl decl)) -> All_local_env Q l. Proof. intros H X. induction H using All_local_env_ind1. 1: constructor. apply All_local_env_snoc; auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_impl_gen | 416 |
(P Q : context -> judgment -> Type) l : All_local_env P l -> (forall Γ j, P Γ j -> Q Γ j) -> All_local_env Q l. Proof. induction 1; intros; simpl; econstructor; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_impl | 417 |
{P Q : context -> judgment -> Type} {l} : All_local_env P l -> (forall Γ j, All_local_env Q Γ -> P Γ j -> Q Γ j) -> All_local_env Q l. Proof. induction 1; intros; simpl; econstructor; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_impl_ind | 418 |
{P Γ} n : All_local_env P Γ -> All_local_env P (skipn n Γ). Proof. intros hΓ. induction n in Γ, hΓ |- * => //. destruct Γ; cbn; eauto. apply All_local_env_tip in hΓ as []. eauto. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_skipn | 419 |
{P Γ Δ} n : All_local_env P (Γ ,,, Δ) -> All_local_env P (Γ ,,, skipn n Δ). Proof. intros hΓ. induction n in Δ, hΓ |- * => //. destruct Δ; cbn; eauto. apply All_local_env_tip in hΓ as []. eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_app_skipn | 420 |
{P Γ n decl} : All_local_env P Γ -> nth_error Γ n = Some decl -> on_local_decl P (skipn (S n) Γ) decl. Proof. induction Γ in n |- *; destruct n => //= /All_local_env_tip [] wfΓ ondecl Hnth //=. - injection Hnth as [= ->]. assumption. - now eapply IHΓ. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_nth_error | 421 |
{P Γ} : All_local_env (fun _ => P) Γ <~> All (fun d => P (j_decl d)) Γ. Proof. split. - induction 1 using All_local_env_ind1; constructor => //. - induction 1. 1: constructor. apply All_local_env_snoc => //. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_cst | 422 |
P Γ Γ' := (All_local_env (fun Δ j => P (Γ ,,, Δ) j) Γ'). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel | 423 |
{P Γ} : All_local_rel P Γ [] := localenv_nil. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_nil | 424 |
{P Γ Γ' decl} : All_local_rel P Γ Γ' -> on_local_decl P (Γ ,,, Γ') decl -> All_local_rel P Γ (Γ' ,, decl) := All_local_env_snoc. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_snoc | 425 |
{P Γ Γ' A na} : All_local_rel P Γ Γ' -> P (Γ ,,, Γ') (j_vass na A) -> All_local_rel P Γ (Γ',, vass na A) := localenv_cons. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_abs | 426 |
{P Γ Γ' t A na} : All_local_rel P Γ Γ' -> P (Γ ,,, Γ') (j_vdef na t A) -> All_local_rel P Γ (Γ',, vdef na t A) := localenv_cons. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_def | 427 |
{P Γ Γ' decl} : All_local_rel P Γ (Γ' ,, decl) -> All_local_rel P Γ Γ' × on_local_decl P (Γ ,,, Γ') decl := All_local_env_tip. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_tip | 428 |
typing Γ P : P [] -> (forall Δ decl, P Δ -> on_local_decl typing (Γ ,,, Δ) decl -> P (Δ ,, decl)) -> forall Δ, All_local_rel typing Γ Δ -> P Δ := All_local_env_ind1 _ P. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_ind1 | 429 |
forall P Γ, All_local_env P Γ -> All_local_rel P [] Γ. Proof. intros P Γ h. eapply All_local_env_impl. - exact h. - intros. rewrite app_context_nil_l. assumption. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_local | 430 |
P Γ : All_local_rel P [] Γ -> All_local_env P Γ. Proof. intro X. eapply All_local_env_impl. exact X. intros Γ0 j XX; cbn in XX; rewrite app_context_nil_l in XX; assumption. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_local_rel | 431 |
{P Γ Γ'} : All_local_env P (Γ ,,, Γ') -> All_local_env P Γ × All_local_rel P Γ Γ'. Proof. induction Γ'. - intros hΓ. split. 1: exact hΓ. constructor. - move => /= /All_local_env_tip [] hΓ ona. edestruct IHΓ' ; auto. split ; auto. apply All_local_rel_snoc; auto. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_app_rel | 432 |
{P Γ Γ'} := @All_local_app_rel P Γ Γ'. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_app_inv | 433 |
{P Γ Γ' Γ''} : All_local_rel P Γ (Γ' ,,, Γ'') -> All_local_rel P Γ Γ' × All_local_rel P (Γ ,,, Γ') Γ''. Proof. intro H. eapply All_local_env_app_inv in H as [H H']. split; tas. apply All_local_env_impl with (1 := H'). intros; now rewrite -app_context_assoc. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_app_inv | 434 |
{P Γ Γ'} : All_local_env P Γ -> All_local_rel P Γ Γ' -> All_local_env P (Γ ,,, Γ'). Proof. induction 2 using All_local_rel_ind1 => //=. apply All_local_env_snoc; tas. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_app | 435 |
{P Γ Γ' Γ''} : All_local_rel P Γ Γ' -> All_local_rel P (Γ ,,, Γ') Γ'' -> All_local_rel P Γ (Γ' ,,, Γ''). Proof. induction 2 using All_local_rel_ind1 => //=. apply All_local_rel_snoc; tas. now rewrite app_context_assoc. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_app | 436 |
forall P Q Γ, All_local_env (fun Δ j => P Δ j × Q Δ j) Γ -> All_local_env P Γ × All_local_env Q Γ. Proof using Type. intros P Q Γ h. split; apply All_local_env_impl with (1 := h). all: now intros ??[]. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_prod_inv | 437 |
forall P Q Δ, All_local_env (lift_typing1 (Prop_local_conj P Q)) Δ -> All_local_env (lift_typing1 P) Δ × All_local_env (lift_typing1 Q) Δ. Proof using Type. intros P Q Δ h. split; apply All_local_env_impl with (1 := h); intros ?? H; apply lift_typing_impl with (1 := H). all: move => ??[] //. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_lift_prod_inv | 438 |
forall (Γ : context), All_local_env (lift_sorting1 checking sorting) Γ -> Type := | localenv_over_nil : All_local_env_over_sorting [] localenv_nil | localenv_over_cons_abs Γ na t (all : All_local_env (lift_sorting1 checking sorting) Γ) : All_local_env_over_sorting Γ all -> forall (tu : lift_sorting1 checking sorting Γ (j_vass na t)) (Hs: sproperty Γ all _ _ tu.2.π2.1), All_local_env_over_sorting (Γ ,, vass na t) (localenv_cons_abs all tu) | localenv_over_cons_def Γ na b t (all : All_local_env (lift_sorting1 checking sorting) Γ) : All_local_env_over_sorting Γ all -> forall (tu : lift_sorting1 checking sorting Γ (j_vdef na b t)) (Hc: cproperty Γ all _ _ tu.1) (Hs: sproperty Γ all _ _ tu.2.π2.1), All_local_env_over_sorting (Γ ,, vdef na b t) (localenv_cons_def all tu). | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_over_sorting | 439 |
typing property := (All_local_env_over_sorting typing (typing_sort1 typing) property (fun Γ H t u tu => property _ H _ _ tu)). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_over | 440 |
c s Pc Ps Γ (H : All_local_env (lift_sorting1 c s) Γ) : All_local_env_over_sorting _ _ (fun Γ _ t T _ => Pc Γ t T) (fun Γ _ t s _ => Ps Γ t s) _ H -> All_local_env (lift_sorting1 (Prop_local_conj c Pc) (Prop_local_conj s Ps)) Γ. Proof. induction 1; constructor; eauto. - destruct tu as (Htm & u & Hty & e). repeat (eexists; tea). - destruct tu as (Htm & u & Hty & e). repeat (eexists; tea). Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_over_sorting_2 | 441 |
{typing Γ} (P : forall Γ (wfΓ : All_local_env (lift_typing1 typing) Γ) t T, typing Γ t T -> Type) (wfΓ : All_local_env (lift_typing1 typing) Γ) {d} (H : on_local_decl (lift_typing1 typing) Γ d) := match d return (on_local_decl (lift_typing1 typing) Γ d) -> Type with | {| decl_name := na; decl_body := Some b; decl_type := ty |} => fun H => P Γ wfΓ b ty H.1 × P Γ wfΓ ty _ H.2.π2.1 | {| decl_name := na; decl_body := None; decl_type := ty |} => fun H => P Γ wfΓ ty _ H.2.π2.1 end H. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_wf_local_decl | 442 |
{typing} {P Γ n decl} (eq : nth_error Γ n = Some decl) {wfΓ : All_local_env (lift_typing1 typing) Γ} : All_local_env_over typing P Γ wfΓ -> let Γ' := skipn (S n) Γ in let wfΓ' := All_local_env_skipn _ wfΓ in let p := All_local_env_nth_error wfΓ eq in (All_local_env_over typing P Γ' wfΓ' * on_wf_local_decl P wfΓ' p)%type. Proof. induction 1 in n, decl, eq |- *. - exfalso. destruct n => //. - destruct n; simpl. + simpl in *. split; tas. clear -Hs. destruct f_equal; cbn. assumption. + apply IHX. - destruct n; simpl. + simpl in *. split; tas. clear -Hc Hs. destruct f_equal; cbn. split; assumption. + apply IHX. Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | nth_error_All_local_env_over | 443 |
typing P Γ (H : All_local_env (lift_typing1 typing) Γ) : All_local_env_over _ (fun Γ _ t T _ => P Γ t T) _ H -> All_local_env (lift_typing_conj typing P) Γ. Proof. apply All_local_env_over_sorting_2 with (Ps := fun Γ t u => P Γ t (tSort u)). Defined. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_over_2 | 444 |
(Γ : context) : list term -> context -> Type := | ctx_inst_nil : ctx_inst Γ [] [] | ctx_inst_ass na t i inst Δ : typing Γ i t -> ctx_inst Γ inst (subst_telescope [i] 0 Δ) -> ctx_inst Γ (i :: inst) (vass na t :: Δ) | ctx_inst_def na b t inst Δ : ctx_inst Γ inst (subst_telescope [b] 0 Δ) -> ctx_inst Γ inst (vdef na b t :: Δ). | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ctx_inst | 445 |
Γ inst Δ args P : { P' & ctx_inst P' Γ inst Δ } -> (forall t T, All (fun P' => P' Γ t T) args -> P Γ t T) -> All (fun P' => ctx_inst P' Γ inst Δ) args -> ctx_inst P Γ inst Δ. Proof. intros [? Hexists] HPQ H. induction Hexists; constructor; tea. all: first [ apply IHHexists; clear IHHexists | apply HPQ ]. all: eapply All_impl; tea; cbn; intros *; inversion 1; subst; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ctx_inst_impl_gen | 446 |
P Q Γ inst Δ : ctx_inst P Γ inst Δ -> (forall t T, P Γ t T -> Q Γ t T) -> ctx_inst Q Γ inst Δ. Proof. intros H HPQ. induction H; econstructor; auto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ctx_inst_impl | 447 |
{A f} (fsize : forall (a : A), f a -> size) o (w : option_default f o (unit : Type)) : size := match o as tm return option_default _ tm (unit : Type) -> size with | Some tm => fun w => fsize _ w | None => fun w => 0 end w. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | option_default_size | 448 |
base j (w : lift_sorting checking sorting j) : size := base + option_default_size (fun tm => csize tm _) (j_term j) w.1 + ssize _ _ w.2.π2.1. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_size_gen | 449 |
{Qc Qs j} : forall tu: lift_sorting checking sorting j, (forall t T, forall Hty: checking t T, csize _ _ Hty <= lift_sorting_size_gen 0 _ tu -> Qc t T) -> (forall t u, forall Hty: sorting t u, ssize _ _ Hty <= lift_sorting_size_gen 0 _ tu -> Qs t u) -> lift_sorting Qc Qs j. Proof. intros (Htm & s & Hty & es) HPQc HPQs. unfold lift_sorting_size_gen in *; cbn in *. repeat (eexists; tea). - destruct (j_term j) => //=. eapply HPQc with (Hty := Htm); cbn. lia. - eapply HPQs with (Hty := Hty); cbn. lia. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_size_gen_impl | 450 |
{c s} (ssize : forall Γ t u, s Γ t u -> size) base Γ d (w : on_def_type (lift_sorting1 c s) Γ d) : size := base + ssize _ _ _ w.2.π2.1. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_def_type_size_gen | 451 |
{c s} (csize : forall Γ t u, c Γ t u -> size) (ssize : forall Γ t u, s Γ t u -> size) base types Γ d (w : on_def_body (lift_sorting1 c s) types Γ d) : size := base + csize _ _ _ w.1 + ssize _ _ _ w.2.π2.1. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_def_body_size_gen | 452 |
{checking sorting Qc Qs j} csize ssize : forall tu: lift_sorting checking sorting j, (forall t T, forall Hty: checking t T, csize _ _ Hty < lift_sorting_size csize ssize _ tu -> Qc t T) -> (forall t u, forall Hty: sorting t u, ssize _ _ Hty < lift_sorting_size csize ssize _ tu -> Qs t u) -> lift_sorting Qc Qs j. Proof. intros tu Xc Xs. eapply lift_sorting_size_gen_impl with (tu := tu). all: intros. 1: eapply Xc. 2: eapply Xs. all: apply le_n_S, H. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_sorting_size_impl | 453 |
{P Q j} Psize : forall tu: lift_typing0 P j, (forall t T, forall Hty: P t T, Psize _ _ Hty <= lift_typing_size Psize _ tu -> Q t T) -> lift_typing0 Q j. Proof. intros. eapply lift_sorting_size_gen_impl with (csize := Psize). all: intros t T; apply X. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_typing_size_impl | 454 |
base Γ (w : All_local_env (lift_sorting1 checking sorting) Γ) : size := match w with | localenv_nil => base | localenv_cons_abs Γ' na t w' p => ssize _ _ _ p.2.π2.1 + All_local_env_size_gen base _ w' | localenv_cons_def Γ' na b t w' p => csize _ _ _ p.1 + ssize _ _ _ p.2.π2.1 + All_local_env_size_gen base _ w' end. | Fixpoint | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_size_gen | 455 |
base Γ w : base <= All_local_env_size_gen base Γ w. Proof using Type. induction w. all: simpl ; lia. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_size_pos | 456 |
c s csize ssize base Γ Γ' (wfΓ : All_local_env (lift_sorting1 c s) Γ) (wfΓ' : All_local_rel (lift_sorting1 c s) Γ Γ') : All_local_env_size_gen csize ssize base _ (All_local_env_app wfΓ wfΓ') + base = All_local_env_size_gen csize ssize base _ wfΓ + All_local_rel_size_gen c s csize ssize base _ _ wfΓ'. Proof. induction Γ'. - dependent inversion wfΓ'. reflexivity. - revert IHΓ'. dependent inversion wfΓ' ; subst ; intros. + cbn. etransitivity. 2: rewrite Nat.add_comm -Nat.add_assoc [X in _ + X]Nat.add_comm -IHΓ' Nat.add_assoc ; reflexivity. reflexivity. + cbn. etransitivity. 2: rewrite Nat.add_comm -Nat.add_assoc [X in _ + X]Nat.add_comm -IHΓ' Nat.add_assoc ; reflexivity. reflexivity. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_size_app | 457 |
All_local_env_size_gen typing_size (typing_sort1 typing_size) 0. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_size | 458 |
Γ Γ' (wfΓ : All_local_rel (lift_typing1 typing) Γ Γ') := All_local_rel_size_gen typing (typing_sort1 typing) typing_size (typing_sort_size1 typing_size) 0 Γ Γ' wfΓ. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_size | 459 |
All_local_env_size_gen checking_size sorting_size 1. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_env_sorting_size | 460 |
All_local_rel_size_gen _ _ checking_size sorting_size 1. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_local_rel_sorting_size | 461 |
{pb} {P : conv_pb -> term -> term -> Type} : context_decl -> context_decl -> Type := | all_decls_alpha_vass {na na' : binder_annot name} {t t' : term} (eqna : eq_binder_annot na na') (eqt : P pb t t') : All_decls_alpha_pb (vass na t) (vass na' t') | all_decls_alpha_vdef {na na' : binder_annot name} {b t b' t' : term} (eqna : eq_binder_annot na na') (eqb : P Conv b b') (eqt : P pb t t') : All_decls_alpha_pb (vdef na b t) (vdef na' b' t'). | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_decls_alpha_pb | 462 |
pb (Σ : global_env_ext) (Γ Γ' : context) : forall (x y : context_decl), Type := All_decls_alpha_pb pb (cumul_gen Σ Γ). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cumul_pb_decls | 463 |
pb (Σ : global_env_ext) := All2_fold (cumul_pb_decls pb Σ). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cumul_pb_context | 464 |
Σ Γ Δ Δ' := All2_fold (fun Δ Δ' => cumul_pb_decls Cumul Σ (Γ ,,, Δ) (Γ ,,, Δ')) Δ Δ'. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cumul_ctx_rel | 465 |
{pb} {P Q : conv_pb -> term -> term -> Type} {t t'} : (forall pb t t', P pb t t' -> Q pb t t') -> All_decls_alpha_pb pb P t t' -> All_decls_alpha_pb pb Q t t'. Proof. induction 2; constructor; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | All_decls_alpha_pb_impl | 466 |
Σ ctx := All_local_env (P Σ) ctx. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_context | 467 |
Σ (Γ Δ : context) (u : sort) : Type := match Δ with | [] => wf_sort Σ u | {| decl_name := na; decl_body := None; decl_type := t |} :: Δ => type_local_ctx Σ Γ Δ u × P Σ (Γ ,,, Δ) (TypUniv t u ) | {| decl_body := Some _; |} as d :: Δ => type_local_ctx Σ Γ Δ u × P Σ (Γ ,,, Δ) (j_decl d) end. | Fixpoint | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | type_local_ctx | 468 |
Σ (Γ Δ : context) (us : list sort) : Type := match Δ, us with | [], [] => unit | {| decl_name := na; decl_body := None; decl_type := t |} :: Δ, u :: us => sorts_local_ctx Σ Γ Δ us × P Σ (Γ ,,, Δ) (TypUniv t u ) | {| decl_body := Some _ |} as d :: Δ, us => sorts_local_ctx Σ Γ Δ us × P Σ (Γ ,,, Δ) (j_decl d) | _, _ => False end. | Fixpoint | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | sorts_local_ctx | 469 |
Σ Γ T := P Σ Γ (Typ T). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_type | 470 |
univs φ := ConstraintSet.union (constraints_of_udecl φ) univs. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | univs_ext_constraints | 471 |
(univs : ContextSet.t) φ := consistent (univs_ext_constraints (ContextSet.constraints univs) φ). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | satisfiable_udecl | 472 |
(univs : ContextSet.t) ϕ := consistent_extension_on univs (constraints_of_udecl ϕ). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | valid_on_mono_udecl | 473 |
(univs : ContextSet.t) (udecl : universes_decl) := let levels := levels_of_udecl udecl in let global_levels := global_levels univs in let all_levels := LevelSet.union levels global_levels in LevelSet.For_all (fun l => ~ LevelSet.In l global_levels) levels /\ ConstraintSet.For_all (declared_cstr_levels all_levels) (constraints_of_udecl udecl) /\ satisfiable_udecl univs udecl /\ valid_on_mono_udecl univs udecl. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_udecl | 474 |
ninds npars narg (arg : term) : bool := (* We decompose the constructor's arguments' type and verify the inductive references only appear in the conclusion, if any. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | positive_cstr_arg | 475 |
ninds npars (args : context) : bool := alli (fun i decl => positive_cstr_arg nind npars i decl.(decl_type)) (List.rev (smash_context [] args)) *) (** A constructor argument type [t] is positive w.r.t. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | positive_cstr_args | 476 |
(o : one_inductive_body) := match destArity [] o.(ind_type) with | Some (ctx, _) => #|smash_context [] ctx| | _ => 0 end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ind_realargs | 477 |
mdecl i (Γ:context) k : Prop := #|Γ| <= k /\ k < #|Γ| + #|mdecl.(ind_bodies)| /\ nth_error (List.rev mdecl.(ind_bodies)) (k - #|Γ|) = Some i. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | mdecl_at_i | 478 |
mdecl Γ : term -> Type := | pos_arg_closed ty : closedn #|Γ| ty -> mdecl ;;; Γ |arg+> ty | pos_arg_concl l k i : #|l| = ind_realargs i -> All (closedn #|Γ|) l -> mdecl_at_i mdecl i Γ k -> mdecl ;;; Γ |arg+> mkApps (tRel k) l | pos_arg_let na b ty ty' : mdecl ;;; Γ |arg+> ty' {0 := b} -> mdecl ;;; Γ |arg+> tLetIn na b ty ty' | pos_arg_ass na ty ty' : closedn #|Γ| ty -> mdecl ;;; vass na ty :: Γ |arg+> ty' -> mdecl ;;; Γ |arg+> tProd na ty ty' where " mdecl ;;; Γ |arg+> t " := (positive_cstr_arg mdecl Γ t) : type_scope. | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | positive_cstr_arg | 479 |
mdecl i Γ : term -> Type := | pos_concl l (headrel := (#|mdecl.(ind_bodies)| - S i + #|Γ|)%nat) : All (closedn #|Γ|) l -> mdecl @ i ;;; Γ |+> mkApps (tRel headrel) l | pos_let na b ty ty' : mdecl @ i ;;; Γ |+> ty' {0 := b} -> mdecl @ i ;;; Γ |+> tLetIn na b ty ty' | pos_ass na ty ty' : mdecl ;;; Γ |arg+> ty -> mdecl @ i ;;; vass na ty :: Γ |+> ty' -> mdecl @ i ;;; Γ |+> tProd na ty ty' where " mdecl @ i ;;; Γ |+> t " := (positive_cstr mdecl i Γ t) : type_scope. | Inductive | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | positive_cstr | 480 |
n l := match l with | Level.lzero | Level.level _ => l | Level.lvar k => Level.lvar (n + k) end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_level | 481 |
n l := map (lift_level n) l. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_instance | 482 |
n (c : Level.t * ConstraintType.t * Level.t) := let '((l, r), l') := c in ((lift_level n l, r), lift_level n l'). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_constraint | 483 |
n cstrs := ConstraintSet.fold (fun elt acc => ConstraintSet.add (lift_constraint n elt) acc) cstrs ConstraintSet.empty. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | lift_constraints | 484 |
n (inst : list name) := mapi_rec (fun i _ => Level.lvar i) inst n. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | level_var_instance | 485 |
(v : list Variance.t) (u u' : Instance.t) := match v, u, u' with | _, [], [] => ConstraintSet.empty | v :: vs, u :: us, u' :: us' => match v with | Variance.Irrelevant => variance_cstrs vs us us' | Variance.Covariant => ConstraintSet.add (u, ConstraintType.Le 0, u') (variance_cstrs vs us us') | Variance.Invariant => ConstraintSet.add (u, ConstraintType.Eq, u') (variance_cstrs vs us us') end | _, _, _ => ConstraintSet.empty end. | Fixpoint | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | variance_cstrs | 486 |
univs v := match univs with | Monomorphic_ctx => None | Polymorphic_ctx auctx => let (inst, cstrs) := auctx in let u' := level_var_instance 0 inst in let u := lift_instance #|inst| u' in let cstrs := ConstraintSet.union cstrs (lift_constraints #|inst| cstrs) in let cstrv := variance_cstrs v u u' in let auctx' := (inst ++ inst, ConstraintSet.union cstrs cstrv) in Some (Polymorphic_ctx auctx', u, u') end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | variance_universes | 487 |
mdecl := arities_context (ind_bodies mdecl). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ind_arities | 488 |
Σ mdecl v indices := let univs := ind_universes mdecl in match variance_universes univs v with | Some (univs, u, u') => cumul_ctx_rel Pcmp (Σ, univs) (smash_context [] (ind_params mdecl))@[u] (expand_lets_ctx (ind_params mdecl) (smash_context [] indices))@[u] (expand_lets_ctx (ind_params mdecl) (smash_context [] indices))@[u'] | None => False end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | ind_respects_variance | 489 |
Σ mdecl v cs := let univs := ind_universes mdecl in match variance_universes univs v with | Some (univs, u, u') => cumul_ctx_rel Pcmp (Σ, univs) (ind_arities mdecl ,,, smash_context [] (ind_params mdecl))@[u] (expand_lets_ctx (ind_params mdecl) (smash_context [] (cstr_args cs)))@[u] (expand_lets_ctx (ind_params mdecl) (smash_context [] (cstr_args cs)))@[u'] * All2 (Pcmp (Σ, univs) (ind_arities mdecl ,,, smash_context [] (ind_params mdecl ,,, cstr_args cs))@[u] Conv) (map (subst_instance u ∘ expand_lets (ind_params mdecl ,,, cstr_args cs)) (cstr_indices cs)) (map (subst_instance u' ∘ expand_lets (ind_params mdecl ,,, cstr_args cs)) (cstr_indices cs)) | None => False end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cstr_respects_variance | 490 |
mdecl i cdecl := tRel (#|mdecl.(ind_bodies)| - S i + #|mdecl.(ind_params)| + #|cstr_args cdecl|). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cstr_concl_head | 491 |
mdecl i cdecl := (mkApps (cstr_concl_head mdecl i cdecl) (to_extended_list_k mdecl.(ind_params) #|cstr_args cdecl| ++ cstr_indices cdecl)). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | cstr_concl | 492 |
Σ mdecl i idecl ind_indices cdecl cunivs := { cstr_args_length : context_assumptions (cstr_args cdecl) = cstr_arity cdecl; cstr_eq : cstr_type cdecl = it_mkProd_or_LetIn mdecl.(ind_params) (it_mkProd_or_LetIn (cstr_args cdecl) (cstr_concl mdecl i cdecl)); on_ctype : on_type Σ (arities_context mdecl.(ind_bodies)) (cstr_type cdecl); on_cargs : sorts_local_ctx Σ (arities_context mdecl.(ind_bodies) ,,, mdecl.(ind_params)) cdecl.(cstr_args) cunivs; on_cindices : ctx_inst (fun Γ t T => P Σ Γ (TermTyp t T)) (arities_context mdecl.(ind_bodies) ,,, mdecl.(ind_params) ,,, cdecl.(cstr_args)) cdecl.(cstr_indices) (List.rev (lift_context #|cdecl.(cstr_args)| 0 ind_indices)); on_ctype_positive : positive_cstr mdecl i [] (cstr_type cdecl); on_ctype_variance : forall v, ind_variance mdecl = Some v -> cstr_respects_variance Σ mdecl v cdecl; on_lets_in_type : if lets_in_constructor_types then True else is_true (is_assumption_context (cstr_args cdecl)) }. | Record | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_constructor | 493 |
Σ mdecl i idecl ind_indices := All2 (on_constructor Σ mdecl i idecl ind_indices). | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_constructors | 494 |
mdecl mind i k (p : projection_body) decl := { on_proj_name : binder_name (decl_name decl) = nNamed p.(proj_name); on_proj_type : let u := abstract_instance mdecl.(ind_universes) in let ind := {| inductive_mind := mind; inductive_ind := i |} in p.(proj_type) = subst (inds mind u mdecl.(ind_bodies)) (S (ind_npars mdecl)) (subst (projs ind mdecl.(ind_npars) k) 0 (lift 1 k (decl_type decl))); on_proj_relevance : p.(proj_relevance) = decl.(decl_name).(binder_relevance) }. | Record | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_proj | 495 |
mdecl mind i cdecl (k : nat) (p : projection_body) := let Γ := smash_context [] (cdecl.(cstr_args) ++ mdecl.(ind_params)) in match nth_error Γ (context_assumptions cdecl.(cstr_args) - S k) with | None => False | Some decl => on_proj mdecl mind i k p decl end. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_projection | 496 |
mdecl mind i idecl (ind_indices : context) cdecl := { on_projs_record : #|idecl.(ind_ctors)| = 1; on_projs_noidx : #|ind_indices| = 0; on_projs_elim : idecl.(ind_kelim) = IntoAny; on_projs_all : #|idecl.(ind_projs)| = context_assumptions (cstr_args cdecl); on_projs : Alli (on_projection mdecl mind i cdecl) 0 idecl.(ind_projs) }. | Record | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | on_projections | 497 |
φ cunivss ind_sort := Forall (fun cunivs => Forall (fun argsort => leq_sort φ argsort ind_sort) cunivs) cunivss. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | check_constructors_smaller | 498 |
list sort. | Definition | common | From Coq Require Import ssreflect ssrbool. From Coq Require CMorphisms CRelationClasses. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Import config BasicAst Universes Environment Primitive. From Equations Require Import Equations. Import T E. Import T E TU. Import T E TU ET. Import T E TU ET C L. Import T E TU ET. Import T E TU ET CT CS. Import T E L TU ET CT GM CS Ty. | common\theories\EnvironmentTyping.v | constructor_univs | 499 |
Subsets and Splits