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/lib/stream_tls.ma".
16 include "ground/relocation/tr_pap.ma".
18 (* COMPOSITION FOR PARTIAL RELOCATION MAPS **********************************)
20 corec definition tr_compose: tr_map → tr_map → tr_map.
22 @(stream_cons … (f2@❨p1❩))
23 @(tr_compose ? f1) -tr_compose -f1
28 "composition (total relocation maps)"
29 'compose f2 f1 = (tr_compose f2 f1).
31 (* Basic constructions ******************************************************)
34 lemma tr_compose_unfold (f2) (f1):
35 ∀p1. f2@❨p1❩⨮(⇂*[p1]f2)∘f1 = f2∘(p1⨮f1).
36 #f2 #f1 #p1 <(stream_unfold … (f2∘(p1⨮f1))) //
39 (* Basic inversions *********************************************************)
41 (*** compose_inv_rew *)
42 lemma tr_compose_inv_unfold (f2) (f1):
43 ∀f,p1,p. f2∘(p1⨮f1) = p⨮f →
44 ∧∧ f2@❨p1❩ = p & (⇂*[p1]f2)∘f1 = f.
46 <tr_compose_unfold #H destruct
50 (*** compose_inv_S2 *)
51 lemma tr_compose_inv_succ_dx (f2) (f1):
52 ∀f,p2,p1,p. (p2⨮f2)∘(↑p1⨮f1) = p⨮f →
53 ∧∧ f2@❨p1❩+p2 = p & f2∘(p1⨮f1) = f2@❨p1❩⨮f.
55 <tr_compose_unfold #H destruct
56 >nsucc_inj <stream_tls_swap