Take the tour ×  While going from a given Lagrangian to
Hamiltonian for a fermionic field, we use the following formula.
$$ H = \Sigma_{i} \pi_i \dot{\phi_i} - L$$ where $\pi_i =
\dfrac{\partial L}{\partial \dot{\phi_i}} $ In a Lagrangian
involving fermionic fields given by, $$ L =
\dfrac{1}{2}(\bar{\psi_i} \dot{\psi_j} - \dot{\bar{\psi_i}}
\psi_j)$$ a direct computation gives $\pi_{\psi_j} =
-\dfrac{1}{2}\bar{\psi_i}$ and $\pi_{\bar{\psi_i}} =
-\dfrac{1}{2}\psi_j$. But on adding a total derivative
$\dfrac{1}{2} \dfrac{d}{dt} (\bar{\psi_i} \psi_j)$ to the
Lagrangian (which can always be done as the action won't change)
but $\pi$'s become different. So the Hamiltonian as well
changes. How do we resolve the issue ?  share|improve this
question add comment  2 Answers  up vote 4 down vote accepted
The canonical momenta don't change if you add a total derivative
to the Lagrangian.  The particular total derivative you wanted
to add to the Lagrangian as well as the Lagrangian itself has
free $i,j$ indices. You sure