Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Take the category-like picture below:

enter image description here

$g$ is not a 2-morphism in terms of category theory because the arrows it connects ($f$ and $g'$) do not have the same type (right?). What would you call it?

What if we reinterpret the picture so that the objects are sets and the arrows functions. What would you call the higher order function $g$?


This is a pattern that has come up for me a bunch when programming in Haskell, and so I feel like there must be some underlying mathematics and I'd like to read up on it some. Rewritten in Haskell (and made slightly more generic), the picture would look something like this:

g :: F1 -> F2

type F1 = D -> C

type F2 = B -> A

An example of a real 2-morphism would be the something of the type F1 -> F1. Sorry that I don't know any more examples. I'm sure they exist, but I just don't know the language to frame them in. My question stems from related question about converting haskell functions into 2-morphisms but nobody knew what this specific type of thing was.

share|cite|improve this question
A "higher-order function" is a map from one set of functions to another. Your diagram suggests that $g$ is quite different in nature. Can you explain what you are doing in more detail, or give some motivating examples? – Zhen Lin Sep 27 '12 at 1:55
@ZhenLin g is a map from a set of "functions of functions" to another set of "functions of functions." I've edited the question with a more detailed example. – Mike Izbicki Sep 27 '12 at 2:42
What you've described is just an ordinary 1-morphism of type $C^D \to A^B$ in the cartesian closed category of Haskell types. It doesn't make sense to talk about 2-morphisms in this category because it's not a 2-category. – Zhen Lin Sep 27 '12 at 2:44
@ZhenLin. Right, I agree. But is there no special term for higher-order functions that take one function as input and output another function? Alternatively, some type of category-theoretic morphism whose objects are morphisms in another category? – Mike Izbicki Sep 27 '12 at 4:33
I think the term "higher-order function" is good enough. If you want a map between categories, that is called a "functor" – but what you describe isn't a functor. – Zhen Lin Sep 27 '12 at 5:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.