Graded categories as double functors

Published

May 1, 2025

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

At last week’s Topos Colloquium, Rory Lucyshyn-Wright told us about categories graded by a monoidal category, following his recent preprint (). Graded categories, short for locally graded categories, were first introduced by Richard Wood under a different name (, ). Graded categories are of mathematical interest because they simultaneously generalize actions of a monoidal category (“actegories”) and, via a Yoneda-type embedding, enriched categories, while enjoying the advantage that extra monoidal structure like symmetry is not needed to construct functor categories and bifunctors.

My own interest was piqued since, from its very beginning, CatColab has featured categories graded by monoids. As the simplest example, categories graded by the multiplicative monoid of signs {+,} are called signed categories. Among these, the free signed categories are a good description of causal loop diagrams and regulatory networks (). Grading by a monoidal category generalizes grading by a monoid. In fact, within CatColab’s mathematical framework (), categories graded by a monoidal category are just the models of a simple double theory determined by the monoidal category.

The purpose of this blog post is to explain that. I will explain how a category graded by a monoidal category V is the same thing as a lax double functor B(V)opSpan, where the delooping double category B(V) is the monoidal category V viewed as a double category with trivial category of objects and arrows. First, I review the main definition.

Graded categories, concretely

There are several quick, conceptual ways to define a category graded by a monoidal category. I prefer to start with a fully concrete description.

Definition 1 Let (V,,I) be a monoidal category. A category C graded by V consists of:

  • a set of objects;
  • for each object x in V and each pair of objects a,b in C, a set Cx(a,b), whose elements are called morphisms from a to b graded by x, and denoted f:(x,a)b;
  • for each pair of objects x,y in V and triple of objects a,b,c in C, a composition operation Cx(a,b)×Cy(b,c)Cxy(a,c);
  • for each object a in C, an identity morphism 1CI(a,a) graded by the unit, denoted 1a:(I,a)a;
  • for each morphism α:xy in V and each pair of objects a,b in C, a reindexing operation α:Cy(a,b)Cx(a,b), sending a morphism f:(y,a)b in C to a morphism α(f):(x,a)b.

The following axioms must be satisfied.

  • Functorality of reindexing: we have (βα)(f)=α(β(f)) and 1x(f)=f whenever those equations make sense.
  • Naturality of composition: for all morphisms α:wx and β:yz in V and morphisms f:(x,a)b and g:(z,b)c in C, we have (αβ)(fg)=α(f)β(g).
  • Associativity and unitality: as expected, see (, Definition 3.3) for details.

Graded categories, double-categorically

A category graded by a monoidal category V is succinctly described as a category enriched in V^, the presheaf category V^:=[Vop,Set] with its monoidal structure given by Day convolution. While brief, this characterization is somewhat complicated since the formula for Day convolution involves a coend. The following characterizations are equally brief but avoid mention of any colimits.

Proposition 1 Let V be a monoidal category. The following are equivalent:

  1. Categories graded by V;
  2. Lax double functors B(V)opSpan;
  3. Discrete double fibrations over B(V), i.e., double functors P:DB(V) whose underlying functors P0:D0!1 and P1:D1V are discrete fibrations.

The equivalence between (2) and (3) is a general fact about double functors (), so we need only check that (1) and (2) are equivalent. Consider a lax double functor F:B(V)opSpan. The data of such a functor is just that of a V-graded category C:

  • The image F() of the unique object in the domain double category is the set of objects in C.
  • For each object x of V, the span F(x):F()F() is the set of all x-graded morphisms in C, along with the domain and codomain assignments.
  • For each pair of objects x,y in V, the laxator Fx,y:F(x)F(y)F(xy) gives the composition operation in C sending a compatible pair of x-graded and y-graded morphisms to a (xy)-graded morphism.
  • The unitor F:idF()F(I) gives the I-graded identity morphisms in C.

As for the axioms, functorality of F is equivalent to functorality of reindexing in C, naturality of the laxators of F is naturality of composition in C, naturality of the unitor of F is trivial, and finally the associativity and unitality axioms of the two structures coincide.

Since the only arrow in B(V) is the identity, a lax double functor B(V)opSpan can equally be described as a lax functor from the delooping bicategory of V to the bicategory of spans. As usual in such cases, the advantage of working double-categorically rather than bicategorically is that we get the right morphisms. It is straightforward to show that a (tight) natural transformation α:FG:B(V)opSpan between lax double functors is just a graded functor between graded categories, in the sense of (, Definition 3.5).

Pursuing this further, the above , stated somewhat loosely as a correspondence between objects, would be better upgraded to an equivalence between virtual double categories. Such an equivalence almost certainly holds, though I will not check the details here.

