From: Ferruccio Guidi Date: Wed, 13 Jul 2022 18:19:56 +0000 (+0200) Subject: partial commit in delayed_updating X-Git-Tag: make_still_working~48 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=5c2d38b46908f662cbb717156b29101ff30f8352;p=helm.git partial commit in delayed_updating + reversing paths in component "substitution" + lift reformulated in terms of simpler functions --- diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift_path.etc b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift_path.etc new file mode 100644 index 000000000..28e876c10 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/lift_path.etc @@ -0,0 +1,69 @@ +lemma lift_path_inv_d_sn (f) (p) (q) (k): + (𝗱k◗q) = ↑[f]p → + ∃∃r,h. k = f@⧣❨h❩ & q = ↑[⇂*[h]f]r & 𝗱h◗r = p. +#f * [| * [ #n ] #p ] #q #k +[ nsucc_pnpred lift_lcons_alt // >lift_append_rcons_sn // -lift_lcons_alt nrplus_inj_dx >nrplus_inj_sn // -qed. - -(* Advanced inversions with proj_path ***************************************) - -lemma lift_path_inv_empty (f) (p): - (𝐞) = ↑[f]p → 𝐞 = p. -#f * // * [ #n ] #p -[ (tr_pap_inj ???? H0) -k [1,3: // ] #Hr #H0 destruct -| tr_compose_push_bi // -] +lemma lift_path_after (g) (f) (p): + ↑[g]↑[f]p = ↑[g∘f]p. +#g #f #p elim p -p // +#l #p #IH +list_length_lcons >list_length_lcons // qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_prelift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_prelift.ma deleted file mode 100644 index 345f437ab..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_prelift.ma +++ /dev/null @@ -1,31 +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/lift_gen_eq.ma". -include "delayed_updating/substitution/prelift_label.ma". -include "delayed_updating/substitution/prelift_rmap.ma". - -(* LIFT FOR PATH ************************************************************) - -(* Constructions with prelift_rmap and prelift_path *************************) - -lemma lift_path_lcons_prelift (f) (p) (l): - (↑[f]l)◗↑[↑[l]f]p = ↑[f](l◗p). -#f #p * [ #n ] // -qed. - -lemma lift_path_rcons_prelift (f) (p) (l): - (↑[f]p)◖↑[↑[p]f]l = ↑[f](p◖l). -#f #p * [ #n ] // -qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_proper.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_proper.ma index 1473e819f..c87020d2f 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_proper.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_proper.ma @@ -12,7 +12,7 @@ (* *) (**************************************************************************) -include "delayed_updating/substitution/lift_gen_eq.ma". +include "delayed_updating/substitution/lift_path.ma". include "delayed_updating/syntax/path_proper.ma". (* LIFT FOR PATH ************************************************************) @@ -23,13 +23,14 @@ lemma lift_path_proper (f) (p): p ϵ 𝐏 → ↑[f]p ϵ 𝐏. #f * [ #H0 elim (ppc_inv_empty … H0) -| * [ #n ] #p #_ - [ nsucc_pnpred nrplus_inj_dx >nrplus_inj_sn // +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma index 66209d837..033a2c13e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma @@ -12,49 +12,46 @@ (* *) (**************************************************************************) -include "delayed_updating/substitution/lift_gen_eq.ma". +include "delayed_updating/substitution/lift_rmap_eq.ma". include "delayed_updating/syntax/path_head.ma". -include "delayed_updating/syntax/path_reverse.ma". include "ground/lib/stream_eq_eq.ma". (* LIFT MAP FOR PATH ********************************************************) (* Constructions with path_head *********************************************) -lemma tls_plus_lift_rmap_reverse_closed (f) (q) (n) (k): +lemma tls_plus_lift_rmap_closed (f) (q) (n) (m): q = ↳[n]q → - ⇂*[k]f ≗ ⇂*[n+k]↑[qᴿ]f. + ⇂*[m]f ≗ ⇂*[n+m]↑[q]f. #f #q elim q -q -[ #n #k #Hq +[ #n #m #Hq <(eq_inv_path_empty_head … Hq) -n // | #l #q #IH #n @(nat_ind_succ … n) -n // - #n #_ #k cases l [ #m ] - [ nrplus_inj_dx >nrplus_inj_sn >nrplus_inj_sn nsucc_unfold /2 width=1 by/ - | (reverse_reverse q) -/2 width=1 by tls_plus_lift_rmap_reverse_closed/ +/2 width=1 by tls_plus_lift_rmap_closed/ qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_id.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_id.ma index 8787ecbb9..98d4ab395 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_id.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_id.ma @@ -12,15 +12,14 @@ (* *) (**************************************************************************) -include "delayed_updating/substitution/lift_gen.ma". -include "ground/relocation/tr_id_tls.ma". +include "delayed_updating/substitution/lift_rmap.ma". +include "delayed_updating/substitution/prelift_rmap_id.ma". (* LIFT FOR RELOCATION MAP **************************************************) -(* Constructions with proj_rmap and tr_id ***********************************) +(* Constructions with tr_id *************************************************) lemma lift_rmap_id (p): (𝐢) = ↑[p]𝐢. #p elim p -p // -* [ #n ] #p #IH // qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_pap.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_pap.ma new file mode 100644 index 000000000..6e1b39255 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_pap.ma @@ -0,0 +1,24 @@ +(**************************************************************************) +(* ___ *) +(* ||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_rmap.ma". +include "ground/relocation/tr_pap_tls.ma". + +(* LIFT FOR RELOCATION MAP **************************************************) + +(* Constructions with tr_pap ************************************************) + +lemma lift_rmap_pap_d_dx (f) (p) (k) (h): + ↑[p]f@⧣❨h+k❩ = ↑[p◖𝗱k]f@⧣❨h❩+↑[p]f@⧣❨k❩. +// qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_prelift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_prelift.ma deleted file mode 100644 index ba6f96fcf..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_prelift.ma +++ /dev/null @@ -1,30 +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/lift_gen.ma". -include "delayed_updating/substitution/prelift_rmap.ma". - -(* LIFT FOR RELOCATION MAP **************************************************) - -(* Constructions with prelift_rmap ******************************************) - -lemma lift_rmap_lcons_prelift (f) (p) (l): - ↑[p]↑[l]f = ↑[l◗p]f. -#f #p * [ #n ] // -qed. - -lemma lift_rmap_rcons_prelift (f) (p) (l): - ↑[l]↑[p]f = ↑[p◖l]f. -#f #p * [ #n ] // -qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma index e4a9c0596..be57d8601 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma @@ -14,13 +14,13 @@ include "delayed_updating/notation/functions/uparrow_2.ma". include "delayed_updating/syntax/label.ma". -include "ground/relocation/tr_pap.ma". +include "ground/relocation/tr_pap_pap.ma". (* PRELIFT FOR LABEL ********************************************************) definition prelift_label (f) (l): label ≝ match l with -[ label_d n ⇒ 𝗱(f@⧣❨n❩) +[ label_d k ⇒ 𝗱(f@⧣❨k❩) | label_m ⇒ 𝗺 | label_L ⇒ 𝗟 | label_A ⇒ 𝗔 @@ -33,8 +33,8 @@ interpretation (* Basic constructions ******************************************************) -lemma prelift_label_d (f) (n): - (𝗱(f@⧣❨n❩)) = ↑[f]𝗱n. +lemma prelift_label_d (f) (k): + (𝗱(f@⧣❨k❩)) = ↑[f]𝗱k. // qed. lemma prelift_label_m (f): @@ -52,3 +52,76 @@ lemma prelift_label_A (f): lemma prelift_label_S (f): (𝗦) = ↑[f]𝗦. // qed. + +(* Basic inversions *********************************************************) + +lemma prelift_label_inv_d_sn (f) (l) (k1): + (𝗱k1) = ↑[f]l → + ∃∃k2. k1 = f@⧣❨k2❩ & 𝗱k2 = l. +#f * [ #k ] #k1 +[ (tr_pap_inj ???? Hk) -Hk // +| <(prelift_label_inv_m_sn … Hl) -l2 // +| <(prelift_label_inv_L_sn … Hl) -l2 // +| <(prelift_label_inv_A_sn … Hl) -l2 // +| <(prelift_label_inv_S_sn … Hl) -l2 // +] +qed-. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_after.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_after.ma new file mode 100644 index 000000000..24720288b --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_after.ma @@ -0,0 +1,25 @@ +(**************************************************************************) +(* ___ *) +(* ||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/prelift_label.ma". +include "ground/relocation/tr_compose_pap.ma". + +(* PRELIFT FOR LABEL ********************************************************) + +(* Constructions with tr_after **********************************************) + +lemma prelift_label_after (g) (f) (l): + ↑[g]↑[f]l = ↑[g∘f]l. +#g #f * [ #k ] // +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_eq.ma new file mode 100644 index 000000000..bccba6675 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label_eq.ma @@ -0,0 +1,28 @@ +(**************************************************************************) +(* ___ *) +(* ||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/prelift_label.ma". +include "ground/relocation/tr_pap_eq.ma". + +(* PRELIFT FOR LABEL ********************************************************) + +(* constructions with tr_map_eq *********************************************) + +lemma prelift_label_eq_repl (l): + stream_eq_repl … (λf1,f2. ↑[f1]l = ↑[f2]l). +* // +#k #f1 #f2 #Hf +