1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(*i $Id: Peano_dec.v 9698 2007-03-12 17:11:32Z letouzey $ i*)
11
Require Import Decidable.
13
Open Local Scope nat_scope.
15
Implicit Types m n x y : nat.
17
Theorem O_or_S : forall n, {m : nat | S m = n} + {0 = n}.
24
Theorem eq_nat_dec : forall n m, {n = m} + {n <> m}.
26
induction n; destruct m; auto.
30
Hint Resolve O_or_S eq_nat_dec: arith.
32
Theorem dec_eq_nat : forall n m, decidable (n = m).
33
intros x y; unfold decidable in |- *; elim (eq_nat_dec x y); auto with arith.