(* End of proof of lem_rel_inv_Img                                         *)

(***************************************************************************)
(* Produit de relations                                                    *)
(***************************************************************************)
Definition rel_prod (r1 r2 a : E) (rRel1 : rel_sig r1 a a)
  (rRel2 : rel_sig r2 a a) :=
  subset
    (fun c : E =>
     exists x : E,
       (exists y : E,
          (exists z : E,
             In (couple x y) r1 /\ In (couple y z) r2 /\ c = couple x z)))
    (cartesien a a).

Lemma lem_rel_prod_assoc : forall (r1 r2 r3 a : E) (rRel1 : rel_sig r1 a a) (rRel2 : rel_sig r2 a a) (rRel3 : rel_sig r3 a a), rel_prod (rel_prod r1 r2 a rRel1 rRel2) r3 a (lem_rel_prod_rel_sig r1 r2 a rRel1 rRel2) rRel3 = rel_prod r1 (rel_prod r2 r3 a rRel2 rRel3) a rRel1 (lem_rel_prod_rel_sig r2 r3 a rRel2 rRel3).