Covariant and contravariant functor There is a question on proving that a contravariant functor from category $C$ to category $D$ is the covariant functor from the opposite category of $C$ to $D$ and also a covariant functor from $C$ to the opposite category of $D$
(I have shown that this functor maps objects to objects and morphisms to morphisms...but I am not able to show how identity and composition will be preserved in this)..Please explain how to prove these two properties.
 A: As Andreas said, this is a matter of carefully checking equivalence of definitions, so for the sake of completeness and to avoid ambiguities I will first give the definition of a (covariant) functor and then that of a contravariant functor to then show partially that the definitions in question coincide; I say partially because to show equivalence of definitions is an "if and only if proof", but giving one half of it should be enough for you to see how to do the other bit, as the strategy is exactly analogous.

Definition: Let $\mathcal{C}$ and $\mathcal{D}$ be categories. A (covariant) functor $F$ from $\mathcal{C}$ to $\mathcal{D}$ is a mapping such that:

*

*$F$ assigns to every object $X$ in $\mathcal{C}$ an object $F(X)$ in $\mathcal{D}$.



*

*$F$ assigns to every morphism $f: X \rightarrow Y$ in $\mathcal{C}$ a morphism $F(f):F(X) \rightarrow F(Y)$ in $\mathcal{D}$.


Moreover, $F$ satisfies the functoriality axioms:

*

*$F(id_{X})= id_{F(X)}$ for every object $X$ in $\mathcal{C}$.


*$F(g \circ f) = F(g) \circ F(f)$ for all morphisms $f: X \rightarrow Y$ and $g: Y \rightarrow Z$ in $\mathcal{C}$.

$\ $

Definition: Let $\mathcal{C}$ and $\mathcal{D}$ be categories. A contravariant functor $F$ from $\mathcal{C}$ to $\mathcal{D}$ is a mapping such that:

*

*$F$ assigns to every object $X$ in $\mathcal{C}$ an object $F(X)$ in $\mathcal{D}$.



*

*$F$ assigns to every morphism $f: X \rightarrow Y$ in $\mathcal{C}$ a morphism $F(f):F(Y) \rightarrow F(X)$ in $\mathcal{D}$.


Moreover, $F$ satisfies the functoriality axioms:

*

*$F(id_{X})= id_{F(X)}$ for every object $X$ in $\mathcal{C}$.


*$F(g \circ f) = F(f) \circ F(g)$ for all morphisms $f: X \rightarrow Y$ and $g: Y \rightarrow Z$ in $\mathcal{C}$.



Claim: Let $\mathcal{C}$ and $\mathcal{D}$ be categories. A contravariant functor $F$ from $\mathcal{C}$ to $\mathcal{D}$ is a (covariant) functor $F'$ from $\mathcal{C}^{\text{op}}$ to $\mathcal{D}$.

Proof of Claim: Let $F$ be a contravariant functor from $\mathcal{C}$ to $\mathcal{D}$. Note that $F$ takes objects to objects and identity morphisms to identity morphisms by definition, so after setting $F'(X) = F(X)$ and $F'(id_{X}) = F(id_{X})$ for every object $X$ in $\mathcal{C}^{\text{op}}$ there are just two remaining things to do/check.

*

*$\underline{\textit{F' takes morphisms to morphisms:}}$ Let $f: Y \rightarrow X$ be an arrow in $\mathcal{C}^{\text{op}}$. Then there is an arrow $f^{\text{op}}: X \rightarrow Y$ in $\mathcal{C}$ and since $F$ is a contravariant functor by assumption, $F(f^{\text{op}}): F(Y) \rightarrow F(X)$ is an arrow in $\mathcal{D}$, so defining $F'(f)$ to be $F(f^{\text{op}}) : F(Y) \rightarrow F(X)$ gives a mapping which assigns to every arrow $f: Y \rightarrow X$ in $\mathcal{C}^{\text{op}}$ an arrow $F'(Y) \rightarrow F'(X)$ in $\mathcal{D}$ (note that $F'(Y) = F(Y)$ and $F'(X) = F(X)$ by the above).


*$\underline{\textit{F' respects the second functoriality axiom:}}$ Let $f: Y \rightarrow X$ and $g: Z \rightarrow Y$ be two arrows in $\mathcal{C}^{\text{op}}$, so that $f^{\text{op}}: X \rightarrow Y$ and $g^{\text{op}}: Y \rightarrow Z$ are arrows in $\mathcal{C}$. Then $f\circ g: Z \rightarrow X$ is an arrow in $\mathcal{C}^{\text{op}}$  and $(f\circ g)^{\text{op}}: X \rightarrow Z$ is an arrow in $\mathcal{C}$, so:
\begin{align}
F'(f \circ g) & = F((f\circ g)^{\text{op}}) \  \ \ \ \ \ \  \ \ \ \ \ \ &\text{ by definition of } F' \\
&= F(g^{\text{op}}\circ f^{\text{op}}) \  &\text{ since } (f\circ g)^{\text{op}} = g^{\text{op}}\circ f^{\text{op}}\\
&= F(f^{\text{op}})\circ F(g^{\text{op}}) \ &\text{ since }F\text{ is a contravariant functor}\\
&= F'(f)\circ F'(g) \ &\text{by definition of }F'
\end{align}
