The Weyl group is represented concretely by sequences of simple-reflection indices (words in $\{1,\dots,r\}$) and by the matrices they produce acting on the simple-root basis.
|
|
|
|
|
|
|
The coefficient of $q^k$ counts Weyl-group elements of length $k$. For this example the polynomial is $$1+3q+5q^2+6q^3+5q^4+3q^5+q^6.$$
The factorization output means $$P(q)=(q+1)^2(q^2+q+1)(q^2+1).$$ These are the irreducible factors over $\mathbb Z$. They also recover the usual $q$-integer formula $$P(q)=[4]_q!=[1]_q[2]_q[3]_q[4]_q,$$ since $[4]_q=(q+1)(q^2+1)$.
The same commands work in any finite type. $W(G_2)$ is the dihedral group of order $12$ with longest element of length $6$; $W(F_4)$ has order $1152$; $W(D_4)$ has order $192$:
|
|
|
|
|
|
|
For $G_2$, the factorization is $$(q+1)^2(q^2+q+1)(q^2-q+1)=[2]_q[6]_q.$$ Evaluating at $q=1$ gives $12$, the Weyl-group order.
The number of roots and the size of the Weyl group can be very different. In type $E_8$:
|
|
The output $(120,696729600,120)$ says that $E_8$ has $120$ positive roots, its Weyl group has $696729600$ elements, and its longest element has length $120$. The last number equals the number of positive roots because the longest element sends all of them to negative roots. The order, Poincaré polynomial, and longest element can be computed without listing the entire group; weylGroupElements actually lists elements, subject to MaxElements.
Bruhat order, descent sets and inversion data are available uniformly. For $B_3$:
|
|
|
|
|
|
The last hash table says that $u$ has length $5$ and inversion set $$\{\alpha_1,\ \alpha_1+\alpha_2,\ \alpha_1+\alpha_2+\alpha_3,\ \alpha_1+\alpha_2+2\alpha_3,\ \alpha_1+2\alpha_2+2\alpha_3\}.$$ Its five roots are the five simple-root-coordinate rows shown in the inversions field.
The source of this document is in /build/reproducible-path/macaulay2-1.26.11+ds/M2/Macaulay2/packages/KacMoody/Documentation.m2:1403:0.