1 Introduction

Non-integer base expansions of real numbers

$$\begin{aligned} x = \sum _{k=1}^{\infty }\frac{i_k}{q^k},\quad (i_k)\in \{0,1,\ldots ,m\}^\infty , \end{aligned}$$

where \(q>1\) is a given non-integer real number and m is a given positive integer, have been intensively studied ever since their introduction by Rényi [40]. While most integer base expansions are unique, in non-integer bases a number has typically infinitely many expansions [8, 18,19,20, 42]. However, the sets of numbers \(\mathcal {U}_q(m)\) with unique expansions, also called univoque sets, have many interesting properties [3, 6, 7, 16, 17, 29, 45]. In particular, \(\mathcal {U}_q(m)\) is the survivor set of a dynamical system with a hole, and this kind of open dynamical systems have received a lot of attention in recent years [1, 9, 14, 24, 25], involving connections to several mathematical fields such as fractal geometry, ergodic theory, symbolic dynamics and number theory.

Let us recall a remarkable theorem of Glendinning and Sidorov [23] concerning the two-digit case \(m=1\), where \(\varphi \approx 1.618\) denotes the golden ratio, and \(q_{KL}\approx 1.787\) denotes the Komornik–Loreti constant, i.e., the smallest base \(q>1\) in which \(x=1\) has a unique expansion:

  • if \(1<q\le \varphi \), then \(\mathcal {U}_q(1)\) has two elements;

  • if \(\varphi<q<q_{KL}\), then \(\mathcal {U}_q(1)\) is countably infinite;

  • if \(q=q_{KL}\), then \(\mathcal {U}_q(1)\) is uncountable but of zero Hausdorff dimension;

  • if \(q>q_{KL}\), then \(\mathcal {U}_q(1)\) has positive Hausdorff dimension.

This theorem was generalized for \(m>1\) [8, 15,16,17], and the Hausdorff dimension of \(\mathcal {U}_q(m)\) as well as the topological entropy of the underlying set of digit sequenes \(U_q(m)\) have been the subject of a large number of research articles [2, 4,5,6,7, 26, 27, 32]. In particular, we know that the topological entropy of \(U_q(m)\) is constant (as a function of q) on infinitely many disjoint intervals [2, 27], the first of these entropy plateaus being \((1, q_{KL}]\).

The main tools in these investigations are the lexicographic characterizations of unique and related expansions that generalize a classical theorem of Parry [38]. They have been extended by Pedicini [39] to more general alphabets \(\{d_0,d_1,\ldots , d_m\}\) with real digits. Based on this theorem, the threshold separating bases with trivial and non-trivial univoque sets, called generalized golden ratio, was determined in [28] (and later in [10]) for all ternary alphabets \(\{d_0, d_1, d_2\}\). The determination of the next threshold, which separates bases with countable and uncountable univoque sets and is called generalized Komornik–Loreti constant, seems to be a difficult problem for ternary alphabets, but a closely related question was solved partially in [31] and then completely in [44].

Recently, some of the preceding results were generalized to multiple-base expansions of the form

$$\begin{aligned} x = \sum _{k=1}^{\infty }\frac{i_k}{q_{i_1}q_{i_2}\ldots q_{i_k}}, \quad (i_k)\in \{0,1,\ldots ,m\}^\infty , \end{aligned}$$

where m is a positive integer and \(q_0,q_1,\ldots , q_m>1\) are given bases [34, 36, 37], and furthermore to expansions of the form

$$\begin{aligned} x = \sum _{k=1}^{\infty }\frac{d_{i_k}}{q_{i_1}q_{i_2}\ldots q_{i_k}}, \quad (i_k)\in \{0,1,\ldots ,m\}^\infty , \end{aligned}$$

where \(\mathcal {S} = \{(d_0,q_0), (d_1,q_1),\ldots ,(d_m,q_m)\}\) is a given finite alphabet–base system of pairs of real numbers with \(q_0,q_1,\ldots ,q_m>1\) [30]; this contains all preceding expansions as special cases.

The purpose of this paper is to extend results on the cardinality of univoque sets to alphabet–base systems. We restrict to the binary case \(\mathcal {S} = \{(d_0,q_0), (d_1, q_1)\}\), as we have seen above that the ternary case is already difficult when all bases are equal. We first show that this 4-dimensional problem can be reduced to 2 dimensions because the system \(\{(d_0,q_0), (d_1, q_1)\}\) is isomorphic to \(\{(0,q_0), (1, q_1)\}\) (except in the degenerate case \(\frac{d_0}{q_0-1} = \frac{d_1}{q_1-1}\), where \(x = \frac{d_0}{q_0-1}\) for all expansions). Now, we for each fixed \(q_0 > 1\), two critical values \(\mathcal {G}(q_0), \mathcal {K}(q_0) > 1\), called generalized golden ratio and generalized Komornik–Loreti constant, which separate pairs of bases \((q_0,q_1)\) according to whether the univoque set is trivial, uncountable or in-between. We give various properties of the functions \(\mathcal {G}\) and \(\mathcal {K}\) and formulas for \(\mathcal {G}(q_0)\) and \(\mathcal {K}(q_0)\) for all \(q_0 > 1\) in Theorems 2.12.3 below.

To prove our main results, we study the critical values of the survivor set in dynamical systems with a hole. More precisely, we characterize in Theorem 2.5 below when a binary subshift never hitting a lexicographic interval is trivial, countable, uncountable with zero entropy and uncountable with positive entropy respectively. This improves and simplifies results of Labarca and Moreira [33], which were used as tools for understanding the properties of Lorenz maps. Our characterizations are also simpler than those of Glendinning and Sidorov [24, 43], who investigated the critical values of the symmetric and asymmetric holes for the doubling map. Note that positive entropy of binary subshifts with a hole plays also a crucial role in the characterization of critical itineraries of maps with constant slope and one discontinuity, also called intermediate \(\beta \)-shifts [11]. Based on our results, the first entropy plateau is also given by the generalized Komornik–Loreti constant. The investigation of further fractal and dynamical properties of the univoque set is left as an open problem.

2 Statement of the main results

Fix a finite alphabet–base system \(\mathcal {S}:=\{(d_0,q_0),(d_1,q_1),\ldots , (d_m, q_m)\}\), and set

$$\begin{aligned} \pi _{\mathcal {S}}((i_k)):= \sum _{k=1}^{\infty } \frac{d_{i_k}}{q_{i_1}q_{i_2}\ldots q_{k_k}}, \quad (i_k)\in \{0,1,\ldots ,m\}^\infty . \end{aligned}$$

If \(\pi _{\mathcal {S}}((i_k))=x\), then \((i_k)\) is called an \(\mathcal {S}\)-expansion of the real number x. The system \(\mathcal {S}\) is called regular if

$$\begin{aligned}&\pi _{\mathcal {S}}(\overline{0})< \pi _{\mathcal {S}}(1\overline{0})< \cdots< \pi _{\mathcal {S}}(m\overline{0}), \\ {}&\pi _{\mathcal {S}}(0\overline{m})< \pi _{\mathcal {S}}(1\overline{m})< \cdots< \pi _{\mathcal {S}}(\overline{m}), \\&\pi _{\mathcal {S}}((i{+}1)\overline{0}) \le \pi _{\mathcal {S}}(i\,\overline{m}) \text { for all}\ 0 \le i < m. \end{aligned}$$

Here and in the following, \(\overline{c}\) denotes the infinite repetition of a digit (or a finite sequence of digits) c. Regular systems \(\mathcal {S}\) were studied in [30], where it was shown that x has an \(\mathcal {S}\)-expansion if and only if \(x\in [\pi _{\mathcal {S}}(\overline{0}), \pi _{\mathcal {S}}(\overline{m})]\). Let

$$\begin{aligned} U_{\mathcal {S}}:= \big \{\textbf{u}\in \{0,1,\ldots , m\}^\infty :\, \pi _{\mathcal {S}}(\textbf{u}) \ne \pi _{\mathcal {S}}(\textbf{v}) \ \text {for all} \ \textbf{v}\ne \textbf{u}\big \} \end{aligned}$$

be the set of unique \(\mathcal {S}\)-expansions. The points \(\pi _{\mathcal {S}}(\overline{0})\) and \(\pi _{\mathcal {S}}(\overline{m})\) trivially have unique \(\mathcal {S}\)-expansions, and we call \(U_{\mathcal {S}}\) trivial if \(U_{\mathcal {S}} = \{\overline{0}, \overline{m}\}\). The set \(U_{\mathcal {S}}\) is shift-invariant, and we denote its (topological) entropy by

$$\begin{aligned} h(U_{\mathcal {S}}):= \lim _{n\rightarrow \infty }\frac{1}{n} \log A_n(U_{\mathcal {S}}), \end{aligned}$$

where \(A_n(U_{\mathcal {S}})\) is the number of different blocks of n letters appearing in the sequences of \(U_{\mathcal {S}}\).Footnote 1

In this paper, we study regular systems \(\mathcal {S} = \{(d_0,q_0),(d_1,q_1)\}\) with \(d_0,d_1 \in \mathbb {R}\), \(q_0,q_1 > 1\); the case of larger systems is more complex. We show in Lemma 3.1 that the structure of the \(\mathcal {S}\)-expansions is isomorphic to those in the alphabet-base system \(\{(0,q_0),(1,q_1)\}\). Hence in the following we can restrict ourselves without loss of generality to the case where \(d_0 = 0\) and \(d_1 = 1\). For simplicity, we write \(\pi _{q_0,q_1}\) and \(U_{q_0,q_1}\) instead of \(\pi _{\{(0,q_0),(1,q_1)\}}\) and \(U_{\{(0,q_0),(1,q_1)\}}\), i.e.,

$$\begin{aligned} \begin{aligned}&\pi _{q_0,q_1}(i_1i_2\ldots ) = \sum _{k=1}^\infty \frac{i_k}{q_{i_1}q_{i_2}\ldots q_{i_k}}, \\ {}&U_{q_0, q_1} = \big \{\textbf{u}\in \{0,1\}^\infty :\, \pi _{q_0,q_1}(\textbf{u}) \ne \pi _{q_0,q_1}(\textbf{v}) \ \text {for all} \ \textbf{v}\ne \textbf{u}\big \}. \end{aligned} \end{aligned}$$

The goal of this paper is to characterize

$$\begin{aligned} \begin{aligned} \mathcal {G}(q_0)&:= \inf \{q_1>1 :\, U_{q_0, q_1} \ne \{\overline{0},\overline{1}\}\}, \\ \mathcal {K}(q_0)&:= \inf \{q_1>1 :\, U_{q_0, q_1} \text { is uncountable}\}. \end{aligned} \end{aligned}$$

We first state results that do not require further notation, before going into details.

Theorem 2.1

  1. (i)

    The functions \(\mathcal {G}\) and \(\mathcal {K}\) are continuous, strictly decreasing on \((1,\infty )\), and hence almost everywhere differentiable.

  2. (ii)

    For all \(q_0>1\), we have

    $$\begin{aligned} \begin{aligned} \mathcal {G}(\mathcal {G}(q_0))&= q_0,{} & {} \max \bigg \{\frac{1}{q_0+1}, \frac{1}{\mathcal {G}(q_0)+1}\bigg \} \le (q_0-1) \big (\mathcal {G}(q_0)-1\big ) \le \frac{1}{2}, \\ \mathcal {K}(\mathcal {K}(q_0))&= q_0,{} & {} \frac{1}{2} \le (q_0-1) \big (\mathcal {K}(q_0)-1\big ) < \min \bigg \{\frac{q_0}{q_0+1}, \frac{\mathcal {K}(q_0)}{\mathcal {K}(q_0)+1}\bigg \}. \\ \end{aligned} \end{aligned}$$
  3. (iii)

    For \(q_0 > 1\), we have

    $$\begin{aligned} \begin{aligned} (q_0-1) \big (\mathcal {G}(q_0)-1\big ) = \frac{1}{2} \ \Longleftrightarrow \ \mathcal {G}(q_0) = \mathcal {K}(q_0) \ \Longleftrightarrow \ (q_0-1) \big (\mathcal {K}(q_0)-1\big ) = \frac{1}{2}, \\ \hspace{.25em} (q_0-1)(\mathcal {G}(q_0)-1) = \left\{ \hspace{-.5em}\begin{array}{cl} \frac{1}{q_0+1} &{} \hspace{-.5em}\text {if and only if} \,q_0^{k} = q_0{+}1 \,\text {for some integer}\, k \ge 2,\\ \frac{1}{\mathcal {G}(q_0)+1} &{} \hspace{-.5em} \,\text {if and only if} \,q_0 = \frac{q_1^2}{q_1^2-1} \text {with} \,q_1>1 \,\text {such that} \\ {} &{} \quad q_1^k=q_1{+}1 \,\text {for some integer}\, k \ge 2. \end{array}\right. \end{aligned} \end{aligned}$$
  4. (iv)

    The Hausdorff dimension of \(\{q_0 > 1:\, \mathcal {G}(q_0) = \mathcal {K}(q_0)\}\) is zero.

  5. (v)

    For all \(q_0 > 1\), \(q_1>\mathcal {G}(q_0)\), the set \(U_{q_0,q_1}\) is infinite.

  6. (vi)

    For all \(q_0 > 1\), \(q_1>\mathcal {K}(q_0)\), the shift-invariant set \(U_{q_0,q_1}\) has positive entropy, and \(\pi _{q_0, q_1}(U_{q_0, q_1})\) has positive Hausdorff dimension.

Our main result is a precise description of \(\mathcal {G}\) and \(\mathcal {K}\) in terms of equations \(q_1\, \pi _{q_0,q_1}(\textbf{u}) = 1\) and \(q_0\, \tilde{\pi }_{q_0,q_1}(\textbf{v}) = 1\) for certain expansions \(\textbf{u}, \textbf{v}\in \{0,1\}^\infty \), where

$$\begin{aligned} \tilde{\pi }_{q_0,q_1}(i_1i_2\ldots ):= \sum _{k=1}^\infty \frac{1-i_k}{q_{i_1}q_{i_2}\ldots q_{i_k}} = \pi _{q_1,q_0}((1{-}i_1)(1{-}i_2)\ldots ). \end{aligned}$$

If the equation \(q_1\, \pi _{q_0,q_1}(\textbf{u}) = 1\) has a unique solution \(q_1 > 1\), then we denote this solution by \(g_{\textbf{u}}(q_0)\). If the equation \(q_0\, \tilde{\pi }_{q_0,q_1}(\textbf{v}) = 1\) has a unique solution \(q_1 > 1\), then we denote this solution by \(\tilde{g}_{\textbf{v}}(q_0)\). If the equation \(g_{\textbf{u}}(q_0) = \tilde{g}_{\textbf{v}}(q_0)\) has a unique solution \(q_0 > 1\), then we denote this solution by \(\mu _{\textbf{u},\textbf{v}}\). In Lemmas 4.1, 4.2 and 4.4, we will show that \(g_{\textbf{u}}(q_0)\), \(\tilde{g}_{\textbf{v}}(q_0)\) and \(\mu _{\textbf{u},\textbf{v}}\) are well defined for all \(\textbf{u}, \textbf{v}, q_0\) that are relevant for us.

The involved words \(\textbf{u}, \textbf{v}\) are defined by the substitutions (or morphisms)

$$\begin{aligned} \begin{aligned} L:\ {}&0 \mapsto 0,&\quad M:\ {}&0 \mapsto 01,&\quad R:\ {}&0 \mapsto 01, \\&1 \mapsto 10,{} & {} 1 \mapsto 10,{} & {} 1 \mapsto 1, \end{aligned} \end{aligned}$$

which act on finite and infinite words by \(\sigma (i_1i_2\ldots ) = \sigma (i_1) \sigma (i_2) \ldots \). We use the notation \(S^*\) for the monoid generated by a set of substitutions S (with the composition as product). For a sequence of substitutions \(\varvec{\sigma }= (\sigma _n)_{n\ge 1} \in \{L,M,R\}^\infty \) and any \(\textbf{u}\in \{0,1\}^\infty \), the limit word

$$\begin{aligned} \varvec{\sigma }(\textbf{u}):= \lim _{n\rightarrow \infty } \sigma _1\sigma _2 \ldots \sigma _n(\textbf{u}) \end{aligned}$$

exists because \(\sigma (i)\) starts with i for all \(\sigma \in \{L,M,R\}\), \(i \in \{0,1\}\). A sequence of substitutions \((\sigma _n)_{n\ge 1}\) is primitive if for each \(n \ge 1\) there exists \(k \ge n\) such that the image by \(\sigma _n \sigma _{n+1} \ldots \sigma _k\) of each letter contains all letters; for \(\varvec{\sigma }\in \{L,M,R\}^\infty \), this means that \(\varvec{\sigma }\) does not end with \(\overline{L}\) or \(\overline{R}\). Note that the limit words of \(\overline{M}\) are the Thue–Morse word and its reflection by \(0 \leftrightarrow 1\); limit words of primitive sequences in \(\{L,R\}^\infty \) are Sturmian words, and limit words of primitive sequences in \(\{L,M,R\}^\infty \) are called Thue–Morse–Sturmian words according to [44].Footnote 2

Theorem 2.2

The map \(\mathcal {G}\) is given on \((1,\infty )\) by

$$\begin{aligned} \mathcal {G}(q_0) = {\left\{ \begin{array}{ll}g_{\sigma (\overline{0})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (\overline{0}),\sigma (\overline{1})}],\, \sigma \in \{L,R\}^*M, \\ \tilde{g}_{\sigma (\overline{1})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\sigma (\overline{0}),\sigma (\overline{1})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}],\, \sigma \in \{L, R\}^*M, \\ g_{\varvec{\sigma }(\overline{0})}(q_0) &{} \text {if}\ q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})},\, \varvec{\sigma }\in \{L,R\}^\infty \ \text {primitive}. \end{array}\right. }\nonumber \\ \end{aligned}$$
(2.1)

The map \(\mathcal {K}\) is given on \((1, \infty )\) by

$$\begin{aligned} \mathcal {K}(q_0) = {\left\{ \begin{array}{ll}\tilde{g}_{\sigma (1\overline{0})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}],\, \sigma \in \{L,M,R\}^*M, \\ g_{\sigma (0\overline{1})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\sigma (0\overline{1}),\sigma (10\overline{1})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}],\, \sigma \in \{L,M,R\}^*M, \\ g_{\varvec{\sigma }(\overline{0})}(q_0) &{} \text {if}\ q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})},\, \varvec{\sigma }\in \{L,M,R\}^\infty \ \text {primitive}. \end{array}\right. }\nonumber \\ \end{aligned}$$
(2.2)

