]> matita.cs.unibo.it Git - helm.git/commitdiff
update in delayed_updating
authorFerruccio Guidi <ferruccio.guidi@unibo.it>
Thu, 23 Jun 2022 10:54:36 +0000 (12:54 +0200)
committerFerruccio Guidi <ferruccio.guidi@unibo.it>
Thu, 23 Jun 2022 10:54:36 +0000 (12:54 +0200)
+ unwind2_path_after_lift
+ prelift
+ refactoring for lift

23 files changed:
matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen_eq.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma [deleted file]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_after.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_id.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_length.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_prelift.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_proper.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_structure.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_uni.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_prototerm_id.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma
matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_id.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_rmap.ma [new file with mode: 0644]
matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_path_lift.ma
matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_prototerm_lift.ma

index 9fbf809b3640cca9c049f2bae11b4215cce74019..f71d6974e2c6d7d939a1a225f906e4f32b5affa1 100644 (file)
@@ -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 (file)
index 0000000..6d5cb47
--- /dev/null
@@ -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_rmap_L_dx >lift_path_L_sn
+  >list_append_rcons_sn in H1n; <reverse_append #H1n
+  <(lift_path_head … H1n) -H1n //
+| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1n
+  <lift_path_d_dx #Ht1 //
+| lapply (lift_term_eq_repl_dx f … Ht2) -Ht2 #Ht2 -Ht1
+  @(subset_eq_trans … Ht2) -t2
+  @(subset_eq_trans … (lift_term_fsubst …))
+  @fsubst_eq_repl [ // | <lift_path_append // ]
+(*  
+  @(subset_eq_trans … (lift_term_iref …))
+  @iref_eq_repl
+  @(subset_eq_canc_sn … (lift_term_grafted_S …))
+  @lift_term_eq_repl_sn
+(* Note: crux of the proof begins *)
+  >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 (file)
index b873ed3..0000000
+++ /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_rmap_m_sn <lift_rmap_m_sn //
-| <lift_rmap_A_sn <lift_rmap_A_sn //
-| <lift_rmap_S_sn <lift_rmap_S_sn //
-]
-qed.
-
-(* Advanced constructions with proj_rmap and path_rcons *********************)
-
-lemma lift_rmap_d_dx (f) (p) (n):
-      ⇂*[ninj n](↑[p]f) = ↑[p◖𝗱n]f.
-// qed.
-
-lemma lift_rmap_m_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗺]f.
-// qed.
-
-lemma lift_rmap_L_dx (f) (p):
-      (⫯↑[p]f) = ↑[p◖𝗟]f.
-// qed.
-
-lemma lift_rmap_A_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗔]f.
-// qed.
-
-lemma lift_rmap_S_dx (f) (p):
-      ↑[p]f = ↑[p◖𝗦]f.
-// qed.
-
-lemma lift_rmap_pap_d_dx (f) (p) (n) (m):
-      ↑[p]f@⧣❨m+n❩ = ↑[p◖𝗱n]f@⧣❨m❩+↑[p]f@⧣❨n❩.
-// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_eq.ma
deleted file mode 100644 (file)
index 317e1f4..0000000
+++ /dev/null
@@ -1,304 +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.ma".
-include "ground/relocation/tr_pap_pap.ma".
-include "ground/relocation/tr_pap_eq.ma".
-include "ground/relocation/tr_pn_eq.ma".
-include "ground/lib/stream_tls_plus.ma".
-include "ground/lib/stream_tls_eq.ma".
-include "ground/arith/nat_plus_rplus.ma".
-include "ground/arith/nat_rplus_pplus.ma".
-
-(* LIFT FOR PATH ************************************************************)
-
-definition lift_exteq (A): relation2 (lift_continuation A) (lift_continuation A) ≝
-           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
-
-interpretation
-  "extensional equivalence (lift continuation)"
-  'RingEq A k1 k2 = (lift_exteq A k1 k2).
-
-(* Constructions with lift_exteq ********************************************)
-
-lemma lift_eq_repl (A) (p) (k1) (k2):
-      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ↑❨k1, f1, p❩ = ↑❨k2, f2, p❩).
-#A #p elim p -p [| * [ #n ] #q #IH ]
-#k1 #k2 #Hk #f1 #f2 #Hf
-[ <lift_empty <lift_empty /2 width=1 by/
-| <lift_d_sn <lift_d_sn <(tr_pap_eq_repl … Hf)
-  /3 width=3 by stream_tls_eq_repl, compose_repl_fwd_sn/
-| /3 width=1 by/
-| /3 width=1 by tr_push_eq_repl/
-| /3 width=1 by/
-| /3 width=1 by/
-]
-qed-.
-
-(* Advanced constructions ***************************************************)
-
-lemma lift_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
-      ↑❨λg,p2. k g (l◗p2), f, p❩ = ↑{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
-#A #k #f #p #l #Hk
-@lift_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
-qed.
-
-lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
-      ↑❨λg,p2. k g (p1●l◗p2), f, p❩ = ↑{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
-#A #k #f #p1 #p #l #Hk
-@lift_eq_repl // #g1 #g2 #p2 #Hg
-<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
-qed.
-
-(* Advanced constructions with proj_path ************************************)
-
-lemma proj_path_proper:
-      proj_path ≗ proj_path.
-// qed.
-
-lemma lift_path_eq_repl (p):
-      stream_eq_repl … (λf1,f2. ↑[f1]p = ↑[f2]p).
-/2 width=1 by lift_eq_repl/ qed.
-
-lemma lift_path_append_sn (p) (f) (q):
-      q●↑[f]p = ↑❨(λg,p. proj_path g (q●p)), f, p❩.
-#p elim p -p // * [ #n ] #p #IH #f #q
-[ <lift_d_sn <lift_d_sn
-| <lift_m_sn <lift_m_sn
-| <lift_L_sn <lift_L_sn
-| <lift_A_sn <lift_A_sn
-| <lift_S_sn <lift_S_sn
-] 
->lift_lcons_alt // >lift_append_rcons_sn //
-<IH <IH -IH <list_append_rcons_sn //
-qed.
-
-lemma lift_path_lcons (f) (p) (l):
-      l◗↑[f]p = ↑❨(λg,p. proj_path g (l◗p)), f, p❩.
-#f #p #l
->lift_lcons_alt <lift_path_append_sn //
-qed.
-
-lemma lift_path_d_sn (f) (p) (n):
-      (𝗱(f@⧣❨n❩)◗↑[⇂*[n]f]p) = ↑[f](𝗱n◗p).
-// qed.
-
-lemma lift_path_m_sn (f) (p):
-      (𝗺◗↑[f]p) = ↑[f](𝗺◗p).
-// qed.
-
-lemma lift_path_L_sn (f) (p):
-      (𝗟◗↑[⫯f]p) = ↑[f](𝗟◗p).
-// qed.
-
-lemma lift_path_A_sn (f) (p):
-      (𝗔◗↑[f]p) = ↑[f](𝗔◗p).
-// qed.
-
-lemma lift_path_S_sn (f) (p):
-      (𝗦◗↑[f]p) = ↑[f](𝗦◗p).
-// qed.
-
-lemma lift_path_append (p2) (p1) (f):
-      (↑[f]p1)●(↑[↑[p1]f]p2) = ↑[f](p1●p2).
-#p2 #p1 elim p1 -p1 //
-* [ #n1 ] #p1 #IH #f
-[ <lift_path_d_sn <lift_path_d_sn <IH //
-| <lift_path_m_sn <lift_path_m_sn <IH //
-| <lift_path_L_sn <lift_path_L_sn <IH //
-| <lift_path_A_sn <lift_path_A_sn <IH //
-| <lift_path_S_sn <lift_path_S_sn <IH //
-]
-qed.
-
-lemma lift_path_d_dx (f) (p) (n):
-      (↑[f]p)◖𝗱((↑[p]f)@⧣❨n❩) = ↑[f](p◖𝗱n).
-#f #p #n <lift_path_append //
-qed.
-
-lemma lift_path_m_dx (f) (p):
-      (↑[f]p)◖𝗺 = ↑[f](p◖𝗺).
-#f #p <lift_path_append //
-qed.
-
-lemma lift_path_L_dx (f) (p):
-      (↑[f]p)◖𝗟 = ↑[f](p◖𝗟).
-#f #p <lift_path_append //
-qed.
-
-lemma lift_path_A_dx (f) (p):
-      (↑[f]p)◖𝗔 = ↑[f](p◖𝗔).
-#f #p <lift_path_append //
-qed.
-
-lemma lift_path_S_dx (f) (p):
-      (↑[f]p)◖𝗦 = ↑[f](p◖𝗦).
-#f #p <lift_path_append //
-qed.
-
-(* Advanced constructions with proj_rmap ************************************)
-
-lemma lift_rmap_eq_repl (p):
-      stream_eq_repl … (λf1,f2. ↑[p]f1 ≗ ↑[p]f2).
-#p elim p -p //
-* [ #n ] #p #IH #f1 #f2 #Hf
-[ /3 width=1 by stream_tls_eq_repl/
-| /2 width=1 by/
-| /3 width=1 by tr_push_eq_repl/
-| /2 width=1 by/
-| /2 width=1 by/
-]
-qed.
-
-lemma tls_lift_rmap_d_dx (f) (p) (m) (n):
-      ⇂*[m+n]↑[p]f ≗ ⇂*[m]↑[p◖𝗱n]f.
-#f #p #m #n
-<lift_rmap_d_dx >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
-[ <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-qed-.
-
-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
-[ <lift_path_empty
-| <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-/2 width=5 by ex3_2_intro/
-qed-.
-
-lemma lift_path_inv_m_sn (f) (p) (q):
-      (𝗺◗q) = ↑[f]p →
-      ∃∃r. q = ↑[f]r & 𝗺◗r = p.
-#f * [| * [ #n ] #p ] #q
-[ <lift_path_empty
-| <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma lift_path_inv_L_sn (f) (p) (q):
-      (𝗟◗q) = ↑[f]p →
-      ∃∃r. q = ↑[⫯f]r & 𝗟◗r = p.
-#f * [| * [ #n ] #p ] #q
-[ <lift_path_empty
-| <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma lift_path_inv_A_sn (f) (p) (q):
-      (𝗔◗q) = ↑[f]p →
-      ∃∃r. q = ↑[f]r & 𝗔◗r = p.
-#f * [| * [ #n ] #p ] #q
-[ <lift_path_empty
-| <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma lift_path_inv_S_sn (f) (p) (q):
-      (𝗦◗q) = ↑[f]p →
-      ∃∃r. q = ↑[f]r & 𝗦◗r = p.
-#f * [| * [ #n ] #p ] #q
-[ <lift_path_empty
-| <lift_path_d_sn
-| <lift_path_m_sn
-| <lift_path_L_sn
-| <lift_path_A_sn
-| <lift_path_S_sn
-] #H destruct
-/2 width=3 by ex2_intro/
-qed-.
-
-lemma lift_path_inv_append_sn (q2) (q1) (p) (f):
-      q1●q2 = ↑[f]p →
-      ∃∃p1,p2. q1 = ↑[f]p1 & q2 = ↑[↑[p1]f]p2 & p1●p2 = p.
-#q2 #q1 elim q1 -q1
-[| * [ #n1 ] #q1 #IH ] #p #f
-[ <list_append_empty_sn #H0 destruct
-  /2 width=5 by ex3_2_intro/
-| <list_append_lcons_sn #H0
-  elim (lift_path_inv_d_sn … H0) -H0 #r1 #m1 #H1 #H0 #H2 destruct
-  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
-  /2 width=5 by ex3_2_intro/
-| <list_append_lcons_sn #H0
-  elim (lift_path_inv_m_sn … H0) -H0 #r1 #H0 #H1 destruct
-  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
-  /2 width=5 by ex3_2_intro/
-| <list_append_lcons_sn #H0
-  elim (lift_path_inv_L_sn … H0) -H0 #r1 #H0 #H1 destruct
-  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
-  /2 width=5 by ex3_2_intro/
-| <list_append_lcons_sn #H0
-  elim (lift_path_inv_A_sn … H0) -H0 #r1 #H0 #H1 destruct
-  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
-  /2 width=5 by ex3_2_intro/
-| <list_append_lcons_sn #H0
-  elim (lift_path_inv_S_sn … H0) -H0 #r1 #H0 #H1 destruct
-  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
-  /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-(* Main inversions with proj_path *******************************************)
-
-theorem lift_path_inj (q:path) (p) (f):
-        ↑[f]q = ↑[f]p → q = p.
-#q elim q -q [| * [ #k ] #q #IH ] #p #f
-[ <lift_path_empty #H0
-  <(lift_path_inv_empty … H0) -H0 //
-| <lift_path_d_sn #H0
-  elim (lift_path_inv_d_sn … H0) -H0 #r #h #H0
-  >(tr_pap_inj ???? H0) -k [1,3: // ] #Hr #H0 destruct
-| <lift_path_m_sn #H0
-  elim (lift_path_inv_m_sn … H0) -H0 #r #Hr #H0 destruct
-| <lift_path_L_sn #H0
-  elim (lift_path_inv_L_sn … H0) -H0 #r #Hr #H0 destruct
-| <lift_path_A_sn #H0
-  elim (lift_path_inv_A_sn … H0) -H0 #r #Hr #H0 destruct
-| <lift_path_S_sn #H0
-  elim (lift_path_inv_S_sn … H0) -H0 #r #Hr #H0 destruct
-]
-<(IH … Hr) -r -IH //
-qed-.
-
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen.ma
new file mode 100644 (file)
index 0000000..b873ed3
--- /dev/null
@@ -0,0 +1,150 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_rmap_m_sn <lift_rmap_m_sn //
+| <lift_rmap_A_sn <lift_rmap_A_sn //
+| <lift_rmap_S_sn <lift_rmap_S_sn //
+]
+qed.
+
+(* Advanced constructions with proj_rmap and path_rcons *********************)
+
+lemma lift_rmap_d_dx (f) (p) (n):
+      ⇂*[ninj n](↑[p]f) = ↑[p◖𝗱n]f.
+// qed.
+
+lemma lift_rmap_m_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗺]f.
+// qed.
+
+lemma lift_rmap_L_dx (f) (p):
+      (⫯↑[p]f) = ↑[p◖𝗟]f.
+// qed.
+
+lemma lift_rmap_A_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗔]f.
+// qed.
+
+lemma lift_rmap_S_dx (f) (p):
+      ↑[p]f = ↑[p◖𝗦]f.
+// qed.
+
+lemma lift_rmap_pap_d_dx (f) (p) (n) (m):
+      ↑[p]f@⧣❨m+n❩ = ↑[p◖𝗱n]f@⧣❨m❩+↑[p]f@⧣❨n❩.
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen_eq.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_gen_eq.ma
new file mode 100644 (file)
index 0000000..e589276
--- /dev/null
@@ -0,0 +1,304 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "ground/relocation/tr_pap_pap.ma".
+include "ground/relocation/tr_pap_eq.ma".
+include "ground/relocation/tr_pn_eq.ma".
+include "ground/lib/stream_tls_plus.ma".
+include "ground/lib/stream_tls_eq.ma".
+include "ground/arith/nat_plus_rplus.ma".
+include "ground/arith/nat_rplus_pplus.ma".
+
+(* LIFT FOR PATH ************************************************************)
+
+definition lift_exteq (A): relation2 (lift_continuation A) (lift_continuation A) ≝
+           λk1,k2. ∀f1,f2,p. f1 ≗ f2 → k1 f1 p = k2 f2 p.
+
+interpretation
+  "extensional equivalence (lift continuation)"
+  'RingEq A k1 k2 = (lift_exteq A k1 k2).
+
+(* Constructions with lift_exteq ********************************************)
+
+lemma lift_eq_repl (A) (p) (k1) (k2):
+      k1 ≗{A} k2 → stream_eq_repl … (λf1,f2. ↑❨k1, f1, p❩ = ↑❨k2, f2, p❩).
+#A #p elim p -p [| * [ #n ] #q #IH ]
+#k1 #k2 #Hk #f1 #f2 #Hf
+[ <lift_empty <lift_empty /2 width=1 by/
+| <lift_d_sn <lift_d_sn <(tr_pap_eq_repl … Hf)
+  /3 width=3 by stream_tls_eq_repl, compose_repl_fwd_sn/
+| /3 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /3 width=1 by/
+| /3 width=1 by/
+]
+qed-.
+
+(* Advanced constructions ***************************************************)
+
+lemma lift_lcons_alt (A) (k) (f) (p) (l): k ≗ k →
+      ↑❨λg,p2. k g (l◗p2), f, p❩ = ↑{A}❨λg,p2. k g ((l◗𝐞)●p2), f, p❩.
+#A #k #f #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg @Hk -Hk // (**) (* auto fail *)
+qed.
+
+lemma lift_append_rcons_sn (A) (k) (f) (p1) (p) (l): k ≗ k →
+      ↑❨λg,p2. k g (p1●l◗p2), f, p❩ = ↑{A}❨λg,p2. k g (p1◖l●p2), f, p❩.
+#A #k #f #p1 #p #l #Hk
+@lift_eq_repl // #g1 #g2 #p2 #Hg
+<list_append_rcons_sn @Hk -Hk // (**) (* auto fail *)
+qed.
+
+(* Advanced constructions with proj_path ************************************)
+
+lemma proj_path_proper:
+      proj_path ≗ proj_path.
+// qed.
+
+lemma lift_path_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ↑[f1]p = ↑[f2]p).
+/2 width=1 by lift_eq_repl/ qed.
+
+lemma lift_path_append_sn (p) (f) (q):
+      q●↑[f]p = ↑❨(λg,p. proj_path g (q●p)), f, p❩.
+#p elim p -p // * [ #n ] #p #IH #f #q
+[ <lift_d_sn <lift_d_sn
+| <lift_m_sn <lift_m_sn
+| <lift_L_sn <lift_L_sn
+| <lift_A_sn <lift_A_sn
+| <lift_S_sn <lift_S_sn
+] 
+>lift_lcons_alt // >lift_append_rcons_sn //
+<IH <IH -IH <list_append_rcons_sn //
+qed.
+
+lemma lift_path_lcons (f) (p) (l):
+      l◗↑[f]p = ↑❨(λg,p. proj_path g (l◗p)), f, p❩.
+#f #p #l
+>lift_lcons_alt <lift_path_append_sn //
+qed.
+
+lemma lift_path_d_sn (f) (p) (n):
+      (𝗱(f@⧣❨n❩)◗↑[⇂*[n]f]p) = ↑[f](𝗱n◗p).
+// qed.
+
+lemma lift_path_m_sn (f) (p):
+      (𝗺◗↑[f]p) = ↑[f](𝗺◗p).
+// qed.
+
+lemma lift_path_L_sn (f) (p):
+      (𝗟◗↑[⫯f]p) = ↑[f](𝗟◗p).
+// qed.
+
+lemma lift_path_A_sn (f) (p):
+      (𝗔◗↑[f]p) = ↑[f](𝗔◗p).
+// qed.
+
+lemma lift_path_S_sn (f) (p):
+      (𝗦◗↑[f]p) = ↑[f](𝗦◗p).
+// qed.
+
+lemma lift_path_append (p2) (p1) (f):
+      (↑[f]p1)●(↑[↑[p1]f]p2) = ↑[f](p1●p2).
+#p2 #p1 elim p1 -p1 //
+* [ #n1 ] #p1 #IH #f
+[ <lift_path_d_sn <lift_path_d_sn <IH //
+| <lift_path_m_sn <lift_path_m_sn <IH //
+| <lift_path_L_sn <lift_path_L_sn <IH //
+| <lift_path_A_sn <lift_path_A_sn <IH //
+| <lift_path_S_sn <lift_path_S_sn <IH //
+]
+qed.
+
+lemma lift_path_d_dx (f) (p) (n):
+      (↑[f]p)◖𝗱((↑[p]f)@⧣❨n❩) = ↑[f](p◖𝗱n).
+#f #p #n <lift_path_append //
+qed.
+
+lemma lift_path_m_dx (f) (p):
+      (↑[f]p)◖𝗺 = ↑[f](p◖𝗺).
+#f #p <lift_path_append //
+qed.
+
+lemma lift_path_L_dx (f) (p):
+      (↑[f]p)◖𝗟 = ↑[f](p◖𝗟).
+#f #p <lift_path_append //
+qed.
+
+lemma lift_path_A_dx (f) (p):
+      (↑[f]p)◖𝗔 = ↑[f](p◖𝗔).
+#f #p <lift_path_append //
+qed.
+
+lemma lift_path_S_dx (f) (p):
+      (↑[f]p)◖𝗦 = ↑[f](p◖𝗦).
+#f #p <lift_path_append //
+qed.
+
+(* Advanced constructions with proj_rmap ************************************)
+
+lemma lift_rmap_eq_repl (p):
+      stream_eq_repl … (λf1,f2. ↑[p]f1 ≗ ↑[p]f2).
+#p elim p -p //
+* [ #n ] #p #IH #f1 #f2 #Hf
+[ /3 width=1 by stream_tls_eq_repl/
+| /2 width=1 by/
+| /3 width=1 by tr_push_eq_repl/
+| /2 width=1 by/
+| /2 width=1 by/
+]
+qed.
+
+lemma tls_lift_rmap_d_dx (f) (p) (m) (n):
+      ⇂*[m+n]↑[p]f ≗ ⇂*[m]↑[p◖𝗱n]f.
+#f #p #m #n
+<lift_rmap_d_dx >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
+[ <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+qed-.
+
+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
+[ <lift_path_empty
+| <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+/2 width=5 by ex3_2_intro/
+qed-.
+
+lemma lift_path_inv_m_sn (f) (p) (q):
+      (𝗺◗q) = ↑[f]p →
+      ∃∃r. q = ↑[f]r & 𝗺◗r = p.
+#f * [| * [ #n ] #p ] #q
+[ <lift_path_empty
+| <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma lift_path_inv_L_sn (f) (p) (q):
+      (𝗟◗q) = ↑[f]p →
+      ∃∃r. q = ↑[⫯f]r & 𝗟◗r = p.
+#f * [| * [ #n ] #p ] #q
+[ <lift_path_empty
+| <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma lift_path_inv_A_sn (f) (p) (q):
+      (𝗔◗q) = ↑[f]p →
+      ∃∃r. q = ↑[f]r & 𝗔◗r = p.
+#f * [| * [ #n ] #p ] #q
+[ <lift_path_empty
+| <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma lift_path_inv_S_sn (f) (p) (q):
+      (𝗦◗q) = ↑[f]p →
+      ∃∃r. q = ↑[f]r & 𝗦◗r = p.
+#f * [| * [ #n ] #p ] #q
+[ <lift_path_empty
+| <lift_path_d_sn
+| <lift_path_m_sn
+| <lift_path_L_sn
+| <lift_path_A_sn
+| <lift_path_S_sn
+] #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma lift_path_inv_append_sn (q2) (q1) (p) (f):
+      q1●q2 = ↑[f]p →
+      ∃∃p1,p2. q1 = ↑[f]p1 & q2 = ↑[↑[p1]f]p2 & p1●p2 = p.
+#q2 #q1 elim q1 -q1
+[| * [ #n1 ] #q1 #IH ] #p #f
+[ <list_append_empty_sn #H0 destruct
+  /2 width=5 by ex3_2_intro/
+| <list_append_lcons_sn #H0
+  elim (lift_path_inv_d_sn … H0) -H0 #r1 #m1 #H1 #H0 #H2 destruct
+  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
+  /2 width=5 by ex3_2_intro/
+| <list_append_lcons_sn #H0
+  elim (lift_path_inv_m_sn … H0) -H0 #r1 #H0 #H1 destruct
+  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
+  /2 width=5 by ex3_2_intro/
+| <list_append_lcons_sn #H0
+  elim (lift_path_inv_L_sn … H0) -H0 #r1 #H0 #H1 destruct
+  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
+  /2 width=5 by ex3_2_intro/
+| <list_append_lcons_sn #H0
+  elim (lift_path_inv_A_sn … H0) -H0 #r1 #H0 #H1 destruct
+  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
+  /2 width=5 by ex3_2_intro/
+| <list_append_lcons_sn #H0
+  elim (lift_path_inv_S_sn … H0) -H0 #r1 #H0 #H1 destruct
+  elim (IH … H0) -IH -H0 #p1 #p2 #H1 #H2 #H3 destruct
+  /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Main inversions with proj_path *******************************************)
+
+theorem lift_path_inj (q:path) (p) (f):
+        ↑[f]q = ↑[f]p → q = p.
+#q elim q -q [| * [ #k ] #q #IH ] #p #f
+[ <lift_path_empty #H0
+  <(lift_path_inv_empty … H0) -H0 //
+| <lift_path_d_sn #H0
+  elim (lift_path_inv_d_sn … H0) -H0 #r #h #H0
+  >(tr_pap_inj ???? H0) -k [1,3: // ] #Hr #H0 destruct
+| <lift_path_m_sn #H0
+  elim (lift_path_inv_m_sn … H0) -H0 #r #Hr #H0 destruct
+| <lift_path_L_sn #H0
+  elim (lift_path_inv_L_sn … H0) -H0 #r #Hr #H0 destruct
+| <lift_path_A_sn #H0
+  elim (lift_path_inv_A_sn … H0) -H0 #r #Hr #H0 destruct
+| <lift_path_S_sn #H0
+  elim (lift_path_inv_S_sn … H0) -H0 #r #Hr #H0 destruct
+]
+<(IH … Hr) -r -IH //
+qed-.
+
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_id.ma
deleted file mode 100644 (file)
index c2376b5..0000000
+++ /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/lift_eq.ma".
-include "ground/relocation/tr_id_pap.ma".
-include "ground/relocation/tr_id_tls.ma".
-
-(* LIFT FOR PATH ************************************************************)
-
-(* Constructions with proj_path and tr_id ***********************************)
-
-lemma lift_path_id (p):
-      p = ↑[𝐢]p.
-#p elim p -p //
-* [ #n ] #p #IH //
-[ <lift_path_d_sn //
-| <lift_path_L_sn //
-]
-qed.
-
-(* Constructions with proj_rmap and tr_id ***********************************)
-
-lemma lift_rmap_id (p):
-      (𝐢) = ↑[p]𝐢.
-#p elim p -p //
-* [ #n ] #p #IH //
-qed.
index 869d680fef6a2cec94700f90aef49d9fb4587787..1bdf3c592b2d51f3aa51d012a6016974784c2798 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "ground/relocation/tr_compose_pap.ma".
 include "ground/relocation/tr_compose_pn.ma".
 include "ground/relocation/tr_compose_tls.ma".
index 71b11f5d6d4807c35414dcc16ecc3f9cf9b0a699..772cc8d09ea3921aaaff0fe0a6ada18700f96751 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "delayed_updating/syntax/path_head.ma".
 include "delayed_updating/syntax/path_reverse.ma".
 include "ground/relocation/xap.ma".
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_id.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_id.ma
new file mode 100644 (file)
index 0000000..cac7708
--- /dev/null
@@ -0,0 +1,30 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "ground/relocation/tr_id_pap.ma".
+include "ground/relocation/tr_id_tls.ma".
+
+(* LIFT FOR PATH ************************************************************)
+
+(* Constructions with proj_path and tr_id ***********************************)
+
+lemma lift_path_id (p):
+      p = ↑[𝐢]p.
+#p elim p -p //
+* [ #n ] #p #IH //
+[ <lift_path_d_sn //
+| <lift_path_L_sn //
+]
+qed.
index a4b81aeebf057c0dc0200eb75b9e461f696befad..755f8d16e49ab536a16727fabbc874e95449ec10 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "ground/lib/list_length.ma".
 
 (* LIFT FOR PATH ************************************************************)
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
new file mode 100644 (file)
index 0000000..345f437
--- /dev/null
@@ -0,0 +1,31 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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.
index 0eef9789656636d1a7d377ba46bf0102c4c1fe8f..1473e819f6cab79711fe9863dc19c4dd940a8f0d 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "delayed_updating/syntax/path_proper.ma".
 
 (* LIFT FOR PATH ************************************************************)
index 773749b63762721581b377a23b1cc300e6a6dadc..ece3e93e63ba87c3adfec86308dba8ed26567902 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "delayed_updating/syntax/path_structure.ma".
 
 (* LIFT FOR PATH ************************************************************)
index 0e22a3d39917cc97389097f4015fe4b58c85c8ca..f68010b32a4eabfcd6a6d72f99b42988f3ebe574 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_id.ma".
+include "delayed_updating/substitution/lift_path_id.ma".
 include "ground/relocation/tr_uni_pap.ma".
 include "ground/relocation/tr_uni_tls.ma".
 
index ed5fbe84c57a3c4f41e7966b018d92d0f22882c9..85aa8a0bb91931b06dbbf1e638479f7136f910fd 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift.ma".
+include "delayed_updating/substitution/lift_gen.ma".
 include "delayed_updating/syntax/prototerm.ma".
 include "ground/lib/subset_ext.ma".
 
index 7343319f42e7ff5241817a329331e17776385d9e..11e39983bf1afdabcea20f02795ee45e49842034 100644 (file)
@@ -13,7 +13,7 @@
 (**************************************************************************)
 
 include "delayed_updating/substitution/lift_prototerm_eq.ma".
-include "delayed_updating/substitution/lift_id.ma".
+include "delayed_updating/substitution/lift_path_id.ma".
 
 (* LIFT FOR PROTOTERM *******************************************************)
 
index 122262026b7828aef158fef9164d9f620adba6ee..3dadf0fcd4385f6106d98f11703847949fd8cd52 100644 (file)
@@ -12,7 +12,7 @@
 (*                                                                        *)
 (**************************************************************************)
 
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
 include "delayed_updating/syntax/path_head.ma".
 include "delayed_updating/syntax/path_reverse.ma".
 include "ground/lib/stream_eq_eq.ma".
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
new file mode 100644 (file)
index 0000000..077f907
--- /dev/null
@@ -0,0 +1,26 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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 "ground/relocation/tr_id_tls.ma".
+
+(* LIFT FOR RELOCATION MAP  *************************************************)
+
+(* Constructions with proj_rmap and 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/prelift_label.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_label.ma
new file mode 100644 (file)
index 0000000..e4a9c05
--- /dev/null
@@ -0,0 +1,54 @@
+(**************************************************************************)
+(*       ___                                                              *)
+(*      ||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_2.ma".
+include "delayed_updating/syntax/label.ma".
+include "ground/relocation/tr_pap.ma".
+
+(* PRELIFT FOR LABEL ********************************************************)
+
+definition prelift_label (f) (l): label ≝
+match l with
+[ label_d n ⇒ 𝗱(f@⧣❨n❩)
+| label_m   ⇒ 𝗺
+| label_L   ⇒ 𝗟
+| label_A   ⇒ 𝗔
+| label_S   ⇒ 𝗦
+].
+
+interpretation
+  "prelift (label)"
+  'UpArrow f l = (prelift_label f l).
+
+(* Basic constructions ******************************************************)
+
+lemma prelift_label_d (f) (n):
+      (𝗱(f@⧣❨n❩)) = ↑[f]𝗱n.
+// qed.
+
+lemma prelift_label_m (f):
+      (𝗺) = ↑[f]𝗺.
+// qed.
+
+lemma prelift_label_L (f):
+      (𝗟) = ↑[f]𝗟.
+// qed.
+
+lemma prelift_label_A (f):
+      (𝗔) = ↑[f]𝗔.
+// qed.
+
+lemma prelift_label_S (f):
+      (𝗦) = ↑[f]𝗦.
+// qed.
diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_rmap.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/prelift_rmap.ma
new file mode 100644 (file)
index 0000000..de7f403
--- /dev/null
@@ -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/notation/functions/uparrow_2.ma".
+include "delayed_updating/syntax/label.ma".
+include "ground/relocation/tr_pn.ma".
+include "ground/lib/stream_tls.ma".
+
+(* PRELIFT FOR RELOCATION MAP ***********************************************)
+
+definition prelift_rmap (f) (l): tr_map ≝
+match l with
+[ label_d n ⇒ ⇂*[n]f
+| label_m   ⇒ f
+| label_L   ⇒ ⫯f
+| label_A   ⇒ f
+| label_S   ⇒ f
+].
+
+interpretation
+  "prelift (relocation map)"
+  'UpArrow l f = (prelift_rmap f l).
+
+(* Basic constructions ******************************************************)
+
+lemma prelift_rmap_d (f) (n:pnat):
+      ⇂*[n]f = ↑[𝗱n]f.
+// qed.
+
+lemma prelift_rmap_m (f):
+      f = ↑[𝗺]f.
+// qed.
+
+lemma prelift_rmap_L (f):
+      (⫯f) = ↑[𝗟]f.
+// qed.
+
+lemma prelift_rmap_A (f):
+      f = ↑[𝗔]f.
+// qed.
+
+lemma prelift_rmap_S (f):
+      f = ↑[𝗦]f.
+// qed.
index 71a169dbfdc71f6a4c0710a61e15cbb9bbaa0d93..ac2166a469d4700d0c8571cbfd58527aa3bc83a1 100644 (file)
 (**************************************************************************)
 
 include "delayed_updating/unwind/unwind2_path_eq.ma".
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_path_prelift.ma".
 
 (* UNWIND FOR PATH **********************************************************)
 
-(* Properties with lift_path ************************************************)
+(* Constructions with lift_path *********************************************)
 
-lemma unwind2_lift_path_after (p) (f1) (f2):
+lemma lift_unwind2_path_after (p) (f1) (f2):
       ↑[f2]▼[f1]p = ▼[f2∘f1]p.
 #p @(path_ind_unwind … p) -p // [ #n | #p ] #IH #f1 #f2
 [ <unwind2_path_d_empty <unwind2_path_d_empty
@@ -28,3 +28,19 @@ lemma unwind2_lift_path_after (p) (f1) (f2):
   >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_d_sn <unwind2_path_d_lcons
+  <lift_path_lcons_prelift <unwind2_path_d_lcons >lift_path_lcons_prelift
+  >IH -IH
+  >(unwind2_path_eq_repl … (tr_compose_assoc …))
+  >(unwind2_path_eq_repl … (tr_compose_assoc …))
+  <unwind2_path_after <unwind2_path_after in ⊢ (???%);
+  /3 width=1 by unwind2_path_eq_repl, eq_f/
+| <lift_path_m_sn <unwind2_path_m_sn <unwind2_path_m_sn //
+| <lift_path_L_sn <unwind2_path_L_sn <unwind2_path_L_sn 
+  >tr_compose_push_bi //
+]
+qed.
index 8e3d2cf2f74d4c57c396a22c4c16adc2763f4097..8d987dfb7759ae0338f9d050b5769a1ac89d740f 100644 (file)
@@ -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.