diff --git a/graphs/dependency.dot b/graphs/dependency.dot index 4708428..f75a20f 100644 --- a/graphs/dependency.dot +++ b/graphs/dependency.dot @@ -49,6 +49,9 @@ digraph theorem_deps { mred_B_intro [label="mred_B_intro", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mred_B_intro theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; mred_gc_intro [label="mred_gc_intro", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mred_gc_intro theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; mred_r_intro [label="mred_r_intro", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mred_r_intro theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + Plus_mred_of_Plus_red1 [label="Plus_mred_of_Plus_red1", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Plus_mred_of_Plus_red1 theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + mred_full_comp_pure [label="mred_full_comp_pure", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mred_full_comp_pure theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + mred_plus_one [label="mred_plus_one", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mred_plus_one theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; Plus_red1_context [label="Plus_red1_context", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Plus_red1_context theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; occurs_count_zero [label="occurs_count_zero", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_zero theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; occurs_count_false [label="occurs_count_false", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="occurs_count_false theory/Metatheory.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; @@ -70,6 +73,8 @@ digraph theorem_deps { isubst_meta_in [label="isubst_meta_in", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="isubst_meta_in theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; isubst_meta_notin [label="isubst_meta_notin", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="isubst_meta_notin theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; eqC_in_Es [label="eqC_in_Es", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="eqC_in_Es theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + Es_ctx_any [label="Es_ctx_any", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_ctx_any theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + nred_R_intro [label="nred_R_intro", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nred_R_intro theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; Es_refl_any [label="Es_refl_any", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_refl_any theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; Es_sym_any [label="Es_sym_any", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_sym_any theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; Es_trans_any [label="Es_trans_any", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_trans_any theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; @@ -155,6 +160,8 @@ digraph theorem_deps { mfvs_lift_m -> mfvs_open_m; of_trm_plug -> mred_term_context; of_trm_moccurs -> of_trm_moccurs0; + Plus_mred_of_Plus_red1 -> mred_full_comp_pure; + lemma_2_2_full_comp -> mred_full_comp_pure; occurs_count_zero -> occurs_count_pos; occurs_count_false -> occurs_count_zfill_plug; occurs_lift_self -> occurs_count_zfill_plug; diff --git a/graphs/dependency.png b/graphs/dependency.png index eace39f..e52f959 100644 Binary files a/graphs/dependency.png and b/graphs/dependency.png differ diff --git a/graphs/dependency.svg b/graphs/dependency.svg index 72ccbcc..aa208d0 100644 --- a/graphs/dependency.svg +++ b/graphs/dependency.svg @@ -4,25 +4,25 @@ - - + + theorem_deps - -Milner's Lambda-Calculus with Partial Substitutions - theorem dependency (M4) -proved -    -stated -    -planned -    -blocked + +Milner's Lambda-Calculus with Partial Substitutions - theorem dependency (M4) +proved +    +stated +    +planned +    +blocked fvs_lift - -fvs_lift + +fvs_lift @@ -30,38 +30,38 @@ open_rec_fvs - -open_rec_fvs + +open_rec_fvs fvs_lift->open_rec_fvs - - + + - + fvs_zplug_lift - - -fvs_zplug_lift + + +fvs_zplug_lift - + fvs_lift->fvs_zplug_lift - - + + lift_lc - -lift_lc + +lift_lc @@ -69,68 +69,68 @@ lift_0_lc - -lift_0_lc + +lift_0_lc lift_lc->lift_0_lc - - + + subst_fvar_self - -subst_fvar_self + +subst_fvar_self lift_0_lc->subst_fvar_self - - + + open_rec_bvar - -open_rec_bvar + +open_rec_bvar open_rec_bvar->open_rec_fvs - - + + open_close - -open_close + +open_close open_rec_bvar->open_close - - + + close_rec_fvar - -close_rec_fvar + +close_rec_fvar @@ -138,70 +138,70 @@ open_rec_occurs_false - -open_rec_occurs_false + +open_rec_occurs_false - + open_rec_zplug_lift - + open_rec_zplug_lift - + open_rec_occurs_false->open_rec_zplug_lift - - + + - + full_comp_aux - - -full_comp_aux + + +full_comp_aux - + open_rec_occurs_false->full_comp_aux - - + + - + subst_notin - + subst_notin - + open_rec_occurs_false->subst_notin - - + + - + full_comp_aux_sub - - -full_comp_aux_sub + + +full_comp_aux_sub - + open_rec_occurs_false->full_comp_aux_sub - - + + @@ -213,7 +213,7 @@ - + close_rec_notin->subst_notin @@ -222,8 +222,8 @@ close_rec_fvs - -close_rec_fvs + +close_rec_fvs @@ -231,83 +231,83 @@ subst_fvs - -subst_fvs + +subst_fvs close_rec_fvs->subst_fvs - - + + open_rec_bvar_neq - -open_rec_bvar_neq + +open_rec_bvar_neq open_rec_bvar_neq->open_rec_fvs - - + + open_rec_fvs->subst_fvs - - + + - + subst_lc_self - - -subst_lc_self + + +subst_lc_self - + subst_fvar_self->subst_lc_self - - + + subst_fvar_other - -subst_fvar_other + +subst_fvar_other - + subst_other - - -subst_other + + +subst_other - + subst_fvar_other->subst_other - - + + Star_trans - -Star_trans + +Star_trans @@ -315,8 +315,8 @@ red1_star - -red1_star + +red1_star @@ -324,32 +324,32 @@ Plus_to_Star - -Plus_to_Star + +Plus_to_Star - + star_red_sub_full_comp - - -star_red_sub_full_comp + + +star_red_sub_full_comp - + Plus_to_Star->star_red_sub_full_comp - - + + Star_red1_context - -Star_red1_context + +Star_red1_context @@ -357,8 +357,8 @@ star_one_trans - -star_one_trans + +star_one_trans @@ -366,8 +366,8 @@ in_comb - -in_comb + +in_comb @@ -375,38 +375,38 @@ size_all_terms - -size_all_terms + +size_all_terms in_comb->size_all_terms - - + + pow2_pos - -pow2_pos + +pow2_pos pow2_pos->size_all_terms - - + + enumerate_check - -enumerate_check + +enumerate_check @@ -414,8 +414,8 @@ enumerate_sound - -enumerate_sound + +enumerate_sound @@ -423,8 +423,8 @@ enumerate_complete - -enumerate_complete + +enumerate_complete @@ -432,8 +432,8 @@ of_trm_fvs - -of_trm_fvs + +of_trm_fvs @@ -441,8 +441,8 @@ of_trm_lift - -of_trm_lift + +of_trm_lift @@ -450,23 +450,23 @@ of_trm_open - -of_trm_open + +of_trm_open of_trm_lift->of_trm_open - - + + of_trm_close - -of_trm_close + +of_trm_close @@ -474,8 +474,8 @@ of_trm_injective - -of_trm_injective + +of_trm_injective @@ -483,8 +483,8 @@ mfvs_lift_m - -mfvs_lift_m + +mfvs_lift_m @@ -492,23 +492,23 @@ mfvs_open_m - -mfvs_open_m + +mfvs_open_m mfvs_lift_m->mfvs_open_m - - + + mfvs_close_m - -mfvs_close_m + +mfvs_close_m @@ -516,8 +516,8 @@ of_trm_plug - -of_trm_plug + +of_trm_plug @@ -525,23 +525,23 @@ mred_term_context - -mred_term_context + +mred_term_context of_trm_plug->mred_term_context - - + + mred_of_red1 - -mred_of_red1 + +mred_of_red1 @@ -549,8 +549,8 @@ mred_context - -mred_context + +mred_context @@ -558,8 +558,8 @@ of_trm_moccurs - -of_trm_moccurs + +of_trm_moccurs @@ -567,23 +567,23 @@ of_trm_moccurs0 - -of_trm_moccurs0 + +of_trm_moccurs0 of_trm_moccurs->of_trm_moccurs0 - - + + mred_B_intro - -mred_B_intro + +mred_B_intro @@ -591,8 +591,8 @@ mred_gc_intro - -mred_gc_intro + +mred_gc_intro @@ -600,1153 +600,1210 @@ mred_r_intro - -mred_r_intro + +mred_r_intro + + + + + +Plus_mred_of_Plus_red1 + + +Plus_mred_of_Plus_red1 + + + + + +mred_full_comp_pure + + +mred_full_comp_pure + + + + + +Plus_mred_of_Plus_red1->mred_full_comp_pure + + + + + +mred_plus_one + + +mred_plus_one - + Plus_red1_context - - -Plus_red1_context + + +Plus_red1_context - + lemma_2_3_beta_sim - - -lemma_2_3_beta_sim + + +lemma_2_3_beta_sim - + Plus_red1_context->lemma_2_3_beta_sim - - + + - + occurs_count_zero - - -occurs_count_zero + + +occurs_count_zero - + occurs_count_pos - - -occurs_count_pos + + +occurs_count_pos - + occurs_count_zero->occurs_count_pos - - + + - + occurs_count_zero->full_comp_aux - - + + - + occurs_count_zero->full_comp_aux_sub - - + + - + occurs_count_false - + occurs_count_false - + occurs_count_zfill_plug - + occurs_count_zfill_plug - + occurs_count_false->occurs_count_zfill_plug - + occurs_lift_self - - -occurs_lift_self + + +occurs_lift_self - + occurs_lift_self->occurs_count_zfill_plug - - + + - + occurs_lift_self->open_rec_zplug_lift - - + + - + zdecs_nonempty - + zdecs_nonempty - + zdecs_nonempty->full_comp_aux - - + + - + zdecs_nonempty->full_comp_aux_sub - - + + - + occurs_count_zfill_plug->full_comp_aux - - + + - + occurs_count_zfill_plug->full_comp_aux_sub - - + + - + open_rec_zplug_lift->full_comp_aux - - + + - + open_rec_zplug_lift->full_comp_aux_sub - - + + - + lemma_2_2_full_comp - - -lemma_2_2_full_comp + + +lemma_2_2_full_comp - + full_comp_aux->lemma_2_2_full_comp - - + + + + + +lemma_2_2_full_comp->mred_full_comp_pure + + - + lemma_2_2_full_comp->lemma_2_3_beta_sim - - + + - + red1_root_fv - - -red1_root_fv + + +red1_root_fv - + fvs_zplug_lift->red1_root_fv - - + + - + plug_fv_mono - - -plug_fv_mono + + +plug_fv_mono - + red1r_fv - - -red1r_fv + + +red1r_fv - + plug_fv_mono->red1r_fv - - + + - + red1_root_fv->red1r_fv - - + + - + lemma_2_1_fv_preserved - - -lemma_2_1_fv_preserved + + +lemma_2_1_fv_preserved - + red1r_fv->lemma_2_1_fv_preserved - - + + - + gen_fv_preserved - - -gen_fv_preserved + + +gen_fv_preserved - + lemma_2_1_fv_preserved->gen_fv_preserved - - + + - + corpus_fv_preserved - - -corpus_fv_preserved + + +corpus_fv_preserved - + lemma_2_1_fv_preserved->corpus_fv_preserved - - + + - + Plus_trans - - -Plus_trans + + +Plus_trans - + Plus_step_trans - - -Plus_step_trans + + +Plus_step_trans - + isubst_meta_in - - -isubst_meta_in + + +isubst_meta_in - + isubst_meta_notin - - -isubst_meta_notin + + +isubst_meta_notin - + eqC_in_Es - - -eqC_in_Es + + +eqC_in_Es + + + + + +Es_ctx_any + + +Es_ctx_any + + + + + +nred_R_intro + + +nred_R_intro - + Es_refl_any - - -Es_refl_any + + +Es_refl_any - + Es_sym_any - - -Es_sym_any + + +Es_sym_any - + Es_trans_any - - -Es_trans_any + + +Es_trans_any - + par_red1_iff - - -par_red1_iff + + +par_red1_iff - + par_to_red1_or_eq - - -par_to_red1_or_eq + + +par_to_red1_or_eq - + par_red1_iff->par_to_red1_or_eq - - + + - + red1_or_eq_to_par - - -red1_or_eq_to_par + + +red1_or_eq_to_par - + par_red1_iff->red1_or_eq_to_par - - + + - + red1_in_par - - -red1_in_par + + +red1_in_par - + par_context - - -par_context + + +par_context - + par_reflexive - - -par_reflexive + + +par_reflexive - + gen_list_length - - -gen_list_length + + +gen_list_length - + check_term_true - - -check_term_true + + +check_term_true - + check_all_true - - -check_all_true + + +check_all_true - + check_term_true->check_all_true - - + + check_all_true->enumerate_check - - + + - + gen_sound - - -gen_sound + + +gen_sound - + gen_complete - - -gen_complete + + +gen_complete - + zdecs_sound - + zdecs_sound - + zdecs_sound->full_comp_aux - - + + - + root_steps_sound - - -root_steps_sound + + +root_steps_sound - + zdecs_sound->root_steps_sound - - + + - + zdecs_sound->full_comp_aux_sub - - + + - + zdecs_complete - - -zdecs_complete + + +zdecs_complete - + root_steps_complete - - -root_steps_complete + + +root_steps_complete - + zdecs_complete->root_steps_complete - - + + - + positions_at - - -positions_at + + +positions_at - + steps_sound - - -steps_sound + + +steps_sound - + positions_at->steps_sound - - + + - + root_steps_sound->steps_sound - - + + - + steps_complete - - -steps_complete + + +steps_complete - + root_steps_complete->steps_complete - - + + steps_sound->enumerate_sound - - + + - + steps_sound->gen_sound - - + + - + steps_sound_red1 - - -steps_sound_red1 + + +steps_sound_red1 - + steps_sound->steps_sound_red1 - - + + - + has_red_spec - - -has_red_spec + + +has_red_spec - + steps_sound->has_red_spec - - + + - + corpus_sound - - -corpus_sound + + +corpus_sound - + steps_sound->corpus_sound - - + + - + steps_sound_red1->check_term_true - - + + - + steps_sound_red1->gen_fv_preserved - - + + - + nf_iff_steps_nil - - -nf_iff_steps_nil + + +nf_iff_steps_nil - + steps_sound_red1->nf_iff_steps_nil - - + + - + steps_sound_red1->corpus_fv_preserved - - + + - + positions_hole - - -positions_hole + + +positions_hole - + root_steps_in_steps - - -root_steps_in_steps + + +root_steps_in_steps - + positions_hole->root_steps_in_steps - - + + - + root_steps_in_steps->steps_complete - - + + - + plug_comp - - -plug_comp + + +plug_comp - + plug_comp->steps_complete - - + + - + positions_comp - - -positions_comp + + +positions_comp - + positions_comp->steps_complete - - + + - + at_ctx_comp - - -at_ctx_comp + + +at_ctx_comp - + at_ctx_comp->steps_complete - - + + steps_complete->enumerate_complete - - + + - + steps_complete->gen_complete - - + + - + steps_complete->has_red_spec - - + + - + steps_complete->nf_iff_steps_nil - - + + - + corpus_complete - - -corpus_complete + + +corpus_complete - + steps_complete->corpus_complete - - + + - + has_red_f - - -has_red_f + + +has_red_f - + has_red_f->has_red_spec - - + + - + has_red_spec->check_term_true - - + + - + red1_dec - - -red1_dec + + +red1_dec - + has_red_spec->red1_dec - - + + - + corpus_decides - - -corpus_decides + + +corpus_decides - + has_red_spec->corpus_decides - - + + - + normal_form_iff_nf - - -normal_form_iff_nf + + +normal_form_iff_nf - + nf_iff_steps_nil->normal_form_iff_nf - - + + - + nf_dec - - -nf_dec + + +nf_dec - + nf_iff_steps_nil->nf_dec - - + + - + open_rec_app - - -open_rec_app + + +open_rec_app - + open_rec_lam - - -open_rec_lam + + +open_rec_lam - + open_rec_esub - - -open_rec_esub + + +open_rec_esub - + close_rec_app - - -close_rec_app + + +close_rec_app - + close_rec_lam - - -close_rec_lam + + +close_rec_lam - + close_rec_esub - - -close_rec_esub + + +close_rec_esub - + subst_app - - -subst_app + + +subst_app - + subst_lam - - -subst_lam + + +subst_lam - + subst_esub - - -subst_esub + + +subst_esub - + open_rec_lc_atom - - -open_rec_lc_atom + + +open_rec_lc_atom - + open_rec_lc - - -open_rec_lc + + +open_rec_lc - + open_rec_lc_atom->open_rec_lc - - + + - + red_sub_root_to_red1 - - -red_sub_root_to_red1 + + +red_sub_root_to_red1 - + red_sub_to_red1 - - -red_sub_to_red1 + + +red_sub_to_red1 - + red_sub_root_to_red1->red_sub_to_red1 - - + + - + red_sub_context - - -red_sub_context + + +red_sub_context - + Star_red_sub_context - - -Star_red_sub_context + + +Star_red_sub_context - + red_sub_context->Star_red_sub_context - - + + - + red_sub_gc - + red_sub_gc - + red_sub_gc->full_comp_aux_sub - - + + - + red_gc_to_red_sub - + red_gc_to_red_sub - + red_sub_gc->red_gc_to_red_sub - + red_sub_r - - -red_sub_r + + +red_sub_r - + red_sub_r->full_comp_aux_sub - - + + - + occurs_zfill - - -occurs_zfill + + +occurs_zfill - + zfill_occurs0 - - -zfill_occurs0 + + +zfill_occurs0 - + occurs_zfill->zfill_occurs0 - - + + - + R_Gc_disjoint - - -R_Gc_disjoint + + +R_Gc_disjoint - + zfill_occurs0->R_Gc_disjoint - - + + - + plus_red_sub_full_comp - - -plus_red_sub_full_comp + + +plus_red_sub_full_comp - + full_comp_aux_sub->plus_red_sub_full_comp - - + + - + plus_red_sub_full_comp->star_red_sub_full_comp - - + + - + es_count_plug_mono - - -es_count_plug_mono + + +es_count_plug_mono - + red_gc_measure - - -red_gc_measure + + +red_gc_measure - + es_count_plug_mono->red_gc_measure - - + + - + red_gc_terminates - - -red_gc_terminates + + +red_gc_terminates - + red_gc_measure->red_gc_terminates - - + + diff --git a/graphs/theorems.json b/graphs/theorems.json index 1ed9d7a..672b9e8 100644 --- a/graphs/theorems.json +++ b/graphs/theorems.json @@ -467,6 +467,39 @@ "file": "theory/Metaterm.v", "depends": [] }, + { + "id": "Plus_mred_of_Plus_red1", + "label": "Plus_mred_of_Plus_red1", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "mred_full_comp_pure", + "label": "mred_full_comp_pure", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [ + "Plus_mred_of_Plus_red1", + "lemma_2_2_full_comp" + ] + }, + { + "id": "mred_plus_one", + "label": "mred_plus_one", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, { "id": "Plus_red1_context", "label": "Plus_red1_context", @@ -706,6 +739,26 @@ "file": "theory/NamedMeta.v", "depends": [] }, + { + "id": "Es_ctx_any", + "label": "Es_ctx_any", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [] + }, + { + "id": "nred_R_intro", + "label": "nred_R_intro", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [] + }, { "id": "Es_refl_any", "label": "Es_refl_any", diff --git a/theory/NamedMeta.v b/theory/NamedMeta.v index 25640d4..a267974 100644 --- a/theory/NamedMeta.v +++ b/theory/NamedMeta.v @@ -70,7 +70,21 @@ Inductive Es : ntrm -> ntrm -> Prop := | Es_trans : forall t u v, Es t u -> Es u v -> Es t v | Es_C : forall t x u y v, y <> x -> ~ In y (nfv u) -> ~ In x (nfv v) -> - Es (NESub (NESub t x u) y v) (NESub (NESub t y v) x u). + Es (NESub (NESub t x u) y v) (NESub (NESub t y v) x u) +| Es_ctx : forall C t t', Es t t' -> Es (nplug C t) (nplug C t'). + +Fixpoint cbinders (C : nctx) : list atom := + match C with + | nHole => [] + | nAppL C1 _ => cbinders C1 + | nAppR _ C1 => cbinders C1 + | nLam x C1 => x :: cbinders C1 + | nESubL C1 _ _ => cbinders C1 + | nESubR _ _ C1 => cbinders C1 + end. + +Definition cavoid (C : nctx) (phi : list atom) : bool := + forallb (fun y => negb (existsb (Nat.eqb y) phi)) (cbinders C). Inductive nred : ntrm -> ntrm -> Prop := | nred_B : forall t x u, nred (NApp (NLam x t) u) (NESub t x u) @@ -82,6 +96,11 @@ Inductive nred : ntrm -> ntrm -> Prop := is_subst_chain C = false -> nred (NESub (nplug C (NMVar X d)) x u) (NESub (nplug C (NESub (NMVar X d) x u)) x u) +| nred_R : forall C x u phi, + In x phi -> + (forall y, In y (nfv u) -> In y phi) -> + cavoid C phi = true -> + nred (NESub (nplug C (NVar x)) x u) (NESub (nplug C u) x u) | nred_ctx : forall C t t', nred t t' -> nred (nplug C t) (nplug C t'). Lemma eqC_in_Es : forall t x u y v, @@ -89,6 +108,20 @@ Lemma eqC_in_Es : forall t x u y v, Es (NESub (NESub t x u) y v) (NESub (NESub t y v) x u). Proof. intros. apply Es_C; assumption. Qed. +Lemma Es_ctx_any : forall C t t', Es t t' -> Es (nplug C t) (nplug C t'). +Proof. intros. apply Es_ctx. exact H. Qed. + +Lemma nred_R_intro : forall C x u phi, + In x phi -> (forall y, In y (nfv u) -> In y phi) -> cavoid C phi = true -> + nred (NESub (nplug C (NVar x)) x u) (NESub (nplug C u) x u). +Proof. + intros C x u phi Hx Hu Hc. + apply nred_R with (phi := phi). + - exact Hx. + - exact Hu. + - exact Hc. +Qed. + Lemma Es_refl_any : forall t, Es t t. Proof. intros. apply Es_refl. Qed. @@ -100,6 +133,8 @@ Proof. intros. apply Es_trans with (u := u); assumption. Qed. Print Assumptions isubst_meta_in. Print Assumptions isubst_meta_notin. +Print Assumptions Es_ctx_any. +Print Assumptions nred_R_intro. Print Assumptions eqC_in_Es. Print Assumptions Es_refl_any. Print Assumptions Es_sym_any.