diff --git a/graphs/dependency.dot b/graphs/dependency.dot index 3171ae0..eccb285 100644 --- a/graphs/dependency.dot +++ b/graphs/dependency.dot @@ -32,6 +32,14 @@ digraph theorem_deps { enumerate_check [label="enumerate_check", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_check theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; enumerate_sound [label="enumerate_sound", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_sound theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; enumerate_complete [label="enumerate_complete", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="enumerate_complete theory/Enumerate.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + of_trm_fvs [label="of_trm_fvs", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_fvs theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + of_trm_lift [label="of_trm_lift", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_lift theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + of_trm_open [label="of_trm_open", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_open theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + of_trm_close [label="of_trm_close", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_close theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + of_trm_injective [label="of_trm_injective", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="of_trm_injective theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + mfvs_lift_m [label="mfvs_lift_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_lift_m theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + mfvs_close_m [label="mfvs_close_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_close_m theory/Metaterm.v https://arxiv.org/html/2312.13270v1", shape=ellipse]; + mfvs_open_m [label="mfvs_open_m", color="#38761d", fillcolor="#d9ead3", style="filled", fontcolor="#222222", tooltip="mfvs_open_m 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]; @@ -128,6 +136,8 @@ digraph theorem_deps { check_all_true -> enumerate_check; steps_sound -> enumerate_sound; steps_complete -> enumerate_complete; + of_trm_lift -> of_trm_open; + mfvs_lift_m -> mfvs_open_m; 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 f78ac40..e26f6ea 100644 Binary files a/graphs/dependency.png and b/graphs/dependency.png differ diff --git a/graphs/dependency.svg b/graphs/dependency.svg index aa81263..1de2e31 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 @@ -42,16 +42,16 @@ - + fvs_zplug_lift - + fvs_zplug_lift - + fvs_lift->fvs_zplug_lift @@ -144,61 +144,61 @@ - + open_rec_zplug_lift - + open_rec_zplug_lift - + open_rec_occurs_false->open_rec_zplug_lift - + 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 - + 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 @@ -428,380 +428,464 @@ - + +of_trm_fvs + + +of_trm_fvs + + + + + +of_trm_lift + + +of_trm_lift + + + + + +of_trm_open + + +of_trm_open + + + + + +of_trm_lift->of_trm_open + + + + + +of_trm_close + + +of_trm_close + + + + + +of_trm_injective + + +of_trm_injective + + + + + +mfvs_lift_m + + +mfvs_lift_m + + + + + +mfvs_open_m + + +mfvs_open_m + + + + + +mfvs_lift_m->mfvs_open_m + + + + + +mfvs_close_m + + +mfvs_close_m + + + + + Plus_red1_context - + Plus_red1_context - + 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_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_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 - + full_comp_aux->lemma_2_2_full_comp - + lemma_2_2_full_comp->lemma_2_3_beta_sim - + red1_root_fv - + red1_root_fv - + fvs_zplug_lift->red1_root_fv - + plug_fv_mono - + plug_fv_mono - + red1r_fv - + red1r_fv - + plug_fv_mono->red1r_fv - + red1_root_fv->red1r_fv - + lemma_2_1_fv_preserved - + lemma_2_1_fv_preserved - + red1r_fv->lemma_2_1_fv_preserved - + 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 - + Plus_trans - - -Plus_trans + + +Plus_trans - + Plus_step_trans - - -Plus_step_trans + + +Plus_step_trans - + 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 @@ -813,124 +897,124 @@ - + gen_sound - + gen_sound - + gen_complete - + gen_complete - + zdecs_sound - + zdecs_sound - + zdecs_sound->full_comp_aux - + 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 @@ -942,160 +1026,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 @@ -1107,415 +1191,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/theorems.json b/graphs/theorems.json index 9a78af6..e2477fd 100644 --- a/graphs/theorems.json +++ b/graphs/theorems.json @@ -9,6 +9,7 @@ "html": "https://arxiv.org/html/2312.13270v1" }, "milestones": [ + "M0", "M1", "M2", "M3", @@ -288,6 +289,90 @@ "steps_complete" ] }, + { + "id": "of_trm_fvs", + "label": "of_trm_fvs", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "of_trm_lift", + "label": "of_trm_lift", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "of_trm_open", + "label": "of_trm_open", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [ + "of_trm_lift" + ] + }, + { + "id": "of_trm_close", + "label": "of_trm_close", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "of_trm_injective", + "label": "of_trm_injective", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "mfvs_lift_m", + "label": "mfvs_lift_m", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "mfvs_close_m", + "label": "mfvs_close_m", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [] + }, + { + "id": "mfvs_open_m", + "label": "mfvs_open_m", + "kind": "infra", + "status": "proved", + "milestone": "M0", + "section": "", + "file": "theory/Metaterm.v", + "depends": [ + "mfvs_lift_m" + ] + }, { "id": "Plus_red1_context", "label": "Plus_red1_context", diff --git a/theory/Metaterm.v b/theory/Metaterm.v index 2337fe6..629fb77 100644 --- a/theory/Metaterm.v +++ b/theory/Metaterm.v @@ -110,3 +110,54 @@ Print Assumptions of_trm_lift. Print Assumptions of_trm_open. Print Assumptions of_trm_close. Print Assumptions of_trm_injective. + +Lemma mfvs_lift_m : forall t k, mfvs (lift_m k t) = mfvs t. +Proof. + induction t; intros k; simpl. + - destruct (Nat.ltb n k); reflexivity. + - reflexivity. + - reflexivity. + - rewrite IHt1, IHt2. reflexivity. + - rewrite IHt. reflexivity. + - rewrite IHt1, IHt2. reflexivity. +Qed. + +Lemma mfvs_close_m : forall t x k y, In y (mfvs (close_rec_m x k t)) -> In y (mfvs t). +Proof. + induction t; intros x k y H; simpl in *. + - destruct H. + - destruct (Nat.eqb a x) eqn:E. + + destruct H. + + destruct H as [Hy | Hf]. subst y. simpl. left. reflexivity. destruct Hf. + - exact H. + - apply in_app_iff in H as [H|H]; apply in_app_iff. + + left. apply (IHt1 x k y). exact H. + + right. apply (IHt2 x k y). exact H. + - apply (IHt x (S k) y). exact H. + - apply in_app_iff in H as [H|H]; apply in_app_iff. + + left. apply (IHt1 x (S k) y). exact H. + + right. apply (IHt2 x k y). exact H. +Qed. + +Lemma mfvs_open_m : forall t k u y, + In y (mfvs (open_rec_m k u t)) -> In y (mfvs u) \/ In y (mfvs t). +Proof. + induction t; intros k u y H; simpl in *. + - destruct (Nat.eqb n k) eqn:E. + + apply Nat.eqb_eq in E. subst n. simpl in H. + left. rewrite <- (mfvs_lift_m u k). exact H. + + simpl in H. destruct H. + - right. exact H. + - right. exact H. + - apply in_app_iff in H as [H|H]. + + destruct (IHt1 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; left; exact Hr. + + destruct (IHt2 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; right; exact Hr. + - destruct (IHt (S k) u y H) as [Hl|Hr]. left; exact Hl. right; exact Hr. + - apply in_app_iff in H as [H|H]. + + destruct (IHt1 (S k) u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; left; exact Hr. + + destruct (IHt2 k u y H) as [Hl|Hr]. left; exact Hl. right; apply in_app_iff; right; exact Hr. +Qed. + +Print Assumptions mfvs_lift_m. +Print Assumptions mfvs_close_m. +Print Assumptions mfvs_open_m.