The principal character of an affine Lie algebra is an extremely powerful tool for understanding the structure of its integrable highest weight modules. If we are lucky, then products with known expansions will occur in these characters, making construction of these modules simplier than if we didn't know the expansions. Examples of products that occur are the Rogers-Ramanjan products, the generalized Rogers-Ramanujan products, and the Euler product.

Calculating the principal character by hand is time-consuming and repetitive: a perfect job for the computer! Below is code to calculate the prinicipal character for affine Lie algebras. For each, the command for finding the (s)=(s_0,s_1,s_2,...,s_n)-specialization for X sub N upper r is: charform(X,N,r,[s_0,s_1,s_2,...,s_n]). The result is a vector of the form [a_1,a_2, ..., a_{m-1}, a_0] which should be interpreted in the following way:

So, to find

we put in charform(C,3,1,[0,1,0,0]);. The result will come out as [0,-1,0,0,0,0,0,-1,0,0] which is to be interpreted as