# Categorical view on swapping function arguments

In a closed monoidal category we have $$\text{Hom}_\mathcal{C}(Y, X \Rightarrow Z) \cong \text{Hom}_\mathcal{C}(X, Y \Rightarrow Z)$$ this can be obtained by going through $$\text{Hom}_\mathcal{C}(X \otimes Y, Z)$$ and using the fact that $$X\otimes Y \cong Y \otimes X$$.

I'm interested in a generalization of this result.

Denote $$\text{Hom}^{\mathcal{D}}_\mathcal{C}(X,Y)$$ to be a hom-set of morphisms in category $$\mathcal{C}$$ where the hom-set as an object lives in the category $$\mathcal{D}$$. Thus the internal hom-set $$X \Rightarrow Y$$ is just $$\text{Hom}^{\mathcal{C}}_\mathcal{C}(X,Y)$$ in this notation.

Let $$\mathcal{C}, \mathcal{D}, \mathcal{E}$$ are some categories. I'm interested in a result of the following type $$\text{Hom}^{\mathcal{E}}_\mathcal{D}(X, \text{Hom}^{\mathcal{D}}_\mathcal{C}(Y,Z)) \cong \text{Hom}^?_?(Y, \text{Hom}^?_?(X,Z))$$ What categories should be on the right hand side? What are the conditions on $$\mathcal{C}, \mathcal{D}, \mathcal{E}$$ such that something like this holds?

Edit: based on Thibaut Benjamin's answer to be a bit more concrete.

Right now, I'm wokring with category of sets($$\mathbf{Set}$$), vector spaces($$\mathbf{Vec}$$), category of vector spaces with polynomial maps between them($$\mathbf{Pol}$$) and category of vector spaces with smooth maps between them($$\mathbf{Smooth}$$).

Let $$A$$ be a set and $$U$$ a vector space. Then $$\text{Hom}_\mathbf{Set}(A,U)$$ naturally form a vector space. Thus, I would write $$\text{Hom}_\mathbf{Set}^\mathbf{Vec}(A,U)$$. Let $$V$$ is also a vector spce, then we have $$\text{Hom}^{\mathbf{Vec}}_\mathbf{Set}(A, \text{Hom}^{\mathbf{Vec}}_\mathbf{Smooth}(U,V)) \cong \text{Hom}^\mathbf{Vec}_\mathbf{Smooth}(U, \text{Hom}^\mathbf{Vec}_\mathbf{Set}(A,V))$$ So I'm wondering if this is an instance of a more general result.

I think a distinction needs to be made, between two notions here.

• First, there is the notion of hom-set of a category, which for two objects $$A,B$$ associates a set $$Hom(A,B)$$, of morphisms from $$A$$ to $$B$$. In a more general setting, if $$\mathcal{D}$$ is a monoidal category, then you can also define $$\mathcal{D}$$-enriched categories, which are essentially the same as usual categories, except that now $$Hom(A,B)$$ is an object in $$\mathcal{D}$$. To emphasize the difference, I will say hom-object, instead of hom-set in this case.

• Secondly, if you have a closed monoidal category $$(\mathcal{C},\otimes)$$, then $$A\otimes \_$$ has a right adjoint $$[\_,A]$$. This means that for all objects $$B,C$$ in $$\mathcal{C}$$, you get an object $$[B,C]$$ in $$C$$, which satisfies $$Hom(A\otimes B,C) \simeq Hom(A,[B,C])$$. This object is called the internal hom in $$\mathcal{C}$$.

These two things are not to be confused as they are fundamentally different. Granted in most cases of monoidal categories that we usually study, the differences is not that noticeable. This is because from a usual monoidal closed category $$\mathcal{C}$$, you can define a $$\mathcal{C}$$-enriched category with objects the same as $$\mathcal{C}$$, and chosing morphisms to be the internal homs. It so happens that for the category of vector spaces, the category obtained this way is much of a difference, the original hom-sets are simply the underlying spaces of the internal homs. This may (or may not, I havent thought much about it), be the case for all concrete categories.

