From: Ferruccio Guidi Date: Thu, 23 Jun 2022 10:54:36 +0000 (+0200) Subject: update in delayed_updating X-Git-Tag: make_still_working~55 X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=commitdiff_plain;h=a4cacf8e269910184348a037106551dbc8a46fd4 update in delayed_updating + unwind2_path_after_lift + prelift + refactoring for lift --- 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 9fbf809b3..f71d6974e 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma @@ -13,7 +13,6 @@ (**************************************************************************) include "delayed_updating/reduction/dfr.ma". -include "delayed_updating/reduction/ifr.ma". include "delayed_updating/substitution/fsubst_lift.ma". include "delayed_updating/substitution/fsubst_eq.ma". diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma new file mode 100644 index 000000000..6d5cb47f0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma @@ -0,0 +1,55 @@ +(**************************************************************************) +(* ___ *) +(* ||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/ifr.ma". + +include "delayed_updating/unwind/unwind2_path_lift.ma". + +include "delayed_updating/substitution/fsubst_lift.ma". +include "delayed_updating/substitution/fsubst_eq.ma". +include "delayed_updating/substitution/lift_prototerm_eq.ma". +include "delayed_updating/substitution/lift_path_head.ma". +include "delayed_updating/substitution/lift_rmap_head.ma". + +(* IMMEDIATE FOCUSED REDUCTION **********************************************) + +(* Constructions with lift **************************************************) + +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 +[ -Ht1 -Ht2 + lift_path_L_sn + >list_append_rcons_sn in H1n; list_append_rcons_sn in H1n; #H1n >lift_rmap_A_dx + /2 width=1 by tls_lift_rmap_append_closed/ +(* Note: crux of the proof ends *) +] +qed. +*) \ No newline at end of file diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma deleted file mode 100644 index b873ed303..000000000 --- a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma +++ /dev/null @@ -1,150 +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/notation/functions/uparrow_4.ma". -include "delayed_updating/notation/functions/uparrow_2.ma". -include "delayed_updating/syntax/path.ma". -include "ground/relocation/tr_uni.ma". -include "ground/relocation/tr_pap_tls.ma". - -(* LIFT FOR PATH ************************************************************) - -definition lift_continuation (A:Type[0]) ≝ - tr_map → path → A. - -rec definition lift_gen (A:Type[0]) (k:lift_continuation A) (f) (p) on p ≝ -match p with -[ list_empty ⇒ k f (𝐞) -| list_lcons l q ⇒ - match l with - [ label_d n ⇒ lift_gen (A) (λg,p. k g (𝗱(f@⧣❨n❩)◗p)) (⇂*[n]f) q - | label_m ⇒ lift_gen (A) (λg,p. k g (𝗺◗p)) f q - | label_L ⇒ lift_gen (A) (λg,p. k g (𝗟◗p)) (⫯f) q - | label_A ⇒ lift_gen (A) (λg,p. k g (𝗔◗p)) f q - | label_S ⇒ lift_gen (A) (λg,p. k g (𝗦◗p)) f q - ] -]. - -interpretation - "lift (gneric)" - 'UpArrow A k f p = (lift_gen A k f p). - -definition proj_path: lift_continuation … ≝ - λf,p.p. - -definition proj_rmap: lift_continuation … ≝ - λf,p.f. - -interpretation - "lift (path)" - 'UpArrow f p = (lift_gen ? proj_path f p). - -interpretation - "lift (relocation map)" - 'UpArrow p f = (lift_gen ? proj_rmap f p). - -(* Basic constructions ******************************************************) - -lemma lift_empty (A) (k) (f): - k f (𝐞) = ↑{A}❨k, f, 𝐞❩. -// qed. - -lemma lift_d_sn (A) (k) (p) (n) (f): - ↑❨(λg,p. k g (𝗱(f@⧣❨n❩)◗p)), ⇂*[n]f, p❩ = ↑{A}❨k, f, 𝗱n◗p❩. -// qed. - -lemma lift_m_sn (A) (k) (p) (f): - ↑❨(λg,p. k g (𝗺◗p)), f, p❩ = ↑{A}❨k, f, 𝗺◗p❩. -// qed. - -lemma lift_L_sn (A) (k) (p) (f): - ↑❨(λg,p. k g (𝗟◗p)), ⫯f, p❩ = ↑{A}❨k, f, 𝗟◗p❩. -// qed. - -lemma lift_A_sn (A) (k) (p) (f): - ↑❨(λg,p. k g (𝗔◗p)), f, p❩ = ↑{A}❨k, f, 𝗔◗p❩. -// qed. - -lemma lift_S_sn (A) (k) (p) (f): - ↑❨(λg,p. k g (𝗦◗p)), f, p❩ = ↑{A}❨k, f, 𝗦◗p❩. -// qed. - -(* Basic constructions with proj_path ***************************************) - -lemma lift_path_empty (f): - (𝐞) = ↑[f]𝐞. -// qed. - -(* Basic constructions with proj_rmap ***************************************) - -lemma lift_rmap_empty (f): - f = ↑[𝐞]f. -// qed. - -lemma lift_rmap_d_sn (f) (p) (n): - ↑[p](⇂*[ninj n]f) = ↑[𝗱n◗p]f. -// qed. - -lemma lift_rmap_m_sn (f) (p): - ↑[p]f = ↑[𝗺◗p]f. -// qed. - -lemma lift_rmap_L_sn (f) (p): - ↑[p](⫯f) = ↑[𝗟◗p]f. -// qed. - -lemma lift_rmap_A_sn (f) (p): - ↑[p]f = ↑[𝗔◗p]f. -// qed. - -lemma lift_rmap_S_sn (f) (p): - ↑[p]f = ↑[𝗦◗p]f. -// qed. - -(* Advanced constructions with proj_rmap and path_append ********************) - -lemma lift_rmap_append (p2) (p1) (f): - ↑[p2]↑[p1]f = ↑[p1●p2]f. -#p2 #p1 elim p1 -p1 // * [ #n ] #p1 #IH #f // -[ 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 -| 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 // ] qed. + +lemma unwind2_path_after_lift (p) (f1) (f2): + ▼[f2]↑[f1]p = ▼[f2∘f1]p. +#p @(path_ind_unwind … p) -p // [ #n #l ] #p #IH #f1 #f2 +[ lift_path_lcons_prelift + >IH -IH + >(unwind2_path_eq_repl … (tr_compose_assoc …)) + >(unwind2_path_eq_repl … (tr_compose_assoc …)) + tr_compose_push_bi // +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_lift.ma index 8e3d2cf2f..8d987dfb7 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_lift.ma @@ -22,10 +22,18 @@ include "delayed_updating/unwind/unwind2_prototerm.ma". (* Constructions with lift_prototerm ****************************************) -lemma unwind2_lift_term_after (f1) (f2) (t): +lemma lift_unwind2_term_after (f1) (f2) (t): ↑[f2]▼[f1]t ⇔ ▼[f2∘f1]t. #f1 #f2 #t @subset_eq_trans [| @subset_inclusion_ext_f1_compose ] @subset_equivalence_ext_f1_exteq #p -@unwind2_lift_path_after +@lift_unwind2_path_after +qed. + +lemma unwind2_term_after_lift (f1) (f2) (t): + ▼[f2]↑[f1]t ⇔ ▼[f2∘f1]t. +#f1 #f2 #t @subset_eq_trans +[| @subset_inclusion_ext_f1_compose ] +@subset_equivalence_ext_f1_exteq #p +@unwind2_path_after_lift qed.