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

(* Specifications: *)
Lemma lem_rel_prod_rel_sig : forall (r1 r2 a : E) (rRel1 : rel_sig r1 a a) (rRel2 : rel_sig r2 a a), rel_sig (rel_prod r1 r2 a rRel1 rRel2) a a.
Lemma lem_rel_prod_dom : forall (r1 r2 a : E) (rRel1 : rel_sig r1 a a) (rRel2 : rel_sig r2 a a), inc (rdom (rel_prod r1 r2 a rRel1 rRel2) a a (lem_rel_prod_rel_sig r1 r2 a rRel1 rRel2)) (rdom r1 a a rRel1).
Lemma lem_rel_prod_Img : forall (r1 r2 a : E) (rRel1 : rel_sig r1 a a) (rRel2 : rel_sig r2 a a), inc (rImg (rel_prod r1 r2 a rRel1 rRel2) a a (lem_rel_prod_rel_sig r1 r2 a rRel1 rRel2)) (rImg r2 a a rRel2).
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).