Algebras are promonads
This post is cross-posted at the Topos Institute blog.
You’ve probably heard the slogan that “a monad is a monoid in a category of endofunctors.” By analogy, a promonad is a monoid in a category of endoprofunctors. Or, if you prefer, a promonad is a monad in the bicategory of profunctors.1 I found myself thinking about promonads recently, for reasons that I will reveal in the fullness of time.
On Math.SE, Bertalan Pecsi (“Berci”) made the interesting remark that a promonad on a category is analogous to an algebra over a ring. That struck me as implicitly a strong endorsement of promonads since algebras over a ring are a big deal in mathematics! The aim of this post is to formalize the analogy by showing that a suitably abstracted notion of promonad includes both promonads on categories and algebras over rings as special cases.
To accomplish this, we will exercise the machinery of double theories that Michael Lambert and I recently introduced (Lambert and Patterson 2024), building on work by Paré (2011) and others. So this post can also be read as a brisk introduction to double theories centered around a particular example. The technical level will be higher than in my ongoing series on “why double categories?” in that I will assume you’ve encountered, or are at least willing to look up, the main concepts of double category theory.
The module construction
Double theories are motivated by, among other things, the module construction. This construction takes a double category
Given a double category
- an object
in , the object carrier; - a proarrow
in , the morphism carrier; - composition and unit cells
satisfying laws of associativity and unitality. A profunctor or bimodule between categories
- a proarrow
, and - left and right action cells
satisfying associativity, unitality, and compatibility laws. Functors and transformations internal to
Two examples are most relevant to us, and also demonstrate the versatility of the construction. The ur-example is that, applied to the double category of spans, the module construction gives the virtual double category
of categories, functors, profunctors, and multimaps of profunctors, which is representable as a double category via the coend formula for composing profunctors. This justifies the terminology introduced above.
For the second example, recall that a monoidal category
Taking
of rings, ring homomorphisms, bimodules over rings, and multilinear maps, which is representable as double category via the tensor product of bimodules. So we are building on the familiar fact that a ring3 is the same thing as a monoid in abelian groups. The double category of rings is an interesting one and has been studied in some detail by Paré (2021).
Simple double theories
You might have heard that a lax double functor
In fact, for any pair of double categories
The arrows in
The isomorphism above suggests a generalization of the module construction. We take a small, strict double category
The theory of promonads
With that background, we return to the original idea of the post. The theory of promonads is the double category
- an object
- an endoproarrow
- a unit cell
subject to the relations
As a consequence of the relations, the double category
Promonads
Promonads in a double category
Naturally, we will define a promonad to be a model of the double theory of promonads. Such models can be characterized in two useful ways.
Proposition 1 For any double category
- a model in
of the theory of promonads, namely a lax functor ; - a pair of categories
and in having the same object carrier, together with a functor between them that is the identity on the object carrier; - a category
in together with a profunctor and multimaps of profunctors and such that the multiplication is associative and the following two compatibility conditions are satisfied.
A promonad in a double category
We should characterize the arrows, proarrows, and multicells of
Algebras over rings
We define the virtual double category of algebras to be
By the proposition above, the objects of
- a pair of rings
and together with a ring homomorphism , or - a ring
and an -bimodule , along with an associative, -bilinear multiplication and an -linear map such that
How does this definition compare with the usual one? Actually, the definition of a (noncommutative) algebra over a (noncommutative) ring is not completely standardized. It is fun to ask what it should be. The second characterization above agrees with the definition proposed by Martin Brandenburg on Math.SE. Mac Lane and Birkhoff similarly characterize algebras over a field in their textbook Algebra (Mac Lane and Birkhoff 1999, Theorem IX.23).
When both the ring and the algebra are commutative, our definition agrees with the standard one. Indeed, textbooks on commutative algebra, including those by Atiyah-MacDonald and Eisenbud, commonly define a commutative algebra to be a ring homomorphism
Promonads on categories
The virtual double category of promonads without further qualification is
A promonad is equivalently a
- a pair of categories
and with the same objects, together with an identity-on-objects functor , or - a category
and a profunctor , along with an associative family of composition operations, satisfying the equations whenever they make sense for morphisms and heteromorphisms , and finally a natural transformation satisfying the equations whenever they make sense for morphisms and a heteromorphism .
The first characterization as an identity-on-objects functor4 is far more succinct, but I find the second more evocative of the intuitve idea of an algebra. One might even say that a promonad on a category is an “algebra over a category.” In a future post, I will explain how this perspective can be put to good use.
Epilogue: change of semantics
We’ve seen that promonads on categories and algebras over rings are both instances of a single concept—more precisely, they are models of the same double theory in different semantics—but we can, if we wish, go further and place them into the same mathematical universe. While not essential to the main thread of the post, this epilogue illustrates an important feature of double theories: the ease of changing of semantics. In general, flexibility in the choice of semantics is one of the big advantages of functorial semantics. In case of the double-functorial semantics, it generalizes change of base for enriched categories.
For any distributive monoidal category
whose objects are either categories enriched over abelian groups or ringoids, depending on whether you prefer to emphasize their “category-like” or “ring-like” aspect.
Any lax monoidal functor
that is the identity on objects and arrows and acts on
which is a promonad in the double category of abelian group-valued matrices.
There is also, for any distributive monoidal category
So, promonads over categories and algebras over rings can both be seen as “algebroids over ringoids,” in the first case by freely adding formal sums and in the second by viewing algebras over rings as algebroids over ringoids, both with one object. While neither identification is very surprising at this point, double-functorial semantics makes achieving them as simple as post-composition.
References
Footnotes
While hardly a famous concept, promonads on enriched categories have occasionally been invoked by Street and collaborators, for example in (Street and Panchadcharam 2007, sec. 12). The related idea of an “arrow” has been studied independently by programming language theorists.↩︎
It is worth noting, though, that these last two definitions, unlike the first two, involve nonidentity arrows in the double category
, hence cannot be fully realized in a bicategory.↩︎In this post, all rings have units and ring homomorphisms preserve units.↩︎
One might also worry that an identity-on-objects functor refers to categories that “have the same objects” and so violates the principle of equivalence. But whether that is so depends on one’s perspective. To avoid this problem, the nLab suggests that an identity-on-objects functor be defined as a category enriched in the arrow category of
. Alternatively, our second characterization also respects the principle of equivalence. Notice that the latter formulations, via enriched categories and double theories, both treat identity-on-object functors as objects, whereas naively such functors are morphisms between categories. The distinction is meaningful: given a pair of categories, it violates the principle of equivalence to ask whether they have same objects, but given a set of objects, it is perfectly acceptable to put two different category structures on it.↩︎