]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/relocation/rtmap_basic.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / relocation / rtmap_basic.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_2/notation/functions/basic_2.ma".
16 include "ground_2/relocation/rtmap_at.ma".
17
18 (* RELOCATION MAP ***********************************************************)
19
20 definition basic: nat → nat → rtmap ≝ λm,n. ⫯*[m] 𝐔❨n❩.
21
22 interpretation "basic relocation (rtmap)"
23    'Basic m n = (basic m n).
24
25 (* Prioerties with application **********************************************)
26
27 lemma at_basic_lt: ∀m,n,i. i < m → @❪i, 𝐁❨m,n❩❫ ≘ i.
28 #m elim m -m [ #n #i #H elim (lt_zero_false … H) ]
29 #m #IH #n * [ /2 width=2 by refl, at_refl/ ]
30 #i #H lapply (lt_S_S_to_lt … H) -H /3 width=7 by refl, at_push/
31 qed.
32
33 lemma at_basic_ge: ∀m,n,i. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ n+i.
34 #m elim m -m //
35 #m #IH #n #j #H
36 elim (le_inv_S1 … H) -H #i #Hmi #H destruct
37 /3 width=7 by refl, at_push/
38 qed.
39
40 (* Inversion lemmas with application ****************************************)
41
42 lemma at_basic_inv_lt: ∀m,n,i,j. i < m → @❪i, 𝐁❨m,n❩❫ ≘ j → i = j.
43 /3 width=4 by at_basic_lt, at_mono/ qed-.
44
45 lemma at_basic_inv_ge: ∀m,n,i,j. m ≤ i → @❪i, 𝐁❨m,n❩❫ ≘ j → n+i = j.
46 /3 width=4 by at_basic_ge, at_mono/ qed-.