nLab 2-category with contravariance

2-categories with contravariance


A 2-category with contravariance is a 2-category-like structure that contains a basic notion of contravariant morphism. There are multiple ways to make this precise, depending on what sort of natural transformations we include.

No mixed-variance transformations

The simplest case is when we include only natural transformations between functors of the same variance. In this case, for any two objects xx and yy we will have two disjoint hom-categories hom +(x,y)hom^+(x,y) and hom (x,y)hom^-(x,y) whose objects are called “covariant” and “contravariant” respectively, and composition functors

hom +(y,z)×hom +(x,y) hom +(x,z) hom +(y,z)×hom (x,y) hom (x,z) hom (y,z)×hom +(x,y) op hom (x,z) hom (y,z)×hom (x,y) op hom +(x,z) \begin{aligned} hom^+(y,z) \times hom^+(x,y) &\to hom^+(x,z)\\ hom^+(y,z) \times hom^-(x,y) &\to hom^-(x,z)\\ hom^-(y,z) \times hom^+(x,y)^{op} &\to hom^-(x,z)\\ hom^-(y,z) \times hom^-(x,y)^{op} &\to hom^+(x,z) \end{aligned}

Note that the variances behave like a /2\mathbb{Z}/2-grading?, with covariant functors considered “even” and contravariant functors “odd”. Moreover, postcomposing with a contravariant functor is a contravariant operation.

This sort of 2-category with contravariance can be described more abstractly in two ways:

  • It is a generalized multicategory relative to the 2-monad on 2-Cat defined by ob(TA)=ob(A)ob(T A) = ob(A) and TA(x,y)=A(x,y)+A(x,y) opT A(x,y) = A(x,y) + A(x,y)^{op}.

  • It is an enriched category over the category V=Cat×CatV = Cat \times Cat with the non-standard (and non-symmetric) monoidal structure

    (A +,A )(B +,B )=(A +×B ++A ×(B ) op,A +×B +A ×(B +) op).(A^+,A^-)\otimes (B^+,B^-) = (A^+\times B^+ + A^-\times (B^-)^{op}, A^+\times B^- + A^- \times (B^+)^{op}).

The operation “opop” can then be characterized by a universal property, using the representability property of a generalized multicategory or the notion of copowers in an enriched category. See Shulman 2016 for more details.


  • Of course, Cat with its usual notion of contravariant functor.

  • If VV is any symmetric monoidal category, then VV-categories have opposites and so we can define contravariant VV-functors in the usual way.

  • 2-categories of indexed categories and fibrations have “fiberwise” opposites and hence fiberwise contravariant morphisms.

  • More generally, any 2-category with a duality involution has an underlying 2-category with contravariance, and conversely a 2-category with contravariance that has all “opposites” (characterized by a universal property as above) has a duality involution.

  • For instance, if BB is a compact closed bicategory, then its sub-bicategory of “maps” (left adjoint morphisms) has a duality involution given by the duals in BB, and hence is a “bicategory with contravariance”.

With mixed-variance transformations

It is also possible to define natural transformations from a covariant functor to a contravariant functor or vice versa, as a special case of dinatural transformations; thus we might ask for a sort of 2-category with contravariance that includes these as well. (This will include many of the examples above, but not VV-enriched categories unless VV is cartesian monoidal, and thus also not the bicategory of maps in BB unless BB is not just compact closed but a cartesian bicategory.)

Now our hom-objects will not decompose into two disjoint categories hom +hom^+ and hom hom^-. Instead we have only one hom-category, but with gradings of “even” (covariant) or “odd” (contravariant) assigned to its objects (the morphisms of our 2-category-like structure). In the example of Cat, the objects of these hom-categories will be all functors, covariant and contravariant alike, with covariant ones considered even and contravariant ones odd.

The 22-morphisms FαG:CDF\stackrel{\alpha}{\Rightarrow}G\colon C\to D in CatCat are as usual ob(C)\ob(C)-indexed families of morphisms FXα XGXFX\stackrel{\alpha_X}{\to} GX, but the commutative diagram they will have to satisfy for each XfYX\stackrel{f}{\to} Y in CC depends on the combination of variances of FF and GG:

FX Ff FY FX Ff FY FX Ff FY FX Ff FY α X α Y α X α Y α X α Y α X α Y GX Gf GY GX Gf GY GX Gf GY GX Gf GY \array{ FX&\stackrel{Ff}{\rightarrow}&FY&&FX&\stackrel{Ff}{\rightarrow}&FY&&FX&\stackrel{Ff}{\leftarrow}&FY&&FX&\stackrel{Ff}{\leftarrow}&FY \\\alpha_X\downarrow&&\alpha_Y\downarrow&& \alpha_X\downarrow&&\alpha_Y\downarrow&& \alpha_X\downarrow&&\alpha_Y\downarrow&& \alpha_X\downarrow&&\alpha_Y\downarrow \\GX&\stackrel{Gf}{\rightarrow}&GY&&GX&\stackrel{Gf}{\leftarrow}&GY&&GX&\stackrel{Gf}{\rightarrow}&GY&&GX&\stackrel{Gf}{\leftarrow}&GY }

Note that these are the special cases of dinatural transformations between functors C op×CDC^{op}\times C\to D when both functors depend only on one of CC or C opC^{op}. It is clear that “vertical” composition of 22-morphisms makes sense, so we do have hom-categories whose objects are functors of both variances. Note that if we consider transformations between functors of different variance to be graded odd and natural transformation between functors of the same variance to be graded even, then vertical composition is appropriately additive on the grading (the composition of two even morphisms, or two odd ones, is even; while the composition of an even and an odd morphism is odd).

Horizontal composition is trickier to describe. Of course, we can compose functors of both sorts, and this is also additive on the grading. Moreover, we can whisker a transformation of any sort by a functor of either sort on either side, and postwhiskering by an odd functor reverses the direction of a transformation. There is an appropriate interchange law (it is just the “naturality square” for the second transformation involved), so we have something that looks sort of like a 2-category.

Conjecture: Let WW be the category whose objects are categories with /2\mathbb{Z}/2-gradings assigned to their objects, and whose morphisms are functors preserving grading. Then there is a biclosed (non-symmetric) monoidal structure on WW (or at least a closed category or multicategory structure) such that the above structure on categories, functors of both variances, and transformations assembles into a WW-enriched category.


Created on June 17, 2016 at 17:36:15. See the history of this page for a list of all contributions to it.