From: Ferruccio Guidi Date: Wed, 7 Sep 2022 22:13:21 +0000 (+0200) Subject: update in ground and delayed_updating X-Git-Tag: make_still_working~37 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=b0c6bbd5db69489a5ebd1b36de6685fa6de441b3 update in ground and delayed_updating + example of unprotected balanced segment + balanced reduction parked for now + additions and renaming --- diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr.etc new file mode 100644 index 000000000..f82db8a73 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr.etc @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +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_closed.ma". +include "delayed_updating/syntax/path_balanced.ma". +include "delayed_updating/syntax/path_structure.ma". +include "delayed_updating/notation/relations/black_rightarrow_dbf_3.ma". +include "ground/arith/nat_rplus.ma". +include "ground/xoa/ex_6_5.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +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 & + t1[⋔r←𝛕↑(m+n).(t1⋔(p◖𝗦))] ⇔ t2 +. + +interpretation + "balanced focused reduction with delayed updating (prototerm)" + 'BlackRightArrowDBF t1 r t2 = (dbfr r t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_ibfr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_ibfr.etc new file mode 100644 index 000000000..d7c16ca2b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_ibfr.etc @@ -0,0 +1,79 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "delayed_updating/reduction/dbfr.ma". +include "delayed_updating/reduction/ibfr.ma". + +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_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_closed_structure.ma". +include "delayed_updating/syntax/path_structure_depth.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +(* Main destructions with ibfr **********************************************) + +theorem dbfr_des_ibfr (f) (t1) (t2) (r): t1 ϵ 𝐓 → + t1 ➡𝐝𝐛𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐛𝐟[⊗r] ▼[f]t2. +#f #t1 #t2 #r #H0t1 +* #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct +@(ex6_5_intro … (⊗p) (⊗b) (⊗q) (♭b) (♭q)) +[ -H0t1 -Hb -Hm -Hn -Ht1 -Ht2 // +| -H0t1 -Hm -Hn -Ht1 -Ht2 // +| -H0t1 -Hb -Hn -Ht1 -Ht2 + /2 width=2 by path_closed_structure_depth/ +| -H0t1 -Hb -Hm -Ht1 -Ht2 + /2 width=2 by path_closed_structure_depth/ +| lapply (in_comp_unwind2_path_term f … Ht1) -H0t1 -Hb -Hm -Ht2 -Ht1 + list_append_rcons_dx >list_append_assoc + unwind2_rmap_A_dx + /2 width=1 by tls_unwind2_rmap_closed/ + ] +*) +(* Note: crux of the proof ends *) + | // + | /2 width=2 by ex_intro/ + | // + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_lift.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_lift.etc new file mode 100644 index 000000000..f23728916 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/dbfr_lift.etc @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "delayed_updating/reduction/dbfr.ma". + +include "delayed_updating/substitution/fsubst_lift.ma". +include "delayed_updating/substitution/fsubst_eq.ma". +include "delayed_updating/substitution/lift_constructors.ma". +include "delayed_updating/substitution/lift_path_head.ma". +include "delayed_updating/substitution/lift_rmap_head.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +(* Constructions with lift **************************************************) + +theorem dfr_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 // +| -Ht1 -Ht2 + lift_path_L_sn + <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + 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 *) +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/ibfr.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/ibfr.etc new file mode 100644 index 000000000..dfa14ef98 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/balanced/ibfr.etc @@ -0,0 +1,37 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +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_closed.ma". +include "delayed_updating/syntax/path_balanced.ma". +include "delayed_updating/syntax/path_structure.ma". +include "delayed_updating/notation/relations/black_rightarrow_ibf_3.ma". +include "ground/relocation/tr_uni.ma". +include "ground/arith/nat_rplus.ma". +include "ground/xoa/ex_6_5.ma". + +(* IMMEDIATE BALANCED FOCUSED REDUCTION *************************************) + +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 & + t1[⋔r←↑[𝐮❨↑(m+n)❩](t1⋔(p◖𝗦))] ⇔ t2 +. + +interpretation + "balanced focused reduction with immediate updating (prototerm)" + 'BlackRightArrowIBF t1 r t2 = (ibfr r t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma deleted file mode 100644 index 349195cb0..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma +++ /dev/null @@ -1,38 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -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_balanced.ma". -include "delayed_updating/syntax/path_structure.ma". -include "delayed_updating/notation/relations/black_rightarrow_dbf_3.ma". -include "ground/arith/nat_rplus.ma". -include "ground/xoa/ex_6_5.ma". - -(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) - -(**) (* explicit ninj because we cannot declare the expectd type of k *) -definition dbfr (r): relation2 prototerm prototerm ≝ - λt1,t2. - ∃∃p,b,q,h,k. p●𝗔◗b●𝗟◗q = r & - ⊗b ϵ 𝐁 & b = ↳[h]b & - (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & - t1[⋔r←𝛕(k+h).(t1⋔(p◖𝗦))] ⇔ t2 -. - -interpretation - "balanced focused reduction with delayed updating (prototerm)" - 'BlackRightArrowDBF t1 r t2 = (dbfr r t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma deleted file mode 100644 index 043f61085..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma +++ /dev/null @@ -1,78 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "delayed_updating/reduction/dbfr.ma". -include "delayed_updating/reduction/ibfr.ma". - -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/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_structure_depth.ma". - -(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) - -(* Main destructions with ibfr **********************************************) - -theorem dbfr_des_ibfr (f) (t1) (t2) (r): t1 ϵ 𝐓 → - t1 ➡𝐝𝐛𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐛𝐟[⊗r] ▼[f]t2. -#f #t1 #t2 #r #H0t1 -* #p #b #q #h #k #Hr #Hb #Hh #H1k #Ht1 #Ht2 destruct -@(ex6_5_intro … (⊗p) (⊗b) (⊗q) (♭b) (↑♭q)) -[ -H0t1 -Hb -Hh -H1k -Ht1 -Ht2 // -| -H0t1 -Hh -H1k -Ht1 -Ht2 // -| -H0t1 -Hb -Ht1 -H1k -Ht2 - >Hh in ⊢ (??%?); >path_head_structure_depth structure_L_sn - >H1k in ⊢ (??%?); >path_head_structure_depth list_append_rcons_dx >list_append_assoc - lapply (unwind2_rmap_append_pap_closed f … (p●𝗔◗b) … H1k) -H1k - unwind2_rmap_A_dx - /2 width=1 by tls_unwind2_rmap_closed/ - ] -(* Note: crux of the proof ends *) - | // - | /2 width=2 by ex_intro/ - | // - ] -] -qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma deleted file mode 100644 index f23728916..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma +++ /dev/null @@ -1,51 +0,0 @@ -(**************************************************************************) -(* ___ *) -(* ||M|| *) -(* ||A|| A project by Andrea Asperti *) -(* ||T|| *) -(* ||I|| Developers: *) -(* ||T|| The HELM team. *) -(* ||A|| http://helm.cs.unibo.it *) -(* \ / *) -(* \ / This file is distributed under the terms of the *) -(* v GNU General Public License Version 2 *) -(* *) -(**************************************************************************) - -include "delayed_updating/reduction/dbfr.ma". - -include "delayed_updating/substitution/fsubst_lift.ma". -include "delayed_updating/substitution/fsubst_eq.ma". -include "delayed_updating/substitution/lift_constructors.ma". -include "delayed_updating/substitution/lift_path_head.ma". -include "delayed_updating/substitution/lift_rmap_head.ma". - -(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) - -(* Constructions with lift **************************************************) - -theorem dfr_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 // -| -Ht1 -Ht2 - lift_path_L_sn - <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // -| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k - 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 *) -] -qed. 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 5f37abd5f..d64067123 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_ifr.ma @@ -42,7 +42,7 @@ theorem dfr_des_ifr (f) (t1) (t2) (r): t1 ϵ 𝐓 → /2 width=2 by path_closed_structure_depth/ | lapply (in_comp_unwind2_path_term f … Ht1) -Ht2 -Ht1 -H0t1 nsucc_zero