Let $\Gamma$ be the category $e\overset{s}{\underset{t}{\rightrightarrows}}v$ and $\mathbf{Graphs}=\mathbf{Sets}^{\Gamma}$ the category of (directed multi) graphs.
For graphs $G$ and $H$, it's my understanding that the exponential object $H^G$ is the graph whose vertices are arbitrary functions $\varphi:G_v\to H_v$ and whose edges $\theta:\varphi\to\psi$ are functions $\theta:G_e\to H_e$ making these diagrams commute: $\require{AMScd}$ \begin{CD} G_v @<s<< G_e @>t>> G_v\\ @V \varphi VV @VV \theta V @VV \psi V\tag{1}\\ H_v @<<s< H_e @>>t> H_v \end{CD}
The evaluation homomorphism $\epsilon:H^G\times G\to H$ is defined on vertices by $(\varphi,v)\mapsto\varphi(v)$ and on edges by $(\theta,e)\mapsto\theta(e)$. For a homomorphism $f:F\times G\to H$, the transpose homomorphism $\lambda f:F\to H^G$ is defined on vertices by $v\mapsto f(v,-)$ and on edges by $e\mapsto f(e,-)$.
I'm trying to see how this falls out of the general construction of exponentials in categories of sheaves using the Yoneda lemma, but can't quite get things to line up.
Let $y:\Gamma^{\mathrm{op}}\to\mathbf{Graphs}$ be the (contravariant) Yoneda embedding. Then I believe:
- $y(v)$ is the "vertex graph" $\bullet$ consisting of a single vertex with no edges
- $y(e)$ is the "edge graph" $\bullet\to\bullet$ consisting of two vertices with one edge between them
- The graph $\bullet\times G$ is the graph of "vertices of G"
- The graph $(\bullet\to\bullet)\times G$ is the graph of "edges of G" consisting of (i) two copies $v_s$ and $v_t$ of each vertex $v$ of $G$ ($v_s$ represents "$v$ as a potential source" and $v_t$ represents "$v$ as a potential target"), and (ii) an edge $s(e)_s\to t(e)_t$ for each edge $e$ of $G$.
Now if $H^G$ is an exponential graph we must have
$$\begin{align*} (H^G)_v&\cong\mathrm{Hom}_{\mathbf{Graphs}}(y(v),H^G)\\ &\cong\mathrm{Hom}_{\mathbf{Graphs}}(\bullet\ ,H^G)\\ &\cong\mathrm{Hom}_{\mathbf{Graphs}}(\bullet\times G,H)\\ &\cong\mathrm{Hom}_{\mathbf{Sets}}(G_v,H_v) \end{align*}$$
which checks out, and
$$\begin{align*} (H^G)_e&\cong\mathrm{Hom}_{\mathbf{Graphs}}(y(e),H^G)\\ &\cong\mathrm{Hom}_{\mathbf{Graphs}}(\bullet\to\bullet,H^G)\\ &\cong\mathrm{Hom}_{\mathbf{Graphs}}((\bullet\to\bullet)\times G,H) \end{align*}$$
However, in general won't there be more graph homomorphisms from $(\bullet\to\bullet)\times G$ to $H$ than functions $\theta:G_e\to H_e$ satisfying (1), for example if $G$ has isolated vertices?
My understanding is that a graph homomorphism is a mapping of vertices to vertices and edges to edges which respects sources and targets of edges, so for an isolated vertex $v$ in $G$ we could map the isolated vertices $v_s$ and $v_t$ of $(\bullet\to\bullet)\times G$ freely for any given mapping of edges.
What is my error?
You haven’t specified what exactly you think $\bullet\to\bullet \times G$ is, so lets do so: it’s the graph with vertices $G_v\times \{0\}\cup G_v\times \{1\}$ and edges $(x,0)\to (y,1)$ for every edge $x\to y$ in $G$. A map from this to $H$ precisely consists of functions $f_0,f_1:G_v\to H_v$ and $f:G_e\to H_e$ such that $s\circ f=f_0\circ s$ and $t\circ f=f_1\circ t$, as you say.
It is true that $f_0$ and $f_1$ are unconstrained in their action on isolated vertices by $f$, as you also say. Your initial description implies that $f_0$ and $f_1$ should be determined by $f$, and indeed in general they are not. An edge of the exponential graph is the whole triple.