Solution (source code)

= Solution

Write $G=g_{s_1}\circ\cdots\circ g_{s_{n-1}}$. Because $g_{s_n}([0,1])\subseteq[0,1]$, taking the image under the same <function composition> gives
$$
\boxed{I_{s_1\cdots s_n}=G(g_{s_n}([0,1]))\subseteq G([0,1])=I_{s_1\cdots s_{n-1}}.}
$$
This uses preservation of set inclusion by every <function>, so decreasing <inverse branches> cause no difficulty. Since $f\circ g_L=f\circ g_R=\operatorname{id}_{[0,1]}$, cancellation of the first <inverse branch> gives the equality of images
$$
\boxed{f(I_{s_1\cdots s_n})=I_{s_2\cdots s_n}.}
$$
These compact <intervals> are <itinerary cylinders>: their symbols record successive positions under <iteration of a map>. In particular,
$$
\boxed{x\in I_{LLR}\ \Longrightarrow\ x\in L,\quad f(x)\in L,\quad f^2(x)\in R.}
$$
Conversely these three memberships allow successive substitution of the appropriate <inverse branches>, and therefore characterize $I_{LLR}$ exactly.