Contarvariant functor and opposite category

430 Views Asked by At

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

2

There are 2 best solutions below

3
On BEST ANSWER

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...)

0
On

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} $$