Yoneda lemma

From HandWiki
Short description: Embedding of categories into functor categories

In mathematics, the Yoneda lemma is a fundamental result in category theory.[1] It 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 miniature category with just one object and only isomorphisms). It allows the embedding of any locally small 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 [math]\displaystyle{ \mathcal{C} }[/math], one should study the category of all functors of [math]\displaystyle{ \mathcal{C} }[/math] into [math]\displaystyle{ \mathbf{Set} }[/math] (the category of sets with functions as morphisms). [math]\displaystyle{ \mathbf{Set} }[/math] is a category we think we understand well, and a functor of [math]\displaystyle{ \mathcal{C} }[/math] into [math]\displaystyle{ \mathbf{Set} }[/math] can be seen as a "representation" of [math]\displaystyle{ \mathcal{C} }[/math] in terms of known structures. The original category [math]\displaystyle{ \mathcal{C} }[/math] is contained in this functor category, but new objects appear in the functor category, which were absent and "hidden" in [math]\displaystyle{ \mathcal{C} }[/math]. 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 [math]\displaystyle{ \mathcal{C} }[/math], and the category of modules over the ring is a category of functors defined on [math]\displaystyle{ \mathcal{C} }[/math].

Formal statement

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

[math]\displaystyle{ h_A = \mathrm{Hom}(A,-) }[/math].

The (covariant) hom-functor [math]\displaystyle{ h_A }[/math] sends [math]\displaystyle{ X }[/math] to the set of morphisms [math]\displaystyle{ \mathrm{Hom}(A,X) }[/math] and sends a morphism [math]\displaystyle{ f \colon X \to Y }[/math] (where [math]\displaystyle{ X }[/math] and [math]\displaystyle{ Y }[/math] are objects in [math]\displaystyle{ \mathcal{C} }[/math]) to the morphism [math]\displaystyle{ f \circ - }[/math] (composition with [math]\displaystyle{ f }[/math] on the left) that sends a morphism [math]\displaystyle{ g }[/math] in [math]\displaystyle{ \mathrm{Hom}(A,X) }[/math] to the morphism [math]\displaystyle{ f \circ g }[/math] in [math]\displaystyle{ \mathrm{Hom}(A,Y) }[/math]. That is,

[math]\displaystyle{ h_A(f) = \mathrm{Hom}(A,f), \text{ or} }[/math]
[math]\displaystyle{ h_A(f)(g) = f \circ g }[/math]

Yoneda's lemma says that:

Lemma (Yoneda) — Let [math]\displaystyle{ F }[/math] be a functor from a locally small category [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math]. Then for each object [math]\displaystyle{ A }[/math] of [math]\displaystyle{ \mathcal{C} }[/math], the natural transformations [math]\displaystyle{ \mathrm{Nat}(h_A,F)\equiv \mathrm{Hom}(\mathrm{Hom}(A,-),F) }[/math] from [math]\displaystyle{ h_A }[/math] to [math]\displaystyle{ F }[/math] are in one-to-one correspondence with the elements of [math]\displaystyle{ F(A) }[/math]. That is,

[math]\displaystyle{ \mathrm{Nat}(h_A,F) \cong F(A). }[/math]

Moreover, this isomorphism is natural in [math]\displaystyle{ A }[/math] and [math]\displaystyle{ F }[/math] when both sides are regarded as functors from [math]\displaystyle{ \mathcal{C} \times \mathbf{Set}^\mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math].

Here the notation [math]\displaystyle{ \mathbf{Set}^\mathcal{C} }[/math] denotes the category of functors from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math].

