From 74a8604e5d2d3ec2dc7e67b1e257812ce340da29 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 9 Aug 2022 23:02:25 +0200 Subject: [PATCH] commit in delayed_updating + reversing paths completed updating component "reduction" --- .../delayed_updating/reduction/dfr.ma | 7 +++--- .../delayed_updating/reduction/dfr_ifr.ma | 20 +++++++--------- .../delayed_updating/reduction/dfr_lift.ma | 10 ++++---- .../delayed_updating/reduction/ifr.ma | 8 +++---- .../delayed_updating/reduction/ifr_lift.ma | 11 +++++---- .../delayed_updating/reduction/ifr_unwind.ma | 24 +++++++++---------- 6 files changed, 38 insertions(+), 42 deletions(-) diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma index e0d17a691..135a48b1d 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma @@ -17,16 +17,15 @@ 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_depth.ma". -include "delayed_updating/syntax/path_reverse.ma". include "delayed_updating/notation/relations/black_rightarrow_df_4.ma". (* DELAYED FOCUSED REDUCTION ************************************************) definition dfr (p) (q): relation2 prototerm prototerm ≝ - λt1,t2. ∃n:pnat. + λt1,t2. ∃k:pnat. let r ≝ p●𝗔◗𝗟◗q in - ∧∧ (𝗟◗q)ᴿ = ↳[n](𝗟◗q)ᴿ & r◖𝗱n ϵ t1 & - t1[⋔r←𝛕n.(t1⋔(p◖𝗦))] ⇔ t2 + ∧∧ 𝗟◗q = ↳[k](𝗟◗q) & r◖𝗱k ϵ t1 & + t1[⋔r←𝛕k.(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 2b15d3d52..638dad75b 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma @@ -27,8 +27,6 @@ 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_structure_depth.ma". -include "delayed_updating/syntax/path_structure_reverse.ma". -include "delayed_updating/syntax/path_depth_reverse.ma". (* DELAYED FOCUSED REDUCTION ************************************************) @@ -37,16 +35,16 @@ include "delayed_updating/syntax/path_depth_reverse.ma". theorem dfr_des_ifr (f) (p) (q) (t1) (t2): t1 ϵ 𝐓 → t1 ➡𝐝𝐟[p,q] t2 → ▼[f]t1 ➡𝐢𝐟[⊗p,⊗q] ▼[f]t2. #f #p #q #t1 #t2 #H0t1 -* #n * #H1n #Ht1 #Ht2 +* #k * #H1k #Ht1 #Ht2 @(ex_intro … (↑♭q)) @and3_intro [ -H0t1 -Ht1 -Ht2 - >structure_L_sn >structure_reverse - >H1n in ⊢ (??%?); >path_head_structure_depth structure_L_sn + >H1k in ⊢ (??%?); >path_head_structure_depth (list_append_rcons_sn … p) list_append_rcons_sn unwind2_rmap_A_sn unwind2_rmap_A_dx /2 width=1 by tls_unwind2_rmap_closed/ ] (* Note: crux of the proof ends *) diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma index 757497d4e..e8d26308e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma @@ -27,12 +27,12 @@ include "delayed_updating/substitution/lift_rmap_head.ma". theorem dfr_lift_bi (f) (p) (q) (t1) (t2): t1 ➡𝐝𝐟[p,q] t2 → ↑[f]t1 ➡𝐝𝐟[↑[f]p,↑[↑[p◖𝗔◖𝗟]f]q] ↑[f]t2. #f #p #q #t1 #t2 -* #n * #H1n #Ht1 #Ht2 -@(ex_intro … ((↑[p●𝗔◗𝗟◗q]f)@⧣❨n❩)) @and3_intro +* #k * #H1k #Ht1 #Ht2 +@(ex_intro … ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩)) @and3_intro [ -Ht1 -Ht2 lift_path_L_sn - <(lift_path_head … H1n) in ⊢ (??%?); -H1n // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1n + <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k list_append_rcons_sn in H1n; #H1n >lift_rmap_A_dx + >list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx /2 width=1 by tls_lift_rmap_closed/ (* Note: crux of the proof ends *) ] diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma index 765387b1c..6ded5c377 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr.ma @@ -16,16 +16,16 @@ 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_reverse.ma". include "delayed_updating/notation/relations/black_rightarrow_if_4.ma". +include "ground/relocation/tr_uni.ma". (* IMMEDIATE FOCUSED REDUCTION ************************************************) definition ifr (p) (q): relation2 prototerm prototerm ≝ - λt1,t2. ∃n:pnat. + λt1,t2. ∃k:pnat. let r ≝ p●𝗔◗𝗟◗q in - ∧∧ (𝗟◗q)ᴿ = ↳[n](𝗟◗q)ᴿ & r◖𝗱n ϵ t1 & - t1[⋔r←↑[𝐮❨n❩](t1⋔(p◖𝗦))] ⇔ t2 + ∧∧ 𝗟◗q = ↳[k](𝗟◗q) & r◖𝗱k ϵ t1 & + t1[⋔r←↑[𝐮❨k❩](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 0bf09b4aa..59c9dcc9e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma @@ -16,6 +16,7 @@ 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". @@ -29,12 +30,12 @@ include "ground/relocation/tr_compose_eq.ma". theorem ifr_lift_bi (f) (p) (q) (t1) (t2): t1 ➡𝐢𝐟[p,q] t2 → ↑[f]t1 ➡𝐢𝐟[↑[f]p,↑[↑[p◖𝗔◖𝗟]f]q] ↑[f]t2. #f #p #q #t1 #t2 -* #n * #H1n #Ht1 #Ht2 -@(ex_intro … ((↑[p●𝗔◗𝗟◗q]f)@⧣❨n❩)) @and3_intro +* #k * #H1k #Ht1 #Ht2 +@(ex_intro … ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩)) @and3_intro [ -Ht1 -Ht2 lift_path_L_sn - <(lift_path_head … H1n) in ⊢ (??%?); -H1n // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1n + <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k list_append_rcons_sn in H1n; #H1n >lift_rmap_A_dx + >list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx /2 width=1 by tls_lift_rmap_closed/ (* Note: crux of the proof ends *) ] 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 6a135ea2e..a554bdbe2 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_unwind.ma @@ -25,27 +25,25 @@ include "delayed_updating/substitution/lift_prototerm_eq.ma". include "delayed_updating/syntax/path_head_structure.ma". include "delayed_updating/syntax/path_structure_depth.ma". -include "delayed_updating/syntax/path_structure_reverse.ma". -include "delayed_updating/syntax/path_depth_reverse.ma". (* IMMEDIATE FOCUSED REDUCTION **********************************************) -(* Constructions with unwind ************************************************) +(* Constructions with unwind2 ***********************************************) lemma ifr_unwind_bi (f) (p) (q) (t1) (t2): t1 ϵ 𝐓 → t1⋔(p◖𝗦) ϵ 𝐏 → t1 ➡𝐢𝐟[p,q] t2 → ▼[f]t1 ➡𝐢𝐟[⊗p,⊗q] ▼[f]t2. #f #p #q #t1 #t2 #H1t1 #H2t1 -* #n * #H1n #Ht1 #Ht2 +* #k * #H1k #Ht1 #Ht2 @(ex_intro … (↑♭q)) @and3_intro [ -H1t1 -H2t1 -Ht1 -Ht2 - >structure_L_sn >structure_reverse - >H1n in ⊢ (??%?); >path_head_structure_depth structure_L_sn + >H1k in ⊢ (??%?); >path_head_structure_depth (list_append_rcons_sn … p) list_append_rcons_sn unwind2_rmap_A_sn unwind2_rmap_A_dx /2 width=1 by tls_unwind2_rmap_closed/ ] (* Note: crux of the proof ends *) -- 2.39.2