# Compact closed category

In category theory, compact closed categories are a general context for treating dual objects. The idea of a dual object generalizes the more familiar concept of the dual of a finite-dimensional vector space. So, the motivating example of a compact closed category is FdVect, the category with finite-dimensional vector spaces as objects and linear maps as morphisms.

## Symmetric compact closed category

A symmetric monoidal category $(\mathbf{C},\otimes,I)$ is compact closed if every object $A \in C$ has a dual object. If this holds, the dual object is unique up to canonical isomorphism, and it is denoted $A^*$.

In a bit more detail, an object $A^*$ is called the dual of A if it is equipped with two morphisms called the unit $\eta_A:I\to A^*\otimes A$ and the counit $\varepsilon_A:A\otimes A^*\to I$, satisfying the equations

$\lambda_A\circ(\varepsilon_A\otimes A)\circ\alpha_{A,A^*,A}^{-1}\circ(A\otimes\eta_A)\circ\rho_A^{-1}=\mathrm{id}_A$

and

$\rho_{A^*}\circ(A^*\otimes\varepsilon_A)\circ\alpha_{A^*,A,A^*}\circ(\eta_A\otimes A^*)\circ\lambda_{A^*}^{-1}=\mathrm{id}_{A^*},$

where $\lambda,\rho$ are the introduction of the unit on the left and right, respectively.

For clarity, we rewrite the above compositions diagramatically. In order for $(\mathbf{C},\otimes,I)$ to be compact closed, we need the following composites to be $\mathrm{id}_A$:

$A\xrightarrow{\cong} A\otimes I\xrightarrow{A\otimes\eta}A\otimes (A^*\otimes A)\to (A\otimes A^*)\otimes A\xrightarrow{\epsilon\otimes A} I\otimes A\xrightarrow{\cong} A$

and

$A^*\to I\otimes A^*\xrightarrow{\eta}(A^*\otimes A)\otimes A^*\to A^*\otimes (A\otimes A^*)\xrightarrow{\epsilon} A^*\otimes I\to A^*$

## Definition

More generally, suppose $(\mathbf{C},\otimes,I)$ is a monoidal category, not necessarily symmetric, such as in the case of a pregroup grammar. The above notion of having a dual $A^*$ for each object A is replaced by that of having both a left and a right adjoint, $A^l$ and $A^r$, with a corresponding left unit $\eta^l_A:I\to A\otimes A^l$, right unit $\eta^r_A:I\to A^r\otimes A$, left counit $\varepsilon^l_A:A^l\otimes A\to I$, and right counit $\varepsilon^r_A:A\otimes A^r\to I$. These must satisfy the four yanking conditions, each of which are identities:

$A\to A\otimes I\xrightarrow{\eta^r}A\otimes (A^r\otimes A)\to (A\otimes A^r)\otimes A\xrightarrow{\epsilon^r} I\otimes A\to A$
$A\to I\otimes A\xrightarrow{\eta^l}(A\otimes A^l)\otimes A\to A\otimes (A^l \otimes A)\xrightarrow{\epsilon^l} A\otimes I\to A$

and

$A^r\to I\otimes A^r\xrightarrow{\eta^r}(A^r\otimes A)\otimes A^r\to A^r\otimes (A\otimes A^r)\xrightarrow{\epsilon^r} A^r\otimes I\to A^r$
$A^l\to A^l\otimes I\xrightarrow{\eta^l}A^l\otimes (A\otimes A^l)\to (A^l\otimes A)\otimes A^l \xrightarrow{\epsilon^l} I\otimes A^l\to A^l$

That is, in the general case, a compact closed category is both left and right-rigid, and biclosed.

Non-symmetric compact closed categories find applications in linguistics, in the area of categorial grammars and specifically in pregroup grammars, where the distinct left and right adjoints are required to capture word-order in sentences. In this context, compact closed monoidal categories are called (Lambek) pregroups.

## Properties

Compact closed categories are a special case of monoidal closed categories, which in turn are a special case of closed categories.

Compact closed categories are precisely the symmetric autonomous categories. They are also *-autonomous.

Every compact closed category C admits a trace. Namely, for every morphism $f:A\otimes C\to B\otimes C$, one can define

$\mathrm{Tr_{A,B}^C}(f)=\rho_B\circ(id_B\otimes\varepsilon_C)\circ\alpha_{B,C,C^*}\circ(f\otimes C^*)\circ\alpha_{A,C,C^*}^{-1}\circ(id_A\otimes\eta_{C^*})\circ\rho_A^{-1}:A\to B$

which can be shown to be a proper trace. It helps to draw this diagrammatically: $A\xrightarrow{\cong}A\otimes I\xrightarrow{\eta}A\otimes (C\otimes C^*)\xrightarrow{\cong}(A\otimes C)\otimes C^* \xrightarrow{f}(B\otimes C)\otimes C^*\xrightarrow{\cong}B\otimes(C\otimes C^*)\xrightarrow{\epsilon}B\otimes I\xrightarrow{\cong}B.$

## Examples

The canonical example is the category FdVect with finite-dimensional vector spaces as objects and linear maps as morphisms. Here $A^*$ is the usual dual of the vector space $A$.

The category of finite-dimensional representations of any group is also compact closed.

The category Vect, with all vector spaces as objects and linear maps as morphisms, is not compact closed.

### Simplex category

The simplex category provides an example of a (non-symmetric) compact closed category. The simplex category is just the category of order-preserving (monotone) maps of finite ordinals (viewed as totally ordered sets); its morphisms are order-preserving (monotone) maps of integers. We make it into a monoidal category by moving to the arrow category, so the objects are morphisms of the original category, and the morphisms are commuting squares. Then the tensor product of the arrow category is the original composition operator. The left and right adjoints are the min and max operators; specifically, for a monotonic function f one has the right adjoint

$f^r(n) = \sup \{m \in \mathbb{N} | f(m)\le n\}$

$f^l(n) = \inf \{m \in \mathbb{N} | n \le f(m)\}$

The left and right units and counits are:

$\mbox {id} \le f \circ f^l\qquad\mbox{(left unit)}$
$\mbox {id} \le f^r \circ f\qquad\mbox{(right unit)}$
$f^l \circ f \le \mbox {id}\qquad\mbox{(left counit)}$
$f \circ f^r \le \mbox {id}\qquad\mbox{(right counit)}$

One of the yanking conditions is then

$f = f \circ \mbox {id} \le f \circ (f^r \circ f) = (f \circ f^r) \circ f \le \mbox {id} \circ f = f.$

The others follow similarly. The correspondence can be made clearer by writing the arrow $\to$ instead of $\le$, and using $\otimes$ for function composition $\circ$.

### Dagger compact category

A dagger symmetric monoidal category which is compact closed is a dagger compact category.

## Rigid category

A monoidal category that is not symmetric, but otherwise obeys the duality axioms above, is known as a rigid category. A monoidal category where every object has a left (resp. right) dual is also sometimes called a left (resp. right) autonomous category. A monoidal category where every object has both a left and a right dual is sometimes called an autonomous category. An autonomous category that is also symmetric is then a compact closed category.

## References

Kelly, G.M.; Laplaza, M.L. (1980). "Coherence for compact closed categories". Journal of Pure and Applied Algebra 19: 193–213. doi:10.1016/0022-4049(80)90101-2.