Given a natural transformation [math]\displaystyle{ \Phi }[/math] from [math]\displaystyle{ h_A }[/math] to [math]\displaystyle{ F }[/math], the corresponding element of [math]\displaystyle{ F(A) }[/math] is [math]\displaystyle{ u = \Phi_A(\mathrm{id}_A) }[/math];[lower-alpha 1] and given an element [math]\displaystyle{ u }[/math] of [math]\displaystyle{ F(A) }[/math], the corresponding natural transformation is given by [math]\displaystyle{ \Phi_{X}(f) = F(f)(u) }[/math] which assigns to a morphism [math]\displaystyle{ f \colon A \to X }[/math] a value of [math]\displaystyle{ F(X) }[/math].

Contravariant version

There is a contravariant version of Yoneda's lemma,[2] which concerns contravariant functors from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math]. This version involves the contravariant hom-functor

[math]\displaystyle{ h^A = \mathrm{Hom}(-, A), }[/math]

which sends [math]\displaystyle{ X }[/math] to the hom-set [math]\displaystyle{ \mathrm{Hom}(X,A) }[/math]. Given an arbitrary contravariant functor [math]\displaystyle{ G }[/math] from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math], Yoneda's lemma asserts that

[math]\displaystyle{ \mathrm{Nat}(h^A,G) \cong G(A). }[/math]

Naturality

The bijections provided in the (covariant) Yoneda lemma (for each [math]\displaystyle{ A }[/math] and [math]\displaystyle{ F }[/math]) are the components of a natural isomorphism between two certain functors from [math]\displaystyle{ \mathcal{C} \times \mathbf{Set}^\mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math].[3]:61 One of the two functors is the evaluation functor

[math]\displaystyle{ -(-)\colon \mathcal{C} \times \mathbf{Set}^\mathcal{C} \to \mathbf{Set} }[/math]
[math]\displaystyle{ -(-)\colon (A,F)\to F(A) }[/math]

that sends a pair [math]\displaystyle{ (f,\Phi) }[/math] of a morphism [math]\displaystyle{ f\colon A\to B }[/math] in [math]\displaystyle{ \mathcal C }[/math] and a natural transformation [math]\displaystyle{ \Phi\colon F\to G }[/math] to the map

[math]\displaystyle{ \Phi_B\circ F(f)=G(f)\circ\Phi_A\colon F(A)\to G(B). }[/math]

This is enough to determine the other functor since we know what the natural isomorphism is. Under the second functor

[math]\displaystyle{ \operatorname{Nat}(\hom(-,-),-)\colon\mathcal C\times\operatorname{Set}^{\mathcal C}\to\operatorname{Set}, }[/math]
[math]\displaystyle{ \operatorname{Nat}(\hom(-,-),-)\colon(A,F)\mapsto\operatorname{Nat}(\hom(A,-),F), }[/math]

the image of a pair [math]\displaystyle{ (f,\Phi) }[/math] is the map

[math]\displaystyle{ \operatorname{Nat}(\hom(f,-),\Phi)=\operatorname{Nat}(\hom(B,-),\Phi)\circ\operatorname{Nat}(\hom(f,-),F)=\operatorname{Nat}(\hom(f,-),G)\circ\operatorname{Nat}(\hom(A,-),\Phi) }[/math]

that sends a natural transformation [math]\displaystyle{ \Psi\colon\hom(A,-)\to F }[/math] to the natural transformation [math]\displaystyle{ \Phi\circ\Psi\circ\hom(f,-)\colon\hom(B,-)\to G }[/math], whose components are

[math]\displaystyle{ (\Phi\circ\Psi\circ\hom(f,-))_C(g)=(\Phi\circ\Psi)_C(g\circ f)\qquad(g\colon B\to C). }[/math]

Naming conventions

The use of [math]\displaystyle{ h_A }[/math] for the covariant hom-functor and [math]\displaystyle{ h^A }[/math] 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.[lower-alpha 2]

The mnemonic "falling into something" can be helpful in remembering that [math]\displaystyle{ h_A }[/math] is the covariant hom-functor. When the letter [math]\displaystyle{ A }[/math] is falling (i.e. a subscript), [math]\displaystyle{ h_A }[/math] assigns to an object [math]\displaystyle{ X }[/math] the morphisms from [math]\displaystyle{ A }[/math] into [math]\displaystyle{ X }[/math].

