diff options
author | Enrico Tassi <gareuselesinge@debian.org> | 2015-01-25 14:42:51 +0100 |
---|---|---|
committer | Enrico Tassi <gareuselesinge@debian.org> | 2015-01-25 14:42:51 +0100 |
commit | 7cfc4e5146be5666419451bdd516f1f3f264d24a (patch) | |
tree | e4197645da03dc3c7cc84e434cc31d0a0cca7056 /theories/MSets/MSetWeakList.v | |
parent | 420f78b2caeaaddc6fe484565b2d0e49c66888e5 (diff) |
Imported Upstream version 8.5~beta1+dfsg
Diffstat (limited to 'theories/MSets/MSetWeakList.v')
-rw-r--r-- | theories/MSets/MSetWeakList.v | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/theories/MSets/MSetWeakList.v b/theories/MSets/MSetWeakList.v index fd4114cd..372acd56 100644 --- a/theories/MSets/MSetWeakList.v +++ b/theories/MSets/MSetWeakList.v @@ -56,8 +56,8 @@ Module Ops (X: DecidableType) <: WOps X. if X.eq_dec x y then l else y :: remove x l end. - Definition fold (B : Type) (f : elt -> B -> B) (s : t) (i : B) : B := - fold_left (flip f) s i. + Definition fold (B : Type) (f : elt -> B -> B) : t -> B -> B := + fold_left (flip f). Definition union (s : t) : t -> t := fold add s. @@ -118,16 +118,18 @@ Module MakeRaw (X:DecidableType) <: WRawSets X. 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). + Let eqr:= (@Equivalence_Reflexive _ _ X.eq_equiv). + Let eqsym:= (@Equivalence_Symmetric _ _ X.eq_equiv). + Let eqtrans:= (@Equivalence_Transitive _ _ X.eq_equiv). + Hint Resolve eqr eqtrans. + Hint Immediate eqsym. Definition IsOk := NoDup. Class Ok (s:t) : Prop := ok : NoDup s. Hint Unfold Ok. - Hint Resolve @ok. + Hint Resolve ok. Instance NoDup_Ok s (nd : NoDup s) : Ok s := { ok := nd }. @@ -215,10 +217,10 @@ Module MakeRaw (X:DecidableType) <: WRawSets X. Proof. induction s; simpl; intros. intuition; inv; auto. - destruct X.eq_dec; inv; rewrite !InA_cons, ?IHs; intuition. + destruct X.eq_dec as [|Hnot]; inv; rewrite !InA_cons, ?IHs; intuition. elim H. setoid_replace a with y; eauto. elim H3. setoid_replace x with y; eauto. - elim n. eauto. + elim Hnot. eauto. Qed. Global Instance remove_ok s x `(Ok s) : Ok (remove x s). |