# computing the Weyl character formula

Suppose $G$ is a connected compact group and $\pi$ is an irreducible representation of $G$. The Weyl character formula gives a formula for $\text{trace}(\pi(t))$ for $t\in G$. If $t$ is of order $n$ then $\text{trace}(\pi(t))$ is an integral linear combintation of $n^{th}$ roots of unity.

Question: Is there software which will compute $\text{trace}(\pi(t))$ for arbitrary $t$ of finite order?

This should include singular elements, in which case there is a modification of the Weyl character formula, which essentially uses L'Hopital's to evaluate the quotient (similar to the Weyl dimension formula).

The reason I ask is that we are implementing such a formula in the Atlas of Lie groups and Representations software www.liegroups.org, (using Mark Reeder's The Compleat Weyl Character Formula for singular elements). On the one hand we don't want to reinvent the wheel. On the other, if we do reinvent it, we'd like to compare it to other wheels.

• This is certainly a challenging computational problem, though a theoretically inclined person might be inclined to ask why one would want to do it? (Are there any concrete consequences?) Sep 6, 2017 at 0:12

The Lie software from the 1990's (still available here) can do this easily. One of its fundamental functions is to compute weight multiplicities for characters of irreducible modules, as specified by their highest weight. The function domchar combines these multiplicities at all dominant weights; by the $W$-symmetry of the character this is really all information one needs, but provided you've got the memory to store the result, the software can compute the full formal character as well (a usually huge polynomial with natural number coefficients and weights as exponents). Note that while this is the same formal character you would get from the Weyl character formula (doing the division as an exact division of polynomials), LiE uses a different method (Freudenthal's recursion) to compute it.

Now a torus element of finite order$~n$ can be represented as a rational co-weight, modulo the lattice of integral co-weights. Evaluating this co-weight on each of the exponents of the formal character, and reducing the results modulo$~1$, gives a formal linear combination of elements in $\Bbb Q/\Bbb Z$ that through the exponential mapping $\exp_1: t\mapsto\exp(2\pi\mathbf i t)$ correspond do roots of unity; their sum is the trace you asked for. The LiE function spectrum gives you the linear combination of elements in $\Bbb Q/\Bbb Z$, but scaled by the order$~n$ of the element to values in $\Bbb Z/n\Bbb Z$ so that the combination can be represented as a polynomial with integer exponents.

One can represent this trace as an element of the cyclotomic field for$~n$, for which one takes the remainder of the output from spectrum by the $n$-th cyclotomic polynomial. Doing that in the LiE user programming language is not a hard exercise; for completeness I'll give below the code that does this (badly, but improving the efficiency of cyclotomic polynomials was not necessary to get satisfactory results).

# first some univariate polynomial division stuff

monic_quotient (pol dividend, divisor) =
{ loc quot = 0X; loc d=degree(divisor)
; if divisor|[d] != 1 then error("Division by non monic polynomial") fi
; while degree(dividend)>=d
do loc dd=degree(dividend); loc c = dividend|[dd]
; loc term = c*X[dd-d]
; quot += term; dividend += -term*divisor
od
; quot
}

modulo (pol dividend, divisor) =
{ loc quot = 0X; loc d=degree(divisor)
; if divisor|[d] != 1 then error("Division by non monic polynomial") fi
; while degree(dividend)>=d
do loc dd=degree(dividend); loc c = dividend|[dd]
; loc term = c*X[dd-d]
; quot += term; dividend += -term*divisor
od
; dividend
}

# the set of divisors of a number, needed for cyclotomic polynomials
Cartesian (vec v, w) =
{ loc sv=size(v); loc result = null(sv*size(w))
; for i=1 to size(v) do for j=1 to size(w)
do result[i+sv*(j-1)] = v[i]*w[j]
od od
; result
}

divisors (int b,n) = # divisors of n, assuming it has only 1 less than b
{ if b*b>n then [1,n]
; else loc r=n%b
; if r!=0 then divisors(b+1,n)
else loc l=
; while n%b==0 do l = 1 + b*l; n=n/b od
; if n>b then Cartesian(l,divisors(b+1,n)) else l fi
fi
fi
}

divisors(int n) = if n>=2 then divisors(2,n) else all_one(n) fi

Phi(int n) = # cyclotomic polynomial, very inefficient version
{ loc divs=divisors(n); loc result=X[n]-X
; for i=1 to size(divs)-1
do result=monic_quotient(result,Phi(divs[i])) od
; result
}

trace (vec lambda, t; grp g) =
{ loc denom=t[size(t)]; modulo(spectrum(lambda,t,g),Phi(denom)) }


The Atlas of Lie groups and representations software can now calculate the Weyl character formula, evaluated at an element of finite order. The software is available on the Atlas web site.

I suppose you're already aware of the two papers by Robert V. Moody and Jiří Patera: "Characters of Elements of Finite Order in Lie Groups" (SIAM J. Algebraic Discrete Methods 5 (1984) 359–383) and "Computation of Character Decompositions of Class Functions on Compact Semisimple Lie Groups" (Math. Comp. 48 (1987) 799–827), but I think they're worth mentioning.

They apparently had a working implementation for the problem you mention (not using the Weyl character formula, though). I don't know if the code is still available, though (and even if it is, 30+ years later it is probably badly bitrotten). They give some runtimes in their paper, which, of course, may be difficult to translate into today's technology.