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/one_0.ma".
16 include "ground/notation/functions/uparrow_1.ma".
17 include "ground/lib/relations.ma".
19 (* POSITIVE INTEGERS ********************************************************)
21 inductive pnat: Type[0] ≝
27 "unit (positive integers)"
31 "successor (positive integers)"
32 'UpArrow p = (psucc p).
34 (* Basic inversions *********************************************************)
37 lemma eq_inv_psucc_bi: injective … psucc.
41 (* Basic constructions ******************************************************)
43 lemma eq_pnat_dec (p1,p2:pnat): Decidable (p1 = p2).
44 #p1 elim p1 -p1 [| #p1 #IH ] * [2,4: #p2 ]
45 [1,4: @or_intror #H destruct
46 | elim (IH p2) -IH #H destruct
47 /4 width=1 by eq_inv_psucc_bi, or_intror, or_introl/
48 | /2 width=1 by or_introl/