Domain of Composite Mapping

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

Let $f_1: S_1 \to S_2$ and $f_2: S_2 \to S_3$ be mappings.

Let $f_2 \circ f_1: S_1 \to S_3$ be the composite mapping of $f_1$ and $f_2$.

Then:
 * $\operatorname{Dom} \left ({f_1}\right) = \operatorname{Dom} \left ({f_2 \circ f_1}\right)$

where $\operatorname{Dom} \left ({f_1}\right)$ denotes the domain of $f_1$.

Proof
By definition of composition of mappings:
 * $f_2 \circ f_1 := \left\{{\left({x, z}\right) \in S_1 \times S_3: \exists y \in S_2: \left({x, y}\right) \in f_1 \land \left({y, z}\right) \in f_2}\right\}$

Let $x \in \operatorname{Dom} \left ({f_2 \circ f_1}\right)$.

Then:
 * $\exists z \in S_3: \left({x, z}\right) \in S_1 \times S_3$

and:
 * $\exists y \in S_2: \left({x, y}\right) \in f_1$

That is:
 * $x \in \operatorname{Dom} \left ({f_1}\right)$

Thus by definition of subset:


 * $\operatorname{Dom} \left ({f_2 \circ f_1}\right) \subseteq \operatorname{Dom} \left ({f_1}\right)$

Now suppose $x \in \operatorname{Dom} \left ({f_1}\right)$.

By the definition of mapping:
 * $\exists y \in S_2: \left({x, y}\right) \in f_1$

As $f_2$ is likewise a mapping:
 * $\exists z \in S_3: \left({y, z}\right) \in f_2$

and so by definition of composition of mappings:
 * $\left({x, z}\right) \in S_1 \times S_3$

and so:
 * $x \in \operatorname{Dom} \left ({f_2 \circ f_1}\right)$

Thus by definition of subset:
 * $\operatorname{Dom} \left ({f_1}\right) \subseteq \operatorname{Dom} \left ({f_2 \circ f_1}\right)$

By definition of set equality:
 * $\operatorname{Dom} \left ({f_1}\right) = \operatorname{Dom} \left ({f_2 \circ f_1}\right)$