# Definition of a Contravariant functor

Def: A contravariant functor between categories $$C$$ and $$D$$ contains the same data as a functor $$F:C\rightarrow D$$, except $$F(g \circ f) = F(f) \circ F(g)$$ Under this "definition" (I'm reading a text from a physics perspective), it seems like a contravariant functor is not a functor, despite what the name suggests, since functors between categories have to commute with composing morphisms, whereas these anticommute. Is this an accurate statement?

Also, it seems that this definition requires the categories in question to have at least 3 objects, in order to even test if a functor between them is contravariant. So for example, something that I would expect to be a contravariant functor, $$A \rightarrow B\ \ \ \mapsto \ \ \ \ A \leftarrow B$$ it's not clear to me if we can say that functor is contravariant under the given definition.

• A contravariant functor is a functor from $C^{\text{op}}$ to $D$. There is no restriction on the number of objects in each category. Commented Dec 31, 2018 at 22:48
• yes I've also seen this definition, and I have no trouble with that one. I just don't understand the one given above. Are they equivalent? Commented Dec 31, 2018 at 22:49
• So what you are calling an unqualified "functor" is actually a covariant functor. Contravariant reverses the order of composition. Also, in math, it doesn't matter if there are enough objects to "demonstrate" a definition. A good way to think of it is that if an object doesn't violate any part of the definition, then it satisfies the definition, regardless of whether it is a representative example. Commented Dec 31, 2018 at 22:54
• Jumping off Matt's (great) point, to avoid confusion it is probably best to always say either "covariant functor" or "contravariant functor", or alternatively to say only "functor" and always mean covariant (replacing contravariant functors with Lord Shark's defn).
– user98602
Commented Dec 31, 2018 at 23:17
• Your observation covariance and contravariance are relative to a specified domain is correct, for the reasons you point out. In practice, you never use the words "contravariant functor" except in the context "contravarant functor on [some fixed category]." Commented Jan 1, 2019 at 8:12

If you define a separate notion of "contravariant functor", then a contravariant functor is not a functor. You have two separate notions then: covariant functors from $$\mathcal C$$ to $$\mathcal D$$ and contravariant functors from $$\mathcal C$$ to $$\mathcal D$$.
Personally, I think having a notion of "contravariant functors" is a very bad idea. Instead, as Lord Shark the Unknown states, we can view the phrase "a contravariant functor from $$\mathcal C$$" as meaning "a (covariant) functor from $$\mathcal C^{op}$$". Then there is just a single notion of functor corresponding to the covariant case. With this approach, it never makes sense to say something like "a contravariant functor $$F:\mathcal C^{op}\to\mathcal D$$". You would say "a functor $$F:\mathcal C^{op}\to\mathcal D$$". This approach makes the $$\mathcal C\to\mathcal D$$ unambiguous and self-contained. With the co-/contra-variant functor approach, the $$\mathcal C\to\mathcal D$$ notation becomes ambiguous. I also find it useful to have the $${}^{op}$$s explicit as you can make sure that compositions "type-check". On the other hand, this explicit information is usually inferrable and thus is arguably adding noise.
Let $$F:C\rightarrow D$$ be a contravariant functor, and $$f:X\rightarrow Y, g:Y\rightarrow Z$$ be morphisms in $$C$$.
Note that $$F$$ reverses morphisms: $$F(f:X\rightarrow Y) = Ff:FY\rightarrow FX$$ and $$F(g:Y\rightarrow Z) = Fg:FZ\rightarrow FY$$.