diff --git a/graphs/dependency.dot b/graphs/dependency.dot index 4dbe0fb..9fb35b0 100644 --- a/graphs/dependency.dot +++ b/graphs/dependency.dot @@ -85,6 +85,9 @@ digraph theorem_deps { 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]; + in_filter_neq_iff [label="in_filter_neq_iff", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="in_filter_neq_iff theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + Es_fv_both [label="Es_fv_both", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_fv_both theory/NamedMeta.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + Es_fv [label="Es_fv", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="Es_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]; @@ -203,6 +206,9 @@ digraph theorem_deps { nplug_esub_fv -> nred_fv; nplug_fv_mono -> nred_fv; nplug_fv_upper -> nred_fv; + in_filter_neq_iff -> Es_fv_both; + nplug_fv_mono -> Es_fv_both; + Es_fv_both -> Es_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 89c8c95..c465ece 100644 Binary files a/graphs/dependency.png and b/graphs/dependency.png differ diff --git a/graphs/dependency.svg b/graphs/dependency.svg index 466e642..c473e9a 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 @@ -1008,61 +1008,61 @@ nplug_fv_mono - -nplug_fv_mono + +nplug_fv_mono in_filter_neq->nplug_fv_mono - - + + nplug_fv_upper - -nplug_fv_upper + +nplug_fv_upper 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 + +nplug_esub_fv in_filter_neq->nplug_esub_fv - - + + @@ -1076,173 +1076,218 @@ 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 - - + + + + + +Es_fv_both + + +Es_fv_both + + + + + +nplug_fv_mono->Es_fv_both + + nplug_fv_upper->nred_core_fv - - + + nplug_fv_upper->nred_fv - - + + nplug_esub_fv->nred_fv - - + + + + + +in_filter_neq_iff + + +in_filter_neq_iff + + + + + +in_filter_neq_iff->Es_fv_both + + + + + +Es_fv + + +Es_fv + + + + + +Es_fv_both->Es_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 @@ -1254,27 +1299,27 @@ - + gen_sound - + gen_sound - + gen_complete - + gen_complete - + zdecs_sound - + zdecs_sound @@ -1287,91 +1332,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 @@ -1383,160 +1428,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 @@ -1548,415 +1593,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 fc0b942..331c76b 100644 --- a/graphs/index.txt +++ b/graphs/index.txt @@ -1,5 +1,7 @@ status milestone kind name file proved M0 infra Es_ctx_any theory/NamedMeta.v +proved M0 infra Es_fv theory/NamedMeta.v +proved M0 infra Es_fv_both 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 @@ -7,6 +9,7 @@ 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 in_filter_neq_iff 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 diff --git a/graphs/theorems.json b/graphs/theorems.json index 955bfce..7f6769c 100644 --- a/graphs/theorems.json +++ b/graphs/theorems.json @@ -879,6 +879,41 @@ "nplug_fv_upper" ] }, + { + "id": "in_filter_neq_iff", + "label": "in_filter_neq_iff", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [] + }, + { + "id": "Es_fv_both", + "label": "Es_fv_both", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [ + "in_filter_neq_iff", + "nplug_fv_mono" + ] + }, + { + "id": "Es_fv", + "label": "Es_fv", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/NamedMeta.v", + "depends": [ + "Es_fv_both" + ] + }, { "id": "par_red1_iff", "label": "par_red1_iff", diff --git a/theory/NamedMeta.v b/theory/NamedMeta.v index 7461724..acd0343 100644 --- a/theory/NamedMeta.v +++ b/theory/NamedMeta.v @@ -300,3 +300,58 @@ Qed. Print Assumptions nplug_esub_fv. Print Assumptions nred_fv. + +Lemma in_filter_neq_iff : forall z a l, + In z (filter (fun w => negb (Nat.eqb w a)) l) <-> In z l /\ z <> a. +Proof. + intros z a l. split. + - intro H. apply filter_In in H. destruct H as [Hl Hp]. split; [exact Hl |]. + apply Nat.eqb_neq. destruct (Nat.eqb z a) eqn:E; [| reflexivity]. + simpl in Hp. discriminate Hp. + - intros [Hl Hne]. apply filter_In. split; [exact Hl |]. + apply Nat.eqb_neq in Hne. rewrite Hne. reflexivity. +Qed. + +Lemma Es_fv_both : forall t u, Es t u -> + incl (nfv t) (nfv u) /\ incl (nfv u) (nfv t). +Proof. + apply Es_ind. + - intros t0. split; unfold incl; auto. + - intros t0 u0 H1 IH1. split. + + apply (proj2 IH1). + + apply (proj1 IH1). + - intros t0 u0 v0 H1 H2 IH1 IH2. split. + + intros z Hz. apply (proj1 IH2). apply (proj1 H2). exact Hz. + + intros z Hz. apply (proj2 H2). apply (proj2 IH2). exact Hz. + - intros t0 x0 u0 y0 v0 Hyx Hyu Hxv. split; unfold incl; intros z Hz; simpl in *; + apply in_app_iff in Hz as [Hz|Hz]. + + apply in_filter_neq_iff in Hz as [Hz Hy]. apply in_app_iff in Hz as [Hz|Hz]. + * apply in_filter_neq_iff in Hz as [Hz Hx]. + apply in_app_iff. left. apply in_filter_neq_iff. split; [| exact Hx]. + apply in_app_iff. left. apply in_filter_neq_iff. split; [exact Hz | exact Hy]. + * apply in_app_iff. right. exact Hz. + + apply in_app_iff. left. apply in_filter_neq_iff. split; [| ]. + * apply in_app_iff. right. exact Hz. + * intro E. apply Hxv. subst z. exact Hz. + + apply in_filter_neq_iff in Hz as [Hz Hx]. apply in_app_iff in Hz as [Hz|Hz]. + * apply in_filter_neq_iff in Hz as [Hz Hy]. + apply in_app_iff. left. apply in_filter_neq_iff. split; [| exact Hy]. + apply in_app_iff. left. apply in_filter_neq_iff. split; [exact Hz | exact Hx]. + * apply in_app_iff. right. exact Hz. + + apply in_app_iff. left. apply in_filter_neq_iff. split; [| ]. + * apply in_app_iff. right. exact Hz. + * intro E. apply Hyu. subst z. exact Hz. + - intros C0 t0 t0' H1 IH1. split; apply nplug_fv_mono. + + apply (proj1 IH1). + + apply (proj2 IH1). +Qed. + +Lemma Es_fv : forall t u, Es t u -> forall z, In z (nfv t) <-> In z (nfv u). +Proof. + intros t u H z. destruct (Es_fv_both t u H) as [Htu Hut]. split. + - apply Htu. + - apply Hut. +Qed. + +Print Assumptions in_filter_neq_iff. +Print Assumptions Es_fv.