What does the Yoneda lemma say for the identity functor and finite sets?

512 Views Asked by At

So I try to plug in the simplest arguments into the Yoneda lemma and see how to interpret it. I'll try it for the identity functor and the category of finite sets, in particular, I use an three element object $\{a,b,c\}$

The lemma says the following relation for functors $F:{\bf C}\to{\bf Set}$ holds, naturally:

$$\mathrm{nat}\left(\mathrm{Hom}_{\bf C}(-,A),F\right)\cong F(A).$$

I came to view this as a result about the morphisms in the functor category ${{\bf Set}^{\bf C}}$, i.e.

$$\mathrm{Hom}_{{\bf Set}^{\bf C}}\left(\mathrm{Hom}_{\bf C}(-,A),F\right)\cong F(A).$$

Now for my example this says

$$\mathrm{Hom}_{{\bf Set}^{\bf Fin}}\left(\mathrm{Hom}_{\bf Fin}(-,\{a,b,c\}),\mathrm{id_{{\bf Set}^{\bf Fin}}}\right)\cong \{a,b,c\}.$$

So that seems to say that I can collapse the functions from any object $B$ into $\{a,b,c\}$ into the identity, the object $B$ itself, in exactly three ways.

I don't see it, have I misinterpret the result? How does the $\bf Fin$ and three object example work properly?


edit / solution:

In an answer, Stefan Hamcke pointed out I stated a contra-variant version (i.e. the one where $A$ is on the right hand side in $\mathrm{Hom}_{\bf C}(-,A)$) which doesn't work with the identity (because it doesn't flip arrow-orientation). Here I try to fix it:

The co-variant version

$$\mathrm{nat}\left(\mathrm{Hom}_{\bf C}(A,-),F\right)\cong F(A),$$

would say

$$\mathrm{nat}\left(({\{a,b,c\}}\to -),\mathrm{id}(-)\right)\cong \{a,b,c\},$$

i.e. there are 3 natural transforms from any function space ${\{a,b,c\}}\to B$ to $B$.

Now if $B,C\in{\bf Fin}$ and

$fromB\ :\ B\to C,$

is a generic function in that category, then naturality means that taking a function

$toB\ :\ {\{a,b,c\}}\to B$

via the natural transformation $\tau$ to $\mathrm{id}(B)=B$ (i.e. mapping $toB$ to an element $\beta\in B$) and then going along $\mathrm{id}(fromB)=fromB$ (i.e. end up with $fromB(\beta)\in C$), that is the same as taking my function $toB$ to the function

$fromB\circ toB\ :\ \{a,b,c\}\to C$

and then choosing, via $\tau$, an element from the codomain $C$.

I got the feeling the natural transformations

$\tau\ :\ (\{a,b,c\}\to -)\to \mathrm{id}(-)$

are the three maps "$\mathrm{eval}$ at one of $\{a,b,c\}$", i.e.

$f\ \mapsto\ f(x),$

where $x$ either $a,b$ or $c$.

2

There are 2 best solutions below

3
On BEST ANSWER

The Yoneda Lemma in the stated form tells you about natural transformations between the functors $\text{Hom}(-,A)$ and $F$ from $\mathbf{Fin}$ to $\mathbf{Set}$. The crucial point is that $\text{Hom}(-,A)$ is contravariant, and this requires the functor $F$ to be contravariant, too. But the $F$ you chose, namely $\text{id}_\mathbf{Fin}$ is covariant.

Let's just replace it by a real contravariant functor, the preimage functor $\cal P^{-1}:\mathbf{Fin}→\mathbf{Set}$, which assigns to a set $S$ its power set and to a function $f:S\to T$ the set map $\cal PT→\cal PT$ which gives the preimage of every subset. Now the Yoneda Lemma claims that $$\text{Nat}(\text{Hom}(-,\{a,b,c\}),\cal P^{-1}-)\cong \cal P\{a,b,c\}$$ So choose an element $B$ of $\cal P\{a,b,c\}$. Now if $f:S\to\{a,b,c\}$ is a set map, we can assign to $f$ the preimage $f^{-1}[B]$ which is an element of $\cal P^{-1}S$

Of course if you want to keep the $\text{id}_\mathbf{Fin}$ functor, you are invited to replace the contravariant hom-functor by $\text{Hom}(A,-)$ and see what happens.


Edit

Your solution is right. The covariant Yoneda Lemma establishes a bijection $$\text{Nat}(\text{Hom}(A,-),F-)\cong FA$$ where the element $e\in FA$ corresponds to the natural transformation $\sigma_e$ which sends a morphism $f:A→B$ to $(Ff)(e)$.
In the case $F=\text{id}_\mathbf{Set}$ and $A=\{a,b,c\}$, the element $a\in A$ gives the transformation $\alpha:\ \mathbf{Set}(A,-)\ \longrightarrow\ (-)$ which maps $f:A→B$ to $f(a)$.
Yoneda tells us that this is natural, that means for $g:B→C$ $$α(\mathbf{Set}(A,g)(f))=g(α(f))$$ which is nothing else than $$(g\circ f)(a)=g(f(a))$$ which is what you said.
So in this case, Yoneda doesn't give us much new insight, but there are cases where it is really useful.

0
On

Note that $\lbrace a,b,c\rbrace$ is isomorphic to the set of $\bf{natural}$ transformations $$\hom(-,\lbrace a,b,c\rbrace)\to \text{id}$$