Proof

Since [math]\displaystyle{ \Phi }[/math] is a natural transformation, we have the following commutative diagram:

Proof of Yoneda's lemma

This diagram shows that the natural transformation [math]\displaystyle{ \Phi }[/math] is completely determined by [math]\displaystyle{ \Phi_A(\mathrm{id}_A)=u }[/math] since for each morphism [math]\displaystyle{ f \colon A \to X }[/math] one has

[math]\displaystyle{ \Phi_X(f) = (Ff)u. }[/math]

Moreover, any element [math]\displaystyle{ u \in F(A) }[/math] defines a natural transformation in this way. The proof in the contravariant case is completely analogous.[1]

The Yoneda embedding

An important special case of Yoneda's lemma is when the functor [math]\displaystyle{ F }[/math] from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math] is another hom-functor [math]\displaystyle{ h_B }[/math]. In this case, the covariant version of Yoneda's lemma states that

[math]\displaystyle{ \mathrm{Nat}(h_A,h_B) \cong \mathrm{Hom}(B,A). }[/math]

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 [math]\displaystyle{ f \colon B \to A }[/math] the associated natural transformation is denoted [math]\displaystyle{ \mathrm{Hom}(f,-) }[/math].

Mapping each object [math]\displaystyle{ A }[/math] in [math]\displaystyle{ \mathcal{C} }[/math] to its associated hom-functor [math]\displaystyle{ h_A = \mathrm{Hom}(A,-) }[/math] and each morphism [math]\displaystyle{ f \colon B \to A }[/math] to the corresponding natural transformation [math]\displaystyle{ \mathrm{Hom}(f,-) }[/math] determines a contravariant functor [math]\displaystyle{ h_{\bullet} }[/math] from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set}^\mathcal{C} }[/math], the functor category of all (covariant) functors from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math]. One can interpret [math]\displaystyle{ h_{\bullet} }[/math] as a covariant functor:

[math]\displaystyle{ h_{\bullet}\colon \mathcal{C}^{\text{op}} \to \mathbf{Set}^\mathcal{C}. }[/math]

The meaning of Yoneda's lemma in this setting is that the functor [math]\displaystyle{ h_{\bullet} }[/math] is fully faithful, and therefore gives an embedding of [math]\displaystyle{ \mathcal{C}^{\mathrm{op}} }[/math] in the category of functors to [math]\displaystyle{ \mathbf{Set} }[/math]. The collection of all functors [math]\displaystyle{ \{h_A | A \in C\} }[/math] is a subcategory of [math]\displaystyle{ \mathbf{Set}^{\mathcal{C}} }[/math]. Therefore, Yoneda embedding implies that the category [math]\displaystyle{ \mathcal{C}^{\mathrm{op}} }[/math] is isomorphic to the category [math]\displaystyle{ \{h_A | A \in C \} }[/math].

The contravariant version of Yoneda's lemma states that

[math]\displaystyle{ \mathrm{Nat}(h^A,h^B) \cong \mathrm{Hom}(A,B). }[/math]

Therefore, [math]\displaystyle{ h^{\bullet} }[/math] gives rise to a covariant functor from [math]\displaystyle{ \mathcal{C} }[/math] to the category of contravariant functors to [math]\displaystyle{ \mathbf{Set} }[/math]:

[math]\displaystyle{ h^{\bullet}\colon \mathcal{C} \to \mathbf{Set}^{\mathcal{C}^{\mathrm{op}}}. }[/math]

Yoneda's lemma then states that any locally small category [math]\displaystyle{ \mathcal{C} }[/math] can be embedded in the category of contravariant functors from [math]\displaystyle{ \mathcal{C} }[/math] to [math]\displaystyle{ \mathbf{Set} }[/math] via [math]\displaystyle{ h^{\bullet} }[/math]. This is called the Yoneda embedding.

