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 "delayed_updating/unwind/unwind2_path_append.ma".
16 include "delayed_updating/syntax/path_depth.ma".
17 include "ground/relocation/tr_id_compose.ma".
18 include "ground/relocation/tr_compose_compose.ma".
19 include "ground/relocation/tr_compose_eq.ma".
20 include "ground/relocation/xap.ma".
21 include "ground/lib/stream_eq_eq.ma".
23 (* TAILED UNWIND FOR RELOCATION MAP *****************************************)
25 (* Constructions with depth *************************************************)
27 lemma unwind2_rmap_decompose (p) (f):
28 ▶[f]p ≗ (⫯*[♭p]f)∘(▶[𝐢]p).
30 [ #f <unwind2_rmap_empty <unwind2_rmap_empty <tr_pushs_zero //
31 | * [ #k ] #p #IH #f //
32 [ <unwind2_rmap_d_dx <unwind2_rmap_d_dx <depth_d_dx
33 @(stream_eq_trans … (tr_compose_assoc …))
34 /2 width=1 by tr_compose_eq_repl/
35 | <unwind2_rmap_L_dx <unwind2_rmap_L_dx <depth_L_dx
36 <tr_pushs_succ <tr_compose_push_bi
37 /2 width=1 by tr_push_eq_repl/
42 lemma unwind2_rmap_pap_le (f) (p) (h):
43 ▶[𝐢]p@⧣❨h❩ < ↑♭p → ▶[𝐢]p@⧣❨h❩ = ▶[f]p@⧣❨h❩.
45 >(tr_pap_eq_repl … (▶[f]p) … (unwind2_rmap_decompose …))
46 <tr_compose_pap <tr_pap_pushs_le //
49 lemma unwind2_rmap_xap_le (f) (p) (n):
50 ▶[𝐢]p@❨n❩ ≤ ♭p → ▶[𝐢]p@❨n❩ = ▶[f]p@❨n❩.
52 #f #p * // #h <tr_xap_ninj #Hh
56 >(tr_xap_eq_repl … (▶[f]p) … (unwind2_rmap_decompose …))
57 <tr_compose_xap <tr_xap_pushs_le //