]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground_2/ynat/ynat_pred.ma
ground_2 milestone: multiple relocation with lists of booleans
[helm.git] / matita / matita / contribs / lambdadelta / ground_2 / 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_2/notation/functions/predecessor_1.ma".
16 include "ground_2/lib/arith.ma".
17 include "ground_2/ynat/ynat.ma".
18
19 (* NATURAL NUMBERS WITH INFINITY ********************************************)
20
21 (* the predecessor function *)
22 definition ypred: ynat → ynat ≝ λm. match m with
23 [ yinj m ⇒ ⫰m
24 | Y      ⇒ Y
25 ].
26
27 interpretation "ynat predecessor" 'Predecessor m = (ypred m).
28
29 lemma ypred_O: ⫰(yinj 0) = yinj 0.
30 // qed.
31
32 lemma ypred_S: ∀m:nat. ⫰(⫯m) = yinj m.
33 // qed.
34
35 lemma ypred_Y: (⫰∞) = ∞.
36 // qed.
37
38 (* Inversion lemmas *********************************************************)
39
40 lemma ypred_inv_refl: ∀m:ynat. ⫰m = m → m = 0 ∨ m = ∞.
41 * // #m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
42 /4 width=1 by pred_inv_refl, or_introl, eq_f/
43 qed-.