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
|
---|---|---|---|---|---|---|
(f : context_decl term' -> term) (g : term'' -> term') ctx : map f (map_context g ctx) = map (f ∘ map_decl g) ctx. Proof using Type. now rewrite /map_context map_map_compose. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | map_map_context | 100 |
(f : nat -> term' -> term) (g : term'' -> term') Γ : fold_context_k f (map_context g Γ) = fold_context_k (fun k => f k ∘ g) Γ. Proof using Type. rewrite !fold_context_k_alt mapi_map. apply mapi_ext => n d //. len. now rewrite compose_map_decl. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | fold_context_k_map | 101 |
(f : nat -> term -> term) (g : term -> term) Γ : (forall i x, f i (g x) = g (f i x)) -> fold_context_k f (map_context g Γ) = map_context g (fold_context_k f Γ). Proof using Type. intros Hfg. rewrite !fold_context_k_alt mapi_map. rewrite /map_context map_mapi. apply mapi_ext => i x. rewrite !compose_map_decl. apply map_decl_ext => t. rewrite Hfg. now len. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | fold_context_k_map_comm | 102 |
(f : nat -> term' -> term) (g : term'' -> term') ctx : mapi_context f (map_context g ctx) = mapi_context (fun i => f i ∘ g) ctx. Proof using Type. now rewrite !mapi_context_fold fold_context_k_map. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | mapi_context_map_context | 103 |
(f : context_decl term' -> term) (g : nat -> term'' -> term') ctx : map f (mapi_context g ctx) = mapi (fun i => f ∘ map_decl (g (Nat.pred #|ctx| - i))) ctx. Proof using Type. now rewrite mapi_context_fold fold_context_k_alt map_mapi. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | map_mapi_context | 104 |
(ctx : context term) : map_context id ctx = ctx. Proof using Type. unfold map_context. now rewrite map_decl_id map_id. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | map_context_id | 105 |
(ctx : list (context_decl term)) : #|forget_types ctx| = #|ctx|. Proof using Type. now rewrite /forget_types length_map. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | forget_types_length | 106 |
(f : nat -> term' -> term) ctx : map decl_name (fold_context_k f ctx) = map decl_name ctx. Proof using Type. now rewrite fold_context_k_alt map_mapi /= mapi_cst_map. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | map_decl_name_fold_context_k | 107 |
(f : nat -> term' -> term) ctx : forget_types (fold_context_k f ctx) = forget_types ctx. Proof using Type. now rewrite /forget_types map_decl_name_fold_context_k. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | forget_types_fold_context_k | 108 |
(P : context term -> context term -> context_decl term -> context_decl term -> Type) P' Γ Δ Q : onctx Q Γ -> All2_fold P Γ Δ -> (forall Γ Δ d d', All2_fold P Γ Δ -> P Γ Δ d d' -> ondecl Q d -> P' Γ Δ d d') -> All2_fold P' Γ Δ. Proof using Type. intros onc cr Hcr. induction cr; depelim onc; constructor; intuition eauto. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | All2_fold_impl_onctx | 109 |
(P : context term -> context term -> context_decl term -> context_decl term -> Type) (Γ Δ : context term) f g : All2_fold (fun Γ Δ d d' => P (mapi_context f Γ) (mapi_context g Δ) (map_decl (f #|Γ|) d) (map_decl (g #|Γ|) d')) Γ Δ <~> All2_fold P (mapi_context f Γ) (mapi_context g Δ). Proof using Type. split. - induction 1; simpl; constructor; intuition auto; now rewrite <-(All2_fold_length X). - induction Γ as [|d Γ] in Δ |- *; destruct Δ as [|d' Δ]; simpl; intros H; depelim H; constructor; simpl in *; auto. pose proof (All2_fold_length H). len in H0. now rewrite <- H0 in p. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | All2_fold_mapi | 110 |
{P : context term -> context term -> context_decl term -> context_decl term -> Type} {Γ Δ : context term} f g : All2_fold (fun Γ Δ d d' => P (map_context f Γ) (map_context g Δ) (map_decl f d) (map_decl g d')) Γ Δ <~> All2_fold P (map_context f Γ) (map_context g Δ). Proof using Type. split. - induction 1; simpl; constructor; intuition auto; now rewrite <-(All2_fold_length X). - induction Γ as [|d Γ] in Δ |- *; destruct Δ as [|d' Δ]; simpl; intros H; depelim H; constructor; auto. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | All2_fold_map | 111 |
{P : context_decl term -> context_decl term -> Type} {Γ Δ : context term} {f g} : All2_fold (fun _ _ d d' => P (f d) (g d')) Γ Δ <~> All2_fold (fun _ _ => P) (map f Γ) (map g Δ). Proof using Type. split. - induction 1; simpl; constructor; intuition auto; now rewrite <-(All2_fold_length X). - induction Γ as [|d Γ] in Δ |- *; destruct Δ as [|d' Δ]; simpl; intros H; depelim H; constructor; auto. Qed. | Lemma | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | All2_fold_cst_map | 112 |
63. | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | uint_size | 113 |
(2 ^ (Z.of_nat uint_size))%Z. | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | uint_wB | 114 |
{ z : Z | ((0 <=? z) && (z <? uint_wB))%Z }. | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | uint63_model | 115 |
(i : uint63_model) := string_of_Z (proj1_sig i). | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | string_of_uint63_model | 116 |
53%Z. | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | prec | 117 |
1024%Z. | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | emax | 118 |
sig (SpecFloat.valid_binary prec emax). | Definition | common | From Coq Require Import ssreflect Morphisms Orders Setoid. From MetaCoq.Utils Require Import utils. From MetaCoq.Common Require Export Kernames. From Coq Require Floats.SpecFloat. From Equations Require Import Equations. | common\theories\BasicAst.v | float64_model | 119 |
#[local] Definition impl (cf1 cf2 : checker_flags) : bool := implb cf2.(@check_univs) cf1.(@check_univs) && implb cf1.(@prop_sub_type) cf2.(@prop_sub_type) && implb cf2.(@indices_matter) cf1.(@indices_matter) && implb cf1.(@lets_in_constructor_types) cf2.(@lets_in_constructor_types). | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl | 120 |
#[local] Definition impl_reflb cf : impl cf cf = true. Proof. rewrite /impl !implb_same ?orb_true_r //. Qed. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl_reflb | 121 |
#[local] Definition impl_refl : Reflexive impl := impl_reflb. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl_refl | 122 |
#[local] Definition impl_crefl : CRelationClasses.Reflexive impl := impl_reflb. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl_crefl | 123 |
#[local] Definition impl_trans : Transitive impl. Proof. rewrite /impl => x y z; destruct x, y, z; cbn. rewrite !implb_orb. repeat match goal with | [ |- is_true (andb _ _) -> _ ] => move => /andP[] | [ |- is_true (orb _ _) -> _ ] => move => /orP[] | [ |- is_true (negb _) -> _ ] => let H := fresh in intro H; apply negbTE in H; subst => //= | [ |- is_true true -> _ ] => move => _ | [ |- is_true false -> _ ] => move => //= | [ |- is_true ?x -> _ ] => is_var x; let H := fresh in intro H; cbv [is_true] in H; subst end. all: rewrite ?orb_true_l ?orb_true_r ?andb_false_l ?andb_false_r //. Qed. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl_trans | 124 |
#[local] Definition impl_ctrans : CRelationClasses.Transitive impl := impl_trans. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | impl_ctrans | 125 |
checker_flags := {| check_univs := false ; prop_sub_type := true; indices_matter := false; lets_in_constructor_types := true |}. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | laxest_checker_flags | 126 |
checker_flags := {| check_univs := true ; prop_sub_type := false; indices_matter := true; lets_in_constructor_types := false |}. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | strictest_checker_flags | 127 |
forall cf, impl cf laxest_checker_flags. Proof. intro cf; cbv; destruct cf. repeat match goal with | [ |- context[match ?x with _ => _ end] ] => case_eq x end; try reflexivity; congruence. Qed. | Lemma | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | laxest_checker_flags_laxest | 128 |
forall cf, impl strictest_checker_flags cf. Proof. intro cf; cbv; destruct cf. repeat match goal with | [ |- context[match ?x with _ => _ end] ] => case_eq x end; try reflexivity; congruence. Qed. | Lemma | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | strictest_checker_flags_strictest | 129 |
(cf1 cf2 : checker_flags) : checker_flags := {| check_univs := andb cf2.(@check_univs) cf1.(@check_univs) ; prop_sub_type := orb cf1.(@prop_sub_type) cf2.(@prop_sub_type) ; indices_matter := andb cf2.(@indices_matter) cf1.(@indices_matter) ; lets_in_constructor_types := orb cf1.(@lets_in_constructor_types) cf2.(@lets_in_constructor_types) |}. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | union_checker_flags | 130 |
(cf1 cf2 : checker_flags) : checker_flags := {| check_univs := orb cf2.(@check_univs) cf1.(@check_univs) ; prop_sub_type := andb cf1.(@prop_sub_type) cf2.(@prop_sub_type) ; indices_matter := orb cf2.(@indices_matter) cf1.(@indices_matter) ; lets_in_constructor_types := andb cf1.(@lets_in_constructor_types) cf2.(@lets_in_constructor_types) |}. | Definition | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | inter_checker_flags | 131 |
cf1 cf2 (cf' := union_checker_flags cf1 cf2) : impl cf1 cf' /\ impl cf2 cf' /\ (forall cf'', impl cf1 cf'' -> impl cf2 cf'' -> impl cf' cf''). Proof. destruct cf1, cf2; subst cf'. cbv. repeat split. 3: intro cf''; destruct cf''. all: repeat first [ match goal with | [ |- context[match ?x with _ => _ end] ] => is_var x; destruct x end | reflexivity | congruence ]. Qed. | Lemma | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | union_checker_flags_spec | 132 |
cf1 cf2 (cf' := inter_checker_flags cf1 cf2) : impl cf' cf1 /\ impl cf' cf2 /\ (forall cf'', impl cf'' cf1 -> impl cf'' cf2 -> impl cf'' cf'). Proof. destruct cf1, cf2; subst cf'. cbv. repeat split. 3: intro cf''; destruct cf''. all: repeat first [ match goal with | [ |- context[match ?x with _ => _ end] ] => is_var x; destruct x end | reflexivity | congruence ]. Qed. | Lemma | common | From Coq Require CRelationClasses. From Coq Require Import Bool RelationClasses Btauto. From Coq.ssr Require Import ssreflect ssrbool. | common\theories\config.v | inter_checker_flags_spec | 133 |
mk_retroknowledge { retro_int63 : option kername; retro_float64 : option kername; retro_string : option kername; retro_array : option kername; }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | t | 134 |
{| retro_int63 := None; retro_float64 := None; retro_string := None; retro_array := None |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | empty | 135 |
(x y : t) := option_extends x.(retro_int63) y.(retro_int63) /\ option_extends x.(retro_float64) y.(retro_float64) /\ option_extends x.(retro_string) y.(retro_string) /\ option_extends x.(retro_array) y.(retro_array). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends | 136 |
(x y : t) := option_extendsb x.(retro_int63) y.(retro_int63) && option_extendsb x.(retro_float64) y.(retro_float64) && option_extendsb x.(retro_string) y.(retro_string) && option_extendsb x.(retro_array) y.(retro_array). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extendsb | 137 |
x y : reflect (extends x y) (extendsb x y). Proof. rewrite /extends/extendsb; do 4 case: option_extendsT; cbn; constructor; intuition auto. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extendsT | 138 |
x y : extendsb x y <-> extends x y. Proof. rewrite /extends/extendsb -!option_extends_spec /is_true !Bool.andb_true_iff //=. intuition auto. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_spec | 139 |
x : extends x x. Proof. repeat split; apply option_extends_refl. Qed. | Instance | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_refl | 140 |
RelationClasses.Transitive Retroknowledge.extends. Proof. intros x y z [? [? []]] [? [? []]]; repeat split; cbn; now etransitivity; tea. Qed. | Instance | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_trans | 141 |
#[export,program] : ReflectEq t := { eqb x y := (x.(retro_int63) == y.(retro_int63)) && (x.(retro_float64) == y.(retro_float64)) && (x.(retro_string) == y.(retro_string)) && (x.(retro_array) == y.(retro_array)) }. Next Obligation. do 4 case: eqb_spec; destruct x, y; cbn; intros; subst; constructor; congruence. Qed. | Instance | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | reflect_t | 142 |
(r1 r2 : t) : t := {| retro_int63 := match r1.(retro_int63) with Some v => Some v | None => r2.(retro_int63) end ; retro_float64 := match r1.(retro_float64) with Some v => Some v | None => r2.(retro_float64) end ; retro_string := match r1.(retro_string) with Some v => Some v | None => r2.(retro_string) end ; retro_array := match r1.(retro_array) with Some v => Some v | None => r2.(retro_array) end |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | merge | 143 |
r1 r2 : extends r1 (merge r1 r2). Proof. rewrite /extends/merge; destruct r1, r2; cbn; repeat destruct ?; subst; repeat constructor; clear; destruct_head' option; constructor. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_l_merge | 144 |
r1 r2 : extends r1 r2 -> merge r1 r2 = r2. Proof. rewrite /extends/merge; destruct r1, r2; cbn. intro; rdest; destruct_head' (@option_extends); reflexivity. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_merge_idempotent | 145 |
(x y : t) : bool := match x.(retro_int63), y.(retro_int63) with Some x, Some y => x == y | _, _ => true end && match x.(retro_float64), y.(retro_float64) with Some x, Some y => x == y | _, _ => true end && match x.(retro_string), y.(retro_string) with Some x, Some y => x == y | _, _ => true end && match x.(retro_array), y.(retro_array) with Some x, Some y => x == y | _, _ => true end. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | compatible | 146 |
r1 r2 : compatible r1 r2 -> extends r2 (merge r1 r2). Proof. rewrite /extends/merge/compatible; destruct r1, r2; cbn; repeat destruct ?; subst. all: repeat case: eqb_spec => //=. all: intros; subst. all: repeat constructor; clear; destruct_head' option; constructor. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extends_r_merge | 147 |
judgment_ Sort.t term. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | judgment | 148 |
x A : context_decl := {| decl_name := x ; decl_body := None ; decl_type := A |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | vass | 149 |
x t A : context_decl := {| decl_name := x ; decl_body := Some t ; decl_type := A |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | vdef | 150 |
list context_decl. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | context | 151 |
n k d := (map_decl (lift n k) d). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lift_decl | 152 |
n k (Γ : context) : context := fold_context_k (fun k' => lift n (k' + k)) Γ. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lift_context | 153 |
n k Γ : lift_context n k Γ = mapi (fun k' d => lift_decl n (Nat.pred #|Γ| - k' + k) d) Γ. Proof. unfold lift_context. apply: fold_context_k_alt. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lift_context_alt | 154 |
n k Γ : #|lift_context n k Γ| = #|Γ|. Proof. now rewrite /lift_context; len. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lift_context_length | 155 |
s k (Γ : context) : context := fold_context_k (fun k' => subst s (k' + k)) Γ. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_context | 156 |
s k (d : context_decl) := map_decl (subst s k) d. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_decl | 157 |
s n Γ : #|subst_context s n Γ| = #|Γ|. Proof. now rewrite /subst_context; len. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_context_length | 158 |
s n : subst_context s n [] = []. Proof. reflexivity. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_context_nil | 159 |
s k Γ : subst_context s k Γ = mapi (fun k' d => subst_decl s (Nat.pred #|Γ| - k' + k) d) Γ. Proof. unfold subst_context, fold_context_k. rewrite rev_mapi. rewrite List.rev_involutive. apply mapi_ext. intros. f_equal. now rewrite List.length_rev. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_context_alt | 160 |
s k Γ d : subst_context s k (d :: Γ) = subst_context s k Γ ,, subst_decl s (#|Γ| + k) d. Proof. now rewrite /subst_context fold_context_k_snoc0. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_context_snoc | 161 |
s k (Γ : context) : context := mapi (fun k' decl => map_decl (subst s (k' + k)) decl) Γ. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_telescope | 162 |
u (ctx : context) : #|subst_instance u ctx| = #|ctx|. Proof. unfold subst_instance, subst_instance_context, map_context. now rewrite length_map. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | subst_instance_length | 163 |
(na : aname) (x : context_decl) : context_decl := {| decl_name := na; decl_body := decl_body x; decl_type := decl_type x |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | set_binder_name | 164 |
(Γ : context) := match Γ with | [] => 0 | d :: Γ => match d.(decl_body) with | Some _ => context_assumptions Γ | None => S (context_assumptions Γ) end end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | context_assumptions | 165 |
(Γ : context) := match Γ with | [] => true | d :: Γ => match d.(decl_body) with | Some _ => false | None => is_assumption_context Γ end end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | is_assumption_context | 166 |
(Γ Γ' : context) : context := match Γ' with | {| decl_body := Some b |} :: Γ' => smash_context (subst_context [b] 0 Γ) Γ' | {| decl_body := None |} as d :: Γ' => smash_context (Γ ++ [d]) Γ' | [] => Γ end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | smash_context | 167 |
Γ Γ' : #|smash_context Γ Γ'| = #|Γ| + context_assumptions Γ'. Proof. induction Γ' as [|[na [body|] ty] tl] in Γ |- *; cbn; eauto. - now rewrite IHtl subst_context_length. - rewrite IHtl length_app. simpl. lia. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | smash_context_length | 168 |
Δ Γ Γ' : smash_context Δ (Γ ++ Γ') = smash_context (smash_context Δ Γ) Γ'. Proof. revert Δ; induction Γ as [|[na [b|] ty]]; intros Δ; simpl; auto. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | smash_context_app | 169 |
(Γ : context) (n : nat) := match Γ with | nil => nil | cons d vs => match decl_body d with | Some b => let s := extended_subst vs n in let b' := lift (context_assumptions vs + n) #|s| b in let b' := subst s 0 b' in b' :: s | None => tRel n :: extended_subst vs (S n) end end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extended_subst | 170 |
Γ n : #|extended_subst Γ n| = #|Γ|. Proof. induction Γ in n |- *; simpl; auto. now destruct a as [? [?|] ?] => /=; simpl; rewrite IHΓ. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | extended_subst_length | 171 |
Γ k t := (subst (extended_subst Γ 0) k (lift (context_assumptions Γ) (k + #|Γ|) t)). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets_k | 172 |
Γ t := expand_lets_k Γ 0 t. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets | 173 |
Γ k Δ := (subst_context (extended_subst Γ 0) k (lift_context (context_assumptions Γ) (k + #|Γ|) Δ)). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets_k_ctx | 174 |
Γ Δ := expand_lets_k_ctx Γ 0 Δ. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets_ctx | 175 |
Γ k Δ : #|expand_lets_k_ctx Γ k Δ| = #|Δ|. Proof. now rewrite /expand_lets_k_ctx; len. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets_k_ctx_length | 176 |
Γ Δ : #|expand_lets_ctx Γ Δ| = #|Δ|. Proof. now rewrite /expand_lets_ctx; len. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | expand_lets_ctx_length | 177 |
(m : mfixpoint term) : context := List.rev (mapi (fun i d => vass d.(dname) (lift i 0 d.(dtype))) m). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | fix_context | 178 |
{ cstr_name : ident; cstr_args : context; cstr_indices : list term; cstr_type : term; cstr_arity : nat; }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | constructor_body | 179 |
{ proj_name : ident; proj_relevance : relevance; proj_type : term; }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | projection_body | 180 |
npars arities f c := {| cstr_name := c.(cstr_name); cstr_args := fold_context_k (fun x => f (x + npars + arities)) c.(cstr_args); cstr_indices := map (f (npars + arities + #|c.(cstr_args)|)) c.(cstr_indices); cstr_type := f arities c.(cstr_type); cstr_arity := c.(cstr_arity) |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_constructor_body | 181 |
npars f c := {| proj_name := c.(proj_name); proj_relevance := c.(proj_relevance); proj_type := f (S npars) c.(proj_type) |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_projection_body | 182 |
{ ind_name : ident; ind_indices : context; ind_sort : Sort.t; ind_type : term; ind_kelim : allowed_eliminations; ind_ctors : list constructor_body; ind_projs : list projection_body; ind_relevance : relevance }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | one_inductive_body | 183 |
npars arities f m := match m with | Build_one_inductive_body ind_name ind_indices ind_sort ind_type ind_kelim ind_ctors ind_projs ind_relevance => Build_one_inductive_body ind_name (fold_context_k (fun x => f (npars + x)) ind_indices) ind_sort (f 0 ind_type) ind_kelim (map (map_constructor_body npars arities f) ind_ctors) (map (map_projection_body npars f) ind_projs) ind_relevance end. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_one_inductive_body | 184 |
{ ind_finite : recursivity_kind; ind_npars : nat; ind_params : context; ind_bodies : list one_inductive_body ; ind_universes : universes_decl; ind_variance : option (list Universes.Variance.t) }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | mutual_inductive_body | 185 |
{ cst_type : term; cst_body : option term; cst_universes : universes_decl; cst_relevance : relevance }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | constant_body | 186 |
f decl := {| cst_type := f decl.(cst_type); cst_body := option_map f decl.(cst_body); cst_universes := decl.(cst_universes); cst_relevance := decl.(cst_relevance) |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_constant_body | 187 |
f decl : f (cst_type decl) = cst_type (map_constant_body f decl). Proof. destruct decl; reflexivity. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_cst_type | 188 |
f decl : option_map f (cst_body decl) = cst_body (map_constant_body f decl). Proof. destruct decl; reflexivity. Qed. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | map_cst_body | 189 |
| ConstantDecl : constant_body -> global_decl | InductiveDecl : mutual_inductive_body -> global_decl. | Inductive | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | global_decl | 190 |
list (kername * global_decl). | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | global_declarations | 191 |
mk_global_env { universes : ContextSet.t; declarations : global_declarations; retroknowledge : Retroknowledge.t }. | Record | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | global_env | 192 |
{| universes := ContextSet.empty; declarations := []; retroknowledge := Retroknowledge.empty |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | empty_global_env | 193 |
Σ decl := {| universes := Σ.(universes); declarations := decl :: Σ.(declarations); retroknowledge := Σ.(retroknowledge) |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | add_global_decl | 194 |
Σ : Σ = {| universes := Σ.(universes); declarations := Σ.(declarations); retroknowledge := Σ.(retroknowledge) |}. | Lemma | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | eta_global_env | 195 |
Σ decls := {| universes := Σ.(universes); declarations := decls; retroknowledge := Σ.(retroknowledge) |}. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | set_declarations | 196 |
(Σ : global_declarations) (kn : kername) : option global_decl := match Σ with | nil => None | d :: tl => if kn == d.1 then Some d.2 else lookup_global tl kn end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lookup_global | 197 |
(Σ : global_env) (kn : kername) := lookup_global Σ.(declarations) kn. | Definition | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lookup_env | 198 |
(Σ : global_declarations) (kn : kername) : list global_decl := match Σ with | nil => nil | d :: tl => let tl := lookup_globals tl kn in if kn == d.1 then d.2 :: tl else tl end. | Fixpoint | common | From Coq 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. Module Type TermDecide (Import T : Term). Module TermDecideReflectInstances (Import T : Term) (Import TDec : TermDecide T). Import T. Module Type EnvironmentDecide (T : Term) (Import E : EnvironmentSig T). Module EnvironmentDecideReflectInstances (T : Term) (Import E : EnvironmentSig T) (Import EDec : EnvironmentDecide T E). Import T E. | common\theories\Environment.v | lookup_globals | 199 |