ProofComplete

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

Theorem1.1Yoneda Lemma

Let C\mathcal{C} be a locally small category, A∈Ob(C)A \in \mathrm{Ob}(\mathcal{C}), and F:Cop→SetF : \mathcal{C}^{\mathrm{op}} \to \mathbf{Set} a functor (i.e., a presheaf on C\mathcal{C}). Then there is a bijection

ΦA,F:Nat(hA,F)→  ∼  F(A)\Phi_{A,F} : \mathrm{Nat}(h^A, F) \xrightarrow{\;\sim\;} F(A)

given by ΦA,F(α)=αA(idA)\Phi_{A,F}(\alpha) = \alpha_A(\mathrm{id}_A), where hA=HomC(−,A)h^A = \mathrm{Hom}_{\mathcal{C}}(-, A) is the representable presheaf and Nat(hA,F)\mathrm{Nat}(h^A, F) is the set of natural transformations from hAh^A to FF.

Moreover, this bijection is natural in both AA and FF: it defines a natural isomorphism of bifunctors C×[Cop,Set]→Set\mathcal{C} \times [\mathcal{C}^{\mathrm{op}}, \mathbf{Set}] \to \mathbf{Set}.


Step 1: Defining the Map Φ\Phi

ProofDefinition of Phi

Given a natural transformation α:hA⇒F\alpha : h^A \Rightarrow F, the component at AA is a function

αA:Hom(A,A)→F(A)\alpha_A : \mathrm{Hom}(A, A) \to F(A)

We define

Φ(α)=αA(idA)∈F(A)\Phi(\alpha) = \alpha_A(\mathrm{id}_A) \in F(A)

This is the "evaluation at the identity" map. The key insight is that, by naturality, the entire natural transformation α\alpha is determined by this single element.

■

Step 2: Constructing the Inverse Ψ\Psi

ProofConstruction of Psi

Given an element x∈F(A)x \in F(A), we must construct a natural transformation Ψ(x):hA⇒F\Psi(x) : h^A \Rightarrow F. For each object X∈CX \in \mathcal{C}, we define the component

Ψ(x)X:Hom(X,A)→F(X),f↦F(f)(x)\Psi(x)_X : \mathrm{Hom}(X, A) \to F(X), \qquad f \mapsto F(f)(x)

Here F(f):F(A)→F(X)F(f) : F(A) \to F(X) is the image of f:X→Af : X \to A under the contravariant functor FF (recall F:Cop→SetF : \mathcal{C}^{\mathrm{op}} \to \mathbf{Set}, so a morphism f:X→Af : X \to A in C\mathcal{C} gives F(f):F(A)→F(X)F(f) : F(A) \to F(X)).

Claim: Ψ(x)\Psi(x) is a natural transformation.

We must verify that for every morphism g:X→Yg : X \to Y in C\mathcal{C}, the following diagram commutes:

Hom(Y,A)→Ψ(x)YF(Y)↓g∗↓F(g)Hom(X,A)→Ψ(x)XF(X)\begin{array}{ccc} \mathrm{Hom}(Y, A) & \xrightarrow{\Psi(x)_Y} & F(Y) \\[6pt] \downarrow\scriptstyle{g^*} & & \downarrow\scriptstyle{F(g)} \\[6pt] \mathrm{Hom}(X, A) & \xrightarrow{\Psi(x)_X} & F(X) \end{array}

where g∗=hA(g)g^* = h^A(g) is precomposition by gg, i.e., g∗(f)=f∘gg^*(f) = f \circ g.

Verification: Let f∈Hom(Y,A)f \in \mathrm{Hom}(Y, A).

Going right then down: F(g)(Ψ(x)Y(f))=F(g)(F(f)(x))=(F(g)∘F(f))(x)=F(f∘g)(x)F(g)\bigl(\Psi(x)_Y(f)\bigr) = F(g)\bigl(F(f)(x)\bigr) = \bigl(F(g) \circ F(f)\bigr)(x) = F(f \circ g)(x)