But for a general $$\mathcal{C}$$ mnoidal closed, the statement does not make any sense, since the internal homs are objects in $$\mathcal{C}$$, and the hom-sets are sets, and they are in no way related to one another.

Now one thing which is true (https://ncatlab.org/nlab/show/closed+monoidal+category) is that the isomorphisms of hom-sets, translates to an iso on internal hom $$[X\otimes Y, Z]\simeq [X,[Y,Z]]$$. This indeed shows that $$[X,[Y,Z]]\simeq [Y,[X,Z]]$$. Thus for the $$\mathcal{C}$$ enriched category obtained by taking the internal homs in $$\mathcal{C}$$ (as the previous construction), we have indeed that $$Hom(X,Hom(Y,Z)) \simeq Hom(Y,Hom(X,Z))$$.

But now I really can't see how you want to generalize that in the case of general enriched categories. First, you need $$\mathcal{E}$$ to be monoidal, $$\mathcal{D}$$ to be monoidal and $$\mathcal{E}$$-enriched, and $$\mathcal{C}$$ to be $$\mathcal{D}$$-enriched. But then I don't see any construction that can replace the internalization, and I can't even formulate an analoguous statement. I think self-enrichment is very crucial here.

• Thanks for the detailed answer, I will have to study it in more detail. I know very little about this topic, so I'm terrible at formulating sensible questions. However, in one particular setting I'm aware of a result like that, I have added it to the question and I would be interested in your opinion on that. – tom Jun 27 at 15:53

I think that the notion of power is probably what you are looking for. The example you added in the edit doesn't make sense, strictly speaking. In the general case of $$\text{Hom}^{\mathcal{E}}_\mathcal{D}(X, \text{Hom}^{\mathcal{D}}_\mathcal{C}(Y,Z)) \cong \text{Hom}^?_?(Y, \text{Hom}^?_?(X,Z))$$ the left hand side says that $$X$$ lives in $$\mathcal{D}$$ and $$Y$$ and $$Z$$ both live in $$\mathcal{C}$$. Since $$X$$ and $$Z$$ live in the same category on the right hand side (since they are arguments to the same hom functor) we must then have $$\mathcal{C} = \mathcal{D}$$, giving $$\text{Hom}^{\mathcal{E}}_\mathcal{C}(X, \text{Hom}^{\mathcal{C}}_\mathcal{C}(Y,Z)) \cong \text{Hom}^?_{\mathcal{C}}(Y, \text{Hom}^{\mathcal{C}}_{\mathcal{C}}(X,Z))$$ the last ? can be filled in using the fact that the left hand side as a whole lives in $$\mathcal{E}$$. Since $$\textbf{Set}$$, $$\textbf{Vec}$$, and $$\textbf{Smooth}$$ are distinct categories, the example in your edit isn't well-formed. For example, $$V$$ must live in $$\textbf{Smooth}$$ on the left hand side and $$\textbf{Set}$$ on the right hand side.

Of course what's really happening is that there are forgetful functors $$\textbf{Vec} \to \textbf{Smooth} \to \textbf{Set}$$ being tacitly inserted where necessary. This is a reasonable convention, but if you're looking to generalize it's best to keep track of these details.

Now $$\textbf{Vec}$$ is complete, so it's powered over set. In particular, for any set $$A$$ and vector space $$V$$ there is a vector space $$A \pitchfork V = \prod_{a \in A} V$$, which is what you call $$\text{Hom}^{\textbf{Vec}}_{\textbf{Set}}(A, V)$$. By the universal property of the power we have $$\text{Hom}_{\textbf{Set}}(A, \text{Hom}_{\textbf{Vec}}(U, V)) \cong \text{Hom}_{\textbf{Vec}}(U, A \pitchfork V)$$ which says that you can swap the order of the arguments $$A$$ and $$U$$. The example in your edit boils down to this isomorphism, once you insert forgetful functors in the right places.

• Cool! I think this is what I was looking for. Sorry for being sloppy with those forgetful functors. – tom Jul 1 at 14:02