What does Variance of Functor mean? I have to show that composition of two functor is covariant if the two functor has same variance, and composition of functors is contravariant if they have different variance.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Functors map both objects and morphisms. Covariant functors preserve morphism composition: $F(f \circ g) = F(f) \circ F(g)$. However, contravariant functors reverse this composition: $F(f \circ g) = F(g) \circ F(f)$.
So if you compose two functors of the same variance, you'll either get preserve + preserve = preserve or flip + flip = preserve (flip twice and you're back in order).
On the other hand if two functors have opposite variance, you'll have preserve + flip = flip (flipping once and preserve order once will result in flipping the order around).
"Variance" means the same type: either covariant ar contravariant.
So you are asked to show that the composition of two covariant or two contravariant functors is covarient, and that composition of a covariant functor with contravariant (in any order) is contravariant.