(* 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.

(* Specifications: *)
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.
Lemma lem_inter_equivClass_empty : forall (r a : E) (rRel : rel_sig r a a) (rEqv : equivalence r a rRel) (x y : E), ~ In (couple x y) r -> inter (equivClass r a rRel rEqv x) (equivClass r a rRel rEqv y) = Vide.
Lemma lem_equivClass_in_parties_a : forall (r a : E) (rRel : rel_sig r a a) (rEqv : equivalence r a rRel) (x : E), In (equivClass r a rRel rEqv x) (parties a).