# Categories: Products, Exponentials, and the Cartesian Closed Categories

Before I dive into the depths of todays post, I want to clarify something. Last time, I defined categorical products. Alas, I neglected to mention one important point, which led to a bit of confusion in the comments, so I’ll restate the important omission here.
The definition of categorical product defines what the product looks like *if it’s in the category*. There is no requirement that a category include the products for all, or indeed for any, of its members. Categories are *not closed* with respect to categorical product.
That point leads up to the main topic of this post. There’s a special group of categories called the **Cartesian Closed Categories** that *are* closed with respect to product; and they’re a very important group of categories indeed.
However, before we can talk about the CCCs, we need to build up a bit more.
Cartesian Categories
——————–
A *cartesian category* C (note **not** cartesian *closed* category) is a category:
1. With a terminal object t, and
2. ∀ a, b ∈ Obj(C), the objects and arrows of the categorical product a×b are in C.
So, a cartesian category is a category closed with respect to product. Many of the common categories are cartesian: the category of sets, and the category of enumerable sets, And of course, the meaning of the categorical product in set? Cartesian product of sets.
Categorical Exponentials
————————
Like categorical product, the value of a categorical exponential is not *required* to included in a category. Given two objects x and y from a category C, their *categorical exponential* xy, if it exists in the category, is defined by a set of values:
* An object xy,
* An arrow evaly,x : xy×y → x, called an *evaluation map*.
* ∀ z ∈ Obj(C), an operation ΛC : (z&cross;y → x) → (z → xy). (That is, an operation mapping from arrows to arrows.)
These values must have the following properties:
1. ∀ f : z×y → x, g : z → xy:
* valy,x º (ΛC(f)×1y)
2. ∀ f : z×y → x, g : z → xy:
* ΛC(evaly,x *ordm; (z×1y)) = z
To make that a bit easier to understand, let’s turn it into a diagram. You can also think of it as a generalization of a function space. xy is the set of all functions from y to x. The evaluation map is simple description in categorical terms of an operation that applies a function from a to b (an arrow) to a value from a, resulting in an a value from b.
(I added the following section after this was initially posted; a commenter asked a question, and I realized that I hadn’t explained enough here, so I’ve added the explanation.
So what does the categorical exponential mean? I think it’s easiest to explain in terms of sets and functions first, and then just step it back to the more general case of objects and arrows.
If X and Y are sets, then XY is the set of functions from Y to X.
Now, look at the diagram:
* The top part says, basically, that g is a function from Z to to XY: so g takes a member of Z, and uses it to select a function from Y to X.
* The vertical arrow says:
* given the pair (z,y), f(z,y) maps (z,y) to a value in X.
* given a pair (z,y), we’re going through a function. It’s almost like currying:
* The vertical arrow going down is basically taking g(z,y), and currying it to g(z)(y).
* Per the top part of the diagram, g(z) selections a function from y to x. (That is, a member of XY.)
* So, at the end of the vertical arrow, we have a pair (g(z), y).
* The “eval” arrow maps from the pair of a function and a value to the result of applying the function to the value.
Now – the abstraction step is actually kind of easy: all we’re doing is saying that there is a structure of mappings from object to object here. This particular structure has the essential properties of what it means to apply a function to a value. The internal values and precise meanings of the arrows connecting the values can end up being different things, but no matter what, it will come down to something very much like function application.
Cartesian Closed Categories
—————————-
With exponentials and products, we’re ready for the cartesian closed categories (CCCs):
A Cartesian closed category is a category that is closed with respect to both products and exponentials.
Why do we care? Well, the CCCs are in a pretty deep sense equivalent to the simply typed lambda calculus. That means that the CCCs are deeply tied to the fundamental nature of computation. The *structure* of the CCCs – with its closure WRT product and exponential – is an expression of the basic capability of an effective computing system.
We’re getting close to being able to get to some really interesting things. Probably one more set of definitions; and then we’ll be able to do things like show a really cool version of the classic halting problem proof.

## 0 thoughts on “Categories: Products, Exponentials, and the Cartesian Closed Categories”

1. Ido

I’m starting to find the category theory posts really boring. It’s textbook stuff. Yes, I know, I don’t HAVE to read this blog, but I just find the bad math posts much more entertaining.

2. Canuckistani

I think I need a little help here. What is an example of categorical exponentiation?

3. Mark C. Chu-Carroll

Ido:
I like doing the good stuff as well as the bad; doing nothing but bad math would, frankly, bore me to death. Some of the recent cat stuff has been a bit boring, but category theory is very front-loaded with definitions, and you need to get through them before you can get to the fun stuff. I’ve been trying to take it slowly enough that people don’t get overwhelmed, but fast enough to get through the dull stuff and on to the fun.
If you’re not interested in the goodmath part, if you look at the topics headers, everything is tagged as either goodmath or badmath; you can just ignore anything that isn’t in the badmath category.

4. Mark C. Chu-Carroll

Canuckistani:
I think it’s easiest to explain in terms of sets first, and then just step it back.
If X and Y are sets, then XY is the set of functions from Y to X.
Now, look at the diagram.
The top part says, basically, that g is a function from a set Z to a set XY: so g takes a member of Z, and uses it to select a function from Y to X.
The bottom part says two things:
* given the pair (z,y), f(z,y) maps (z,y) to a value in X.
* If we have a pair (z,y); and we use the g from the top section (recall that it gives us a mapping from Z to a function, so g(z) = a function from Y to X), we can use that to get to a pair of a value in XY and a value in Y. The value in XY is the function returned by g(z) – so this is a pair like (g(z) : Y → X, y ∈ Y). The eval arrow maps from a pair of a function and a value to the result of applying that function to that value.
Now – the abstraction step is actually kind of easy: all we’re doing is throwing away the internal structure of the sets, and just keeping the structure of that concept of function selection and application.

5. Canuckistani

Thanks for the explanation! My problem was that I wasn’t distinguishing between the multiplication sign and the symbol “x”, so none of the symbols in the diagram made sense to me. (For example, I was reading the upper left node in the triangle as “z x to the y”.) Explaining it again in terms of sets let me figure out why my brain was jamming.

6. free music

Hi boys! :