(** NB: This file is here only for compatibility with earlier version of
    [FSets] and [FMap]. Please use [Structures/Equalities.v] directly now. *)

(** * Examples of Decidable Type structures. *)

(** A particular case of [DecidableType] where
    the equality is the usual one of Coq. *)

Module Type UsualDecidableType := Equalities.UsualDecidableTypeOrig.(** a [UsualDecidableType] is in particular an [DecidableType]. *)

Module UDT_to_DT (U:UsualDecidableType) <: DecidableType := U.(** an shortcut for easily building a UsualDecidableType *)

Module Type MiniDecidableType := Equalities.MiniDecidableType.Module Make_UDT (M:MiniDecidableType) <: UsualDecidableType
 := Equalities.Make_UDT M.(** An OrderedType can now directly be seen as a DecidableType *)

Module OT_as_DT (O:OrderedType) <: DecidableType := O.(** (Usual) Decidable Type for [nat], [positive], [N], [Z] *)

Module Nat_as_DT <: UsualDecidableType := Nat_as_OT.Module Positive_as_DT <: UsualDecidableType := Positive_as_OT.Module N_as_DT <: UsualDecidableType := N_as_OT.Module Z_as_DT <: UsualDecidableType := Z_as_OT.Definition t := prod D1.t D2.t.Definition eq x y := D1.eq (fst x) (fst y) /\ D2.eq (snd x) (snd y).

Lemma eq_refl : forall x : t, eq x x.