]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/ynat/ynat_pred.ma
arithmetics for λδ
[helm.git] / matita / matita / contribs / lambdadelta / ground / ynat / ynat_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/ynat/ynat.ma".
16
17 (* NATURAL NUMBERS WITH INFINITY ********************************************)
18
19 (* the predecessor function *)
20 definition ypred: ynat → ynat ≝ λm. match m with
21 [ yinj m ⇒ ↓m
22 | Y      ⇒ Y
23 ].
24
25 interpretation "ynat predecessor" 'DownArrow m = (ypred m).
26
27 lemma ypred_O: ↓(yinj 0) = yinj 0.
28 // qed.
29
30 lemma ypred_S: ∀m:nat. ↓(↑m) = yinj m.
31 // qed.
32
33 lemma ypred_Y: (↓∞) = ∞.
34 // qed.
35
36 (* Inversion lemmas *********************************************************)
37
38 lemma ypred_inv_refl: ∀m:ynat. ↓m = m → m = 0 ∨ m = ∞.
39 * // #m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
40 /4 width=1 by pred_inv_fix_sn, or_introl, eq_f/
41 qed-.