]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma
5a6c4674b451f1a8029e654d7527874a41a37518
[helm.git] / matita / matita / contribs / lambdadelta / ground / arith / nat_lt_minus.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/arith/nat_le_minus.ma".
16 include "ground/arith/nat_lt_pred.ma".
17
18 (* STRICT ORDER FOR NON-NEGATIVE INTEGERS ***********************************)
19
20 (* Constructions with nminus ************************************************)
21
22 (*** monotonic_lt_minus_l *)
23 lemma nlt_minus_bi_dx (o) (m) (n): o ≤ m → m < n → m - o < n - o.
24 #o #m #n #Hom #Hmn
25 lapply (nle_minus_bi_dx … o Hmn) -Hmn
26 <(nminus_succ_sn … Hom) //
27 qed.
28
29 (*** monotonic_lt_minus_r *)
30 lemma nlt_minus_bi_sn (o) (m) (n):
31       m < o -> m < n → o-n < o-m.
32 #o #m #n #Ho #H
33 lapply (nle_minus_bi_sn … o H) -H #H
34 @(nle_nlt_trans … H) -n
35 @nlt_i >(nminus_succ_sn … Ho) //
36 qed.
37
38 (* Inversions with nminus ***************************************************)
39
40 lemma nlt_inv_minus_bi_dx (o) (m) (n):
41       m - o < n - o → m < n.
42 #o @(nat_ind_succ … o) -o
43 /3 width=1 by nlt_inv_pred_bi/
44 qed-.
45
46 (* Destructions with nminus *************************************************)
47
48 (*** minus_pred_pred *)
49 lemma nminus_pred_bi (m) (n): 𝟎 < m → 𝟎 < n → n - m = ↓n - ↓m.
50 #m #n #Hm #Hn
51 >(nlt_des_gen … Hm) in ⊢ (??%?); -Hm
52 >(nlt_des_gen … Hn) in ⊢ (??%?); -Hn
53 //
54 qed-.
55
56 lemma nlt_des_minus_dx (o) (m) (n): m < n - o → o < n.
57 #o @(nat_ind_succ … o) -o
58 [ #m #n <nminus_zero_dx
59   /2 width=3 by nle_nlt_trans/
60 | #o #IH #m #n <nminus_succ_dx_pred_sn #H
61   /3 width=2 by nlt_inv_pred_dx/
62 ]
63 qed-.