# Toward compact double categories: Part 2

Anti-involutions of double categories

Published

June 24, 2024

This post is cross-posted at the Topos Institute blog.

Last time we framed the puzzle of axiomatizing categorical duality and introduced new double-categorical tools, culminating with the twisted Hom functor. We’ll now get straight to the point by proposing a definition of a compact double category. After that we’ll fill in a few remaining technical details. More interestingly, we will examine the key examples and find that in all cases a compact double category, unlike a compact bicategory, uniquely determines the dual objects up to equivalence, even isomorphism.

## Compact double categories

Definition 1 A compact double category is a symmetric monoidal double category $$(\mathbb{D}, \otimes, I)$$ equipped with an anti-involution $$(-)^*: \mathbb{D}^\mathrm{co}\to \mathbb{D}$$ and a twisted two-variable adjunction of the form

$\mathbb{D}(x \otimes y, z) \cong \mathbb{D}(x, y^* \otimes z)$

on objects $$x$$, $$y$$, and $$z$$ in $$\mathbb{D}$$. In particular, a compact cartesian double category is a compact double category in which the symmetric monoidal structure is cartesian.1 A compact double category is self-dual if the functor $$(-)^*_0: \mathbb{D}_0 \to \mathbb{D}_0$$ underlying the anti-involution is the identity functor.

So much for the main definition, but several terms need to be clarified. First, an anti-involution on a double category $$\mathbb{D}$$ is a double functor $$i := (-)^*: \mathbb{D}^\mathrm{co}\to \mathbb{D}$$ that is self-inverse in the sense that $$i \circ i^\mathrm{co}= 1_{\mathbb{D}}$$. As before, $$\mathbb{D}^\mathrm{co}$$ denotes the double category that reverses the proarrows and cells of $$\mathbb{D}$$.

The twisted two-variable adjunction in the definition goes between the two2 double functors

$\otimes: \mathbb{D} \times \mathbb{D} \to \mathbb{D} \qquad\text{and}\qquad \otimes \circ ((-)^* \times 1_{\mathbb{D}}): \mathbb{D}^\mathrm{co}\times \mathbb{D} \to \mathbb{D},$

by which we mean there is a pseudo natural isomorphism of twisted lax functors

$\operatorname{Hom}_{\mathbb{D}}((-) \otimes (=), \equiv) \cong \operatorname{Hom}_{\mathbb{D}}(-, (=)^* \otimes (\equiv)): \mathbb{D}^\mathrm{co}\times \mathbb{D}^\mathrm{co}\times \mathbb{D} \to \mathbb{P}\mathsf{rof}^\top,$

where $$\operatorname{Hom}_{\mathbb{D}}$$ denotes the twisted Hom functor on $$\mathbb{D}$$. Twisted lax double functors and their main example, the twisted Hom functor, were defined in the previous post.

To complete the definition of a compact double category, it remains to define a natural transformation, hence also a natural isomorphism, between twisted lax functors. Such a transformation has components in the tight direction of the codomain double category, just like a transformation between ordinary double functors.

Definition 2 A lax natural transformation between twisted lax double functors

consists of:

• for each object $$x$$ in $$\mathbb{D}$$, the component of $$\alpha$$ at $$x$$, an arrow $$\alpha_x: Fx \to Gx$$ in $$\mathbb{E}$$;

• for each arrow $$f: x \to y$$ in $$\mathbb{D}$$, the component of $$\alpha$$ at $$f$$, a cell in $$\mathbb{E}$$

• for each proarrow $$m: x \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}y$$ in $$\mathbb{D}$$, the naturality comparison of $$\alpha$$ at $$m$$, a cell in $$\mathbb{E}$$:

The following axioms must be satisfied.

• Naturality with respect to cells: for each cell $$\gamma$$ in $$\mathbb{D}$$,

• Functorality with respect to arrows: for composable arrows $$x \xrightarrow{f} y \xrightarrow{g} z$$ in $$\mathbb{D}$$,

and for each object $$x$$ in $$\mathbb{D}$$,

• Coherence of naturality comparisons with respect to external identities and composition: the usual axioms; cf. (Grandis 2019, Definition 3.8.2) or (Patterson 2024, Definition 3.1).

The lax natural transformation $$\alpha$$ is pseudo if each naturality comparison $$\alpha_m$$ is invertible with respect to external composition, and it is strict if each comparison is an external identity.

Thus, unwinding the definition, the twisted adjunction comprising a compact double category consists of:

• for each triple of objects $$x$$, $$y$$, $$z$$, an isomorphism of hom-categories $\operatorname{Hom}(x \otimes y, z) \xrightarrow{\cong} \operatorname{Hom}(x, y^* \otimes z),$ establishing a bijection between proarrows $m^\sharp: x \otimes y \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}z \qquad\leftrightsquigarrow\qquad m^\flat: x \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}y^* \otimes z;$

