1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/relocation/tr_compose.ma".
16 include "ground/relocation/tr_uni.ma".
17 include "delayed_updating/syntax/path.ma".
18 include "delayed_updating/notation/functions/uparrow_4.ma".
19 include "delayed_updating/notation/functions/uparrow_2.ma".
21 (* LIFT FOR PATH ***********************************************************)
23 definition lift_continuation (A:Type[0]) ≝
26 (* Note: inner numeric labels are not liftable, so they are removed *)
27 rec definition lift_gen (A:Type[0]) (k:lift_continuation A) (p) (f) on p ≝
34 [ list_empty ⇒ lift_gen (A) (λp. k (𝗱❨f@❨n❩❩◗p)) q f
35 | list_lcons _ _ ⇒ lift_gen (A) k q (f∘𝐮❨n❩)
37 | label_edge_L ⇒ lift_gen (A) (λp. k (𝗟◗p)) q (⫯f)
38 | label_edge_A ⇒ lift_gen (A) (λp. k (𝗔◗p)) q f
39 | label_edge_S ⇒ lift_gen (A) (λp. k (𝗦◗p)) q f
45 'UpArrow A k p f = (lift_gen A k p f).
47 definition proj_path (p:path) (f:tr_map) ≝ p.
49 definition proj_rmap (p:path) (f:tr_map) ≝ f.
53 'UpArrow f p = (lift_gen ? proj_path p f).
56 "lift (relocation map)"
57 'UpArrow p f = (lift_gen ? proj_rmap p f).
59 (* Basic constructions ******************************************************)
61 lemma lift_empty (A) (k) (f):
62 k 𝐞 f = ↑{A}❨k, 𝐞, f❩.
65 lemma lift_d_empty_sn (A) (k) (n) (f):
66 ↑❨(λp. k (𝗱❨f@❨n❩❩◗p)), 𝐞, f❩ = ↑{A}❨k, 𝗱❨n❩◗𝐞, f❩.
69 lemma lift_d_lcons_sn (A) (k) (p) (l) (n) (f):
70 ↑❨k, l◗p, f∘𝐮❨ninj n❩❩ = ↑{A}❨k, 𝗱❨n❩◗l◗p, f❩.
73 lemma lift_L_sn (A) (k) (p) (f):
74 ↑❨(λp. k (𝗟◗p)), p, ⫯f❩ = ↑{A}❨k, 𝗟◗p, f❩.
77 lemma lift_A_sn (A) (k) (p) (f):
78 ↑❨(λp. k (𝗔◗p)), p, f❩ = ↑{A}❨k, 𝗔◗p, f❩.
81 lemma lift_S_sn (A) (k) (p) (f):
82 ↑❨(λp. k (𝗦◗p)), p, f❩ = ↑{A}❨k, 𝗦◗p, f❩.