Folding condition (source code)

= Folding condition

For involutory generators, the folding condition requires that simple multiplication never preserve length and that simultaneous left and right ascents either combine to a two-step ascent or fold: if both $s_iw$ and $ws_j$ have length $\ell(w)+1$, then either $\ell(s_iws_j)=\ell(w)+2$ or $w=s_iws_j$.