Note that \(\mathcal {G}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}) = g_{\varvec{\sigma }(\overline{0})}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})})\) holds for non-primitive \(\varvec{\sigma }\in \{L,R\}^\infty \setminus \{\overline{L}, \overline{R}\}\) too because \(L \overline{R}(\overline{0}) = M(\overline{0}) = R \overline{L}(\overline{0})\) and \(L \overline{R}(\overline{1}) = M(\overline{1}) = R \overline{L}(\overline{1})\). However, we need \(\varvec{\sigma }\in \{L,M,R\}^\infty \) to be primitive for \(\mathcal {K}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}) = g_{\varvec{\sigma }(\overline{0})}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})})\).

Theorem 2.3

  1. (i)

    We have \(\mathcal {G}(q_0) \,{=}\, \mathcal {K}(q_0)\) if and only if \(q_0 \,{=}\, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for a primitive \(\varvec{\sigma }\,{\in }\, \{L,R\}^\infty \) or \(q_0 \in \{\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}\}\) for some \(\sigma \in \{L, R\}^*M\); this is also equivalent to \((q_0{-}1)(\mathcal {G}(q_0){-}1) = \frac{1}{2}\) as well as to \((q_0{-}1)(\mathcal {K}(q_0){-}1) = \frac{1}{2}\). In particular, we have \(\mathcal {G}(q_0) < \mathcal {K}(q_0)\) for all \(q_0 > 1\) except a set of zero Hausdorff dimension.

  2. (ii)

    \(U_{q_0,\mathcal {G}(q_0)} \ne \{\overline{0}, \overline{1}\}\) if and only if \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for a primitive \(\varvec{\sigma }\in \{L,R\}^\infty \); the set of \(q_0 > 1\) with this property has zero Hausdorff dimension.

  3. (iii)

    \(U_{q_0,\mathcal {K}(q_0)}\) is trivial if and only if \(q_0 \in \bigcup _{\sigma \in \{L, R\}^*M} \{\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}\}\), uncountable with zero entropy if and only if \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for some primitive \(\varvec{\sigma }\in \{L,M,R\}^\infty \), countably infinite otherwise.

We conjecture that the set of \(q_0 > 1\) where \(U_{q_0,\mathcal {K}(q_0)}\) is not countably infinite has zero Hausdorff dimension (and thus zero Lebesgue measure); see the Open Problem (i) in Sect. 6.

Fig. 1
figure 1

The functions \(\mathcal {G}(q_0)\) (blue), \(\mathcal {K}(q_0)\) (red), and the curves \((q_0{-}1)(q_1{-}1) = \frac{1}{q_0+1}, \frac{1}{q_1+1}, \frac{1}{2}, \frac{q_1}{q_1+1}, \frac{q_0}{q_0+1}, 1\) (Color figure online)

Fig. 2
figure 2

The maps \((q_0{-}1)(\mathcal {G}(q_0){-}1)\) (blue), \((q_0{-}1)(\mathcal {K}(q_0){-}1)\) (red)

The functions \(\mathcal {G}\) and \(\mathcal {K}\) are drawn in Fig. 1, the functions \((q_0{-}1)(\mathcal {G}(q_0){-}1)\) and \((q_0{-}1)(\mathcal {K}(q_0){-}1)\) are drawn in Figure  2, and the calculation of \(\mathcal {G}(q_0)\) and \(\mathcal {K}(q_0)\) is worked out in the following example for the case \(\sigma = L^k M\), \(k \ge 0\). In particular, we have \(\mathcal {G}(\frac{1+\sqrt{5}}{2}) = \frac{1+\sqrt{5}}{2}\), and \(q_0 = \frac{1+\sqrt{5}}{2}\) is the unique value with \(\mathcal {G}(q_0) = q_0\) since \(\mathcal {G}\) is strictly decreasing by Theorem 2.1. Since \(\overline{M}(\overline{0})\) and \(\overline{M}(\overline{1})\) are the Thue-Morse words, we have \(g_{\overline{M}(\overline{0})}(q_{KL}) = q_{KL} = \tilde{g}_{\overline{M}(\overline{1})}(q_{KL})\) for the Komornik–Loreti constant \(q_{KL}\), hence \(\mu _{\overline{M}(\overline{0}), \overline{M}(\overline{1})} = q_{KL} = \mathcal {K}(q_{KL})\), with no other \(q_0\) satisfying \(\mathcal {K}(q_0) = q_0\). Consequently, Theorem 2.2 can be seen as a generalization of the theorem of Glendinning and Sidorov [23].

Example 2.4

Let \(\sigma = L^k M\), \(k \ge 0\). Then

$$\begin{aligned} \sigma (0) = 010^k, \qquad \sigma (1) = 100^k. \end{aligned}$$

In order to determine \(g_{\textbf{u}}(q_0)\) for \(\textbf{u}\in \{\sigma (\overline{0}), \sigma (0\overline{1}), \sigma (01\overline{0})\}\), we use that

$$\begin{aligned} \begin{aligned}&q_0\, \big (q_1\, \pi _{q_0,q_1}(01i_1\ldots i_r\,\overline{i_{r+1}\ldots i_{r+p}}) - 1\big ) = 1 - q_0 + \pi _{q_0,q_1}(i_1\ldots i_r\,\overline{i_{r+1}\ldots i_{r+p}}) \\&= 1 - q_0 + \sum _{n=1}^r \frac{i_n\,q_{i_{n+1}}\ldots q_{i_r}}{q_{i_1}\ldots q_{i_r}} + \sum _{n=1}^p \frac{i_{r+n}\,q_{i_{r+n+1}}\ldots q_{i_{r+p}}}{q_{i_1}\ldots q_{i_r}\, (q_{i_{r+1}}\ldots q_{i_p}-1)}. \end{aligned} \end{aligned}$$

Since \(\sigma (\overline{0}) = 01\overline{0^k01}\), \(\sigma (0\overline{1}) = 01\overline{0^k10}\), \(\sigma (01\overline{0}) = 010^k10\overline{0^k01}\), we obtain that

$$\begin{aligned} \begin{aligned} g_{\sigma (\overline{0})}(q_0) = q_1 \ {}&\Longleftrightarrow \ (1-q_0) (q_0^{k+1} q_1-1) + 1 = 0, \\ g_{\sigma (0\overline{1})}(q_0) = q_1 \ {}&\Longleftrightarrow \ (1-q_0) (q_0^{k+1} q_1-1) + q_0 = 0, \\ g_{\sigma (01\overline{0})}(q_0) = q_1 \ {}&\Longleftrightarrow \ \big ((1-q_0) q_0^{k+1} q_1 + q_0\big ) (q_0^{k+1} q_1-1) + 1 = 0, \\ \end{aligned} \end{aligned}$$

i.e.,

$$\begin{aligned} g_{\sigma (\overline{0})}(q_0) = \frac{1}{q_0^k(q_0{-}1)},\ g_{\sigma (0\overline{1})}(q_0) = \frac{2q_0-1}{q_0^{k+1}(q_0{-}1)}, \ g_{\sigma (01\overline{0})}(q_0) = \frac{2q_0{-}1{+}\sqrt{4q_0{-}3}}{2\,q_0^{k+1}(q_0-1)}. \end{aligned}$$

For \(\tilde{g}_{\textbf{v}}(q_0)\), \(\textbf{v}\in \{\sigma (\overline{1}), \sigma (1\overline{0}), \sigma (10\overline{1})\}\), we use similarly that

$$\begin{aligned} \begin{aligned}&q_1\, \big (q_0\, \tilde{\pi }_{q_0,q_1}(10i_1\ldots i_r\,\overline{i_{r+1}\ldots i_{r+p}}) - 1\big ) = 1 - q_1 + \tilde{\pi }_{q_0,q_1}(i_1\ldots i_r\,\overline{i_{r+1}\ldots i_{r+p}}) \\&= 1 - q_1 + \sum _{n=1}^r \frac{(1-i_n)\,q_{i_{n+1}}\ldots q_{i_r}}{q_{i_1}\ldots q_{i_r}} + \sum _{n=1}^p \frac{(1-i_{r+n})\,q_{i_{r+n+1}}\ldots q_{i_{r+p}}}{q_{i_1}\ldots q_{i_r}\, (q_{i_{r+1}}\ldots q_{i_p}-1)}. \end{aligned} \end{aligned}$$

We have \(\sigma (\overline{1}) = 10\overline{0^k10}\), \(\sigma (1\overline{0}) = 10\overline{0^k01}\), \(\sigma (10\overline{1}) = 100^k01\overline{0^k10}\), thus

$$\begin{aligned} \begin{aligned} \tilde{g}_{\sigma (\overline{1})}(q_0) = q_1&\Longleftrightarrow \ (1-q_1) (q_0^{k+1} q_1-1) + q_0 q_1 \frac{q_0^k-1}{q_0-1}+ 1 = 0, \\ \tilde{g}_{\sigma (1\overline{0})}(q_0) = q_1&\Longleftrightarrow \ (1-q_1) (q_0^{k+1} q_1-1) + q_1 \frac{q_0^{k+1}-1}{q_0-1} = 0, \\ \tilde{g}_{\sigma (10\overline{1})}(q_0) = q_1&\Longleftrightarrow \Big ((1{-}q_1) q_0^{k+1} q_1 + q_1 \frac{q_0^{k+1}{-}1}{q_0{-}1}\Big ) (q_0^{k+1} q_1{-}1)\\&+ q_0 q_1 \frac{q_0^k{-}1}{q_0{-}1} + 1= 0. \end{aligned} \end{aligned}$$

This gives that

$$\begin{aligned} \begin{aligned} \tilde{g}_{\sigma (\overline{1})}(q_0)&= \frac{q_0^{k+2}-1}{q_0^{k+1}(q_0-1)}, \\ \tilde{g}_{\sigma (1\overline{0})}(q_0)&= \frac{1}{2q_0^{k+1}}\, \Bigg (\frac{q_0^{k+2}-1}{q_0-1}+1+\sqrt{\bigg (\frac{q_0^{k+3}-1}{q_0-1}-q_0+3\bigg )\frac{q_0^{k+1}-1}{q_0-1}}\Bigg ), \end{aligned} \end{aligned}$$

and a formula for \(\tilde{g}_{\sigma (10\overline{1})}(q_0)\) with cubic roots that we do not need for the calculation of \(\mu _{\sigma (0\overline{1}),\sigma (10\overline{1})}\). Evaluating equations of the form \(g_{\textbf{u}}(q_0) = \tilde{g}_{\textbf{v}}(q_0)\), we obtain that

$$\begin{aligned} \mu _{\sigma (\overline{0}),\sigma (\overline{1})}^{k+2} = \mu _{\sigma (\overline{0}),\sigma (\overline{1})} + 1, \qquad 2\,\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}^{k+1} = \mu _{\sigma (\overline{0}),\sigma (1\overline{0})}^k + 2, \qquad \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}^{k+1} = 2, \\ \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}^{2k+3} = \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}^{2k+2} + 2\, \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}^{k+2} - 3\, \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}^{k+1} - \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})} + 3, \\ 3\, \mu _{\sigma (0\overline{1}),\sigma (10\overline{1})}^{k+3} = 2\, \mu _{\sigma (0\overline{1}),\sigma (10\overline{1})}^{k+2} + 6\, \mu _{\sigma (0\overline{1}),\sigma (10\overline{1})}^2 - 5\, \mu _{\sigma (0\overline{1}),\sigma (10\overline{1})} + 1. \end{aligned}$$

In particular, for \(k=0\), Theorem 2.2 gives that

$$\begin{aligned} \mathcal {G}(q_0)&= {\left\{ \begin{array}{ll}\frac{1}{q_0-1} &{} \text {if}\ q_0 \in [\frac{3}{2},\frac{1+\sqrt{5}}{2}], \\ \frac{q_0+1}{q_0} &{} \text {if}\ q_0 \in [\frac{1+\sqrt{5}}{2},2],\end{array}\right. } \\ \mathcal {K}(q_0)&= {\left\{ \begin{array}{ll}\frac{q_0+2+\sqrt{q_0^2+4}}{2q_0} &{} \text {if}\ q_0 \in [\frac{3}{2},1.6823278], \\ \frac{2q_0-1}{q_0(q_0-1)} &{} \text {if}\ q_0 \in [1.8711568,2].\end{array}\right. } \end{aligned}$$

An essential ingredient of the proofs of Theorems 2.12.3 is the characterization of pairs \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \) for which the lexicographically defined subshift

$$\begin{aligned} \Omega _{\textbf{a},\textbf{b}}:= \big \{i_1i_2 \ldots \in \{0,1\}^\infty :\, i_n i_{n+1}\ldots \le \textbf{a}\ \text {or}\ i_n i_{n+1}\ldots \ge \textbf{b}\ \text {for all} \ n \ge 1\big \}, \end{aligned}$$

i.e., the union of shift-orbits avoiding the open interval \((\textbf{a},\textbf{b})\), is trivial, countable or uncountable (with zero or positive entropy).

Theorem 2.5

Let \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \). Then we have the following (Fig. 3).

  1. (i)

    \(\Omega _{\textbf{a},\textbf{b}} \ne \{\overline{0}, \overline{1}\}\) if and only if \(\textbf{a}\ge \sigma (\overline{0})\), \(\textbf{b}\le \sigma (\overline{1})\) for some \(\sigma \in \{L,R\}^*M\), or \(\textbf{a}= \varvec{\sigma }(\overline{0})\), \(\textbf{b}= \varvec{\sigma }(\overline{1})\) for some primitive \(\varvec{\sigma }\in \{L,R\}^\infty \), or \(\textbf{a}= 0\overline{1}\), or \(\textbf{b}= 1\overline{0}\).

  2. (ii)

    \(\Omega _{\textbf{a},\textbf{b}} = \{\overline{0}, \overline{1}\}\) if and only if \(\textbf{a}< \sigma (\overline{0})\), \(\textbf{b}\ge \sigma (1\overline{0})\), or \(\textbf{a}\le \sigma (0\overline{1})\), \(\textbf{b}> \sigma (\overline{1})\) for some \(\sigma \in \{L,R\}^*M\).

  3. (iii)

    \(\Omega _{\textbf{a},\textbf{b}}\) is uncountable with positive entropy if and only if \(\textbf{a}\ge \sigma (\overline{0})\), \(\textbf{b}< \sigma (1\overline{0})\), or \(\textbf{a}> \sigma (0\overline{1})\), \(\textbf{b}\le \sigma (\overline{1})\) for some \(\sigma \in \{L,M,R\}^* M\).

  4. (iv)

    \(\Omega _{\textbf{a},\textbf{b}}\) is uncountable with zero entropy if and only if \(\textbf{a}= \varvec{\sigma }(\overline{0})\), \(\textbf{b}= \varvec{\sigma }(\overline{1})\) for some primitive \(\varvec{\sigma }\in \{L,M,R\}^\infty \).

  5. (v)

    \(\Omega _{\textbf{a},\textbf{b}}\) is countable if and only if \(\textbf{a}\,{\le }\, \sigma (01\overline{0})\), \(\textbf{b}\,{\ge }\, \sigma (1\overline{0})\), or \(\textbf{a}\,{\le }\, \sigma (0\overline{1})\), \(\textbf{b}\,{\ge }\, \sigma (10\overline{1})\) for some \(\sigma \in \{L,M,R\}^*\).

Fig. 3
figure 3

The cardinality of \(\Omega _{\textbf{a},\textbf{b}}\) according to Theorem 2.5, for \(\sigma = \tilde{\sigma } M\) with \(\tilde{\sigma } \in \{L,R\}^*\) (left) and \(\tilde{\sigma } \in \{L,M,R\}^*\) (right). In the regions with question marks, we have to consider substitutions starting with \(\tilde{\sigma } L\) (in the lower left corners), with \(\tilde{\sigma } R\) (in the upper right corners) and with \(\tilde{\sigma } M\) (in the middle of the right picture)

This also improves and simplifies results of Labarca and Moreira [33] for subshifts of the form

$$\begin{aligned} \Sigma _{\textbf{a},\textbf{b}}:= \big \{i_1i_2 \ldots \in \{0,1\}^\infty :\, \textbf{a}\le i_n i_{n+1}\ldots \le \textbf{b}\ \text {for all}\ n \ge 1\big \}, \end{aligned}$$

i.e., the union of shift-orbits staying in the closed interval \([\textbf{a},\textbf{b}]\).

Theorem 2.6

We have \(\Omega _{0\textbf{b},1\textbf{a}} = 0^* \Sigma _{\textbf{a},\textbf{b}} \cup 1^* \Sigma _{\textbf{a},\textbf{b}} \cup \{\overline{0}, \overline{1}\}\) and, hence, \(\Sigma _{\textbf{a},\textbf{b}} = \emptyset \) if and only if \(\Omega _{0\textbf{b},1\textbf{a}} = \{\overline{0}, \overline{1}\}\), \(\Sigma _{\textbf{a},\textbf{b}}\) is countable if and only if \(\Omega _{0\textbf{b},1\textbf{a}}\) is countable, \(h(\Sigma _{\textbf{a},\textbf{b}}) = h(\Omega _{0\textbf{b},1\textbf{a}})\).

Here, \(c^* = \{c^k: k \ge 0\}\) is the set of words containing only the letter \(c \in \{0,1\}\). Note that Theorem 2.5 gives a semi-algorithm for deciding triviality, countability and zero entropy of \(\Omega _{\textbf{a},\textbf{b}}\), which terminates for all \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \) except for \(\textbf{a}= \varvec{\sigma }(\overline{0})\), \(\textbf{b}= \varvec{\sigma }(\overline{1})\) with primitive \(\varvec{\sigma }\in \{L,R\}^\infty \) resp. \(\varvec{\sigma }\in \{L,M,R\}^\infty \). Glendinning and Sidorov [24] have similar results to Theorem 2.5; their set of substitutions, which are defined by the lexicographically smallest and largest cyclically balanced words with rational frequencies, is equal to \(\{L,R\}^*M\).

The rest of the paper is organised as follows. In Sects. 3 and 4, we study some relevant properties of the set \(U_{q_0, q_1}\), the functions g and \(\tilde{g}\), and prove Theorems 2.5 and 2.6. In Sect. 5, we prove Theorems 2.1, 2.2 and 2.3. We end the paper by raising some open problems.

3 Lexicographic world

In this section, we first show that an alphabet-base system \(\{(d_0,q_0),(d_1,q_1)\}\) with \(d_1(q_0-1) \ne d_0(q_1-1)\) is isomorphic to \(\{(0,q_0),(1,q_1)\}\). Therefore, we call the expansions in the system \(\{(0,q_0),(1,q_1)\}\) simply \((q_0,q_1)\)-expansions. For this result, we do not require \(q_0, q_1\) to be real numbers, but only that \(|q_0|, |q_1| > 1\). Set

