From 829e3a8af3229c4e625245f7265dd67939da98c4 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Sun, 4 Sep 2022 21:30:07 +0200 Subject: [PATCH] update in delayd_updating + introduction of path_closed complete --- .../head/unwind2_rmap_head.etc} | 0 .../head/unwind2_rmap_labels.etc} | 0 .../delayed_updating/reduction/dfr.ma | 9 +- .../delayed_updating/reduction/dfr_ifr.ma | 28 +++--- .../delayed_updating/reduction/dfr_lift.ma | 20 ++-- .../delayed_updating/reduction/ifr.ma | 9 +- .../delayed_updating/reduction/ifr_lift.ma | 22 ++--- .../delayed_updating/reduction/ifr_unwind.ma | 26 +++--- .../substitution/lift_constructors.ma | 17 +++- .../substitution/lift_path_closed.ma | 11 +++ .../substitution/lift_rmap_closed.ma | 7 ++ .../delayed_updating/syntax/path_closed.ma | 45 ++++++++- .../unwind/unwind2_rmap_closed.ma | 92 +++++++++++++++++++ .../unwind/unwind2_rmap_eq.ma | 6 +- 14 files changed, 217 insertions(+), 75 deletions(-) rename matita/matita/contribs/lambdadelta/delayed_updating/{unwind/unwind2_rmap_head.ma => etc/head/unwind2_rmap_head.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{unwind/unwind2_rmap_labels.ma => etc/head/unwind2_rmap_labels.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_closed.ma diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_head.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_head.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_head.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_labels.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_labels.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/unwind2_rmap_labels.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma index d0dcf4eee..27468022a 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma @@ -15,18 +15,17 @@ include "delayed_updating/substitution/fsubst.ma". include "delayed_updating/syntax/prototerm_constructors.ma". include "delayed_updating/syntax/prototerm_eq.ma". -include "delayed_updating/syntax/path_head.ma". +include "delayed_updating/syntax/path_closed.ma". include "delayed_updating/notation/relations/black_rightarrow_df_3.ma". include "ground/xoa/ex_4_3.ma". (* DELAYED FOCUSED REDUCTION ************************************************) -(**) (* explicit ninj because we cannot declare the expectd type of k *) definition dfr (r): relation2 prototerm prototerm ≝ λt1,t2. - ∃∃p,q,k. p●𝗔◗𝗟◗q = r & - (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & - t1[⋔r←𝛕k.(t1⋔(p◖𝗦))] ⇔ t2 + ∃∃p,q,n. p●𝗔◗𝗟◗q = r & + q ϵ 𝐂❨n❩ & r◖𝗱↑n ϵ t1 & + t1[⋔r←𝛕↑n.(t1⋔(p◖𝗦))] ⇔ t2 . interpretation diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma index 68cea487c..5f37abd5f 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma @@ -19,13 +19,13 @@ include "delayed_updating/unwind/unwind2_constructors.ma". include "delayed_updating/unwind/unwind2_preterm_fsubst.ma". include "delayed_updating/unwind/unwind2_preterm_eq.ma". include "delayed_updating/unwind/unwind2_prototerm_lift.ma". -include "delayed_updating/unwind/unwind2_rmap_head.ma". +include "delayed_updating/unwind/unwind2_rmap_closed.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_eq.ma". include "delayed_updating/syntax/prototerm_proper_constructors.ma". -include "delayed_updating/syntax/path_head_structure.ma". +include "delayed_updating/syntax/path_closed_structure.ma". include "delayed_updating/syntax/path_structure_depth.ma". (* DELAYED FOCUSED REDUCTION ************************************************) @@ -35,33 +35,29 @@ include "delayed_updating/syntax/path_structure_depth.ma". theorem dfr_des_ifr (f) (t1) (t2) (r): t1 ϵ 𝐓 → t1 ➡𝐝𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐟[⊗r] ▼[f]t2. #f #t1 #t2 #r #H0t1 -* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct -@(ex4_3_intro … (⊗p) (⊗q) (↑♭q)) -[ -H0t1 -H1k -Ht1 -Ht2 // +* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct +@(ex4_3_intro … (⊗p) (⊗q) (♭q)) +[ -H0t1 -Hn -Ht1 -Ht2 // | -H0t1 -Ht1 -Ht2 - >structure_L_sn - >H1k in ⊢ (??%?); >path_head_structure_depth unwind2_rmap_A_dx - /2 width=1 by tls_unwind2_rmap_closed/ + [ lift_path_L_sn - <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + /2 width=1 by lift_path_rmap_closed_L/ +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -Hn list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx - /2 width=1 by tls_lift_rmap_closed/ + /2 width=1 by tls_succ_lift_rmap_append_L_closed_dx/ (* Note: crux of the proof ends *) ] qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma index b36038141..92512b342 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma @@ -15,19 +15,18 @@ include "delayed_updating/substitution/fsubst.ma". include "delayed_updating/substitution/lift_prototerm.ma". include "delayed_updating/syntax/prototerm_eq.ma". -include "delayed_updating/syntax/path_head.ma". +include "delayed_updating/syntax/path_closed.ma". include "delayed_updating/notation/relations/black_rightarrow_if_3.ma". include "ground/relocation/tr_uni.ma". include "ground/xoa/ex_4_3.ma". (* IMMEDIATE FOCUSED REDUCTION ************************************************) -(**) (* explicit ninj because we cannot declare the expectd type of k *) definition ifr (r): relation2 prototerm prototerm ≝ λt1,t2. - ∃∃p,q,k. p●𝗔◗𝗟◗q = r & - (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & - t1[⋔r←↑[𝐮❨ninj k❩](t1⋔(p◖𝗦))] ⇔ t2 + ∃∃p,q,n. p●𝗔◗𝗟◗q = r & + q ϵ 𝐂❨n❩ & r◖𝗱↑n ϵ t1 & + t1[⋔r←↑[𝐮❨↑n❩](t1⋔(p◖𝗦))] ⇔ t2 . interpretation diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma index 7c4d11d73..1d8f5855a 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma @@ -17,8 +17,8 @@ include "delayed_updating/reduction/ifr.ma". include "delayed_updating/substitution/fsubst_lift.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_after.ma". -include "delayed_updating/substitution/lift_path_head.ma". -include "delayed_updating/substitution/lift_rmap_head.ma". +include "delayed_updating/substitution/lift_path_closed.ma". +include "delayed_updating/substitution/lift_rmap_closed.ma". include "ground/relocation/tr_uni_compose.ma". include "ground/relocation/tr_compose_eq.ma". @@ -30,13 +30,12 @@ include "ground/relocation/tr_compose_eq.ma". theorem ifr_lift_bi (f) (t1) (t2) (r): t1 ➡𝐢𝐟[r] t2 → ↑[f]t1 ➡𝐢𝐟[↑[f]r] ↑[f]t2. #f #t1 #t2 #r -* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct -@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩)) -[ -H1k -Ht1 -Ht2 // +* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct +@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@§❨n❩)) +[ -Hn -Ht1 -Ht2 // | -Ht1 -Ht2 - lift_path_L_sn - <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + /2 width=1 by lift_path_rmap_closed_L/ +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -Hn list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx - /2 width=1 by tls_lift_rmap_closed/ + @(stream_eq_trans … (tr_compose_uni_dx_pap …)) nsucc_unfold + /2 width=1 by tls_succ_lift_rmap_append_L_closed_dx/ (* Note: crux of the proof ends *) ] qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma index e8cc51826..077ff798e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma @@ -17,12 +17,12 @@ include "delayed_updating/reduction/ifr.ma". include "delayed_updating/unwind/unwind2_preterm_fsubst.ma". include "delayed_updating/unwind/unwind2_preterm_eq.ma". include "delayed_updating/unwind/unwind2_prototerm_lift.ma". -include "delayed_updating/unwind/unwind2_rmap_head.ma". +include "delayed_updating/unwind/unwind2_rmap_closed.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/substitution/lift_prototerm_eq.ma". -include "delayed_updating/syntax/path_head_structure.ma". +include "delayed_updating/syntax/path_closed_structure.ma". include "delayed_updating/syntax/path_structure_depth.ma". (* IMMEDIATE FOCUSED REDUCTION **********************************************) @@ -33,17 +33,14 @@ lemma ifr_unwind_bi (f) (t1) (t2) (r): t1 ϵ 𝐓 → r ϵ 𝐈 → t1 ➡𝐢𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐟[⊗r] ▼[f]t2. #f #t1 #t2 #r #H1t1 #H2r -* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct -@(ex4_3_intro … (⊗p) (⊗q) (↑♭q)) -[ -H1t1 -H2r -H1k -Ht1 -Ht2 // +* #p #q #n #Hr #Hn #Ht1 #Ht2 destruct +@(ex4_3_intro … (⊗p) (⊗q) (♭q)) +[ -H1t1 -H2r -Hn -Ht1 -Ht2 // | -H1t1 -H2r -Ht1 -Ht2 - >structure_L_sn - >H1k in ⊢ (??%?); >path_head_structure_depth unwind2_rmap_A_dx - /2 width=1 by tls_unwind2_rmap_closed/ + [ tr_pap_succ_nap // qed. lemma lift_term_iref_uni (t) (n) (k): (𝛕(k+n).t) ⇔ ↑[𝐮❨n❩](𝛕k.t). #t #n #k -@(subset_eq_trans … (lift_term_iref …)) +@(subset_eq_trans … (lift_term_iref_pap …)) nsucc_pnpred lift_rmap_L_dx #Hq1 +elim (pcc_inv_L_sn … Hq1 Hq0) -Hq1 #H0 #_ +H0 -H0 nrplus_inj_dx >nrplus_inj_sn >nsucc_unfold // +| nrplus_inj_dx /2 width=1 by tr_tls_compose_uni_dx/ qed. -- 2.39.2