• for each triple of arrows $$f: x \to x'$$, $$g: y \to y'$$ and $$h: z \to z'$$, a natural isomorphism

establishing a bijection between cells

• for each triple of proarrows $$p: x' \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}x$$, $$q: y' \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}y$$, and $$r: z \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}z'$$, a natural isomorphism whose component at a proarrow $$m^\sharp: x \otimes y \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}z$$ is a globular isomorphism $p \odot m^\flat \odot (q^* \otimes r) \cong ((p \otimes q) \odot m^\sharp \odot r)^\flat.$

This data satisfies a list of naturality and coherence axioms that can be extracted from the above definition of a pseudo natural transformation between twisted lax functors.

Remark 2 (Level of strictness). We defined the anti-involution in a compact double category to be strictly self-inverse; objects and their duals to be equal, not just isomorphic, in a self-dual compact double category; and the correspondences between hom-categories to be isomorphisms, rather than equivalences. By the usual standards of two-dimensional category theory, all of these choices are too strict. So far I am not too worried since the examples of interest really are this strict. For example, the oppositization functor on $$\mathbb{P}\mathsf{rof}$$ is strictly self-inverse, and the correspondence between profunctors $$\mathsf{X} \times \mathsf{Y} \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}\mathsf{Z}$$ and $$\mathsf{X} \mathrel{\mkern 3mu\vcenter{\hbox{\shortmid}}\mkern-10mu{\to}}\mathsf{Y}^\mathrm{op}\times \mathsf{Z}$$ is trivially a bijection. Moreover, Shulman (2018) proves a strictification theorem for duality involutions on 2-categories, which we could hope extends to anti-involutions on double categories, though that is mere speculation. Selinger (2010) proposes coherence conditions for self-duality isomorphisms in a self-dual compact category, which I have not attempted to formulate for double categories. Finally, taking a natural isomorphism between twisted lax functors is perhaps the most questionable choice, but using a natural equivalence instead requires defining a suitable notion of modification, a task I preferred to avoid in this blog post.

## Examples

Having done all this work, let’s see how the notion of compact double category behaves in key examples, keeping in mind the problem of uniqueness of duals in compact bicategories.

Example 1 (Relations) The double category of relations is a self-dual compact cartesian double category. Duals are unique up isomorphism (bijection) because a relation is an equivalence if and only if it is the graph of an invertible function.

Example 2 (Spans) For any category $$\mathsf{S}$$ with finite limits, the double category $$\mathbb{S}\mathsf{pan}(\mathsf{S})$$ of spans in $$\mathsf{S}$$ is a self-dual compact cartesian double category. Duals are unique up to isomorphism in $$\mathsf{S}$$ because a span is an equivalence if and only if it is isomorphic to the graph of an isomorphism in $$\mathsf{S}$$.

In these first examples, duals are uniquely determined up to isomorphism by the compact bicategory. In general, since any equivalence can be upgraded to an adjoint equivalence, an equivalence in a bicategory $$\mathbf{B}$$ upgrades to an equivalence in $$\mathbf{Map}(\mathbf{B})$$, the bicategory of maps (left adjoints) in $$\mathbf{B}$$. Thus, if a double category is so well behaved that its bicategory of maps is equivalent to its underlying 2-category, then duals are uniquely determined up to 2-categorical equivalence merely by the bicategorical universal property. But the situation that arrows and maps in a double category coincide is very special: while it holds for relations and spans, it fails for matrices, profunctors, and bimodules over rings.

Before turning to those examples, let’s revisit the example of spans of sets from a different angle.

Example 3 (Spans, again) An anti-involution on the double category $$\mathbb{S}\mathsf{pan}$$ provides an involution on the category $$\mathsf{Set}$$. But any involution on $$\mathsf{Set}$$, in fact any auto-equivalence of $$\mathsf{Set}$$, is naturally isomorphic to the identity functor (Freyd 1964, Exercise 1.C). Indeed, any auto-equivalence preserves terminal objects, hence maps each singleton set to a singleton set, and preserves coproducts, hence sends each set to a set of the same cardinality. So we have a second proof of the uniqueness of duals in the compact cartesian double category $$\mathbb{S}\mathsf{pan}$$, completely independent of the first!

This example gives a first hint of the powerful effect that arrows in a double category can have in controlling the possible structures of a compact double category. Let’s keep going.

Example 4 (Profunctors) The double category $$\mathbb{P}\mathsf{rof}$$ is a compact cartesian double category, with opposite categories as dual objects. Duals are determined uniquely up to equivalence, even isomorphism, of categories. To see this, notice that an anti-involution on the double category $$\mathbb{P}\mathsf{rof}$$ provides an involution on the 1-category $$\mathsf{Cat}$$. But any involution on $$\mathsf{Cat}$$, in fact any auto-equivalence of $$\mathsf{Cat}$$, is naturally isomorphic to either the identity or the oppositization functor3 (Freyd 1964, Exercise 1.D). Of the two, only the latter satisfies the universal property of duals. By contrast, in the compact bicategory of profunctors, duals are determined only up to Morita equivalence of categories—the problem that first motivated our study. Thus we see how, in this crucial example, the 2-categorical and bicategorical sides of a compact double category, insufficient individually, work in concert to single out the duals.