where the last equality uses the functor law F(g)∘F(f)=F(f∘g)F(g) \circ F(f) = F(f \circ g) (note the reversal since FF is contravariant).

Going down then right: Ψ(x)X(g∗(f))=Ψ(x)X(f∘g)=F(f∘g)(x)\Psi(x)_X\bigl(g^*(f)\bigr) = \Psi(x)_X(f \circ g) = F(f \circ g)(x)

Both paths yield F(f∘g)(x)F(f \circ g)(x), so the diagram commutes. Thus Ψ(x):hA⇒F\Psi(x) : h^A \Rightarrow F is indeed a natural transformation.

■

Step 3: Φ\Phi and Ψ\Psi Are Inverses

ProofPhi and Psi are mutually inverse

We verify both compositions are identities.

(Φ∘Ψ=idF(A)\Phi \circ \Psi = \mathrm{id}_{F(A)}): Let x∈F(A)x \in F(A). Then

Φ(Ψ(x))=Ψ(x)A(idA)=F(idA)(x)=idF(A)(x)=x\Phi(\Psi(x)) = \Psi(x)_A(\mathrm{id}_A) = F(\mathrm{id}_A)(x) = \mathrm{id}_{F(A)}(x) = x

where we used the functor law F(idA)=idF(A)F(\mathrm{id}_A) = \mathrm{id}_{F(A)}.

(Ψ∘Φ=idNat(hA,F)\Psi \circ \Phi = \mathrm{id}_{\mathrm{Nat}(h^A, F)}): Let α:hA⇒F\alpha : h^A \Rightarrow F be a natural transformation. We must show Ψ(Φ(α))=α\Psi(\Phi(\alpha)) = \alpha, i.e., for every object XX and every f:X→Af : X \to A:

Ψ(Φ(α))X(f)=αX(f)\Psi(\Phi(\alpha))_X(f) = \alpha_X(f)

The left side is: Ψ(Φ(α))X(f)=F(f)(Φ(α))=F(f)(αA(idA))\Psi(\Phi(\alpha))_X(f) = F(f)(\Phi(\alpha)) = F(f)(\alpha_A(\mathrm{id}_A))

Now we use the naturality of α\alpha at the morphism f:X→Af : X \to A. The naturality square for α\alpha at ff gives:

Hom(A,A)→αAF(A)↓f∗↓F(f)Hom(X,A)→αXF(X)\begin{array}{ccc} \mathrm{Hom}(A, A) & \xrightarrow{\alpha_A} & F(A) \\[6pt] \downarrow\scriptstyle{f^*} & & \downarrow\scriptstyle{F(f)} \\[6pt] \mathrm{Hom}(X, A) & \xrightarrow{\alpha_X} & F(X) \end{array}

Commutativity says: αX∘f∗=F(f)∘αA\alpha_X \circ f^* = F(f) \circ \alpha_A. Evaluating both sides at idA\mathrm{id}_A:

αX(f∗(idA))=F(f)(αA(idA))\alpha_X(f^*(\mathrm{id}_A)) = F(f)(\alpha_A(\mathrm{id}_A))

Since f∗(idA)=idA∘f=ff^*(\mathrm{id}_A) = \mathrm{id}_A \circ f = f, the left side becomes αX(f)\alpha_X(f). Therefore:

Ψ(Φ(α))X(f)=F(f)(αA(idA))=αX(f)\Psi(\Phi(\alpha))_X(f) = F(f)(\alpha_A(\mathrm{id}_A)) = \alpha_X(f)

Since this holds for all XX and all ff, we conclude Ψ(Φ(α))=α\Psi(\Phi(\alpha)) = \alpha.

Hence Φ\Phi and Ψ\Psi are mutually inverse, and Φ:Nat(hA,F)→∼F(A)\Phi : \mathrm{Nat}(h^A, F) \xrightarrow{\sim} F(A) is a bijection. □\square

