aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/FSets
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-07-24 16:27:55 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-07-24 16:27:55 +0000
commitd0074fd5a21d9c0994694c43773564a4f554d6e1 (patch)
treeaa040e81fddf1fc9a7e36d48b1243c75806e65dd /theories/FSets
parenta666838951f9c53cd85c9d72474aa598ffe02a1e (diff)
OrderedTypeEx.N_as_OT use Nlt, various minor improvements in N/ZArith
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12250 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/FSets')
-rw-r--r--theories/FSets/OrderedTypeEx.v18
1 files changed, 5 insertions, 13 deletions
diff --git a/theories/FSets/OrderedTypeEx.v b/theories/FSets/OrderedTypeEx.v
index 55f3cbf64..e6312a147 100644
--- a/theories/FSets/OrderedTypeEx.v
+++ b/theories/FSets/OrderedTypeEx.v
@@ -160,24 +160,16 @@ Module N_as_OT <: UsualOrderedType.
Definition eq_sym := @sym_eq t.
Definition eq_trans := @trans_eq t.
- Definition lt p q:= Nleb q p = false.
-
- Definition lt_trans := Nltb_trans.
-
- Lemma lt_not_eq : forall x y : t, lt x y -> ~ eq x y.
- Proof.
- intros; intro.
- rewrite H0 in H.
- unfold lt in H.
- rewrite Nleb_refl in H; discriminate.
- Qed.
+ Definition lt:=Nlt.
+ Definition lt_trans := Nlt_trans.
+ Definition lt_not_eq := Nlt_not_eq.
Definition compare : forall x y : t, Compare lt eq x y.
Proof.
intros x y. destruct (x ?= y)%N as [ | | ]_eqn.
apply EQ; apply Ncompare_Eq_eq; assumption.
- apply LT; apply Ncompare_Lt_Nltb; assumption.
- apply GT; apply Ncompare_Gt_Nltb; assumption.
+ apply LT; assumption.
+ apply GT. apply Ngt_Nlt; assumption.
Defined.
Definition eq_dec : forall x y, { eq x y } + { ~ eq x y }.