]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_at.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / relocation / rtmap_at.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.tcs.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_2/notation/relations/rat_3.ma".
16 include "ground_2/relocation/rtmap_uni.ma".
17
18 (* RELOCATION MAP ***********************************************************)
19
20 coinductive at: rtmap → relation nat ≝
21 | at_refl: ∀f,g,j1,j2. ⫯f = g → 0 = j1 → 0 = j2 → at g j1 j2
22 | at_push: ∀f,i1,i2. at f i1 i2 → ∀g,j1,j2. ⫯f = g → ↑i1 = j1 → ↑i2 = j2 → at g j1 j2
23 | at_next: ∀f,i1,i2. at f i1 i2 → ∀g,j2. ↑f = g → ↑i2 = j2 → at g i1 j2
24 .
25
26 interpretation "relational application (rtmap)"
27    'RAt i1 f i2 = (at f i1 i2).
28
29 definition H_at_div: relation4 rtmap rtmap rtmap rtmap ≝ λf2,g2,f1,g1.
30                      ∀jf,jg,j. @❪jf,f2❫ ≘ j → @❪jg,g2❫ ≘ j →
31                      ∃∃j0. @❪j0,f1❫ ≘ jf & @❪j0,g1❫ ≘ jg.
32
33 (* Basic inversion lemmas ***************************************************)
34
35 lemma at_inv_ppx: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g. 0 = i1 → ⫯g = f → 0 = i2.
36 #f #i1 #i2 * -f -i1 -i2 //
37 [ #f #i1 #i2 #_ #g #j1 #j2 #_ * #_ #x #H destruct
38 | #f #i1 #i2 #_ #g #j2 * #_ #x #_ #H elim (discr_push_next … H)
39 ]
40 qed-.
41
42 lemma at_inv_npx: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g,j1. ↑j1 = i1 → ⫯g = f →
43                   ∃∃j2. @❪j1,g❫ ≘ j2 & ↑j2 = i2.
44 #f #i1 #i2 * -f -i1 -i2
45 [ #f #g #j1 #j2 #_ * #_ #x #x1 #H destruct
46 | #f #i1 #i2 #Hi #g #j1 #j2 * * * #x #x1 #H #Hf >(injective_push … Hf) -g destruct /2 width=3 by ex2_intro/
47 | #f #i1 #i2 #_ #g #j2 * #_ #x #x1 #_ #H elim (discr_push_next … H)
48 ]
49 qed-.
50
51 lemma at_inv_xnx: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g. ↑g = f →
52                   ∃∃j2. @❪i1,g❫ ≘ j2 & ↑j2 = i2.
53 #f #i1 #i2 * -f -i1 -i2
54 [ #f #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
55 | #f #i1 #i2 #_ #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
56 | #f #i1 #i2 #Hi #g #j2 * * #x #H >(injective_next … H) -g /2 width=3 by ex2_intro/
57 ]
58 qed-.
59
60 (* Advanced inversion lemmas ************************************************)
61
62 lemma at_inv_ppn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
63                   ∀g,j2. 0 = i1 → ⫯g = f → ↑j2 = i2 → ⊥.
64 #f #i1 #i2 #Hf #g #j2 #H1 #H <(at_inv_ppx … Hf … H1 H) -f -g -i1 -i2
65 #H destruct
66 qed-.
67
68 lemma at_inv_npp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
69                   ∀g,j1. ↑j1 = i1 → ⫯g = f → 0 = i2 → ⊥.
70 #f #i1 #i2 #Hf #g #j1 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
71 #x2 #Hg * -i2 #H destruct
72 qed-.
73
74 lemma at_inv_npn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
75                   ∀g,j1,j2. ↑j1 = i1 → ⫯g = f → ↑j2 = i2 → @❪j1,g❫ ≘ j2.
76 #f #i1 #i2 #Hf #g #j1 #j2 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
77 #x2 #Hg * -i2 #H destruct //
78 qed-.
79
80 lemma at_inv_xnp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
81                   ∀g. ↑g = f → 0 = i2 → ⊥.
82 #f #i1 #i2 #Hf #g #H elim (at_inv_xnx … Hf … H) -f
83 #x2 #Hg * -i2 #H destruct
84 qed-.
85
86 lemma at_inv_xnn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
87                   ∀g,j2. ↑g = f → ↑j2 = i2 → @❪i1,g❫ ≘ j2.
88 #f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xnx … Hf … H) -f
89 #x2 #Hg * -i2 #H destruct //
90 qed-.
91
92 lemma at_inv_pxp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → 0 = i1 → 0 = i2 → ∃g. ⫯g = f.
93 #f elim (pn_split … f) * /2 width=2 by ex_intro/
94 #g #H #i1 #i2 #Hf #H1 #H2 cases (at_inv_xnp … Hf … H H2)
95 qed-.
96
97 lemma at_inv_pxn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀j2. 0 = i1 → ↑j2 = i2 →
98                   ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f.
99 #f elim (pn_split … f) *
100 #g #H #i1 #i2 #Hf #j2 #H1 #H2
101 [ elim (at_inv_ppn … Hf … H1 H H2)
102 | /3 width=5 by at_inv_xnn, ex2_intro/
103 ]
104 qed-.
105
106 lemma at_inv_nxp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 →
107                   ∀j1. ↑j1 = i1 → 0 = i2 → ⊥.
108 #f elim (pn_split f) *
109 #g #H #i1 #i2 #Hf #j1 #H1 #H2
110 [ elim (at_inv_npp … Hf … H1 H H2)
111 | elim (at_inv_xnp … Hf … H H2)
112 ]
113 qed-.
114
115 lemma at_inv_nxn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀j1,j2. ↑j1 = i1 → ↑j2 = i2 →
116                   (∃∃g. @❪j1,g❫ ≘ j2 & ⫯g = f) ∨
117                   ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f.
118 #f elim (pn_split f) *
119 /4 width=7 by at_inv_xnn, at_inv_npn, ex2_intro, or_intror, or_introl/
120 qed-.
121
122 (* Note: the following inversion lemmas must be checked *)
123 lemma at_inv_xpx: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f →
124                   (0 = i1 ∧ 0 = i2) ∨
125                   ∃∃j1,j2. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ↑j2 = i2.
126 #f * [2: #i1 ] #i2 #Hf #g #H
127 [ elim (at_inv_npx … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/
128 | >(at_inv_ppx … Hf … H) -f /3 width=1 by conj, or_introl/
129 ]
130 qed-.
131
132 lemma at_inv_xpp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g. ⫯g = f → 0 = i2 → 0 = i1.
133 #f #i1 #i2 #Hf #g #H elim (at_inv_xpx … Hf … H) -f * //
134 #j1 #j2 #_ #_ * -i2 #H destruct
135 qed-.
136
137 lemma at_inv_xpn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀g,j2. ⫯g = f → ↑j2 = i2 →
138                   ∃∃j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1.
139 #f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xpx … Hf … H) -f *
140 [ #_ * -i2 #H destruct
141 | #x1 #x2 #Hg #H1 * -i2 #H destruct /2 width=3 by ex2_intro/
142 ]
143 qed-.
144
145 lemma at_inv_xxp: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → 0 = i2 →
146                   ∃∃g. 0 = i1 & ⫯g = f.
147 #f elim (pn_split f) *
148 #g #H #i1 #i2 #Hf #H2
149 [ /3 width=6 by at_inv_xpp, ex2_intro/
150 | elim (at_inv_xnp … Hf … H H2)
151 ]
152 qed-.
153
154 lemma at_inv_xxn: ∀f,i1,i2. @❪i1,f❫ ≘ i2 → ∀j2.  ↑j2 = i2 →
155                   (∃∃g,j1. @❪j1,g❫ ≘ j2 & ↑j1 = i1 & ⫯g = f) ∨
156                   ∃∃g. @❪i1,g❫ ≘ j2 & ↑g = f.
157 #f elim (pn_split f) *
158 #g #H #i1 #i2 #Hf #j2 #H2
159 [ elim (at_inv_xpn … Hf … H H2) -i2 /3 width=5 by or_introl, ex3_2_intro/
160 | lapply (at_inv_xnn … Hf … H H2) -i2 /3 width=3 by or_intror, ex2_intro/
161 ]
162 qed-.
163
164 (* Basic forward lemmas *****************************************************)
165
166 lemma at_increasing: ∀i2,i1,f. @❪i1,f❫ ≘ i2 → i1 ≤ i2.
167 #i2 elim i2 -i2
168 [ #i1 #f #Hf elim (at_inv_xxp … Hf) -Hf //
169 | #i2 #IH * //
170   #i1 #f #Hf elim (at_inv_nxn … Hf) -Hf [1,4: * |*: // ]
171   /3 width=2 by le_S_S, le_S/
172 ]
173 qed-.
174
175 lemma at_increasing_strict: ∀g,i1,i2. @❪i1,g❫ ≘ i2 → ∀f. ↑f = g →
176                             i1 < i2 ∧ @❪i1,f❫ ≘ ↓i2.
177 #g #i1 #i2 #Hg #f #H elim (at_inv_xnx … Hg … H) -Hg -H
178 /4 width=2 by conj, at_increasing, le_S_S/
179 qed-.
180
181 lemma at_fwd_id_ex: ∀f,i. @❪i,f❫ ≘ i → ∃g. ⫯g = f.
182 #f elim (pn_split f) * /2 width=2 by ex_intro/
183 #g #H #i #Hf elim (at_inv_xnx … Hf … H) -Hf -H
184 #j2 #Hg #H destruct lapply (at_increasing … Hg) -Hg
185 #H elim (lt_le_false … H) -H //
186 qed-.
187
188 (* Basic properties *********************************************************)
189
190 corec lemma at_eq_repl_back: ∀i1,i2. eq_repl_back (λf. @❪i1,f❫ ≘ i2).
191 #i1 #i2 #f1 #H1 cases H1 -f1 -i1 -i2
192 [ #f1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 cases (eq_inv_px … H12 … H) -g1 /2 width=2 by at_refl/
193 | #f1 #i1 #i2 #Hf1 #g1 #j1 #j2 #H #H1 #H2 #f2 #H12 cases (eq_inv_px … H12 … H) -g1 /3 width=7 by at_push/
194 | #f1 #i1 #i2 #Hf1 #g1 #j2 #H #H2 #f2 #H12 cases (eq_inv_nx … H12 … H) -g1 /3 width=5 by at_next/
195 ]
196 qed-.
197
198 lemma at_eq_repl_fwd: ∀i1,i2. eq_repl_fwd (λf. @❪i1,f❫ ≘ i2).
199 #i1 #i2 @eq_repl_sym /2 width=3 by at_eq_repl_back/
200 qed-.
201
202 lemma at_le_ex: ∀j2,i2,f. @❪i2,f❫ ≘ j2 → ∀i1. i1 ≤ i2 →
203                 ∃∃j1. @❪i1,f❫ ≘ j1 & j1 ≤ j2.
204 #j2 elim j2 -j2 [2: #j2 #IH ] #i2 #f #Hf
205 [ elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
206   #g [ #x2 ] #Hg [ #H2 ] #H0
207   [ * /3 width=3 by at_refl, ex2_intro/
208     #i1 #Hi12 destruct lapply (le_S_S_to_le … Hi12) -Hi12
209     #Hi12 elim (IH … Hg … Hi12) -x2 -IH
210     /3 width=7 by at_push, ex2_intro, le_S_S/
211   | #i1 #Hi12 elim (IH … Hg … Hi12) -IH -i2
212     /3 width=5 by at_next, ex2_intro, le_S_S/
213   ]
214 | elim (at_inv_xxp … Hf) -Hf //
215   #g * -i2 #H2 #i1 #Hi12 <(le_n_O_to_eq … Hi12)
216   /3 width=3 by at_refl, ex2_intro/
217 ]
218 qed-.
219
220 lemma at_id_le: ∀i1,i2. i1 ≤ i2 → ∀f. @❪i2,f❫ ≘ i2 → @❪i1,f❫ ≘ i1.
221 #i1 #i2 #H @(le_elim … H) -i1 -i2 [ #i2 | #i1 #i2 #IH ]
222 #f #Hf elim (at_fwd_id_ex … Hf) /4 width=7 by at_inv_npn, at_push, at_refl/
223 qed-.
224
225 (* Main properties **********************************************************)
226
227 theorem at_monotonic: ∀j2,i2,f. @❪i2,f❫ ≘ j2 → ∀j1,i1. @❪i1,f❫ ≘ j1 →
228                       i1 < i2 → j1 < j2.
229 #j2 elim j2 -j2
230 [ #i2 #f #H2f elim (at_inv_xxp … H2f) -H2f //
231   #g #H21 #_ #j1 #i1 #_ #Hi elim (lt_le_false … Hi) -Hi //
232 | #j2 #IH #i2 #f #H2f * //
233   #j1 #i1 #H1f #Hi elim (lt_inv_gen … Hi)
234   #x2 #_ #H21 elim (at_inv_nxn … H2f … H21) -H2f [1,3: * |*: // ]
235   #g #H2g #H
236   [ elim (at_inv_xpn … H1f … H) -f
237     /4 width=8 by lt_S_S_to_lt, lt_S_S/
238   | /4 width=8 by at_inv_xnn, lt_S_S/
239   ]
240 ]
241 qed-.
242
243 theorem at_inv_monotonic: ∀j1,i1,f. @❪i1,f❫ ≘ j1 → ∀j2,i2. @❪i2,f❫ ≘ j2 →
244                           j1 < j2 → i1 < i2.
245 #j1 elim j1 -j1
246 [ #i1 #f #H1f elim (at_inv_xxp … H1f) -H1f //
247   #g * -i1 #H #j2 #i2 #H2f #Hj elim (lt_inv_O1 … Hj) -Hj
248   #x2 #H22 elim (at_inv_xpn … H2f … H H22) -f //
249 | #j1 #IH *
250   [ #f #H1f elim (at_inv_pxn … H1f) -H1f [ |*: // ]
251     #g #H1g #H #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
252     /3 width=7 by at_inv_xnn/
253   | #i1 #f #H1f #j2 #i2 #H2f #Hj elim (lt_inv_S1 … Hj) -Hj
254     #y2 #Hj #H22 elim (at_inv_nxn … H1f) -H1f [1,4: * |*: // ]
255     #g #Hg #H
256     [ elim (at_inv_xpn … H2f … H H22) -f -H22
257       /3 width=7 by lt_S_S/
258     | /3 width=7 by at_inv_xnn/
259     ]
260   ]
261 ]
262 qed-.
263
264 theorem at_mono: ∀f,i,i1. @❪i,f❫ ≘ i1 → ∀i2. @❪i,f❫ ≘ i2 → i2 = i1.
265 #f #i #i1 #H1 #i2 #H2 elim (lt_or_eq_or_gt i2 i1) //
266 #Hi elim (lt_le_false i i) /3 width=6 by at_inv_monotonic, eq_sym/
267 qed-.
268
269 theorem at_inj: ∀f,i1,i. @❪i1,f❫ ≘ i → ∀i2. @❪i2,f❫ ≘ i → i1 = i2.
270 #f #i1 #i #H1 #i2 #H2 elim (lt_or_eq_or_gt i2 i1) //
271 #Hi elim (lt_le_false i i) /3 width=6 by at_monotonic, eq_sym/
272 qed-.
273
274 theorem at_div_comm: ∀f2,g2,f1,g1.
275                      H_at_div f2 g2 f1 g1 → H_at_div g2 f2 g1 f1.
276 #f2 #g2 #f1 #g1 #IH #jg #jf #j #Hg #Hf
277 elim (IH … Hf Hg) -IH -j /2 width=3 by ex2_intro/
278 qed-.
279
280 theorem at_div_pp: ∀f2,g2,f1,g1.
281                    H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (⫯g2) (⫯f1) (⫯g1).
282 #f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
283 elim (at_inv_xpx … Hf) -Hf [1,2: * |*: // ]
284 [ #H1 #H2 destruct -IH
285   lapply (at_inv_xpp … Hg ???) -Hg [4: |*: // ] #H destruct
286   /3 width=3 by at_refl, ex2_intro/
287 | #xf #i #Hf2 #H1 #H2 destruct
288   lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
289   elim (IH … Hf2 Hg2) -IH -i /3 width=9 by at_push, ex2_intro/
290 ]
291 qed-.
292
293 theorem at_div_nn: ∀f2,g2,f1,g1.
294                    H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (↑g2) (f1) (g1).
295 #f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
296 elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
297 lapply (at_inv_xnn … Hg ????) -Hg [5: |*: // ] #Hg2
298 elim (IH … Hf2 Hg2) -IH -i /2 width=3 by ex2_intro/
299 qed-.
300
301 theorem at_div_np: ∀f2,g2,f1,g1.
302                    H_at_div f2 g2 f1 g1 → H_at_div (↑f2) (⫯g2) (f1) (↑g1).
303 #f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
304 elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
305 lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
306 elim (IH … Hf2 Hg2) -IH -i /3 width=7 by at_next, ex2_intro/
307 qed-.
308
309 theorem at_div_pn: ∀f2,g2,f1,g1.
310                    H_at_div f2 g2 f1 g1 → H_at_div (⫯f2) (↑g2) (↑f1) (g1).
311 /4 width=6 by at_div_np, at_div_comm/ qed-.
312
313 (* Properties on tls ********************************************************)
314
315 lemma at_pxx_tls: ∀n,f. @❪0,f❫ ≘ n → @❪0,⫱*[n]f❫ ≘ 0.
316 #n elim n -n //
317 #n #IH #f #Hf
318 cases (at_inv_pxn … Hf) -Hf [ |*: // ] #g #Hg #H0 destruct
319 <tls_xn /2 width=1 by/
320 qed.
321
322 lemma at_tls: ∀i2,f. ⫯⫱*[↑i2]f ≡ ⫱*[i2]f → ∃i1. @❪i1,f❫ ≘ i2.
323 #i2 elim i2 -i2
324 [ /4 width=4 by at_eq_repl_back, at_refl, ex_intro/
325 | #i2 #IH #f <tls_xn <tls_xn in ⊢ (??%→?); #H
326   elim (IH … H) -IH -H #i1 #Hf
327   elim (pn_split f) * #g #Hg destruct /3 width=8 by at_push, at_next, ex_intro/
328 ]
329 qed-.
330
331 (* Inversion lemmas with tls ************************************************)
332
333 lemma at_inv_nxx: ∀n,g,i1,j2. @❪↑i1,g❫ ≘ j2 → @❪0,g❫ ≘ n →
334                   ∃∃i2. @❪i1,⫱*[↑n]g❫ ≘ i2 & ↑(n+i2) = j2.
335 #n elim n -n
336 [ #g #i1 #j2 #Hg #H
337   elim (at_inv_pxp … H) -H [ |*: // ] #f #H0
338   elim (at_inv_npx … Hg … H0) -Hg [ |*: // ] #x2 #Hf #H2 destruct
339   /2 width=3 by ex2_intro/
340 | #n #IH #g #i1 #j2 #Hg #H
341   elim (at_inv_pxn … H) -H [ |*: // ] #f #Hf2 #H0
342   elim (at_inv_xnx … Hg … H0) -Hg #x2 #Hf1 #H2 destruct
343   elim (IH … Hf1 Hf2) -IH -Hf1 -Hf2 #i2 #Hf #H2 destruct
344   /2 width=3 by ex2_intro/
345 ]
346 qed-.
347
348 lemma at_inv_tls: ∀i2,i1,f. @❪i1,f❫ ≘ i2 → ⫯⫱*[↑i2]f ≡ ⫱*[i2]f.
349 #i2 elim i2 -i2
350 [ #i1 #f #Hf elim (at_inv_xxp … Hf) -Hf // #g #H1 #H destruct
351   /2 width=1 by eq_refl/
352 | #i2 #IH #i1 #f #Hf
353   elim (at_inv_xxn … Hf) -Hf [1,3: * |*: // ]
354   [ #g #j1 #Hg #H1 #H2 | #g #Hg #Ho ] destruct
355   <tls_xn /2 width=2 by/
356 ]
357 qed-.
358
359 (* Advanced inversion lemmas on isid ****************************************)
360
361 lemma isid_inv_at: ∀i,f. 𝐈❪f❫ → @❪i,f❫ ≘ i.
362 #i elim i -i
363 [ #f #H elim (isid_inv_gen … H) -H /2 width=2 by at_refl/
364 | #i #IH #f #H elim (isid_inv_gen … H) -H /3 width=7 by at_push/
365 ]
366 qed.
367
368 lemma isid_inv_at_mono: ∀f,i1,i2. 𝐈❪f❫ → @❪i1,f❫ ≘ i2 → i1 = i2.
369 /3 width=6 by isid_inv_at, at_mono/ qed-.
370
371 (* Advanced properties on isid **********************************************)
372
373 corec lemma isid_at: ∀f. (∀i. @❪i,f❫ ≘ i) → 𝐈❪f❫.
374 #f #Hf lapply (Hf 0)
375 #H cases (at_fwd_id_ex … H) -H
376 #g #H @(isid_push … H) /3 width=7 by at_inv_npn/
377 qed-.
378
379 (* Advanced properties on id ************************************************)
380
381 lemma id_inv_at: ∀f. (∀i. @❪i,f❫ ≘ i) → 𝐈𝐝 ≡ f.
382 /3 width=1 by isid_at, eq_id_inv_isid/ qed-.
383
384 lemma id_at: ∀i. @❪i,𝐈𝐝❫ ≘ i.
385 /2 width=1 by isid_inv_at/ qed.
386
387 (* Advanced forward lemmas on id ********************************************)
388
389 lemma at_id_fwd: ∀i1,i2. @❪i1,𝐈𝐝❫ ≘ i2 → i1 = i2.
390 /2 width=4 by at_mono/ qed.
391
392 (* Main properties on id ****************************************************)
393
394 theorem at_div_id_dx: ∀f. H_at_div f 𝐈𝐝 𝐈𝐝 f.
395 #f #jf #j0 #j #Hf #H0
396 lapply (at_id_fwd … H0) -H0 #H destruct
397 /2 width=3 by ex2_intro/
398 qed-.
399
400 theorem at_div_id_sn: ∀f. H_at_div 𝐈𝐝 f f 𝐈𝐝.
401 /3 width=6 by at_div_id_dx, at_div_comm/ qed-.
402
403 (* Properties with uniform relocations **************************************)
404
405 lemma at_uni: ∀n,i. @❪i,𝐔❨n❩❫ ≘ n+i.
406 #n elim n -n /2 width=5 by at_next/
407 qed.
408
409 (* Inversion lemmas with uniform relocations ********************************)
410
411 lemma at_inv_uni: ∀n,i,j. @❪i,𝐔❨n❩❫ ≘ j → j = n+i.
412 /2 width=4 by at_mono/ qed-.