[proofplan]
We prove invariance by checking the weak stationary equation on the prescribed test class. For a compactly supported smooth function $f$, the integral of $Lf$ against $\pi$ splits into the drift term and the Laplacian term. The identity $\varrho \nabla \log \varrho = \nabla \varrho$ rewrites the drift contribution, while the assumed integration-by-parts formula rewrites the Laplacian contribution with the opposite sign. These two contributions cancel, and the assumed invariant-measure criterion then turns the infinitesimal identity into $\pi P_t = \pi$ for every $t \geq 0$.
[/proofplan]
[step:Fix a compactly supported smooth test function and expand the generator integral]
Let $f \in C_c^\infty(\mathbb{R}^d)$ be arbitrary. Since $\varrho>0$ and $\varrho \in C^1(\mathbb{R}^d)$, the function $\log \varrho: \mathbb{R}^d \to \mathbb{R}$ is $C^1$, and
\begin{align*}
\nabla \log \varrho(x) = \frac{\nabla \varrho(x)}{\varrho(x)}
\end{align*}
for every $x \in \mathbb{R}^d$.
Because $f$ has compact support, the functions $\nabla f$ and $\Delta f$ have compact support. Hence all integrals below are finite. Using the definition of $\pi$ and the formula for $L$ on $C_c^\infty(\mathbb{R}^d)$, we obtain
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = \frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \log \varrho(x)\cdot \nabla f(x)\,\varrho(x)\, d\mathcal{L}^d(x) + \frac{1}{2Z}\int_{\mathbb{R}^d} \Delta f(x)\varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
[/step]
[step:Rewrite the drift term and cancel it against the Laplacian term]
For every $x \in \mathbb{R}^d$, the chain-rule identity for $\log \varrho$ gives
\begin{align*}
\varrho(x)\nabla \log \varrho(x) = \nabla \varrho(x).
\end{align*}
Therefore the drift contribution is
\begin{align*}
\frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \log \varrho(x)\cdot \nabla f(x)\,\varrho(x)\, d\mathcal{L}^d(x) = \frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \varrho(x)\cdot \nabla f(x)\, d\mathcal{L}^d(x).
\end{align*}
By the assumed integration-by-parts identity applied to this same $f$,
\begin{align*}
\frac{1}{2Z}\int_{\mathbb{R}^d} \Delta f(x)\varrho(x)\, d\mathcal{L}^d(x) = -\frac{1}{2Z}\int_{\mathbb{R}^d} \nabla f(x)\cdot \nabla \varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
Since the Euclidean dot product is symmetric, the two terms cancel. Thus
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = 0.
\end{align*}
[guided]
We want to show that $\pi$ satisfies the infinitesimal stationarity condition. Fix an arbitrary [test function](/page/Test%20Function) $f \in C_c^\infty(\mathbb{R}^d)$. The definition of $\pi$ says that integration with respect to $\pi$ is integration against the density $Z^{-1}\varrho$ with respect to $\mathcal{L}^d$. Hence
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = Z^{-1}\int_{\mathbb{R}^d} Lf(x)\varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
Substituting the generator formula on $C_c^\infty(\mathbb{R}^d)$ gives
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = \frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \log \varrho(x)\cdot \nabla f(x)\,\varrho(x)\, d\mathcal{L}^d(x) + \frac{1}{2Z}\int_{\mathbb{R}^d} \Delta f(x)\varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
The first term is the drift contribution. The point of the Langevin drift is that it is exactly the logarithmic derivative of the desired density. Since $\varrho(x)>0$ and $\varrho$ is $C^1$, the chain rule gives
\begin{align*}
\nabla \log \varrho(x) = \frac{\nabla \varrho(x)}{\varrho(x)}.
\end{align*}
Multiplying by $\varrho(x)$ yields
\begin{align*}
\varrho(x)\nabla \log \varrho(x) = \nabla \varrho(x).
\end{align*}
Therefore
\begin{align*}
\frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \log \varrho(x)\cdot \nabla f(x)\,\varrho(x)\, d\mathcal{L}^d(x) = \frac{1}{2Z}\int_{\mathbb{R}^d} \nabla \varrho(x)\cdot \nabla f(x)\, d\mathcal{L}^d(x).
\end{align*}
Now we use the assumed integration-by-parts identity. Its hypotheses apply because the chosen function $f$ belongs to $C_c^\infty(\mathbb{R}^d)$. It gives
\begin{align*}
\int_{\mathbb{R}^d} \Delta f(x)\varrho(x)\, d\mathcal{L}^d(x) = -\int_{\mathbb{R}^d} \nabla f(x)\cdot \nabla \varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
Multiplying by $1/(2Z)$, the Laplacian contribution becomes
\begin{align*}
\frac{1}{2Z}\int_{\mathbb{R}^d} \Delta f(x)\varrho(x)\, d\mathcal{L}^d(x) = -\frac{1}{2Z}\int_{\mathbb{R}^d} \nabla f(x)\cdot \nabla \varrho(x)\, d\mathcal{L}^d(x).
\end{align*}
The two displayed contributions are equal in magnitude and opposite in sign, because $\nabla \varrho(x)\cdot \nabla f(x)=\nabla f(x)\cdot \nabla \varrho(x)$ for the Euclidean dot product. Hence their sum is zero:
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = 0.
\end{align*}
[/guided]
[/step]
[step:Invoke the assumed invariant-measure criterion]
The preceding step proves that
\begin{align*}
\int_{\mathbb{R}^d} Lf(x)\, d\pi(x) = 0
\end{align*}
for every $f \in C_c^\infty(\mathbb{R}^d)$. The measure $\pi$ is a probability measure by the definition of $Z \in (0,\infty)$. Therefore the assumed invariant-measure criterion applies with $\nu := \pi$, and yields
\begin{align*}
\pi P_t = \pi
\end{align*}
for every $t \geq 0$. Thus $\pi$ is invariant for the transition semigroup $(P_t)_{t \geq 0}$.
[/step]