(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(** * Finite sets library *)
(** This functor derives additional properties from [MSetInterface.S]. Contrary to the functor in [MSetEqProperties] it uses predicates over sets instead of sets operations, i.e. [In x s] instead of [mem x s=true], [Equal s s'] instead of [equal s s'=true], etc. *)
Require Export MSetInterface.
Set Implicit Arguments.
Unset Strict Implicit.
Local Ltac Tauto.intuition_solver ::= auto with relations.
#[global]
Hint Unfold transpose : core.
(** First, a functor for Weak Sets in functorial version. *)
Module WPropertiesOn (Import E : DecidableType)(M : WSetsOn E).
Module Import Dec := WDecideOn E M.
Module Import FM := Dec.F (* MSetFacts.WFactsOn E M *).

(* Specifications: *)
Lemma In_dec : forall x s, {In x s} + {~ In x s}.
Definition Add x s s' := forall y, In y s' <-> E.eq x y \/ In y s.
Lemma Add_Equal : forall x s s', Add x s s' <-> s' [=] add x s.
Ltac expAdd := repeat rewrite Add_Equal.