Restriction of Mapping to Image is Surjection

Theorem
Let $f: S \to T$ be a mapping.

Let $g: S \to \operatorname{Im} \left({f}\right)$ be the restriction of $f$ to $S \times \operatorname{Im} \left({f}\right)$.

Then $g$ is a surjective restriction of $f$.

Proof
From Image is Subset of Codomain:
 * $\operatorname{Im} \left({g}\right) \subseteq T$

Furthermore, by definition of image, we have:


 * $\forall s \in S: g \left({s}\right) \in \operatorname{Im} \left({g}\right)$

Therefore, $g$ may be viewed as a mapping $g: S \to \operatorname{Im} \left({g}\right)$.

Thus $g$ is a surjection by definition 2.

Comment
Thus, for any mapping $f: S \to T$ which is not surjective, by restricting its codomain to its image, it can be considered as a surjection.