Word length (source code)

= Word length
{title2=$|g|_S$}

The <word length> $|g|_S$ is the least number of letters from a symmetric <generating set of a group> $S$ whose product is $g$. The empty word has length zero. It obeys $|gh|_S\leq|g|_S+|h|_S$, $|g^{-1}|_S=|g|_S$ and $d_S(g,h)=|g^{-1}h|_S$. The generating set may be infinite; finiteness is needed only for additional conclusions such as finite metric balls.