This question has a longish prelude before I can actually ask it :)
Let's say type A and B represent categories, then the function
f :: B -> A
is a morphism between the two categories. We can create a new category with A and B as objects and f as the arrow like this:
Now, let's introduce a new category C and function g:
g :: C -> B -> A
I would like to be able to add C and g to my category above, but am unsure how to do it. Intuitively, I want something that looks like this:
But I've never seen anything like that in a category diagram before. To make this kosher, I could introduce a dummy arrow g' and construct a 2-category like this:
But that seems like an obtuse picture. (We could, of course, use the picture I drew above as shorthand for the proper one.) Also, it's not exactly clear anymore what g and g' even are. g is no longer a function that takes as input a category C and returns a morphism :: B -> A. Instead,
g' :: (C -> C)
g :: (C -> C) -> (B -> A)
If we pass g the identity, then everything will work fine. But if we pass it some other function, then who knows what could happen?
So my question is: Is an n-arrow within an n-category really the way we should think about functions with arity n? Or is there some easier way to represent this function down into a standard category that I missed?
g :: C -> B -> A
corresponds to g : C → A^B. ('^' denotes superscript.) – Shopwindow