2-functor and CAT Let $\cal K$ be a small category.
Let $\cal A$ be a subcategory of $\mathbf {CAT}$ and $U:{\cal A}\hookrightarrow{\mathbf {CAT}}$ the underlying functor. Now how is
$U^{\cal K}$ naturally defined as a $2$-functor
$$U^{\cal K}:\cal A\hookrightarrow{\mathbf {CAT\ } } ?$$
I understand that on an object $A$ in $\cal A$, $U^{\cal K}(A)$ is the class of all functors $F:{\cal K}\to A$. Is this correct?
What about $U^\cal K$ on functors and natural transformations? Note that I'm a beginner to the $2$-category stuff.
 A: Let me first start with a precision, to be sure we agree : $\textbf{CAT}$ is a two category, whose objects are all small categories, morphisms are functors, and $2$-cells are natural transformations, and $\mathcal{A}$ is a sub-$2$-category of $\textbf{CAT}$.
Now you want to define a functor $U^{\mathcal{K}} : \mathcal{A} \to \textbf{CAT}$, and you already know that for every object $A$ of $\mathcal{A}$ (by definition, $A$ is a small category), you have $U^{\mathcal{K}}(A):=[\mathcal{K},A]$ (the category of functors from $\mathcal{K}$ to $A$).
The only thing that makes sense to me is to define it as : 


*

*For any functor $G : A \to B$ is $\mathcal{A}$, 
define $U^\mathcal{K} (G) : [\mathcal{K},A] \to [\mathcal{K},B]$ to be the composition $G \circ \_$ You can check that this defines indeed a functor between the two functor categories. Indeed, any object $F$ of $[\mathcal{K},A]$ (note, $F : \mathcal{K} \to A$ is just a functor) is sent to the functor $G\circ F : \mathcal{K} \to B$. Moreover, a functor $\alpha : F \Rightarrow F'$ in  $[\mathcal{K},A]$ (note that $\alpha$ is just a natural transformation) is sent to the natural transformation $(G\circ \alpha)_K = G(\alpha_K) : G(F(K)) \to G(F'(K))$. You can check that this is indeed a natural transformation (and by the way, this is called the left whiskering of $\alpha$ by $G$)

*For any natural transformation $\beta : G \to G'$ in $\mathcal{A}$ define $U^{\mathcal{K}}(\beta) : U^\mathcal{K}(G) \Rightarrow U^\mathcal{K}(G')$ to be the natural transformation such that for all $F : \mathcal{K} \to A$, $U^\mathcal{K}(\beta)_F$ is the natural transformation $\beta\circ F : G\circ F \Rightarrow G'\circ F$ (It gets a little confusing here, since we are defining a natural transformation whose components are themselves natural transformation, so we have to be careful). The definition of $\beta\circ F$ is essentially the dual to the previous one and is called the right whiskering. Now to prove that this is well defined, we have to show that $U^\mathcal{K}(\beta)$ is indeed a natural transformation. Unwrapping all the definitions, it turns our that this is exactly given by the exchange law (which is an axiom of $2$-categories)

