aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith/Zorder.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-11-03 08:24:09 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2009-11-03 08:24:09 +0000
commit6b024fd58e28bba3f77b2ccd5dff1ece162067ef (patch)
tree7db797f09b1b19b6a840c984e8db304e9483ef1c /theories/ZArith/Zorder.v
parent4f0ad99adb04e7f2888e75f2a10e8c916dde179b (diff)
Better visibility of the inductive CompSpec used to specify comparison functions
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12462 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/ZArith/Zorder.v')
-rw-r--r--theories/ZArith/Zorder.v7
1 files changed, 7 insertions, 0 deletions
diff --git a/theories/ZArith/Zorder.v b/theories/ZArith/Zorder.v
index 70cbe0f28..0db71e68d 100644
--- a/theories/ZArith/Zorder.v
+++ b/theories/ZArith/Zorder.v
@@ -257,6 +257,13 @@ Proof.
| absurd (n > m); [ apply Zle_not_gt | idtac ]; assumption ].
Qed.
+Lemma Zle_lt_or_eq_iff : forall n m, n <= m <-> n < m \/ n = m.
+Proof.
+ unfold Zle, Zlt. intros.
+ generalize (Zcompare_Eq_iff_eq n m).
+ destruct (n ?= m); intuition; discriminate.
+Qed.
+
(** Dichotomy *)
Lemma Zle_or_lt : forall n m:Z, n <= m \/ m < n.