Cartesian closed category

In category theory, a category is cartesian closed if, roughly speaking, any morphism defined on a product of two objects can be naturally identified with a morphism defined on one of the factors. These categories are particularly important in mathematical logic and the theory of programming. For generalizations of this notion, see monoidal category.

Contents

Definition

The category C is called cartesian closed iff it satisfies the following three properties:

The right adjoint of −×Y, applied to the object Z, is written as HOM(Y,Z), Y=>Z or ZY; we will use the exponential notation in the sequel. The adjointness condition means that the set of morphisms in C from X×Y to Z is naturally identified with the set of morphisms from X to ZY, for any three objects X, Y and Z in C.

Discussion

For people who don't have a feel for how adjoints work, another way of formulating the third condition is that for any two objects Y and Z of C, there is an exponent object ZY and arrow eval:ZY×YZ with the following property: for every object X of C and arrow f:X×YZ, there's a unique arrow λf:XZY such that f=eval o λf×IdY.

For what this means if the category is Set (where the arrows are functions), see Applications below.

Examples

Examples of cartesian closed categories include:

The following categories are not cartesian closed:

Applications

In cartesian closed categories, a "function of two variables" (a morphism f:X×YZ) can always be represented as a "function of one variable" (the morphism λf:XZY). In computer science applications, this is known as currying; it has led to the realization that simply-typed lambda calculus can be interpreted in any cartesian closed category.

Certain cartesian closed categories, the topoi, have been proposed as a general setting for mathematics, instead of traditional set theory.

The renowned computer scientist John Backus has advocated a variable-free notation, or Function-level programming, which in retrospect bears some similarity to the internal language of cartesian closed categories. CAML is more consciously modelled on cartesian closed categories.

Equational theory

In every cartesian closed category (using exponential notation), (XY)Z and (XZ)Y are isomorphic for all objects X, Y and Z. We write this as the "equation"

(xy)z = (xz)y

What other such equations are valid in all cartesian closed categories? It turns out that all of them follow logically from the following axioms:

See also: Cartesian closed category, Abelian group, Adjoint functor, Algebraic topology, CAML, Category theory, Compactly generated space, Computer science, Continuous, Currying