The Yoneda embedding is sometimes denoted by よ, the Hiragana kana Yo.[4]

Representable functor

The Yoneda embedding essentially states that for every (locally small) category, objects in that category can be represented by presheaves, in a full and faithful manner. That is,

[math]\displaystyle{ \mathrm{Nat}(h^A,P) \cong P(A) }[/math]

for a presheaf P. Many common categories are, in fact, categories of pre-sheaves, and on closer inspection, prove to be categories of sheaves, and as such examples are commonly topological in nature, they can be seen to be topoi in general. The Yoneda lemma provides a point of leverage by which the topological structure of a category can be studied and understood.

In terms of (co)end calculus

Main page: End (category theory)

Given two categories [math]\displaystyle{ \mathbf{C} }[/math] and [math]\displaystyle{ \mathbf{D} }[/math] with two functors [math]\displaystyle{ F, G : \mathbf{C} \to \mathbf{D} }[/math], natural transformations between them can be written as the following end.[5]

[math]\displaystyle{ \mathrm{Nat}(F, G) = \int_{c \in \mathbf{C}} \mathrm{Hom}_\mathbf{D}(Fc, Gc) }[/math]

For any functors [math]\displaystyle{ K \colon \mathbf{C}^{op} \to \mathbf{Sets} }[/math] and [math]\displaystyle{ H \colon \mathbf{C} \to \mathbf{Sets} }[/math] the following formulas are all formulations of the Yoneda lemma.[6]

[math]\displaystyle{ K \cong \int^{c \in \mathbf{C}} Kc \times \mathrm{Hom}_\mathbf{C}(-,c), \qquad K \cong \int_{c \in \mathbf{C}} (Kc)^{\mathrm{Hom}_\mathbf{C}(c,-)}, }[/math]
[math]\displaystyle{ H \cong \int^{c \in \mathbf{C}} Hc \times \mathrm{Hom}_\mathbf{C}(c,-), \qquad H \cong \int_{c \in \mathbf{C}} (Hc)^{\mathrm{Hom}_\mathbf{C}(-,c)}. }[/math]

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 [math]\displaystyle{ R }[/math], the extended category is the category of all right modules over [math]\displaystyle{ R }[/math], and the statement of the Yoneda lemma reduces to the well-known isomorphism

[math]\displaystyle{ M \cong \mathrm{Hom}_R(R,M) }[/math]   for all right modules [math]\displaystyle{ M }[/math] over [math]\displaystyle{ R }[/math].

Relationship to Cayley's theorem

As stated above, the Yoneda lemma may be considered as a vast generalization of Cayley's theorem from group theory. To see this, let [math]\displaystyle{ \mathcal{C} }[/math] be a category with a single object [math]\displaystyle{ * }[/math] such that every morphism is an isomorphism (i.e. a groupoid with one object). Then [math]\displaystyle{ G=\mathrm{Hom}_{\mathcal{C}}(*,*) }[/math] forms a group under the operation of composition, and any group can be realized as a category in this way.

In this context, a covariant functor [math]\displaystyle{ \mathcal{C} \to \mathbf{Set} }[/math] consists of a set [math]\displaystyle{ X }[/math] and a group homomorphism [math]\displaystyle{ G\to\mathrm{Perm}(X) }[/math], where [math]\displaystyle{ \mathrm{Perm}(X) }[/math] is the group of permutations of [math]\displaystyle{ X }[/math]; in other words, [math]\displaystyle{ X }[/math] is a G-set. A natural transformation between such functors is the same thing as an equivariant map between [math]\displaystyle{ G }[/math]-sets: a set function [math]\displaystyle{ \alpha \colon X \to Y }[/math] with the property that [math]\displaystyle{ \alpha(g\cdot x)=g\cdot\alpha(x) }[/math] for all [math]\displaystyle{ g }[/math] in [math]\displaystyle{ G }[/math] and [math]\displaystyle{ x }[/math] in [math]\displaystyle{ X }[/math]. (On the left side of this equation, the [math]\displaystyle{ \cdot }[/math] denotes the action of [math]\displaystyle{ G }[/math] on [math]\displaystyle{ X }[/math], and on the right side the action on [math]\displaystyle{ Y }[/math].)

