]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/arith/nat_le_pred.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / arith / nat_le_pred.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_pred_succ.ma".
16 include "ground/arith/nat_le.ma".
17
18 (* ORDER FOR NON-NEGATIVE INTEGERS ******************************************)
19
20 (* Inversions with npred ****************************************************)
21
22 lemma nle_inv_pred_sn (m) (n): ↓m ≤ n → m ≤ ↑n.
23 #m #n @(nat_ind_succ … m) -m
24 /2 width=1 by nle_succ_bi/
25 qed-.
26
27 (*** le_inv_S1 *)
28 lemma nle_inv_succ_sn (m) (n):
29       ↑m ≤ n → ∧∧ m ≤ ↓n & n = ↑↓n.
30 #m #n * -n
31 [ /2 width=3 by nle_refl, conj/
32 | #n #Hn /3 width=1 by nle_des_succ_sn, conj/
33 ]
34 qed-.
35
36 lemma nle_inv_succ_dx (m) (n):
37       m ≤ ↑n → ∨∨ 𝟎 = m | ∧∧ ↓m ≤ n & m = ↑↓m.
38 #m #n @(nat_ind_succ … m) -m
39 [ /2 width=1 by or_introl/
40 | #m #_ #H0
41   /4 width=1 by nle_inv_succ_bi, or_intror, conj/
42 ]
43 qed-.
44
45 (* Constructions with npred *************************************************)
46
47 lemma nle_succ_pred_dx_refl (m): m ≤ ↑↓m.
48 #m @nle_inv_pred_sn // qed.
49
50 (*** le_pred_n *)
51 lemma nle_pred_sn_refl (m): ↓m ≤ m.
52 #m @(nat_ind_succ … m) -m //
53 qed.
54
55 (*** monotonic_pred *)
56 lemma nle_pred_bi (m) (n): m ≤ n → ↓m ≤ ↓n.
57 #m #n #H elim H -n //
58 /2 width=3 by nle_trans/
59 qed.
60
61 lemma nle_pred_sn (m) (n): m ≤ ↑n → ↓m ≤ n.
62 #m #n @(nat_ind_succ … m) -m //
63 /2 width=1 by nle_pred_bi/
64 qed.