Example 5 (Bimodules) The double category $$\mathbb{R}\mathsf{ing}$$ of rings, ring homomorphisms, bimodules, and bimodule homomorphisms is a compact double category, with tensor product as the symmetric monoidal product and opposite rings as dual objects. Duals are uniquely determined up to ring isomorphism. As before, an anti-involution on the double category $$\mathbb{R}\mathsf{ing}$$ gives an involution on the category $$\mathsf{Ring}$$ of rings and ring homomorphisms. Clark and Bergman (1973) show that any involution on $$\mathsf{Ring}$$, in fact any auto-equivalence of $$\mathsf{Ring}$$, is naturally isomorphic to either the identity or the oppositization functor.4 Only the latter satisfies the universal property of duals. By contrast, in the compact bicategory of bimodules over rings, duals are determined only up to Morita equivalence of rings.

## Outlook

Our stated aim was to characterize duals in formal category theory by universal properties. The proposed definition of a compact double category makes progress toward this end without unambiguously achieving it.

On the one hand, the definition of a compact double category, even in the cartesian case, takes the form of a structure, not a property, on a (cartesian) double category. That is perhaps inevitable for a definition like ours that applies to an arbitrary double category, since a compact bicategory can always be regarded as a compact double category with trivial arrows. How could one hope to improve upon bicategory theory in that case?

On the other hand, we have seen that in the essential examples, including the double categories of profunctors and of bimodules over rings, the presence of arrows is enough to force uniqueness of the compact structure in a strong sense. The facts I cite to establish this are based on careful analysis of the symmetries of the specific categories in question. So, there remains a puzzle, which I leave for the future: what are general sufficient conditions on a symmetric monoidal double category for any structure as a compact double category to be unique, at least up to tight equivalence?

## References

Aleiferi, Evangelia. 2018. “Cartesian Double Categories with an Emphasis on Characterizing Spans.” PhD thesis, Dalhousie University. arXiv:1809.06940.
Clark, W. Edwin, and George M. Bergman. 1973. “The Automorphism Class Group of the Category of Rings.” Journal of Algebra 24 (1): 80–99. DOI:10.1016/0021-8693(73)90154-3.
Freyd, Peter. 1964. Abelian Categories. Republished in: Reprints in Theory and Applications of Categories, No. 3 (2003) pp. 23–164. http://www.tac.mta.ca/tac/reprints/articles/3/tr3abs.html.
Grandis, Marco. 2019. Higher Dimensional Categories: From Double to Multiple Categories. World Scientific. DOI:10.1142/11406.
Patterson, Evan. 2024. “Transposing Cartesian and Other Structure in Double Categories.” arXiv:2404.08835.
Selinger, Peter. 2010. “Autonomous Categories in Which $$A$$ Is Isomorphic to $$A^*$$ (Extended Abstract).” In 7th Workshop on Quantum Physics and Logic (QPL 2010), 151–60. http://www.cs.ox.ac.uk/people/bob.coecke/PDFS/20-Selinger.pdf.
Shulman, Michael. 2018. “Contravariance Through Enrichment.” Theory and Applications of Categories 33 (5): 95–130. http://www.tac.mta.ca/tac/volumes/33/5/33-05abs.html.
Weber, Mark. 2007. “Yoneda Structures from 2-Toposes.” Applied Categorical Structures 15: 259–323. DOI:10.1007/s10485-007-9079-2.

## Footnotes

1. Recall that a cartesian double category is a double category $$\mathbb{D}$$ such that the diagonal double functor $$\Delta: \mathbb{D} \to \mathbb{D} \times \mathbb{D}$$ and the double functor $$!: \mathbb{D} \to \mathbb{1}$$ have right adjoints $$\times: \mathbb{D} \times \mathbb{D} \to \mathbb{D}$$ and $$1: \mathbb{1} \to \mathbb{D}$$ (Aleiferi 2018, Definition 4.2.1).↩︎

2. Strictly speaking, a twisted two-variable adjunction, like an ordinary two-variable adjunction, is between three functors, but since we are assuming the monoidal double category is symmetric, the third part is superfluous.↩︎

3. Thanks to John Baez for telling me about this interesting fact and then writing it up with a proof on the nLab.↩︎

4. More generally, Clark and Bergman (1973) show that for any commutative ring $$R$$, the automorphism class group of the category of $$R$$-algebras is the product of the automorphism group of $$R$$ and the cyclic group $$\{1, \mathrm{op}\} \cong \mathbb{Z}_2$$.↩︎