Posted by: holdenlee | September 8, 2012

## Yoneda’s Lemma

Finally, a math post! Prerequisites: basic category theory.

Sometimes, to understand an object in math, we consider ways the object can act on something else (e.g. a set), or ways the object can map into something else (or something else can map into it). For example, in group theory, it’s helpful to take a step back from looking at “a group $G$” to “all possible actions of a group $G$ on sets $S$.” If we let the set $S$ be $G$, i.e. we look at how $G$ acts on itself, we recover all information about $G$.

Yoneda’s Lemma is a vast category-theory generalization of this idea. Instead of studying a category $\mathcal C$, we study functors from $\mathcal C$ to (Sets). The functors from $\mathcal C$ to (Sets) form a category–the functor category $\text{(Set)}^{\mathcal C}:=\text{Fun}(\mathcal C,\text{(Set)})$ (the objects are functors and the morphisms are natural transformations). We can embed $\mathcal C$ into this category $\text{Fun}(\mathcal C,\text{(Set)})$, just as we can embed a group $G$ into the category of $G$-sets by considering $G$ as acting on itself.

We state the lemma. (If you need help with the terminology, scroll down.)

Yoneda’s Lemma: Let $\mathcal C$ be a locally small category.  Let $h_A$ denote the functor $\text{Hom}(\bullet, A): \mathcal C\to \text{(Sets)}$ and $h^A$ denote the contravariant functor $\text{Hom}(A,\bullet)$ (i.e. it is a functor $\mathcal C^{\text{op}}\to \text{(Sets)}$).

1. (Covariant version) Let $F$ be functor from $\mathcal C$ to (Sets). As functors $\text{(Set)}^{\mathcal C}\times \mathcal C \to \text{(Set)}$, we have $\text{Nat}(h^A,F)\cong F(A)$.  ($F$ is in $\text{(Set)}^{\mathcal C}$, $A$ is in $\mathcal C$, and $\text{Nat}(h^A,F)\cong F(A)$ is a set.)
2. (Contravariant version) Let $F$ be a contravariant functor from $\mathcal C$ to (Sets). As functors $\text{(Set)}^{\mathcal C^{\text{op}}}\times \mathcal C \to \text{(Set)}$, we have $\text{Nat}(h_A,F)\cong F(A)$.

Corollary (Yoneda Embedding):

1. The embedding $h^{\bullet}:\mathcal C^{\text{op}}\to \text{(Set)}^{\mathcal C}$ given by sending $A\mapsto h^A=\text{Hom}_{\mathcal C}(A,\bullet)$ is fully faithful. (The morphism $f:A\to B$ gets sent to $f\circ \bullet$.)
2. The embedding $h_{\bullet}:\mathcal C\to \text{(Set)}^{\mathcal C^{\text{op}}}$ given by sending $A\mapsto h_A=\text{Hom}_{\mathcal C}(\bullet,A)$ is fully faithful. (The morphism $f:A\to B$ gets sent to $\bullet\circ f$.)

Remarks:

• A category is locally small if homomorphisms between any two objects form a set.
• $\text{(Set)}^{\mathcal C^{\text{op}}}$ is the category of contravariant functors $\mathcal C\to \text{(Set)}$.
• $\text{Hom}(A,B)$ has just the structure of a set.
• $\text{Nat}(G,F)$ denotes the set of natural transformations between $G$ and $F$.
• A functor $\Phi$ is fully faithful if $\Phi_{A,B}:\text{Hom}(A,B)\to \text{Hom}(\Phi(A),\Phi(B))$ is bijective for any objects $A$ and $B$. This basically means that $\Phi$ embeds the first category into the second, and there aren’t any “extra” maps between embedded objects that are present in $B$ but not $A$.
• We say a functor $F:\mathcal C\to \text{(Set)}$ is representable if $F\cong h^A$ for some $A$ (and ditto for contravariant).

English?

The statement $\text{Nat}(h^A,F)\cong F(A)$ basically tells us that the maps (natural transformations) between $h_A$ (i.e. the embedding of $A$ in the functor category), and arbitrary $F$ in the functor category is just given by $F(A)$, and ditto for the contravariant case. The corollary is more intuitive.

Proof of Corollary:

We show (2) of the lemma implies (2) of the corollary; (1) is entirely analogous. Set $F=h_B$ to get

$\text{Nat}(h_A,h_B)\cong h_B(A).$

Now a natural transformation is just a morphism in the functor category, so $\text{Nat}(h_A,h_B)=\text{Hom}_{\text{(Set)}^{\mathcal C^{\text{op}}}}(h_A,h_B)$, and by definition $h_B(A)=\text{Hom}(A,B)$, so we get

$\text{Hom}_{\text{(Set)}^{\mathcal C^{\text{op}}}}(h_A,h_B)\cong \text{Hom}(A,B).$

This is exactly the condition to be fully faithful.

Example (Groups and group actions):

Let’s return to groups acting on sets. Consider a group as a category $\mathcal C_G$ with a single object, and all the group elements as morphisms from that object to itself, that compose in the way given by the group relations. Now what is an element of $\text{(Set)}^{\mathcal C_G^{\text{op}}}$? A functor sends an object to an object, so sends the single object in the group, say $\{\cdot \}$, to a set, say $S$. It sends a morphism to a morphism (compatibly), so it sends an element of the group, say $a$, in a contravariant way to a transformation $S\to S$, which has to be a bijection since $a$ is invertible. In a group action, each element of the group corresponds to a transformation (permutation) of the set $S$, so an element of $\text{(Set)}^{\mathcal C_G^{\text{op}}}$ is just a right group action on a set $S$ (note contravariant-ness here gives the right action, though actually it depends on conventions). The Yoneda embedding thus embeds the single group $G$ into the category of all $G$-sets, by sending $G$ to itself considered as a $G$-set [*]. The fully faithful condition is

$\text{Hom}_{G}(G,G)=\text{Hom}_{\mathcal C_G}(\{\cdot\},\{\cdot\})=G,$

which recovers the following familiar fact: considering $G$ as a $G$-set, the only $G$-invariant homomorphisms from $G$ to $G$ are given by (multiplication by) elements of $G$.

This example is often cited as “Yoneda’s Lemma is a generalization of Cayley’s Theorem” because by considering $G$ as a $G$-set, we realize $G$ as a permutation group.

[*] More precisely, $\mathcal \{\cdot\}$, the only object in $\mathcal C_G$ which by abuse of terminology we consider as $G$, is sent to $\text{Hom}(\{\cdot\},\bullet)$. Since $\mathcal C_G$ has only 1 object anyway, we identify this with just $\text{Hom}(\{\cdot\},\{\cdot\})=G$.

I’ll continue in a future post with the proof and how Yoneda’s lemma applies to algebraic geometry. Specifically, Yoneda Embedding allows us to jump between the viewpoint of a scheme $X$ with the viewpoint of “$T$-valued points of $X$,” and knowing both viewpoints is especially useful in thinking about group schemes, as I learned in the first lecture of 18.787. (Will put up the lecture notes once I clear up some remaining confusions.)