diff options
author | Stephane Glondu <steph@glondu.net> | 2010-07-21 09:46:51 +0200 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2010-07-21 09:46:51 +0200 |
commit | 5b7eafd0f00a16d78f99a27f5c7d5a0de77dc7e6 (patch) | |
tree | 631ad791a7685edafeb1fb2e8faeedc8379318ae /theories/Init/Peano.v | |
parent | da178a880e3ace820b41d38b191d3785b82991f5 (diff) |
Imported Upstream snapshot 8.3~beta0+13298
Diffstat (limited to 'theories/Init/Peano.v')
-rw-r--r-- | theories/Init/Peano.v | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/theories/Init/Peano.v b/theories/Init/Peano.v index 43b1f634..12a8f7a4 100644 --- a/theories/Init/Peano.v +++ b/theories/Init/Peano.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Peano.v 11735 2009-01-02 17:22:31Z herbelin $ i*) +(*i $Id$ i*) (** The type [nat] of Peano natural numbers (built from [O] and [S]) is defined in [Datatypes.v] *) @@ -77,8 +77,7 @@ Definition IsSucc (n:nat) : Prop := Theorem O_S : forall n:nat, 0 <> S n. Proof. - unfold not; intros n H. - inversion H. + discriminate. Qed. Hint Resolve O_S: core. @@ -90,7 +89,7 @@ Hint Resolve n_Sn: core. (** Addition *) -Fixpoint plus (n m:nat) {struct n} : nat := +Fixpoint plus (n m:nat) : nat := match n with | O => m | S p => S (p + m) @@ -130,7 +129,7 @@ Notation plus_succ_r_reverse := plus_n_Sm (only parsing). (** Multiplication *) -Fixpoint mult (n m:nat) {struct n} : nat := +Fixpoint mult (n m:nat) : nat := match n with | O => 0 | S p => m + p * m @@ -161,7 +160,7 @@ Notation mult_succ_r_reverse := mult_n_Sm (only parsing). (** Truncated subtraction: [m-n] is [0] if [n>=m] *) -Fixpoint minus (n m:nat) {struct n} : nat := +Fixpoint minus (n m:nat) : nat := match n, m with | O, _ => n | S k, O => n |