From: Ferruccio Guidi Date: Thu, 28 Apr 2022 15:34:11 +0000 (+0200) Subject: update in delayed_updating X-Git-Tag: make_still_working~76^2~1 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d08b01eee540a6e955cb12cb7421da4198a4ef48;p=helm.git update in delayed_updating + alternative definition of unwind based on lift --- diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma index 5865fe6ad..e6e1e661e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma @@ -111,6 +111,14 @@ lemma lift_rmap_S_sn (f) (p): ↑[p]f = ↑[𝗦◗p]f. // qed. +(* Advanced cinstructionswith proj_rmap and tr_id ***************************) + +lemma lift_rmap_id (p): + (𝐢) = ↑[p]𝐢. +#p elim p -p // +* [ #n ] #p #IH // +qed. + (* Advanced constructions with proj_rmap and path_append ********************) lemma lift_rmap_append (p2) (p1) (f): diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma new file mode 100644 index 000000000..b23db01af --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind1_path.ma @@ -0,0 +1,108 @@ +(**************************************************************************) +(* ___ *) +(* ||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/lift_length.ma". +include "delayed_updating/notation/functions/black_downtriangle_1.ma". +include "ground/relocation/tr_uni.ma". + +(* BASIC UNWIND FOR PATH ****************************************************) + +rec definition unwind1_path_pnat (n) (p) on n ≝ +match n with +[ punit ⇒ p +| psucc m ⇒ + match p with + [ list_empty ⇒ 𝐞 + | list_lcons l q ⇒ + match l with + [ label_d n ⇒ + match q with + [ list_empty ⇒ l◗(unwind1_path_pnat m q) + | list_lcons _ _ ⇒ unwind1_path_pnat m (↑[𝐮❨n❩]q) + ] + | label_m ⇒ unwind1_path_pnat m q + | label_L ⇒ 𝗟◗(unwind1_path_pnat m q) + | label_A ⇒ 𝗔◗(unwind1_path_pnat m q) + | label_S ⇒ 𝗦◗(unwind1_path_pnat m q) + ] + ] +]. + +definition unwind1_path (p) ≝ + unwind1_path_pnat (↑❘p❘) p. + +interpretation + "basic unwind (path)" + 'BlackDownTriangle p = (unwind1_path p). + +(* Basic constructions ******************************************************) + +lemma unwind1_path_unfold (p): + unwind1_path_pnat (↑❘p❘) p = ▼p. +// qed-. + +lemma unwind1_path_empty: + (𝐞) = ▼𝐞. +// qed. + +lemma unwind1_path_d_empty (n): + (𝗱n◗𝐞) = ▼(𝗱n◗𝐞). +// qed. + +lemma unwind1_path_d_lcons (p) (l) (n:pnat): + ▼(↑[𝐮❨n❩](l◗p)) = ▼(𝗱n◗l◗p). +#p #l #n +(list_length_inv_zero_sn … H0) -p // +| #k #IH * + [ #H0 elim (eq_inv_nsucc_zero … H0) + | * [ #n ] #p #H0 + lapply (eq_inv_nsucc_bi … H0) -H0 + [ cases p -p [ -IH | #l #p ] #H0 destruct // + (list_length_inv_zero_sn … H0) -p // +| #k #IH * + [ #n #H0 elim (eq_inv_nsucc_zero … H0) + | * [ #m ] #p #n #H0 + lapply (eq_inv_nsucc_bi … H0) -H0 + [ cases p -p [ -IH | #l #p ] #H0 destruct list_cons_shift tr_compose_pap // +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma new file mode 100644 index 000000000..9bb26750a --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/unwind0/unwind2_rmap.ma @@ -0,0 +1,59 @@ +(**************************************************************************) +(* ___ *) +(* ||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/unwind0/unwind1_rmap.ma". +include "delayed_updating/notation/functions/black_righttriangle_2.ma". + +(* EXTENDED UNWIND FOR RELOCATION MAP ***************************************) + +definition unwind2_rmap (f) (p): tr_map ≝ + (▶↑[f]p)∘(↑[p]f). + +interpretation + "extended unwind (relocation map)" + 'BlackRightTriangle f p = (unwind2_rmap f p). + +(* Basic constructions ******************************************************) + +lemma unwind2_rmap_unfold (f) (p): + (▶↑[f]p)∘(↑[p]f) = ▶[f]p. +// qed. + +lemma unwind2_rmap_m_sn (f) (p): + ▶[f]p = ▶[f](𝗺◗p). +#f #p +