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_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".
25 (* TAILED UNWIND FOR RELOCATION MAP *****************************************)
27 (* Destructions with cpp ****************************************************)
29 lemma nap_plus_unwind2_rmap_closed (o) (e) (f) (q) (m) (n):
31 f@§❨m+e❩+♭q = ▶[f]q@§❨m+n❩.
32 #o #e #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 //
41 lemma nap_unwind2_rmap_closed (o) (f) (q) (n):
43 f@§❨𝟎❩+♭q = ▶[f]q@§❨n❩.
45 /2 width=2 by nap_plus_unwind2_rmap_closed/
48 lemma nap_plus_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (m) (n):
50 (⫯▶[f]p)@§❨m❩+♭q = ▶[f](p●𝗟◗q)@§❨m+n❩.
52 /2 width=2 by nap_plus_unwind2_rmap_closed/
55 lemma nap_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
57 ♭q = ▶[f](p●𝗟◗q)@§❨n❩.
60 <(nap_plus_unwind2_rmap_append_closed_Lq_dx … Hn) -Hn
64 lemma tls_succ_plus_unwind2_rmap_push_closed (o) (f) (q) (n):
66 ∀m. ⇂*[m]f ≗ ⇂*[↑(m+n)]▶[⫯f]q.
67 #o #f #q #n #Hn elim Hn -q -n //
69 @(stream_eq_trans … (tls_unwind2_rmap_d_dx …))
70 >nrplus_inj_dx >nrplus_inj_sn >nsucc_unfold //
73 lemma tls_succ_unwind2_rmap_push_closed (o) (f) (q) (n):
77 /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/
80 lemma tls_succ_plus_unwind2_rmap_append_closed_Lq_dx (o) (f) (p) (q) (n):
82 ∀m. ⇂*[m]▶[f]p ≗ ⇂*[↑(m+n)]▶[f](p●𝗟◗q).
84 /2 width=2 by tls_succ_plus_unwind2_rmap_push_closed/
87 lemma tls_succ_unwind2_rmap_closed (f) (q) (n):
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 //