I am reading the book "String theory demystified" by David McMahon.
On page 149, the author discusses the "critical dimension" for superstrings.
the number of spacetime dimensions is easily extracted. One obtains a relation for the Lorentz generators $M^{-i}$: $$ \left[M^{-i}, M^{-j}\right]=-\frac{1}{\left(p^{+}\right)^{2}} \sum_{n=1}^{\infty}\left(\alpha_{-n}^{i} \alpha_{n}^{j}-\alpha_{-n}^{j} \alpha_{n}^{i}\right)\left(\Delta_{n}-n\right)\tag{7.70}$$ where $$\Delta_{n}=n\left(\frac{D-2}{8}\right)+\frac{1}{n}\left(2 a_{N S}-\frac{D-2}{8}\right).\tag{7.71}$$ In order to maintain Lorentz invariance, we must have $\left[M^{-i}, M^{-j}\right]=0$. This can only be true if the first term on the right-hand side of Eq. (7.71) is $n$ and the second term vanishes. This implies that$$\begin{aligned} &\frac{D-2}{8}=1 \\ &\Rightarrow D=10 \end{aligned}\tag{7.72}$$
My questions
How to obtain the first equation? which seems like a kind of Lie algebra relation.
How does the requirement of Lorentz invariance translates to the RHS being zero?