$\uu$. There must be $j \in \N$ such that $\varphi_b\bigl(\uu'_{[0,i)}\bigr) = r_{s_0}r_{s_1}\cdots r_{s_j}$ and hence, by injectivity of $\varphi_b$, $\uu'_{[0,i)} = r'_{s_0}r'_{s_1}\cdots r'_{s_j}$ and $i = |r'_{s_0}r'_{s_1}\cdots r'_{s_j}|$.

We have proved that the numbers $0$ and $|r'_{s_0}r'_{s_1}\cdots r'_{s_j}|, j = 0,1,\ldots$, are all occurrences of $w'$ in $\uu'$. It follows that $r'_0$ and $r'_1$ are the two return words to $w'$ in $\uu'$ and $$d_{\uu'}(w') = s_0s_1s_2 \cdots =  d_{\uu}(w).$$

Since $w = \varphi_b(w')0$ is a right special factor, we must have that both $\varphi_b(w')00$ and $\varphi_b(w')01$ are factors of $\uu$. It follows that both $w'0$ and $w'1$ are factors of $\uu'$ and $w'$ is right special.

\[prop:der\_of\_preimage\_fi\_b\] Let $\uu$ and $\uu'$ be Sturmian words such that $\uu = \varphi_{b}(\uu')$ and let $w'$ be a nonempty right special prefix of $\uu'$. Then $d_{\uu'}(w') = d_{\uu}(w)$, where $w =  \varphi_{b}(w')0$.

Let $r_0'$ and $r_1'$ be the two return words to $w'$ in $\uu'$ and $d_{\uu'}(w') = s_0s_1s_2\cdots$. Put $w=\varphi_b(w')0$, $r_0=\varphi_b(r'_0)$ and $r_1=\varphi_b(r'_1)$. We obtain $$\uu = \varphi_b(\uu') = \varphi_b(r'_{s_0}r'_{s_1}r'_{s_2}\cdots ) = r_{s_0}r_{s_1}r_{s_2}\cdots$$ Clearly, $w$ is prefix of $r_{s_k}r_{s_{k+1}}r_{s_{k+2}}\cdots$ for all $k \in \N$ and $|r_{s_0}r_{s_1}\cdots r_{s_j}|$ is an occurrence of $w$ in $\uu$ for all $j \in \N$.

Assume now $i 