I'm stuck with the photon propagator, at chapter 5 of Mandl and Shaw QFT book. They say that since the Maxwell Lagrangian density for the free Electromagnetic field has a conjugate momenta to the field $$\frac{\partial L}{\partial(\partial_0 A^0)}=0$$ Then one cannot choose a canonical quantization.
Now in chapter 5 they say that choosing the Fermi Lagrangian density $$ L_{fermi}=-\frac{1}{2} \partial_\nu A_\mu \partial^\nu A^\mu - J_\mu A^\mu \tag{5.10}$$ with sign convention $(+,-,-,-)$ for the electromagnetic field the momenta is well defined $$\frac{\partial L}{\partial(\partial_0 A^\mu)}={-\dot{A}^\mu}\tag{5.11}$$ and one can quantize in a canonical way, because now it makes sense to introduce commutation relations: $$[A(x^\mu),\dot{A}^\mu (y^\mu)]=i\hbar\delta^3(x^\mu-y^\mu).\tag{5.23}$$
Now We also know that the Fermi lagrangian density is not gauge invariant, since there is the interaction term ( $A^\mu$) $$A^\mu \rightarrow A^\mu+\partial^\mu f \tag{5.7}$$ that transforms under gauge tranformation for $A^\mu$. Is it right to say that the NON Gauge invariance of the Fermi lagrangian is not a problem because the action changes but gives the same equations of motion? (this must be because of a total divergence in the action in which the Non gauge interaction term is included); I have heard this argument from my professor but i think i missed the sense. Can someone help me with this?
Sorry, i think i messed up with terms in the equations, i can try once more to ask my question: My professor sayd that the Fermi lagrangian density $$\mathcal{L_{fermi}}-\frac{1}{2}(\partial_\mu A^\nu ) (\partial_\nu A^\mu)-J_\mu A^\mu$$ is not gauge invariant, so if i perform the gauge transformation $A^\mu \rightarrow A^\mu + \partial^\mu f $ the Lagrangian density changes, in particular the term with the current $J_\mu$.
Now my question is if it is right to add a null term to the lagrangian $f\partial^\mu J_\mu$ so that i can write the transformed lagrangian :
$$\mathcal{L_{fermi}}=-\frac{1}{2}(\partial_mu A^\nu ) (\partial_nu A^\mu)-J_\mu A^\mu-J_\mu \partial^\mu f - f \partial_\mu J_\mu = $$
$$=-\frac{1}{2}(\partial_\mu A^\nu ) (\partial_\nu A^\mu)-J_\mu A^\mu - \partial^\mu(f J_\mu)$$
So now the derivative does not change equations of motion derived from the action variation.
Thanks to all of you for your time.