Section comp_prop_3.
Variable F G X : Ens.
Hypothesis c : Comp_prop F G X.
Let step1 : is_a_pair X.
Proof Comp_pair F G X c.
Let step2 : IN (PR1 X) (Domain F).
Proof Comp_prop_th1 F G X c.
Let step3 : IN (PR2 X) (Range G).
Proof Comp_prop_th2 F G X c.
Let step4 : in_cartesian (Domain F) (Range G) X.
Proof Build_in_cartesian (Domain F) (Range G) X step1 step2 step3.
Proof Cartesian_pr1 (Domain F) (Range G) X step4.
End comp_prop_3.
Proof comp_prop_3_Out.
Proof Comp_prop_th3.
Proof
fun F G : Ens =>
Bounded_th2 (Comp_prop F G) (Cartesian (Domain F) (Range G))
(composition_bounded_by F G).
Definition COMP (F G : Ens) := REPLACEMENT (Comp_prop F G).
(******* note that this is the full composition of relations, like composition of correspondences in algebraic geometry ************)
Proof
fun F G X : Ens =>
REPLACEMENT_pr1 (Comp_prop F G) (composition_bounded F G) X.

Theorem COMP_pr2 : forall F G X : Ens, IN X (COMP F G) -> Comp_prop F G X.