]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/gr_after_pat_uni.ma
cic notation parser
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / gr_after_pat_uni.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_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".
20
21 (* RELATIONAL COMPOSITION FOR GENERIC RELOCATION MAPS ***********************************************************)
22
23 (* Properties with pat and uni *******************************************************)
24
25 (*** after_uni_succ_dx *)
26 lemma gr_after_uni_dx (i2) (i1):
27       ∀f2. @❪i1, f2❫ ≘ i2 →
28       ∀f. f2 ⊚ 𝐮❨i1❩ ≘ f → 𝐮❨i2❩ ⊚ ⫱*[i2] f2 ≘ f.
29 #i2 elim i2 -i2
30 [ #i1 #f2 #Hf2 #f #Hf
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/
43   ]
44 ]
45 qed.
46
47 (*** after_uni_succ_sn *)
48 lemma gr_after_uni_sn (i2) (i1):
49       ∀f2. @❪i1, f2❫ ≘ i2 →
50       ∀f. 𝐮❨i2❩ ⊚ ⫱*[i2] f2 ≘ f → f2 ⊚ 𝐮❨i1❩ ≘ f.
51 #i2 elim i2 -i2
52 [ #i1 #f2 #Hf2 #f #Hf
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/
62   ]
63 ]
64 qed-.
65
66 (* Advanced properties with uni *)
67
68 (*** after_uni_one_dx *)
69 lemma gr_after_uni_one_dx:
70       ∀f2,f. ⫯f2 ⊚ 𝐮❨𝟏❩ ≘ f → 𝐮❨𝟏❩ ⊚ f2 ≘ f.
71 #f2 #f #H
72 @(gr_after_uni_dx … (⫯f2))
73 /2 width=3 by gr_pat_refl/
74 qed.
75
76 (*** after_uni_one_sn *)
77 lemma gr_after_uni_one_sn:
78       ∀f1,f. 𝐮❨𝟏❩ ⊚ f1 ≘ f → ⫯f1 ⊚ 𝐮❨𝟏❩ ≘ f.
79 /3 width=3 by gr_after_uni_sn, gr_pat_refl/ qed-.