]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/arith/nat_pred_succ.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / arith / nat_pred_succ.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_succ.ma".
16 include "ground/arith/nat_pred.ma".
17
18 (* PREDECESSOR FOR NON-NEGATIVE INTEGERS ************************************)
19
20 (* Constructions with npsucc ************************************************)
21
22 lemma pnpred_succ (n): n = pnpred (npsucc n).
23 * //
24 qed.
25
26 lemma npsucc_pred (p): p = npsucc (pnpred p).
27 * //
28 qed.
29
30 (* Constructions with nsucc and psucc ***************************************)
31
32 lemma pnpred_psucc (p): pnpred (psucc p) = nsucc (pnpred p).
33 * // qed.
34
35 (* Constructions with nsucc *************************************************)
36
37 lemma nsucc_pnpred (p):
38       ninj p = ↑(pnpred p).
39 // qed.
40
41 (*** pred_Sn pred_S *)
42 lemma npred_succ (n): n = ↓↑n.
43 * //
44 qed.
45
46 (* Basic inversions *********************************************************)
47
48 lemma eq_inv_pnpred_bi:
49       injective … pnpred.
50 #p1 #p2 #Hp
51 >(npsucc_pred p1) >(npsucc_pred p2)
52 <Hp -Hp @refl
53 qed-.
54
55 (* Inversions with nsucc ****************************************************)
56
57 (*** nat_split *)
58 lemma nat_split_zero_pos (n): ∨∨ 𝟎 = n | n = ↑↓n.
59 #n @(nat_ind_succ … n) -n
60 /2 width=1 by or_introl, or_intror/
61 qed-.