diff --git a/graphs/dependency.dot b/graphs/dependency.dot index 80a62a0..4dbe0fb 100644 --- a/graphs/dependency.dot +++ b/graphs/dependency.dot @@ -83,6 +83,8 @@ digraph theorem_deps { nplug_fv_mono [label="nplug_fv_mono", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nplug_fv_mono theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; nplug_fv_upper [label="nplug_fv_upper", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nplug_fv_upper theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; nred_core_fv [label="nred_core_fv", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nred_core_fv theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + nplug_esub_fv [label="nplug_esub_fv", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nplug_esub_fv theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + nred_fv [label="nred_fv", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="nred_fv theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; par_red1_iff [label="par_red1_iff", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="par_red1_iff theory/Parallel.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; red1_in_par [label="red1_in_par", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="red1_in_par theory/Parallel.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; par_context [label="par_context", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="par_context theory/Parallel.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; @@ -194,6 +196,13 @@ digraph theorem_deps { in_filter_neq -> nred_core_fv; nplug_fv_mono -> nred_core_fv; nplug_fv_upper -> nred_core_fv; + filter_neq_in -> nplug_esub_fv; + in_filter_neq -> nplug_esub_fv; + filter_neq_in -> nred_fv; + in_filter_neq -> nred_fv; + nplug_esub_fv -> nred_fv; + nplug_fv_mono -> nred_fv; + nplug_fv_upper -> nred_fv; par_red1_iff -> par_to_red1_or_eq; par_red1_iff -> red1_or_eq_to_par; has_red_spec -> check_term_true; diff --git a/graphs/dependency.png b/graphs/dependency.png index f66b2a0..89c8c95 100644 Binary files a/graphs/dependency.png and b/graphs/dependency.png differ diff --git a/graphs/dependency.svg b/graphs/dependency.svg index bee9854..466e642 100644 --- a/graphs/dependency.svg +++ b/graphs/dependency.svg @@ -4,19 +4,19 @@ - - + + 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 @@ -138,8 +138,8 @@ open_rec_occurs_false - -open_rec_occurs_false + +open_rec_occurs_false @@ -155,8 +155,8 @@ open_rec_occurs_false->open_rec_zplug_lift - - + + @@ -170,38 +170,38 @@ 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 - + open_rec_occurs_false->full_comp_aux_sub - - + + @@ -213,7 +213,7 @@ - + close_rec_notin->subst_notin @@ -264,16 +264,16 @@ - + subst_lc_self - + subst_lc_self - + subst_fvar_self->subst_lc_self @@ -288,16 +288,16 @@ - + subst_other - + subst_other - + subst_fvar_other->subst_other @@ -330,16 +330,16 @@ - + star_red_sub_full_comp - + star_red_sub_full_comp - + Plus_to_Star->star_red_sub_full_comp @@ -693,7 +693,7 @@ - + occurs_count_zero->full_comp_aux_sub @@ -726,22 +726,22 @@ occurs_lift_self - -occurs_lift_self + +occurs_lift_self occurs_lift_self->occurs_count_zfill_plug - - + + occurs_lift_self->open_rec_zplug_lift - - + + @@ -759,7 +759,7 @@ - + zdecs_nonempty->full_comp_aux_sub @@ -771,7 +771,7 @@ - + occurs_count_zfill_plug->full_comp_aux_sub @@ -783,7 +783,7 @@ - + open_rec_zplug_lift->full_comp_aux_sub @@ -876,31 +876,31 @@ - + gen_fv_preserved - + gen_fv_preserved - + lemma_2_1_fv_preserved->gen_fv_preserved - + corpus_fv_preserved - + corpus_fv_preserved - + lemma_2_1_fv_preserved->corpus_fv_preserved @@ -999,8 +999,8 @@ in_filter_neq - -in_filter_neq + +in_filter_neq @@ -1008,16 +1008,16 @@ nplug_fv_mono - -nplug_fv_mono + +nplug_fv_mono in_filter_neq->nplug_fv_mono - - + + @@ -1031,158 +1031,218 @@ in_filter_neq->nplug_fv_upper - - + + nred_core_fv - -nred_core_fv + +nred_core_fv in_filter_neq->nred_core_fv - - + + + + + +nplug_esub_fv + + +nplug_esub_fv + + + + + +in_filter_neq->nplug_esub_fv + + + + + +nred_fv + + +nred_fv + + + + + +in_filter_neq->nred_fv + + filter_neq_in - -filter_neq_in + +filter_neq_in filter_neq_in->nplug_fv_mono - - + + filter_neq_in->nplug_fv_upper - - + + filter_neq_in->nred_core_fv - - + + + + + +filter_neq_in->nplug_esub_fv + + + + + +filter_neq_in->nred_fv + + nplug_fv_mono->nred_core_fv - - + + + + + +nplug_fv_mono->nred_fv + + nplug_fv_upper->nred_core_fv - - + + + + + +nplug_fv_upper->nred_fv + + + + + +nplug_esub_fv->nred_fv + + - + 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_all_true - + check_all_true - + check_term_true->check_all_true @@ -1194,27 +1254,27 @@ - + gen_sound - + gen_sound - + gen_complete - + gen_complete - + zdecs_sound - + zdecs_sound @@ -1227,91 +1287,91 @@ - + root_steps_sound - + root_steps_sound - + zdecs_sound->root_steps_sound - + zdecs_sound->full_comp_aux_sub - + zdecs_complete - + zdecs_complete - + root_steps_complete - + root_steps_complete - + zdecs_complete->root_steps_complete - + positions_at - + positions_at - + steps_sound - + steps_sound - + positions_at->steps_sound - + root_steps_sound->steps_sound - + steps_complete - + steps_complete - + root_steps_complete->steps_complete @@ -1323,160 +1383,160 @@ - + steps_sound->gen_sound - + steps_sound_red1 - + steps_sound_red1 - + steps_sound->steps_sound_red1 - + has_red_spec - + has_red_spec - + steps_sound->has_red_spec - + 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 - + steps_sound_red1->nf_iff_steps_nil - + steps_sound_red1->corpus_fv_preserved - + positions_hole - + positions_hole - + 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->steps_complete - + positions_comp - + positions_comp - + positions_comp->steps_complete - + at_ctx_comp - + at_ctx_comp - + at_ctx_comp->steps_complete @@ -1488,415 +1548,415 @@ - + steps_complete->gen_complete - + steps_complete->has_red_spec - + steps_complete->nf_iff_steps_nil - + corpus_complete - + corpus_complete - + steps_complete->corpus_complete - + has_red_f - + has_red_f - + has_red_f->has_red_spec - + has_red_spec->check_term_true - + red1_dec - + red1_dec - + has_red_spec->red1_dec - + corpus_decides - + corpus_decides - + has_red_spec->corpus_decides - + normal_form_iff_nf - + normal_form_iff_nf - + nf_iff_steps_nil->normal_form_iff_nf - + 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->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 - + 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/index.txt b/graphs/index.txt index 1bdbd77..fc0b942 100644 --- a/graphs/index.txt +++ b/graphs/index.txt @@ -1,8 +1,12 @@ status milestone kind name file +proved M0 infra Es_ctx_any theory/NamedMeta.v proved M0 infra Es_refl_any theory/NamedMeta.v proved M0 infra Es_sym_any theory/NamedMeta.v proved M0 infra Es_trans_any theory/NamedMeta.v +proved M0 infra Plus_mred_of_Plus_red1 theory/Metaterm.v proved M0 infra eqC_in_Es theory/NamedMeta.v +proved M0 infra filter_neq_in theory/NamedMeta.v +proved M0 infra in_filter_neq theory/NamedMeta.v proved M0 infra isubst_meta_in theory/NamedMeta.v proved M0 infra isubst_meta_notin theory/NamedMeta.v proved M0 infra mfvs_close_m theory/Metaterm.v @@ -10,10 +14,18 @@ proved M0 infra mfvs_lift_m theory/Metaterm.v proved M0 infra mfvs_open_m theory/Metaterm.v proved M0 infra mred_B_intro theory/Metaterm.v proved M0 infra mred_context theory/Metaterm.v +proved M0 infra mred_full_comp_pure theory/Metaterm.v proved M0 infra mred_gc_intro theory/Metaterm.v proved M0 infra mred_of_red1 theory/Metaterm.v +proved M0 infra mred_plus_one theory/Metaterm.v proved M0 infra mred_r_intro theory/Metaterm.v proved M0 infra mred_term_context theory/Metaterm.v +proved M0 infra nplug_esub_fv theory/NamedMeta.v +proved M0 infra nplug_fv_mono theory/NamedMeta.v +proved M0 infra nplug_fv_upper theory/NamedMeta.v +proved M0 infra nred_R_intro theory/NamedMeta.v +proved M0 infra nred_core_fv theory/NamedMeta.v +proved M0 infra nred_fv theory/NamedMeta.v proved M0 infra of_trm_close theory/Metaterm.v proved M0 infra of_trm_fvs theory/Metaterm.v proved M0 infra of_trm_injective theory/Metaterm.v diff --git a/graphs/theorems.json b/graphs/theorems.json index 7536fca..955bfce 100644 --- a/graphs/theorems.json +++ b/graphs/theorems.json @@ -850,6 +850,35 @@ "nplug_fv_upper" ] }, + { + "id": "nplug_esub_fv", + "label": "nplug_esub_fv", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [ + "filter_neq_in", + "in_filter_neq" + ] + }, + { + "id": "nred_fv", + "label": "nred_fv", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [ + "filter_neq_in", + "in_filter_neq", + "nplug_esub_fv", + "nplug_fv_mono", + "nplug_fv_upper" + ] + }, { "id": "par_red1_iff", "label": "par_red1_iff", diff --git a/theory/NamedMeta.v b/theory/NamedMeta.v index c9ada7e..7461724 100644 --- a/theory/NamedMeta.v +++ b/theory/NamedMeta.v @@ -240,3 +240,63 @@ Qed. Print Assumptions nplug_fv_mono. Print Assumptions nplug_fv_upper. Print Assumptions nred_core_fv. + +Lemma nplug_esub_fv : forall C X d x u y, + y <> x -> + In y (nfv (nplug C (NESub (NMVar X d) x u))) -> + In y (nfv (nplug C (NMVar X d))) \/ In y (nfv u). +Proof. + induction C; intros X d x u y Hne Hy; simpl in *. + - apply in_app_iff in Hy as [Hy|Hy]. + + left. apply in_filter_neq in Hy as [Hy _]. simpl. exact Hy. + + right. exact Hy. + - apply in_app_iff in Hy as [Hy|Hy]. + + apply (IHC X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + * left. apply in_app_iff. left. exact Hy. + * right. exact Hy. + + left. apply in_app_iff. right. exact Hy. + - apply in_app_iff in Hy as [Hy|Hy]. + + left. apply in_app_iff. left. exact Hy. + + apply (IHC X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + * left. apply in_app_iff. right. exact Hy. + * right. exact Hy. + - apply in_filter_neq in Hy as [Hy Hz]. + apply (IHC X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + + left. apply filter_neq_in; [exact Hy | exact Hz]. + + right. exact Hy. + - apply in_app_iff in Hy as [Hy|Hy]. + + apply in_filter_neq in Hy as [Hy Hz]. + apply (IHC X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + * left. apply in_app_iff. left. apply filter_neq_in; [exact Hy | exact Hz]. + * right. exact Hy. + + left. apply in_app_iff. right. exact Hy. + - apply in_app_iff in Hy as [Hy|Hy]. + + left. apply in_app_iff. left. exact Hy. + + apply (IHC X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + * left. apply in_app_iff. right. exact Hy. + * right. exact Hy. +Qed. + +Lemma nred_fv : forall t t', nred t t' -> incl (nfv t') (nfv t). +Proof. + intros t t' H. induction H; simpl; unfold incl in *. + - intros y Hy. exact Hy. + - intros y Hy. apply in_app_iff. left. + apply filter_neq_in; [exact Hy | intro E; apply H; subst; exact Hy]. + - intros y Hy. apply in_app_iff in Hy as [Hy|Hy]. + + apply in_filter_neq in Hy as [Hy Hne]. + apply (nplug_esub_fv C X d x u y Hne) in Hy. destruct Hy as [Hy|Hy]. + * apply in_app_iff. left. apply filter_neq_in; [exact Hy | exact Hne]. + * apply in_app_iff. right. exact Hy. + + apply in_app_iff. right. exact Hy. + - intros y Hy. apply in_app_iff in Hy as [Hy|Hy]. + + apply in_filter_neq in Hy as [Hy Hne]. + apply (nplug_fv_upper C u (NVar x)) in Hy. apply in_app_iff in Hy as [Hy|Hy]. + * apply in_app_iff. left. apply filter_neq_in; [exact Hy | exact Hne]. + * apply in_app_iff. right. exact Hy. + + apply in_app_iff. right. exact Hy. + - apply nplug_fv_mono. exact IHnred. +Qed. + +Print Assumptions nplug_esub_fv. +Print Assumptions nred_fv.