Examples

You can easily find examples of graded categories once you know to look for them. Two large classes of examples are V-enriched categories and V-actegories, each of which embed fully faithfully into V-graded categories (, Examples 3.8 & 3.9). Let’s look at more specific examples instead.

Grading by monoids

Since a discrete monoidal category is just a monoid, a category graded by a monoid is, in a degenerate way, a category graded by a monoidal category. We have already mentioned signed categories as a particular case. Further examples in that style are the different flavors of causal loop diagram appearing in CatColab and in John Baez’s blog series on polarities.

A step up in complexity to grade by a thin monoidal category, i.e., a monoidal preorder. In progamming jargon, the morphisms in such a graded category have types that are implicitly converted to a common supertype when composed.

Promonads

In an earlier post, we saw how to describe promonads as double functors, enabling us to formalize an analogy between promonads on a category and algebras over a ring. In fact, promonads are examples of graded categories. To be more precise, if Vop:={} is the monoidal poset of booleans under disjunction, then B(V)opTPromnd, where the theory of promonads TPromnd was introduced previously, and hence a V-graded category is the same thing as a category along with a promonad on it.

Grading by semilattices

Promonads capture the situation that a common set of objects admits two category structures, with one type of morphism mapping functorially into the other. Such situations occur often in mathematics, and not necessarily with just two types. Generalizing, we can take Vop to be any join-semilattice. For example, functions between real vector spaces, or subsets thereof, may obey any of the properties recorded in the following lattice (, Examples 2.4.2 & 2.4.3):

In such a V-graded category, an affine map can be composed with a conic-linear map to obtain a convex-linear map. As another example, Bonchi et al define an effectful triple to be, among other things, a category graded by the linear order [3], where the three types of morphisms model programs with pure functions, local effects, and global effects ().

Grading by cost

Let V=([0,],) be the monoidal poset of extended nonnegative real numbers under the opposite order, with monoidal product given by addition. Famously, a category enriched in V is a Lawvere metric space.

What about a category graded by V? We can think of a morphism ab graded by x0 as a “proof that the distance from a to b is at most x” or as a “path from a to b with cost at most x”. Composition in the graded category says that if we have a proof that the distance from a to b is at most x and a proof that the distance from b to c is at most y, then we get a proof that the distance from a to c is at most x+y. Reindexing says that if yx and we have a proof that the distance from a to b is at most x, then we get a weaker proof that said distance is at most y. Thus, V-graded categories are a minimal fragment of the “logic of analysis,” in which we can rarely calculate distances but must settle for bounding them.

Finally, categories with “parameterized” maps are often viewable as categories graded by the parameter spaces, with reindexing in the graded category being reparameterization. The nLab page on the Para construction lists many examples inspired by machine learning and optimization. The Para construction is taken to produce a bicategory, but making the reparameterizations be 2-cells in a bicategory obscures their fibered character, which is made explicit in a graded category. In terms of , the bicategory of parameterized maps can be recovered as the elements construction of a span-valued double functor or, equivalently, as the total double category in a discrete double fibration.

For the sake of variety, let’s see a different flavor of parameterized map, inspired by the Moore path category from topology.

Homotopies as graded morphisms

