Overview
The Yoneda lemma says that a natural family of operations defined on all maps into one object is determined by its value on that object’s identity map. It makes precise the idea of understanding an object through the ways other objects map to it. The statement is abstract, but its proof is a direct calculation with naturality.
Prerequisites
Know locally small categories and contravariant set-valued functors. Such a functor is a presheaf. For a small , its presheaves form an ordinary locally small functor category. Broader size settings require a fixed universe or explicit control of the transformation collections.
Definition and conventions
For an object of a small category and a presheaf , write . Yoneda gives a bijection, natural in and ,
This is the contravariant formulation. A dual formulation applies to covariant functors using maps out of . Keeping these variances explicit avoids reversing the formula by accident.
Intuition
The identity is a universal input. Every map is obtained from it by precomposition. If the operation respects all precompositions, its value at is forced by its value at the identity. Thus a huge family can be encoded by a single element.
Examples and non-examples
Let be the ordered category , with one arrow precisely when the order permits it. Then takes singleton values at zero and one, and the empty value at two. Take to be the constant two-element presheaf with every restriction map the identity.
A natural transformation must choose the same value at zero and one because of the arrow . Its component at two is the unique empty function. There are exactly two transformations, corresponding to .
Choosing zero at object zero and one at object one gives correctly typed component functions, but violates naturality. It is a non-example of a transformation, not an extra solution missed by the lemma.
Important properties
Given , define . Contravariant functoriality proves naturality. Conversely, naturality at forces exactly that formula from ; the two constructions are inverse.
Taking shows that natural transformations correspond to arrows . Hence the Yoneda embedding is fully faithful. A natural isomorphism of these representable functors forces and to be isomorphic, not necessarily equal.
Connections and further reading
Representability is the existence of a universal element whose induced transformation is invertible. Limits, moduli problems, and many universal constructions can be studied through this language. See Leinster, Theorem 4.2.1 and Corollary 4.3.7 and Li, “可表函子,” theorem labelled prop:Yoneda-lemma.