]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/unwind/unwind2_rmap_closed.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / unwind / unwind2_rmap_closed.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_rmap_lift.ma".
16 include "delayed_updating/unwind/unwind2_rmap_eq.ma".
17 include "delayed_updating/substitution/lift_rmap_structure.ma".
18 include "delayed_updating/syntax/path_closed.ma".
19 include "delayed_updating/syntax/path_depth.ma".
20 include "ground/relocation/nap.ma".
21 include "ground/relocation/tr_pushs_tls.ma".
22 include "ground/lib/stream_tls_plus.ma".
23 include "ground/lib/stream_eq_eq.ma".
24
25 (* TAILED UNWIND FOR RELOCATION MAP *****************************************)
26
27 (* Destructions with cpp ****************************************************)
28
29 lemma nap_plus_unwind2_rmap_closed (o) (f) (q) (m) (n):
30       q ϵ 𝐂❨o,n❩ →
31       f@§❨m❩+♭q = ▶[f]q@§❨m+n❩.
32 #o #f #q #m #n #Hq elim Hq -q -n //
33 #q #n [ #k #_ ] #_ #IH
34 [ <depth_d_dx <unwind2_rmap_d_dx
35   <tr_compose_nap <tr_uni_nap //
36 | <depth_L_dx <unwind2_rmap_L_dx
37   <tr_nap_push <nplus_succ_dx //
38 ]
39 qed-.
40
41 lemma nap_unwind2_rmap_closed (o) (f) (q) (n):
42       q ϵ 𝐂❨o,n❩ →
43       f@§❨𝟎❩+♭q = ▶[f]q@§❨n❩.
44 #o #f #q #n #Hn
45 /2 width=2 by nap_plus_unwind2_rmap_closed/
46 qed-.
47
48 lemma nap_plus_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (m) (n):
49       q ϵ 𝐂❨o,n❩ →
50       (⫯▶[f]p)@§❨m❩+♭q = ▶[f](p●𝗟◗q)@§❨m+n❩.
51 #o #f #p #q #m #n #Hn
52 /2 width=2 by nap_plus_unwind2_rmap_closed/
53 qed-.
54
55 lemma nap_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
56       q ϵ 𝐂❨o,n❩ →
57       ♭q = ▶[f](p●𝗟◗q)@§❨n❩.
58 #o #f #p #q #n #Hn
59 >(nplus_zero_sn n)
60 <(nap_plus_unwind2_rmap_append_closed_Lq_dx … Hn) -Hn
61 <nplus_zero_sn //
62 qed-.
63
64 lemma tls_succ_plus_unwind2_rmap_push_closed (o) (f) (q) (n):
65       q ϵ 𝐂❨o,n❩ →
66       ∀m. ⇂*[m]f ≗ ⇂*[↑(m+n)]▶[⫯f]q.
67 #o #f #q #n #Hn elim Hn -q -n //
68 #q #n #k #_ #_ #IH #m
69 @(stream_eq_trans … (tls_unwind2_rmap_d_dx …))
70 >nrplus_inj_dx >nrplus_inj_sn >nsucc_unfold //
71 qed-.
72
73 lemma tls_succ_unwind2_rmap_push_closed (o) (f) (q) (n):
74       q ϵ 𝐂❨o,n❩ →
75       f ≗ ⇂*[↑n]▶[⫯f]q.
76 #o #f #q #n #Hn
77 /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/
78 qed-.
79
80 lemma tls_succ_plus_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
81       q ϵ 𝐂❨o,n❩ →
82       ∀m. ⇂*[m]▶[f]p ≗ ⇂*[↑(m+n)]▶[f](p●𝗟◗q).
83 #o #f #p #q #n #Hn #m
84 /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/
85 qed-.
86
87 lemma tls_succ_unwind2_rmap_closed (f) (q) (n):
88       q ϵ 𝐂❨Ⓕ,n❩ →
89       ⇂f ≗ ⇂*[↑n]▶[f]q.
90 #f #q #n #Hn
91 @(stream_eq_canc_dx … (stream_tls_eq_repl …))
92 [| @(unwind2_rmap_eq_repl … (tr_compose_id_dx …)) | skip ]
93 @(stream_eq_trans … (stream_tls_eq_repl …))
94 [| @(lift_unwind2_rmap_after … ) | skip ]
95 <tr_compose_tls <tr_id_unfold
96 @(stream_eq_trans … (tr_compose_eq_repl …))
97 [| @(tls_succ_unwind2_rmap_push_closed … Hn) | skip | // | skip ]
98 @(stream_eq_trans ????? (tr_compose_id_dx …))
99 <tr_pap_succ_nap <(nap_unwind2_rmap_closed … Hn) <nplus_zero_sn
100 <lift_rmap_structure <stream_tls_succ <tr_tls_pushs //
101 qed-.