# Finding the source and target categories of a certain Functor

From "Algebra of Programming" (Bird, de Moor), the exercise 2.11 reads:

For any category $\mathcal{C}$, define:

H(A,B) = { f | f : A $\leftarrow$ B in $\mathcal{C}$}

H(f,h) g = f $\circ$ g $\circ$ h

Between what categories is H a functor?

I noticed that:

• H(f,h) g = f $\circ$ g $\circ$ h can be rewritten as H(f,h) = $\lambda$g. f $\circ$ g $\circ$ h, if one knows a bit lambda-calculus.

• (A,B) are pairs of objects from $\mathcal{C}$ and {f | f : A $\leftarrow$ B} are morphisms from $\mathcal{C}$

Therefore, I have:

• $src_{ob} H$ = $ob \mathcal{C} * ob \mathcal{C}$
• $tgt_{ob} H$ = $arr \mathcal{C}$

• $src_{arr} H$ = $arr \mathcal{C}$

• $tgt_{arr} H$ = $arr \mathcal{C}$ ?

Can I say that H: $\mathcal{C} * \mathcal{C} \rightarrow arr \mathcal{C}$?

-

$H$ is the Hom-functor $C \times C^{\mathrm{op}} \to \mathrm{Set}$. If you fix some $A \in C$, you get the contravariant Hom-functor $\mathrm{Hom}(-,A)$; and if you fix some $B \in C$, you get the covariant Hom-functor $\mathrm{Hom}(B,-)$.