Definition quotient : Setoid := Build_Setoid R_equiv.Definition fun_compatible (f : A -> B) : Prop :=
  forall x y : A, Equal x y -> Equal (f x) (f y).Record Map : Type := 
  {Ap :> A -> B; Map_compatible_prf :> fun_compatible Ap:Prop}.Record Map : Type := 
  {Ap :> A -> B; Map_compatible_prf :> fun_compatible Ap:Prop}.Record Map : Type := 
  {Ap :> A -> B; Map_compatible_prf :> fun_compatible Ap:Prop}.Definition Map_eq (f g : Map) : Prop := forall x : A, Equal (f x) (g x).Definition MAP : Setoid := Build_Setoid Map_eq_equiv.

Lemma map_ext : forall (A B : Setoid) (f g : MAP A B), (forall x : A, Equal (f x) (g x)) -> Equal f g.