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
|
---|---|---|---|---|---|---|
(ind_ctors_sort : list constructor_univs) := match ind_ctors_sort with | [] => IntoAny | [ s ] => if forallb Sort.is_propositional s then IntoAny else IntoPropSProp | _ => IntoPropSProp 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 | elim_sort_prop_ind | 500 |
(ind_ctors_sort : list constructor_univs) := match ind_ctors_sort with | [] => IntoAny | _ => IntoSProp 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 | elim_sort_sprop_ind | 501 |
(Σ : global_env_ext) params kelim ind_indices cdecls ind_sort : Type := match Sort.to_family ind_sort with | Sort.fProp => (** No universe-checking to do: any size of constructor argument is allowed, however elimination restrictions apply. | 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_ind_sorts | 502 |
Σ mind mdecl i idecl := { ind_arity_eq : idecl.(ind_type) = it_mkProd_or_LetIn mdecl.(ind_params) (it_mkProd_or_LetIn idecl.(ind_indices) (tSort idecl.(ind_sort))); onArity : on_type Σ [] idecl.(ind_type); ind_cunivs : list constructor_univs; onConstructors : on_constructors Σ mdecl i idecl idecl.(ind_indices) idecl.(ind_ctors) ind_cunivs; onProjections : match idecl.(ind_projs), idecl.(ind_ctors) return Type with | [], _ => True | _, [ o ] => on_projections mdecl mind i idecl idecl.(ind_indices) o | _, _ => False end; ind_sorts : check_ind_sorts Σ mdecl.(ind_params) idecl.(ind_kelim) idecl.(ind_indices) ind_cunivs idecl.(ind_sort); onIndices : match ind_variance mdecl with | Some v => ind_respects_variance Σ mdecl v idecl.(ind_indices) | None => True end }. | 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_ind_body | 503 |
Σ univs (variances : option (list Variance.t)) := match univs return Type with | Monomorphic_ctx => variances = None | Polymorphic_ctx auctx => match variances with | None => unit | Some v => ∑ univs' i i', [/\ (variance_universes univs v = Some (univs', i, i')), consistent_instance_ext (Σ, univs') univs i, consistent_instance_ext (Σ, univs') univs i' & List.length v = #|UContext.instance (AUContext.repr auctx)|] end 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_variance | 504 |
Σ mind mdecl := { onInductives : Alli (on_ind_body Σ mind mdecl) 0 mdecl.(ind_bodies); onParams : on_context Σ mdecl.(ind_params); onNpars : context_assumptions mdecl.(ind_params) = mdecl.(ind_npars); onVariance : on_variance Σ mdecl.(ind_universes) mdecl.(ind_variance); }. | 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_inductive | 505 |
Σ d := P Σ [] (TermoptTyp d.(cst_body) d.(cst_type)). | 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_constant_decl | 506 |
Σ kn decl := match decl with | ConstantDecl d => on_constant_decl Σ d | InductiveDecl inds => on_inductive Σ kn inds 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_global_decl | 507 |
(s : kername) (g : global_declarations) : Prop := Forall (fun g => g.1 <> s) g. | 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 | fresh_global | 508 |
(univs : ContextSet.t) retro (Σ : global_declarations) (kn : kername) (d : global_decl) := { kn_fresh : fresh_global kn Σ ; udecl := universes_decl_of_decl d ; on_udecl_udecl : on_udecl univs udecl ; on_global_decl_d : on_global_decl (mk_global_env univs Σ retro, udecl) kn d }. | 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_global_decls_data | 509 |
(univs : ContextSet.t) (retro : Retroknowledge.t): global_declarations -> Type := | globenv_nil : on_global_decls univs retro [] | globenv_decl Σ kn d : on_global_decls univs retro Σ -> on_global_decls_data univs retro Σ kn d -> on_global_decls univs retro (Σ ,, (kn, d)). | 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 | on_global_decls | 510 |
kn Σ : fresh_global kn Σ <-> ~ In kn (map fst Σ). Proof using Type. rewrite /fresh_global; split; [ induction 1 | induction Σ; constructor ]; cbn in *. all: tauto. 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 | fresh_global_iff_not_In | 511 |
kn Σ : fresh_global kn Σ <-> lookup_global Σ kn = None. Proof using Type. rewrite fresh_global_iff_not_In lookup_global_None //. 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 | fresh_global_iff_lookup_global_None | 512 |
kn Σ : fresh_global kn Σ <-> lookup_globals Σ kn = []. Proof using Type. rewrite fresh_global_iff_not_In lookup_globals_nil //. 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 | fresh_global_iff_lookup_globals_nil | 513 |
univs retro decls : on_global_decls univs retro decls -> NoDup (List.map fst decls). Proof using Type. induction 1; cbn in *; constructor => //. let H := match goal with H : on_global_decls_data _ _ _ _ _ |- _ => H end in move: H. case. rewrite fresh_global_iff_not_In; 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 | NoDup_on_global_decls | 514 |
(c : ContextSet.t) := let levels := global_levels c in let cstrs := ContextSet.constraints c in ConstraintSet.For_all (declared_cstr_levels levels) cstrs /\ LS.For_all (negb ∘ Level.is_var) levels /\ consistent cstrs. | 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_global_univs | 515 |
(g : global_env) : Type := on_global_univs g.(universes) × on_global_decls g.(universes) g.(retroknowledge) g.(declarations). | 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_global_env | 516 |
(Σ : global_env_ext) := on_global_env Σ.1 × on_udecl Σ.(universes) Σ.2. | 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_global_env_ext | 517 |
g : on_global_env g -> on_global_env_ext (empty_ext g). Proof. intro H; split => //. unfold empty_ext, snd. repeat split. - unfold levels_of_udecl. intros x e. lsets. - unfold constraints_of_udecl. intros x e. csets. - unfold satisfiable_udecl, univs_ext_constraints, constraints_of_udecl, fst_ctx, fst => //. destruct H as ((cstrs & _ & consistent) & decls). destruct consistent; eexists. intros v e. specialize (H v e); tea. - unfold valid_on_mono_udecl, constraints_of_udecl, consistent_extension_on. intros v sat; exists v; split. + intros x e. csets. + intros x e => //. 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 | on_global_env_ext_empty_ext | 518 |
Σ Γ Δ u args P : { P' & type_local_ctx P' Σ Γ Δ u } -> (forall Γ j, All (fun P' => P' Σ Γ j) args -> P Σ Γ j) -> All (fun P' => type_local_ctx P' Σ Γ Δ u) args -> type_local_ctx P Σ Γ Δ u. Proof. intros Hexists HP HPQ. revert HP Hexists; induction Δ in Γ, HPQ |- *; simpl; auto. { intros ? [? ?]; auto. } { intros HP Hexists; cbn in *. specialize (fun H1 Γ P' H2 H => IHΔ Γ H H1 (P'; H2)). forward IHΔ => //=; []. destruct Hexists as [? Hexists]. all: destruct a as [na [b|] ty]. all: repeat match goal with H : _ × _ |- _ => destruct H end. all: repeat split; eauto. all: simpl in *. all: first [ eapply IHΔ; clear IHΔ | apply HP; clear HP ]; tea. all: eapply All_impl; tea => //=; intros. all: repeat match goal with H : _ × _ |- _ => destruct H end => //=. } 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 | type_local_ctx_impl_gen | 519 |
(P Q : global_env_ext -> context -> judgment -> Type) Σ Σ' Γ Δ u : type_local_ctx P Σ Γ Δ u -> (forall u, wf_sort Σ u -> wf_sort Σ' u) -> (forall Γ j, P Σ Γ j -> Q Σ' Γ j) -> type_local_ctx Q Σ' Γ Δ u. Proof. intros HP HPQ. revert HP; induction Δ in Γ, HPQ |- *; simpl; auto. destruct a as [na [b|] ty]. all: intros (? & ?); now split. 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 | type_local_ctx_impl | 520 |
Σ Γ Δ u args P : { P' & sorts_local_ctx P' Σ Γ Δ u } -> (forall Γ j, All (fun P' => P' Σ Γ j) args -> P Σ Γ j) -> All (fun P' => sorts_local_ctx P' Σ Γ Δ u) args -> sorts_local_ctx P Σ Γ Δ u. Proof. intros Hexists HP HPQ. revert HP Hexists; induction Δ in Γ, HPQ, u |- *; simpl; auto. { intros ? [? ?]; auto. } { intros HP Hexists; cbn in *. specialize (fun H1 Γ u P' H2 H => IHΔ Γ u H H1 (P'; H2)). forward IHΔ => //=; []; cbn in *. destruct Hexists as [? Hexists]. destruct a as [na [b|] ty]; [ | destruct u ]. all: repeat match goal with H : _ × _ |- _ => destruct H end. all: repeat split; eauto. all: simpl in *. all: first [ eapply IHΔ; clear IHΔ | apply HP; clear HP ]; tea. all: eapply All_impl; tea => //=; intros. all: repeat match goal with H : _ × _ |- _ => destruct H end => //=. } 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 | sorts_local_ctx_impl_gen | 521 |
(P Q : global_env_ext -> context -> judgment -> Type) Σ Σ' Γ Δ u : sorts_local_ctx P Σ Γ Δ u -> (forall Γ j, P Σ Γ j -> Q Σ' Γ j) -> sorts_local_ctx Q Σ' Γ Δ u. Proof. intros HP HPQ. revert HP; induction Δ in Γ, HPQ, u |- *; simpl; auto. destruct a as [na [b|] ty]; simpl; auto. 2: destruct u => //. all: intros (? & ?); now split. 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 | sorts_local_ctx_impl | 522 |
Σ mdecl v cs args Pcmp : { Pcmp' & @cstr_respects_variance Pcmp' Σ mdecl v cs } -> (match variance_universes (ind_universes mdecl) v with | Some (univs, u, u') => forall Γ t T pb, All (fun Pcmp' => Pcmp' (Σ, univs) Γ pb t T) args -> Pcmp (Σ, univs) Γ pb t T | None => True end) -> All (fun Pcmp' => @cstr_respects_variance Pcmp' Σ mdecl v cs) args -> @cstr_respects_variance Pcmp Σ mdecl v cs. Proof. rewrite /cstr_respects_variance/cumul_ctx_rel/cumul_pb_decls. destruct variance_universes; destr_prod; try now case. move => Hexists HPQ HP. apply All_prod_inv in HP. destruct HP as [HP1 HP2]. apply All_All2_fold_swap_sum in HP1. apply All_All2_swap_sum in HP2. destruct args. { specialize (fun Γ t T pb => HPQ Γ t T pb ltac:(constructor)). destruct Hexists as [? [? ?]]; split; first [ eapply All2_fold_impl | eapply All2_impl ]; tea; intros *; cbn; eauto. eapply All_decls_alpha_pb_impl; eauto. } { destruct HP1 as [HP1|HP1], HP2 as [HP2|HP2]; subst; try congruence. split; first [ eapply All2_fold_impl | eapply All2_impl ]; tea; intros *; cbn; eauto. inversion 1; subst. let H := match goal with X : All_decls_alpha_pb _ _ _ _ |- _ => X end in inversion H; clear H; subst; constructor => //. all: apply HPQ; constructor; tea. all: eapply All_impl; tea; intros *; cbn. all: inversion 1; subst => //=. } 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 | cstr_respects_variance_impl_gen | 523 |
Σ Σ' mdecl v cs Pcmp Pcmp' : (match variance_universes (ind_universes mdecl) v with | Some (univs, u, u') => forall Γ t T pb, Pcmp (Σ, univs) Γ pb t T -> Pcmp' (Σ', univs) Γ pb t T | None => True end) -> @cstr_respects_variance Pcmp Σ mdecl v cs -> @cstr_respects_variance Pcmp' Σ' mdecl v cs. Proof. rewrite /cstr_respects_variance/cumul_ctx_rel/cumul_pb_decls. destruct variance_universes; destr_prod; try now case. move => HPQ [HP1 HP2]. split; first [ eapply All2_fold_impl | eapply All2_impl ]; tea; intros *; cbn; eauto. eapply All_decls_alpha_pb_impl; 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 | cstr_respects_variance_impl | 524 |
Σ mdecl i idecl ind_indices cdecl cunivs args cf Pcmp P : { '(cf', Pcmp', P') & config.impl cf' cf × @on_constructor cf' Pcmp' P' Σ mdecl i idecl ind_indices cdecl cunivs } -> (forall Γ j, All (fun '(cf', Pcmp', P') => P' Σ Γ j) args -> P Σ Γ j) -> (forall u Γ t T pb, All (fun '(cf', Pcmp', P') => Pcmp' (Σ.1, u) Γ pb t T) args -> Pcmp (Σ.1, u) Γ pb t T) -> All (fun '(cf', Pcmp', P') => @on_constructor cf' Pcmp' P' Σ mdecl i idecl ind_indices cdecl cunivs) args -> @on_constructor cf Pcmp P Σ mdecl i idecl ind_indices cdecl cunivs. Proof. intros Hexists H1 H2 Hargs. destruct Hexists as [[[??]?] [? Hexists]]. destruct Hexists; split; tea. all: unfold on_type, config.impl in *; eauto. { apply H1; clear H1. eapply All_impl; tea; intros *; destr_prod; destruct 1; tea. } { eapply sorts_local_ctx_impl_gen; tea. { eexists; tea. } { intros; eapply H1, All_eta3; cbn; apply All_map_inv with (P:=fun P => P _ _ _) (f:=snd); tea. } { eapply All_map, All_impl; tea; intros *; destr_prod; destruct 1; cbn; tea. } } { eapply ctx_inst_impl_gen; tea. { eexists; tea. } { intros; eapply H1, All_eta3; cbn. apply All_map_inv with (P:=fun P => P _ t T1) (f:=fun P Γ t T => snd P Σ Γ (TermTyp t T)); tea. } { eapply All_map, All_impl; tea; intros *; destr_prod; destruct 1; cbn; tea. } } { move => ? H'. match goal with H : _ |- _ => specialize (H _ H'); revert H end => H''. eapply cstr_respects_variance_impl_gen; revgoals. { eapply All_map, All_impl; tea; intros *; destr_prod; destruct 1; cbn. instantiate (1:=ltac:(intros [[??]?])); cbn. match goal with H : _ |- _ => refine (H _ H') end. } { repeat match goal with |- context[match ?x with _ => _ end] => destruct x eqn:?; subst end => //. intros; eapply H2, All_eta3; cbn; apply All_map_inv with (P:=fun P => P _ _ _ _ _) (f:=fun x => x.1.2). erewrite map_ext; tea; intros; destr_prod; cbn => //. } { eexists; tea. } } { unfold config.impl in *. do 2 destruct lets_in_constructor_types; cbn in *; rewrite -> ?andb_false_r in * => //. } 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 | on_constructor_impl_config_gen | 525 |
Σ mdecl i idecl ind_indices cdecl cunivs args cf Pcmp P : { '(cf', Pcmp', P') & config.impl cf' cf × @on_constructors cf' Pcmp' P' Σ mdecl i idecl ind_indices cdecl cunivs } -> All (fun '(cf', Pcmp', P') => config.impl cf' cf) args -> (forall Γ j, All (fun '(cf', Pcmp', P') => P' Σ Γ j) args -> P Σ Γ j) -> (forall u Γ t T pb, All (fun '(cf', Pcmp', P') => Pcmp' (Σ.1, u) Γ pb t T) args -> Pcmp (Σ.1, u) Γ pb t T) -> All (fun '(cf', Pcmp', P') => @on_constructors cf' Pcmp' P' Σ mdecl i idecl ind_indices cdecl cunivs) args -> @on_constructors cf Pcmp P Σ mdecl i idecl ind_indices cdecl cunivs. Proof. intros Hexists Hargsconfig H1 H2 Hargs. destruct Hexists as [[[??]?] [? Hexists]]. unfold on_constructors in *. destruct args. { eapply All2_impl; tea; intros. eapply on_constructor_impl_config_gen; tea; try eexists (_, _, _); eauto. } apply All_eta3, All_All2_swap in Hargs; [ | constructor; congruence ]. eapply All2_impl; try exact Hargs; cbv beta => ?? Hargs'. eapply on_constructor_impl_config_gen; tea. all: repeat first [ progress destr_prod | match goal with | [ H : All _ (_ :: _) |- _ ] => inversion H; clear H; subst end ]. { eexists; instantiate (1:=ltac:(repeat eapply pair)); cbn in *. eauto. } constructor; eauto. now eapply All_impl; [ multimatch goal with H : _ |- _ => exact H end | ]; intros; destr_prod; 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 | on_constructors_impl_config_gen | 526 |
Σ Σ' mdecl v cs Pcmp Pcmp' : match variance_universes (ind_universes mdecl) v with | Some (univs, u, u') => forall Γ t T pb, Pcmp (Σ, univs) Γ pb t T -> Pcmp' (Σ', univs) Γ pb t T | None => True end -> @ind_respects_variance Pcmp Σ mdecl v cs -> @ind_respects_variance Pcmp' Σ' mdecl v cs. Proof. rewrite /ind_respects_variance/cumul_ctx_rel/cumul_pb_decls. destruct variance_universes; destr_prod; try now case. move => HPQ HP. eapply All2_fold_impl; tea; intros *; cbn; eauto. inversion 1; subst; subst; constructor => //; 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 | ind_respects_variance_impl | 527 |
Σ univs variances cf' cf : config.impl cf' cf -> @on_variance cf' Σ univs variances -> @on_variance cf Σ univs variances. Proof. rewrite /on_variance; case: univs; case: variances => //; intros. repeat first [ match goal with | [ H : sigT _ |- _ ] => destruct H | [ H : and4 _ _ _ _ |- _ ] => destruct H | [ H : ssrbool.and4 _ _ _ _ |- _ ] => destruct H | [ H : prod _ _ |- _ ] => destruct H | [ H : and _ _ |- _ ] => destruct H | [ |- and _ _ ] => split | [ |- sigT _ ] => repeat match goal with |- sigT _ => eexists end; split; tea end | progress unfold config.impl, consistent_instance_ext, consistent_instance, valid_constraints in * | progress cbn in * => //= | match goal with | [ |- context[match ?x with _ => _ end] ] => destruct x eqn:?; subst | [ H : context[match ?x with _ => _ end] |- _ ] => destruct x eqn:?; subst end ]. 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 | on_variance_impl | 528 |
Σ cdecls ind_sort cf' cf : config.impl cf' cf -> @check_constructors_smaller cf' Σ cdecls ind_sort -> @check_constructors_smaller cf Σ cdecls ind_sort. Proof. intro Xcf. unfold check_constructors_smaller. intro H; apply Forall_impl with (1 := H). intros l Hl; apply Forall_impl with (1 := Hl). intro u. now apply leq_sort_config_impl. 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 | check_constructors_smaller_impl | 529 |
{cf1 cf2 : checker_flags} Pcmp1 Pcmp2 P1 P2 Σ Σ' kn d : config.impl cf1 cf2 -> (forall Γ j, P1 Σ Γ j -> P2 Σ' Γ j) -> (forall u Γ pb t t', Pcmp1 (Σ.1, u) Γ pb t t' -> Pcmp2 (Σ'.1, u) Γ pb t t') -> (forall u, wf_sort Σ u -> wf_sort Σ' u) -> (forall l s, @check_constructors_smaller cf1 (global_ext_constraints Σ) l s -> @check_constructors_smaller cf2 (global_ext_constraints Σ') l s) -> (forall u l, @on_variance cf1 Σ.1 u l -> @on_variance cf2 Σ'.1 u l) -> @on_global_decl cf1 Pcmp1 P1 Σ kn d -> @on_global_decl cf2 Pcmp2 P2 Σ' kn d. | 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 | on_global_decl_impl_full | 530 |
{cf cf1 cf2 : checker_flags} Pcmp Pcmp' P Q Σ kn d : config.impl cf1 cf2 -> (forall Γ j, @on_global_env cf Pcmp P Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> (forall u Γ pb t t', @on_global_env cf Pcmp P Σ.1 -> Pcmp (Σ.1, u) Γ pb t t' -> Pcmp' (Σ.1, u) Γ pb t t') -> @on_global_env cf Pcmp P Σ.1 -> @on_global_decl cf1 Pcmp P Σ kn d -> @on_global_decl cf2 Pcmp' Q Σ kn d. Proof. destruct Σ as [Σ u]. cbn. intros ??? H. apply on_global_decl_impl_full => //. - intros ??. now apply X. - intros ?????. now apply X0. - intros ??; now apply check_constructors_smaller_impl. - intros ??; now apply on_variance_impl. 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 | on_global_decl_impl_only_config | 531 |
{cf : checker_flags} Pcmp P Q Σ kn d : (forall Γ j, on_global_env Pcmp P Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> on_global_env Pcmp P Σ.1 -> on_global_decl Pcmp P Σ kn d -> on_global_decl Pcmp Q Σ kn d. Proof. intro X. apply on_global_decl_impl_only_config; tas. 1: reflexivity. easy. 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 | on_global_decl_impl_simple | 532 |
{cf1 cf2 : checker_flags} Pcmp Pcmp' P Q : config.impl cf1 cf2 -> (forall Σ Γ j, @on_global_env cf1 Pcmp P Σ.1 -> @on_global_env cf2 Pcmp' Q Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> (forall Σ Γ t T pb, @on_global_env cf1 Pcmp P Σ.1 -> @on_global_env cf2 Pcmp' Q Σ.1 -> Pcmp Σ Γ pb t T -> Pcmp' Σ Γ pb t T) -> forall Σ, @on_global_env cf1 Pcmp P Σ -> @on_global_env cf2 Pcmp' Q Σ. Proof. intros Xcf X Xcmp Σ [cu IH]. split; auto. revert cu IH; generalize (universes Σ) as univs, (retroknowledge Σ) as retro, (declarations Σ). clear Σ. induction g; intros; auto. constructor; auto. depelim IH. specialize (IHg cu IH). constructor; auto. destruct o. constructor; auto. eapply @on_global_decl_impl_only_config with (cf := cf1) (1 := Xcf) (5 := on_global_decl_d0). { intros. eapply X; [tea| split; tea |tea]. } { cbn. intros. eapply Xcmp. 1,3: eassumption. split; cbn. all: eassumption. } split; 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 | on_global_env_impl_config | 533 |
{cf : checker_flags} Pcmp P Q : (forall Σ Γ j, on_global_env Pcmp P Σ.1 -> on_global_env Pcmp Q Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> forall Σ, on_global_env Pcmp P Σ -> on_global_env Pcmp Q Σ. Proof. intros; eapply on_global_env_impl_config; eauto; 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 | on_global_env_impl | 534 |
`{checker_flags} {Pcmp P} {Σ : global_env} {c decl} : on_global_env Pcmp P Σ -> lookup_env Σ c = Some decl -> ∑ Σ' : global_env_ext, on_global_env Pcmp P Σ' × strictly_extends_decls Σ' Σ × on_global_decl Pcmp P Σ' c decl. | 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 | lookup_on_global_env | 535 |
`{checker_flags} (Σ : global_env_ext) (Γ : context) (t : term) := on_type (lift_typing typing) Σ Γ 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 | isType | 536 |
`{checker_flags} (P : global_env_ext -> context -> term -> term -> Type) := on_global_env cumul_gen (lift_typing 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 | Forall_decls_typing | 537 |
`{checker_flags} Σ Γ d := match d.(decl_body) with | None => isType Σ Γ d.(decl_type) | Some body => Σ ;;; Γ |- body : d.(decl_type) 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 | type_local_decl | 538 |
`{checker_flags} Σ Γ t T U : Σ ;;; Γ |- t : T -> T = U -> Σ ;;; Γ |- t : U. Proof. now intros 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 | refine_type | 539 |
`{checker_flags} Σ := All_local_rel (lift_typing1 (typing Σ)). | 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 | wf_local_rel | 540 |
{cf1 cf2 cf3 : checker_flags} {Σ : global_env} {wfΣ : @on_global_env cf1 (@cumul_gen cf1) (lift_typing (@typing cf1)) Σ} P Q : config.impl cf2 cf3 -> (forall Σ Γ pb t T, @cumul_gen cf2 Σ Γ pb t T -> @cumul_gen cf3 Σ Γ pb t T) -> (forall Σ Γ j, @on_global_env cf1 (@cumul_gen cf1) (lift_typing (@typing cf1)) Σ.1 -> @on_global_env cf2 (@cumul_gen cf2) P Σ.1 -> @on_global_env cf3 (@cumul_gen cf3) Q Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> @on_global_env cf2 (@cumul_gen cf2) P Σ -> @on_global_env cf3 (@cumul_gen cf3) Q Σ. Proof. intros Xcf Xcmp X [cu IH]. destruct wfΣ as [_ wfΣ]. split; auto. revert cu IH wfΣ; generalize (universes Σ) as univs, (retroknowledge Σ) as retro, (declarations Σ). clear Σ. induction g; intros; auto. constructor; auto. depelim IH. depelim wfΣ. specialize (IHg cu IH wfΣ). constructor; auto. destruct o. constructor; auto. eapply @on_global_decl_impl_only_config with (cf := cf2) (5 := on_global_decl_d0) => //. { intros. eapply X; cycle -1; tea; split; tea. } { intros. now eapply Xcmp. } 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 | on_wf_global_env_impl_config | 541 |
`{checker_flags} {Σ : global_env} {wfΣ : on_global_env cumul_gen (lift_typing typing) Σ} P Q : (forall Σ Γ j, on_global_env cumul_gen (lift_typing typing) Σ.1 -> on_global_env cumul_gen P Σ.1 -> on_global_env cumul_gen Q Σ.1 -> P Σ Γ j -> Q Σ Γ j) -> on_global_env cumul_gen P Σ -> on_global_env cumul_gen Q Σ. Proof. unshelve eapply on_wf_global_env_impl_config; eauto; 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 | on_wf_global_env_impl | 542 |
{Σ kn cdecl} : declared_constant_gen (lookup_env Σ) kn cdecl -> declared_constant Σ kn cdecl. Proof using Type. intro H. eapply lookup_global_Some_if_In. red in H. unfold lookup_env in H. apply lookup_constant_declared_gen => //. unfold lookup_constant_gen. now rewrite 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 | declared_constant_from_gen | 543 |
{Σ kn cdecl} {wfΣ : wf Σ} : declared_constant Σ kn cdecl -> declared_constant_gen (lookup_env Σ) kn cdecl. Proof using P Pcmp cf. intro H; eapply lookup_global_Some_iff_In_NoDup in H. - apply lookup_constant_declared_gen => //. unfold lookup_constant_gen, lookup_env. destruct (lookup_global _ _) => //. destruct g => //. now inversion H. - destruct wfΣ; now eapply NoDup_on_global_decls. 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 | declared_constant_to_gen | 544 |
{Σ ind mdecl} {wfΣ : wf Σ} : declared_minductive Σ ind mdecl -> declared_minductive_gen (lookup_env Σ) ind mdecl. Proof using P Pcmp cf. intro H; eapply lookup_global_Some_iff_In_NoDup in H. - apply lookup_minductive_declared_gen => //. unfold lookup_minductive_gen, lookup_env. destruct (lookup_global _ _) => //. destruct g => //. now inversion H. - destruct wfΣ; now eapply NoDup_on_global_decls. 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 | declared_minductive_to_gen | 545 |
{Σ ind mdecl} : declared_minductive_gen (lookup_env Σ) ind mdecl -> declared_minductive Σ ind mdecl. Proof using Type. intro H; eapply lookup_global_Some_if_In. apply lookup_minductive_declared_gen => //. apply declared_minductive_lookup_gen in 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 | declared_minductive_from_gen | 546 |
{Σ ind mdecl idecl} {wfΣ : wf Σ} : declared_inductive Σ ind mdecl idecl -> declared_inductive_gen (lookup_env Σ) ind mdecl idecl. Proof using P Pcmp cf. intros []; split => //. eapply declared_minductive_to_gen; eauto. Unshelve. all: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 | declared_inductive_to_gen | 547 |
{Σ ind mdecl idecl}: declared_inductive_gen (lookup_env Σ) ind mdecl idecl -> declared_inductive Σ ind mdecl idecl. Proof using Type. intros []; split => //. eapply declared_minductive_from_gen; 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 | declared_inductive_from_gen | 548 |
{Σ id mdecl idecl cdecl} {wfΣ : wf Σ} : declared_constructor Σ id mdecl idecl cdecl -> declared_constructor_gen (lookup_env Σ) id mdecl idecl cdecl. Proof using P Pcmp cf. intros []; split => //. eapply declared_inductive_to_gen; eauto. Unshelve. all: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 | declared_constructor_to_gen | 549 |
{Σ id mdecl idecl cdecl} : declared_constructor_gen (lookup_env Σ) id mdecl idecl cdecl -> declared_constructor Σ id mdecl idecl cdecl. Proof using Type. intros []; split => //. eapply declared_inductive_from_gen; 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 | declared_constructor_from_gen | 550 |
{Σ p mdecl idecl cdecl pdecl} {wfΣ : wf Σ} : declared_projection Σ p mdecl idecl cdecl pdecl -> declared_projection_gen (lookup_env Σ) p mdecl idecl cdecl pdecl. Proof using P Pcmp cf. intros [? []]. split => //. eapply declared_constructor_to_gen; eauto. Unshelve. all: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 | declared_projection_to_gen | 551 |
{Σ p mdecl idecl cdecl pdecl} : declared_projection_gen (lookup_env Σ) p mdecl idecl cdecl pdecl -> declared_projection Σ p mdecl idecl cdecl pdecl. Proof using Type. intros [? []]. split => //. eapply declared_constructor_from_gen; 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 | declared_projection_from_gen | 552 |
KernameMap.t A. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | t | 553 |
t := KernameMap.empty _. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | empty | 554 |
(k : kername) (env : t) : option A := KernameMap.find k env. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup | 555 |
(k : kername) (g : A) (env : t) : t := KernameMap.add k g env. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | add | 556 |
(k : kername) (env : t) : t := KernameMap.remove k env. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | remove | 557 |
(e : t) kn kn' g : kn <> kn' -> lookup kn (add kn' g e) = lookup kn e. Proof using Type. intros ne. unfold lookup, add. rewrite KernameMapFact.F.add_neq_o //. intros eq. apply Kername.compare_eq in eq. congruence. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | gso | 558 |
(e : t) kn kn' g : kn = kn' -> lookup kn (add kn' g e) = Some g. Proof using Type. intros eq. unfold lookup, add. rewrite KernameMapFact.F.add_eq_o //. now apply Kername.compare_eq. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | gss | 559 |
(g g' : t) := KernameMap.Equal g g'. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | equal | 560 |
g g' : (forall i, lookup i g = lookup i g') -> equal g g'. Proof using Type. intros heq. intros i. apply heq. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | unfold_equal | 561 |
(s : kername) (g : list (kername × A)) := Forall (fun g0 : kername × A => g0.1 <> s) g. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | fresh_global | 562 |
list (kername × A) -> Prop := | fresh_globals_empty : fresh_globals [] | fresh_globals_cons kn d g : fresh_globals g -> fresh_global kn g -> fresh_globals ((kn, d) :: g). | Inductive | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | fresh_globals | 563 |
kn Σ : fresh_global kn Σ <-> ~ In kn (map fst Σ). Proof using Type. rewrite /fresh_global; split; [ induction 1 | induction Σ; constructor ]; cbn in *. all: tauto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | fresh_global_iff_not_In | 564 |
forall Σ, fresh_globals Σ <-> NoDup (List.map fst Σ). Proof using Type. elim; [ | case ]; split; cbn; inversion 1; subst; constructor. all: repeat match goal with H : iff _ _ |- _ => destruct H end. all: repeat match goal with H : ?T |- _ => match type of T with Prop => revert H end end. all: rewrite -?fresh_global_iff_not_In; auto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | fresh_globals_iff_NoDup | 565 |
d g acc : fold_left (fun (genv : t) (decl : kername × A) => add decl.1 decl.2 genv) (d :: g) acc = fold_left (fun (genv : t) (decl : kername × A) => add decl.1 decl.2 genv) g (add d.1 d.2 acc). Proof using Type. reflexivity. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | fold_left_cons | 566 |
(g : list (kername × A)) : t := KernameMapFact.of_list g. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | of_global_env | 567 |
(g : list (kername × A)) (e : t) := equal e (of_global_env g). | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | repr | 568 |
(g : list (kername × A)) : repr g (of_global_env g). Proof using Type. red. reflexivity. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | repr_global_env | 569 |
d g : fresh_globals (d :: g) -> of_global_env (d :: g) = add d.1 d.2 (of_global_env g). Proof using Type. unfold of_global_env. simpl. unfold KernameMapFact.uncurry. reflexivity. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | of_global_env_cons | 570 |
{cf} {Σ : list (kername × A)} e k g : fresh_globals Σ -> fresh_global k Σ -> repr Σ e -> repr ((k, g) :: Σ) (add k g e). Proof using Type. intros wfΣ fresh repr. red. rewrite /add. do 2 red in repr. rewrite repr. rewrite of_global_env_cons //. constructor => //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | repr_add | 571 |
k v g : lookup k (add k v g) = Some v. Proof using Type. rewrite gss //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup_add | 572 |
k k' v g : k <> k' -> lookup k (add k' v g) = lookup k g. Proof using Type. move=> eqk. rewrite gso //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup_add_other | 573 |
Σ k v e : fresh_globals Σ -> fresh_global k Σ -> repr Σ e -> equal (remove k (add k v e)) e. Proof using Type. unfold repr, equal, remove, add. intros frΣ frk eq. intros k'. rewrite KernameMapFact.F.remove_o. destruct KernameMap.E.eq_dec. eapply Kername.compare_eq in e0. subst k'. - rewrite {}eq. induction frk. now cbn. rewrite of_global_env_cons //. depelim frΣ. simpl in H0 |- *. rewrite KernameMapFact.F.add_neq_o //. intros c. eapply Kername.compare_eq in c. contradiction. now apply IHfrk. - rewrite KernameMapFact.F.add_neq_o //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | remove_add_eq | 574 |
k k' v e : k <> k' -> equal (remove k' (add k v e)) (add k v (remove k' e)). Proof using Type. unfold repr, equal, remove, add. intros neq k''. rewrite KernameMapFact.F.remove_o. destruct KernameMap.E.eq_dec. eapply Kername.compare_eq in e0. subst k'. - rewrite KernameMapFact.F.add_neq_o //. intros c. eapply Kername.compare_eq in c. contradiction. rewrite KernameMapFact.F.remove_o. destruct KernameMap.E.eq_dec => //. exfalso; apply n. now apply Kername.compare_eq. - rewrite !KernameMapFact.F.add_o //. destruct (KernameMap.E.eq_dec k k'') => //. rewrite KernameMapFact.F.remove_neq_o //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | remove_add_o | 575 |
(Σ : list (kername × A)) (kn : kername) {struct Σ} : option A := match Σ with | [] => None | d :: tl => if eq_kername kn d.1 then Some d.2 else lookup_global tl kn end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup_global | 576 |
(g : list (kername × A)) (e : t) : fresh_globals g -> repr g e -> forall k, lookup k e = lookup_global g k. Proof using Type. intros wf eq k. red in eq. move: eq. induction g in e, k, wf |- *. - simpl. intros eq. unfold lookup. rewrite -KernameMapFact.F.not_find_in_iff. intros hin. red in eq. rewrite eq in hin. now eapply KernameMapFact.F.empty_in_iff in hin. - cbn -[of_global_env eqb]. destruct (eqb_spec k a.1). * subst. rewrite of_global_env_cons //. intros he. unfold lookup. rewrite he. now rewrite [KernameMap.find _ _]lookup_add. * rewrite of_global_env_cons //. intros he. unfold lookup. rewrite he. rewrite [KernameMap.find _ _]lookup_add_other //. apply IHg. now depelim wf. reflexivity. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup_spec | 577 |
PTree.tree A. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | t | 578 |
a a' p p' : bool_cons_pos a p = bool_cons_pos a' p' -> a = a' /\ p = p'. Proof. destruct a, a'; cbn; try discriminate; intros [=] => //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | bool_cons_pos_inj | 579 |
a a' p p' : ascii_cons_pos a p = ascii_cons_pos a' p' -> a = a' /\ p = p'. Proof. unfold ascii_cons_pos. destruct a, a'. repeat move/bool_cons_pos_inj => [] ?; subst; auto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | ascii_cons_pos_inj | 580 |
s s' : pos_of_string s = pos_of_string s' -> s = s'. Proof. induction s in s' |- *; destruct s' => /= //. destruct a. cbn. destruct b; cbn; discriminate. destruct a. cbn. destruct b; cbn; discriminate. move/ascii_cons_pos_inj. intuition f_equal; auto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_string_inj | 581 |
(p : positive) := match p with | xH => xO xH | xO p => xI p | xI p => xO (pos_succ p) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_succ | 582 |
(p : positive) := match p with | xH => xO (xI xH) | xO p => xO (xO (listencoding p)) | xI p => xI (xI (listencoding p)) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | listencoding | 583 |
(p : positive) (q : positive) := match p with | xH => q | xI p => xI (posapp p q) | xO p => xO (posapp p q) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | posapp | 584 |
(hd : positive) (tl : positive) := posapp (listencoding hd) (posapp (xO (xI xH)) tl). | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_cons | 585 |
(l : list string) := match l with | [] => xH | x :: l => pos_cons (pos_of_string x) (pos_of_stringlist l) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_stringlist | 586 |
p1 p2 q1 q2 : posapp (listencoding p1) q1 = posapp (listencoding p2) q2 -> p1 = p2 /\ q1 = q2. Proof. induction p1 in p2, q1, q2 |- *; destruct p2; cbn; try congruence. all: try now firstorder congruence. - intros H. depelim H. symmetry in H. firstorder congruence. - intros H. depelim H. symmetry in H. firstorder congruence. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_app_inj | 587 |
hd hd' tl tl' : pos_cons hd tl = pos_cons hd' tl' -> hd = hd' /\ tl = tl'. Proof. unfold pos_cons. intros. eapply pos_app_inj in H as [-> H]. cbn in H. depelim H. eauto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_cons_inj | 588 |
l1 l2 : pos_of_stringlist l1 = pos_of_stringlist l2 -> l1 = l2. Proof. induction l1 in l2 |- *; destruct l2; cbn; try congruence. - destruct s; cbn. congruence. destruct a; cbn; destruct b; cbn; congruence. - destruct a; cbn. congruence. destruct a; cbn; destruct b; cbn; congruence. - intros [? % pos_of_string_inj] % pos_cons_inj. f_equal; eauto. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_stringlist_inj | 589 |
s s' p : pos_of_string_cont s p = pos_of_string_cont s' p -> s = s'. Proof. induction s; destruct s' => /= //. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_string_cont_inj | 590 |
(d : dirpath) (cont : positive) : positive := match d with | hd :: tl => pos_of_string_cont hd (pos_of_dirpath_cont tl cont) | [] => cont end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_dirpath_cont | 591 |
(n : nat) (cont : positive) : positive := match n with | 0 => cont | S x => pos_succ (pos_of_nat_cont x cont) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_nat_cont | 592 |
(m : modpath) (p : positive) : positive := match m with | MPfile d => pos_of_dirpath_cont d p | MPbound d i k => pos_of_dirpath_cont d (pos_of_string_cont i (pos_of_nat_cont k p)) | MPdot m i => pos_of_modpath_cont m (pos_of_string_cont i p) end. | Fixpoint | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_modpath_cont | 593 |
(k : kername) : positive := pos_of_modpath_cont k.1 (pos_of_string k.2). | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_kername | 594 |
k k' : pos_of_kername k = pos_of_kername k' -> k = k'. Proof. induction k; destruct k'. unfold pos_of_kername. cbn. induction a; destruct m => /= //. cbn. Qed. | Lemma | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | pos_of_kername_inj | 595 |
t := PTree.empty _. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | empty | 596 |
(k : kername) (env : t) : option global_decl := PTree.get (pos_of_kername k) env. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | lookup | 597 |
(k : kername) (g : global_decl) (env : t) : t := PTree.set (pos_of_kername k) g env. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | add | 598 |
(g : global_env) : t := List.fold_left (fun genv decl => add decl.1 decl.2 genv) g empty. | Definition | common | From Coq Require Import ssreflect RelationClasses OrderedTypeAlt FMapAVL FMapFacts. From MetaCoq.Utils Require Import utils String2pos CanonicalTries. From MetaCoq.Common Require Import config uGraph Reflect BasicAst Kernames. From Equations Require Import Equations. Import String2pos. | common\theories\EnvMap.v | of_global_env | 599 |
Subsets and Splits