Exponential object

In mathematics, specifically in category theory, an exponential object or map object is the categorical generalization of a function space in set theory. Categories with all finite products and exponential objects are called cartesian closed categories. Categories (such as subcategories of Top) without adjoined products may still have an exponential law.

Definition
Let $$\mathbf{C}$$ be a category, let $$Z$$ and $$Y$$ be objects of $$\mathbf{C}$$, and let $$\mathbf{C}$$ have all binary products with $$Y$$. An object $Z^Y$ together with a morphism $\mathrm{eval}\colon (Z^Y \times Y) \to Z$  is an exponential object if for any object $$X$$ and morphism $g \colon X\times Y \to Z$  there is a unique morphism $\lambda g\colon X\to Z^Y$  (called the transpose of $$g$$) such that the following diagram commutes: This assignment of a unique $$\lambda g$$ to each $$g$$ establishes an isomorphism (bijection) of hom-sets, $\mathrm{Hom}(X\times Y,Z) \cong \mathrm{Hom}(X,Z^Y).$

If $Z^Y$ exists for all objects $$Z, Y$$ in $$\mathbf{C}$$, then the functor $$(-)^Y \colon \mathbf{C}\to \mathbf{C}$$ defined on objects by $$Z \mapsto Z^Y$$ and on arrows by $$(f\colon X\to Z) \mapsto (f^Y\colon X^Y \to Z^Y)$$, is a right adjoint to the product functor $$-\times Y$$. For this reason, the morphisms $$\lambda g$$ and $$g$$ are sometimes called exponential adjoints of one another.

Equational definition
Alternatively, the exponential object may be defined through equations:
 * Existence of $$\lambda g$$ is guaranteed by existence of the operation $$\lambda - $$.
 * Commutativity of the diagrams above is guaranteed by the equality $$\forall g \colon X \times Y \to Z,\ \mathrm{eval} \circ (\lambda g \times \mathrm{id}_Y) = g$$.
 * Uniqueness of $$\lambda g$$ is guaranteed by the equality $$\forall h \colon X \to Z^Y, \ \lambda (\mathrm{eval} \circ (h \times \mathrm{id}_Y)) = h$$.

Universal property
The exponential $$Z^Y$$ is given by a universal morphism from the product functor $$- \times Y$$ to the object $$Z$$. This universal morphism consists of an object $$Z^Y$$ and a morphism $\mathrm{eval}\colon (Z^Y \times Y) \to Z$.

Examples
In the category of sets, an exponential object $$Z^Y$$ is the set of all functions $$Y \to Z$$. The map $$\mathrm{eval}\colon (Z^Y \times Y) \to Z$$ is just the evaluation map, which sends the pair $$(f, y)$$ to $$f(y)$$. For any map $$g\colon X \times Y \to Z$$ the map $$\lambda g\colon X \to Z^Y$$ is the curried form of $$g$$:
 * $$\lambda g(x)(y) = g(x,y).\,$$

A Heyting algebra $$H$$ is just a bounded lattice that has all exponential objects. Heyting implication, $$Y \Rightarrow Z$$, is an alternative notation for $$Z^Y$$. The above adjunction results translate to implication ($$\Rightarrow : H \times H \to H$$) being right adjoint to meet ($$\wedge : H \times H \to H$$). This adjunction can be written as $$(- \wedge Y) \dashv (Y \Rightarrow -)$$, or more fully as: $$(- \wedge Y): H \stackrel {\longrightarrow} {\underset {\longleftarrow}{\top}} H: (Y \Rightarrow -)$$

In the category of topological spaces, the exponential object $$Z^Y$$ exists provided that $$Y$$ is a locally compact Hausdorff space. In that case, the space $$Z^Y$$ is the set of all continuous functions from $$Y$$ to $$Z$$ together with the compact-open topology. The evaluation map is the same as in the category of sets; it is continuous with the above topology. If $$Y$$ is not locally compact Hausdorff, the exponential object may not exist (the space $$Z^Y$$ still exists, but it may fail to be an exponential object since the evaluation function need not be continuous). For this reason the category of topological spaces fails to be cartesian closed. However, the category of locally compact topological spaces is not cartesian closed either, since $$Z^Y$$ need not be locally compact for locally compact spaces $$Z$$ and $$Y$$. A cartesian closed category of spaces is, for example, given by the full subcategory spanned by the compactly generated Hausdorff spaces.

In functional programming languages, the morphism $$\operatorname{eval}$$ is often called $\operatorname{apply}$, and the syntax $$\lambda g$$ is often written $\operatorname{curry}(g)$. The morphism $$\operatorname{eval}$$ here must not to be confused with the  function in some programming languages, which evaluates quoted expressions.