A contravariant functor $F$ from a category $C$ to a category $D$ is simply a functor from the opposite category $C^op$ to $D$.
To emphasize that one means a functor $C \to D$ as stated and not as a functor $C^{op} \to D$ one sometimes says covariant functor for non-contravariant, for emphasis.
Equivalently, a contravariant functor from $C$ to $D$ may be thought of as a functor from $C$ to $D^op$, but the version above generalises better to functors of many variables.
Also notice that while the objects of the functor category $[C^{op}, D]$ are in canonical bijection with those in the functor category $[C, D^{op}]$ (both are contravariant functors from $C$ to $D$), the morphisms in the two functor categories are in general different, as
This matters when discussing a natural transformation from one contravariant functor to another.
The above definition of contravariant functors as covariant functors out of (or into) the opposite category is unsatisfactory if one wishes to consider natural transformations between functors of different variance. In particular, it seems to break the $2$-categorical structure since with the above definition covariant and contravariant functors now live as objects in different categories $[C,D]$ and $[C^{op},D]$ inside the $2$-category Cat of categories and covariant functors, hence whatever natural transformations between functors of different variance are, it is not $2$-morphisms in Cat.
The correct thing to do is to define the $\mathbb{Z}/2$-graded $2$-category? of categories, functors, and natural transformations.
The objects of our $2$-category will be categories.
The $1$-morphisms of our $2$-category will be all functors, covariant and contravariant alike. The grading (on the $1$-categorical part at least) is then a functor to \mathbb Z/2
considered as one-object category, given by considering contravariant functors to be odd ($\mathbb Z1\bmod 2$) and covariant functors to be even $0\bmod 2$. Composition of functors is then additive on the grading (as it should be).
The $2$-morphisms $F\stackrel{\alpha}{\Rightarrow}G\colon C\to D$ will be once again $\ob(C)$-indexed families of morphisms $FX\stackrel{\alpha_X}{\to} GX$, but the commutative diagram they will have to satisfy for each $X\stackrel{f} Y$ in $C$ depends on the combination of variances of $F$ and $G$:
It is clear that (vertical) composition of $2$-morphisms makes sense, and that furthermore natural transformations between functors of different variance should be graded odd, while natural transformation between functors of the same variance should be graded even.
It is less clear that (but true!) that horizontal composition and whiskering also make sense. We thus have almost (strict) $2$-category, if it were not for the fact that the actions of whiskering by an odd functor act contravariantly on vertical composition (so horizontal composition itself does not behave as usual), so perhaps this is a slightly more general notion of a $2$-category.
What kind of notion of $2$-category is this? I’ve been using the phrase $\mathbb{Z}/2$-graded $2$-category, but this structure is not exactly a $2$-category because of the allowed contravariance in the whiskering/horiztonal composition. –Vladimir_Sotirov
In this context, the structure of the $\cdot^{op}$ operation becomes interesting: it is an involutive $2$-functor that preserves grading, but reverses $2$-morphisms, and furthermore comes equipped with natural isomorphisms $[-^{op},-]\cong[-,-]^{op}\cong[-,-^{op}]$ (this doesn’t make complete sense as we have not discussed yet how our new $2$-category is enriched in itself, so the meaning of $[-,-]^{op}$ is not completely clear…).
As mentioned in opposite 2-category, a $2$-category can have three different duals, depending on whether we formally flip only the $1$-morphisms, only the $2$-morphisms, or both. From the perspective in this article, however, it is better to say that $2$-functors have three different kinds of contravariance (hence there are four kinds of $2$-functors). Consequently, there should be two $\mathbb{Z}/2\times\mathbb{Z}/2$-graded $2$-categories (or maybe slightly more general structures since again how horizontal composition distributes over vertical composition will depend on the associated variances:
A $\mathbb{Z}/2\times\mathbb{Z}/2$-graded $2$-category of $2$-categories, $2$-functors of arbitrary variance, and lax natural transformations. Instead of giving each commutativity condition for the sixteen kinds of lax natural transformations, let us write down the one that a category of V-enriched categories comes equipped with: a lax natural transformation $F\stackrel{\alpha}\Rightarrow G\colon$C$\to$D, where $F$ is a $2$-functor flipping $2$-morphisms, and $G$ is $2$-functor flipping $1$-morphisms, consists of an $\ob(\mathbf{C})$-indexed family of $1$-morphisms $FX\stackrel{\alpha_X}{\to} GX$ in D, and for each two objects $X,Y$ of C, an $\ob[X,Y]$-indexed family of $2$-morphisms $\alpha_f$, so that for every $2$-morphism $f\stackrel{\gamma}{\Rightarrow} g$, we have the commutative diagram of $2$-moprhisms in D:
where . is whiskering/horizontal composition. Furthermore, given composable $1$-morphisms $X\stackrel{f}{\rightarrow}Y\stackrel{h}{\rightarrow} Z$, the $2$-moprhisms $\alpha_X\stackrel{\alpha_f}{\Rightarrow}Gf\circ\alpha_Y\circ Ff$ and $\alpha_Y\stackrel{\alpha_h}{\Rightarrow}Gh\circ\alpha_Z\circ Fh$ are related via the formula $\alpha_{h\circ f}=(Gf.\alpha_h.Ff)\circ\alpha_f$, which says that the pasting diagram of $2$-morphisms:
reduces to
A $\mathbb{Z}/2\times\mathbb{Z}/2$-graded $2$-category of $2$-categories, $2$-functors of arbitrary variance, and oplax natural transformations.
Somewhat mysteriously, the category of V-enriched categories is a $2$-category which comes with a unit enriched category $\mathcal{I}$ and either a lax natural transformation $[\mathcal{I},-]^{op}\Rightarrow[[\mathcal{I},-],V_0]$ (in the case of $\mathcal{V}$ a monoidal structure on $V$), or a lax natural transformation $[\mathcal{I},-]^{op}\Rightarrow[-,V^e]$ (in the case of $\mathcal{V}$ a closed structure on $[\mathcal{I},V^e]\cong V_0$).