In the lecture we were given the lagrangian for this case, which is:
$\mathcal{L}=-\frac{1}{4}F^{\mu\nu}(x)F_{\mu\nu}(x) + \frac{m^2}{2}A_\mu (x) A^\mu(x)$
We then considered a transformation of the form $A^\mu(x)\rightarrow A^\mu(x) -\partial^\mu f(x)$, where $f(x)$ is an arbitrary smooth function
We were told that the invariance occurs when we consider Lorentz gauge and also that $\Box f(x)=0$.
Assuming that $F^{\mu\nu}(x)F_{\mu\nu}(x)$ is invariant under this transformation, something which I believe can be shown by inserting the transformation, for the mass term one would have:
$$\frac{m^2}{2}(A_\mu(x) -\partial_\mu f(x))(A^\mu(x) -\partial^\mu f(x))=$$ $$\frac{m^2}{2}(A_\mu A^\mu - A_\mu \partial^\mu f -\partial_\mu f A^\mu + \partial_\mu f \partial^\mu f)=$$
$$\frac{m^2}{2}(A_\mu A^\mu - A_\mu \partial^\mu f -(\partial_\mu f) A^\mu - f(\partial_\mu A^\mu) + (\partial_\mu f)\partial^\mu f + f\Box f )$$
The first term $A_\mu A^\mu$ is the mass term of the original lagrangian.
The third term $f(\partial_\mu A^\mu)$ contains the lorentz gauge, so it vanishes.
The last term $f\Box f =0$ because we are given the condition that $\Box f=0$.
But there are 2 problem here, from what I can tell:
The terms $2A_\mu\partial^\mu f$ is not zero and it should be if we want the lagrangian to be invariant.
The claim was made that $f\Box f =0$ but we were told that, $f(x)$ is an arbitrary smooth function And we know that: A smooth function is a function that has continuous derivatives of all orders. This property ensures that the function behaves nicely and can be differentiated repeatedly without encountering any abrupt changes or discontinuities
So, am I misunderstanding something or there's a mistake somewhere?