P = weylLengthGenerating AThe coefficient of $q^k$ counts Weyl-group elements of Coxeter length $k$. This is the Poincaré polynomial of $W$. If $d_1,\ldots,d_r$ are the degrees of the basic Weyl-group invariants, then $$P(q)=\prod_{i=1}^r [d_i]_q,$$ where $[k]_q = 1 + q + \cdots + q^{k-1}$. Its value at $q=1$ is weylGroupOrder. The result is an ordinary polynomial, so commands such as factor, coefficient, degree, and sub apply directly.
|
|
|
|
For $A_3$, the first polynomial is $$1+3q+5q^2+6q^3+5q^4+3q^5+q^6,$$ and its factorization is $$(q+1)^2(q^2+q+1)(q^2+1)=[2]_q[3]_q[4]_q.$$ The factor command gives the irreducible integer-coefficient factors; splitting each $q$-integer into cyclotomic factors gives the same answer.
The maximum length is always $|\Phi^+|$ (length of the longest element), and the polynomial is palindromic: $\#\{w : \ell(w) = k\}=\#\{w : \ell(w) = |\Phi^+|-k\}$ for every $k$. Its degree and value at $1$ recover the number of positive roots and the Weyl-group order:
|
|
|
|
|
For $A_{n-1}$ the coefficients count permutations in $S_n$ by their number of inversions. For $A_3$ (i.e. $S_4$) they are $1,3,5,6,5,3,1$:
|
|
|
|
There are $6$ elements of length $3$. The final list gives all coefficients in ascending powers of $q$.
The object weylLengthGenerating is a method function.
The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/KacMoody/Documentation.m2:8255:0.