]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_depth.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / unwind / unwind2_rmap_depth.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
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".
22
23 (* TAILED UNWIND FOR RELOCATION MAP *****************************************)
24
25 (* Constructions with depth *************************************************)
26
27 lemma unwind2_rmap_decompose (p) (f):
28       ▶[f]p ≗ (⫯*[♭p]f)∘(▶[𝐢]p).
29 #p elim p -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/
38   ]
39 ]
40 qed.
41
42 lemma unwind2_rmap_pap_le (f) (p) (h):
43       ▶[𝐢]p@⧣❨h❩ < ↑♭p → ▶[𝐢]p@⧣❨h❩ = ▶[f]p@⧣❨h❩.
44 #f #p #h #Hh
45 >(tr_pap_eq_repl … (▶[f]p) … (unwind2_rmap_decompose …))
46 <tr_compose_pap <tr_pap_pushs_le //
47 qed.
48
49 lemma unwind2_rmap_xap_le (f) (p) (n):
50       ▶[𝐢]p@❨n❩ ≤ ♭p → ▶[𝐢]p@❨n❩ = ▶[f]p@❨n❩.
51 (*
52 #f #p * // #h <tr_xap_ninj #Hh
53 >unwind2_rmap_pap_le
54 *)
55 #f #p #n #Hn
56 >(tr_xap_eq_repl … (▶[f]p) … (unwind2_rmap_decompose …))
57 <tr_compose_xap <tr_xap_pushs_le //
58 qed-.