Proof of the Yoneda Lemma
We give a complete and detailed proof of the Yoneda Lemma, the single most important result in category theory. The proof constructs an explicit bijection, verifies it is an isomorphism, and establishes naturality in both variables. We then derive the key corollaries.
Statement
Let be a locally small category, , and a functor (i.e., a presheaf on ). Then there is a bijection
given by , where is the representable presheaf and is the set of natural transformations from to .
Moreover, this bijection is natural in both and : it defines a natural isomorphism of bifunctors .
Step 1: Defining the Map
Given a natural transformation , the component at is a function
We define
This is the "evaluation at the identity" map. The key insight is that, by naturality, the entire natural transformation is determined by this single element.
Step 2: Constructing the Inverse
Given an element , we must construct a natural transformation . For each object , we define the component
Here is the image of under the contravariant functor (recall , so a morphism in gives ).
Claim: is a natural transformation.
We must verify that for every morphism in , the following diagram commutes:
where is precomposition by , i.e., .
Verification: Let .
Going right then down:
where the last equality uses the functor law (note the reversal since is contravariant).
Going down then right:
Both paths yield , so the diagram commutes. Thus is indeed a natural transformation.
Step 3: and Are Inverses
We verify both compositions are identities.
(): Let . Then
where we used the functor law .
(): Let be a natural transformation. We must show , i.e., for every object and every :
The left side is:
Now we use the naturality of at the morphism . The naturality square for at gives:
Commutativity says: . Evaluating both sides at :
Since , the left side becomes . Therefore:
Since this holds for all and all , we conclude .
Hence and are mutually inverse, and is a bijection.
Step 4: Naturality in
We show is natural in the variable . Let be a natural transformation of presheaves. We must show that the following square commutes:
where is post-composition by , sending .
Let .
Going right then down:
Going down then right:
These are equal, so is natural in .
Step 5: Naturality in
We show is natural in . We must be careful about variance. A morphism in induces:
- A natural transformation (post-composition by ), which gives a pullback map by pre-composition with .
- A map (since is contravariant).
Both sides are contravariant in , so the naturality is with respect to the functor .
The naturality square we must verify is:
where for .
Let .
Going right then down:
Going down then right:
Now, by the naturality of at :
we get , i.e., .
Both paths give , so the diagram commutes. Hence is natural in .
Covariant Version
There is a dual version for covariant functors. For and , the covariant Yoneda Lemma states:
naturally in and . The proof is entirely analogous: the bijection sends to , and the inverse sends to the natural transformation with components .
Corollary: The Yoneda Embedding
The Yoneda embedding
is fully faithful. That is, for all objects :
Apply the Yoneda Lemma with :
The bijection sends a natural transformation to , and the inverse sends a morphism to the natural transformation given by post-composition with .
Faithfulness: If as natural transformations, then , i.e., , so .
Fullness: Every natural transformation equals where . This is precisely the content of .
Corollary: Representable Functors Determine Objects
Let . Then in if and only if as presheaves. More precisely, the Yoneda embedding reflects isomorphisms.
Since is fully faithful, it reflects isomorphisms. Concretely:
(): If is an isomorphism, then is a natural isomorphism with inverse .
(): Suppose is a natural isomorphism. By full faithfulness, for some morphism , and for some . Then:
Note that post-composition reverses the order: does not hold in general. Instead, is a covariant functor, so . We compute:
Since is faithful, . Similarly, gives , so . Therefore is an isomorphism.
Applications and Examples
Let be a group, viewed as a one-object category with a single object and . The Yoneda embedding gives
The single object maps to as a left -set (acting on itself by left multiplication). The Yoneda Lemma tells us this embedding is fully faithful, which in this context means the left regular representation is faithful. This is precisely Cayley's theorem: every group embeds into the symmetric group .
Let be a presheaf. A representation of is a pair where and such that is a natural isomorphism. By the Yoneda Lemma, this is equivalent to saying that for every object , the map
is a bijection. The element is called the universal element. For instance, if , then a representing object is the exponential with universal element .
In algebraic geometry, a scheme is determined by its functor of points , sending . By Yoneda, morphisms correspond bijectively to natural transformations . This is the foundation of the functor-of-points approach: to define a morphism of schemes, it suffices to specify it functorially on -points for all test schemes .
Let be a preorder viewed as a category. The presheaf category consists of -valued presheaves. The Yoneda embedding sends to the "downward closed set" , which is a singleton if and empty otherwise. This is the principal downset . The Yoneda Lemma says -- a natural transformation out of a representable presheaf is determined by its value at the "top" element.
The product in a category is defined as the representing object for the functor . That is, we require a natural isomorphism
By the Yoneda Lemma, is unique up to unique isomorphism (if it exists), because two representing objects for the same functor must be isomorphic via a unique isomorphism compatible with the universal elements.
An adjunction between categories and is a natural isomorphism
For each fixed , this says the functor is represented by evaluated appropriately. The Yoneda Lemma ensures the unit and counit are uniquely determined by this natural bijection.
The density theorem states that every presheaf is a colimit of representable presheaves:
where is the category of elements of . This is a direct consequence of the Yoneda Lemma: the universal element construction tells us that each gives a "probe" , and is assembled from all such probes.
The Yoneda Lemma generalizes to categories enriched over a symmetric monoidal closed category . For a -enriched category and a -functor , the enriched Yoneda Lemma states:
as objects of , naturally in and . The proof follows the same structure: define by evaluation at , construct using the enriched functor structure, and verify they are mutually inverse.
In algebraic geometry, a moduli problem is a functor (or to groupoids). A fine moduli space is a scheme representing , i.e., naturally. By the Yoneda Lemma, this means there is a universal family such that every family over any base is the pullback of along a unique map . When no fine moduli space exists (e.g., for curves of genus with automorphisms), one passes to algebraic stacks.
The Yoneda bijection is the only natural bijection . Indeed, suppose is any natural bijection. Naturality in applied to the natural transformation (for ) forces to agree with . This "rigidity" illustrates how naturality severely constrains the possible constructions.
Since has all small limits and colimits, the presheaf category inherits them (computed pointwise). The Yoneda embedding thus embeds fully faithfully into a category that is complete and cocomplete. This is a "free cocompletion": is the free cocompletion of under small colimits, a fact that rests on the density theorem and the Yoneda Lemma.
In the homotopy category of pointed spaces, the representable functor sends a space to the set of homotopy classes . Brown's representability theorem can be viewed as a homotopical analogue of the Yoneda Lemma: under mild conditions, a contravariant functor from to that converts coproducts to products and satisfies a Mayer-Vietoris condition is representable. The Eilenberg-MacLane spaces represent ordinary cohomology: .
Summary of the Proof Strategy
The proof of the Yoneda Lemma follows a clean three-part strategy:
-
Define -- extract the "essential data" from a natural transformation by evaluating at the identity.
-
Construct -- rebuild a natural transformation from a single element by "transporting" it along morphisms via the functor .
-
Verify (using the functor law ) and (using the naturality condition on ).
The naturality of in both variables follows from direct diagram chasing. The entire argument is elementary -- no set-theoretic subtleties arise because we only work with hom-sets (local smallness) and the set .
The Yoneda Lemma expresses a deep principle: an object is completely determined by how other objects map into it. This "relational" perspective -- knowing an object by its interactions rather than its internal structure -- pervades modern mathematics:
- In algebraic geometry, the functor of points replaces the scheme .
- In homotopy theory, spaces are probed by mapping spheres into them.
- In topos theory, a topos is studied through its points (geometric morphisms from ).
As Ravi Vakil puts it: "If you want to understand an object, look at the maps to and from it."