# Problem with Mac Lane's proof of Yoneda Lemma

For the sake of completenss I begin with

Def. If $S:D\rightarrow C$ is a functor and $c$ is an object of $C,$ a universal arrow form $c$ to $S$ is a pair $<r,u>$ consisting of an object $r$ of $D$ and arrow $u:c\to Sr$ of $C,$ such for every $d$ of $D$ and arrow $f:c\to Sd$ of $C,$ there is a unique arrow $f':r\to d$ of $D$ with $Sf'\circ u=f.$

I am interested in logical characterisation of universal arrow. That is, if we read the definition carefully we shall notice $\forall\exists !$ part and come up with

Thm. If $S:D\rightarrow C$ is a functor and $c$ is an object of $C,$ then $<r,u:c\to Sr>$ is universal arrow from $c$ to $S$ if and only if function sending each $f':r\rightarrow d$ into $Sf'\circ u$ is a bijection of hom-sets (this bijection will be denoted $\phi_d$) $$D(r,d)\cong C(c,Sd).$$ This bijection is natural in $d.$

This is precesely the first part of Mac Lane's Proposition 1. (from III.2). The naturallity in $d$ is clear. As a result we end up with natural isomorphism $\phi_d:D(r,d)\rightarrow C(c,Sd)$ of parallel functors $$D(r,\cdot),C(r,S\cdot):D\to Ens.$$

Second part of Mac Lane's Proposition 1. is following

Thm. Given functor $S:D\rightarrow C,$ object $c$ of $C,$ object $r$ of $D$ and natural isomorphism $\phi$ $$D(r,d)\cong C(c,Sd),$$ there is unique arrow $u:c\rightarrow Sr$ such that $<r,u>$ is universal arrow form $c$ to $S$ and $$\forall(f':r\to d)\hspace{10pt}\phi_d(f')=Sf'\circ u.$$

Proof is important, because in Yoneda Lemma Mac Lane is referring to it. So we define $u$ to be $\phi_r(1_r).$ Then we just take arbitrary $f':r\to d$ and by commutativity of diagram we see that $\phi_d(f')=Sf'\circ u.$

Question 1. Why is $u$ unique? I see no reason.

Then Mac Lane says

The argument for Proposition 1 rested on the observation that each natural transformation $\phi:D(r,\cdot)\to K$ is completely determined by the image under $\phi$ of the identity $1_r.$ This fact may be stated as follows:

And here goes the Yoneda Lemma

Lemma (Yoneda) If $K:D\to Set$ is a functor and $r$ is an object of $D,$ then there is a bijection $$y:Nat(D(r,\cdot),K)\cong Kr$$ which sends each natural transformation $\alpha$ to $\alpha_r(1_r)$ The proof is indicated by the following commutative diagram Here I see the same problem as previously. I take arbitrary natural transformation $\alpha$ then arbitrary $f:r\to d$ and by commutativity of above diagram I end up with $\alpha_d(f)=K(f)(\alpha_r(1_r)).$

Question 2. Where this bijectivity of $y$ comes from?

Question 1: Taking $d=r$ and $f'=1_r$, the condition $\phi_d(f')=Sf'\circ u$ says that $\phi_r(1_r)=S(1_r)\circ u=u$, since $S(1_r)=1_{Sr}$. So the only possible value of $u$ that could work is $u=\phi_r(1_r)$.
Question 2: You can recover $\alpha$ from $y(\alpha)$ via the formula $\alpha_d(f)=K(f)(y(\alpha))$, so $y$ is injective. It is also surjective, because for any $x\in K(r)$, you can just define $\alpha_d$ by the formula $\alpha_d(f)=K(f)(x)$, and you can easily check that these are the components of a natural transformation $\alpha$ such that $y(\alpha)=x$.
• I felt like I miss something obvious and general. Namy if we have a function $f:A\to B$ and we are said that a=something(f(a)) (i.e $1_A=g\circ f$), then it implies injectivity of $f.$ However surjectivity of $y$ isn't so evident from MacLane's book. – Fallen Apart Nov 7 '15 at 20:30