(**************************************************************************)
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".
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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-.
-
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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-.
+
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||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.
(* *)
(**************************************************************************)
-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".
(* *)
(**************************************************************************)
-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".
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
(* *)
(**************************************************************************)
-include "delayed_updating/substitution/lift_eq.ma".
+include "delayed_updating/substitution/lift_gen_eq.ma".
include "ground/lib/list_length.ma".
(* LIFT FOR PATH ************************************************************)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
(* *)
(**************************************************************************)
-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 ************************************************************)
(* *)
(**************************************************************************)
-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 ************************************************************)
(* *)
(**************************************************************************)
-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".
(* *)
(**************************************************************************)
-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".
(**************************************************************************)
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 *******************************************************)
(* *)
(**************************************************************************)
-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".
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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.
(**************************************************************************)
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
>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.
(* 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.