Principal q-character of the G2 adjoint representation (source code)

= Principal q-character of the G2 adjoint representation
{c}
{title2=$\operatorname{ch}_q\mathfrak g=\operatorname{ch}_qL_{10}+\operatorname{ch}_qL_2$}

Use $\operatorname{ch}_q V=\operatorname{tr}_V q^{2\rho^\vee}$. The positive <roots of a root system> of the <G2 root system> have simple-root heights $1,1,2,3,4,5$. Each root space has <dimension> one, and the zero <weight space> has dimension two. Consequently
$$
\operatorname{ch}_q\mathfrak g=q^{10}+q^8+q^6+q^4+2q^2+2+2q^{-2}+q^{-4}+q^{-6}+q^{-8}+q^{-10}.
$$
By the <classification of finite-dimensional sl2 representations>, restriction to the <Principal sl2 subalgebra> is $L_{10}\oplus L_2$, of dimensions eleven and three. If the grading uses $\rho^\vee$ instead, divide every exponent by two.