Retrotransformations
This post is cross-posted at the Topos Institute blog.
In recent work, Michael Lambert and I showed that cartesian double theories and their models, which are span-valued cartesian lax functors, provide a unifying framework for doctrines, at least up to a certain level in the hierarchy of categorical logic (Lambert and Patterson 2024). We considered two kinds of morphisms between lax double functors, namely lax natural transformations1 and modules, and showed that they form the arrows and proarrows of a (virtual) double category. Yet there is a third known kind of morphism between lax functors, transformations whose components are proarrows rather than arrows. We did not consider such “protransformations” between models of double theories. Are they good for anything? The answer, it turns out, is yes!
In this post, we will see that lax protransformations of a special kind, which I call “retrotransformations” after Robert Paré’s “retrocells” (Paré 2023), generalize a concept that has attracted interest lately: cofunctors. A cofunctor between categories is the purest distillation of the bidirectional mapping that occurs in a split opfibration or a delta lens, where objects are sent “forward” and morphisms are sent “backward” in a compatible way. The inspiration for this post is Bryce Clarke’s PhD thesis, The double category of lenses (Clarke 2022b), where cofunctors are shown to be the “retromorphisms” arising from retrocells in a double category. Alternatively, cofunctors are morphisms between polynomial comonoids, a point of view thoroughly investigated by my colleagues at Topos Institute (Niu and Spivak 2023).
The big picture is that retrotransformations fit into this table:
Single object | Multi-object |
---|---|
Functor | Natural transformation |
Cofunctor | Retrotransformation |
Profunctor | Module |
The left column lists notions of morphism between categories. The right column lists notions of morphism between lax functors
Retrotransformations between models of double theories are a device for generating new kinds of “generalized cofunctors,” which seems especially useful since cofunctors are so much less studied than functors or profunctors. As illustrations, we define “monoidal cofunctors” between monoidal categories and “multicofunctors” between multicategories. Analogously, we can define delta lenses between monoidal categories and between multicategories.
Lax protransformations
As usual with such matters, protransformations have a slick, conceptual definition, which then needs to be unpacked to be useful in any concrete situation. Let’s start with the conceptual definition.
Definition 1 Let
So, a lax protransformation
commutes; and second, a natural transformation
giving the pronaturality comparisons of the lax protransformation, which must also be well-typed in that the pasting below involving the source functor
is equal to the identity on
We are halfway done unpacking the definition. When it is fully unpacked, we recover a definition mildly generalizing that in (Grandis 2019, Definition 3.8.2). With the abbreviations
for each object
, a proarrow in , the component of at ;for each arrow
in , a cell in of the formcalled the component of
at ;for each proarrow
in , a globular cell in of the formcalled the pronaturality comparison of
at .
These must satisfy the following axioms.
Functorality of components:
and .Naturality with respect to cells: for every cell
in with source and target ,Coherence with respect to external composition: for every pair of composable proarrows
and in ,Coherence with respect to external identities: for every object
,
Finally, we say that a lax protransformation
It is interesting to ask what lax protransformations look like in examples, but we will set this aside for now and turn immediately to a specialization of the concept.
Retrotransformations
We are interested in lax protransformations whose components at objects, despite being proarrows, are obtained from ordinary arrows. That is what companions in a double category do. A companion of an arrow
A retrotransformation between lax functors is a lax protransformation whose components at objects are companions, in a coherent way.
Definition 2 Let
- a natural transformation
between functors, and - a lax protransformation
between lax functors
such that
- for every object
in , the proarrow in is the companion of the arrow , and - for every arrow
, the cell is induced by the naturality square for at .
Let us clarify the meaning of the last condition. By the sliding rule for companions (Paré 2023, sec. 1), the component of a retrotransformation at an arrow
can be identified with a special cell
The last condition in the definition of a retrotransformation says that the cell
So, contrary to initial appearances, a retrotransformation actually contains less data than a general lax protransformation. There is, for each object
The sliding rule cannot be used to simplify these cells, which are what give retrotransformations their distinctive character.
The following proposition explains how a retrotransformation between lax functors is a “multi-object retromorphism” in the sense of Paré (2023). Recall that if
Proposition 1 Let
Proof. For each object
is the retrocell part of the retromorphism. The two coherence axioms for a lax protransformation immediately give the two axioms of a retromorphism (Paré 2023, Definition 6.1). The last statement follows because retromorphisms between categories (in
Corollary 1 A retrotransformation between lax functors
Delta lenses between lax functors
The description of a delta lens as a compatible pairing of a functor with a cofunctor (Clarke 2020) suggests that a delta lens between lax functors should be defined as a compatible pairing of a natural transformation with a retrotransformation.
Definition 3 Let
- Compatibility on objects: the pair
is a retrotransformation, where denotes the ordinary natural transformation underlying . - Compatibility on proarrows: for every proarrow
in , we have
The second axiom says that the cell
Proposition 2 Let
Proof. The pair
Corollary 2 A delta lens between lax functors
Cartesian lax protransformations
In order to study generalized cofunctors between categorical structures such as monoidal categories and multicategories, we must consider models of cartesian double theories and lax protransformations between such models. One way to define a cartesian double category is as a pseudocategory in
Definition 4 Let
Equivalently, a lax protransformation
No extra conditions are needed for a retrotransformation or delta lens
Example: monoidal cofunctors between monoidal categories
To my knowledge, no notion of structure-preserving cofunctor between monoidal categories has been defined in the literature. We give a definition using the machinery developed so far. Let
Definition 5 A monoidal cofunctor (resp. monoidal delta lens) between monoidal categories is a retrotransformation (resp. delta lens) between the corresponding cartesian lax functors
Let’s sketch what a monoidal cofunctor amounts to concretely. Let
commute, i.e., the object map of the cofunctor strictly preserves the monoidal product and unit. Next, naturality with respect to the cells
The equation is well-typed (i.e., the cell
Thus, a monoidal delta lens from a monoidal category
It may seem strange that monoidal cofunctors and monoidal delta lenses strictly preserve monoidal products, even for weak monoidal categories, but this is consistent with related ideas in the literature. Shulman defines a monoidal opfibration between monoidal categories to be a functor that is both an opfibration and a strict monoidal functor, such that the monoidal product of the domain category preserves opcartesian liftings (Shulman 2008, sec. 12). A monoidal delta lens is what remains of a split monoidal opfibration when the universal property is discarded, just as a delta lens is for a split opfibration.
Example: multicofunctors between multicategories
Although often regarded as obscure, multicategories are in many ways simpler than monoidal categories, and the same is true for multicofunctors compared with monoidal cofunctors. Let
Definition 6 A multicofunctor5 (resp. delta lens) between multicategories is a retrotransformation (resp. delta lens) between the corresponding cartesian lax functors
Let’s take a quick look at a retrotransformation
giving a lifting operation
Because the theory of promonoids has no nontrivial arrows or cells, the only relevant axioms are the coherence axioms for lax protransformations. These axioms say that the lifting operations preserve composition of multimorphisms and identity morphisms in the multicategories.
Discussion
In a sense, this post completes the story about morphisms between models of cartesian double theories begun in (Lambert and Patterson 2024). There are three more-or-less known notions of morphism between lax double functor—natural transformations, protransformations, and modules—and they have all been shown to give useful notions of morphism between models, generalizing functors, cofunctors, and profunctors between categories.
There is plenty more that remains to be said. For starters, functors and cofunctors between categories form a double category (Clarke 2022b, sec. 3.1) and so should natural transformations and retrotransformations between lax double functors. There is a known notion of modification between natural transformations and pseudo protransformations (Grandis 2019, Definition 3.8.3) that could be plausibly be adapted to this purpose. However, the details need to be worked out. Beyond that, it is natural to wonder how all three notions of morphism between lax functors fit together and whether they can be united inside some three-dimensional structure.
References
Footnotes
Our usage of “natural transformation” follows Paré (2011). Under our orientation convention, where arrows are vertical and proarrows are horizontal, natural transformations are also called “vertical transformations.” However, the meaning of the latter phrase varies from author to author, hence our desire to avoid it.↩︎
Besides using different terminology for pseudo protransformations, Grandis takes his comparison cells to go in the oplax, rather than the lax, direction. Of course, this makes no difference in the pseudo case.↩︎
Terminology for categories internal to a double category varies. Paré (2023) calls them “monads,” which is meant to evoke “monads in the underlying bicategory of the double category.”↩︎
Recall that such a natural transformation automatically preserves finite products in the sense that it is a monoidal natural transformation for any choice of cartesian monoidal structure.↩︎
A different but equivalent definition of a multicofunctor is as a retromorphism between category objects in the double category of
-spans, where is the list monad (Clarke 2022a, 14). Thanks to Bryce Clarke for pointing this out.↩︎