From 1826065d7603d0993b78829856a5725f253c782d Mon Sep 17 00:00:00 2001 From: letouzey Date: Fri, 12 Feb 2010 16:03:55 +0000 Subject: CompSpecType, a clone of CompSpec but in Type instead of Prop In interfaces fields like compare_spec, a CompSpec is prefered to get nice extraction, but then no "destruct (compare_spec .. ..)" is possible in a Type context. Now you can say there "destruct (CompSpec2Type (compare_spec ... ...))" This translate to the Type variant, and make the analysis on it (which is equivalent to analysing the comparison directly). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12753 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Structures/OrdersAlt.v | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'theories/Structures/OrdersAlt.v') diff --git a/theories/Structures/OrdersAlt.v b/theories/Structures/OrdersAlt.v index 261e75e1c..d86b02a15 100644 --- a/theories/Structures/OrdersAlt.v +++ b/theories/Structures/OrdersAlt.v @@ -101,9 +101,8 @@ Module Backport_OT (O:OrderedType) <: OrderedTypeOrig. Definition compare : forall x y, Compare lt eq x y. Proof. - intros. assert (H:=O.compare_spec x y). - destruct (O.compare x y); [apply EQ|apply LT|apply GT]; - inversion H; auto. + intros x y; destruct (CompSpec2Type (O.compare_spec x y)); + [apply EQ|apply LT|apply GT]; auto. Defined. End Backport_OT. -- cgit v1.2.3