■

Step 4: Naturality in FF

ProofNaturality in F

We show Φ\Phi is natural in the variable FF. Let σ:F⇒G\sigma : F \Rightarrow G be a natural transformation of presheaves. We must show that the following square commutes:

Nat(hA,F)→ΦA,FF(A)↓σ∗↓σANat(hA,G)→ΦA,GG(A)\begin{array}{ccc} \mathrm{Nat}(h^A, F) & \xrightarrow{\Phi_{A,F}} & F(A) \\[6pt] \downarrow\scriptstyle{\sigma_*} & & \downarrow\scriptstyle{\sigma_A} \\[6pt] \mathrm{Nat}(h^A, G) & \xrightarrow{\Phi_{A,G}} & G(A) \end{array}

where σ∗:Nat(hA,F)→Nat(hA,G)\sigma_* : \mathrm{Nat}(h^A, F) \to \mathrm{Nat}(h^A, G) is post-composition by σ\sigma, sending α↦σ∘α\alpha \mapsto \sigma \circ \alpha.

Let α∈Nat(hA,F)\alpha \in \mathrm{Nat}(h^A, F).

Going right then down: σA(ΦA,F(α))=σA(αA(idA))\sigma_A(\Phi_{A,F}(\alpha)) = \sigma_A(\alpha_A(\mathrm{id}_A))

Going down then right: ΦA,G(σ∗(α))=ΦA,G(σ∘α)=(σ∘α)A(idA)=σA(αA(idA))\Phi_{A,G}(\sigma_*(\alpha)) = \Phi_{A,G}(\sigma \circ \alpha) = (\sigma \circ \alpha)_A(\mathrm{id}_A) = \sigma_A(\alpha_A(\mathrm{id}_A))

These are equal, so Φ\Phi is natural in FF. □\square

■

Step 5: Naturality in AA

ProofNaturality in A

We show Φ\Phi is natural in AA. We must be careful about variance. A morphism u:A→Bu : A \to B in C\mathcal{C} induces:

  • A natural transformation hu=u∗:hA⇒hBh^u = u_* : h^A \Rightarrow h^B (post-composition by uu), which gives a pullback map u∗:Nat(hB,F)→Nat(hA,F)u^* : \mathrm{Nat}(h^B, F) \to \mathrm{Nat}(h^A, F) by pre-composition with huh^u.
  • A map F(u):F(B)→F(A)F(u) : F(B) \to F(A) (since FF is contravariant).

Both sides are contravariant in AA, so the naturality is with respect to the functor Cop→Set\mathcal{C}^{\mathrm{op}} \to \mathbf{Set}.

The naturality square we must verify is:

Nat(hB,F)→ΦB,FF(B)↓u∗↓F(u)Nat(hA,F)→ΦA,FF(A)\begin{array}{ccc} \mathrm{Nat}(h^B, F) & \xrightarrow{\Phi_{B,F}} & F(B) \\[6pt] \downarrow\scriptstyle{u^*} & & \downarrow\scriptstyle{F(u)} \\[6pt] \mathrm{Nat}(h^A, F) & \xrightarrow{\Phi_{A,F}} & F(A) \end{array}

where u∗(β)=β∘huu^*(\beta) = \beta \circ h^u for β:hB⇒F\beta : h^B \Rightarrow F.

Let β∈Nat(hB,F)\beta \in \mathrm{Nat}(h^B, F).

Going right then down: F(u)(ΦB,F(β))=F(u)(βB(idB))F(u)(\Phi_{B,F}(\beta)) = F(u)(\beta_B(\mathrm{id}_B))

Going down then right: ΦA,F(u∗(β))=ΦA,F(β∘hu)=(β∘hu)A(idA)=βA(hAu(idA))=βA(u∘idA)=βA(u)\Phi_{A,F}(u^*(\beta)) = \Phi_{A,F}(\beta \circ h^u) = (\beta \circ h^u)_A(\mathrm{id}_A) = \beta_A(h^u_A(\mathrm{id}_A)) = \beta_A(u \circ \mathrm{id}_A) = \beta_A(u)

