]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/gr_nat_basic.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / gr_nat_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/relocation/gr_basic.ma".
16 include "ground/relocation/gr_nat_uni.ma".
17
18 (* NON-NEGATIVE APPLICATION FOR GENERIC RELOCATION MAPS *********************)
19
20 (* Constructions with gr_basic **********************************************)
21
22 lemma gr_nat_basic_lt (m) (n) (l):
23       l < m ā†’ @ā†‘āŖl, š›āØm,nā©ā« ā‰˜ l.
24 #m @(nat_ind_succ ā€¦ m) -m
25 [ #n #i #H elim (nlt_inv_zero_dx ā€¦ H)
26 | #m #IH #n #l @(nat_ind_succ ā€¦ l) -l
27   [ #_ /2 width=2 by refl, gr_pat_refl/
28   | #l #_ #H
29     lapply (nlt_inv_succ_bi ā€¦ H) -H #Hlm
30     /3 width=7 by refl, gr_pat_push/
31   ]
32 ]
33 qed.
34
35 lemma gr_nat_basic_ge (m) (n) (l):
36       m ā‰¤ l ā†’ @ā†‘āŖl, š›āØm,nā©ā« ā‰˜ l+n.
37 #m @(nat_ind_succ ā€¦ m) -m //
38 #m #IH #n #l #H
39 elim (nle_inv_succ_sn ā€¦ H) -H #Hml #H >H -H
40 /3 width=7 by gr_nat_push/
41 qed.
42
43 (* Inversions with gr_basic *************************************************)
44
45 lemma gr_nat_basic_inv_lt (m) (n) (l) (k):
46       l < m ā†’ @ā†‘āŖl, š›āØm,nā©ā« ā‰˜ k ā†’ l = k.
47 /3 width=4 by gr_nat_basic_lt, gr_nat_mono/ qed-.
48
49 lemma gr_nat_basic_inv_ge (m) (n) (l) (k):
50       m ā‰¤ l ā†’ @ā†‘āŖl, š›āØm,nā©ā« ā‰˜ k ā†’ l+n = k.
51 /3 width=4 by gr_nat_basic_ge, gr_nat_mono/ qed-.