aboutsummaryrefslogtreecommitdiff
path: root/contrib/recdef/Recdef.v
diff options
context:
space:
mode:
authorbertot2006-02-09 15:10:56 +0000
committerbertot2006-02-09 15:10:56 +0000
commit8497ada296bee923b8bcb72882ba8d518d1abd63 (patch)
treeed95d03f64d956bae61759f8bb7a4832918301a5 /contrib/recdef/Recdef.v
parentedff7a8da57d1ad7f1c7aeca121c152270b6ab32 (diff)
Minor bugs fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8017 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/recdef/Recdef.v')
-rw-r--r--contrib/recdef/Recdef.v25
1 files changed, 14 insertions, 11 deletions
diff --git a/contrib/recdef/Recdef.v b/contrib/recdef/Recdef.v
index 94315c08e9..2d206220e4 100644
--- a/contrib/recdef/Recdef.v
+++ b/contrib/recdef/Recdef.v
@@ -5,12 +5,8 @@
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-
-Require Import Arith.
-Require Import Compare_dec.
-Require Import Wf_nat.
-
-Declare ML Module "recdef".
+Require Compare_dec.
+Require Wf_nat.
Section Iter.
Variable A : Type.
@@ -24,22 +20,29 @@ Fixpoint iter (n : nat) : (A -> A) -> A -> A :=
End Iter.
Theorem SSplus_lt : forall p p' : nat, p < S (S (p + p')).
-auto with arith.
+ intro p; intro p'; change (S p <= S (S (p + p')));
+ apply le_S; apply Gt.gt_le_S; change (p < S (p + p'));
+ apply Lt.le_lt_n_Sm; apply Plus.le_plus_l.
Qed.
+
Theorem Splus_lt : forall p p' : nat, p' < S (p + p').
-auto with arith.
+ intro p; intro p'; change (S p' <= S (p + p'));
+ apply Gt.gt_le_S; change (p' < S (p + p')); apply Lt.le_lt_n_Sm;
+ apply Plus.le_plus_r.
Qed.
Theorem le_lt_SS : forall x y, x <= y -> x < S (S y).
-auto with arith.
+intro x; intro y; intro H; change (S x <= S (S y));
+ apply le_S; apply Gt.gt_le_S; change (x < S y);
+ apply Lt.le_lt_n_Sm; exact H.
Qed.
Inductive max_type (m n:nat) : Set :=
cmt : forall v, m <= v -> n <= v -> max_type m n.
Definition max : forall m n:nat, max_type m n.
-intros m n; case (le_gt_dec m n).
+intros m n; case (Compare_dec.le_gt_dec m n).
intros h; exists n; [exact h | apply le_n].
-intros h; exists m; [apply le_n | apply lt_le_weak; exact h].
+intros h; exists m; [apply le_n | apply Lt.lt_le_weak; exact h].
Defined.