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/relocation/pr_tls.ma".
16 include "ground/relocation/pr_nat.ma".
17 include "ground/relocation/pr_isi_uni.ma".
18 include "ground/relocation/pr_after_isi.ma".
20 (* RELATIONAL COMPOSITION FOR PARTIAL RELOCATION MAPS ***********************)
22 (* Constructions with pr_nat and pr_uni *************************************)
25 lemma pr_after_nat_uni (l2) (l1):
26 ∀f2. @↑❨l1, f2❩ ≘ l2 →
27 ∀f. f2 ⊚ 𝐮❨l1❩ ≘ f → 𝐮❨l2❩ ⊚ ⫰*[l2] f2 ≘ f.
28 #l2 @(nat_ind_succ … l2) -l2
30 elim (pr_nat_inv_zero_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
31 lapply (pr_after_isi_inv_dx … Hf ?) -Hf
32 /3 width=3 by pr_after_isi_sn, pr_after_eq_repl_back/
33 | #l2 #IH #l1 #f2 #Hf2 #f #Hf
34 elim (pr_nat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
35 [ #g2 #k1 #Hg2 #H1 #H2 destruct
36 elim (pr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H destruct
37 <pr_tls_swap /3 width=5 by pr_after_next/
38 | #g2 #Hg2 #H2 destruct
39 elim (pr_after_inv_next_sn … Hf) -Hf [ |*: // ] #g #Hg #H destruct
40 <pr_tls_swap /3 width=5 by pr_after_next/
46 lemma pr_nat_after_uni_tls (l2) (l1):
47 ∀f2. @↑❨l1, f2❩ ≘ l2 →
48 ∀f. 𝐮❨l2❩ ⊚ ⫰*[l2] f2 ≘ f → f2 ⊚ 𝐮❨l1❩ ≘ f.
49 #l2 @(nat_ind_succ … l2) -l2
51 elim (pr_nat_inv_zero_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
52 lapply (pr_after_isi_inv_sn … Hf ?) -Hf
53 /3 width=3 by pr_after_isi_dx, pr_after_eq_repl_back/
54 | #l2 #IH #l1 #f2 #Hf2 #f #Hf
55 elim (pr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct
56 elim (pr_nat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
57 [ #g2 #k1 #Hg2 #H1 #H2 destruct /3 width=7 by pr_after_push/
58 | #g2 #Hg2 #H2 destruct /3 width=5 by pr_after_next/