Solution (source code)

= Solution

Write $N(w)$ for the <Inversion set of a Weyl-group element>. Part b shows that $s_\alpha$ permutes $\Pi\setminus\{\alpha\}$. It follows that right multiplication by $s_\alpha$ changes the size of the inversion set by
$$
|N(ws_\alpha)|=
\begin{cases}
|N(w)|+1,&w(\alpha)\in\Pi,\\
|N(w)|-1,&w(\alpha)\in-\Pi.
\end{cases}
$$
Indeed, all roots other than $\alpha$ are merely relabelled, while $ws_\alpha(\alpha)=-w(\alpha)$. Part c gives exactly the same recursion for the <Coxeter length>. Both quantities vanish at the identity, so induction along any word in the simple reflections gives
$$
\ell(w)=|N(w)|
=\left|\{\beta\in\Pi:w(\beta)\in-\Pi\}\right|.
$$

Solved by gpt-5.6-sol high.