aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/FSets
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-01-28 05:08:18 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-01-28 05:08:18 +0000
commit47e9afaaa4c08aca97d4f4b5a89cb40da76bd850 (patch)
treea2424086c8b7e1635f7a481109a7fae8fcaad386 /theories/FSets
parent3f6196a6bdc7e5b0e6d8279a7b7b0de74faa3492 (diff)
Tentative to fix bug #2628 by not letting intuition break records. Might be too much of a backwards-incompatible change
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14949 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/FSets')
-rw-r--r--theories/FSets/FMapFacts.v17
-rw-r--r--theories/FSets/FSetEqProperties.v2
2 files changed, 9 insertions, 10 deletions
diff --git a/theories/FSets/FMapFacts.v b/theories/FSets/FMapFacts.v
index 0c1448c9b..db24a417f 100644
--- a/theories/FSets/FMapFacts.v
+++ b/theories/FSets/FMapFacts.v
@@ -18,12 +18,13 @@ Require Export FMapInterface.
Set Implicit Arguments.
Unset Strict Implicit.
-Hint Extern 1 (Equivalence _) => constructor; congruence.
-
(** * Facts about weak maps *)
Module WFacts_fun (E:DecidableType)(Import M:WSfun E).
+Module UEq := Equalities.UpdateEq(E)(E).
+Import UEq.
+
Notation eq_dec := E.eq_dec.
Definition eqb x y := if eq_dec x y then true else false.
@@ -1184,7 +1185,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
Equal m m' -> cardinal m = cardinal m'.
Proof.
intros; do 2 rewrite cardinal_fold.
- apply fold_Equal with (eqA:=eq); compute; auto.
+ apply fold_Equal with (eqA:=eq); compute; auto. apply _.
Qed.
Lemma cardinal_1 : forall m : t elt, Empty m -> cardinal m = 0.
@@ -1197,7 +1198,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
Proof.
intros; do 2 rewrite cardinal_fold.
change S with ((fun _ _ => S) x e).
- apply fold_Add with (eqA:=eq); compute; auto.
+ apply fold_Add with (eqA:=eq); compute; auto. apply _.
Qed.
Lemma cardinal_inv_1 : forall m : t elt,
@@ -1544,7 +1545,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
setoid_replace (fold f m 0) with (fold f m1 (fold f m2 0)).
rewrite <- cardinal_fold.
apply fold_rel with (R:=fun u v => u = v + cardinal m2); simpl; auto.
- apply Partition_fold with (eqA:=eq); repeat red; auto.
+ apply Partition_fold with (eqA:=eq); repeat red; auto. apply _.
Qed.
Lemma Partition_partition : forall m m1 m2, Partition m m1 m2 ->
@@ -1694,7 +1695,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
Proof.
intros m1 m1' Hm1 m2 m2' Hm2.
setoid_replace (update m1 m2) with (update m1' m2); unfold update.
- apply fold_Equal with (eqA:=Equal); auto.
+ apply fold_Equal with (eqA:=Equal); auto. apply _.
intros k k' Hk e e' He m m' Hm; rewrite Hk,He,Hm; red; auto.
intros k k' e e' i Hneq x.
rewrite !add_o; do 2 destruct eq_dec; auto. elim Hneq; eauto.
@@ -1712,7 +1713,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
intros k e i i' H Hii' x.
pattern (mem k m2); rewrite Hm2. (* UGLY, see with Matthieu *)
destruct mem; rewrite Hii'; auto.
- apply fold_Equal with (eqA:=Equal); auto.
+ apply fold_Equal with (eqA:=Equal); auto. apply _.
intros k k' Hk e e' He m m' Hm; simpl in *.
pattern (mem k m2); rewrite Hk. (* idem *)
destruct mem; rewrite ?Hk,?He,Hm; red; auto.
@@ -1731,7 +1732,7 @@ Module WProperties_fun (E:DecidableType)(M:WSfun E).
intros k e i i' H Hii' x.
pattern (mem k m2); rewrite Hm2. (* idem *)
destruct mem; simpl; rewrite Hii'; auto.
- apply fold_Equal with (eqA:=Equal); auto.
+ apply fold_Equal with (eqA:=Equal); auto. apply _.
intros k k' Hk e e' He m m' Hm; simpl in *.
pattern (mem k m2); rewrite Hk. (* idem *)
destruct mem; simpl; rewrite ?Hk,?He,Hm; red; auto.
diff --git a/theories/FSets/FSetEqProperties.v b/theories/FSets/FSetEqProperties.v
index 755bc7dd0..3a2de94b5 100644
--- a/theories/FSets/FSetEqProperties.v
+++ b/theories/FSets/FSetEqProperties.v
@@ -920,8 +920,6 @@ Lemma sum_compat :
forall s, (forall x, In x s -> f x=g x) -> sum f s=sum g s.
intros.
unfold sum; apply (fold_compat _ (@Logic.eq nat)); auto with *.
-intros x x' Hx y y' Hy. rewrite Hx, Hy; auto.
-intros x x' Hx y y' Hy. rewrite Hx, Hy; auto.
Qed.
End Sum.