Now, by the naturality of β\beta at u:A→Bu : A \to B:

Hom(B,B)→βBF(B)↓u∗↓F(u)Hom(A,B)→βAF(A)\begin{array}{ccc} \mathrm{Hom}(B, B) & \xrightarrow{\beta_B} & F(B) \\[6pt] \downarrow\scriptstyle{u^*} & & \downarrow\scriptstyle{F(u)} \\[6pt] \mathrm{Hom}(A, B) & \xrightarrow{\beta_A} & F(A) \end{array}

we get βA(u∗(idB))=F(u)(βB(idB))\beta_A(u^*(\mathrm{id}_B)) = F(u)(\beta_B(\mathrm{id}_B)), i.e., βA(u)=F(u)(βB(idB))\beta_A(u) = F(u)(\beta_B(\mathrm{id}_B)).

Both paths give βA(u)=F(u)(βB(idB))\beta_A(u) = F(u)(\beta_B(\mathrm{id}_B)), so the diagram commutes. Hence Φ\Phi is natural in AA. □\square

■

Covariant Version

RemarkCovariant Yoneda Lemma

There is a dual version for covariant functors. For F:C→SetF : \mathcal{C} \to \mathbf{Set} and hA=HomC(A,−)h_A = \mathrm{Hom}_{\mathcal{C}}(A, -), the covariant Yoneda Lemma states:

Nat(hA,F)≅F(A)\mathrm{Nat}(h_A, F) \cong F(A)

naturally in AA and FF. The proof is entirely analogous: the bijection sends α:hA⇒F\alpha : h_A \Rightarrow F to αA(idA)∈F(A)\alpha_A(\mathrm{id}_A) \in F(A), and the inverse sends x∈F(A)x \in F(A) to the natural transformation with components f↦F(f)(x)f \mapsto F(f)(x).


Corollary: The Yoneda Embedding

Theorem1.2Yoneda Embedding is Fully Faithful

The Yoneda embedding

y:C→[Cop,Set],A↦hA=Hom(−,A)\mathbf{y} : \mathcal{C} \to [\mathcal{C}^{\mathrm{op}}, \mathbf{Set}], \qquad A \mapsto h^A = \mathrm{Hom}(-, A)

is fully faithful. That is, for all objects A,B∈CA, B \in \mathcal{C}:

HomC(A,B)≅Nat(hA,hB)\mathrm{Hom}_{\mathcal{C}}(A, B) \cong \mathrm{Nat}(h^A, h^B)

ProofProof via Yoneda Lemma

Apply the Yoneda Lemma with F=hB=Hom(−,B)F = h^B = \mathrm{Hom}(-, B):

Nat(hA,hB)≅hB(A)=Hom(A,B)\mathrm{Nat}(h^A, h^B) \cong h^B(A) = \mathrm{Hom}(A, B)

The bijection sends a natural transformation α:hA⇒hB\alpha : h^A \Rightarrow h^B to αA(idA)∈Hom(A,B)\alpha_A(\mathrm{id}_A) \in \mathrm{Hom}(A, B), and the inverse sends a morphism f:A→Bf : A \to B to the natural transformation f∗:hA⇒hBf_* : h^A \Rightarrow h^B given by post-composition with ff.

Faithfulness: If f∗=g∗f_* = g_* as natural transformations, then (f∗)A(idA)=(g∗)A(idA)(f_*)_A(\mathrm{id}_A) = (g_*)_A(\mathrm{id}_A), i.e., f∘idA=g∘idAf \circ \mathrm{id}_A = g \circ \mathrm{id}_A, so f=gf = g.

Fullness: Every natural transformation α:hA⇒hB\alpha : h^A \Rightarrow h^B equals f∗f_* where f=αA(idA)f = \alpha_A(\mathrm{id}_A). This is precisely the content of Ψ∘Φ=id\Psi \circ \Phi = \mathrm{id}. □\square