$$\begin{aligned} T_{d,q}:\, \mathbb {C} \rightarrow \mathbb {C}, \qquad x \mapsto q x - d \qquad (d,q \in \mathbb {C}). \end{aligned}$$

Lemma 3.1

Let \(d_0,d_1,q_0,q_1 \in \mathbb {C}\) with \(|q_0|,|q_1| > 1\), \(i_1 i_2 \ldots \in \{0,1\}^\infty \). Then

$$\begin{aligned} \sum _{k=1}^\infty \frac{d_{i_k}}{q_{i_1}q_{i_2}\ldots q_{i_k}} = \frac{d_0}{q_0-1} + \bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, \pi _{q_0,q_1}(i_1i_2\ldots ). \end{aligned}$$
(3.1)

In particular, we have

$$\begin{aligned} (q_1-1)\, \pi _{q_0,q_1}(i_1i_2\ldots ) + (q_0-1)\, \pi _{q_1,q_0}\big ((1{-}i_1)(1{-}i_2)\ldots ) = 1, \end{aligned}$$
(3.2)

hence \(i_1i_2\ldots U_{q_0,q_1}\) if and only if \((1{-}i_1)(1{-}i_2)\ldots \in U_{q_1,q_0}\).

Proof

Let

$$\begin{aligned} \varphi :\, \mathbb {C} \rightarrow \mathbb {C}, \quad x \mapsto \frac{d_0}{q_0-1} + \bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, x. \end{aligned}$$

Then

$$\begin{aligned} \begin{aligned} T_{d_0,q_0} \circ \varphi (x)&= q_0\, \bigg (\frac{d_0}{q_0-1} + \bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, x\bigg ) - d_0 \\&= \frac{d_0}{q_0-1} + \bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, q_0x = \varphi \circ T_{0,q_0}(x), \\ T_{d_1,q_1} \circ \varphi (x)&= q_1\, \bigg (\bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, x + \frac{d_0}{q_0-1}\bigg ) - d_1 \\&= \bigg (d_1-d_0\frac{q_1-1}{q_0-1}\bigg )\, (q_1 x - 1) + \frac{d_0}{q_0-1} = \varphi \circ T_{1,q_1}(x). \end{aligned} \end{aligned}$$

For \(n \ge 0\), let \(x_n:= \pi _{q_0,q_1}(i_{n+1}i_{n+2} \ldots )\). Then

$$\begin{aligned} \begin{aligned} \varphi (x_0)&= T_{d_{i_1},q_{i_1}}^{-1} \circ \cdots \circ T_{d_{i_n},q_{i_n}}^{-1} \circ \varphi \circ T_{i_n,q_{i_n}} \\&= T_{d_{i_1},q_{i_1}}^{-1} \circ \cdots \circ T_{d_{i_n},q_{i_n}}^{-1} \circ \varphi (x_n) \\&= \sum _{k=1}^n \frac{d_{i_k}}{q_{i_1}q_{i_2}\ldots q_{i_k}} + \frac{\varphi (x_n)}{q_{i_1}q_{i_2}\ldots q_{i_n}} \end{aligned} \end{aligned}$$

for all \(n \ge 1\). Since \(|q_0|,|q_1|>1\) and \(\varphi (x_n)\) is bounded, this implies that \(\varphi (x_0) = \sum _{k=1}^\infty d_{i_k}/(q_{i_1}q_{i_2}\ldots q_{i_k})\), which proves (3.1).

Using (3.1) with \(d_0 = 1\), \(d_1 = 0\), we obtain that

$$\begin{aligned} \pi _{q_1,q_0}\big ((1{-}i_1)(1{-}i_2)\ldots \big ) = \sum _{k=1}^\infty \frac{1-i_k}{q_{i_1}\ldots q_{i_k}} = \frac{1}{q_0-1} - \frac{q_1-1}{q_0-1}\, \pi _{q_0,q_1}(i_1i_2\ldots ), \end{aligned}$$

i.e., (3.2) holds. \(\square \)

Now, we return to real bases \(q_0,q_1>1\). The action of \(T_{0,q_0}\) and \(T_{1,q_1}\) on the interval \([0,\frac{1}{q_1-1}]\) is depicted in Fig. 4. Each number in this interval has a \((q_0,q_1)\)-expansion, i.e., \(\{(0,q_0),(1,q_1)\}\) is regular, if and only if \(\frac{1}{q_1} \le \frac{1}{q_0(q_1-1)}\), which is equivalent to \(q_0 + q_1 \ge q_0 q_1\).

Fig. 4
figure 4

The maps \(T_{0,q_0}\) and \(T_{1,q_1}\); here, \(q_0=2\) and \(q_1=3/2\)

We have \(i_1 i_2 \ldots \in U_{q_0,q_1}\) if and only if

$$\begin{aligned} \pi _{q_0,q_1}(i_{n+1}i_{n+2}\ldots ) \not \in [\tfrac{1}{q_1}, \tfrac{1}{q_0(q_1-1)}] \quad \text {for all}\ n \ge 0. \end{aligned}$$
(3.3)

In particular, we have \(U_{q_0,q_1} = \{0,1\}^\infty \) if \(q_0 + q_1 < q_0 q_1\). Therefore, we assume that \(q_0 + q_1 \ge q_0 q_1\) in the following.

Denote the quasi-greedy \((q_0,q_1)\)-expansion of \(\frac{1}{q_1}\) by \(\textbf{a}_{q_0,q_1}\) and the quasi-lazy \((q_0,q_1)\)-expansion of \(\frac{1}{q_0(q_1-1)}\) by \(\textbf{b}_{q_0,q_1}\). (An expansion of a number is quasi-greedy if it is the lexicographically largest expansion not ending with \(\overline{0}\); it is quasi-lazy if it is the lexicographically smallest expansion not ending with \(\overline{1}\).) Since \(\frac{1}{q_1} = \pi _{q_0,q_1}(1\overline{0})\) and \(\frac{1}{q_0(q_1-1)} = \pi _{q_0,q_1}(0\overline{1})\), \(\textbf{a}_{q_0,q_1}\) starts with 01 and \(\textbf{b}_{q_0,q_1}\) starts with 10. We recall the following properties of quasi-greedy and quasi-lazy expansions from [30].

Lemma 3.2

For \(0 \le x < y \le \frac{1}{q_1-1}\), the quasi-greedy \((q_0,q_1)\)-expansion of x is lexicographically smaller than that of y and the quasi-lazy \((q_0,q_1)\)-expansion of x is lexicographically smaller than that of y.

From (3.3) and Lemma 3.2 (see also [30, Corollary 1.3]), we get that

$$\begin{aligned} U_{q_0,q_1} = \big \{i_1i_2 \ldots \in \{0,1\}^\infty :\, i_n i_{n+1}\ldots < \textbf{a}_{q_0,q_1}\ \text {or}\ i_n i_{n+1}\ldots > \textbf{b}_{q_0,q_1} \ \forall n \ge 1\big \}. \end{aligned}$$

The following lemmas show that we can consider the closed set

$$\begin{aligned} V_{q_0,q_1}:= \big \{i_1i_2 \ldots \in \{0,1\}^\infty :\, i_n i_{n+1}\ldots \le \textbf{a}_{q_0,q_1}\ \text {or}\ i_n i_{n+1}\ldots \ge \textbf{b}_{q_0,q_1} \ \forall n \ge 1\big \} \end{aligned}$$

instead of \(U_{q_0,q_1}\).

Lemma 3.3

For \(q'_0 \ge q_0\), \(q'_1 \ge q_1\), with \(q'_0+q'_1 \ge q'_0 q'_1 > q_0 q_1\), we have

$$\begin{aligned} \textbf{a}_{q_0,q_1}< \textbf{a}_{q'_0,q'_1} \quad \text {and} \quad \textbf{b}_{q'_0,q'_1} < \textbf{b}_{q_0,q_1}, \end{aligned}$$

thus \(U_{q_0,q_1} \subseteq V_{q_0,q_1} \subseteq U_{q'_0,q'_1} \subseteq V_{q'_0,q'_1}\).

Proof

Since \(q'_1\, \pi _{q'_0,q'_1}(\textbf{a}_{q_0,q_1}) < q_1\, \pi _{q_0,q_1}(\textbf{a}_{q_0,q_1}) = 1 = q'_1\, \pi _{q'_0,q'_1}(\textbf{a}_{q'_0,q'_1})\), the quasi-greedy \((q'_0,q'_1)\)-expansion of \(\pi _{q'_0,q'_1}(\textbf{a}_{q_0,q_1})\) is smaller than \(\textbf{a}_{q'_0,q'_1}\) by Lemma 3.2, hence \(\textbf{a}_{q_0,q_1} < \textbf{a}_{q'_0,q'_1}\). Symetrically, we have \(q'_0\, \tilde{\pi }_{q'_0,q'_1}(\textbf{b}_{q_0, q_1}) < q_0\, \tilde{\pi }_{q_0,q_1}(\textbf{b}_{q_0,q_1}) = 1 = q'_0\, \tilde{\pi }_{q'_0,q'_1}(\textbf{b}_{q'_0, q'_1})\), hence by (3.2) the quasi-lazy expansion of \(\pi _{q'_0,q'_1}(\textbf{b}_{q_0,q_1})\) is larger than \(\textbf{b}_{q'_0,q'_1}\), thus \(\textbf{b}_{q_0,q_1} > \textbf{b}_{q'_0,q'_1}\). \(\square \)

Lemma 3.4

  1. (i)

    \(U_{q_0, q_1}\) is infinite if and only if \(U_{q_0, q_1} \ne \{\overline{0},\overline{1}\}\).

  2. (ii)

    \(U_{q_0, q_1}\) is uncountable if and only if \(V_{q_0, q_1}\) is uncountable.

  3. (iii)

    \(U_{q_0, q_1}\) and \(V_{q_0, q_1}\) have the same entropy.

Proof

(i) If \(\textbf{u}\in U_{q_0, q_1}\) starts with 0, then we have \(0^k\, \textbf{u}\in U_{q_0, q_1}\) for all \(k \ge 0\). If moreover \(\textbf{u}\ne \overline{0}\), then all sequences \(0^k\, \textbf{u}\) are different. Therefore, \(U_{q_0, q_1} \ne \{\overline{0},\overline{1}\}\) implies that \(U_{q_0, q_1}\) is infinite. The converse is trivial.

(ii) We have \(U_{q_0, q_1} \subseteq V_{q_0, q_1}\) and all elements of \(V_{q_0, q_1} \setminus U_{q_0, q_1}\) end with \(\textbf{a}_{q_0,q_1}\) or \(\textbf{b}_{q_0,q_1}\), hence this difference is countable.

(iii) The set \(V_{q_0,q_1}\) differs from \(U_{q_0,q_1}\) only by a countable set, which does not affect the entropy according to Bowen’s definition [13], i.e., \(h(U_{q_0,q_1}) = h(V_{q_0,q_1})\). See [5, Proposition 2.6] for a similar statement, with a more complicated proof. \(\square \)

Since \(V_{q_0,q_1} = \Omega _{\textbf{a}_{q_0,q_1},\textbf{b}_{q_0,q_1}}\), its cardinality is given by Theorem 2.5, which we prove in the rest of the section. For \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \), we can write

$$\begin{aligned} \Omega _{\textbf{a},\textbf{b}} = \big \{\textbf{u}\in \{0,1\}^\infty \setminus \{\overline{0}, \overline{1}\} :\, \sup \nolimits _0(\textbf{u}) \le \textbf{a},\, \inf \nolimits _1(\textbf{u}) \ge \textbf{b}\big \} \cup \{\overline{0}, \overline{1}\}, \end{aligned}$$

with

$$\begin{aligned} \begin{aligned} \sup \nolimits _0(i_1i_2\ldots )&:= \sup \{i_ni_{n+1} \ldots :\, n \ge 1,\, i_n = 0\}, \\ \inf \nolimits _1(i_1i_2\ldots )&:= \inf \{i_ni_{n+1} \ldots :\, n \ge 1,\, i_n = 1\}. \end{aligned} \end{aligned}$$

In other words, \(\sup \nolimits _0(\textbf{u})\) is the maximal element of \(X_{\textbf{u}}\) starting with 0 and \(\inf \nolimits _1(\textbf{u})\) is the minimal element of \(X_{\textbf{u}}\) starting with 1, where

$$\begin{aligned} X_{i_1i_2\ldots }:= \textrm{closure}(\{i_n i_{n+1} \ldots : n \ge 1\}) \end{aligned}$$

is the subshift generated by the word \(i_1i_2\ldots \in \{0,1\}^\infty \). We have

$$\begin{aligned} \begin{aligned} \sup \nolimits _0(\sigma (\overline{0}))&= \sigma (\overline{0}),&\sup \nolimits _0(\sigma (0\overline{1}))&= \sigma (0\overline{1}),&\sup \nolimits _0(\varvec{\sigma }(\overline{0}))&= \varvec{\sigma }(\overline{0}), \\ \inf \nolimits _1(\sigma (\overline{1}))&= \sigma (\overline{1}),&\inf \nolimits _1(\sigma (1\overline{0}))&= \sigma (1\overline{0}),&\inf \nolimits _1(\varvec{\sigma }(\overline{1}))&= \varvec{\sigma }(\overline{1}), \end{aligned} \end{aligned}$$
(3.4)

for all \(\sigma \in \{L,M,R\}^*\), \(\varvec{\sigma }\in \{L,M,R\}^\infty \); more precisely, the following lemma holds.

Lemma 3.5

For all \(\sigma \in \{L,M,R\}^*\), \(\varvec{\sigma }\in \{L,M,R\}^\infty \), \(\textbf{u}\in \{0,1\}^\infty \), we have

$$\begin{aligned} \begin{aligned} \sup \nolimits _0(\sigma (0\textbf{u}))&= \sigma (\sup \nolimits _0(0\textbf{u})),&\inf \nolimits _1(\sigma (1\textbf{u}))&= \sigma (\inf \nolimits _1(1\textbf{u})), \\ \sup \nolimits _0(\varvec{\sigma }(0\textbf{u}))&= \varvec{\sigma }(\sup \nolimits _0(0\textbf{u})),&\inf \nolimits _1(\varvec{\sigma }(1\textbf{u}))&= \varvec{\sigma }(\inf \nolimits _1(1\textbf{u})). \end{aligned} \end{aligned}$$

Proof

We first show that \(\sigma \in \{L,M,R\}^*\) and \(\sup \nolimits _0\) commute on \(0\{0,1\}^\infty \). It suffices to consider \(\sigma \in \{L,M,R\}\). Since the only occurrence of 0 in R(0) and R(1) is at the beginning of R(0), we have \(\sup \nolimits _0(R(0\textbf{u})) = R(0\textbf{v})\) for some \(\textbf{v}\in X_{0\textbf{u}}\), and \(0\textbf{v}= \sup \nolimits _0(\textbf{u})\) because R is order-preserving. For \(\sigma \in \{L,M\}\), the letter 0 also occurs at the end of \(\sigma (1)\). Suppose that \(\sup \nolimits _0(\sigma (\textbf{u})) = 0\sigma (\textbf{v})\) with \(1\textbf{v}\in X_{0\textbf{u}}\), and let \(k \ge 1\) be such that \(01^k\textbf{v}\in X_{0\textbf{u}}\). Since \(\sigma (01^k\textbf{v}) \ge 0\sigma (\textbf{v})\), we have \(\sigma (01^k\textbf{v}) = \sup \nolimits _0(\sigma (\textbf{u}))\), thus \(01^k\textbf{v}= \sup \nolimits _0(\textbf{u})\), i.e., L and M also commute with \(\sup \nolimits _0\) on \(0\{0,1\}^\infty \).

The proof that \(\sigma \in \{L,M,R\}^*\) and \(\inf \nolimits _1\) commute on \(1\{0,1\}^\infty \) is symmetric; it suffices to exchange 0 and 1, L and R, \(\sup \nolimits _0\) and \(\inf \nolimits _1\).

For \(\varvec{\sigma }= (\sigma _n)_{n\ge 1} \in \{L,M,R\}^\infty \), \(\textbf{u}\in \{0,1\}^\infty \), we have already proved that

$$\begin{aligned} \sup \nolimits _0(\varvec{\sigma }(0\textbf{u})) = \sup \nolimits _0(\sigma _{[1,n)}(\sigma _{[n,\infty )}(0\textbf{u}))) = \sigma _{[1,n)}(\sup \nolimits _0(\sigma _{[n,\infty )}(0\textbf{u}))) \end{aligned}$$

for all \(n \ge 1\). If \(\varvec{\sigma }\) is primitive or ends with \(\overline{R}\), then the length of \(\sigma _{[1,n)}(0)\) is unbounded, thus \(\sup \nolimits _0(\varvec{\sigma }(0\textbf{u})) = \varvec{\sigma }(\overline{0}) = \varvec{\sigma }(\sup \nolimits _0(0\textbf{u}))\). Otherwise, \(\varvec{\sigma }\) ends with \(\overline{L}\). Since \(\sup \nolimits _0(\overline{L}(\overline{0})) = \overline{0} = \overline{L}(\sup \nolimits _0(\overline{0}))\) and \(\sup \nolimits _0(\overline{L}(0\textbf{u})) = 01\overline{0} = \overline{L}(\sup \nolimits _0(0\textbf{u}))\) for \(\textbf{u}\ne \overline{0}\), \(\overline{L}\) commutes with \(\sup \nolimits _0\) on \(0\{0,1\}^\infty \), hence \(\varvec{\sigma }\) commutes with \(\sup \nolimits _0\) on \(0\{0,1\}^\infty \) for all \(\varvec{\sigma }\in \{L,M,R\}^\infty \). Again, the case of \(\inf \nolimits _1\) and \(\textbf{u}\in 1\{0,1\}^\infty \) is symmetric. \(\square \)

We have the following relation between \(\Omega _{\sigma (\textbf{a}),\sigma (\textbf{b})}\) and \(\sigma (\Omega _{\textbf{a},\textbf{b}})\).

Lemma 3.6

If \(\textbf{u}\in \Omega _{\sigma (\textbf{a}),\sigma (\textbf{b})} \setminus \{\overline{0}, \overline{1}\}\), \(\sigma \in \{L,M,R\}\), \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \), then \(\textbf{u}= w\, \sigma (\textbf{v})\) for some \(\textbf{v}\in \Omega _{\textbf{a},\textbf{b}}\), \(w \in \{0,1\}^*\).

