# Contarvariant functor and opposite category

We say that a functor $F\ :\ \mathcal{C}\rightarrow\mathcal{D}$ is contravariant if it switches arrow directions.

We may formulate it by first defining covariant functors, that preserve arrow directions and describe contravariant functors as covariant functors of type $\mathcal{C}^{opp}\rightarrow\mathcal{D}$, where $\mathcal{C}^{opp}$ is the opposite category of $\mathcal{C}$.

Now I'm wondering if there's a reason why we don't usually describe them as covariant functors of type $\mathcal{C}\rightarrow\mathcal{D}^{opp}$? Is there a particular reason to this: covenience (why?), convention etc.

If one can give examples it would be even better. I know they are equivalent formulations

• I guess in usual applications, $\mathcal{D}$ is a category we know and we don't want to switch its arrows, whereas $C$ is "generic" so we don't mind. I'm thinking, for instance, of presheaves $C^{op} \to Set$: it would be really weird to consider $Set^{op}$ for these – Maxime Ramzi Nov 15 '17 at 18:31

The functor $(-)^{\mathrm{op}} : \mathbf{Cat} \to \mathbf{Cat}$ is an isomorphism (in fact, an involution), so mathematically it doesn't really matter. The practice of encoding contravariant functors as covariant functors is really just for the sake of convenience.

Of the two 'obvious' ways to do it, the $\mathcal{C}^{\mathrm{op}} \to \mathcal{D}$ version is more convenient in practice, for a several reasons:

1. Some of the most common examples of a contravariant functor are presheaves (and, by extension, sheaves and so on), which are contravariant functors from a category $\mathcal{C}$ to $\mathbf{Set}$, or in enriched category theory, to some kind of monoidal category $\mathcal{V}$. We think of presheaves over $\mathcal{C}$ as $\mathcal{C}$-indexed families of sets (or $\mathcal{V}$-objects) with an action of the morphisms of $\mathcal{C}$. If we encode a presheaf on $\mathcal{C}$ as a functor $\mathcal{C}^{\mathrm{op}} \to \mathbf{Set}$ then this works nicely, but if we encode it as a functor $\mathcal{C} \to \mathbf{Set}^{\mathrm{op}}$ then the morphisms in the category we're working in are all backwards.
2. A special case of (1) is group actions. Let $G$ be a group; a right $G$-set is a set $X$ equipped with functions $(-) \cdot g : X \to X$ for all $g \in G$, satisfying $x \cdot 1 = x$ and $x \cdot (gh) = (x \cdot g) \cdot h$ for all $g,h \in G$ and all $x \in X$.

This is precisely a contravariant functor $\rho$ from $G$ to $\mathbf{Set}$, where $G$ is interpreted as a one-object category whose morphisms are the elements of $G$; the action of $\rho$ on morphisms is given by $\rho(g) = (-) \cdot g$ for all $g \in G$

If we encode this as a functor $\rho : G^{\mathrm{op}} \to \mathbf{Set}$, then for each $g \in G$ we have a function $\rho(g) = (-) \cdot g : X \to X$, and functoriality of $\rho$ says precisely that these functions interact as they should. If we encode it as a functor $\rho : G \to \mathbf{Set}^{\mathrm{op}}$, then we have to think of the map $\rho(g)$ as an 'opposite of a function', which is just... dreadful... and makes the translation between right actions and contravariant functors much less convenient to work with.

3. By encoding a contravariant functor from $\mathcal{C}$ to $\mathcal{D}$ as a functor $\mathcal{C}^{\mathrm{op}} \to \mathcal{D}$, we can view it as a diagram in $\mathcal{D}$ of shape $\mathcal{C}^{\mathrm{op}}$, which makes it easier to talk about limits and colimits.

I have seen a paper which had reason to encode some contravariant functors as covariant functors $\mathcal{C} \to \mathcal{D}^{\mathrm{op}}$, but they have good reason to do so. (I wish I could remember the paper...)

• Thank you for the examples. Don't hesitate to come back to add the article if you find it. I'm really curious to see it now. – Andrei.B Nov 15 '17 at 23:07
• @CliveNewstead A few weeks ago, Emily Riehl mentioned on the categories mailing list that with Eugenia Cheng and Nick Gurski, they had considered something of that kind in this paper because it made some definitions more natural: arxiv.org/pdf/1208.4520.pdf Perhaps this is what you had in mind? – Arnaud D. Nov 16 '17 at 11:21
• @ArnaudD.: That's likely it (or related work). Emily and Eugenia have both given talks at the Carnegie Mellon HoTT seminar in the last couple of years, and I'm that's where I saw it. – Clive Newstead Nov 16 '17 at 14:51

Because functors, much like functions, are thought of and notated as things that produce 'elements' of their codomain. Grammatically, we want to read $F(c)$ as being of type "object of $\mathcal{D}$", which means we need the $F : \mathcal{C}^\mathrm{op} \to \mathcal{D}$ version.

Another example is that this convention makes it possible to notate bifunctors with mixed variance. For example, the hom-functor on a locally small category is of type

$$\hom : \mathcal{C}^\mathrm{op} \times \mathcal{C} \to \mathbf{Set}$$