# Yoneda-Lemma as generalization of Cayleys theorem?

I came across the statement that Yoneda-lemma is a generalization of Cayleys theorem which states, that every group is isomorphic to a group of permutations.

How exactly is Yoneda-lemma a generalization of Cayley`s theorem? Can Cayley’s theorem be deduced from Yoneda lemma, is it a generalization of a particular case of Yoneda, or is this instead, a philosophical statement?

To me, it seems that Yoneda embedding is more canonical than Cayley’s theorem because in the latter you have to choose whether the group acts from the left or from the right on itself. But maybe this is an optical illusion.

Just as Cayley’s theorem states that every group is a subgroup of a symmetric group, Yoneda’s lemma states that every (locally small) category $C$ embeds into a category of functors defined on $C$.
Specifically, Yoneda’s lemma states that if $F:C\to Set$ is an arbitrary set-valued functor, then $F(A) = Nat(\hom(A,-), F)$, so that natural transformations from a hom-set functor are in bijective correspondence with the elements in the functor image.
For this to be a straight generalization, we may consider a group $G$ as a category $C_G$ (actually a groupoid) with a single object $\ast$, and each group element a morphism. Then, there is only a single object, so a set-valued functor is the same thing as a set $S$ with a map from $G$ to $Bij(S,S)$, the set of bijections from $S$ to $S$. We can see this by unrolling the definition of set-valued functor: $\ast$ goes to $S$, and each element of $G$ goes to some map $S\to S$; all of which maps have to be bijections since otherwise the group properties suffer.
Suppose now that we have some such $G$-set $S$, Yoneda’s lemma tells us that its elements are bijective with natural transformations from $G$ to $S$; so what is a natural transformation here? Our two functors are $S$, that takes $\ast$ to $S$, and $\hom(\ast,-)$ that takes $\ast$ to $G$; both as sets. A natural transformation of these is a set-valued map from one image to the other, such that the ‘obvious’ square of induced maps from morphisms in $C_G$ commutes – thus, $Nat(\hom(\ast,-),S)$ is the collection of $G$-set maps from $G$ as a left $G$-representation to $S$ itself.
One of the things Yoneda brings is a bijection $Nat(\hom(a,-),\hom(b,-)) = \hom(b,a)$: the Yoneda embedding. Applied to the group situation, this tells us that $\hom_G(G,G)=G$. Certainly, left multiplication by an element is a group endomorphism; and what this tells us is that these are all there is. This bijection is exactly what is used in the proof of Cayley’s theorem on the wikipedia page.