Equivalence of Definitions of Composition of Mappings

Theorem
Let $f_1: S_1 \to S_2$ and $f_2: S_2 \to S_3$ be mappings such that the domain of $f_2$ is the same set as the codomain of $f_1$.

Proof
Let $f_1: S_1 \to S_2$ and $f_2: S_2 \to S_3$ be mappings such that:
 * $\Dom {f_2} = \Cdm {f_1}$

$(1)$ implies $(2)$
Let $f_2 \circ f_1$ be a composite mapping by definition 1.

Then by definition:


 * $f_2 \circ f_1 := \set {\tuple {x, z} \in S_1 \times S_3: \tuple {\map {f_1} x, z} \in f_2}$

Thus $f_2 \circ f_1$ is a composite mapping by definition 2.

$(2)$ implies $(1)$
Let $f_2 \circ f_1$ be a composite mapping by definition 2.

Then by definition:
 * $\forall x \in S_1: \map {\paren {f_2 \circ f_1} } x := \map {f_2} {\map {f_1} x}$

Thus $f_2 \circ f_1$ is a composite mapping by definition 1.