define the action of the free vector space functor on maps using the Yoneda lemma? I'm reading Emily Riehl's Category theory in context. In chapter 4, I saw the free vector space functor $
\Bbb{k}[-]: Set \to Vect_{\Bbb{k}}
$ and the forgetful functor $U: Vect_{\Bbb{k}} \to Set$. Here $Set$ is the cateogry of all sets and $Vect_{\Bbb{k}}$ is the category of all vector space on field $\Bbb{k}$.
I knew that these two functors are adjoint to each other. And it can be expressed by the universal property that linear maps $\Bbb{k}[S] \to V$ correspond naturally to functions $S \to U(V)$.
But I don't understand the following sentence, quoted from the book Cateogry theory in context, chapter 4 at the begining:

By the Yoneda lemma, this universal property can be used to define the action of the free vector space functor $\Bbb{k}[-]$ on maps.

I'm confused on this statement.

*

*Why is it related to the Yoneda lemma? I cannot see the relation between the statement and the Yoneda lemma.

*What is the meaning of "maps" in the statement? Is it the morphism in the Set category?

I attach a screenshot for the case if I didn't describe the context well. The purple sentence is what I feel confused.
Thanks!

 A: Suppose $G : D \to C$ is a functor which has a "pointwise left adjoint" in the sense that for every object $c \in C$ you have constructed an object $F(c)$ satisfying the natural isomorphism
$$\text{Hom}_D(F(c), d) \cong \text{Hom}_C(c, G(d))$$
in $d$. Equivalently, the functor $\text{Hom}_C(c, G(-))$ is representable for every $c$. A priori this is not enough information to say that $G$ has a left adjoint, because $F$ has only been defined on objects, not on morphisms. However, it turns out that knowing $F$ on objects automatically determines it on morphisms by the universal property + the Yoneda lemma, as follows:
Suppose $f : c_1 \to c_2$ is a morphism. We'd like to use this to construct a morphism $F(f) : F(c_1) \to F(c_2)$. By the Yoneda lemma, this is the same as constructing a natural transformation $\text{Hom}_D(F(c_2), -) \to \text{Hom}_D(F(c_1), -)$. By the universal property we have $\text{Hom}_D(F(c_i), -) \cong \text{Hom}_C(c_i, G(-))$, so a morphism $f : c_1 \to c_2$ naturally induces a natural transformation $\text{Hom}_C(c_2, G(-)) \to \text{Hom}_C(c_1, G(-))$ which via the above identifications gives $F(f)$.
This is very abstract, so let's unwind what it actually says in the case that $G$ is the forgetful functor $U : \text{Vect} \to \text{Set}$ and its left adjoint $F$ is the free vector space functor. Let $f : X \to Y$ be a map of sets ("maps" here means morphisms in $\text{Set}$, or just ordinary functions). We want to construct out of $f$ a linear map $k[f] : k[X] \to k[Y]$. According to the above argument, we should first use $f$ to construct a natural transformation
$$\text{Hom}_{\text{Set}}(Y, U(V)) \to \text{Hom}_{\text{Set}}(X, U(V))$$
where $V$ is an arbitrary vector space. $\text{Hom}_{\text{Set}}(X, U(V))$ is just the set of functions from $X$ to the underlying set of $V$, or equivalently the $X$-fold product $V^X$. So the function above $V^Y \to V^X$ can be thought of as pullback of $V$-valued functions; explicitly it is just given by precomposition. Next, we use the universal property to identify this with a natural transformation
$$\text{Hom}_{\text{Vect}}(k[Y], V) \to \text{Hom}_{\text{Vect}}(k[X], V).$$
We are still talking, now, about the set of functions from $X$ resp. $Y$ to $V$, but now thought of as the set of linear functions from $k[X]$ resp. $k[Y]$ to $V$. This identification comes from taking a function $X \to V$ and then freely extending it by linearity (this is part of the universal property of the free vector space). Finally, we want to recover an actual linear map $k[X] \to k[Y]$. As usual, we do this by taking $V = k[Y]$ above, getting a map
$$\text{Hom}_{\text{Vect}}(k[Y], k[Y]) \to \text{Hom}_{\text{Vect}}(k[X], k[Y])$$
then evaluating this map on the identity to get a linear map $k[f] : k[X] \to k[Y]$. What is this map? Well, the identity map $k[Y] \to k[Y]$ corresponds via the adjunction to the map $Y \to k[Y]$ given by sending every element of $Y$ to the corresponding basis vector of $k[Y]$. Pulling back along $f : X \to Y$ gives a map $X \to k[Y]$ given by sending $x \in X$ to the basis vector $f(x) \in k[Y]$. Then we freely extend by linearity to get a linear map $k[X] \to k[Y]$. In other words, we get the map
$$\boxed{ k[f] : k[X] \ni \sum c_x x \mapsto \sum c_x f(x) \in k[Y] }.$$
