If is a diagram and is its limit in , then we may naïvely say that this limit is preserved by a functor if is the limit of the composite diagram . However, it is not enough to state this at the level of objects; we also need to impose some coherence conditions, preserving the entire universal cone. Furthermore, we can use a trick involving the Yoneda embedding to get a meaningful condition even if has no limit in at all.
Recall (see limit) that a cone over in may be defined as an object of together with a natural transformation to from the composite , where is the terminal category. Then a terminal object in the category of these cones (if it exists) is a limit of in . Thus, a limit consists of an object and a natural transformation .
The functor preserves the limit if is a limit of the functor in . (Here, is a whiskering.)
Dually, preserves a colimit of if preserves it as a limit of .
If preserves all limits or colimits of a given type (i.e. over a given category ), we simply say that preserves that sort of limit (e.g. preserves products, preserves equalizers, etc.).
Let be the discrete category , so that picks out two objects and of and the limit of is a product of and . Note that this product comes equipped with product projections and . Then preserves this product if and only if is a product of and and furthermore the product projections are and .
Sometimes we want to say that a functor preserves a limit that does not actually exist in . For instance, a finitely continuous functor is usually defined as one that preserves all finite limits. If is a finitely complete category, then this is fine; such a functor is called left exact. But what if does not have all finite limits?
If and are locally small, then we can use the Yoneda lemma to turn the question into one involving categories that do have the required limits (and in fact have all limits), the presheaf categories and . (For colimits, use and ; for -enriched categories, use and , which will work if is complete.)
The left Kan extension of the composite along the Yoneda embedding (which always exists) is a functor from to , which may be written as (alluding to the bimodule nature of profunctors). A diagram becomes a diagram in , where it has a limit. If preserves this limit, then we say that preserves the hypothetical limit of .
Since the Yoneda embedding preserves and reflects all limits, if has a limit in , then this condition is equivalent to the condition that preserve it in the ordinary sense, but in general it is stronger than requiring that preserve the limit only if it exists in .
Finishing the motivating example, a flat functor may be defined as one that preserves all finite limits, whether or not they exist.