Where is the symmetric group hidden in the Yoneda lemma?
Solution 1:
$S(G)$ is the set of all bijections in $\mathcal{Set}$ from $|G|$ to itself, where I denote by $|G|$ the underlying set of $G$. This is exactly the permutation group on $|G|$.
Now, the application of Yoneda that gets us Cayley is, as you say, taking $F=\hom_G(B,-),$ where $\hat{G}$ denotes the one-object category with $G$ as its arrows. Call its only object $X$. So, for every $A,B,$ we get $F(A)=\hom(B,A)=\textrm{nat} (\hom(A,-),\hom(B,-))$. But the only candidate for $A$ or $B$ is $X$, so all we really have is $\hom(X,X)=\textrm{nat} (\hom(X,-),\hom(X,-))$. Now by the construction of $\hat{G}, \hom(X,X)=G,$ so now we just want to see why the natural transformations from $\hom(X,-)$ to itself are contained in the bijections on $|G|$.
First, the objects of the image of $\hom(X,-)$ are just $\hom(X,X)=|G|.$ Let's interpret the images of morphisms in $\hat{G}$, which are the elements of $g,$ by the right action: $\hom(X,g): h \in |G| \mapsto hg$. Now a natural transformation $\alpha$ needs a component morphism at each object in the image of the functor, but since our functors have singleton images let's identify $\alpha$ with $\alpha_{|G|}$. The naturality $\alpha$ needs is given by this diagram: $$ \newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\ras}[1]{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}[1]{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}} \begin{array}{ccc} |G|&\ra{\alpha}&|G|\\ \da{g}&&\da{g}\\ |G|&\ra{\alpha}&|G|\\ \end{array} $$ That is, we need $\alpha(hg)=(\alpha(h))g$ for each $h,g$. We can obviously accomplish this for a set of $\alpha$ isomorphic to $G$ by letting each $k$ in $G$ act on the left. Note that any natural $\alpha$ will have to be a bijection on $|G|,$ in short because the right action of $G$ on itself is transitive. So we see that the admissible bijections are some subset of $S(|G|)$; by Yoneda, they're exactly $G$, so that $G \leq S(|G|)$.
Solution 2:
$S(G)$ comes from $\mathbf{Set}$.
Let $\mathbf{G}$ be the category with one object * such that $\hom(*,*) = G$.
If you want to think of Cayley's theorem from a category-theoretic point of view, it's a combination of several distinct observations.
- There is an obvious action of $G$ on itself
- A $G$-set is the same thing as a functor $\mathbf{G} \to \mathbf{Set}$
- The image of any monoid homomorphism from a group to a monoid is contained in the the units of the monoid (the submonoid of invertible elements)
- The unit group of $\mathop{\text{End}}(X)$ is $S(X)$
The interesting part of the analogy between the Yoneda lemma and Cayley's theorem is not the last bullet point.
If you really want a more direct analog of a functor $G \to S(|G|)$, then observe that every arrow $f:Y \to Z$ of your category induces a function of sets
$$ f_* : \hom(X, Y) \to \hom(X, Z)$$
that is natural in $X$, and that $(fg)_* = f_* g_*$. (and there is a corresponding contravariant version)
If you really, really want something even more direct, I'm sure you can set up some sort of object and look at its endomorphism category, and have a functor from $\mathbf{C}$ \to that. I doubt it will be enlightening.