■

Corollary: Representable Functors Determine Objects

Theorem1.3Representable functors detect isomorphisms

Let A,B∈CA, B \in \mathcal{C}. Then A≅BA \cong B in C\mathcal{C} if and only if hA≅hBh^A \cong h^B as presheaves. More precisely, the Yoneda embedding reflects isomorphisms.

ProofIsomorphism detection

Since y\mathbf{y} is fully faithful, it reflects isomorphisms. Concretely:

(⇒\Rightarrow): If f:A→∼Bf : A \xrightarrow{\sim} B is an isomorphism, then f∗:hA⇒hBf_* : h^A \Rightarrow h^B is a natural isomorphism with inverse (f−1)∗(f^{-1})_*.

(⇐\Leftarrow): Suppose α:hA→∼hB\alpha : h^A \xrightarrow{\sim} h^B is a natural isomorphism. By full faithfulness, α=f∗\alpha = f_* for some morphism f:A→Bf : A \to B, and α−1=g∗\alpha^{-1} = g_* for some g:B→Ag : B \to A. Then:

Note that post-composition reverses the order: (g∘f)∗=f∗∘g∗(g \circ f)_* = f_* \circ g_* does not hold in general. Instead, y\mathbf{y} is a covariant functor, so (g∘f)∗=g∗∘f∗(g \circ f)_* = g_* \circ f_*. We compute:

(idA)∗=α−1∘α=g∗∘f∗=(g∘f)∗(\mathrm{id}_A)_* = \alpha^{-1} \circ \alpha = g_* \circ f_* = (g \circ f)_*

Since y\mathbf{y} is faithful, g∘f=idAg \circ f = \mathrm{id}_A. Similarly, α∘α−1=idhB\alpha \circ \alpha^{-1} = \mathrm{id}_{h^B} gives (f∘g)∗=(idB)∗(f \circ g)_* = (\mathrm{id}_B)_*, so f∘g=idBf \circ g = \mathrm{id}_B. Therefore ff is an isomorphism. □\square

■

Applications and Examples

ExampleCayley's Theorem from Yoneda

Let GG be a group, viewed as a one-object category BG\mathbf{B}G with a single object ∙\bullet and Hom(∙,∙)=G\mathrm{Hom}(\bullet, \bullet) = G. The Yoneda embedding gives

y:BG→[BGop,Set]≅G-Set\mathbf{y} : \mathbf{B}G \to [\mathbf{B}G^{\mathrm{op}}, \mathbf{Set}] \cong G\text{-}\mathbf{Set}

The single object ∙\bullet maps to h∙=Hom(−,∙)=Gh^\bullet = \mathrm{Hom}(-, \bullet) = G as a left GG-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 Sym(G)\mathrm{Sym}(G).

ExampleUniversal elements and representing objects

Let F:Cop→SetF : \mathcal{C}^{\mathrm{op}} \to \mathbf{Set} be a presheaf. A representation of FF is a pair (A,u)(A, u) where A∈CA \in \mathcal{C} and u∈F(A)u \in F(A) such that Ψ(u):hA⇒F\Psi(u) : h^A \Rightarrow F is a natural isomorphism. By the Yoneda Lemma, this is equivalent to saying that for every object XX, the map

Hom(X,A)→F(X),f↦F(f)(u)\mathrm{Hom}(X, A) \to F(X), \qquad f \mapsto F(f)(u)

is a bijection. The element uu is called the universal element. For instance, if F=Hom(−×B,C)F = \mathrm{Hom}(- \times B, C), then a representing object is the exponential CBC^B with universal element ev:CB×B→C\mathrm{ev} : C^B \times B \to C.

ExampleRecovering morphisms from natural transformations

