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/gr_tls.ma".
16 include "ground/relocation/gr_pat.ma".
17 (* * it should not depend on gr_isi *)
18 include "ground/relocation/gr_isi_uni.ma".
19 include "ground/relocation/gr_after_isi.ma".
21 (* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************)
23 (* Constructions with gr_pat and gr_uni and gr_tls **************************)
25 (*** after_uni_succ_dx *)
26 lemma gr_after_pat_uni (i2) (i1):
28 ∀f. f2 ⊚ 𝐮❨i1❩ ≘ f → 𝐮❨i2❩ ⊚ ⫱*[i2] f2 ≘ f.
31 elim (gr_pat_inv_unit_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
32 elim (gr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H
33 lapply (gr_after_isi_inv_dx … Hg ?) -Hg
34 /4 width=5 by gr_after_isi_sn, gr_after_eq_repl_back, gr_after_next/
35 | #i2 #IH #i1 #f2 #Hf2 #f #Hf >nsucc_inj
36 elim (gr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
37 [ #g2 #j1 #Hg2 #H1 #H2 destruct >nsucc_inj in Hf; #Hf
38 elim (gr_after_inv_push_next … Hf) -Hf [ |*: // ] #g #Hg #H destruct
39 <gr_tls_swap /3 width=5 by gr_after_next/
40 | #g2 #Hg2 #H2 destruct
41 elim (gr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct
42 <gr_tls_swap /3 width=5 by gr_after_next/
47 (*** after_uni_succ_sn *)
48 lemma gr_pat_after_uni_tls (i2) (i1):
50 ∀f. 𝐮❨i2❩ ⊚ ⫱*[i2] f2 ≘ f → f2 ⊚ 𝐮❨i1❩ ≘ f.
53 elim (gr_pat_inv_unit_dx … Hf2) -Hf2 // #g2 #H1 #H2 destruct
54 elim (gr_after_inv_next_sn … Hf) -Hf [ |*: // ] #g #Hg #H destruct
55 lapply (gr_after_isi_inv_sn … Hg ?) -Hg
56 /4 width=7 by gr_after_isi_dx, gr_after_eq_repl_back, gr_after_push/
57 | #i2 #IH #i1 #f2 #Hf2 #f >nsucc_inj #Hf
58 elim (gr_after_inv_next_sn … Hf) -Hf [2,3: // ] #g #Hg #H destruct
59 elim (gr_pat_inv_succ_dx … Hf2) -Hf2 [1,3: * |*: // ]
60 [ #g2 #j1 #Hg2 #H1 #H2 destruct <gr_tls_swap in Hg; /3 width=7 by gr_after_push/
61 | #g2 #Hg2 #H2 destruct <gr_tls_swap in Hg; /3 width=5 by gr_after_next/
66 (* Advanced constructions with gr_uni ***************************************)
68 (*** after_uni_one_dx *)
69 lemma gr_after_push_unit:
70 ∀f2,f. ⫯f2 ⊚ 𝐮❨𝟏❩ ≘ f → 𝐮❨𝟏❩ ⊚ f2 ≘ f.
72 @(gr_after_pat_uni … (⫯f2))
73 /2 width=3 by gr_pat_refl/
76 (*** after_uni_one_sn *)
77 lemma gr_after_unit_sn:
78 ∀f1,f. 𝐮❨𝟏❩ ⊚ f1 ≘ f → ⫯f1 ⊚ 𝐮❨𝟏❩ ≘ f.
79 /3 width=3 by gr_pat_after_uni_tls, gr_pat_refl/ qed-.