If \(\textbf{u}\in \Omega _{\sigma (\textbf{a}),\sigma (\textbf{b})} \setminus \{\overline{0}, \overline{1}\}\), \(\sigma \,{\in }\, \{L,R\}^*\), \(\textbf{a}, \textbf{b}\,{\in }\, \{0,1\}^\infty \) with \(\textbf{a}< 0\overline{1}\) and \(\textbf{b}> 1 \overline{0}\), then \(\textbf{u}= w\, \sigma (\textbf{v})\) for some \(\textbf{v}\in \Omega _{\textbf{a},\textbf{b}} \setminus \{\overline{0}, \overline{1}\}\), \(w \in \{0,1\}^*\).

Proof

If \(\sigma = L\), then \(\sup \nolimits _0(\textbf{u}) \le \overline{01}\), thus \(\textbf{u}= 1^k L(\textbf{v}')\) for some \(k \ge 0\), \(\textbf{v}' \in \{0,1\}^\infty \). If \(\sigma = R\), then \(\inf \nolimits _1(\textbf{u}) \ge \overline{10}\) implies that \(\textbf{u}= 0^k R(\textbf{v}')\) for some \(k \ge 0\), \(\textbf{v}' \in \{0,1\}^\infty \). If \(\sigma = M\), then \(\sup \nolimits _0(\textbf{u}) \le 01\overline{10}\) and \(\inf \nolimits _1(\textbf{u}) \ge 10\overline{01}\), thus \(\textbf{u}= 0^k M(\textbf{v}')\) or \(\textbf{u}= 1^k M(\textbf{v}')\) for some \(k \ge 0\), \(\textbf{v}' \in \{0,1\}^\infty \).

To show that \(\textbf{v}'\) ends with some \(\textbf{v}\in \Omega _{\textbf{a},\textbf{b}}\), assume first that \(\textbf{v}'\) starts with 0. Then \(\sigma (\sup \nolimits _0(\textbf{v}')) = \sup \nolimits _0(\sigma (\textbf{v}')) \le \sigma (\textbf{a})\), thus \(\sup \nolimits _0(\textbf{v}') \le \textbf{a}\), and \(\textbf{v}' = \overline{0} \in \Omega _{\textbf{a},\textbf{b}}\) or \(\textbf{v}' = 0^n \textbf{v}\) for some \(\textbf{v}\in 1\{0,1\}^\infty \). Then \(\sigma (\inf \nolimits _1(\textbf{v})) = \inf \nolimits _1(\sigma (\textbf{v})) \ge \sigma (\textbf{b})\), thus \(\inf \nolimits _1(\textbf{v}) \ge \textbf{b}\). Since \(\sup \nolimits _0(\textbf{v}) \le \sup \nolimits _0(\textbf{v}')\) (or \(\textbf{v}= \overline{1}\)), we obtain that \(\textbf{v}\in \Omega _{\textbf{a},\textbf{b}}\). Since the case of \(\textbf{v}'\) starting with 1 is symmetric, this proves the first statement.

Moreover, if \(\sigma = L\), then \(\textbf{a}< 0\overline{1}\), \(\textbf{b}> 1 \overline{0}\) imply that \(L(\textbf{a}) < \overline{01}\), \(L(\textbf{b}) > 1 \overline{0}\), which gives together with \(\textbf{u}\notin \{\overline{0}, \overline{1}\}\) that \(\textbf{v}\notin \{\overline{0}, \overline{1}\}\). In case \(\sigma = R\), we also have \(\textbf{v}\notin \{\overline{0}, \overline{1}\}\) by symmetry.

Let now \(\sigma _1 \ldots \sigma _n \in \{L,R\}^*\), \(n \ge 1\), \(\textbf{u}\in \Omega _{\sigma _1 \ldots \sigma _n(\textbf{a}),\sigma _1\ldots \sigma _n(\textbf{b})} \setminus \{\overline{0}, \overline{1}\}\), \(\textbf{a}< 0\overline{1}\), \(\textbf{b}> 1 \overline{0}\). We have proved that \(\textbf{u}\in \{0,1\}^* (\Omega _{\sigma _2\ldots \sigma _n(\textbf{a}),\sigma _2\ldots \sigma _n(\textbf{b})} \setminus \{\overline{0}, \overline{1}\})\), and we obtain inductively that \(\textbf{u}\in \{0,1\}^* (\Omega _{\textbf{a},\textbf{b}} \setminus \{\overline{0}, \overline{1}\})\). \(\square \)

The following lemma shows that the map

$$\begin{aligned} \begin{aligned} s:\ {}&\{0,1\}^\infty \rightarrow \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R}, R\overline{L}\}, \\&\textbf{u} \mapsto \varvec{\sigma }\quad \text {if}\,\, \varvec{\sigma }(\overline{0}) \le \textbf{u}\le \varvec{\sigma }(0\overline{1}) \,\,\text {or}\,\, \varvec{\sigma }(1\overline{0}) \le \textbf{u}\le \varvec{\sigma }(\overline{1}), \end{aligned} \end{aligned}$$

is well-defined and monotonically increasing on \(0\{0,1\}^\infty \) as well as on \(1\{0,1\}^\infty \), where sequences in \(\{L,M,R\}^\infty \) are ordered lexicographically with \(L<M<R\). Some of the values of s are shown in Fig. 5. Note that \(\varvec{\sigma }(i_1i_2\ldots )\) depends only on \(i_1\) when the length of \(\sigma _1 \ldots \sigma _n(i_1)\) is unbounded. In particular, we have \(\varvec{\sigma }(\overline{0}) \,{=}\, \varvec{\sigma }(0\overline{1})\) and \(\varvec{\sigma }(1\overline{0}) \,{=}\, \varvec{\sigma }(\overline{1})\) for primitive \(\varvec{\sigma }\), \(\sigma \overline{R}(\overline{0}) \,{=}\, \sigma \overline{R}(0\overline{1})\) and \(\sigma \overline{L}(1\overline{0}) \,{=}\, \sigma \overline{L}(\overline{1})\) for all \(\sigma \in \{L,M,R\}^*\), and

$$\begin{aligned} \begin{aligned} \overline{L}(\overline{0})&= \overline{0},&\overline{L}(\overline{1}) = \overline{L}(1\overline{0})&= 1\overline{0},&\overline{L}(0\overline{1})&= 01\overline{0}, \\ \overline{R}(\overline{1})&= \overline{1},&\overline{R}(\overline{0}) = \overline{R}(0\overline{1})&= 0\overline{1},&\overline{R}(1\overline{0})&= 10\overline{1}. \end{aligned} \end{aligned}$$
(3.5)
Fig. 5
figure 5

Some values of s and some intervals \([\sigma (\overline{0}), \sigma (0\overline{1})]\), \([\sigma (1\overline{0}), \sigma (\overline{1})]\), \(\sigma \in \{L,R\}^*M\)

Lemma 3.7

We have the partitions (with lexicographic intervals)

$$\begin{aligned} \begin{aligned} {[}\overline{0}, 0\overline{1}] \ {}&= \hspace{-4em} \bigcup _{\varvec{\sigma }\in \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R},R\overline{L}\}} \hspace{-4em} [\varvec{\sigma }(\overline{0}), \varvec{\sigma }(0\overline{1})],&(01\overline{0}, 0\overline{1})&= \hspace{-1em} \bigcup _{\sigma \in \{L,R\}^*M} \hspace{-1em} [\sigma (\overline{0}), \sigma (0\overline{1})] \ \cup \hspace{-2.5em} \bigcup _{\varvec{\sigma }\in \{L,R\}^\infty \,\text {primitive}} \hspace{-2.5em} \{\varvec{\sigma }(\overline{0})\}, \\ {[}1\overline{0}, \overline{1}] \ {}&= \hspace{-4em} \bigcup _{\varvec{\sigma }\in \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R},R\overline{L}\}} \hspace{-4em} [\varvec{\sigma }(1\overline{0}), \varvec{\sigma }(\overline{1})],&(1\overline{0}, 10\overline{1})&= \hspace{-1em} \bigcup _{\sigma \in \{L,R\}^*M} \hspace{-1em} [\sigma (1\overline{0}), \sigma (\overline{1})] \ \cup \hspace{-2.5em} \bigcup _{\varvec{\sigma }\in \{L,R\}^\infty \,\text {primitive}} \hspace{-2.5em} \{\varvec{\sigma }(\overline{1})\}. \end{aligned} \end{aligned}$$

For \(\varvec{\sigma }, \varvec{\tau }\in \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R},R\overline{L}\}\) with \(\varvec{\sigma }< \varvec{\tau }\), we have \(\varvec{\sigma }(0\overline{1}) < \varvec{\tau }(\overline{0})\) and \(\varvec{\sigma }(\overline{1}) < \varvec{\tau }(1\overline{0})\).

Proof

Since L, M and R are strictly monotonically increasing on \(\{0,1\}^\infty \), we have, for any \(\sigma \in \{L,M,R\}^*\), the partition of the open interval

$$\begin{aligned} \begin{aligned} \hspace{-2em} \big (\sigma (01\overline{0}), \sigma (0\overline{1})\big )&= \underbrace{\big (\sigma (01\overline{0}), \sigma (\overline{01})\big )}_{(\sigma L(01\overline{0}), \sigma L(0\overline{1}))} \, \cup \, \underbrace{\big [\sigma (\overline{01}), \sigma (0110\overline{01})\big ]}_{[\sigma M\overline{L}(\overline{0}), \sigma M\overline{L}(0\overline{1})]} \\&\hspace{-2em} \cup \, \underbrace{\big (\sigma (0110\overline{01}), \sigma (01\overline{10})\big )}_{(\sigma M(01\overline{0}), \sigma M(0\overline{1}))} \, \cup \hspace{-.5em} \underbrace{\big \{\sigma (01\overline{10})\big \}}_{[\sigma M\overline{R}(\overline{0}), \sigma M\overline{R}(0\overline{1})]} \hspace{-.5em} \cup \, \underbrace{\big (\sigma (01\overline{10}), \sigma (0\overline{1})\big )}_{(\sigma R(01\overline{0}), \sigma R(0\overline{1}))}. \end{aligned} \end{aligned}$$
(3.6)

Starting from \(\sigma = \textrm{id}\) and iterating this partition for \(\sigma \in \{L,M,R\}^*\), we get that

$$\begin{aligned} (01\overline{0}, 0\overline{1})= & {} \hspace{-1em} \bigcup _{\sigma \in \{L,M,R\}^*} \hspace{-1em} \big ([\sigma M\overline{L}(\overline{0}), \sigma M\overline{L}(0\overline{1})] \ \cup \ [\sigma M\overline{R}(\overline{0}),\\{} & {} \sigma M\overline{R}(0\overline{1})]\big ) \ \cup \hspace{-2.5em} \bigcup _{\varvec{\sigma }\in \{L,M,R\}^\infty \,\text {primitive}} \hspace{-2.5em} \{\varvec{\sigma }(\overline{0})\}. \end{aligned}$$

Here, we have used that all sequences outside the union over \(\{L,M,R\}^*\) are in \(\bigcap _{n\ge 1} (\sigma _1\ldots \sigma _n(01\overline{0}), \sigma _1\ldots \sigma _n(0\overline{1}))\) for some \(\varvec{\sigma }= (\sigma _n)_{n\ge 1} \in \{L,M,R\}^\infty \); this intersection is empty when \(\varvec{\sigma }\) ends with \(\overline{L}\) or \(\overline{R}\) because the intervals are open and converge to their left or right endpoint, and it consists of \(\varvec{\sigma }(\overline{0})\) when \(\varvec{\sigma }\) is primitive. Since \([\overline{L}(\overline{0}), \overline{L}(0\overline{1})] = [\overline{0}, 01\overline{0}]\), \([\overline{R}(\overline{0}), \overline{R}(0\overline{1})] = \{0\overline{1}\}\), and

$$\begin{aligned} \begin{aligned}&\{L,M,R\}^\infty \setminus \{L,M,R\}^* \{L\overline{R},R\overline{L}\} \\&\quad = \{\varvec{\sigma }\in \{L,M,R\}^\infty :\, \varvec{\sigma }\ \text {primitive}\} \cup \{L,M,R\}^* M \{\overline{L},\overline{R}\} \cup \{\overline{L},\overline{R}\}, \end{aligned} \end{aligned}$$

this shows that the intervals \([\varvec{\sigma }(\overline{0}), \varvec{\sigma }(0\overline{1})]\) form a partition of \([\overline{0}, 0\overline{1}]\), and that \(\varvec{\sigma }(0\overline{1}) < \varvec{\tau }(\overline{0})\) for all \(\varvec{\sigma }, \varvec{\tau }\in \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R},R\overline{L}\}\) with \(\varvec{\sigma }< \varvec{\tau }\).

From (3.6), we also see that \([\sigma _1\ldots \sigma _n(\overline{0}), \sigma _1\ldots \sigma _n(0\overline{1})]\), \(\sigma _1\ldots \sigma _n \in \{L,R\}^*M\), is the union over all \([\varvec{\tau }(\overline{0}), \varvec{\tau }(0\overline{1})]\), \(\varvec{\tau }\in \{L,M,R\}^\infty \setminus \{L,M,R\}^*\{L\overline{R},R\overline{L}\}\) with \(\tau _1 \ldots \tau _n = \sigma _1 \ldots \sigma _n\), which proves the partition of \((01\overline{0}, 0\overline{1})\).

The proofs for sequences starting with 1 are symmetric, by exchanging 0 and 1, L and R, as well as the left and right endpoints of the intervals. \(\square \)

Using the map s, we can write (iii)–(v) of Theorem 2.5 in a simpler way.

Proposition 3.8

Let \(\textbf{a}\in 0\{0,1\}^\infty \), \(\textbf{b}\in 1\{0,1\}^\infty \). Then we have the following.

  1. (iii’)

    \(\Omega _{\textbf{a},\textbf{b}}\) is uncountable with positive entropy if and only if \(s(\textbf{a}) > s(\textbf{b})\).

  2. (iv’)

    \(\Omega _{\textbf{a},\textbf{b}}\) is uncountable with zero entropy if and only if \(s(\textbf{a}) = s(\textbf{b})\) is primitive.

  3. (v’)

    \(\Omega _{\textbf{a},\textbf{b}}\) is countable if and only if \(s(\textbf{a}) < s(\textbf{b})\) or \(s(\textbf{a}) = s(\textbf{b})\) ends with \(\overline{L}\) or \(\overline{R}\).

Proof of Theorem 2.6

For all \(\textbf{u}\in \{0,1\}^\infty \), \(\textbf{a}\le \textbf{u}\le \textbf{b}\) is equivalent to \(0\textbf{u}\le 0\textbf{b}\) and \(1\textbf{u}\ge 1\textbf{a}\), thus \(\textbf{u}\in \Sigma _{\textbf{a},\textbf{b}}\) implies that \(\textbf{u}\), \(0\textbf{u}\) and \(1\textbf{u}\) are in \(\Omega _{0\textbf{b},1\textbf{a}}\). Moreover, \(0\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\) implies that \(00\textbf{u}\le 0\textbf{u}\le \textbf{a}\), thus \(00\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\), similarly \(1\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\) gives that \(11\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\). On the other hand, \(01\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\) implies that \(1\textbf{u}\in \Sigma _{\textbf{a},\textbf{b}}\). Indeed, for \(1\textbf{u}= i_1i_2\ldots \), we see that \(\textbf{a}\le i_ni_{n+1}\ldots \le \textbf{b}\) for all \(n \ge 1\) by induction on n. This holds for \(n=1\) because \(01\textbf{u}\ge 0\textbf{b}\) implies that \(\textbf{a}\le 1\textbf{u}\le \textbf{b}\); if it holds for n, then \(i_n = 1\) implies that \(\textbf{a}\le i_{n+1} i_{n+2} \ldots \le i_n i_{n+1} \ldots \le \textbf{b}\) since \(i_n i_{n+1}\ldots \ge 1\textbf{a}\), and \(i_n = 0\) implies that \(\textbf{a}\le i_n i_{n+1}\ldots \le i_{n+1} i_{n+2} \ldots \le \textbf{b}\) since \(i_n i_{n+1}\ldots \le 0\textbf{b}\), thus it holds for \(n{+}1\). Similarly, \(10\textbf{u}\in \Omega _{0\textbf{b},1\textbf{a}}\) implies that \(0\textbf{u}\in \Sigma _{\textbf{a},\textbf{b}}\). This shows that \(\Omega _{0\textbf{b},1\textbf{a}} = 0^* \Sigma _{\textbf{a},\textbf{b}} \cup 1^* \Sigma _{\textbf{a},\textbf{b}} \cup \{\overline{0}, \overline{1}\}\), hence \(\Sigma _{\textbf{a},\textbf{b}} = \emptyset \) if and only if \(\Omega _{0\textbf{b},1\textbf{a}} = \{\overline{0}, \overline{1}\}\), and the countability of \(\Sigma _{\textbf{a},\textbf{b}}\) and \(\Omega _{0\textbf{b},1\textbf{a}}\) are equivalent. Since

$$\begin{aligned} A_n(\Sigma _{\textbf{a},\textbf{b}}) \le A_n(\Omega _{0\textbf{b},1\textbf{a}}) \le 2\sum _{k=0}^n A_k(\Sigma _{\textbf{a},\textbf{b}}) \le 2(n{+}1) A_n(\Sigma _{\textbf{a},\textbf{b}}), \end{aligned}$$

\(\Sigma _{\textbf{a},\textbf{b}}\) and \(\Omega _{0\textbf{b},1\textbf{a}}\) have the same entropy; see also [27, Lemma 2.5]. \(\square \)

Proof of Theorem 2.5 and Proposition 3.8

We first prove (i) and (ii). Let \(\sigma \in \{L,R\}^*\). Then \(\sup \nolimits _0(\sigma M(\overline{0})) = \sigma M(\overline{0})\), \(\inf \nolimits _1(\sigma M(\overline{0})) \,{=}\, \inf \nolimits _1(\sigma M(\overline{1})) \,{=}\, \sigma M(\overline{1})\) by (3.4), thus \(\sigma M(\overline{0}) \in \Omega _{\sigma M(\overline{0}),\sigma M(\overline{1})} \subseteq \Omega _{\textbf{a},\textbf{b}}\) for all \(\textbf{a}\ge \sigma M(\overline{0})\), \(\textbf{b}\le \sigma M(\overline{1})\). On the other hand, by Lemma 3.6, each \(\textbf{u}\in \Omega _{\sigma M(\overline{0}),\sigma M(1\overline{0})} \setminus \{\overline{0}, \overline{1}\}\) ends with \(\sigma (\textbf{v})\) for some \(\textbf{v}\in \Omega _{M(\overline{0}),M(1\overline{0})} \setminus \{\overline{0}, \overline{1}\}\) and thus with \(\sigma M(\overline{0})\) since \(\Omega _{\overline{0},1\overline{0}} = 1^* \{\overline{0}, \overline{1}\}\). Therefore, we have \(\Omega _{\textbf{a},\textbf{b}} = \{\overline{0}, \overline{1}\}\) for all \(\textbf{a}< \sigma M(\overline{0})\), \(\textbf{b}\ge \sigma M(1\overline{0})\). By symmetry, \(\Omega _{\textbf{a},\textbf{b}}\) is also trivial for all \(\textbf{a}\le \sigma M(0\overline{1})\), \(\textbf{b}> \sigma M(\overline{1})\).

