Solution (source code)

= Solution

Part (a) gives a reduced $T$-word for $w$. It is also reduced as an $S$-word, since a shorter $S$-word would contradict the length function obtained from the restricted geometric representation. By <Matsumoto theorem>, this expression and the given reduced expression $s_1\cdots s_k$ differ by braid moves. Every braid move starting with letters in $T$ replaces them by the same two letters in the opposite alternating order, so it never introduces a generator outside $T$. Therefore every $s_i$ lies in $T$.