Let V be the category whose objects are nonnegative real numbers T, viewed as closed intervals [0,T], and whose morphisms TT are endpoint-preserving continuous maps α:[0,T][0,T]. Endow V with the monoidal product that acts by adding objects and concatenating morphisms, i.e., given maps α:[0,T][0,T] and β:[0,S][0,S], we have (αβ)(t):={α(t)if tTT+β(tT)if tT,0tT+S.

We will construct a V-graded category whose T-graded morphisms are homotopies of duration T. Fix a partial continuous map of topological spaces II0hX. The V-graded category Ch(I,X) will have, as objects, continuous maps f:IX extending the map h:I0X along the inclusion I0I, i.e., such that f(i)=h(i) for each iI0. Then a T-graded morphism fg is a homotopy from f to g relative to h and of duration T, meaning a continuous map H:I×[0,T]X satisfying the equations H(i,0)=f(i),iI,H(i,T)=g(i),iI,H(i,t)=h(i),iI0, t[0,T]. Homotopies fg and gk of respective durations T and S compose by concatenation to give a homotopy fk of duration T+S, and the identity homotopy on a map is the unique homotopy of duration zero. Finally, the reindexing of a homotopy H of duration T along a map α:[0,T][0,T] is the reparameterized homotopy α(H):=H(1I×α), which has duration T.

Important special cases of the graded category Ch(I,X) are:

  1. When I=1 and I0=0, the objects are points in X and T-graded morphisms are paths of duration T.
  2. When I=S1 is the circle and I0=1, the objects are loops in X with fixed base point and morphisms are basepoint-preserving homotopies between loops.
  3. When I=[0,1] is the unit interval and I0={0,1}, the objects are paths in X with fixed endpoints and the morphisms are endpoint-preserving homotopies between paths.

Thus, by augmenting our categories with a grading, we can build analogues of the fundamental group and fundamental groupoid without having to take any quotients. To recover a unit-duration homotopy from a composite of two such, simply reindex along any reparameterization α:[0,1][0,2], such as the linear one α(t):=2t. Of course, the choice of reparameterization is arbitrary. The point is that by keeping all of the reparameterizations around, we never have to choose just one, which is what forces quotienting in the standard constructions.

Bigraded categories

A careful study of graded categories from the perspective of double category theory (which I have not done!) would likely yield many insights. I’ll mention just one, concerning bigraded categories, that jumped out to me while skimming Lucyshyn-Wright ()’s paper.

Given a monoidal category V, write Vrev for the monoidal category with reversed multiplication, so that xrevy:=yx.

Definition 2 Let V and W be monoidal categories. A category bigraded by V and W is a category graded by the product V×Wrev.

The bigraded product is a construction that takes a V-graded category and a Wrev-graded category and produces V-W-bigraded category. It admits a simple description using double functors, which follows directly from the definitions.

Proposition 2 The bigraded product (, Definition 9.9) of V-graded and Wrev-graded categories, viewed as lax double functors F:B(V)opSpanandG:B(W)coopSpan, is given by the double functor B(V×Wrev)op=B(V)op×B(W)coopF×GSpan2×Span, where the final (pseudo) double functor is the product in the cartesian double category Span.

Outlook

If a V-graded category is a lax functor B(V)opSpan on the delooping double category, then why not drop the restriction to monoidal categories and define a category graded by a double category D to be a lax presheaf on D or, equivalently, a discrete double fibration over D? That is precisely what Michael and I called a model of the simple double theory Dop in our paper on cartesian double theories ().

However, grading is a concept with an attitude, suggestive of new examples that we did not consider. For example, a category graded by the core of the double category of finite sets and spans would be a higher-dimensional combinatorial species, having both objects and morphisms indexed by finite sets. I hope to revisit such ideas in a future post.

References

Aduddell, Rebekah, James Fairbanks, Amit Kumar, Pablo S. Ocal, Evan Patterson, and Brandon T. Shapiro. 2024. “A Compositional Account of Motifs, Mechanisms, and Dynamics in Biochemical Regulatory Networks.” Compositionality 6 (2). DOI:10.32408/compositionality-6-2. arXiv:2301.01445.
Bonchi, Filippo, Elena Di Lavore, and Mario Román. 2024. “Effectful Mealy Machines: Bisimulation and Trace.” arXiv:2410.10627.
Lambert, Michael. 2021. “Discrete Double Fibrations.” Theory and Applications of Categories 37 (22): 671–708. http://www.tac.mta.ca/tac/volumes/37/22/37-22abs.html.
Lambert, Michael, and Evan Patterson. 2024. “Cartesian Double Theories: A Double-Categorical Framework for Categorical Doctrines.” Advances in Mathematics 444: 109630. DOI:10.1016/j.aim.2024.109630. arXiv:2310.05384.
Lucyshyn-Wright, Rory B. B. 2025. V-graded Categories and V-W-bigraded Categories: Functor Categories and Bifunctors over Non-Symmetric Bases.” arXiv:2502.18557.
Paré, Robert. 2011. “Yoneda Theory for Double Categories.” Theory and Applications of Categories 25 (17): 436–89. http://www.tac.mta.ca/tac/volumes/25/17/25-17abs.html.
Patterson, Evan. 2020. “The Algebra and Machine Representation of Statistical Models.” PhD thesis, Stanford University. arXiv:2006.08945.
Wood, Richard J. 1976. “Indicial Methods for Relative Categories.” PhD thesis, Dalhousie University.
———. 1978. V-indexed Categories.” In Indexed Categories and Their Applications, 126–40. DOI:10.1007/BFb0061362.

Footnotes

  1. In the virtual double category of lax functors B(V)opSpan, the arrows are natural transformations, the proarrows are modules, and the multicells are multimodulations. See Paré (), Lambert (), or Lambert and Patterson ().↩︎

  2. The contravariance of the reindexing operation in a graded category is conventional, chosen to simplify the Yoneda-type embedding of enriched categories into graded categories. In this example it is a hindrance.↩︎