If \(\varvec{\sigma }\in \{L,R\}^\infty \) is primitive, then \(\sup \nolimits _0(\varvec{\sigma }(\overline{0})) = \varvec{\sigma }(\overline{0})\), \(\inf \nolimits _1(\varvec{\sigma }(\overline{0})) = \inf \nolimits _1(\varvec{\sigma }(\overline{1})) = \varvec{\sigma }(\overline{1})\) by (3.4) and since \(X_{\varvec{\sigma }(\overline{0})} = X_{\varvec{\sigma }(\overline{1})}\) by [12, Theorem 5.2]. This implies that \(\varvec{\sigma }(\overline{0}) \in \Omega _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})} \subseteq \Omega _{\textbf{a},\textbf{b}}\) for all \(\textbf{a}\ge \varvec{\sigma }(\overline{0})\), \(\textbf{b}\le \varvec{\sigma }(\overline{1})\). Since \(0\overline{1} \in \Omega _{0\overline{1},\textbf{b}}\) and \(1\overline{0} \in \Omega _{\textbf{a}, 1\overline{0}}\) for all \(\textbf{a}, \textbf{b}\in \{0,1\}^\infty \), we have proved the “if” parts of (i) and (ii).

For the “only if’ parts, since \(\Omega _{\textbf{a},\textbf{b}}\) is either trivial or not, it suffices to show that all \(\textbf{a}\in 0\{0, 1\}^\infty , \textbf{b}\in 1\{0,1\}^\infty \) satisfy the conditions of ((i) or (ii). If \(\textbf{a}= 0\overline{1}\) or \(\textbf{b}=1\overline{0}\), then we are in case (i). For \(\textbf{a}< 0\overline{1}\), \(\textbf{b}> 1\overline{0}\), consider \(s(\textbf{a}) \,{=}\, (\sigma _n)_{n\ge 1} \,{<}\, \overline{R}\), \(s(\textbf{b}) \,{=}\, (\tau _n)_{n\ge 1} \,{>}\, \overline{L}\). If \(\sigma _1 \ldots \sigma _k = \tau _1 \ldots \tau _k \in \{L,R\}^*\) and \(\sigma _{k+1} \ge M \ge \tau _{k+1}\) for some \(k \ge 0\) (where \(\sigma _1 \ldots \sigma _k\) is the identity if \(k=0\)), then \(\textbf{a}\ge \sigma _1 \ldots \sigma _k M(\overline{0})\), \(\textbf{b}\le \sigma _1 \ldots \sigma _k M(\overline{1})\) by Lemma 3.7, and we are in case (i). Otherwise, we have \(\sigma _1 \ldots \sigma _k = \tau _1 \ldots \tau _k \in \{L,R\}^*\) and \(\sigma _{k+1} < \tau _{k+1}\) for some \(k \ge 0\), thus \(\textbf{a}< \sigma _1 \ldots \sigma _k M(\overline{0})\), \(\textbf{b}\ge \sigma _1 \ldots \sigma _k M(1\overline{0})\) or \(\textbf{a}\le \sigma _1 \ldots \sigma _n M(0\overline{1})\), \(\textbf{b}> \sigma _1 \ldots \sigma _n M(\overline{1})\) by Lemma 3.7, i.e., we are in case (ii). This concludes the proof of (i) and (ii).

It remains to prove (iii)–(v)) and (iii)–(v). Let \(\sigma \,{\in }\, \{L,M,R\}^*\). If \(\textbf{b}< \sigma M(1\overline{0}) = \sigma (10\overline{01})\), then \(\textbf{b}< \sigma (1\overline{0(01)^k})\) for some \(k \ge 0\). For all \(\textbf{u}\in \{0(01)^k, 0(01)^{k+1}\}^\infty \), we have \(\inf \nolimits _1(\sigma (\textbf{u})) \ge \inf \nolimits _1(\sigma (1\textbf{u})) = \sigma (\inf \nolimits _1(1\textbf{u})) \ge \sigma (1\overline{0(01)^k})\) and \(\sup \nolimits _0(\sigma (\textbf{u})) = \sigma (\sup \nolimits _0(\textbf{u})) < \sigma (\overline{01})\), thus \(\sigma (\textbf{u}) \in \Omega _{\sigma M(\overline{0}),\textbf{b}}\). Therefore, the entropy of \(h(\Omega _{\textbf{a},\textbf{b}})\) is positive for all \(\textbf{a}\,{\ge }\, \sigma M(\overline{0})\), \(\textbf{b}\,{<}\, \sigma M(1\overline{0})\). For \(\textbf{a}> \sigma M(0\overline{1})\), \(\textbf{b}\le \sigma M(\overline{1})\), we obtain symmetrically that \(h(\Omega _{\textbf{a},\textbf{b}}) > 0\). This proves the “if” part of (iii).

The set \(\Omega _{01\overline{0},1\overline{0}} = \{\overline{0}, \overline{1}\} \cup 1^*0^*1\overline{0}\) is countable and \(\textbf{u}\in \Omega _{\sigma _1\ldots \sigma _n(01\overline{0}),\sigma _1\ldots \sigma _n(1\overline{0})}\), \(\sigma _1 \ldots \sigma _n \in \{L,M,R\}^n\), implies by Lemma 3.6 that \(\textbf{u}\in \{0,1\}^* \sigma _1\ldots \sigma _n(\Omega _{01\overline{0},1\overline{0}})\) or \(\textbf{u}\in \{0,1\}^* \sigma _1\ldots \sigma _k(\{\overline{0}, \overline{1}\})\), \(0 \le k < n\). Therefore, \(\Omega _{\textbf{a},\textbf{b}}\) is countable for all \(\textbf{a}\,{\le }\, \sigma (01\overline{0})\), \(\textbf{b}\,{\ge }\, \sigma (1\overline{0})\), \(\sigma \,{\in }\, \{L,M,R\}^*\). The case \(\textbf{a}\,{\le }\, \sigma (0\overline{1})\), \(\textbf{b}\,{\ge }\, \sigma (10\overline{1})\) is symmetric, thus the “if” part of (v) holds.

Let now \(\varvec{\sigma }\in \{L,M,R\}^\infty \) be primitive, which implies that \(X_{\varvec{\sigma }(\overline{0})} \subseteq \Omega _{\varvec{\sigma }(\overline{0}), \varvec{\sigma }(\overline{1})}\). If \(\varvec{\sigma }= (\sigma _n)_{n\ge 1}\) ends with \(\overline{M}\), then \(\varvec{\sigma }(\overline{0})\) is an image of the Thue–Morse word, thus \(X_{\varvec{\sigma }(\overline{0})}\) is uncountable. If \(\varvec{\sigma }\) does not end with \(\overline{M}\), then there exists an increasing sequence of integers \((n_k)_{k\ge 0}\) with \(n_0=0\) such that \(\sigma _{n_{k+1}} \ne M\) and \(\sigma _{n_k+1} \ldots \sigma _{n_{k+1}}(j)\) contains 01 and 10 for all \(j \in \{0,1\}\), \(k \ge 0\). Then, for all \(i \in \{0,1\}\), \(k \ge 0\), there is a word \(w_{i,k} \in \{0,1\}^*\) such that both \(\sigma _{n_k+1} \ldots \sigma _{n_{k+1}}(0)\) and \(\sigma _{n_k+1} \ldots \sigma _{n_{k+1}}(1)\) end with \((1{-}i)\, i\, w_{i,k}\); note that \(\sigma _{n_k+1} \ldots \sigma _{n_{k+1}}(0)\) ends with \(\sigma _{n_k+1} \ldots \sigma _{n_{k+1}}(1)\) or vice versa because \(\sigma _{n_{k+1}} \in \{L,R\}\). For each sequence \((i_k)_{k\ge 1} \in \{0,1\}^\infty \), we have

$$\begin{aligned} i_0 w_{i_0,1}\, \sigma _1 \ldots \sigma _{n_1}(i_1 w_{i_1,1}) \, \sigma _1 \ldots \sigma _{n_2}(i_2 w_{i_2,2})\, \ldots \in X_{\varvec{\sigma }(\overline{0})} \end{aligned}$$

because \(\sigma _1 \ldots \sigma _{n_{k+1}}(1{-}i_{k+1})\) ends with \(\sigma _1 \ldots \sigma _{n_k}((1{-}i_k) i_k w_{i_k,k})\), and different sequences give different elements of \(X_{\varvec{\sigma }(\overline{0})}\) because \(\sigma _1 \ldots \sigma _{n_k}(i_k)\) starts with \(i_k\). Therefore, \(\Omega _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) is uncountable. For all \(\textbf{a}< \varvec{\sigma }(\overline{0})\), we have \(\textbf{a}\le \sigma _1 \ldots \sigma _n(01\overline{0})\) for some \(n \ge 0\); since \(\varvec{\sigma }(\overline{1}) \ge \sigma _1 \ldots \sigma _n(1\overline{0})\), we have seen above that \(\Omega _{\textbf{a},\varvec{\sigma }(\overline{1})}\) is countable by (v). By Theorem 2.6, this implies that \(\Sigma _{\textbf{a},\textbf{b}}\) is countable for \(0\textbf{b}< \varvec{\sigma }(\overline{0})\), \(1\textbf{a}= \varvec{\sigma }(\overline{1})\), thus \(h(\Sigma _{\textbf{a},\textbf{b}}) = 0\). Since \(h(\Sigma _{\textbf{a},\textbf{b}})\) is a continuous function of \(\textbf{b}\) by [33, Theorem 4], we also have \(h(\Sigma _{\textbf{a},\textbf{b}}) = 0\) for \(0\textbf{b}= \varvec{\sigma }(\overline{0})\), thus \(h(\Omega _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}) = 0\). This proves the “if” part of (iv).

For the “only if” parts of (iii)–(v), since \(\Omega _{\textbf{a},\textbf{b}}\) is either countable or uncountable, with zero or positive entropy, it suffices to show that all \(\textbf{a}, \textbf{b}\) satisfy the conditions of (iii), (iv) or (v). Let \(s(\textbf{a}) = (\sigma _n)_{n\ge 1}\), \(s(\textbf{b}) = (\tau _n)_{n\ge 1}\). If \(s(\textbf{a}) > s(\textbf{b})\), i.e., \(\sigma _1 \ldots \sigma _k = \tau _1 \ldots \tau _k\), \(\sigma _{k+1} > \tau _{k+1}\) for some \(k \ge 0\), then \(\textbf{a}\ge \sigma _1 \ldots \sigma _k M(\overline{0})\), \(\textbf{b}< \sigma _1 \ldots \sigma _k M(1\overline{0})\), or \(\textbf{a}> \sigma _1 \ldots \sigma _k M(0\overline{1})\), \(\textbf{b}\le \sigma _1 \ldots \sigma _k M(\overline{1})\), thus we are in case (iii). If \(s(\textbf{a}) < s(\textbf{b})\), i.e., \(\sigma _1 \ldots \sigma _k = \tau _1 \ldots \tau _k\), \(\sigma _{k+1} < \tau _{k+1}\) for some \(k \ge 0\), then \(\textbf{a}< \sigma _1 \ldots \sigma _k M(\overline{0}) \le \sigma _1 \ldots \sigma _k M(01\overline{0})\), \(\textbf{b}\ge \sigma _1 \ldots \sigma _k M(1\overline{0})\), or \(\textbf{a}\le \sigma _1 \ldots \sigma _k M(0\overline{1})\), \(\textbf{b}> \sigma _1 \ldots \sigma _k M(\overline{1}) \ge \sigma _1 \ldots \sigma _k M(10\overline{1})\), thus we are in case (v). If \(s(\textbf{a}) = s(\textbf{b}) = \sigma \overline{L}\), \(\sigma \in \{L,M,R\}^*\), then \(\textbf{a}\le \sigma \overline{L}(0\overline{1}) = \sigma (01\overline{0})\), \(\textbf{b}\ge \sigma \overline{L}(1\overline{0}) = \sigma (1\overline{0})\), thus we are in case (v). The case \(s(\textbf{b}) \,{=}\, s(\textbf{a}) \,{=}\, \sigma \overline{R}\) is symmetric, and the case of primitive \(s(\textbf{a}) \,{=}\, s(\textbf{b})\) is (iv). This concludes the proof of (iii)–(v) as well as (iii)–(v). \(\square \)

4 The maps \(g,\tilde{g}\)

Recall that \(\textbf{a}_{q_0,q_1}\) and \(\textbf{b}_{q_0,q_1}\) are defined in Sect. 3, and that \(g_{\textbf{u}}(q_0) > 1\), \(\tilde{g}_{\textbf{v}}(q_0) > 1\) (when defined) satisfy \(f_{\textbf{u}}(q_0,g_{\textbf{u}}(q_0)) = 0\), \(\tilde{f}_{\textbf{v}}(q_0,\tilde{g}_{\textbf{v}}(q_0)) = 0\), with

$$\begin{aligned} f_{\textbf{u}}(q_0, q_1):= q_0\, (q_1\, \pi _{q_0,q_1}(\textbf{u}) - 1), \quad \tilde{f}_{\textbf{v}}(q_0,q_1):= q_1\, (q_0\, \tilde{\pi }_{q_0,q_1}(\textbf{v}) - 1). \end{aligned}$$

We set \(g_{\textbf{u}}(q_0):= 1\) when \(f_{\textbf{u}}(q_0, q_1) = 0\) has no solution \(q_1 > 1\).

We are only interested in \(\textbf{u}\in W\) and \(\textbf{v}\in \tilde{W}\), with

$$\begin{aligned} W&:= \big \{\textbf{u}\in \{0,1\}^\infty \setminus \{0,1\}^* \{\overline{0}, \overline{1}\} \,:\, \sup \nolimits _0(\textbf{u}) = \textbf{u}\big \}, \\ \tilde{W}&:= \big \{\textbf{v}\in \{0,1\}^\infty \setminus \{0,1\}^* \{\overline{0}, \overline{1}\} \,:\, \inf \nolimits _1(\textbf{v}) = \textbf{v}\big \}. \end{aligned}$$

Lemma 4.1

Let \(\textbf{u}\in W\). Then the following holds.

  1. (i)

    For \(q_0 > 1\), \(q_1 \ge 1\), the function \(f_{\textbf{u}}(q_0, q_1)\) is continuous and strictly decreasing in both variables \(q_0,q_1\), and there is a unique \(q_0 > 1\) such that \(f_{\textbf{u}}(q_0,1) = 0\); we denote this \(q_0\) by \(q_{\textbf{u}}\).

  2. (ii)

    The function \(g_{\textbf{u}}(q_0)\) is continuous on \((1,\infty )\) and strictly decreasing on \((1,q_{\textbf{u}})\), with \(\lim _{q_0\rightarrow 1} g_{\textbf{u}}(q_0) = \infty \) and \(g_{\textbf{u}}(q_0) = 1\) for all \(q_0 \ge q_{\textbf{u}}\).

  3. (iii)

    For \(q_0, q_1 > 1\) with \(q_0+q_1 \ge q_0q_1\), we have \(\textbf{a}_{q_0,q_1} > \textbf{u}\) if and only if \(q_1 > g_{\textbf{u}}(q_0)\). For \(q_0 \in (1,q_{\textbf{u}})\), we have \(\textbf{a}_{q_0, g_{\textbf{u}}(q_0)} = \textbf{u}\).

Proof

(i) Writing \(\textbf{u}= 01i_1i_2\ldots \), we have

$$\begin{aligned} f_{\textbf{u}}(q_0,q_1) = 1-q_0+\sum _{k=1}^\infty \frac{i_k}{q_{i_1}q_{i_2}\ldots q_{i_k}}. \end{aligned}$$

The continuity follows from the local uniform convergence of this series; for \(q_1 = 1\), note that the 0s occur in \(\textbf{u}\) with bounded distance since \(\sup \nolimits _0(\textbf{u}) = \textbf{u}< 0\overline{1}\). We have \(\frac{\partial }{\partial q_0}f_{\textbf{u}}(q_0,q_1) < 0\) and, since \(i_1i_2 \ldots \ne \overline{0}\), \(\frac{\partial }{\partial q_1}f_{\textbf{u}}(q_0,q_1) < 0\) for all \(q_0,q_1>1\). Since \(\lim _{q_0\rightarrow 1} f_{\textbf{u}}(q_0,1) = \infty \) and \(\lim _{q_0\rightarrow \infty } f_{\textbf{u}}(q_0,1) = -\infty \), the equation \(f_{\textbf{u}}(q_0,1) = 0\) has a unique solution \(q_0 > 1\).

(ii) The existence, uniqueness and monotonicity of \(g_{\textbf{u}}(q_0)\) on \((1,q_{\textbf{u}})\) follows from the continuity and monotonicity of \(f_{\textbf{u}}(q_0,q_1)\), from \(\lim _{q_1\rightarrow \infty } f_{\textbf{u}}(q_0,q_1) = 1 - q_0 < 0\) and \(f_{\textbf{u}}(q_0,1) > f_{\textbf{u}}(q_{\textbf{u}},1) = 0\) for all \(q_0 \in (1,q_{\textbf{u}})\). The continuity of \(g_{\textbf{u}}(q_0)\) follows from the monotone version of the implicit function theorem (see e.g. [22, p. 423]) and \(f_{\textbf{u}}(q_{\textbf{u}},1) = 0\). If \(\textbf{u}\) starts with \(010^k1\), \(k \ge 0\), then \(f_{\textbf{u}}(q_0,q_1) \ge 1-q_0 + \frac{1}{q_0^kq_1}\) and thus \(g_{\textbf{u}}(q_0) \ge \frac{1}{q_0^k(q_0-1)}\), which implies that \(\lim _{q_0\rightarrow 1} g_{\textbf{u}}(q_0) = \infty \).

