(************************************************************************)
(*         *      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 facts from [MSetInterface.S]. These facts are mainly the specifications of [MSetInterface.S] written using different styles: equivalence and boolean equalities. Moreover, we prove that [E.Eq] and [Equal] are setoid equalities. *)
Require Export MSetInterface.
Set Implicit Arguments.
Unset Strict Implicit.
Local Ltac Tauto.intuition_solver ::= auto with relations.
(** First, a functor for Weak Sets in functorial version. *)
Module WFactsOn (Import E : DecidableType)(Import M : WSetsOn E).
Notation eq_dec := E.eq_dec.
Definition eqb x y := if eq_dec x y then true else false.
(** * Specifications written using implications : this used to be the default interface. *)
Section ImplSpec.
Variable s s' : t.
Variable x y : elt.

Lemma remove_neq_b : ~ E.eq x y -> mem y (remove x s) = mem y s.