Counting irreducible sl2 summands using weights zero and one (source code)

= Counting irreducible sl2 summands using weights zero and one
{title2=$\#\text{summands}=\dim V_0+\dim V_1$}

For a finite-dimensional complex <sl2 Lie algebra> <module> $V$, the number of simple summands, counted with multiplicity, is $\dim V_0+\dim V_1$. Indeed, the <simple module> of <highest weight> $m\ge0$ has weights $m,m-2,\ldots,-m$, each once. Exactly one of zero and one appears: zero when $m$ is even, one when $m$ is odd. The <classification of finite-dimensional sl2 representations> decomposes $V$ into these <modules>, and dimensions of <weight spaces> add over the <direct sum>.