(iii) If \(\textbf{u}< \textbf{a}_{q_0,q_1}\), then \(\textbf{u}\) is a quasi-greedy \((q_0,q_1)\)-expansion by [30, Theorem 1.2], and the monotonicity of quasi-greedy expansions gives \(\pi _{q_0,q_1}(\textbf{u}) < \frac{1}{q_1}\), which is equivalent to \(q_1 > g_{\textbf{u}}(q_0)\) by (i) and (ii). On the other hand, if \(\pi _{q_0,q_1}(\textbf{u}) < \frac{1}{q_1}\), then the quasi-greedy \((q_0,q_1)\)-expansion of \(\pi _{q_0,q_1}(\textbf{u})\) is strictly smaller than \(\textbf{a}_{q_0,q_1}\), which implies that \(\textbf{u}< \textbf{a}_{q_0,q_1}\). If \(q_1 = g_{\textbf{u}}(q_0)\), i.e., \(\pi _{q_0,q_1}(\textbf{u}) = \frac{1}{q_1}\), then \(\textbf{a}_{q_0,q_1} = \textbf{u}\). \(\square \)

Lemma 4.2

Let \(\textbf{v}\in \tilde{W}\). Then the following holds.

  1. (i)

    For \(q_0 \ge 1\), \(q_1 > 1\), the function \(\tilde{f}_{\textbf{v}}(q_0, q_1)\) is continuous and strictly decreasing in both variables \(q_0,q_1\).

  2. (ii)

    The function \(\tilde{g}_{\textbf{v}}(q_0)\) is continuous and strictly decreasing on \((1,\infty )\), with \(1< \lim _{q_0\rightarrow 1} \tilde{g}_{\textbf{v}}(q_0) < \infty \) and \(\lim _{q_0\rightarrow \infty } \tilde{g}_{\textbf{v}}(q_0) = 1\).

  3. (iii)

    For \(q_0, q_1 > 1\) with \(q_0+q_1 \ge q_0q_1\), we have \(\textbf{b}_{q_0,q_1} < \textbf{v}\) if and only if \(q_1 > \tilde{g}_{\textbf{v}}(q_0)\), and \(\textbf{b}_{q_0,\tilde{g}_{\textbf{v}}(q_0)} = \textbf{v}\).

Proof

Since \(\tilde{f}_{i_1i_2\ldots }(q_0,q_1) = f_{(1-i_1)(1-i_2)\ldots }(q_1,q_0)\), the points (i) and (ii) follow from Lemma 4.1 (i) and (ii). The proof of (iii) is similar to that of Lemma 4.1 (iii), in particular \(\textbf{v}> \textbf{b}_{q_0,q_1}\) implies that \(\textbf{v}\) is a quasi-lazy \((q_0,q_1)\)-expansion, thus \(\tilde{\pi }_{q_0,q_1}(\textbf{v}) < \frac{1}{q_0}\), i.e., \(\tilde{f}_{\textbf{v}}(q_0,q_1) < 0\). \(\square \)

Next we study \(g_{\textbf{u}}, \tilde{g}_{\textbf{v}}\) as functions of \(\textbf{u},\textbf{v}\).

Lemma 4.3

Let \(q_0 > 1\). Then the map

$$\begin{aligned} g_{\cdot }(q_0):\, \{\textbf{u}\in W :\, q_{\textbf{u}} > q_0\} \rightarrow \big (1,\tfrac{q_0}{q_0-1}\big ), \quad \textbf{u}\mapsto g_{\textbf{u}}(q_0), \end{aligned}$$

is a continuous order-preserving bijection, and the map

$$\begin{aligned} \tilde{g}_{\cdot }(q_0):\, \tilde{W} \rightarrow \big (1,\tfrac{q_0}{q_0-1}\big ), \quad \textbf{u}\mapsto \tilde{g}_{\textbf{u}}(q_0), \end{aligned}$$

is a continuous order-reversing bijection.

Proof

Let \(\textbf{u}, \textbf{u}' \in W\) with \(\textbf{u}> \textbf{u}'\) and \(q_{\textbf{u}}, q_{\textbf{u}'} > q_0\). By Lemma 4.1 (iii), we have \(\textbf{u}= \textbf{a}_{q_0,g_{\textbf{u}}(q_0)}\) and thus \(g_{\textbf{u}}(q_0) > g_{\textbf{u}'}(q_0)\), hence \(g_{\cdot }(q_0)\) is order-preserving and thus injective. The map \(g_{\cdot }(q_0)\) is surjective because, for each \(q_1 \in (1,\frac{q_0}{q_0-1})\), we have \(\textbf{a}_{q_0,q_1} \in W\) and \(g_{\textbf{a}_{q_0,q_1}}(q_0) = q_1\). The continuity of \(g_{\cdot }(q_0)\) follows from the monitonicity and surjectivity. The proof for \(\tilde{g}_{\cdot }(q_0)\) runs along the same lines. \(\square \)

Recall that \(\mu _{\textbf{u},\textbf{v}}\) is defined as the unique solution \(q_0 > 1\) of \(g_{\textbf{u}}(q_0) = \tilde{g}_{\textbf{v}}(q_0)\), if this equation has a unique solution \(>1\). The following proposition shows that \(\mu _{\textbf{u},\textbf{v}}\) is well defined in all cases that are interesting to us. Recall that limit words of primitive \(\varvec{\sigma }\in \{L,R\}^\infty \) are Sturmian sequences.

Lemma 4.4

Let \(\textbf{u}, \textbf{v}\in \sigma M(\{0,1\}^\infty )\), \(\sigma \in \{L,R\}^*\), such that \(\textbf{u}\in W\), \(\textbf{v}\in \tilde{W}\), or \(\textbf{u}= \varvec{\sigma }(\overline{0})\), \(\textbf{v}= \varvec{\sigma }(\overline{1})\) with primitive \(\varvec{\sigma }\in \{L,R\}^\infty \). Then \(g_{\textbf{u}}(x) = \tilde{g}_{\textbf{v}}(x)\) for a unique \(x > 1\). We have \(g_{\textbf{u}}(x) > \tilde{g}_{\textbf{v}}(x)\) for all \(x \in (1, \mu _{\textbf{u},\textbf{v}})\), \(g_{\textbf{u}}(x) < \tilde{g}_{\textbf{v}}(x)\) for all \(x > \mu _{\textbf{u},\textbf{v}}\).

Proof

Note that \(\varvec{\sigma }(\overline{0}) \in W\), \(\varvec{\sigma }(\overline{1}) \in \tilde{W}\) for all primitive \(\varvec{\sigma }\in \{L,R\}^\infty \) by Lemma 3.5. Therefore, by Lemmas 4.1 and 4.2, \(g_{\textbf{u}}(x)\) and \(\tilde{g}_{\textbf{v}}(x)\) are continuous functions with

$$\begin{aligned} \lim _{q_0\rightarrow 1} (g_{\textbf{u}}(q_0)-\tilde{g}_{\textbf{v}}(q_0)) = \infty \quad \text {and} \quad g_{\textbf{u}}(q_0) - \tilde{g}_{\textbf{v}}(q_0) < 0 \quad \text {for all}\ q_0 \ge q_{\textbf{u}}. \end{aligned}$$

Moreover, the functions are differentiable on \((1,q_{\textbf{u}})\), with

$$\begin{aligned} g_{\textbf{u}}'(x) = - \frac{\frac{\partial }{\partial x}f_{\textbf{u}}(x, g_{\textbf{u}}(x))}{\frac{\partial }{\partial y}f_{\textbf{u}}(x, g_{\textbf{u}}(x))}, \quad \tilde{g}_{\textbf{v}}'(x) = - \frac{\frac{\partial }{\partial x}\tilde{f}_{\textbf{v}}(x, \tilde{g}_{\textbf{v}}(x))}{\frac{\partial }{\partial y}\tilde{f}_{\textbf{v}}(x, \tilde{g}_{\textbf{v}}(x))}. \end{aligned}$$

Therefore, it suffices to show that \(g_{\textbf{u}}'(x) < \tilde{g}_{\textbf{v}}'(x)\) whenever \(g_{\textbf{u}}(x)=\tilde{g}_{\textbf{v}}(x)\), i.e.,

$$\begin{aligned} \frac{\partial }{\partial x}f_{\textbf{u}}(x,y) \frac{\partial }{\partial y}\tilde{f}_{\textbf{v}}(x,y) - \frac{\partial }{\partial y}f_{\textbf{u}}(x,y) \frac{\partial }{\partial x}\tilde{f}_{\textbf{v}}(x,y) > 0 \end{aligned}$$
(4.1)

whenever \(f_{\textbf{u}}(x,y) = 0 = \tilde{f}_{\textbf{v}}(x,y)\), \(1< x < q_{\textbf{u}}\), \(y > 1\).

Write

$$\begin{aligned} \sup \nolimits _0(\textbf{u}) = 010^{n_1}10^{n_2-n_1}10^{n_3-n_2}\ldots \quad \text {and} \quad \inf \nolimits _1(\textbf{v}) = 101^{\tilde{n}_1}01^{\tilde{n}_2-\tilde{n}_1}01^{\tilde{n}_3-\tilde{n}_2}\ldots \end{aligned}$$

with \(0 \le n_1 \le n_2 \le \ldots \), \(0 \le \tilde{n}_1 \le \tilde{n}_2 \le \ldots \). Then we have

$$\begin{aligned} f_{\textbf{u}}(x,y) = 1-x + \sum _{k=1}^\infty \frac{1}{y^kx^{n_k}}, \quad \tilde{f}_{\textbf{v}}(x,y) = 1-y+ \sum _{k=1}^\infty \frac{1}{x^ky^{\tilde{n}_k}}, \end{aligned}$$

hence (4.1) means that

$$\begin{aligned} \bigg (1 + \sum _{k=1}^\infty \frac{n_k}{y^kx^{n_k+1}}\bigg ) \bigg (1 + \sum _{\ell =1}^\infty \frac{\tilde{n}_\ell }{x^\ell y^{\tilde{n}_\ell +1}}\bigg ) - \sum _{k=1}^\infty \frac{k}{y^{k+1}x^{n_k}}\, \sum _{\ell =1}^\infty \frac{\ell }{x^{\ell +1}y^{\tilde{n}_\ell }} > 0.\nonumber \\ \end{aligned}$$
(4.2)

When \(f_{\textbf{u}}(x,y) = 0 = \tilde{f}_{\textbf{v}}(x,y)\), we have \(\frac{1}{x-1} \sum _{k=1}^\infty \frac{1}{y^kx^{n_k}} = 1 = \frac{1}{y-1} \sum _{\ell =1}^\infty \frac{1}{x^\ell y^{\tilde{n}_\ell }}\). Inserting this into (4.2) and multiplying by xy gives the inequality

$$\begin{aligned} \sum _{k=1}^\infty \sum _{\ell =1}^\infty \frac{\big (n_k+\frac{x}{x-1}\big ) \big (\tilde{n}_\ell +\frac{y}{y-1}\big ) - k\,\ell }{x^{n_k+\ell }y^{k+\tilde{n}_\ell }} > 0. \end{aligned}$$
(4.3)

Let \(\textrm{f}_0, \textrm{f}_1\) be the frequencies of the letters 0 and 1 in \(\textbf{u}\) and \(\textbf{v}\). These frequencies exist for Sturmian words, and for \(\sigma M(\{0,1\}^\infty )\), \(\sigma \in \{L,R\}^*\), we have \(\frac{\textrm{f}_0}{\textrm{f}_1} = \frac{|\sigma (10)|_0}{|\sigma (10)|_1}\), where \(|w|_i\) denotes the number of occurrences of the letter i in w. We show that

$$\begin{aligned} n_k + 1 \ge \frac{\textrm{f}_0}{\textrm{f}_1} k \quad \text {for all}\ k \ge 1. \end{aligned}$$
(4.4)

If \(\textbf{u}= \varvec{\sigma }(\overline{0})\) for primitive \(\varvec{\sigma }\in \{L,R\}^\infty \) or \(\textbf{u}= \sigma M(\overline{0})\), \(\sigma \in \{L,R\}^*\), then \(\textbf{u}\) is a mechanical word with slope \(\textrm{f}_1\); see e.g. [35, Sections 2.1.2 and 2.2.2] and note that \(M(\overline{0}) = R(\overline{0})\). Since \(\textbf{u}= \sup \nolimits _0(\textbf{u})\), we have \(\textbf{u}= (\lceil m \textrm{f}_1 \rceil {-} \lceil (m{-}1) \textrm{f}_1 \rceil )_{m\ge 0}\). There are k ones among the first \(n_k{+}k{+}1\) letters of \(\textbf{u}\), hence \(\sum _{m=0}^{n_k+k} (\lceil m \textrm{f}_1 \rceil {-} \lceil (m{-}1) \textrm{f}_1 \rceil ) = \lceil (n_k{+}k) \textrm{f}_1 \rceil = k\), i.e., \(\lceil n_k \textrm{f}_1 - k \textrm{f}_0 \rceil = 0\). Since \(n_k\) is the maximal integer with this property, we obtain that \(n_k = \lfloor \frac{\textrm{f}_0}{\textrm{f}_1} k\rfloor \), thus (4.4) holds.

If \(\textbf{u}= i_0i_1\ldots = \sigma M(j_0j_1\ldots )\), \(\sigma \in \{L,R\}^*\), then consider \(k = h |\sigma (01)|_1 {+} \ell \), \(h \ge 0\), \(0 \le \ell <|\sigma (01)|_1\). Now, there are \(\ell \) ones among the first \(n_k{+}k{+}1{-}h|\sigma (01)|\) letters of \(\sigma M(j_h)\). If \(j_h = 0\), then we get\(\lceil (n_k{+}k{-}h|\sigma (01)|) \textrm{f}_1 \rceil = \ell \), i.e., \(\lceil (n_k{+}k) \textrm{f}_1 \rceil = \ell {+} h\, |\sigma (01)|_1 = k\), thus \(n_k = \lfloor \frac{\textrm{f}_0}{\textrm{f}_1} k\rfloor \). If \(j_h = 1\), then \(\sigma M(\overline{1}) = (\lfloor m \textrm{f}_1 \rfloor {-} \lfloor (m{-}1) \textrm{f}_1 \rfloor )_{m \ge 0}\) implies that \(\sum _{m=0}^{n_k+k-h|\sigma (01)|} (\lfloor m \textrm{f}_1 \rfloor {-} \lfloor (m{-}1) \textrm{f}_1 \rfloor ) = \lfloor (n_k{+}k{-}h|\sigma (01)|) \textrm{f}_1 \rceil + 1 = \ell \), i.e., \(\lfloor n_k \textrm{f}_1 - k \textrm{f}_0 \rfloor = -1\), thus \(n_k = \lceil \frac{\textrm{f}_0}{\textrm{f}_1} k\rceil {-} 1\). Therefore, (4.4) holds also in this case.

By symmetry, we get that \(\tilde{n}_\ell + 1 \ge \frac{\textrm{f}_1}{\textrm{f}_0} \ell \) for all \(\ell \ge 1\), thus

$$\begin{aligned} \big (n_k+\tfrac{x}{x-1}\big ) \big (\tilde{n}_\ell +\tfrac{y}{y-1}\big ) > (n_k+1) (\tilde{n}_\ell +1) \ge k\, \ell . \end{aligned}$$

This proves (4.3), thus (4.2) and (4.1), which concludes the proof of the lemma. \(\square \)

Before proving the main results, we show that the formulas for \(\mathcal {G}(q_0)\) in (2.1) and for \(\mathcal {K}(q_0)\) in (2.2) cover all \(q_0 > 1\).

Lemma 4.5

We have the partitions

$$\begin{aligned} (1, \infty )&= \bigcup _{\sigma \in \{L,R\}^*M} [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}] \ \cup \hspace{-1em} \bigcup _{\varvec{\sigma }\in \{L,R\}^\infty \,\text {primitive}} \hspace{-1em} \{\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\}, \end{aligned}$$
(4.5)
$$\begin{aligned} (1, \infty )&= \bigcup _{\begin{array}{c} \varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\,\text {or} \\ \varvec{\sigma }\in \{L,M,R\}^\infty \,\text {primitive} \end{array}} [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}], \end{aligned}$$
(4.6)

with \(\mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})} < \mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}\) if \(\varvec{\sigma }< \varvec{\tau }\).

Proof

For \(q_0 > 1\), \(\varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\) or primitive \(\varvec{\sigma }\in \{L,M,R\}^\infty \), we have

$$\begin{aligned} \begin{aligned}&q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}] \ \Longleftrightarrow \ g_{\varvec{\sigma }(\overline{0})}(q_0) \le \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0),\ g_{\varvec{\sigma }(0\overline{1})}(q_0) \ge \tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0) \\&\qquad \Longleftrightarrow \ [g_{\varvec{\sigma }(\overline{0})}(q_0), g_{\varvec{\sigma }(0\overline{1})}(q_0)] \cap [\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0), \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)] \ne \emptyset . \end{aligned} \end{aligned}$$

by Lemma 4.4 and since \(\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0) > 1\). Lemmas 3.7 and 4.3 give the partitions

$$\begin{aligned} \big (1,\tfrac{q_0}{q_0-1}\big ) \ = \hspace{-3em} \bigcup _{\begin{array}{c} \varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\,\text {or} \\ \varvec{\sigma }\in \{L,M,R\}^\infty \,\text {primitive} \end{array}} \hspace{-3em} \big ([g_{\varvec{\sigma }(\overline{0})}(q_0), g_{\varvec{\sigma }(0\overline{1})}(q_0)] \setminus \{1\}\big ) \ = \hspace{-3em} \bigcup _{\begin{array}{c} \varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\,\text {or} \\ \varvec{\sigma }\in \{L,M,R\}^\infty \,\text {primitive} \end{array}} \hspace{-3em} [\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0), \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)], \end{aligned}$$

with \(g_{\varvec{\sigma }(0\overline{1})}(q_0) < g_{\varvec{\tau }(\overline{0})}(q_0)\) (if \(g_{\varvec{\tau }(\overline{0})}(q_0) > 1\)) and \(\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0) > \tilde{g}_{\varvec{\tau }(1\overline{0})}(q_0)\) when \(\varvec{\sigma }< \varvec{\tau }\). Therefore, there is a unique \(\varvec{\sigma }\) such that the intervals \([g_{\varvec{\sigma }(\overline{0})}(q_0), g_{\varvec{\sigma }(0\overline{1})}(q_0)]\) and \([\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0), \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)]\) overlap, hence (4.6) is a partition. If \(\varvec{\sigma }< \varvec{\tau }\), then we have

$$\begin{aligned} g_{\varvec{\sigma }(0\overline{1})}(\mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})})< g_{\varvec{\tau }(\overline{0})}(\mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}) = \tilde{g}_{\varvec{\tau }(1\overline{0})}(\mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}) < \tilde{g}_{\varvec{\sigma }(\overline{1})}(\mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}) \end{aligned}$$

