Many-to-One Relation Extends to Mapping

Theorem
Let $S$ and $T$ be sets.

Let $T$ be non-empty.

Let $\mathcal R \subset S \times T$ be a many-to-one relation.

Then there exists a mapping $f: S \to T$ such that $\mathcal R \subseteq f$.

Proof
Since $T$ is not empty, it has an element $t_0$.

Define a mapping $g: S \setminus \Preimg {\mathcal R}$ by letting $\map g x = t_0$ for all $x \in S$.

Let $f = \mathcal R \cup g$ be a relation on $S \times T$.

By Union of Many-to-One Relations with Disjoint Domains is Many-to-One, $f$ is a many-to-one relation.

By Union with Relative Complement, $f$ is total.

Thus $f$ is a mapping.