Condition for Composite Mapping on Right

Theorem
Let $A, B, C$ be sets.

Let $f: B \to A$ and $g: C \to A$ be mappings.

Let $\mathcal R: C \to B$ be a relation such that $g = f \circ \mathcal R$ is the composite of $\mathcal R$ and $f$.

Then $\mathcal R$ may be a mapping :
 * $\Img g \subseteq \Img f$

That is:
 * $\Img g \subseteq \Img f$


 * $\exists h: C \to B$ such that $h$ is a mapping and $f \circ h = g$
 * $\exists h: C \to B$ such that $h$ is a mapping and $f \circ h = g$

Sufficient Condition
Suppose $\Img g \subseteq \Img f$.

That is:
 * $\forall x \in C: \map g x \in \Img f$

and so:
 * $\forall x \in C: \exists y \in B: \map g x = \map f y$

Take any $x \in C$.

Consider the set $Y_x = \set {y \in B: \map g x = \map f y}$.

We know from above that $Y_x \ne \O$.

So, using the Axiom of Choice, for each $x$ we may select some $y_x \in Y_x$.

Then we may define the mapping $h: C \to B$ such that:
 * $\forall x \in C: \map h x = y_x$

We then see that:

Thus we have constructed a mapping $h$ such that $f \circ h = g$, as required.

Necessary Condition
Suppose there exists some mapping $h: C \to B$ such that $f \circ h = g$.

Let $y \in \Img g$.

Then we have:

Hence by definition of subset, $\Img g \subseteq \Img f$.

Comment
Hence we have a necessary and sufficient condition for determining whether the composition of mappings actually exists as a mapping.

Note that this is different from being given two mappings and creating their composition.