by Lemma 4.3, thus \(\mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})} < \mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}\) by Lemma 4.4.

To see that (4.5) is a partition, it suffices to note that merging all intervals \([\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}]\) in (4.6) such that \(\varvec{\sigma }\) starts with the same \(\sigma \in \{L,R\}^*M\) gives the interval \([\mu _{\sigma \overline{L}(\overline{0}),\sigma \overline{L}(1\overline{0})}, \mu _{\sigma \overline{R}(0\overline{1}),\sigma \overline{R}(\overline{1})}] = [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}]\). \(\square \)

5 Proof of the main results

In this section, we prove Theorems 2.12.3. We start with Theorem 2.2.

Proposition 5.1

For \(q_0 > 1\), we have

$$\begin{aligned} \mathcal {K}(q_0) = {\left\{ \begin{array}{ll}\tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}], \\ {} &{} \varvec{\sigma }\in \{L,M,R\}^*M\overline{L}{} { or}\varvec{\sigma }\in \{L,M,R\}^\infty \text {primitive}, \\ g_{\varvec{\sigma }(\overline{0})}(q_0) &{} \text {if}\ q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}], \\ {} &{} \varvec{\sigma }\in \{L,M,R\}^*M\overline{R}\,\, \text {or} \,\,\varvec{\sigma }\in \{L,M,R\}^\infty \text {primitive},\end{array}\right. } \end{aligned}$$
(5.1)

which is equivalent to (2.2), Moreover, \(\mathcal {K}(q_0)\) is the unique \(q_1\in (1, \frac{q_0}{q_0-1}\big )\) such that \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\).

Proof

We show first that \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\), \(q_0 > 1\), \(q_1\in (1, \frac{q_0}{q_0-1}\big )\), implies that \(q_1 = \mathcal {K}(q_0)\). Indeed, let \(\varvec{\sigma }= s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\). For \(q'_1 \in \big (q_1,\frac{q_0}{q_0-1}\big )\), we have \(\textbf{a}_{q_0, q_1'} > \textbf{a}_{q_0, q_1}\) and \(\textbf{b}_{q_0, q_1'} < \textbf{b}_{q_0, q_1}\) by Lemma 3.3, thus \(s(\textbf{b}_{q_0,q'_1}) \le \varvec{\sigma }\le s(\textbf{a}_{q_0,q'_1})\). At least one of the inequalities is strict since \(\varvec{\sigma }(\overline{0}) \,{=}\, \varvec{\sigma }(0\overline{1})\) if \(\varvec{\sigma }\) is primitive or ends with \(\overline{R}\), \(\varvec{\sigma }(1\overline{0}) \,{=}\, \varvec{\sigma }(\overline{1})\) if \(\varvec{\sigma }\) is primitive or ends with \(\overline{L}\), hence \(U_{q_0,q'_1}\) is uncountable by Lemma 3.4 (iii) and Proposition 3.8. Similarly, we obtain for \(q'_1 \in (1,q_1)\) that \(s(\textbf{a}_{q_0,q'_1}) < s(\textbf{b}_{q_0,q'_1})\) and \(U_{q_0,q'_1}\) is countable. This proves that \(q_1 = \mathcal {K}(q_0)\). In particular, there is at most one \(q_1\in (1, \frac{q_0}{q_0-1}\big )\) with \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\).

Next we show that \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\) for \(q_1\) as in (5.1). Let \(\varvec{\sigma }\in \{L,M,R\}^*M\overline{R}\) or \(\varvec{\sigma }\in \{L,M,R\}^\infty \) primitive, \(q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}]\), \(q_1 = g_{\varvec{\sigma }(\overline{0})}(q_0)\). Then \(\textbf{a}_{q_0, q_1} = \varvec{\sigma }(\overline{0})\) by Lemma 4.1, hence \(s(\textbf{a}_{q_0, q_1}) = \varvec{\sigma }\). Since \(q_0 \ge \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}\), we have \(q_1 \le \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)\) by Lemma 4.4, hence \(\textbf{b}_{q_0,q_1} \ge \varvec{\sigma }(1\overline{0})\) by Lemmas 3.3 and 4.2. Similarly, \(q_0 \le \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) implies that \(\textbf{b}_{q_0,q_1} \le \varvec{\sigma }(\overline{1})\), thus \(s(\textbf{b}_{q_0,q_1}) = \varvec{\sigma }\). By symmetry, we obtain that \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\) for \(q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}]\), \(q_1 = \tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0)\), \(\varvec{\sigma }\in \{L,M,R\}^*M\overline{L}\) or \(\varvec{\sigma }\in \{L,M,R\}^\infty \) primitive. Therefore, (5.1) holds.

By Lemma 4.5, the cases in (5.1) cover all \(q_0 > 1\), thus \(\mathcal {K}(q_0)\) is the unique \(q_1\in (1, \frac{q_0}{q_0-1}\big )\) such that \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0, q_1})\). Using (3.5) and that \(\varvec{\sigma }(\overline{0}) = \varvec{\sigma }(0\overline{1})\), \(\varvec{\sigma }(\overline{1}) = \varvec{\sigma }(1\overline{0})\) for primitive \(\varvec{\sigma }\), we obtain that (5.1) is equivalent to (2.2). \(\square \)

Proposition 5.2

For \(q_0 > 1\), \(\mathcal {G}(q_0)\) is the unique \(q_1 \in (1, \frac{q_0}{q_0-1})\) such that

$$\begin{aligned} \begin{aligned}&\textbf{a}_{q_0,q_1} \,{=}\, \sigma (\overline{0}), \sigma (1\overline{0}) \,{\le }\, \textbf{b}_{q_0,q_1} \,{\le }\, \sigma (\overline{1}), \, \text {or} \ \sigma (\overline{0}) \,{\le }\, \textbf{a}_{q_0,q_1} \,{\le }\, \sigma (1\overline{0}), \textbf{b}_{q_0,q_1} \,{=}\, \sigma (\overline{1}), \\&\sigma \in \{L,R\}^*M, \, \text {or} \ \textbf{a}_{q_0,q_1} \,{=}\, \varvec{\sigma }(\overline{0}), \textbf{b}_{q_0,q_1} \,{=}\, \varvec{\sigma }(\overline{1}),\, \varvec{\sigma }\in \{L,R\}^\infty \ \text {primitive}. \end{aligned}\nonumber \\ \end{aligned}$$
(5.2)

Moreover, (2.1) holds.

Proof

If \(q_0 > 1\), \(q_1\in (1, \frac{q_0}{q_0-1}\big )\) satisfy (5.2), then \(V_{q_0,q_1} \ne \{\overline{0}, \overline{1}\}\) by Theorem 2.5, thus \(U_{q_0,q'_1} \ne \{\overline{0}, \overline{1}\}\) for all \(q'_1 \in (q_1,\frac{q_0}{q_0-1})\) by Lemma 3.3; for all \(q'_1 \in (1,q_1)\), we have, by Lemma 3.3, \(\textbf{a}_{q_0,q'_1} < \sigma (\overline{0})\) or \(\textbf{b}_{q_0,q'_1} > \sigma (\overline{1})\), or \(\textbf{a}_{q_0,q'_1} < \varvec{\sigma }(\overline{0})\), \(\textbf{b}_{q_0,q'_1} > \varvec{\sigma }(\overline{1})\), thus \(V_{q_0,q_1} = \{\overline{0}, \overline{1}\}\) by Theorem 2.5. (In case of primitive \(\varvec{\sigma }\), we use that \(s(\textbf{a}_{q_0,q'_1}) < \varvec{\sigma }\), thus \(\textbf{a}_{q_0,q'_1} \le \sigma _1 \ldots \sigma _n M(0\overline{1})\) and \(\textbf{b}_{q_0,q'_1} > \sigma _1 \ldots \sigma _n M(\overline{1})\), where n is the largest integer such that \(s(\textbf{a}_{q_0,q'_1})\) starts with \(\sigma _1,\dots ,\sigma _n\).) This means that \(q_1 = \mathcal {G}(q_0)\).

Similarly to the proof of Proposition 5.1, each \(q_1\) as in (2.1) satisfies (5.2), thus (2.1) holds. Since the cases in (2.1) cover all \(q_0 > 1\) by Lemma 4.5, \(\mathcal {G}(q_0)\) is the unique \(q_1\in (1, \frac{q_0}{q_0-1}\big )\) satisfying (5.2). \(\square \)

Next, we prove statement i) of Theorem 2.1.

Proposition 5.3

The functions \(\mathcal {G}\) and \(\mathcal {K}\) are continuous, strictly decreasing on \((1,\infty )\), and almost everywhere differentiable.

Proof

For all \(\varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\), the function \(\mathcal {K}\) is continuous, strictly decreasing and differentiable on \([\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}]\) by Proposition 5.1, Lemmas 4.1 and 4.2, and the proof of Lemma 4.4; here, the properties are to be understood one-sided at the endpoints of the interval. For left-sided properties at \(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}\), \(\varvec{\sigma }\in \{L,M,R\}^*M\{\overline{L},\overline{R}\}\) or \(\varvec{\sigma }\in \{L,M,R\}^\infty \) primitive, consider \(q_0 \in [\mu _{\varvec{\tau }(\overline{0}),\varvec{\tau }(1\overline{0})}, \mu _{\varvec{\tau }(0\overline{1}),\varvec{\tau }(\overline{1})}]\) with \(\varvec{\tau }< \varvec{\sigma }\). We have

$$\begin{aligned} \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)< \tilde{g}_{\varvec{\tau }(\overline{1})}(q_0) \le g_{\varvec{\tau }(0\overline{1})}(q_0) < g_{\varvec{\sigma }(\overline{0})}(q_0) \end{aligned}$$

by Lemmas 4.3 and 4.4, \(\mathcal {K}(q_0) \in \{g_{\varvec{\tau }(0\overline{1})}(q_0), \tilde{g}_{\varvec{\tau }(\overline{1})}(q_0)\}\) by Proposition 5.1, thus

$$\begin{aligned} \tilde{g}_{\varvec{\sigma }(1\overline{0})}(q_0)< \mathcal {K}(q_0) < g_{\varvec{\sigma }(\overline{0})}(q_0) \quad \text {for all}\ q_0 \in (1, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}). \end{aligned}$$

Since \(\tilde{g}_{\varvec{\sigma }(1\overline{0})}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}) = g_{\varvec{\sigma }(\overline{0})}(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})})\) and \(\tilde{g}_{\varvec{\sigma }(1\overline{0})}\), \(g_{\varvec{\sigma }(\overline{0})}\) are continuous and strictly decreasing, \(\mathcal {K}\) is left-sided continuous and strictly decreasing at \(\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}\). Symmetrically, we obtain that

$$\begin{aligned} g_{\varvec{\sigma }(0\overline{1})}(q_0)< \mathcal {K}(q_0) < \tilde{g}_{\varvec{\sigma }(\overline{1})}(q_0) \quad \text {for all}\ q_0 > \mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}, \end{aligned}$$

thus \(\mathcal {K}\) is right-sided continuous and strictly decreasing at \(\mu _{\varvec{\sigma }(0\overline{1}),\varvec{\sigma }(\overline{1})}\). Therefore, \(\mathcal {K}\) is continuous and strictly decreasing on \((1,\infty )\). The almost everywhere differentiability follows from the monotonicity by a theorem of Lebesgue; see e.g. [41, p. 5].

The proof for the function \(\mathcal {G}\) runs along the same lines. \(\square \)

Proposition 5.4

The statements (ii)–(iii) of Theorem 2.1 and the statement (i)) of Theorem 2.3 are true.

Proof

The functions \(\mathcal {G}\) and \(\mathcal {K}\) are involutions because of the bijection between \(U_{q_0,q_1}\) and \(U_{q_1,q_0}\) given in Lemma 3.1.

To get an upper bound for \(\mathcal {G}\), let \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (\overline{0}),\sigma (\overline{1})}]\), \(\sigma \in \{L,R\}^*M\). Then \(\sigma (0) = 01w\) and \(\sigma (1) = 10w\) for some word w. (This is true for \(\sigma = M\); if it holds for \(\sigma \), then it also holds for \(L\sigma \) and \(R\sigma \).) This implies that \(\sigma (\overline{0}) = 01\textbf{u}\) and \(\sigma (1\overline{0}) = 10\textbf{u}\), with \(\textbf{u}= \overline{w01}\). For \(q_1 = \mathcal {G}(q_0) = g_{\sigma (\overline{0})}(q_0)\), we get that

$$\begin{aligned} q_0 = q_0 q_1 \pi _{q_0,q_1}(\sigma (\overline{0})) = 1 + \pi _{q_0,q_1}(\textbf{u}). \end{aligned}$$
(5.3)

Since \(q_1 = g_{\sigma (\overline{0})}(q_0) \le \tilde{g}_{\sigma (1\overline{0})}(q_0)\), we have \(\tilde{f}_{\sigma (1\overline{0})}(q_0,q_1) \ge 0\) by Lemma 4.2 (i), thus

$$\begin{aligned} q_1 \le q_0 q_1\, \tilde{\pi }_{q_0,q_1}(\sigma (1\overline{0})) = 1 + \tilde{\pi }_{q_0,q_1}(\textbf{u}). \end{aligned}$$
(5.4)

By (5.3), (5.4), and (3.2), we obtain that

$$\begin{aligned} 2\, (q_0-1) (q_1-1) \le (q_1-1)\, \pi _{q_0,q_1}(\textbf{u}) + (q_0-1)\, \tilde{\pi }_{q_0,q_1}(\textbf{u}) = 1, \end{aligned}$$

with equality if and only if \(q_1 = \tilde{g}_{\sigma (1\overline{0})}(q_0)\), i.e., \(q_0 = \mu _{\sigma (\overline{0}),\sigma (1\overline{0})}\). The case \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (\overline{1})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}]\) is symmetric, with \((q_0{-}1) (\mathcal {G}(q_0){-}1) = \frac{1}{2}\) if and only if \(q_0 = \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}\). If \(q_0 \,{=}\, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for a primitive \(\varvec{\sigma }\,{\in }\, \{L,R\}^\infty \), then \((q_0{-}1) (\mathcal {G}(q_0){-}1) \,{=}\, \frac{1}{2}\) by continuity or by using that \(\varvec{\sigma }(\overline{0}) = 01\textbf{u}\), \(\varvec{\sigma }(\overline{1}) = 10\textbf{u}\) for some \(\textbf{u}\in \{0,1\}^\infty \).

Next, we prove lower bounds for \(\mathcal {G}\). For \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\), primitive \(\varvec{\sigma }\in \{L,R\}^\infty \), we have \((q_0{-}1) (\mathcal {G}(q_0){-}1) \,{=}\, \frac{1}{2} \,{>}\, \max \{\frac{1}{q_0+1}, \frac{1}{\mathcal {G}(q_0)+1}\}\). If \(q_0 \,{\in }\, [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}]\), \(\sigma \in \{L,R\}^*M\), \(q_1 \,{=}\, \mathcal {G}(q_0)\), then we have \(q_1 \,{\ge }\, g_{\sigma (\overline{0})}(q_0)\) and \(q_1 \,{\ge }\, \tilde{g}_{\sigma (\overline{1})}(q_0)\), thus

$$\begin{aligned} q_0 \ge q_0 q_1 \pi _{q_0,q_1}(\sigma (\overline{0})) = 1 + \pi _{q_0,q_1}(\overline{w01}), \quad q_1 \ge q_0 q_1\, \tilde{\pi }_{q_0,q_1}(\sigma (\overline{1}))\\ = 1 + \tilde{\pi }_{q_0,q_1}(\overline{w10}) \end{aligned}$$

for some w. We have \(\overline{w01} \ge \overline{0w1}\), thus \(\pi _{q_0,q_1}(\overline{w01}) \ge \pi _{q_0,q_1}(\overline{0w1})\) by Lemma 3.2; note that \(\overline{w01}\) is a quasi-greedy \((q_0,q_1)\)-expansion because \(\sigma (\overline{0})\) is quasi-greedy, that \(\sigma (\overline{0})\) ends with \(\sigma (\overline{1})\) because \(M(\overline{0}) = \overline{01}\), \(M(\overline{1}) = \overline{10}\), thus \(\overline{0w1}\) is also quasi-greedy. Hence, we have \(q_0 {-} 1 \ge \pi _{q_0,q_1}(\overline{0w1}) = q_0\, \pi _{q_0,q_1}(\overline{w10})\), thus \((q_0{+}1) (q_0{-}1) (q_1{-}1) \ge 1\). Now, equality holds if and only if \(q_0 = \mu _{\sigma (\overline{0}),\sigma (\overline{1})}\) and \(w01 = 0w1\), i.e., \(w = 0^k\) for some \(k \ge 0\), which means that \(\sigma = L^kM\). By Example 2.4, we have \(q_0 = \mu _{L^kM(\overline{0}),L^kM(\overline{1})}\) if and only if \(q_0^{k+2} = q_0+1\). Since \(\mathcal {G}(q_1) = q_0\) for \(q_1 = \mathcal {G}(q_0)\), we also have \((q_1{+}1) (q_0{-}1) (q_1{-}1) \ge 1\), with equality if and only if \(q_1^{k+2} = q_1+1\), \(k \ge 0\); note that \((q_0{-}1)(q_1^2{-}1) = 1\) means that \(q_0 = \frac{q_1^2}{q_1^2-1}\).

For a lower bound on \(\mathcal {K}\), let \(q_0 \in [\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(1\overline{0})}, \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}]\), \(\varvec{\sigma }\in \{L,M,R\}^*M\overline{R}\) or \(\varvec{\sigma }\in \{L,M,R\}^\infty \) primitive, \(q_1 = \mathcal {K}(q_0) = g_{\varvec{\sigma }(\overline{0})}(q_0)\). For \(\sigma \in \{L,M,R\}^* M\), we have \(\sigma (0) = 01v\), \(\sigma (1) = 10w\) for words \(v \ge w\), with \(v = w\) if and only if \(\sigma \in \{L,R\}^* M\). This implies that \(\varvec{\sigma }(\overline{0}) = 01\textbf{u}\), \(\varvec{\sigma }(\overline{1}) = 10\textbf{v}\) with \(\textbf{u}\ge \textbf{v}\), and \(\textbf{u}= \textbf{v}\) if and only if \(\varvec{\sigma }\in \{L,R\}^*M\overline{R}\) or \(\varvec{\sigma }\in \{L,R\}^\infty \). From \(q_1 = g_{\varvec{\sigma }(\overline{0})}(q_0) \ge \tilde{g}_{\sigma (1\overline{0})}(q_0)\), we get that

