aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/MSets/MSetAVL.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-01-12 16:54:08 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-01-12 16:54:08 +0000
commit8bfc7b2ac5a4d6d218071611a5002e513e731451 (patch)
tree424b2ea522c86f5ab2d156821e625812231df751 /theories/MSets/MSetAVL.v
parentb264811fbed75caff5deb2b6eb78a327dc134f68 (diff)
MSets: Class Ok becomes a definition instead of an inductive (thanks Matthieu)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12656 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/MSets/MSetAVL.v')
-rw-r--r--theories/MSets/MSetAVL.v11
1 files changed, 6 insertions, 5 deletions
diff --git a/theories/MSets/MSetAVL.v b/theories/MSets/MSetAVL.v
index f7da8bf27..f79f8d0b2 100644
--- a/theories/MSets/MSetAVL.v
+++ b/theories/MSets/MSetAVL.v
@@ -536,7 +536,7 @@ Inductive bst : tree -> Prop :=
Definition IsOk := bst.
-Class Ok (s:t) : Prop := { ok : bst s }.
+Class Ok (s:t) : Prop := ok : bst s.
Instance bst_Ok s (Hs : bst s) : Ok s := { ok := Hs }.
@@ -576,7 +576,8 @@ Module Import MX := OrderedTypeFacts X.
Local Hint Resolve MX.eq_refl MX.eq_trans MX.lt_trans @ok.
Local Hint Immediate MX.eq_sym.
Local Hint Unfold In lt_tree gt_tree.
-Local Hint Constructors InT bst Ok.
+Local Hint Constructors InT bst.
+Local Hint Unfold Ok.
Tactic Notation "factornode" ident(l) ident(x) ident(r) ident(h)
"as" ident(s) :=
@@ -585,9 +586,9 @@ Tactic Notation "factornode" ident(l) ident(x) ident(r) ident(h)
(** Automatic treatment of [Ok] hypothesis *)
Ltac inv_ok := match goal with
- | H:Ok (Node _ _ _ _) |- _ => apply @ok in H; inversion_clear H; inv_ok
+ | H:Ok (Node _ _ _ _) |- _ => inversion_clear H; inv_ok
| H:Ok Leaf |- _ => clear H; inv_ok
- | H:bst _ |- _ => generalize (Build_Ok H); clear H; intro H; inv_ok
+ | H:bst ?x |- _ => change (Ok x) in H; inv_ok
| _ => idtac
end.
@@ -665,7 +666,7 @@ Proof. intros; apply <- isok_iff; auto. Qed.
Lemma In_1 :
forall s x y, X.eq x y -> InT x s -> InT y s.
Proof.
- induction s; simpl; intuition_in; eauto 3. (** TODO: why 5 is so slow ? *)
+ induction s; simpl; intuition_in; eauto.
Qed.
Local Hint Immediate In_1.