1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "ground/notation/functions/downarrow_1.ma".
16 include "ground/arith/pnat_split.ma".
17 include "ground/arith/nat.ma".
19 (* PREDECESSOR FOR NON-NEGATIVE INTEGERS ************************************)
21 definition pnpred (p): nat ≝
25 "positive predecessor (non-negative integers)"
26 'DownArrow p = (pnpred p).
29 definition npred (m): nat ≝ match m with
35 "predecessor (non-negative integers)"
36 'DownArrow m = (npred m).
38 (* Basic constructions ******************************************************)
41 lemma npred_zero: 𝟎 = ↓𝟎.
44 lemma npred_inj (p): ↓p = ↓(ninj p).
47 lemma npred_unit: 𝟎 = ↓𝟏.
50 lemma npred_psucc (p): ninj p = ↓↑p.
53 (* Basic inversions *********************************************************)
55 lemma npred_pnat_inv_refl (p): ninj p = ↓p → ⊥.
57 [ <npred_unit #H destruct
58 | #p /3 width=2 by psucc_inv_refl, eq_inv_ninj_bi/
62 (*** pred_inv_fix_sn *)
63 lemma npred_inv_refl (n): n = ↓n → 𝟎 = n.
64 * // #p #H elim (npred_pnat_inv_refl … H)