diff options
author | 2010-02-12 16:03:55 +0000 | |
---|---|---|
committer | 2010-02-12 16:03:55 +0000 | |
commit | 1826065d7603d0993b78829856a5725f253c782d (patch) | |
tree | 67f82826fee80d3124f8a2e670f3c75310d77ff6 /theories/MSets | |
parent | 08528250663d850bc56c48dfaab9f5d71e1e7dee (diff) |
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
Diffstat (limited to 'theories/MSets')
-rw-r--r-- | theories/MSets/MSetInterface.v | 5 | ||||
-rw-r--r-- | theories/MSets/MSetList.v | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/theories/MSets/MSetInterface.v b/theories/MSets/MSetInterface.v index ae26fa7ed..10776a590 100644 --- a/theories/MSets/MSetInterface.v +++ b/theories/MSets/MSetInterface.v @@ -612,10 +612,7 @@ Module Raw2SetsOn (O:OrderedType)(M:RawSets O) <: SetsOn O. Variable x y : elt. Lemma compare_spec : CompSpec eq lt s s' (compare s s'). - Proof. - assert (H:=@M.compare_spec s s' _ _). - unfold compare; destruct M.compare; inversion_clear H; auto. - Qed. + Proof. unfold compare; destruct (@M.compare_spec s s' _ _); auto. Qed. (** Additional specification of [elements] *) Lemma elements_spec2 : sort O.lt (elements s). diff --git a/theories/MSets/MSetList.v b/theories/MSets/MSetList.v index c29742332..d46803d75 100644 --- a/theories/MSets/MSetList.v +++ b/theories/MSets/MSetList.v @@ -805,10 +805,9 @@ Module MakeRaw (X: OrderedType) <: RawSets X. CompSpec eq lt s s' (compare s s'). Proof. intros s s' Hs Hs'. - generalize (compare_spec_aux s s'). - destruct (compare s s'); inversion_clear 1; auto. - apply CompLt. exists s, s'; repeat split; auto using @ok. - apply CompGt. exists s', s; repeat split; auto using @ok. + destruct (compare_spec_aux s s'); constructor; auto. + exists s, s'; repeat split; auto using @ok. + exists s', s; repeat split; auto using @ok. Qed. End MakeRaw. |