diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-11-03 08:24:09 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2009-11-03 08:24:09 +0000 |
commit | 6b024fd58e28bba3f77b2ccd5dff1ece162067ef (patch) | |
tree | 7db797f09b1b19b6a840c984e8db304e9483ef1c /theories/Arith/Compare_dec.v | |
parent | 4f0ad99adb04e7f2888e75f2a10e8c916dde179b (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/Arith/Compare_dec.v')
-rw-r--r-- | theories/Arith/Compare_dec.v | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v index a684d5a10..1dc74af73 100644 --- a/theories/Arith/Compare_dec.v +++ b/theories/Arith/Compare_dec.v @@ -171,7 +171,17 @@ Proof. apply -> nat_compare_lt; auto. Qed. -(** Some projections of the above equivalences, used in OrderedTypeEx. *) +Lemma nat_compare_spec : forall x y, CompSpec eq lt x y (nat_compare x y). +Proof. + intros. + destruct (nat_compare x y) as [ ]_eqn; constructor. + apply nat_compare_eq; auto. + apply <- nat_compare_lt; auto. + apply <- nat_compare_gt; auto. +Qed. + + +(** Some projections of the above equivalences. *) Lemma nat_compare_Lt_lt : forall n m, nat_compare n m = Lt -> n<m. Proof. |