Proposition. Hom-functors preserve limits [math-TGEI]

This is a very useful property of hom-functor.

Let CC be a category, then its hom-functor can be wrote as

HomC:Cop×C→Sets\text{Hom}_C : C^{op} \times C \to Sets

If the limit lim←⁡Xi\varprojlim X_i exists in CC, then for all Y∈Ob(C)Y \in \text{Ob}(C) there is a natural isomorphism

HomC(Y,lim←⁡iXi)≅lim←⁡i(HomC(Y,Xi))\text{Hom}_C(Y, \varprojlim_i X_i) \cong \varprojlim_i (\text{Hom}_C(Y, X_i))

If the colimit lim→⁡iXi\varinjlim_i X_i exists in CC, then for all Y∈Ob(C)Y \in \text{Ob}(C) there is a natural isomorphism

HomC(lim→⁡iXi,Y)≅lim←⁡i(HomC(Xi,Y))\text{Hom}_C(\varinjlim_i X_i, Y) \cong \varprojlim_i (\text{Hom}_C(X_i, Y))

See nLab for more details.