(* End of proof of lem_rel_prod_assoc                                      *)

(***************************************************************************)
(* L'identite est un element neutre pour le produit                        *)
(***************************************************************************)

(***************************************************************************)
(***************************************************************************)
(* Relations d'equivalence                                                 *)
(***************************************************************************)
(***************************************************************************)
Definition equivalence (r a : E) (rRel : rel_sig r a a) :=
  reflexivity r a rRel /\ symmetry r a rRel /\ transitivity r a rRel.(***************************************************************************)
(* Classe d'equivalence                                                    *)
(***************************************************************************)
Definition equivClass (r a : E) (rRel : rel_sig r a a)
  (rEqv : equivalence r a rRel) (x : E) :=
  subset (fun y : E => In (couple x y) r) a.

Lemma lem_equivClass_eq : forall (r a : E) (rRel : rel_sig r a a) (rEqv : equivalence r a rRel) (x y : E), In (couple x y) r -> equivClass r a rRel rEqv x = equivClass r a rRel rEqv y.