Mapping is Extension iff Composite with Inclusion

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

Let $A \subseteq S$.

Let $f: S \to T$ and $g: A \to T$ be mappings.

Then $f$ is an extension of $g$ :
 * $f = g \circ i_A$

where $i_A$ is the inclusion mapping on $A$.

This can be illustrated using a commutative diagram as follows:


 * $\begin {xy} \xymatrix@L + 2mu@ + 1em {

A \ar[r]^*{i_A} \ar@{-->}[rd]_*{f = g \circ i_A} & S \ar[d]^*{g} \\ & T } \end {xy}$

Necessary Condition
Let $f: S \to T$ be an extension of $g: A \to T$.

Then by definition:

That is:
 * $f = g \circ i_A$

Sufficient Condition
Let $f = g \circ i_A$ where $i_A$ is the inclusion mapping on $A$.

Then:

So, by definition, $f$ is an extension of $g$.