$y(t)$ is simply the probability density arising from the Wiener process $w(t)$, in view of the independence of $w(t)$ and $b(t).$ It is the function $p(y,t)$ solution of

$$\left\{
\begin{array}{l}
    \dfrac{\partial p}{\partial t}-\dfrac{1}{2}\displaystyle\sum_{ij}(a_{i,j}(y+\beta b(t))\frac{\partial^{2}p}{\partial y_{i}\partial y_{j}})+\text{div }\left(g(y+\beta b(t),m_{v(\cdot)}(t),v(y+\beta b(t),t))p\right)=0\\
    p(y,0)=m_{0}(y)\\
\end{array}
\right.$$

The conditional probability density of $x(t)$ given $\mathcal{B}^{t}$ is $m_{v(\cdot)}(x,t)=p(x-\beta b(t),t)$, and hence $$\partial_{t}m_{v(\cdot)}=(\frac{\partial p}{\partial t}+\frac{1}{2}\beta^{2}\Delta p)(x-\beta b(t),t)dt-\beta Dp(x-\beta b(t),t)db(t).$$

We thus have $$\label{eq:3.2-1}
\left\{
\begin{array}{l}
\partial_{t}m_{v(\cdot)}+(\mathcal{A}^{*}m_{v(\cdot)}-\dfrac{1}{2}\beta^{2}\Delta m_{v(\cdot)}+\text{div}(g(x,m_{v(\cdot)}(t),v(x,t))m_{v(\cdot)}))dt+\beta Dm_{v(\cdot)}db(t)=0,\\
m_{v(\cdot)}(x,0)=m_{0}(x);
\end{array}
\right.$$ and the objective functional (\[eq:3.2\]) can be written as $$J(v(\cdot))= \mathbb{E} \bigg[\int_{0}^{T}\int_{\mathbb{R}^{n}}f(x,m_{v(\cdot)}(t),v(x,t))m_{v(\cdot)}(x,t)dxdt+\int_{\mathbb{R}^{n}}h(x,m_{v(\cdot)}(T))m_{v(\cdot)}(x,T)dx\bigg].\label{eq:3.3}$$ The problem becomes a stochastic control problem for a distribution-valued parameter system. Using the invariant embedding again, we consider the family of problems indexed by $m,t$ $$\label{eq:3.4}
\left\{
\begin{array}{l}
\partial_{s}m_{v(\cdot)}+(\mathcal{A}^{*}m_{v(\cdot)}-\dfrac{1}{2}\beta^{2}\Delta m_{v(\cdot)}+\text{div}(g(x,m_{v(\cdot)}(s),v(x,s))m_{v(\cdot)}))ds+\beta Dm_{v(\cdot)}db(s)=0,\\
m_{v(\cdot)}(x,t)=m(x),\\
\end{array}
\right.$$ and $$J_{m,t}(v(\cdot))= \mathbb{E} \bigg[\int_{t}^{T}\int_{\mathbb{R}^{n}}f(x,m_{v(\cdot)}(s),v(x,s))m_{v(\cdot)}(x,s)dxdt+\int_{\mathbb{R}^{n}}h(x,m_{v(\cdot)}(T))m_{v(\cdot)}(x,T)dx\bigg].\label{eq:3.5}$$

Set $$V(m,t)=\inf_{v(\cdot)}J_{m,t}(v(\cdot)),$$ then $V(m,t)$ satisfies the Dynamic Programming equation $$\label{eq:2.6-1}
\left\{
\begin{array}{l}
    \dfrac{\partial V}{\partial t}-\displaystyle\int_{\mathbb{R}^{n}}\dfrac{\partial V(m,t)}{\partial m}(\xi)(\mathcal{A}^{*}m(\xi)-\frac{1}{2}\beta^{2}\Delta m(\xi))d\xi  \\
    \qquad+\dfrac{1}{2}\beta^{2}\displaystyle\int_{\mathbb{R}^{n}}\displaystyle\int_{\mathbb{R}^{n}}\dfrac{\partial^{2}V(m,t)}{\partial m^{2}}(\xi,\eta)Dm(\xi)Dm(\eta)d\xi d\eta\\
    \qquad+\displaystyle\inf_{v}\bigg(\displaystyle\int_{\mathbb{R}^{n}}f(\xi,m,v(\xi))m(\xi)d\xi-\displaystyle\int_{\mathbb{R}^{n}}\dfrac{\partial V(m,t)}{\partial m}(\xi)\text{div }(g(\xi,m,v(\xi))m(\xi))d\xi\bigg)=0,\\
    V(m,T)=\displaystyle\int_{\mathbb{R}^{n}}h(x,m)m(x)dx.
\end{array}
\right.$$

MASTER EQUATION 
----------------

To obtain the master equation, we define again $U(x,m,t)=\frac{\partial V(m,t)}{\partial m}(x)$ and we have the terminal condition $$U(x,m,T)=h(x,m)+\int_{\mathbb{R}^{n}}\frac{\partial h(\xi,m)}{\partial m}(x)m(\xi)d\xi,\label{eq:2.6-2}$$ and from (\[eq:2.6-1\]) we obtain $$\label{eq:2.7-1}
\begin{array}{l}
    \dfrac{\partial V}{\partial t}-\displaystyle\int_{\mathbb{R}^{n}}(\mathcal{A}U-\dfrac{1}{2}\beta^{2}\Delta U)(\xi,m,t)m(\xi)d\xi\\
    \qquad+\dfrac{1}{2}\beta^{2}\displaystyle\int_{\mathbb{R}^{n}}\displaystyle\int_{\mathbb{R}^{n}}\dfrac{\partial U(\xi,m,t)}{\partial m}(\eta)Dm(\xi)Dm(\eta)d\xi d\eta+\displaystyle\int_{\mathbb{R}^{n}}H(\xi,m,DU)m(\xi)d\xi=0.\\
\end{array}$$

We then differentiate (\[eq:2.7-1\]) with respect to 