Module Type Eq := Typ <+ HasEq.Module Type Eq' := Eq <+ EqNotation.Module Type HasEqBool (E:Eq) := HasEqb E <+ EqbSpec E E.(** From these basic blocks, we can build many combinations
    of static standalone module types. *)

Module Type EqualityType := Eq <+ IsEq.Module Type EqualityTypeOrig := Eq <+ IsEqOrig.Module Type EqualityTypeBoth <: EqualityType <: EqualityTypeOrig
 := Eq <+ IsEq <+ IsEqOrig.Module Type DecidableType <: EqualityType
 := Eq <+ IsEq <+ HasEqDec.Module Type DecidableTypeOrig <: EqualityTypeOrig
 := Eq <+ IsEqOrig <+ HasEqDec.Module Type DecidableTypeBoth <: DecidableType <: DecidableTypeOrig
 := EqualityTypeBoth <+ HasEqDec.Module Type BooleanEqualityType <: EqualityType
 := Eq <+ IsEq <+ HasEqBool.Module Type BooleanDecidableType <: DecidableType <: BooleanEqualityType
 := Eq <+ IsEq <+ HasEqDec <+ HasEqBool.Module Type DecidableTypeFull <: DecidableTypeBoth <: BooleanDecidableType
 := Eq <+ IsEq <+ IsEqOrig <+ HasEqDec <+ HasEqBool.(** Same, with notation for [eq] *)

Module Type EqualityType' := EqualityType <+ EqNotation.Module Type EqualityTypeOrig' := EqualityTypeOrig <+ EqNotation.Module Type EqualityTypeBoth' := EqualityTypeBoth <+ EqNotation.Module Type DecidableType' := DecidableType <+ EqNotation.Module Type DecidableTypeOrig' := DecidableTypeOrig <+ EqNotation.Module Type DecidableTypeBoth' := DecidableTypeBoth <+ EqNotation.Module Type BooleanEqualityType' :=
 BooleanEqualityType <+ EqNotation <+ EqbNotation.Module Type BooleanDecidableType' :=
 BooleanDecidableType <+ EqNotation <+ EqbNotation.Module Type DecidableTypeFull' := DecidableTypeFull <+ EqNotation.Definition eq_refl := @Equivalence_Reflexive _ _ F.eq_equiv.Definition eq_sym := @Equivalence_Symmetric _ _ F.eq_equiv.Definition eq_trans := @Equivalence_Transitive _ _ F.eq_equiv.#[global]
 Instance eq_equiv : Equivalence E.eq.Module Backport_ET (E:EqualityType) <: EqualityTypeBoth
 := E <+ BackportEq.Module Update_ET (E:EqualityTypeOrig) <: EqualityTypeBoth
 := E <+ UpdateEq.Module Backport_DT (E:DecidableType) <: DecidableTypeBoth
 := E <+ BackportEq.Module Update_DT (E:DecidableTypeOrig) <: DecidableTypeBoth
 := E <+ UpdateEq.Definition eqb x y := if F.eq_dec x y then true else false.

Lemma eq_dec : forall x y, {E.eq x y}+{~E.eq x y}.