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 Ap_comp : forall (A B : Setoid) (f g : MAP A B) (x y : A), Equal x y -> Equal f g -> Equal (f x) (g y).