Solution (source code)

= Solution

Let $w=s_1\cdots s_m$ be reduced and follow the corresponding geodesic from $e$ to $w$. Its $i$th edge belongs to the wall of
$$
r_i=s_1\cdots s_{i-1}s_i s_{i-1}\cdots s_1.
$$
A reduced path crosses each wall at most once, and these $m$ walls are exactly the walls separating its endpoints. Moreover
$$
r_iw=s_1\cdots\widehat{s_i}\cdots s_m,
$$
so $\ell(r_iw)<\ell(w)$. Conversely, if $\ell(rw)<\ell(w)$, write $r=usu^{-1}$ and apply the <exchange condition for a Coxeter group> to a reduced expression: it identifies $r$ with one of the reflections $r_i$. Therefore
$$
\boxed{H_r\text{ separates }e\text{ from }w
\iff \ell(rw)<\ell(w).}
$$