Solution (source code)

= Solution

The <spin commutation relations> give $[S_{\rm tot}^z,S_n^\pm]=\pm S_n^\pm$. Using the product rule for a <commutator>,
$$
[S_{\rm tot}^z,S_n^+S_{n+1}^-]
=S_n^+S_{n+1}^--S_n^+S_{n+1}^-=0,
$$
and the conjugate term also vanishes. The longitudinal field commutes with every $S_n^z$, so \b[$[H,S_{\rm tot}^z]=0$]. The <Hamiltonian> is invariant under the global <spin rotation> $U(\theta)=e^{-i\theta S_{\rm tot}^z}$: its <continuous symmetry> group is $U(1)$. Simultaneous <energy> and total-magnetization <eigenstates> can be chosen, and evolution preserves each fixed-magnetization sector. Local <magnetization> can still flow between sites; generally $[H,S_n^z]\ne0$. In the <fermion> <representation> the conserved number will be $N_f=N/2-S_{\rm tot}^z$.