From ea71486fd1aab2eae2bab42729a66ae775c7f248 Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Tue, 20 Dec 2022 01:10:07 +0100 Subject: [PATCH] update in delayed_updating + excess added to closure condition for path + height for path restored --- .../functions/{class_c_2.ma => class_c_3.ma} | 4 +- .../functions/sharp_1.ma} | 0 .../delayed_updating/reduction/dbfr.ma | 2 +- .../reduction/dbfr_constructors.ma | 2 +- .../delayed_updating/reduction/ibfr.ma | 2 +- .../reduction/ibfr_constructors.ma | 4 +- .../substitution/lift_path_closed.ma | 10 +- .../substitution/lift_rmap_closed.ma | 20 +- .../delayed_updating/syntax/path_closed.ma | 186 +++++++++--------- .../path_closed_height.ma} | 14 +- .../syntax/path_closed_structure.ma | 2 +- .../path_height.etc => syntax/path_height.ma} | 0 .../unwind/unwind2_rmap_closed.ma | 22 +-- .../unwind/unwind2_rmap_crux.ma | 4 +- 14 files changed, 142 insertions(+), 130 deletions(-) rename matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/{class_c_2.ma => class_c_3.ma} (90%) rename matita/matita/contribs/lambdadelta/delayed_updating/{etc/height/sharp_1.etc => notation/functions/sharp_1.ma} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{etc/height/path_closed_height.etc => syntax/path_closed_height.ma} (82%) rename matita/matita/contribs/lambdadelta/delayed_updating/{etc/height/path_height.etc => syntax/path_height.ma} (100%) diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_3.ma similarity index 90% rename from matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_2.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_3.ma index 95e3eeb35..9c2aeadb2 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_3.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( 𝐂❨ break term 46 b, break term 46 n ❩ )" +notation "hvbox( 𝐂❨ break term 46 o, break term 46 n, break term 46 e ❩ )" non associative with precedence 70 - for @{ 'ClassC $b $n }. + for @{ 'ClassC $o $n $e }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/height/sharp_1.etc b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/sharp_1.ma similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/etc/height/sharp_1.etc rename to matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/sharp_1.ma diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma index 776696b24..841baabb0 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma @@ -26,7 +26,7 @@ include "ground/xoa/ex_6_5.ma". definition dbfr (r): relation2 prototerm prototerm ≝ λt1,t2. ∃∃p,b,q,m,n. p●𝗔◗b●𝗟◗q = r & - ⊗b ϵ 𝐁 & b ϵ 𝐂❨Ⓕ,m❩ & q ϵ 𝐂❨Ⓕ,n❩ & r◖𝗱↑n ϵ t1 & + ⊗b ϵ 𝐁 & b ϵ 𝐂❨Ⓕ,m,𝟎❩ & q ϵ 𝐂❨Ⓕ,n,𝟎❩ & r◖𝗱↑n ϵ t1 & t1[⋔r←𝛕↑(m+n).(t1⋔(p◖𝗦))] ⇔ t2 . diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_constructors.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_constructors.ma index f0ffe995b..5225ef537 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_constructors.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_constructors.ma @@ -64,7 +64,7 @@ lemma dbfr_appl_sd (v1) (v2) (t) (r): qed. lemma dbfr_beta_0 (v) (t) (q) (n): - q ϵ 𝐂❨Ⓕ,n❩ → q◖𝗱↑n ϵ t → + q ϵ 𝐂❨Ⓕ,n,𝟎❩ → q◖𝗱↑n ϵ t → @v.𝛌.t ➡𝐝𝐛𝐟[𝗔◗𝗟◗q] @v.𝛌.(t[⋔q←𝛕↑n.v]). #v #t #q #n #Hn #Ht @(ex6_5_intro … (𝐞) (𝐞) q (𝟎) … Hn) -Hn diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma index 700440011..d0f0eb1c4 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma @@ -27,7 +27,7 @@ include "ground/xoa/ex_6_5.ma". definition ibfr (r): relation2 prototerm prototerm ≝ λt1,t2. ∃∃p,b,q,m,n. p●𝗔◗b●𝗟◗q = r & - ⊗b ϵ 𝐁 & b ϵ 𝐂❨Ⓕ,m❩ & q ϵ 𝐂❨Ⓕ,n❩ & r◖𝗱↑n ϵ t1 & + ⊗b ϵ 𝐁 & b ϵ 𝐂❨Ⓕ,m,𝟎❩ & q ϵ 𝐂❨Ⓕ,n,𝟎❩ & r◖𝗱↑n ϵ t1 & t1[⋔r←🠡[𝐮❨↑(m+n)❩](t1⋔(p◖𝗦))] ⇔ t2 . diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_constructors.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_constructors.ma index 112a98c39..ca1375558 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_constructors.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_constructors.ma @@ -65,7 +65,7 @@ lemma ibfr_appl_sd (v1) (v2) (t) (r): qed. lemma ibfr_beta_0 (v) (t) (q) (n): - q ϵ 𝐂❨Ⓕ,n❩ → q◖𝗱↑n ϵ t → + q ϵ 𝐂❨Ⓕ,n,𝟎❩ → q◖𝗱↑n ϵ t → @v.𝛌.t ➡𝐢𝐛𝐟[𝗔◗𝗟◗q] @v.𝛌.(t[⋔q←🠡[𝐮❨↑n❩]v]). #v #t #q #n #Hn #Ht @(ex6_5_intro … (𝐞) (𝐞) q (𝟎) … Hn) -Hn @@ -82,7 +82,7 @@ lemma ibfr_beta_0 (v) (t) (q) (n): qed. lemma ibfr_beta_1 (v) (v1) (t) (q) (n): - q ϵ 𝐂❨Ⓕ,n❩ → q◖𝗱↑n ϵ t → + q ϵ 𝐂❨Ⓕ,n,𝟎❩ → q◖𝗱↑n ϵ t → @v.@v1.𝛌.𝛌.t ➡𝐢𝐛𝐟[𝗔◗𝗔◗𝗟◗𝗟◗q] @v.@v1.𝛌.𝛌.(t[⋔q←🠡[𝐮❨↑↑n❩]v]). #v #v1 #t #q #n #Hn #Ht @(ex6_5_intro … (𝐞) (𝗔◗𝗟◗𝐞) q (𝟏) … Hn) -Hn diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma index 980185f93..e60c4fd1c 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma @@ -20,21 +20,21 @@ include "ground/relocation/xap.ma". (* Constructions with pcc ***************************************************) -lemma lift_path_closed (o) (f) (q) (n): - q ϵ 𝐂❨o,n❩ → 🠡[f]q ϵ 𝐂❨o,🠢[f]q@❨n❩❩. -#o #f #q #n #H0 elim H0 -q -n // +lemma lift_path_closed (o) (e) (f) (q) (n): + q ϵ 𝐂❨o,n,e❩ → 🠡[f]q ϵ 𝐂❨o,🠢[f]q@❨n❩,f@❨e❩❩. +#o #e #f #q #n #H0 elim H0 -q -n // #q #n [ #k #Ho ] #_ #IH /2 width=1 by pcc_m_dx, pcc_L_dx, pcc_A_dx, pcc_S_dx/ /4 width=1 by pcc_d_dx, tr_xap_pos/ qed. lemma lift_path_rmap_closed (o) (f) (p) (q) (n): - q ϵ 𝐂❨o,n❩ → 🠡[🠢[f]p]q ϵ 𝐂❨o,🠢[f](p●q)@❨n❩❩. + q ϵ 𝐂❨o,n,𝟎❩ → 🠡[🠢[f]p]q ϵ 𝐂❨o,🠢[f](p●q)@❨n❩,𝟎❩. /2 width=1 by lift_path_closed/ qed. lemma lift_path_rmap_closed_L (o) (f) (p) (q) (n): - q ϵ 𝐂❨o,n❩ → 🠡[🠢[f](p◖𝗟)]q ϵ 𝐂❨o,🠢[f](p●𝗟◗q)@§❨n❩❩. + q ϵ 𝐂❨o,n,𝟎❩ → 🠡[🠢[f](p◖𝗟)]q ϵ 𝐂❨o,🠢[f](p●𝗟◗q)@§❨n❩,𝟎❩. #o #f #p #q #n #Hq lapply (lift_path_closed … (🠢[f](p◖𝗟)) … Hq) #Hq0 lapply (pcc_L_sn … Hq) -Hq #Hq1 diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma index 9e8a3a99e..ae7691988 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma @@ -22,35 +22,35 @@ include "ground/lib/stream_eq_eq.ma". (* Destructions with cpp ****************************************************) lemma tls_plus_lift_rmap_closed (o) (f) (q) (n): - q ϵ 𝐂❨o,n❩ → + q ϵ 𝐂❨o,n,𝟎❩ → ∀m. ⇂*[m]f ≗ ⇂*[m+n]🠢[f]q. #o #f #q #n #Hq elim Hq -q -n // qed-. lemma tls_lift_rmap_closed (o) (f) (q) (n): - q ϵ 𝐂❨o,n❩ → + q ϵ 𝐂❨o,n,𝟎❩ → f ≗ ⇂*[n]🠢[f]q. #o #f #q #n #H0 /2 width=2 by tls_plus_lift_rmap_closed/ qed-. lemma tls_lift_rmap_append_closed_dx (o) (f) (p) (q) (n): - q ϵ 𝐂❨o,n❩ → - 🠢[f]p ≗ ⇂*[n]🠢[f](p●q). + q ϵ 𝐂❨o,n,𝟎❩ → + (🠢[f]p) ≗ ⇂*[n]🠢[f](p●q). #o #f #p #q #n #Hq /2 width=2 by tls_lift_rmap_closed/ qed-. lemma tls_succ_lift_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n): - q ϵ 𝐂❨o,n❩ → - 🠢[f]p ≗ ⇂*[↑n]🠢[f](p●𝗟◗q). + q ϵ 𝐂❨o,n,𝟎❩ → + (🠢[f]p) ≗ ⇂*[↑n]🠢[f](p●𝗟◗q). #o #f #p #q #n #Hq /3 width=2 by tls_lift_rmap_append_closed_dx, pcc_L_sn/ qed-. lemma tls_succ_plus_lift_rmap_append_closed_bLq_dx (o1) (o2) (f) (p) (b) (q) (m) (n): - b ϵ 𝐂❨o1,m❩ → q ϵ 𝐂❨o2,n❩ → - 🠢[f]p ≗ ⇂*[↑(m+n)]🠢[f](p●b●𝗟◗q). + b ϵ 𝐂❨o1,m,𝟎❩ → q ϵ 𝐂❨o2,n,𝟎❩ → + (🠢[f]p) ≗ ⇂*[↑(m+n)]🠢[f](p●b●𝗟◗q). #o1 #o2 #f #p #b #q #m #n #Hm #Hn >nplus_succ_dx Ho -Ho // Ho2 // @@ -182,9 +192,9 @@ qed. (* Inversions with path_append **********************************************) -lemma pcc_false_inv_append_bi (x) (m) (n): - x ϵ 𝐂❨Ⓕ,m+n❩ → - ∃∃p,q. p ϵ 𝐂❨Ⓕ,m❩ & q ϵ 𝐂❨Ⓕ,n❩ & p●q = x. +lemma pcc_false_zero_dx_inv_append_bi (x) (m) (n): + x ϵ 𝐂❨Ⓕ,m+n,𝟎❩ → + ∃∃p,q. p ϵ 𝐂❨Ⓕ,m,𝟎❩ & q ϵ 𝐂❨Ⓕ,n,𝟎❩ & p●q = x. #x #m #n #Hx @(insert_eq_1 … (m+n) … Hx) -Hx #y #Hy generalize in match n; -n @@ -212,39 +222,39 @@ qed-. (* Constructions with path_lcons ********************************************) -lemma pcc_m_sn (o) (q) (n): - q ϵ 𝐂❨o,n❩ → (𝗺◗q) ϵ 𝐂❨o,n❩. -#o #q #n #Hq -lapply (pcc_append_bi (Ⓣ) … (𝐞◖𝗺) … Hq) -Hq +lemma pcc_m_sn (o) (e) (q) (n): + q ϵ 𝐂❨o,n,e❩ → (𝗺◗q) ϵ 𝐂❨o,n,e❩. +#o #e #q #n #Hq +lapply (pcc_append_bi (Ⓣ) … (𝟎) e … (𝐞◖𝗺) … Hq) -Hq /2 width=3 by pcc_m_dx/ qed. -lemma pcc_L_sn (o) (q) (n): - q ϵ 𝐂❨o,n❩ → (𝗟◗q) ϵ 𝐂❨o,↑n❩. -#o #q #n #Hq -lapply (pcc_append_bi (Ⓣ) … (𝐞◖𝗟) … Hq) -Hq +lemma pcc_L_sn (o) (e) (q) (n): + q ϵ 𝐂❨o,n,e❩ → (𝗟◗q) ϵ 𝐂❨o,↑n,e❩. +#o #e #q #n #Hq +lapply (pcc_append_bi (Ⓣ) … (𝟎) e … (𝐞◖𝗟) … Hq) -Hq /2 width=3 by pcc_L_dx/ qed. -lemma pcc_A_sn (o) (q) (n): - q ϵ 𝐂❨o,n❩ → (𝗔◗q) ϵ 𝐂❨o,n❩. -#o #q #n #Hq -lapply (pcc_append_bi (Ⓣ) … (𝐞◖𝗔) … Hq) -Hq +lemma pcc_A_sn (o) (e) (q) (n): + q ϵ 𝐂❨o,n,e❩ → (𝗔◗q) ϵ 𝐂❨o,n,e❩. +#o #e #q #n #Hq +lapply (pcc_append_bi (Ⓣ) … (𝟎) e … (𝐞◖𝗔) … Hq) -Hq /2 width=3 by pcc_A_dx/ qed. -lemma pcc_S_sn (o) (q) (n): - q ϵ 𝐂❨o,n❩ → (𝗦◗q) ϵ 𝐂❨o,n❩. -#o #q #n #Hq -lapply (pcc_append_bi (Ⓣ) … (𝐞◖𝗦) … Hq) -Hq +lemma pcc_S_sn (o) (e) (q) (n): + q ϵ 𝐂❨o,n,e❩ → (𝗦◗q) ϵ 𝐂❨o,n,e❩. +#o #e #q #n #Hq +lapply (pcc_append_bi (Ⓣ) … (𝟎) e … (𝐞◖𝗦) … Hq) -Hq /2 width=3 by pcc_S_dx/ qed. (* Main inversions **********************************************************) -theorem pcc_mono (o1) (o2) (q) (n1): - q ϵ 𝐂❨o1,n1❩ → ∀n2. q ϵ 𝐂❨o2,n2❩ → n1 = n2. -#o1 #o2 #q1 #n1 #Hn1 elim Hn1 -q1 -n1 +theorem pcc_mono (o1) (o2) (e) (q) (n1): + q ϵ 𝐂❨o1,n1,e❩ → ∀n2. q ϵ 𝐂❨o2,n2,e❩ → n1 = n2. +#o1 #o2 #e #q1 #n1 #Hn1 elim Hn1 -q1 -n1 [|*: #q1 #n1 [ #k1 #_ ] #_ #IH ] #n2 #Hn2 [ <(pcc_inv_empty … Hn2) -n2 // | lapply (pcc_des_d_dx … Hn2) -Hn2 #Hn2 @@ -261,15 +271,15 @@ theorem pcc_mono (o1) (o2) (q) (n1): ] qed-. -theorem pcc_inj_L_sn (o1) (o2) (p1) (p2) (q1) (n): - q1 ϵ 𝐂❨o1,n❩ → ∀q2. q2 ϵ 𝐂❨o2,n❩ → +theorem pcc_zero_dx_inj_L_sn (o1) (o2) (p1) (p2) (q1) (n): + q1 ϵ 𝐂❨o1,n,𝟎❩ → ∀q2. q2 ϵ 𝐂❨o2,n,𝟎❩ → p1●𝗟◗q1 = p2●𝗟◗q2 → q1 = q2. #o1 #o2 #p1 #p2 #q1 #n #Hq1 elim Hq1 -q1 -n [|*: #q1 #n1 [ #k1 #_ ] #_ #IH ] * // [1,3,5,7,9,11: #l2 #q2 ] #Hq2 (nplus_zero_dx (♭q)) <(path_closed_des_depth … Hq) -Hq (nplus_zero_sn n) @@ -62,7 +62,7 @@ lemma nap_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n): qed-. lemma tls_succ_plus_unwind2_rmap_push_closed (o) (f) (q) (n): - q ϵ 𝐂❨o,n❩ → + q ϵ 𝐂❨o,n,𝟎❩ → ∀m. ⇂*[m]f ≗ ⇂*[↑(m+n)]▶[⫯f]q. #o #f #q #n #Hn elim Hn -q -n // #q #n #k #_ #_ #IH #m @@ -71,21 +71,21 @@ lemma tls_succ_plus_unwind2_rmap_push_closed (o) (f) (q) (n): qed-. lemma tls_succ_unwind2_rmap_push_closed (o) (f) (q) (n): - q ϵ 𝐂❨o,n❩ → + q ϵ 𝐂❨o,n,𝟎❩ → f ≗ ⇂*[↑n]▶[⫯f]q. #o #f #q #n #Hn /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/ qed-. lemma tls_succ_plus_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n): - q ϵ 𝐂❨o,n❩ → + q ϵ 𝐂❨o,n,𝟎❩ → ∀m. ⇂*[m]▶[f]p ≗ ⇂*[↑(m+n)]▶[f](p●𝗟◗q). #o #f #p #q #n #Hn #m /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/ qed-. lemma tls_succ_unwind2_rmap_closed (f) (q) (n): - q ϵ 𝐂❨Ⓕ,n❩ → + q ϵ 𝐂❨Ⓕ,n,𝟎❩ → ⇂f ≗ ⇂*[↑n]▶[f]q. #f #q #n #Hn @(stream_eq_canc_dx … (stream_tls_eq_repl …)) diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_crux.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_crux.ma index 32bc5f594..a5127cc45 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_crux.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_crux.ma @@ -20,7 +20,7 @@ include "delayed_updating/unwind/unwind2_rmap_closed.ma". (* Note: crux of the commutation between unwind and balanced focused reduction *) lemma unwind2_rmap_uni_crux (f) (p) (b) (q) (m) (n): - b ϵ 𝐂❨Ⓕ,m❩ → q ϵ 𝐂❨Ⓕ,n❩ → + b ϵ 𝐂❨Ⓕ,m,𝟎❩ → q ϵ 𝐂❨Ⓕ,n,𝟎❩ → (𝐮❨↑(♭b+♭q)❩ ∘ ▶[f]p ≗ ▶[f](p●𝗔◗b●𝗟◗q) ∘ 𝐮❨↑(m+n)❩). #f #p #b #q #m #n #Hm #Hn list_append_assoc @@ -34,7 +34,7 @@ lemma unwind2_rmap_uni_crux (f) (p) (b) (q) (m) (n): [ nsucc_unfold >nplus_succ_dx >nplus_succ_dx tr_nap_plus_dx stream_tls_succ