In algebraic geometry, a scheme XX is determined by its functor of points hX:Schop→Seth_X : \mathbf{Sch}^{\mathrm{op}} \to \mathbf{Set}, sending S↦Hom(S,X)S \mapsto \mathrm{Hom}(S, X). By Yoneda, morphisms X→YX \to Y correspond bijectively to natural transformations hX⇒hYh_X \Rightarrow h_Y. This is the foundation of the functor-of-points approach: to define a morphism of schemes, it suffices to specify it functorially on SS-points for all test schemes SS.

ExampleYoneda for preorders

Let (P,≤)(P, \leq) be a preorder viewed as a category. The presheaf category [Pop,Set][P^{\mathrm{op}}, \mathbf{Set}] consists of Set\mathbf{Set}-valued presheaves. The Yoneda embedding sends p∈Pp \in P to the "downward closed set" hp(q)=Hom(q,p)h^p(q) = \mathrm{Hom}(q, p), which is a singleton if q≤pq \leq p and empty otherwise. This is the principal downset ↓p\downarrow p. The Yoneda Lemma says Nat(hp,F)≅F(p)\mathrm{Nat}(h^p, F) \cong F(p) -- a natural transformation out of a representable presheaf is determined by its value at the "top" element.

ExampleProducts via representability

The product A×BA \times B in a category C\mathcal{C} is defined as the representing object for the functor F(X)=Hom(X,A)×Hom(X,B)F(X) = \mathrm{Hom}(X, A) \times \mathrm{Hom}(X, B). That is, we require a natural isomorphism

Hom(X,A×B)≅Hom(X,A)×Hom(X,B)\mathrm{Hom}(X, A \times B) \cong \mathrm{Hom}(X, A) \times \mathrm{Hom}(X, B)

By the Yoneda Lemma, A×BA \times B 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.

ExampleYoneda and adjunctions

An adjunction F⊣GF \dashv G between categories C\mathcal{C} and D\mathcal{D} is a natural isomorphism

HomD(F(X),Y)≅HomC(X,G(Y))\mathrm{Hom}_{\mathcal{D}}(F(X), Y) \cong \mathrm{Hom}_{\mathcal{C}}(X, G(Y))

For each fixed YY, this says the functor Hom(−,G(Y))\mathrm{Hom}(-, G(Y)) is represented by F(−)F(-) evaluated appropriately. The Yoneda Lemma ensures the unit ηX:X→GF(X)\eta_X : X \to GF(X) and counit εY:FG(Y)→Y\varepsilon_Y : FG(Y) \to Y are uniquely determined by this natural bijection.

ExampleDensity theorem (Yoneda extension)

The density theorem states that every presheaf F:Cop→SetF : \mathcal{C}^{\mathrm{op}} \to \mathbf{Set} is a colimit of representable presheaves:

F≅colim(A,x)∈∫F hAF \cong \mathrm{colim}_{(A, x) \in \int F}\, h^A

where ∫F\int F is the category of elements of FF. This is a direct consequence of the Yoneda Lemma: the universal element construction Ψ\Psi tells us that each x∈F(A)x \in F(A) gives a "probe" hA⇒Fh^A \Rightarrow F, and FF is assembled from all such probes.

ExampleYoneda for enriched categories

The Yoneda Lemma generalizes to categories enriched over a symmetric monoidal closed category V\mathcal{V}. For a V\mathcal{V}-enriched category C\mathcal{C} and a V\mathcal{V}-functor F:Cop→VF : \mathcal{C}^{\mathrm{op}} \to \mathcal{V}, the enriched Yoneda Lemma states:

[Cop,V](hA,F)≅F(A)[\mathcal{C}^{\mathrm{op}}, \mathcal{V}](h^A, F) \cong F(A)

as objects of V\mathcal{V}, naturally in AA and FF. The proof follows the same structure: define Φ\Phi by evaluation at idA\mathrm{id}_A, construct Ψ\Psi using the enriched functor structure, and verify they are mutually inverse.

ExampleModuli problems as representability

