Composite Mapping is Mapping

Theorem
Let $S_1, S_2, S_3$ be sets.

Let $f: S_1 \to S_2$ and $g: S_2 \to S_3$ be mappings.

Then the composite mapping $g \circ f$ is also a mapping.

Proof
The composite of $f$ and $g$ is defined as:


 * $g \circ f := \left\{{\left({x, z}\right) \in S_1 \times S_3: \exists y \in S_2: \left({x, y}\right) \in f \land \left({y, z}\right) \in g}\right\}$

It is necessary to show that $g \circ f$ is both left-total and many-to-one.

Left-total
From the definition of a mapping:

That is, $g \circ f$ is left-total.

Many-to-one
Suppose $x_1, x_2 \in S_1: x_1 = x_2$.

Then as $f$ is a mapping and so by definition many-to-one:
 * $f \left({x_1}\right) = f \left({x_2}\right)$

and so:
 * $g \left({f \left({x_1}\right)}\right) = g \left({f \left({x_2}\right)}\right)$

demonstrating that $g \circ f$ is similarly many-to-one.