# Yoneda lemma

(Redirected from Yoneda's lemma)

In mathematics, specifically in category theory, the Yoneda lemma is an abstract result on functors of the type morphisms into a fixed object. It is a vast generalisation of Cayley's theorem from group theory (viewing a group as a particular kind of category with just one object). It allows the embedding of any category into a category of functors (contravariant set-valued functors) defined on that category. It also clarifies how the embedded category, of representable functors and their natural transformations, relates to the other objects in the larger functor category. It is an important tool that underlies several modern developments in algebraic geometry and representation theory. It is named after Nobuo Yoneda.

## Generalities

The Yoneda lemma suggests that instead of studying the (locally small) category C, one should study the category of all functors of C into Set (the category of sets with functions as morphisms). Set is a category we understand well, and a functor of C into Set can be seen as a "representation" of C in terms of known structures. The original category C is contained in this functor category, but new objects appear in the functor category, which were absent and "hidden" in C. Treating these new objects just like the old ones often unifies and simplifies the theory.

This approach is akin to (and in fact generalizes) the common method of studying a ring by investigating the modules over that ring. The ring takes the place of the category C, and the category of modules over the ring is a category of functors defined on C.

## Formal statement

### General version

Yoneda's lemma concerns functors from a fixed category C to the category of sets, Set. If C is a locally small category (i.e. the hom-sets are actual sets and not proper classes), then each object A of C gives rise to a natural functor to Set called a hom-functor. This functor is denoted:

$h^A = \mathrm{Hom}(A,-).$

The (covariant) hom-functor hA sends X to the set of morphisms Hom(A,X) and sends a morphism f from X to Y to the morphism $f \circ -$ (composition with f on the left) that sends a morphism g in Hom(A,X) to the morphism f o g in Hom(A,Y). That is,

$f \longmapsto \mathrm{Hom}(A,f) = [\![ \mathrm{Hom}(A,X) \ni g \mapsto f \circ g \in \mathrm{Hom}(A,Y) ]\!]$.

Let F be an arbitrary functor from C to Set. Then Yoneda's lemma says that:

For each object A of C, the natural transformations from hA to F are in one-to-one correspondence with the elements of F(A). That is,

$\mathrm{Nat}(h^A,F) \cong F(A).$

Moreover this isomorphism is natural in A and F when both sides are regarded as functors from SetC x C to Set.

Given a natural transformation Φ from hA to F, the corresponding element of F(A) is $u = \Phi_A(\mathrm{id}_A)$.[a]

There is a contravariant version of Yoneda's lemma, which concerns contravariant functors from C to Set. This version involves the contravariant hom-functor

$h_A = \mathrm{Hom}(-, A),$

which sends X to the hom-set Hom(X,A). Given an arbitrary contravariant functor G from C to Set, Yoneda's lemma asserts that

$\mathrm{Nat}(h_A,G) \cong G(A).$

### Naming conventions

The use of "hA" for the covariant hom-functor and "hA" for the contravariant hom-functor is not completely standard. Many texts and articles either use the opposite convention or completely unrelated symbols for these two functors. However, most modern algebraic geometry texts starting with Alexander Grothendieck's foundational EGA use the convention in this article.[b]

The mnemonic "falling into something" can be helpful in remembering that "hA" is the contravariant hom-functor. When the letter "A" is falling (i.e. a subscript), hA assigns to an object X the morphisms from X into A.

### Proof

The proof of Yoneda's lemma is indicated by the following commutative diagram:

This diagram shows that the natural transformation Φ is completely determined by $\Phi_A(\mathrm{id}_A)=u$ since for each morphism f : AX one has

$\Phi_X(f) = (Ff)u.\,$

Moreover, any element uF(A) defines a natural transformation in this way. The proof in the contravariant case is completely analogous.

In this way, Yoneda's Lemma provides a complete classification of all natural transformations from the functor Hom(A,-) to an arbitrary functor F:C→Set.

### The Yoneda embedding

An important special case of Yoneda's lemma is when the functor F from C to Set is another hom-functor hB. In this case, the covariant version of Yoneda's lemma states that

$\mathrm{Nat}(h^A,h^B) \cong \mathrm{Hom}(B,A).$

That is, natural transformations between hom-functors are in one-to-one correspondence with morphisms (in the reverse direction) between the associated objects. Given a morphism f : BA the associated natural transformation is denoted Hom(f,–).

Mapping each object A in C to its associated hom-functor hA = Hom(A,–) and each morphism f : BA to the corresponding natural transformation Hom(f,–) determines a contravariant functor h from C to SetC, the functor category of all (covariant) functors from C to Set. One can interpret h as a covariant functor:

$h^{-}\colon \mathcal C^{\text{op}} \to \mathbf{Set}^\mathcal C.$

The meaning of Yoneda's lemma in this setting is that the functor h is fully faithful, and therefore gives an embedding of Cop in the category of functors to Set. The collection of all functors {hA, A in C} is a subcategory of SetC. Therefore, Yoneda embedding implies that the category Cop is isomorphic to the category {hA, A in C}.

The contravariant version of Yoneda's lemma states that

$\mathrm{Nat}(h_A,h_B) \cong \mathrm{Hom}(A,B).$

Therefore, h gives rise to a covariant functor from C to the category of contravariant functors to Set:

$h_{-}\colon \mathcal C \to \mathbf{Set}^{\mathcal C^{\mathrm{op}}}.$

Yoneda's lemma then states that any locally small category C can be embedded in the category of contravariant functors from C to Set via h. This is called the Yoneda embedding.

## Preadditive categories, rings and modules

A preadditive category is a category where the morphism sets form abelian groups and the composition of morphisms is bilinear; examples are categories of abelian groups or modules. In a preadditive category, there is both a "multiplication" and an "addition" of morphisms, which is why preadditive categories are viewed as generalizations of rings. Rings are preadditive categories with one object.

The Yoneda lemma remains true for preadditive categories if we choose as our extension the category of additive contravariant functors from the original category into the category of abelian groups; these are functors which are compatible with the addition of morphisms and should be thought of as forming a module category over the original category. The Yoneda lemma then yields the natural procedure to enlarge a preadditive category so that the enlarged version remains preadditive — in fact, the enlarged version is an abelian category, a much more powerful condition. In the case of a ring R, the extended category is the category of all right modules over R, and the statement of the Yoneda lemma reduces to the well-known isomorphism

M ≅ HomR(R,M)   for all right modules M over R.

## History

The Yoneda lemma was introduced but not proved in a 1954 paper by Nobuo Yoneda.[1] Yoshiki Kinoshita stated in 1996 that the term "Yoneda lemma" was coined by Saunders Mac Lane following an interview he had with Yoneda.[2]

1. ^ Recall that $\Phi_A : \mathrm{Hom}(A,A) \to F(A)$ so the last expression is well-defined and sends a morphism from A to A, to an object in F(A).