]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/arith/nat_lt_minus.ma
arithmetics for λδ
[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 (* Rewrites with nminus *****************************************************)
21
22 (*** minus_pred_pred *)
23 lemma nminus_pred_bi (m) (n): 𝟎 < m → 𝟎 < n → n - m = ↓n - ↓m.
24 #m #n #Hm #Hn
25 >(nlt_inv_zero_sn … Hm) in ⊢ (??%?); -Hm
26 >(nlt_inv_zero_sn … Hn) in ⊢ (??%?); -Hn
27 //
28 qed-.
29
30 (* Constructions with nminus ************************************************)
31
32 (*** monotonic_lt_minus_l *)
33 lemma nlt_minus_sn_bi (o) (m) (n): o ≤ m → m < n → m - o < n - o.
34 #o #m #n #Hom #Hmn
35 lapply (nle_minus_sn_bi … o Hmn) -Hmn
36 <(nminus_succ_sn … Hom) //
37 qed.
38
39 (* Destructions with nminus *************************************************)
40
41 lemma nlt_fwd_minus_dx (o) (m) (n): m < n - o → o < n.
42 #o elim o -o
43 [ #m #n <nminus_zero_dx
44   /2 width=3 by le_nlt_trans/
45 | #o #IH #m #n <nminus_succ_dx_pred_sn #H
46   /3 width=2 by nlt_inv_pred_dx/
47 ]
48 qed-.