Now the covariant hom-functor [math]\displaystyle{ \mathrm{Hom}_{\mathcal{C}}(*,-) }[/math] corresponds to the action of [math]\displaystyle{ G }[/math] on itself by left-multiplication (the contravariant version corresponds to right-multiplication). The Yoneda lemma with [math]\displaystyle{ F=\mathrm{Hom}_{\mathcal{C}}(*,-) }[/math] states that

[math]\displaystyle{ \mathrm{Nat}(\mathrm{Hom}_{\mathcal{C}}(*,-),\mathrm{Hom}_{\mathcal{C}}(*,-)) \cong \mathrm{Hom}_{\mathcal{C}}(*,*) }[/math],

that is, the equivariant maps from this [math]\displaystyle{ G }[/math]-set to itself are in bijection with [math]\displaystyle{ G }[/math]. But it is easy to see that (1) these maps form a group under composition, which is a subgroup of [math]\displaystyle{ \mathrm{Perm}(G) }[/math], and (2) the function which gives the bijection is a group homomorphism. (Going in the reverse direction, it associates to every [math]\displaystyle{ g }[/math] in [math]\displaystyle{ G }[/math] the equivariant map of right-multiplication by [math]\displaystyle{ g }[/math].) Thus [math]\displaystyle{ G }[/math] is isomorphic to a subgroup of [math]\displaystyle{ \mathrm{Perm}(G) }[/math], which is the statement of Cayley's theorem.

History

Yoshiki Kinoshita stated in 1996 that the term "Yoneda lemma" was coined by Saunders Mac Lane following an interview he had with Yoneda in the Gare du Nord station.[7][8]

See also

Notes

  1. Recall that [math]\displaystyle{ \Phi_A : \mathrm{Hom}(A,A) \to F(A) }[/math] so the last expression is well-defined and sends a morphism from [math]\displaystyle{ A }[/math] to [math]\displaystyle{ A }[/math], to an element in [math]\displaystyle{ F(A) }[/math].
  2. A notable exception to modern algebraic geometry texts following the conventions of this article is Commutative algebra with a view toward algebraic geometry / David Eisenbud (1995), which uses [math]\displaystyle{ h_A }[/math] to mean the covariant hom-functor. However, the later book The geometry of schemes / David Eisenbud, Joe Harris (1998) reverses this and uses [math]\displaystyle{ h_A }[/math] to mean the contravariant hom-functor.

References

  1. 1.0 1.1 Riehl, Emily (2017). Category Theory in Context. Dover. ISBN 978-0-486-82080-4. http://www.math.jhu.edu/~eriehl/context.pdf. 
  2. Beurier & Pastor (2019), Lemma 2.10 (Contravariant Yoneda lemma).
  3. Mac Lane, Saunders (1998) (in en). Categories for the working mathematician. Graduate Texts in Mathematics. 5 (2 ed.). New York, NY: Springer. doi:10.1007/978-1-4757-4721-8. ISBN 978-0-387-98403-2. 
  4. "Yoneda embedding". https://ncatlab.org/nlab/show/Yoneda+embedding#ReferencesNotation. 
  5. Loregian (2021), Theorem 1.4.1.
  6. Loregian (2021), Proposition 2.2.1 (Ninja Yoneda Lemma).
  7. Kinoshita, Yoshiki (23 April 1996). "Prof. Nobuo Yoneda passed away". http://www.mta.ca/~cat-dist/catlist/1999/yoneda. 
  8. "le lemme de la Gare du Nord". 18 November 2016. http://www.neverendingbooks.org/le-lemme-de-la-gare-du-nord. 

External links