Covariant Hom Functor is Functor

Theorem
Let $\mathbf{Set}$ be the category of sets.

Let $\mathbf C$ be a locally small category.

Let $C \in \mathbf C_0$ be an object of $\mathbf C$.

Let $\hom_\mathbf C \paren {C, \cdot}: \mathbf C \to \mathbf{Set}$ be the covariant representable functor based at $C$.

Then $\hom_\mathbf C \paren {C, \cdot}$ is a functor.

Proof
For brevity and readability, let us write $\hom$ for $\hom_\mathbf C$.

For any object $D$ of $\mathbf C$ and morphism $f: C \to D \in \hom \paren {C, D}$ we have:


 * $\hom \paren {C, \operatorname{id}_D} \paren f = \operatorname{id}_D \circ f = f$

and so $\hom \paren {C, \operatorname{id}_D} = \operatorname{id}_{\hom \paren {C, D} }$.

Thus $\hom \paren {C, \cdot}$ preserves identity morphisms.

For composable morphisms $g$ and $f$ of $\mathbf C$ we furthermore have:

for any $x \in \hom \paren {C, \operatorname{dom} f}$ composable with $f$.

Hence the result, by Equality of Mappings.