In algebraic geometry, a moduli problem is a functor F:Schop→Set\mathcal{F} : \mathbf{Sch}^{\mathrm{op}} \to \mathbf{Set} (or to groupoids). A fine moduli space is a scheme MM representing F\mathcal{F}, i.e., F≅hM\mathcal{F} \cong h^M naturally. By the Yoneda Lemma, this means there is a universal family U∈F(M)\mathcal{U} \in \mathcal{F}(M) such that every family over any base SS is the pullback of U\mathcal{U} along a unique map S→MS \to M. When no fine moduli space exists (e.g., for curves of genus g≥2g \geq 2 with automorphisms), one passes to algebraic stacks.

ExampleNaturality forces the Yoneda bijection

The Yoneda bijection is the only natural bijection Nat(hA,F)≅F(A)\mathrm{Nat}(h^A, F) \cong F(A). Indeed, suppose Φ′\Phi' is any natural bijection. Naturality in FF applied to the natural transformation Ψ(x):hA⇒F\Psi(x) : h^A \Rightarrow F (for x∈F(A)x \in F(A)) forces Φ′\Phi' to agree with Φ\Phi. This "rigidity" illustrates how naturality severely constrains the possible constructions.

ExamplePresheaf category has all limits and colimits

Since Set\mathbf{Set} has all small limits and colimits, the presheaf category [Cop,Set][\mathcal{C}^{\mathrm{op}}, \mathbf{Set}] inherits them (computed pointwise). The Yoneda embedding y:C→[Cop,Set]\mathbf{y} : \mathcal{C} \to [\mathcal{C}^{\mathrm{op}}, \mathbf{Set}] thus embeds C\mathcal{C} fully faithfully into a category that is complete and cocomplete. This is a "free cocompletion": [Cop,Set][\mathcal{C}^{\mathrm{op}}, \mathbf{Set}] is the free cocompletion of C\mathcal{C} under small colimits, a fact that rests on the density theorem and the Yoneda Lemma.

ExampleYoneda in homotopy theory

In the homotopy category Ho(Top∗)\mathrm{Ho}(\mathbf{Top}_*) of pointed spaces, the representable functor [−,X][-, X] sends a space YY to the set of homotopy classes [Y,X][Y, X]. Brown's representability theorem can be viewed as a homotopical analogue of the Yoneda Lemma: under mild conditions, a contravariant functor from Ho(Top∗)\mathrm{Ho}(\mathbf{Top}_*) to Set\mathbf{Set} that converts coproducts to products and satisfies a Mayer-Vietoris condition is representable. The Eilenberg-MacLane spaces K(π,n)K(\pi, n) represent ordinary cohomology: Hn(X;π)≅[X,K(π,n)]H^n(X; \pi) \cong [X, K(\pi, n)].


Summary of the Proof Strategy

RemarkThe structure of the proof

The proof of the Yoneda Lemma follows a clean three-part strategy:

  1. Define Φ(α)=αA(idA)\Phi(\alpha) = \alpha_A(\mathrm{id}_A) -- extract the "essential data" from a natural transformation by evaluating at the identity.

  2. Construct Ψ(x)X(f)=F(f)(x)\Psi(x)_X(f) = F(f)(x) -- rebuild a natural transformation from a single element by "transporting" it along morphisms via the functor FF.

  3. Verify Φ∘Ψ=id\Phi \circ \Psi = \mathrm{id} (using the functor law F(id)=idF(\mathrm{id}) = \mathrm{id}) and Ψ∘Φ=id\Psi \circ \Phi = \mathrm{id} (using the naturality condition on α\alpha).

The naturality of Φ\Phi 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 F(A)F(A).

RemarkPhilosophical significance

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 hXh_X replaces the scheme XX.
  • In homotopy theory, spaces are probed by mapping spheres into them.
  • In topos theory, a topos is studied through its points (geometric morphisms from Set\mathbf{Set}).

As Ravi Vakil puts it: "If you want to understand an object, look at the maps to and from it."