How are the Hamiltonian and Lagrangian different as far as preserving symmetries of a theory? Peskin and Schroeder write that the path integral formalism is nice because since it's based on the action and Lagrangian it explicitly preserves all the symmetries, but I'm wondering how/why the Hamiltonian doesn't. I know H isn't invariant under Lorentz transformations, but isn't it true that quantities commuting with H are conserved? So can't you find other symmetries of the system this way using the Hamiltonian? Or are they mainly referring to the Lorentz invariance of the Lagrangian (density) and action? Thanks!