$$\begin{aligned} q_0 = q_0 q_1 \pi _{q_0,q_1}(\varvec{\sigma }(\overline{0})) = 1 + \pi _{q_0,q_1}(\textbf{u}), \quad q_1 \ge q_0 q_1\, \tilde{\pi }_{q_0,q_1}(\varvec{\sigma }(\overline{1})) = 1 + \tilde{\pi }_{q_0,q_1}(\textbf{v}). \end{aligned}$$

Since \(\varvec{\sigma }(\overline{0})\) is a quasi-greedy \((q_0,q_1)\)-expansion and \(\varvec{\sigma }(\overline{1}) \in X_{\varvec{\sigma }(\overline{0})}\), \(\varvec{\sigma }(\overline{1})\) is also quasi-greedy, thus \(\pi _{q_0,q_1}(\textbf{u}) \ge \pi _{q_0,q_1}(\textbf{v})\) by Lemma 3.2. This implies \(2 (q_0{-}1) (q_1{-}1) \ge 1\), with equality if and only if \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\), \(\varvec{\sigma }\in \{L,R\}^*M\overline{R}\) or \(\varvec{\sigma }\in \{L,R\}^\infty \). By symmetry, we have \((q_0{-}1) (q_1{-}1) \ge \frac{1}{2}\) for all \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (01\overline{0}),\sigma (1\overline{0})}]\), \(\sigma \in \{L,M,R\}^*M\), with equality if and only if \(q_0 = \mu _{\sigma (\overline{0}),\sigma (1\overline{0})}\), \(\sigma \in \{L,R\}^*M\).

We have shown that \((q_0{-}1) (\mathcal {G}(q_0){-}1) = \frac{1}{2}\) if and only if \((q_0{-}1) (\mathcal {K}(q_0){-}1) = \frac{1}{2}\), and \((q_0{-}1) (\mathcal {G}(q_0){-}1)< \frac{1}{2} < (q_0{-}1) (\mathcal {K}(q_0){-}1)\) otherwise, thus \(\mathcal {G}(q_0) = \mathcal {K}(q_0)\) if and only if \(\mathcal {G}(q_0)\) or \(\mathcal {K}(q_0)\) equals \(\frac{2q_0-1}{2(q_0-1)}\).

The upper bounds for \(\mathcal {K}\) are proved similarly to the lower bounds for \(\mathcal {G}\). Let \(q_1 = \mathcal {K}(q_0)\). If \((q_0{-}1) (q_1{-}1) = \frac{1}{2}\), then \((q_0{-}1) (q_1{-}1) < \min \{\frac{q_0}{q_0+1}, \frac{q_1}{q_1+1}\}\). If \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}]\), \(\sigma \in \{L,R\}^*M\), then \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0,q_1})\) starts with \(\sigma \), thus \(q_1 \le g_{\sigma (0\overline{1})}(q_0)\) and \(q_1 \le \tilde{g}_{\sigma (1\overline{0})}(q_0)\), with at least one of the inequalities being strict. Since \(\sigma (0) = 01w\) and \(\sigma (1) = 10w\) for some w, we obtain that

$$\begin{aligned} q_0 \,{\le }\, q_0 q_1 \pi _{q_0,q_1}(\sigma (0\overline{1})) \,{} & {} {=}\, 1 {+} \pi _{q_0,q_1}(\overline{w10}), q_1 \,{\le }\, q_0 q_1 \tilde{\pi }_{q_0,q_1}(\sigma (1\overline{0})) \,\nonumber \\{} & {} {=}\, 1 {+} \tilde{\pi }_{q_0,q_1}(\overline{w01}). \nonumber \\ \end{aligned}$$
(5.5)

We have \(\overline{w10} \le \overline{1w0}\), and the quasi-greedy \((q_0,q_1)\)-expansion \(\sigma (\overline{0})\) ends with both words, thus \(\pi _{q_0,q_1}(\overline{w10}) \le \pi _{q_0,q_1}(\overline{1w0})\). Since \(\tilde{\pi }_{q_0,q_1}(\overline{w01}) = q_1\,\tilde{\pi }_{q_0,q_1}(\overline{1w0})\) and one of the inequalities in (5.5) is strict, (3.2) gives \((q_1{+}1) (q_0{-}1)(q_1{-}1) < q_1\). Since \(\mathcal {K}(q_1) = q_0\) for \(q_1 = \mathcal {K}(q_0)\), we also have \((q_0{+}1) (q_0{-}1)(q_1{-}1) < q_0\).

To show that the Hausdorff dimension of \(E:= \{q_0 > 1:\, \mathcal {G}(q_0) = \mathcal {K}(q_0)\}\) is zero, we proceed similarly to [10, Theorem 3]. We have already shown that

$$\begin{aligned} q_0 \in E\ \Longleftrightarrow \ \hat{\textbf{a}}_{q_0}:= \textbf{a}_{q_0,1+\frac{1}{2(q_0-1)}} \in \hspace{-1em} \bigcup _{\sigma \in \{L,R\}^*M} \hspace{-1em} \{\sigma (\overline{0}), \sigma (0\overline{1})\} \ \cup \ \hspace{-2em} \bigcup _{\varvec{\sigma }\in \{L,R\}^\infty \,\text {primitive}} \hspace{-2em} \{\varvec{\sigma }(\overline{0})\}. \end{aligned}$$

Since these words are of the form \(01\textbf{u}\) with mechanical words \(\textbf{u}\), the number of different \(i_1 \ldots i_n \in \{0,1\}^n\) such that \(\hat{\textbf{a}}_{q_0}\) starts with \(01i_1\ldots i_n\) for some \(q_0 \in E\) grows polynomially in n; see e.g. [35, Theorem 2.2.36]. We show that the size of the interval of numbers \(q_0 \in E\) such that \(\hat{\textbf{a}}_{q_0}\) starts with a given word \(01i_1\ldots i_n\) decreases exponentially in n. However, contrary to [10], this holds only locally.

Since \(T_{q_{i_n},i_n} \ldots T_{q_{i_1},,i_1}(q_0{-}1) \in [0,q_0/q_1]\) if \(\textbf{a}_{q_0,q_1}\) starts with \(01i_1\ldots i_n\), with \(T_{q,d}\) as in Sect. 3, we estimate \(T_{q'_{i_n},i_n} \ldots T_{q'_{i_1},i_1}(q'_0{-}1) - T_{q_{i_n},i_n} \ldots T_{q_{i_1},i_1}(q_0{-}1)\) for \(q_0 < q'_0\), \(q_1 = 1{+}\frac{1}{2(q_0-1)}\), \(q'_1 = 1{+}\frac{1}{2(q'_0-1)}\). Since \(q_1 > q'_1\), this is more difficult than in the single base case. We have

$$\begin{aligned} T_{q'_1,1} T_{q'_0,0}^k(y) - T_{q_1,1} T_{q_0,0}^k(x) = q'_0{\!}^k q'_1 y - q_0^k q_1 x = q'_0{\!}^k q'_1\, (y{-}x) + (q'_0{\!}^k q'_1 {-} q_0^k q_1)\, x. \end{aligned}$$

The derivative of the function \(q_0 \mapsto q_0^k (1{+}\frac{1}{2(q_0-1)})\) is \(\frac{q_0^k}{q_0{-}1} (k{-}\frac{k}{2q_0}{-}\frac{1}{2(q_0{-}1)})\), hence \(q'_0{\!}^k q'_1 {-} q_0^k q_1 = \frac{q''_0{}^k}{q''_0{-}1} (k{-}\frac{k}{2q''_0}{-}\frac{1}{2(q''_0{-}1)}) (q'_0{-}q_0)\) for some \(q''_0 \in [q_0,q'_0]\) by the mean value theorem. For \(0 \le x \le q_0{-}1\), we obtain that

$$\begin{aligned} \begin{aligned} q'_0{\!}^k q'_1 y - q_0^k q_1 x&= q'_0{\!}^k q'_1 (y-x) + \frac{q''_0{}^k}{q''_0-1} \Big (k-\frac{k}{2q''_0}-\frac{1}{2(q''_0-1)}\Big )\, (q'_0-q_0)\, x \\&\ge q'_0{\!}^k q'_1 (y-x) + \min \Big \{0, q'_0{\!}^k \Big (k - \frac{k}{2q_0} - \frac{1}{2(q_0-1)}\Big ) (q'_0-q_0)\Big \}. \end{aligned} \end{aligned}$$

Let now \(q_0, q'_0 \in [\mu _{L^kM(0\overline{1}),L^kM(\overline{1})}, \mu _{L^{k-1}M(\overline{0}),L^{k-1}M(1\overline{0})}] \cap E\), \(k \ge 1\). Then \(\hat{\textbf{a}}_{q_0}\) and \(\hat{\textbf{a}}_{q'_0}\) are images of  \(L^kR\) and thus in \(01\{0^k1,0^{k+1}1\}^\infty \). By Example 2.4, we have \(\mu _{L^kM(0\overline{1}),L^kM(\overline{1})} = 2^{1/(k+1)} \ge 1{+}\frac{2}{3k+2}\) and \(\mu _{L^{k-1}M(\overline{0}),L^{k-1}M(1\overline{0})}\) is a root of \(2X^k{-}X^{k-1}{-}2\), thus \(\mu _{L^{k-1}M(\overline{0}),L^{k-1}M(1\overline{0})} \le 1{+}\frac{3}{4k+2}\). For \(1{+}\frac{2}{3k+2} \le q_0 \le q'_0 \le 1{+}\frac{3}{4k+2}\), we have

$$\begin{aligned} q'_1 + k -\frac{k}{2q_0} - \frac{1}{2(q_0{-}1)}\ge & {} 1 + \frac{2k{+}1}{3} + k - \frac{k\,(3k{+}2)}{2\,(3k{+}4)} - \frac{3k{+}2}{4} \\= & {} \frac{(5k{+}4)(3k{+}10)}{12\,(3k{+}4)} > 1. \end{aligned}$$

For \(0 \le x \le q_0-1\), \(y-x \ge q'_0-q_0\), this implies that

$$\begin{aligned} T_{q'_1,1} T_{q'_0,0}^k(y) - T_{q_1,1} T_{q_0,0}^k(x) \ge q'_0{\!}^k \min \Big \{q'_1, \frac{(5k{+}4)(3k{+}10)}{12\,(3k{+}4)}\Big \} (y-x), \end{aligned}$$

and, similarly,

$$\begin{aligned} T_{q'_1,1} T_{q'_0,0}^{k+1}(y) - T_{q_1,1} T_{q_0,0}^{k+1}(x) \ge q'_0{\!}^{k+1} \min \Big \{q'_1, \frac{15k^2{+}80k{+}76}{12\,(3k+4)}\Big \} (y-x). \end{aligned}$$

Therefore, we have some \(\beta _k>1\), \(C_k > 0\) (depending only on k) such that

$$\begin{aligned} T_{q'_{i_n},i_n} \ldots T_{q'_{i_1},i_1}(q'_0{-}1) - T_{q_{i_n},i_n} \ldots T_{q_{i_1},i_1}(q_0{-}1) \ge C_k \beta _k^n\, (q'_0-q_0) \end{aligned}$$

for all \(i_1 \ldots i_n\) at the beginning of some word in \(\{0^k1,0^{k+1}1\}^\infty \). For \(\hat{\textbf{a}}_{q_0}, \hat{\textbf{a}}_{q'_0}\) starting with \(i_1 \ldots i_n\), we have \(T_{q'_{i_n},i_n} \ldots T_{q'_{i_1},i_1}(q'_0{-}1) - T_{q_{i_n},i_n} \ldots T_{q_{i_1},i_1}(q_0{-}1) \le q'_0/q'_1\), thus the size of the interval of those \(q_0\) is bounded by \(C'_k \beta _k^{-n}\) for some \(C'_k\). This means that \([\mu _{L^kM(0\overline{1}),L^kM(\overline{1})}, \mu _{L^{k-1}M(\overline{0}),L^{k-1}M(1\overline{0})}] \cap E\) is covered, for each n, by a polynomial number of intervals of size \(C'_k \beta _k^{-n}\), hence the Hausdorff dimension of this set is zero. Since \((1,2) \cap E\) is the union over \(k\ge 1\) of these sets, \((1,2) \cap E\) also has zero Hausdorff dimension. Finally, \((3/2,\infty ) \cap E\) is the image of \((1,2) \cap E\) by the map \(q_0 \mapsto 1{+}\frac{1}{2(q_0-1)}\), which is locally bi-Lipschitz, thus E has zero Hausdorff dimension. \(\square \)

The following proposition concludes the proof of our main results.

Proposition 5.5

The statements (v) and (vi) of Theorem 2.1 as well as the statements (ii) and (iii) of Theorem 2.3 are true.

Proof

For all \(q_1 > \mathcal {G}(q_0)\), the set \(U_{q_0,q_1}\) is infinite by Lemma 3.4 (i) and because \(U_{q_0,q_1} = \{0,1\}^\infty \) for \(q_1 > \frac{q_0}{q_0-1}\), thus Theorem 2.1 (v) holds.

Let now \(q_1 = \mathcal {G}(q_0)\). If \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for some primitive \(\varvec{\sigma }\in \{L,R\}^\infty \), then \(s(\textbf{a}_{q_0,q_1}) = \varvec{\sigma }= s(\textbf{b}_{q_0,q_1})\), hence \(V_{q_0,q_1}\) is uncountable (with zero entropy) by Proposition 3.8, thus \(U_{q_0,q_1}\) is also uncountable (with zero entropy) by Lemma 3.4. If \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (\overline{0}),\sigma (\overline{1})}]\), \(\sigma \in \{L,R\}^*M\), then \(\textbf{a}_{q_0,q_1} = \sigma (\overline{0})\), hence \(s(\textbf{a}_{q_0,q_1}) = \sigma \overline{L} \le s(\textbf{b}_{q_0,q_1})\); by the proof of Theorem 2.5, each \(\textbf{u}\in V_{q_0,q_1} \setminus \{\overline{0}, \overline{1}\}\) ends with \(\sigma (\overline{0})\) and is therefore not in \(U_{q_0,q_1}\). Similarly, we have \(U_{q_0,q_1} = \{\overline{0}, \overline{1}\}\) for \(q_0 \in [\mu _{\sigma (\overline{0}),\sigma (\overline{1})}, \mu _{\sigma (0\overline{1}),\sigma (\overline{1})}]\). We have already seen in Theorem 2.3 (i) that \(\{\mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}:\, \varvec{\sigma }\in \{L,R\}^\infty \, \text{ primitive }\}\) has zero Hausdorff dimension, thus Theorem 2.3 (ii) holds.

Consider next \(q_1 = \mathcal {K}(q_0)\). If \(q_0 \in \{\mu _{\sigma (\overline{0}),\sigma (1\overline{0})}, \mu _{\sigma (\overline{0}),\sigma (\overline{1})}\}\), \(\sigma \in \{L,R\}^*M\), then \(\mathcal {K}(q_0) = \mathcal {G}(q_0)\), thus \(U_{q_0,q_1}\) is trivial by the preceding paragraph. If \(q_0 = \mu _{\varvec{\sigma }(\overline{0}),\varvec{\sigma }(\overline{1})}\) for some primitive \(\varvec{\sigma }\in \{L,M,R\}^\infty \), then \(U_{q_0,q_1}\) is uncountable with zero entropy. In all other cases, we have \(s(\textbf{a}_{q_0,q_1}) = s(\textbf{b}_{q_0,q_1}) \in \{L,M,R\}^* \{\overline{L}, \overline{R}\}\) and \(\mathcal {K}(q_0) > \mathcal {G}(q_0)\), thus \(U_{q_0,q_1}\) is countably infinite by Proposition 3.8 and the preceding paragraph.

Finally, let \(q_1 > \mathcal {K}(q_0)\). Then \(s(\textbf{a}_{q_0,q_1}) > s(\textbf{b}_{q_0,q_1})\) by Proposition 5.1, thus \(U_{q_0, q_1}\) has positive entropy by Proposition 3.8 and Lemma 3.4 (iii). It remains to show that the Hausdorff dimension of \(\pi _{q_0, q_1}(U_{q_0, q_1})\) is positive. From the proof of Theorem 2.5, we see that \(Y:= \{\sigma (0(01)^k), \sigma (0(01)^{k+1})\}^\infty \subset U_{q_0, q_1}\) for some \(\sigma \in \{L,M,R\}^*\), \(k \ge 0\). Then \(\pi _{q_0, q_1}(Y)\) is the self-similar set generated by

$$\begin{aligned} y_0(x):= r_0\, x + \pi _{q_0, q_1}(\sigma (0(01)^k)\overline{0}), \quad y_1(x):= r_1\, x + \pi _{q_0, q_1}(\sigma (0(01)^{k+1})\overline{0}), \end{aligned}$$

with \(r_0 = q_0^{-|\sigma (0(01)^k)|_0} q_1^{-|\sigma (0(01)^k)|_1}\), \(r_1 = q_0^{-|\sigma (0(01)^{k+1})|_0} q_1^{-|\sigma (0(01)^{k+1})|_1}\). Since the elements of Y are unique \((q_0,q_1)\)-expansions, the iterated function system \(\{y_0, y_1\}\) satisfies the Open Set Condition (OSC); see e.g. [21, (9.12)] for the definition of the OSC. By applying [21, Theorem 9.3], the Hausdorff dimension of \(\pi _{q_0, q_1}(Y)\) is \(\lambda >0\), where \(\lambda \) satisfies \(r_0^\lambda + r_1^\lambda = 1\). \(\square \)

6 Open problems

We end this paper by formulating some open problems:

  1. (i)

    What is the growth rate of the number of possible prefixes of length n of Thue–Morse–Sturmian words? Is it polynomial as for Sturmian words [35, Theorem 2.2.36]? Using the proof of Proposition 5.4, this would imply that \(U_{q_0,\mathcal {K}(q_0)}\) is countably infinite for all \(q_0 > 1\) except a set of zero Hausdorff dimension, confirming the conjecture after Theorem 2.3.

  2. (ii)

    Is it possible to give a formula for the Hausdorff dimension of \(\pi _{q_0, q_1}(U_{q_0, q_1})\) (in terms of the topological entropy \(h(U_{q_0, q_1})\))? Are these functions continuous in \(q_0\) and \(q_1\)?

  3. (iii)

    For fixed \(q_0 > 1\), what are the maximal intervals (entropy plateaus) such that \(h(U_{q_0, q_1})\) is constant? We know from Theorems 2.1 that the first entropy plateau is \((1, \mathcal {K}(q_0)]\).

  4. (iv)

    For alphabet-systems \(\mathcal {S} = \{(d_0,q_0),(d_1,q_1),\ldots , (d_m, q_m)\}\) with \(m \ge 2\), what can be said about critical values?