A function of brownian motion is a martingale I've tried to solve this exercise:

Let f $\in C^2(R^d)$ with $f, \nabla f, D^2 f$ with at most polynomial growth. Prove that $f(B_t)$ is a martingale $\iff \triangle f=0$.

Using Ito's formula i've managed to show that  $ \triangle f=0$ implies that $f(B_t)$ is a martingale.
For the inverse implication I've obtained that $t \mapsto \int_0^t \triangle f(B_s) ds$ is a continuous and BV martingale.
So this process is constant and equal to zero.
I don't know how to end this proof.
 A: Since $t \mapsto \int_0^t \Delta f(B_s) ds$ is the zero function a.s., with probability $1$ you have that $\Delta f(B_t) = 0$ for each $t >0$. Otherwise, if e.g. $\Delta f(B_t(\omega)) > 0$ then there is $\delta > 0$ such that $\Delta f(B_s(\omega)) > 0$ for $s \in (t- \delta, t)$ but then $$0 = \int_0^t \Delta f(B_s(\omega)) ds = \int_0^{t-\delta} \Delta f(B_s(\omega)) ds + \int_{t-\delta}^t \Delta f(B_s(\omega)) ds$$
but the first term on the right hand side is $0$ whilst the latter term is strictly positive.
Suppose (wlog) for a contradiction that $\Delta f(x) > 0$. Then there exists $\varepsilon > 0$ such that $\Delta f(y) > 0$ for all $y \in B(x, \varepsilon)$ by continuity. However, since for fixed $t$ $B_t$ is normally distributed we have that $\mathbb{P}(B_t \in B(x, \varepsilon)) > 0$.
Combining this with the fact that $\Delta f(B_t) = 0$ a.s. derived above we conclude that in particular there exists an $\omega$ such that $B_t(\omega) \in B(x, \varepsilon)$ and $\Delta f(B_t(\omega)) = 0$ which is a contradiction.
