]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/gr_after_nat_uni_tls.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / gr_after_nat_uni_tls.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 "ground/relocation/gr_tls.ma".
16 include "ground/relocation/gr_nat.ma".
17 include "ground/relocation/gr_isi_uni.ma".
18 include "ground/relocation/gr_after_isi.ma".
19
20 (* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************)
21
22 (* Constructions with gr_nat and gr_uni *************************************)
23
24 (*** after_uni_dx *)
25 lemma gr_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
29 [ #l1 #f2 #Hf2 #f #Hf
30   elim (gr_nat_inv_zero_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
31   lapply (gr_after_isi_inv_dx … Hf ?) -Hf
32   /3 width=3 by gr_after_isi_sn, gr_after_eq_repl_back/
33 | #l2 #IH #l1 #f2 #Hf2 #f #Hf
34   elim (gr_nat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
35   [ #g2 #k1 #Hg2 #H1 #H2 destruct
36     elim (gr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H destruct
37     <gr_tls_swap /3 width=5 by gr_after_next/
38   | #g2 #Hg2 #H2 destruct
39     elim (gr_after_inv_next_sn … Hf) -Hf [ |*: // ] #g #Hg #H destruct
40     <gr_tls_swap /3 width=5 by gr_after_next/
41   ]
42 ]
43 qed.
44
45 (*** after_uni_sn *)
46 lemma gr_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
50 [ #l1 #f2 #Hf2 #f #Hf
51   elim (gr_nat_inv_zero_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
52   lapply (gr_after_isi_inv_sn … Hf ?) -Hf
53   /3 width=3 by gr_after_isi_dx, gr_after_eq_repl_back/
54 | #l2 #IH #l1 #f2 #Hf2 #f #Hf
55   elim (gr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct
56   elim (gr_nat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
57   [ #g2 #k1 #Hg2 #H1 #H2 destruct /3 width=7 by gr_after_push/
58   | #g2 #Hg2 #H2 destruct /3 width=5 by gr_after_next/
59   ]
60 ]
61 qed-.