aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/MSets/MSetList.v
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-10-26 01:29:33 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-10-26 01:29:33 +0000
commit0919391f43729bf172ab00c8dec9438a0a9f59ab (patch)
tree8afd08a9df68b58711da31a14bd2e8ec23b359ba /theories/MSets/MSetList.v
parent42bb029c878666a7a897ff615acdc60e7f67dd06 (diff)
Change Hint Resolve, Immediate to take a global reference as argument
instead of a general constr: this is the most common case and does not loose generality (one can simply define constrs before Hint Resolving them). Benefits: - Natural semantics for typeclasses, not class resolution needed at Hint Resolve time, meaning less trouble for users as well. - Ability to [Hint Remove] any hint so declared. - Simplifies the implementation as well. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15930 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/MSets/MSetList.v')
-rw-r--r--theories/MSets/MSetList.v15
1 files changed, 5 insertions, 10 deletions
diff --git a/theories/MSets/MSetList.v b/theories/MSets/MSetList.v
index d9b1fd9bb..b0e09b719 100644
--- a/theories/MSets/MSetList.v
+++ b/theories/MSets/MSetList.v
@@ -228,16 +228,14 @@ Module MakeRaw (X: OrderedType) <: RawSets X.
Notation Inf := (lelistA X.lt).
Notation In := (InA X.eq).
- (* TODO: modify proofs in order to avoid these hints *)
- Hint Resolve (@Equivalence_Reflexive _ _ X.eq_equiv).
- Hint Immediate (@Equivalence_Symmetric _ _ X.eq_equiv).
- Hint Resolve (@Equivalence_Transitive _ _ X.eq_equiv).
+ Existing Instance X.eq_equiv.
+ Hint Extern 20 => solve [order].
Definition IsOk s := Sort s.
Class Ok (s:t) : Prop := ok : Sort s.
- Hint Resolve @ok.
+ Hint Resolve ok.
Hint Unfold Ok.
Instance Sort_Ok s `(Hs : Sort s) : Ok s := { ok := Hs }.
@@ -343,7 +341,6 @@ Module MakeRaw (X: OrderedType) <: RawSets X.
induction s; simpl; intros.
intuition. inv; auto.
elim_compare x a; inv; rewrite !InA_cons, ?IHs; intuition.
- left; order.
Qed.
Lemma remove_inf :
@@ -402,8 +399,8 @@ Module MakeRaw (X: OrderedType) <: RawSets X.
Global Instance union_ok s s' : forall `(Ok s, Ok s'), Ok (union s s').
Proof.
repeat rewrite <- isok_iff; revert s s'.
- induction2; constructors; try apply @ok; auto.
- apply Inf_eq with x'; auto; apply union_inf; auto; apply Inf_eq with x; auto.
+ induction2; constructors; try apply @ok; auto.
+ apply Inf_eq with x'; auto; apply union_inf; auto; apply Inf_eq with x; auto; order.
change (Inf x' (union (x :: l) l')); auto.
Qed.
@@ -412,7 +409,6 @@ Module MakeRaw (X: OrderedType) <: RawSets X.
In x (union s s') <-> In x s \/ In x s'.
Proof.
induction2; try rewrite ?InA_cons, ?Hrec, ?Hrec'; intuition; inv; auto.
- left; order.
Qed.
Lemma inter_inf :
@@ -440,7 +436,6 @@ Module MakeRaw (X: OrderedType) <: RawSets X.
Proof.
induction2; try rewrite ?InA_cons, ?Hrec, ?Hrec'; intuition; inv; auto;
try sort_inf_in; try order.
- left; order.
Qed.
Lemma diff_inf :