On-site spin-square normal-ordering identity (source code)

= On-site spin-square normal-ordering identity
{title2=$:\mathbf S^2:=\mathbf S^2-3n/4=-3n_\uparrow n_\downarrow/2$}

For a single spinful <fermion> orbital, $\mathbf S^2=3(n-2n_\uparrow n_\downarrow)/4$. The contraction term is $3n/4$, so $:\mathbf S^2:=\mathbf S^2-3n/4=-3n_\uparrow n_\downarrow/2$. Empty and doubly occupied states are spinless while singly occupied states have spin one half, which also proves the identity directly.