From 47e9afaaa4c08aca97d4f4b5a89cb40da76bd850 Mon Sep 17 00:00:00 2001 From: msozeau Date: Sat, 28 Jan 2012 05:08:18 +0000 Subject: 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 --- theories/FSets/FMapFacts.v | 17 +++++++++-------- theories/FSets/FSetEqProperties.v | 2 -- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'theories/FSets') 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. -- cgit v1.2.3