Proof. Let $w$ be dihedrally simple word of length $n$. Since $S \cup T$ contains all words of length at most three, we can assume that $n \ge 4$. By definition, we can find $k \ge 2$, $a,b \in \text{Dih}_k$ such that $\varphi_{a, b, k}(w) \neq \varphi_{a, b, k}(v)$ for every word $v \neq w$ of length $n$. We can split our reasoning into three cases. (1) The group elements $a$ and $b$ commute. If $w$ contains a subword of the form $01$ or $10$, then we can interchange these two subwords, producing a word $v \neq w$ such that $\varphi_{a, b, k}(v) = \varphi_{a, b, k}(w)$, a contradiction. Therefore $w$ is of the form $0^n$ or $1^n$, and hence lies in $S \cup T$. (2) The group elements $a$ and $b$ are non-commuting elements of order $2$. We have then $\varphi_{a, b, k}(00) = \varphi_{a, b, k}(11) = 1$. Thus $w$ cannot contain any of the subword $00$ or $11$, since interchanging them would yield a contradiction. Therefore $w$ is of the form $(01)^{n/2}$ or $(10)^{n/2}$. Thus $w$ lies in $S \cup T$. (3) The group elements $a$ and $b$ are non-commuting elements of order $2$ and $k > 2$ respectively. We have then $\varphi_{a, b, k}(00) = 1$. If $w$ contains at least one $1$, i.e., $w = w'1w''$, then it cannot contain a subword of the form $00$, since otherwise moving this subword from $w'$ to $w''$, or vice versa, would yield a word $v \neq w$ with the same image. As we also have $\varphi_{a, b, k}(101) = \varphi_{a, b, k}(000)$, the word $w$ cannot contain a subword of the form $101$. As a result, $w$ is of the form $0^n$, or $1^{n - 1}0$, or $01^{n - 2}0$. Therefore $w$ lies in $S \cup T$. The very last case consists in interchanging the orders of $a$ and $b$, but this is too similar to case (3).
- The group elements $a$ and $b$ commute. If $w$ contains a subword of the form $01$ or $10$, then we can interchange these two subwords, producing a word $v \neq w$ such that $\varphi_{a, b, k}(v) = \varphi_{a, b, k}(w)$, a contradiction. Therefore $w$ is of the form $0^n$ or $1^n$, and hence lies in $S \cup T$.
- The group elements $a$ and $b$ are non-commuting elements of order $2$. We have then $\varphi_{a, b, k}(00) = \varphi_{a, b, k}(11) = 1$. Thus $w$ cannot contain any of the subword $00$ or $11$, since interchanging them would yield a contradiction. Therefore $w$ is of the form $(01)^{n/2}$ or $(10)^{n/2}.$ Thus $w$ lies in $S \cup T$.
- The group elements $a$ and $b$ are non-commuting elements of order $2$ and $k > 2$ respectively. We have then $\varphi_{a, b, k}(00) = 1$. If $w$ contains at least one $1$, i.e., $w = w'1w''$, then it cannot contain a subword of the form $00$, since otherwise moving this subword from $w'$ to $w''$, or vice versa, would yield a word $v \neq w$ with the same image. As we also have $\varphi_{a, b, k}(101) = \varphi_{a, b, k}(000)$, the word $w$ cannot contain a subword of the form $101$. As a result, $w$ is of the form $0^n$, or $1^{n - 1}0$, or $01^{n - 2}0$. Therefore $w$ lies in $S \cup T$.
The very last case consists in interchanging the orders of $a$ and $b$, but this is too similar to case (3).