# When is it possible to interpret composition as a natural transformation?

First note that for any objects $X$, $Y$, and $Z$ in a category $C$, we can get a morphism $\bigcirc: Z^Y \times Y^X \rightarrow Z^X$ as following. We define $\bigcirc$ as $\lambda (eval_{Z^Y} \circ (id_{Z^Y} \times eval_{Y^X}))$. This is well defined because: $$id_{Z^Y} \times eval_{Y^X}:Z^Y \times Y^X \times X \rightarrow Z^Y \times Y$$ $$eval_{Z^Y} \circ (id_{Z^Y} \times eval_{Y^X}) : Z^Y \times Y^X \times X \rightarrow Z$$ $$\lambda(eval_{Z^Y} \circ (id_{Z^Y} \times eval_{Y^X})) : Z^Y \times Y^X \rightarrow Z^X$$

(I haven't proved that this is associative or respects identities yet.) Now, what is some way that you could interpret $\bigcirc$ as a natural transformation (in some category for which all exponential objects are defined.) My biggest trouble right now is how to interpret $Z^Y \times Y^X$ as a functor.

Or is there a different way to interpret composition as a natural transformation.

## migrated from mathoverflow.netJan 19 '15 at 1:54

This question came from our site for professional mathematicians.

• Why do you want composition to be interpreted as a natural transformation? – Yemon Choi Jan 17 '15 at 17:26
• $Z^Y \times Y^X$ and $Z^X$ can probably both be viewed as a functor from $C^3 \to C$, and then the morphism you have described is probably a natural transformation. I do not have the time to work this out. This question is better suited to math.stackexchange, however. – Steven Gubkin Jan 17 '15 at 17:35
• (1) I take it you mean a cartesian closed category. (2) Internal composition is an example of an extranatural transformation: ncatlab.org/nlab/show/extranatural+transformation It's dinatural in $Y$. – user43208 Jan 17 '15 at 17:36
• @StevenGubkin Should I cross post it then? – PyRulez Jan 17 '15 at 17:37
• I would delete and repost there. Maybe @ToddTrimble would answer at the other site? I hope we do not seem unwelcoming here, this is just not a "research level" question. Hope to see more of your questions here in the future! – Steven Gubkin Jan 17 '15 at 17:42

Nice question! As user43208 says in comments, I presume you’re assuming $\newcommand{\CC}{\mathcal{C}}\CC$ is Cartesian closed throughout.

The most straightforward way to see this as a natural transformation is to consider $Y$ as fixed. Then $Z^Y \times Y^X$ and $Z^X$ can each be seen as functors of two variables, contravariant in $X$ and covariant in $X$, i.e. as functors $\newcommand{\op}{\mathrm{op}}\CC^\op \times \CC \to \CC$.

Slightly better is to see $Z^Y \times Y^X$ as “isovariant” in $Y$, i.e. see both as functors $\CC^\op \times \CC^{\mathrm{iso}} \times \CC \to \CC$. (I’ll leave the details of this approach as an exercise.)

But best of all (again as user43208 says) is to move to the language of dinatural and extranatural transformations, which was designed exactly for this sort of situation, where you have a construction like $Z^Y \times Y^X$ which is covariant in some instances of an argument and contravariant in others. You can find full details at the n-lab, but roughly, the way this works is by splitting the co- and contra-variant instances of $Y$ into two different arguments, $Y_+$ and $Y_-$, and thinking about the functor of four variables $Z^{Y_-} \times Y_+^X : \CC^\op \times \CC \times \CC^\op \times \CC \to \CC$, and similarly thinking of $Z^X$ as a functor of those four variables (in which $Y_+$, $Y_-$ just so happen not to appear). Then a dinatural transformation between these is a family of maps $\alpha_{X,Y,Z}$ between “diagonal instances” (i.e. instances where both $Y_+$, $Y_-$ are given the same value $Y$), satisfying a naturality condition saying that for any $X,Y_+, Y_-,Z$ and map $f : {Y_-} \to Y_+$, the two different ways of getting from $Z^{Y_-} \times Y_+^X$ to $Z^X$ are the same.

(Exercise: draw out this naturality diagram! Hint: the “two different ways” go via $Z^{Y_+} \times {Y_+}^X$ and $Z^{Y_-} \times {Y_-}^X$ respectively.)

These three approaches take successively more language to set up; but they encapsulate increasingly more about the naturality of this composition operation.

• I corrected something which I'm pretty sure was a typo, let me know if I introduced an error doing so. – Najib Idrissi Jan 29 '15 at 13:12
• @NajibIdrissi: you were absolutely right, thanks for the typo fix! – Peter LeFanu Lumsdaine Jan 29 '15 at 17:04