First-Order Logic and Numeration Systems

• Émilie Charlier
Chapter
Part of the Trends in Mathematics book series (TM)

Abstract

The Büchi-Bruyère theorem states that a subset of $$\mathbb {N}^d$$ is b-recognizable if and only if it is b-definable. This result is a powerful tool for showing that many properties of b-automatic sequences are decidable. Going a step further, first-order logic can be used to show that many enumeration problems of b-automatic sequences can be described by b-regular sequences. The latter sequences can be viewed as a generalization of b-automatic sequences to integer-valued sequences. These techniques were extended to two wider frameworks: U-recognizable subsets of $$\mathbb {N}^d$$ and β-recognizable subsets of $$\mathbb {R}^d$$. In the second case, real numbers are represented by infinite words, and hence, the notion of β-recognizability is defined by means of Büchi automata. Again, logic-based characterization of U-recognizable (resp. β-recognizable) sets allows us to obtain various decidability results. The aim of this chapter is to present a survey of this very active research domain.

3.1 Introduction

In computer science and in mathematics in general, we are concerned with the following questions: How do we have sets of numbers at our disposal? How can we manipulate them? Which sets of numbers should be considered simple? In which sense? In order to approach such questions, we first need to represent numbers. The basic consideration is as follows: properties of numbers are translated into syntactical (or combinatorial) properties of their representations. This is where numeration systems come into play. For example, the famous theorem of Cobham (and Semenov for its multidimensional version) tells us that nontrivial properties of numbers are dependent on the base we choose.

In this chapter, we will consider multidimensional subsets of numbers whose sets of representations are accepted by finite automata. Representations of numbers will always be taken from one of the following families of numeration systems: the unary systems, the integer bases b ≥ 2, and, more generally, the positional numeration systems based on increasing sequences U = (U n )n≥0, the abstract numeration systems S based on regular languages, and finally the real bases β > 1. Depending on the cases, we shall refer to such sets as 1-recognizable sets, b-recognizable sets, U-recognizable sets, S-recognizable sets, and β-recognizable sets.

Many descriptions of recognizable sets were given in various works [78, 96, 113, 114, 211, 503]. Here, we focus on characterizations of recognizable subsets (first of $$\mathbb {N}^d$$ and then of $$\mathbb {R}^d$$) in terms of first-order logic. We start by presenting the Büchi-Bruyère theorem, which states that a subset of $$\mathbb {N}^d$$ is b-recognizable if and only if it is b-definable, that is, definable by a first-order formula of the structure $$\langle \mathbb {N},+,V_b\rangle$$ where V b is a base-dependent predicate (see below for formal definitions). We explain how this result turns out to be a powerful tool for showing that many properties of b-automatic sequences are decidable. We illustrate our purpose with many examples of decidable problems on b-automatic sequences. Going a step further, we show that first-order logic can also be used to prove that many enumeration problems of b-automatic sequences can be described by b-regular sequences. The latter sequences are at the core of Chapters and . First-order logic is also mentioned in Chapters and in the context of the domino problem and of Wang tiles.

In the last (and longest) part of this chapter, we give an extensive presentation of (multidimensional) β-recognizable sets of real numbers. Those sets are defined by means of Büchi automata. Again, we give a logic-based characterization of these sets and show how we can use it to obtain various decidability results. We end by showing the links between the so-called β-self-similar sets, the attractors of some (base-dependent) graph-directed iterated function systems, and certain sets recognizable by Büchi automata. Let us mention here that the numeration systems in real bases β > 1 are referred to as the main motivation of Chapter .

Besides these logic-based characterizations and their applications, we mention (usually without proofs) various results concerning recognizable sets. Among them, in the vein of Eilenberg’s result [211], we explicitly list the possible growth functions of (unidimensional) S-recognizable sets. Let us emphasize that this is done in the very general framework of abstract numeration systems and, thus, encompasses the previous known results about b-recognizable sets only. In particular, this result permits us to exclude right away a huge amount of (unidimensional) subsets from the class of S-recognizable sets, and further, it also permits us to exhibit many subsets which are never S-recognizable, that is, no matter which abstract numeration system we choose. Finally, let us mention that along the lines, we present four open problems.

3.2 Recognizable Sets of Nonnegative Integers

Finite automata may be seen as the simplest devices. They have only finite memory, and they are only able to read words and accept or reject them in the end. Regular languages, i.e., languages accepted by finite automata, form the bottom level of Chomsky–Schützenberger hierarchy. For this reason, it makes sense to consider the following definition of “simple sets” of numbers. A subset X of $$\mathbb {N}$$ is said to be recognizable with respect to a given numeration system $$\mathrm {rep}\colon \mathbb {N}\to A^*$$ if the language
\displaystyle \begin{aligned} \{\mathrm{rep}(n)\mid n\in X\}\subseteq A^* \end{aligned}
is accepted by a finite automaton.
In order to be able to recognize multidimensional sets of numbers by means of finite automata, we need to represent tuples of numbers by finite words. The classical way to manage this is to introduce a padding symbol, which allows each component to be represented by words of the same length. A subset X of $$\mathbb {N}^d$$ is recognizable with respect to a numeration system $$\mathrm {rep}\colon \mathbb {N}\to A^*$$ if the language
\displaystyle \begin{aligned} \{(\mathrm{rep}(n_1),\ldots,\mathrm{rep}(n_d))^\#\mid (n_1,\ldots,n_d)\in X\}\subseteq ((A\cup\{\#\})^d)^*, \end{aligned}
where # is some padding symbol, is accepted by a finite automaton.
Formally, for alphabets A1, …, A d and for a letter #, the padding map $$(\cdot )^\#\colon A_1^ *\times \cdots \times A_d^*\to ((A_1\cup \{\#\})\times \cdots \times (A_d\cup \{\#\}))^*$$ is defined by
\displaystyle \begin{aligned} (w_1,\ldots,w_d)^\#=(\#^{m-|w_1|}w_1,\ldots,\#^{m-|w_d|}w_d), \end{aligned}
where $$m=\max \{|w_1|,\ldots ,|w_d|\}$$. In this way, from a subset R of the monoid $$A_1^ *\times \cdots \times A_d^*$$, we create a language
\displaystyle \begin{aligned} R^\#=\{(w_1,\ldots,w_d)^\#\mid (w_1,\ldots,w_d)\in R\}\subseteq ((A_1\cup\{\#\})\times \cdots \times (A_d\cup\{\#\}))^*. \end{aligned}
In particular, if $$\#\notin \cup _{i=1}^d A_i$$, then no word in R # contains the letter (#, …, #).
Here and throughout the chapter, d designates a dimension, i.e., an integer greater than or equal to 1. We will also use the notation
\displaystyle \begin{aligned} \mathtt{\textbf{\#}}=(\underbrace{\#,\ldots,\#}_{d \text{ times}}),\quad \mathbf{0}=(\underbrace{0,\dots,0}_{d \text{ times}}),\quad {\scriptstyle\bigstar} =(\underbrace{\star,\ldots , \star}_{d \text{ times}}), \end{aligned}
where # and ⋆  are fixed symbols.

3.2.1 Unary Representations

Perhaps the simplest way of representing a natural number n is to repeat a symbol n times. This approach presents an obvious drawback: it requires way too much memory space in practice to store a number and, even worse, to do computations with them. Even though they are highly unpractical, unary representations are of some theoretical interest, for example in computability theory. Let a be some fixed symbol. The unary numeration system $$\mathrm {rep}_1\colon \mathbb {N}\to a^*$$ is defined by rep1(n) = a n for all $$n\in \mathbb {N}$$. The set of all possible representations is $$L_1=\mathrm {rep}_1(\mathbb {N})=a^*$$.

Definition 3.2.1

A subset X of $$\mathbb {N}^d$$ is 1-recognizable if the language rep1(X) is regular.

In dimension 1, the 1-recognizable sets are exactly the finite union of arithmetic progressions, as they correspond to regular languages over a unary alphabet. In the multidimensional case, it is already more complicated to capture the essence of 1-recognizable sets; see Section 3.2.5.

3.2.2 Integer Bases

Throughout this chapter, b designates an integer greater than or equal to 2.

The integer base b numeration system $$\mathrm {rep}_b\colon \mathbb {N}\to A_b^{\ *}$$ is defined as follows: positive integers n are represented by finite words rep b (n) = c c1c0 over the alphabet A b  = {0, 1, …, b − 1} obtained from the greedy algorithm:
\displaystyle \begin{aligned} n=\sum_{i=0}^{\ell}c_i\,b^i. \end{aligned}
By convention rep b (0) = ε. The greedy algorithm only imposes having a nonzero leading digit c , and the set of all greedy (or canonical) b-representations is
\displaystyle \begin{aligned} L_b=\mathrm{rep}_b(\mathbb{N})=A_b^*\setminus 0A_b^*. \end{aligned}
We may also consider non-greedy b-representations. The evaluation map $$\mathrm {val}_b\colon \mathbb {N}^*\to \mathbb {N}$$ is defined by $$\mathrm {val}_b(c_\ell \cdots c_1c_0)=\sum _{i=0}^{\ell }c_i\,b^i$$. Any word $$c_\ell \cdots c_1c_0\in \mathbb {N}^*$$ such that val b (c c1c0) = n is called a b-representation of n.
We extend the definitions of the functions rep b and val b to the multidimensional setting as follows (and we keep the same notation):
\displaystyle \begin{aligned} \mathrm{rep}_b & \colon\mathbb{N}^d\to (A_b^{\ d})^*, \ (n_1,\ldots,n_d)\mapsto (\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^0\\ \mathrm{val}_b & \colon (\mathbb{N}^d)^* \to \mathbb{N}^d, \ (w_1,\ldots,w_d)\mapsto (\mathrm{val}_b(w_1),\ldots,\mathrm{val}_b(w_d)). \end{aligned}
Let us emphasize that the components of rep b (n) are padded with zeros. Also note that $$(w_1,\ldots ,w_d)\in (\mathbb {N}^d)^*$$ implies that |w1| = ⋯ = |w d |.

The following proposition is a generalization of Proposition V.3.1 in [211].

Proposition 3.2.2

Let # be a symbol not belonging to A b . For any subset X of $$\mathbb {N}^d$$ , the following are equivalent:
1. 1.

The language rep b (X) is regular.

2. 2.

The language 0rep b (X) is regular.

3. 3.

There exists a regular language $$L\subseteq (A_b^{\ d})^*$$ such that 0(0)−1L = 0rep b (X).

4. 4.

There exists a regular language $$L\subseteq (A_b^{\ d})^*$$ such that val b (L) = X.

5. 5.

The language {(rep b (n1), …, rep b (n d )) # ∣(n1, …, n d ) ∈ X} is regular.

6. 6.

The language #{(rep b (n1), …, rep b (n d )) # ∣(n1, …, n d ) ∈ X} is regular.

7. 7.
There exists a regular language L ⊆ ((A b ∪{#}) d ) such that
\displaystyle \begin{aligned} \mathtt{\textbf{\#}}^*(\mathtt{\textbf{\#}}^*)^{-1}L=\mathtt{\textbf{\#}}^*\{(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\#\mid (n_1,\ldots,n_d)\in X\}. \end{aligned}

Proof

If no word of a language L ⊆ A starts with a specific letter a ∈ A, then L is regular if and only if aL is as well. This shows 1 ⇔ 2 and 5 ⇔ 6. For 1 ⇒ 4, take L = rep b (X). For 4 ⇒ 3, observe that if X = val b (L) for some regular language $$L\subseteq (A_b^{\ d})^*$$, then 0(0)−1L = 0rep b (X). 3 ⇒ 2 is clear. For 5 ⇒ 7, take L = {(rep b (n1), …, rep b (n d )) # ∣(n1, …, n d ) ∈ X}. 7 ⇒ 6 is clear. Finally we show 1 ⇔ 5. Given a DFA accepting {(rep b (n1), …, rep b (n d )) # ∣(n1, …, n d ) ∈ X}, we modify it by replacing every # with 0 in every transition. The resulting automaton is an NFA accepting rep b (X). Now suppose that $$\mathcal {A}$$ is a DFA accepting rep b (X). We modify $$\mathcal {A}$$ by replacing every transition labeled $$(a_1,\ldots ,a_d)\in A_b^{\ d}$$ with k components equal to 0 with 2 k transitions obtained by placing either 0 or # in every component where there was a 0. Let $$\mathcal {B}$$ denote the resulting DFA. Now we can build a DFA $$\mathcal {C}$$ accepting the words in ((A b ∪{#}) d ) such that, in every component, each occurrence of # is preceded by # or by nothing, and the last occurrence of # is not followed by 0. The language {(rep b (n1), …, rep b (n d )) # ∣(n1, …, n d ) ∈ X} is the intersection of the languages accepted by $$\mathcal {B}$$ and $$\mathcal {C}$$; hence, it is regular. □

Definition 3.2.3

A subset X of $$\mathbb {N}^d$$ is b-recognizable if any of the assertions of Proposition 3.2.2 is satisfied.

Remark 3.2.4

The integer base b numeration systems have the remarkable property that $$\mathbb {N}^d$$ is b-recognizable since $$\mathbf {0}^*\mathrm {rep}_b(\mathbb {N}^d)=(A_b^{\ d})^*$$. It is also true that $$\mathrm {val}_b^{-1}(X)=\mathbf {0}^*\mathrm {rep}_b(X)$$ for any subset X of $$\mathbb {N}^d$$. The latter fact was actually used in the proof of Proposition 3.2.2 (it is needed in the implication 4 ⇒ 3).

It is equivalent to say that the characteristic sequence $$\chi _X\colon \mathbb {N}^d\to \{0,1\}$$ is b-automatic:

Definition 3.2.5

A sequence $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is b-automatic if there exists a finite deterministic automaton with output (DFAO for short) $$\mathcal {M}=(Q,q_0,A_b^{\ d},\delta ,A,\tau )$$ such that, for all $$\mathbf {n}\in \mathbb {N}^d$$, x(n) = τ(δ(q0, rep b (n))).

Note that a DFAO being finite by definition, the image of a b-automatic sequence is necessarily finite. Therefore, b-automatic sequences may be viewed as multidimensional infinite words over a finite alphabet A.

Example 3.2.6

The DFAO of Figure 3.1 generates the sequence 011010111⋯ when reading the greedy 2-representations of the nonnegative integers.

Proposition 3.2.7

Let X be a subset of $$\mathbb {N}^d$$ . Then X is b-recognizable if and only if χ X is b-automatic.

Proof

In order to build a DFAO generating χ X starting from a DFA accepting rep b (X), it suffices to output 1 when ending in a terminal state and to output 0 when ending in a nonterminal state. In particular, the obtained DFAO outputs 0 if we enter a non-greedy b-representation. The other direction works well because $$\mathbb {N}^d$$ is b-recognizable. By declaring terminal those states outputting 1 and nonterminal those states outputting 0, we obtain a DFA that might accept non-greedy b-representations as well. But if L is the accepted language of this DFA, then val b (L) = X (which is the fourth item in Proposition 3.2.2). □

Similarly, we have the following result.

Proposition 3.2.8

Let A be a finite alphabet and let $$x\colon \mathbb {N}^d\to A$$. Then x is b-automatic if and only if every subset x−1(a) of $$\mathbb {N}^d$$ (for a  A) is b-recognizable.

Proof

In order to build DFAs accepting a language L such that val(L) = x−1(a) starting from a DFAO generating x, it suffices to declare a state to be final if and only if the corresponding output is a. For the other direction, let A = {a1, …, a k }, and for each i, let $$\mathcal {M}_i=(Q_i,q_{0,i},F_i,A_b^{\ d},\delta _i)$$ be a DFA accepting 0rep b (x−1(a i )). Let $$\mathcal {M}=\mathcal {M}_1\times \cdots \times \mathcal {M}_k$$. For all $$\mathbf {n}\in \mathbb {N}^d$$, the state reached from the initial state (q0,1, …, q0,k) after reading rep b (n) contains exactly one final component (in some $$\mathcal {M}_i$$). We define τ(q1, …, q k ) = a i if there is exactly one i such that q i  ∈ F i (τ is undefined on other states). Then the DFAO obtained from $$\mathcal {M}$$ and τ generates x. □

One way to describe the b-recognizable sets is to study their growth functions.

Definition 3.2.9

For a subset X of $$\mathbb {N}$$, we let t X (n) denote the (n + 1)st term of X. The map $$t_X\colon \mathbb {N}\to \mathbb {N}$$ is called the growth function of X.

Theorem 3.2.10

[ 211 ] Any b-recognizable subset X of $$\mathbb {N}$$ satisfies either
$$\displaystyle \begin{gathered} \limsup_{n\to+\infty} \, (t_X(n+1)-t_X(n))<+\infty,\mathit{\text{ or }}\\ \limsup_{n\to+\infty}\, \frac{t_X(n+1)}{t_X(n)}>1. \end{gathered}$$

Thanks to this result, examples of sets that are not b-recognizable for any b have been exhibited. The set $$\{n^2 : n \in \mathbb {N}\}$$ of squares is such an example.

There are several equivalent definitions of b-recognizable sets using logic, morphisms, finiteness of the b-kernel, or formal series. We refer the reader to the survey [114] for an extensive presentation. The equivalence with b-definable sets will be discussed in Section 3.3.

3.2.3 Positional Numeration Systems

A positional numeration system $$\mathrm {rep}_U\colon \mathbb {N}\to A_U^{\ *}$$ is based on an increasing sequence $$U\colon \mathbb {N}\to \mathbb {N}$$ such that U(0) = 1 and $$C_U=\sup _{i\ge 0}\big \lceil \frac {U(i+1)}{U(i)}\big \rceil <+\infty$$. Positive integers n are represented by finite words rep U (n) = c c1c0 over the alphabet A U  = {0, 1, …, C U  − 1} obtained from the greedy algorithm:
\displaystyle \begin{aligned} n=\sum_{i=0}^{\ell}c_i \,U(i). \end{aligned}
By convention rep U (0) = ε. The greedy algorithm imposes having a nonzero leading digit c and that, for every 0 ≤ j ≤ , $$\sum _{i=0}^{j}c_i U(i)<U(j+1)$$. A description of the set of all greedy (or canonical) U-representations $$L_U=\mathrm {rep}_U(\mathbb {N})$$ highly depends on the base sequence U. The evaluation map is $$\mathrm {val}_U\colon \mathbb {N}^*\to \mathbb {N},\ c_\ell \cdots c_1c_0\mapsto \sum _{i=0}^{\ell }c_i \,U(i)$$. Any word $$c_\ell \cdots c_1c_0\in \mathbb {N}^*$$ such that val U (c c1c0) = n is called a U-representation of n.

Example 3.2.11

If U : ib i , then we recover the integer base b numeration systems presented in the previous section.

Example 3.2.12

The positional numeration system rep F based on the Fibonacci sequence $$F \colon \mathbb {N}\to \mathbb {N}$$ defined by F(0) = 1, F(1) = 2 and F(i + 2) = F(i + 1) + F(i) for $$i\in \mathbb {N}$$, is called the Zeckendorf numeration system [592]. Zeckendorf proved that the set of all greedy F-representations is the language of the finite words over {0, 1} that do not begin in 0 and that do not contain the word 11 as a factor: L F  = 1{0, 01}∪{ε}. This language is accepted by the DFA of Figure 3.2.
Again, we extend the definitions of rep U and val U to the multidimensional setting:
\displaystyle \begin{aligned} \mathrm{rep}_U & \colon\mathbb{N}^d\to (A_U^{\ d})^*,\ (n_1,\ldots,n_d)\mapsto (\mathrm{rep}_U(n_1),\ldots,\mathrm{rep}_U(n_d))^0\\ \mathrm{val}_U & \colon (\mathbb{N}^d)^*\to \mathbb{N}^d,\ (w_1,\ldots,w_d)\mapsto (\mathrm{val}_U(w_1),\ldots,\mathrm{val}_U(w_d)). \end{aligned}

We give the statement of the following proposition without proof since it is similar to that of Proposition 3.2.2.

Proposition 3.2.13

Let # be a symbol not belonging to A U . For any subset X of $$\mathbb {N}^d$$ , the following are equivalent:
1. 1.

The language rep U (X) is regular.

2. 2.

The language 0rep U (X) is regular.

3. 3.
There exists a regular language $$L\subseteq (A_U^{\ d})^*$$ such that
\displaystyle \begin{aligned} \mathbf{0}^*(\mathbf{0}^*)^{-1}L=\mathbf{0}^*\mathrm{rep}_U(X). \end{aligned}
(3.1)

4. 4.

The language {(rep U (n1), …, rep U (n d )) # ∣(n1, …, n d ) ∈ X} is regular.

5. 5.

The language #{(rep U (n1), …, rep U (n d )) # ∣(n1, …, n d ) ∈ X} is regular.

6. 6.
There exists a regular language L ⊆ ((A U ∪{#}) d ) such that
\displaystyle \begin{aligned} \mathtt{\textbf{\#}}^*(\mathtt{\textbf{\#}}^*)^{-1}L=\mathtt{\textbf{\#}}^*\{(\mathrm{rep}_U(n_1),\ldots,\mathrm{rep}_U(n_d))^\#\mid (n_1,\ldots,n_d)\in X\}. \end{aligned}

Observe that we lost the fourth characterization of Proposition 3.2.2. For integer bases, the non-greedy representations are only those with leading zeros. For positional numeration systems, there are other kinds of non-greedy representations. For example, 100 and 11 are both F-representations of 3. In general, if $$X\subseteq \mathbb {N}$$ and $$L\subseteq (A_U^{\ d})^*$$ are such that X = val U (L), then we do not know that (3.1) holds for the same L.

Definition 3.2.14

A subset X of $$\mathbb {N}^d$$ is U-recognizable if any of the assertions of Proposition 3.2.13 is satisfied.

Let us mention two open problems concerning positional numeration systems. The first one was already reported in [78, Chapter 2]. As far as we know, the best results achieved in this area are those of [297].

Problem 3.2.15

Characterize those positional numeration systems rep U such that $$\mathbb {N}$$ is U-recognizable.

Here we propose another related problem. However, an answer to any of these two problems does not seem to provide a straightforward answer to the other. We first give a remark.

Remark 3.2.16

For any subset X of $$\mathbb {N}^d$$, we have $$\mathrm {rep}_U(X)=\mathrm {val}_U^{-1}(X)\cap \mathrm {rep}_U(\mathbb {N}^d)$$. Therefore, whenever $$\mathbb {N}$$ is U-recognizable (and hence $$\mathbb {N}^d$$ is as well), then for any subset X of $$\mathbb {N}^d$$, the regularity of $$\mathrm {val}_U^{-1}(X)$$ implies that of rep U (X). However, there is no evidence that the converse should be true.

Problem 3.2.17

Characterize those positional numeration systems rep U such that, for any subset X of $$\mathbb {N}^d$$, the regularity of rep U (X) implies that of $$\mathrm {val}_U^{-1}(X)$$.

3.2.4 Abstract Numeration Systems

In this very general framework, the question is reversed. We first choose a language L, the basic assumption being that L is regular, and then we declare L to form the set of all valid representations of nonnegative integers, with the rule:
\displaystyle \begin{aligned} \forall n,m\in L,\ n<m \iff rep_S(n)\prec rep_S(m). \end{aligned}

Formally, an abstract numeration system S is given by a regular language L over a totally ordered alphabet (A, <). A nonnegative integer n is represented by the (n + 1)st word in L in radix (or genealogical) order ≺. The question is now to – efficiently – describe the map n↦rep S (n), which of course depends on the choice of S.

Definition 3.2.18

A subset X of $$\mathbb {N}^d$$ is S-recognizable if the language
\displaystyle \begin{aligned} \{(\mathrm{rep}_S(n_1),\ldots,\mathrm{rep}_S(n_d))^\#\mid (n_1,\ldots,n_d)\in X\}\subseteq ((A\cup\{\#\})^d)^* \end{aligned}
is regular, where # is some padding symbol not contained in the numeration alphabet A.

Note that, for a fixed S, the choice of padding the representations to the right or to the left is arbitrary and gives two different notions of S-recognizability. At first glance, one could think that we just have to consider the reversed representations, but the numeration language L might not be closed under reversal, and even if it were, then the order of the representations could change. Recall that if w = a1a|w|, then $$\widetilde {w}=a_{|w|}\cdots a_1$$.

Example 3.2.19

Consider S = (ab∪ ac, a < b < c). Then the pair (6, 9) is represented by . If we had chosen a right padding instead, (6, 9) would have been represented by , which is not equal to . In fact, the latter word is not even the S-representation of any pair of nonnegative integers since ca does not belong to the numeration language.

Abstract numeration systems encompass positional numeration systems having a regular numeration language; see Problem 3.2.15. The next example illustrates that the converse is not true.

Example 3.2.20

We saw that the set $$X=\{n^2 : n \in \mathbb {N}\}$$ is not b-recognizable for any b. However, this set is S-recognizable for the abstract numeration system S of Example 3.2.19 since rep S (X) = a.

More generally, we have the following result.

Theorem 3.2.21 ([502, 554])

For any polynomial $$P \in \mathbb {Q}[x]$$ such that $$P(\mathbb {N}) \subseteq \mathbb {N}$$ , there exists an abstract numeration system S such that P is S-recognizable.

Describing the S-recognizable subsets of $$\mathbb {N}^d$$ is not easy in general. In the vein of Theorem 3.2.10, the following result, which we give without proof, lists the possible growth orders of such sets. These growth orders depend on the growth of the numeration language, which is either polynomial or exponential as shown by the following lemma.

For any language L over an alphabet A and any nonnegative integer n, we let v L (n) denote the number of words of length less than or equal to n in L.

Lemma 3.2.22

For all regular languages L, there exist $$p,c\in \mathbb {N}$$ and $$\alpha ,a_0,\ldots ,a_{p-1}\in \mathbb {R}_{\ge 0}$$ with p, α ≥ 1 such that
\displaystyle \begin{aligned} \forall i\in\{0,\ldots,p-1\},\ \mathbf{v}_L(np+i)\sim a_i\,n^c\alpha^n \quad (n\to+\infty). \end{aligned}
(3.2)

Proof

The formal series ∑n≥0v L (n)x n are $$\mathbb {N}$$-recognizable for all regular languages L; see, for instance, [77]; also see Section 3.4.1. Since (v L (n))n≥0 are nondecreasing sequences, the lemma follows from [520, Theorem II.10.2]. □

Theorem 3.2.23 ([147])

Let S = (L, A, <) be an abstract numeration system and let X be an infinite S-recognizable subset of $$\mathbb {N}$$. Suppose that (3.2) holds and that
\displaystyle \begin{aligned} \forall j\in\{0,\ldots,q-1\},\ \mathbf{v}_{\mathrm{rep}_S(X)}(nq+j)\sim b_jn^d\beta^n\quad (n\to+\infty), \end{aligned}
(3.3)
for some $$q,d\in \mathbb {N}$$ and some $$\beta ,b_0,\ldots ,b_{q-1}\in \mathbb {R}_{\ge 0}$$ with q, β ≥ 1. Whenever β > 1, we have
\displaystyle \begin{aligned} t_X(n)=\varTheta\big((\log(n))^{c-df} n^f\big),\mathit{\text{ with }} f=\frac{\log(\sqrt[p]{\alpha})}{\log(\sqrt[q]{\beta})}. \end{aligned}
If β = 1, then
\displaystyle \begin{aligned} t_X(n)=\varTheta\big(n^{\frac cd} (\sqrt[p]{\alpha})^{\varTheta(n^{1/d})}\big). \end{aligned}
If moreover q = 1, then
\displaystyle \begin{aligned} t_X(n)=\varTheta\big(n^{\frac{c}{d}} (\sqrt[p]{\alpha})^{(1+o(1))(\frac{n}{b_0})^{1/d}}\big). \end{aligned}

Definition 3.2.24

Two real numbers α and β different from 1 are said to be multiplicatively dependent if α = β r for some $$r\in \mathbb {Q}$$, or, equivalently, if $$\frac {\log {\alpha }}{\log {\beta }}\in \mathbb {Q}$$. Otherwise, α and β are said to be multiplicatively independent.

The following corollary of Theorem 3.2.23 considers the case of a polynomial numeration language.

Corollary 3.2.25

Let S = (L, A, <) be an abstract numeration system built on a polynomial regular language, and let X be an infinite S-recognizable subset of $$\mathbb {N}$$. Then t X (n) = Θ(n r ) for some rational r ≥ 1.

Proof

By Lemma 3.2.22, the growth functions v L (n) and $$\mathbf {v}_{\mathrm {rep}_S(X)}(n)$$ satisfy (3.2) and (3.3), respectively. The fact that L is polynomial means that α = 1. As 1 ≤ β ≤ α, we have β = 1 as well. Then from Theorem 3.2.23, we obtain $$t_X(n)=\varTheta ( n^{\frac {c}{d}})$$. □

By Theorem 3.2.21, we know that any set of the form $$\{n^k\mid n\in \mathbb {N}\}$$, with $$k\in \mathbb {N}$$, is S-recognizable for some S. In the constructions of [502, 554], the numeration languages are of polynomial growth. Consider the base 4 numeration system, whose numeration language is of exponential growth. By Theorem 3.2.23, if X = val4({1, 3}), then t X (n) = Θ(n2). Indeed, with the notation of Theorem 3.2.23, we have α = 4, β = 2, p = q = 1 (hence f = 2), and c = d = 0.

Proposition 3.2.26

For every rational number r ≥ 1, there exists an abstract numeration system S built on a polynomial regular language and an infinite S-recognizable subset X of $$\mathbb {N}$$ such that t X (n) = Θ(n r ).

Proof

Fix a rational number r ≥ 1. Write $$r=\frac {c}{d}$$ where c and d are positive integers. Define $$\mathcal B_\ell$$ to be the bounded language $$a_1^*a_2^*\cdots a_\ell ^*$$. We have $$\mathbf {v}_{\mathcal B_\ell }(n)=\binom {n+\ell }{\ell }$$ for all  ≥ 1 and $$n\in \mathbb {N}$$ (e.g., see [149, Lemma 1]). Let S be the abstract numeration system built on $$\mathcal B_c$$ with the order a1 < a2 < ⋯ < a c , and let $$X=\mathrm {val}_S(\mathcal B_d)$$ (since c ≥ d, we have $$\mathcal B_d\subseteq \mathcal B_c$$). Hence we have $$\mathbf {v}_{\mathcal B_c}(n)=\binom {n+c}{c}$$ and $$\mathbf {v}_{\mathrm {rep}_S(X)}(n)=\binom {n+d}{d}$$ for all $$n\in \mathbb {N}$$. Then from Theorem 3.2.23, we obtain $$t_X(n)=\varTheta ( n^{\frac {c}{d}})=\varTheta (n^r)$$. □

Theorem 3.2.23 also allows us to exhibit subsets of $$\mathbb {N}$$ which are not S-recognizable for any abstract numeration system S. For example, let $$C = \{C_n\mid n \in \mathbb {N} \}$$ denote the set of Catalan numbers $$C_n = \frac {1}{n+1}\binom {2n}{n}$$. As is well known, we have $$C_n \sim \frac {4^n}{n^{3/2}\sqrt {\pi }} \quad (n\to +\infty )$$, which does not correspond to any of the forms described by Theorem 3.2.23. Hence, for all S, the set C is not S-recognizable.

3.2.5 The Cobham–Semenov Theorem

So far we have introduced several numeration systems and have considered the question of describing recognizable sets of nonnegative integers within a fixed numeration system. The celebrated theorem of Cobham concerns, on the contrary, sets of numbers that are simultaneously recognizable in different integer bases. Cobham’s theorem and its numerous generalizations are the subject of several surveys [114, 206]. Nevertheless, due to the importance of this result and its relevance to the subject of the present chapter, we briefly discuss it in this short section.

Definition 3.2.27

Semi-linear subsets of $$\mathbb {N}^d$$ are the finite unions of sets of the form $$\mathbf {p}_0+\mathbf {p}_1\mathbb {N}+\cdots + \mathbf {p}_\ell \mathbb {N}$$, where $$\mathbf {p}_0,\mathbf {p}_1,\ldots ,\mathbf {p}_\ell \in \mathbb {N}^d$$.

Recall that b and b′ are multiplicatively independent if $$\frac {\log (b)}{\log (b')}\notin \mathbb {Q}$$; see Definition 3.2.24.

Theorem 3.2.28 (Cobham–Semenov [155, 536])

Let b and b′ be multiplicatively independent integer bases. If a subset of $$\mathbb {N}^d$$ is simultaneously b-recognizable and b′-recognizable, then it is semi-linear.

As semi-linear sets are b-recognizable for all integer bases b, we obtain that a subset of $$\mathbb {N}^d$$ is b-recognizable for all b ≥ 2 if and only if it is semi-linear. Note that we cannot replace b ≥ 2 by b ≥ 1 as, for example, the linear set $$X=\{(n,2n)\mid n\in \mathbb {N}\}=(1,2)\mathbb {N}$$ is not 1-recognizable.

We have just argued that the family of 1-recognizable sets is distinct from that of semi-linear sets. It is worth noticing that 1-recognizable sets also do not correspond to the so-called recognizable subsets of $$\mathbb {N}^d$$, which are the subsets X of $$\mathbb {N}^d$$ for which the equivalence relation ∼ X over $$\mathbb {N}^d$$ defined by
\displaystyle \begin{aligned} x\sim_X y \iff (\forall z\in\mathbb{N}^d,\ x+z\in X\iff y+z\in X) \end{aligned}
has finite index. For example, the diagonal $$D=\{(n,n)\mid n\in \mathbb {N}\}$$ is 1-recognizable but not recognizable as (m, 0) ∼ D (n, 0) if and only if m = n. On the other hand, it is true that the recognizable subsets of $$\mathbb {N}^d$$ are all 1-recognizable. More precisely, we have the following result.

Theorem 3.2.29 ([144])

A subset X of $$\mathbb {N}^d$$ is S-recognizable for all abstract numeration systems S if and only if it is 1-recognizable.

3.3 First-Order Logic and b-Automatic Sequences

In this section, we present an equivalent definition of b-automatic sequences in terms of logic. It is given by the Büchi-Bruyère theorem. This criterion is of high interest since it represents a powerful tool in order to show that many properties of b-automatic sequences are decidable.

3.3.1 b-Definable Sets of Integers

A (logical) structure $$\mathcal {S}=\langle S, (R_i) \rangle$$ consists of a set S, called the domain of the structure, and countably many relations $$R_i\subseteq S^{d_i}$$, where the d i ’s are positive integers, called the arities of the R i ’s.

A first-order formula is defined recursively from
• variables x1, x2, x3, … describing elements of the domain S,

• the equality = ,

• the relations given in the structure $$\mathcal {S}$$,

• the connectives ∨, ∧, ⇒ , ⇔ , ¬,

• the quantifiers ∀, ∃ on variables.

Example 3.3.1

The Presburger arithmetic is described by the first-order formulæ of the structure $$\langle \mathbb {N},+\rangle$$. See Section 3.7.

Let $$\mathcal {S}$$ be a logical structure whose domain is S. For a first-order formula φ(x1, …, x d ) of $$\mathcal {S}$$, we let
\displaystyle \begin{aligned} X_\varphi=\{(s_1,\ldots,s_d)\in S^d\mid \mathcal{S} \vDash \varphi(s_1,\ldots,s_d)\}. \end{aligned}
A subset X of S d is definable in $$\mathcal {S}$$ if there exists a first-order formula φ(x1, …, x d ) of $$\mathcal {S}$$ such that X = X φ , i.e., such that, for all (s1, …, s d ) ∈ S d , φ(s1, …, s d ) is true if and only if (s1, …, s d ) ∈ X.

We shall use particular notation for constant relations and for functional relations. A constant relation is a relation of the form {c}. It will be simply denoted c. A functional relation is a binary relation R such that for any s ∈ S, there is at most one t ∈ S with (s, t) ∈ R. Such a relation R will be denoted f : S → S where it is understood that f(s) = t if there exists t ∈ S such that (s, t) ∈ R and f(s) is undefined otherwise.

Definition 3.3.2

A subset X of $$\mathbb {N}^d$$ is b-definable if it is definable in the logical structure $$\langle \mathbb {N},+,V_b\rangle$$, where +  is the ternary relation defined by x + y = z and V b is the function defined by V b (0) = 1, and for x a positive integer, V b (x) is the largest power of b dividing x.

Example 3.3.3

One has V2(9) = 1 and V2(24) = 8.

Theorem 3.3.4 ([112, 115])

A subset X of $$\mathbb {N}^d$$ is b-recognizable if and only if it is b-definable. Moreover, both directions are effective.

For a detailed proof of this result, we refer the reader to [114]. We only sketch the idea of their proof here. They work with automata accepting reversed b-representations of numbers. From a DFA recognizing X least significant digit first, that is, such that it accepts a language $$L\subseteq (A_b^{\ d})^*$$ satisfying $$X=\{\mathrm {val}_b(\widetilde {w})\mid w\in L\}$$, they construct a first-order formula φ of the structure $$\langle \mathbb {N},+,V_b\rangle$$ defining X. Conversely, given a first-order formula φ of the structure $$\langle \mathbb {N},+,V_b\rangle$$ defining X, they build a DFA accepting all the reversed b-representations of the elements in X, that is, accepting the language (rep b (X))0.

3.3.3 The First-Order Theory of $$\langle \mathbb {N},+,V_b\rangle$$ Is Decidable

As a corollary of the Büchi-Bruyère theorem, the first-order theory of $$\langle \mathbb {N},+,V_b\rangle$$ is decidable: given any closed first-order formula of $$\langle \mathbb {N},+,V_b\rangle$$, we can decide whether it is true or false in $$\mathbb {N}$$. As this corollary has a nice short proof, we give it here.

Since there is no constant in the structure, a closed formula of $$\langle \mathbb {N},+,V_b\rangle$$ is necessarily of the form ∃(x) or ∀(x). The set X φ is b-recognizable by the Büchi-Bruyère theorem. This means that we can effectively construct a DFA accepting rep b (X φ ). The closed formula ∃(x) is true if rep b (X φ ) is nonempty and false otherwise. As the emptiness of a regular language is decidable [301], we can decide if ∃(x) is true.

The case ∀(x) reduces to the previous one since ∀(x) is logically equivalent to ¬∃x¬φ(x). We can again construct a DFA accepting the b-representations of X¬φ. The language it accepts is empty if and only if the closed formula ∀(x) is true.

Proposition 3.3.5

If we can express a property P(n) of an integer n using quantifiers, logical operations, the operations of addition and subtraction, and comparison of integers or elements of a b-automatic sequence x, thennP(n), ∃ nP(n), andnP(n) are decidable.

We just have to convince ourselves that those properties P can all be expressed by a first-order formula of $$\langle \mathbb {N},+,V_b\rangle$$. If $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is b-automatic, then, for all letters a occurring in x, the subsets x−1(a) of $$\mathbb {N}^d$$ are b-recognizable by Proposition 3.2.8. Hence they are definable by some first-order formulæ ψ a of $$\langle \mathbb {N},+,V_b\rangle$$ by the Büchi-Bruyère theorem: ψ a (n1, …, n d ) is true if and only if x(n1, …, n d ) = a. Therefore, we can express that x(m1, …, m d ) = x(n1, …, n d ) by the first-order formula φ(m1, …, m d , n1, …, n d ) of $$\langle \mathbb {N},+,V_b\rangle$$:
\displaystyle \begin{aligned} \varphi(m_1,\ldots,m_d,n_1,\ldots,n_d)\ \equiv \quad \bigvee_{a}(\psi_a(m_1,\ldots,m_d) \land \psi_a(n_1,\ldots,n_d)). \end{aligned}

In practice, given a DFAO $$\mathcal {A}$$ computing $$x\colon \mathbb {N}^d\to \mathbb {N}$$, we can directly compute a DFA recognizing the tuples $$(m_1,\ldots ,m_d,n_1,\ldots ,n_d)\in \mathbb {N}^{2d}$$ such that x(m1, …, m d ) = x(n1, …, n d ). We compute the product of automata $$\mathcal {A}\times \mathcal {A}$$, thus reading tuples of size 2d, and simulate (m1, …, m d ) on the first component and (n1, …, n d ) on the second component, and we accept if the outputs of $$\mathcal {A}$$ after reading rep b (m1, …, m d ) # and rep b (n1, …, n d ) # are the same and reject otherwise.

In fact, Theorem 3.3.4 allows us to prove a stronger result than the decidability of such properties of b-automatic sequences. What we obtain is that the characteristic sequences of those properties are themselves b-automatic. The following proposition is far from being exhaustive. It only aims to give a flavor of the properties that can be handled by using this technique. For similar results, we refer to [12, 148]. A finite word is unbordered if no proper prefix equals a suffix. A palindrome is a finite word equal to its reversal: $$w=\widetilde {w}$$.

Proposition 3.3.6

Let $$x\colon \mathbb {N}\to \mathbb {N}$$ be a b-automatic sequence. Then the following sequences $$y\colon \mathbb {N}\to \{0,1\}$$ are also b-automatic:
• y(i) = 1 if and only if x has an overlap at position i

• y(i) = 1 if and only if x has an unbordered factor of length i

• y(i) = 1 if and only if x has a square at position i

• y(i) = 1 if and only if x has a palindrome at position i.

Some properties of interest of automatic sequences are not expressible by a first-order formula of $$\langle \mathbb {N},+,V_b\rangle$$ as the following proposition shows. The regular paperfolding sequence
\displaystyle \begin{aligned} 0010011000110110001001110011011000100110001101110010011\cdots \end{aligned}
is the 2-automatic sequence computed by the DFAO of Figure 3.3.

Proposition 3.3.7 ([523])

If x is the paperfolding sequence, then the predicate “x has an abelian square at position i of length 2n” is not expressible in $$\langle \mathbb {N},+,V_2\rangle$$.

This method for deciding first-order expressible properties of b-automatic sequences is very bad in terms of complexity. In the worst case, we have a tower of exponentials in the number of states of the given DFAO whose height is the number of alternating quantifiers of the first-order predicate. Nevertheless, this procedure was implemented by Mousavi and works efficiently in many cases. His open source software package is called Walnut [426]. It can be used in practice in order to prove (and reprove) many results about some particular b-automatic sequences, in a purely mechanical way [248, 249, 250].

3.4 Enumeration

The object of this section is to study enumeration problems about b-automatic sequences. It turns out that the sequences $$(a(m))_{m\in \mathbb {N}}$$ that count the number of $$n\in \mathbb {N}$$ such that P(m, n) is true, for any first-order predicate P of the logical structure $$\langle \mathbb {N},+,V_b\rangle$$, are indeed b-regular sequences; this is Theorem 3.4.15. We first introduce b-regular sequences over an arbitrary semiring K (also see Chapters and ). Then we focus on the semirings $$\mathbb {N}$$ and $$\mathbb {N}_\infty :=\mathbb {N}\cup \{\infty \}$$. We discuss $$\mathbb {N}$$-recognizable and $$\mathbb {N}_\infty$$-recognizable formal series and their connections to finite automata. This, together with the Büchi-Bruyère theorem, allows us to prove that counting various quantities related to b-automatic sequences gives rise to b-regular sequences. Finally, we discuss the particular case of b-synchronized sequences and show that, in general, the same techniques cannot be used to show that the obtained sequences are b-synchronized: some of them are, whereas some others are not.

3.4.1 b-Regular Sequences

A formal series S is a map from A to K, where A is a finite alphabet and K is a semiring. The image of a word w is denoted (S, w), as is customary. We also use the notation $$S=\sum _{w\in A^*} (S,w)\,w$$.

Definition 3.4.1

Let A be a finite alphabet and K be a semiring. A formal series S : A→ K is K-recognizable if there exist an integer m ≥ 1, vectors λ ∈ Km, γ ∈ Km×1, and a morphism of monoids μ: A→ Km×m such that, for all w ∈ A, (S, w) = λμ(w)γ. The triple (λ, μ, γ) is called a linear representation of S, and we say it is of size, or of dimension, m.

The family of K-recognizable series has many stability properties. We list here (without proofs) only those we will explicitly use for our purpose. For more on K-recognizable series, we refer the reader to [77].

The characteristic series of a language L ⊆ A is χ L  :=∑wLw. It can be viewed as a map from A to K for any semiring K (as any semiring contains 0 and 1).

Proposition 3.4.2

For any language L, the following assertions are equivalent.
1. 1.

L is regular.

2. 2.

χ L is $$\mathbb {N}$$ -recognizable.

3. 3.

For all semirings K, χ L is K-recognizable.

The Hadamard product of two formal series S and T is their term-wise product: $$S\odot T=\sum _{w\in A^*} (S,w)(T,w)\,w$$. In particular, S ⊙ χ L  =∑wL(S, w) w.

Proposition 3.4.3

If S : A K is a K-recognizable series and L  A is a regular language, then S  χ L is K-recognizable.

Proposition 3.4.4

Every formal series S : A K with only finitely many terms (S, w)≠0 is K-recognizable.

It follows from the previous two propositions that two formal series that differ only in a finite number of words are either both K-recognizable or both not K-recognizable.

We will need the following lemma.

Lemma 3.4.5

Let S : A K be a K-recognizable series, B  A be a nonempty sub-alphabet, and π: A  B be a letter-to-letter morphism. Then the series T : B K defined by
\displaystyle \begin{aligned} T=\sum_{u\in A^*}(S,u)\, \pi(u)=\sum_{w\in B^*}\Big(\sum_{\substack{u\in A^*\\ \pi(u)=w}}(S,u)\Big)\, w \end{aligned}

is K-recognizable.

Proof

Let (λ, μ, γ) be a linear representation of S, say of size m. Define a morphism μ′: B→ Km×m by μ′(b) =∑aA,π(a)=bμ(a) for each b ∈ B. By induction on |w|, we easily get that $$\mu '(w)=\sum _{u\in A^*,\, \pi (u)=w}\mu (u)$$ for all w ∈ B. Therefore, (λ, μ′, γ) is a linear representation of T: for all w ∈ B,
\displaystyle \begin{aligned} \lambda\mu'(w)\gamma =\sum_{\substack{u\in A^*\\ \pi(u)=w}}\lambda\mu(u)\gamma =\sum_{\substack{u\in A^*\\ \pi(u)=w}}(S,u) =(T,w). \end{aligned}

By an abuse of notation, we sometimes write $$\sum _{\mathbf {n}\in \mathbb {N}^d} x(\mathbf {n})\,\mathrm {rep}_b(\mathbf {n})$$ instead of $$\sum _{w\in \mathrm {rep}_b(\mathbb {N}^d)} x(\mathrm {val}_b(w))\, w$$. Similarly, $$\sum _{n_1,\ldots ,n_d\in \mathbb {N}} x(n_1,\ldots ,n_d)\,(\mathrm {rep}_b(n_1),\ldots ,\mathrm {rep}_b$$ (n d )) # is the series S : ((A b ∪{#}) d )→ K defined by (S, w) = x(n1, …, n d ) if w = (rep b (n1), …, rep b (n d )) # for some $$n_1,\ldots ,n_d\in \mathbb {N}$$ and (S, w) = 0 otherwise.

Proposition 3.4.6

Let # be a symbol not belonging to A b . For any sequence $$x\colon \mathbb {N}^d\to K$$ , the following assertions are equivalent.
1. 1.

$$\sum _{w\in (A_b^{\ d})^*} x(\mathrm {val}_b(w))\,w$$ is K-recognizable.

2. 2.

$$\sum _{\mathbf {n}\in \mathbb {N}^d} x(\mathbf {n})\,\mathrm {rep}_b(\mathbf {n})$$ is K-recognizable.

3. 3.

There exists a K-recognizable series $$S\colon (A_b^{\ d})^*\to K$$ such that, for all $$\mathbf {n}\in \mathbb {N}^d$$, (S, rep b (n)) = x(n).

4. 4.

There exists a K-recognizable series T : ((A b ∪{#}) d ) K such that, for all $$n_1,\ldots ,n_d\in \mathbb {N}$$, (T, (rep b (n1), …, rep b (n d )) # ) = x(n1, …, n d ).

5. 5.

$$\sum _{n_1,\ldots ,n_d\in \mathbb {N}} x(n_1,\ldots ,n_d)\,(\mathrm {rep}_b(n_1),\ldots ,\mathrm {rep}_b(n_d))^\#$$ is K-recognizable.

Proof

1 ⇒ 2: We have
\displaystyle \begin{aligned} G_0:=\sum _{\mathbf{n}\in\mathbb{N}^d} x(\mathbf{n})\,\mathrm{rep}_b(\mathbf{n}) =\sum_{w\in (A_b^{\ d})^*} x(\mathrm{val}_b(w))\,w\, \odot \,\chi_{\mathrm{rep}_b(\mathbb{N}^d)}. \end{aligned}
As $$\mathbb {N}^d$$ is b-recognizable, we obtain 1 ⇒ 2 from Proposition 3.4.3.

The implication 2 ⇒ 3 is clear.

3 ⇒ 1 ∧ 4: Assume that 3 holds and let $$S\colon (A_b^{\ d})^*\to K$$ be a K-recognizable series such that, for all $$\mathbf {n}\in \mathbb {N}^d$$, (S, rep b (n)) = x(n). Let (λ, μ, γ) be a linear representation of S, say of size m.

First, let $$\lambda '=[1\ 0\ \cdots \ 0]\in \mathbb {N}^{1\times (m{+}1)}$$, $$\mu '\colon (A_b^{\ d})^*\to \mathbb {N}^{(m{+}1)\times (m{+}1)}$$ be the morphism defined by
\displaystyle \begin{aligned} \mu'(\mathbf{0})=\begin{bmatrix} 1 & 0\ \cdots\ 0 \\ \begin{array}{c} 0 \\ \vdots \\ 0 \end{array} & \begin{bmatrix} \\ \mu(0) \\ \\ \end{bmatrix} \end{bmatrix},\quad \mu'(a) =\begin{bmatrix} 0 & [\lambda\mu(a)] \\ \begin{array}{c} 0 \\ \vdots \\ 0 \end{array} & \begin{bmatrix} \\ \mu(a) \\ \\ \end{bmatrix} \end{bmatrix}, \text{ for }a\ne \mathbf{0}, \end{aligned}
and $$\gamma '=[\lambda \gamma \quad \gamma ]^T\in \mathbb {N}^{(m{+}1)\times 1}$$. Then, for all $$w\in (A_b^{\ d})^*$$, λ′μ′(w)γ′ = x(val b (w)); hence, $$\sum _{w\in (A_b^{\ d})^*} x(\mathrm {val}_b(w))\,w$$ is K-recognizable, which is 1.
Second, we define a morphism μ″: ((A b ∪{#}) d )→ Km×m by μ″(a) = μ(π(a)) for all a ∈ (A b ∪{#}) d , where $$\pi \colon (A_b\cup \{\#\})^d \to A_b^{\ d}$$ is the letter-to-letter morphism defined by
\displaystyle \begin{aligned} (\pi(a_1,\ldots,a_d))_i= \begin{cases} a_i, & \text{ if } a_i \neq\#, \\ 0, & \text{ if } a_i=\#. \end{cases} \end{aligned}
Then, for all w ∈ ((A b ∪{#}) d ), we have λμ″(w)γ = λμ(π(w))γ = (S, π(w)). Thus 4 holds, as the formal series
\displaystyle \begin{aligned} T=\sum_{w\in ((A_b\cup\{\#\})^d)^*} (S,\pi(w))\, w \end{aligned}
is K-recognizable and such that, for all $$\mathbf {n}=(n_1,\ldots ,n_d)\in \mathbb {N}^d$$,
\displaystyle \begin{aligned} (T,(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\#) =(S,\mathrm{rep}_b(\mathbf{n})) =x(\mathbf{n}). \end{aligned}
4 ⇒ 5: Let T : ((A b ∪{#}) d )→ K be such that, for all $$\mathbf {n}=(n_1,\ldots ,n_d)\in \mathbb {N}^d$$, (T, (rep b (n1), …, rep b (n d )) # ) = x(n). Since $$\mathbb {N}^d$$ is b-recognizable, the language
\displaystyle \begin{aligned} L_\#:=\{(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\#\mid n_1,\ldots,n_d\in\mathbb{N}\} \end{aligned}
is regular by Proposition 3.2.2. As the formal series
\displaystyle \begin{aligned} G_\#:=\sum_{n_1,\ldots,n_d\in\mathbb{N}} x(n_1,\ldots,n_d)\,(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\# \end{aligned}
satisfies $$G_\#=T\odot \chi _{L_\#}$$, it is K-recognizable if T is as well by Proposition 3.4.3.
5 ⇒ 2: Suppose that G # is K-recognizable. By Lemma 3.4.5, the series
\displaystyle \begin{aligned} R =\sum_{u\in ((A_b\cup\{\#\})^d)^*}(G_\#,u)\, \pi(u) =\sum_{w\in (A_b^{\ d})^*} \Big( \sum_{\substack{u\in ((A_b\cup\{\#\})^d)^*\\ \pi(u)=w}}(G_\#,u)) \Big)\, w \end{aligned}
is K-recognizable. As, for all $$\mathbf {n}=(n_1,\ldots ,n_d)\in \mathbb {N}^d$$,
$$\displaystyle \begin{gathered} (R,\mathrm{rep}_b(\mathbf{n})) =\sum_{\substack{u\in ((A_b\cup\{\#\})^d)^*\\ \pi(u)=\mathrm{rep}_b(\mathbf{n})}}(G_\#,u) =\sum_{\substack{u\in L_\#\\ \pi(u)=\mathrm{rep}_b(\mathbf{n})}}(G_\#,u) \hspace{4cm}\\ \hspace{5cm}=(G_\#,(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\#) =x(\mathbf{n}), \end{gathered}$$
we obtain $$G_0=R\odot \chi _{\mathrm {rep}_b(\mathbb {N}^d)}$$; hence, G0 is K-recognizable by Proposition 3.4.3. □

Definition 3.4.7

A sequence $$x\colon \mathbb {N}^d\to K$$ is (K, b)-regular if any of the assertions of Proposition 3.4.6 is satisfied.

Thanks to the following elementary lemma, we can equivalently consider reversals of representations, i.e., starting with the least significant digit. Here $$\widetilde {\alpha }$$ denotes the transpose of the matrix α, and $$\widetilde {\mu }$$ is the morphism defined by $$\widetilde {\mu }(a)=\widetilde {\mu (a)}$$ for each letter a.

Lemma 3.4.8

If a formal series S : A K admits the linear representation (λ, μ, γ), then the reversal series $$\widetilde {S}:=\sum _{w\in A^*} (S,\widetilde {w})\,w$$ admits the linear representation $$(\widetilde {\gamma },\widetilde {\mu },\widetilde {\lambda })$$.

Proof

For all $$w=a_1\cdots a_{|w|}\in A_b^*$$, $$\widetilde {\mu (\widetilde {w})} =(\mu (a_{|w|}\cdots a_1))^\sim =(\mu (a_{|w|})\cdots \mu (a_1))^\sim =\widetilde {\mu (a_1)}\cdots \widetilde {\mu (a_{|w|})} =\widetilde {\mu }(a_1)\cdots \widetilde {\mu }(a_{|w|}) =\widetilde {\mu }(a_1\cdots a_{|w|}) =\widetilde {\mu }(w)$$, hence $$(\widetilde {S},w) =(S,\widetilde {w}) =\lambda \mu (\widetilde {w})\gamma =(\lambda \mu (\widetilde {w})\gamma )^\sim =\widetilde {\gamma }\,\widetilde {\mu (\widetilde {w})}\,\widetilde {\lambda } =\widetilde {\gamma }\,\widetilde {\mu }(w)\,\widetilde {\lambda }$$. □

In what follows, the semiring K will be either $$\mathbb {N}$$ or $$\mathbb {N}_\infty =\mathbb {N}\cup \{\infty \}$$ with 0 ⋅ = 0. Let us mention the following result, a proof of which can be found in Chapter .

Proposition 3.4.9 ([17])

If $$x\colon \mathbb {N}\to \mathbb {N}$$ is an $$(\mathbb {N},b)$$-regular sequence, then there exists some $$c\in \mathbb {N}$$ such that x(n) ∈ O(n c ).

3.4.2 $$\mathbb {N}$$-Recognizable and $$\mathbb {N}_\infty$$-Recognizable Formal Series

We have the following useful characterizations of $$\mathbb {N}$$-recognizable and $$\mathbb {N}_\infty$$-recognizable formal series. Here π i denotes the projection onto the ith component.

Theorem 3.4.10

Let $$S\colon A^*\to \mathbb {N}$$ . The following assertions are equivalent.
1. 1.

S is $$\mathbb {N}$$ -recognizable.

2. 2.

There exists a regular language L ⊆ (A × Δ) (where Δ is a finite alphabet) such that, for all w  A+, (S, w) equals the number of z  L with π1(z) = w.

Proof

1 ⇒ 2. Suppose that S is $$\mathbb {N}$$-recognizable. We consider
\displaystyle \begin{aligned} S'\colon A^*\to\mathbb{N},\ w\mapsto \begin{cases} (S,w),& \text{ if } w\neq\varepsilon, \\ 0, & \text{ if } w=\varepsilon. \end{cases} \end{aligned}
Then S′ is $$\mathbb {N}$$-recognizable as it is a finite modification of S. Let (λ, μ, γ) be a linear representation of S′ of size n. We may suppose, without loss of generality, that λ = [1 0⋯0] and γ = [0⋯0 1] T . Indeed, let $$\lambda '=[1\ 0\cdots 0]\in \mathbb {N}^{1\times (n+2)}$$, $$\gamma '=[0\cdots 0 \ 1]^T\in \mathbb {N}^{(n+2)\times 1}$$, and $$\mu '\colon A^*\to \mathbb {N}^{(n+2)\times (n+2)}$$ be the morphism defined by
\displaystyle \begin{aligned} \mu'(a) =\begin{bmatrix} 0 & [\lambda\mu(a)] & [\lambda\mu(a)\gamma] \\ \begin{array}{c} 0 \\ \vdots \\ 0 \end{array} & \begin{bmatrix} \\ \mu(a) \\ \\ \end{bmatrix} & \begin{bmatrix} \\ \mu(a)\gamma \\ \\ \end{bmatrix}\\ 0 & [0\cdots 0] & 0 \end{bmatrix}, \text{ for }a\in A. \end{aligned}
Then (λ′, μ′, γ′) is a linear representation of S′ of size n + 2.
Let $$\mathcal {M}=(Q,q_0,F,A\times Q,\delta )$$ be the DFA defined as follows. Let
\displaystyle \begin{aligned} m=\max_{\substack{a\in A\\ 1\le i,j\le n}}\mu(a)_{ij} \end{aligned}
and
\displaystyle \begin{aligned} Q &=\{(i,r)\mid 1\le i\le n,\ 1\le r\le m\}\\ q_0 &=(1,1)\\ F &=\{(n,r)\mid 1\le r\le m\}\\ \delta((i,r),(a,(j,s))) &=(j,s) \text{ if } 1\le s\le \mu(a)_{ij}. \end{aligned}
So δ((i, r), (a, (j, s))) is not defined if s > μ(a) ij , and not every state in Q is necessarily accessible. We show by induction on |w| that μ(w) ij equals the number of paths of label z with π1(z) = w from (i, r) to {(j, s)∣1 ≤ s ≤ m} (for any 1 ≤ r ≤ m). Let Pi,j(w) denote the number of such paths. The base case w = ε is clear as μ(ε) is the identity matrix of size n, and Pi,j(ε) is equal to 1 if i = j and to 0 else. For a ∈ A and x ∈ A,
\displaystyle \begin{aligned} P_{i,k}(a)=\mathrm{Card}\{s\mid \delta((i,r),(a,(k,s)))=(k,s)\}=\mu(a)_{ik}. \end{aligned}
and
\displaystyle \begin{aligned} \mu(ax)_{ij} =\sum_{k=1}^n\mu(a)_{ik}\mu(x)_{kj} =\sum_{k=1}^n P_{i,k}(a) P_{k,j}(x) =P_{i,j}(ax), \end{aligned}
where we have applied the induction hypothesis to x. Now if L is the language accepted by $$\mathcal {M}$$, then, for all w ∈ A+, (S, w) = (S′, w) = λμ(w)γ = μ(w)1n = P1,n(w) = Card{z ∈ Lπ1(z) = w}.
2 ⇒ 1. Suppose that $$\mathcal {M}=(Q,q_1,F,A\times Q,\delta )$$ is a DFA accepting a language L ⊆ (A × Δ) such that, for all w ∈ A+, (S, w) equals the number of z ∈ L with π1(z) = w. Let Q = {q1, …, q n }. Define $$\lambda =[1\ 0\cdots 0]\in \mathbb {N}^{1\times n}$$, $$\gamma \in \mathbb {N}^{n\times 1}$$ be such that γi1 = 1 if q i  ∈ F and γi1 = 0 if q i F. Let μ(a) ij be the number of paths of label z with π1(z) = a from q i to q j , and let $$\mu \colon A^*\to \mathbb {N}^{n\times n}$$ be the induced morphism. It is easy to see that, for all w ∈ A, μ(w) ij is the number of paths of label z with π1(z) = w from q i to q j . Then, for all w ∈ A+,
\displaystyle \begin{aligned} \lambda\mu(w)\gamma=\sum_{\substack{1\le j\le n\\ q_j\in F}}\mu(w)_{1j}=\mathrm{Card}\{z\in L\mid \pi_1(z)=w\}=(S,w). \end{aligned}
This proves that S is $$\mathbb {N}$$-recognizable (whatever the value (S, ε) is). □

We sometimes want to count quantities that might be unbounded in certain entries, as, for example, the length of the longest square (or k-power, overlap, palindrome, unbordered factor, etc.) beginning at position i.

Proposition 3.4.11

If $$S\colon A^*\to \mathbb {N}$$ is $$\mathbb {N}_{\infty }$$ -recognizable, then it is $$\mathbb {N}$$ -recognizable.

Proof

Let n ≥ 1, $$\lambda \in \mathbb {N}_{\infty }^{1\times n}$$, $$\gamma \in \mathbb {N}_{\infty }^{n\times 1}$$, and a morphism of monoids $$\mu \colon A^*\to \mathbb {N}_{\infty }^{n\times n}$$ such that, for all w ∈ A, (S, w) = λμ(w)γ. As, for all w ∈ A, $$(S,w)\in \mathbb {N}$$, any occurrence of in the computation of λμ(w)γ must belong to a multiplication with 0. Hence we can modify λ, γ, μ to λ′, γ′, μ′ by replacing any occurrence of by 0. In this way, $$\lambda '\in \mathbb {N}^{1\times n}$$, $$\gamma '\in \mathbb {N}^{n\times 1}$$, $$\mu '\colon A^*\to \mathbb {N}^{n\times n}$$, and, for all w ∈ A, (S, w) = λ′μ′(w)γ′. This shows that S is $$\mathbb {N}$$-recognizable. □

Lemma 3.4.12

If $$S\colon A^*\to \mathbb {N}_\infty$$ is $$\mathbb {N}_\infty$$-recognizable, then the language {w  A∣(S, w) = ∞} is regular.

Proof

Let (λ, μ, γ) be a linear representation of S. Consider the set {0, p, } (where p is any symbol, intended to represent positive integers). We endow this set with a structure of commutative semiring as follows: 0 + 0 = 1, p + 0 = p + p = p, p +  =  +  = , 0 ⋅ 0 = p ⋅ 0 = ⋅ 0 = 0, p ⋅ p = p, and p ⋅ =  = . Define a morphism of semirings $$\tau \colon \mathbb {N}_\infty \to \{0,p,\infty \}$$ by τ(0) = 0, τ(n) = p for $$n\in \mathbb {N}\setminus \{0\}$$, and τ() = . Now we define a DFA $$\mathcal {M}=(Q,q_0,F,A,\delta )$$ as follows: Q = {0, p, }n, q0 = [τ(λ11)⋯τ(λ1n)], F = {q ∈ Qq [τ(γ11)⋯τ(γn1)] T } = }, and δ(q, a) = q (τ(μ(a) ij ))1≤i,jn. We have δ(q0, w) ∈ Fτ(λμ(w)γ) =  ⇔ (S, w) = λμ(w)γ = . This proves that $$\mathcal {M}$$ accepts {w ∈ A∣(S, w) = }. □

Theorem 3.4.13

Let $$S\colon A^*\to \mathbb {N}_\infty$$ . The following assertions are equivalent.
1. 1.

S is $$\mathbb {N}_\infty$$ -recognizable.

2. 2.

There exists a regular language L ⊆ ((A ∪{#}) × Δ) (where #A and Δ is a finite alphabet) such that, for all w  A+, (S, w) equals the number of z  L with τ # (π1(z)) = w, where τ # is the morphism defined by aa for a  A and #ε.

Proof

1⇒2. Suppose that S is $$\mathbb {N}_\infty$$-recognizable. By Lemma 3.4.12, the language L1 = {w ∈ A∣(S, w) = } is regular. Now, the series $$S'=S\odot \chi _{\{w\in A^*\mid (S,w)\neq \infty \}}$$ is $$\mathbb {N}$$-recognizable by Propositions 3.4.3 and 3.4.11. From Theorem 3.4.10, we get a regular language L2 ⊆ (A × Δ) (for some alphabet Δ) such that, for all w ∈ A+, (S′, w) = Card{z ∈ L2π1(z) = w}. Let a ∈ Δ and let #A. Then define L3 = {z ∈ (A ∪{#}) × Δ)π1(z) ∈ L1#, π2(z) ∈ a}. Clearly L3 is regular, and, for all w ∈ A+, (S, w) = Card{z ∈ L2 ∪ L3τ # (π1(z)) = w}.

2 ⇒ 1. Suppose that L ⊆ ((A ∪{#}) × Δ) is such that, for all w ∈ A+, (S, w) = Card{z ∈ Lτ # (π1(z)) = w} and that $$\mathcal {M}=(Q,q_1,F,A,\delta )$$ is a DFA accepting L. Let Q = {q1, …, q n ). For each a ∈ A ∪{#}, we define a matrix $$D_a\in \mathbb {N}^{n\times n}$$ as follows: (D a ) ij equals the number of letters b ∈ Δ such that . Then any finite path in $$\mathcal {M}$$ labeled z with τ # (π1(z)) = a1a , with the a i ’s in A, is of the form
where • could be anything. Now, let $$D=\sum _{i\ge 0}D_\#^i\in \mathbb {N}_\infty ^{n\times n}$$. Then the computation $$(DD_{a_1}DD_{a_2}\cdots DD_{a_\ell }D)_{ij}$$ returns the number of such paths from q i to q j . Let $$\lambda =[1\ 0\cdots 0]\in \mathbb {N}^{1\times n}$$ and $$\gamma \in \mathbb {N}^{n\times 1}$$ be defined by γi1 = 1 if q i  ∈ F and γi1 = 0 if q i F. Let $$\mu \colon A^*\to \mathbb {N}_\infty ^{n\times n}$$ be the morphism defined by μ(a) = DD a for a ∈ A, and let γ′ = . Then, for all w = a1a  ∈ A+,
\displaystyle \begin{aligned} (S,w)&=\mathrm{Card}\{z\in L\mid \tau_\#(\pi_1(z))=w\}\\ &=\sum_{1\le j\le n,\, q_j\in F} (DD_{a_1}DD_{a_2}\cdots DD_{a_\ell}D)_{1j}\\ &=\lambda\mu(a_1\cdots a_\ell)D\gamma\\ &=\lambda\mu(w)\gamma'. \end{aligned}
This shows that S is $$\mathbb {N}_{\infty }$$-recognizable (whatever the value (S, ε) is). □

3.4.3 Counting b-Definable Properties of b-Automatic Sequences Is b-Regular

We are now able to prove the main result of this section, namely, Theorem 3.4.15.

Proposition 3.4.14

If $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is $$(\mathbb {N}_{\infty },b)$$ -regular, then it is $$(\mathbb {N},b)$$ -regular.

Proof

Suppose that $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is $$(\mathbb {N}_{\infty },b)$$-regular. Then $$\sum _{w\in (A_b^{\ d})^*} x(\mathrm {val}_b(w))\,w$$ is $$\mathbb {N}_{\infty }$$-recognizable. By Proposition 3.4.11, the latter formal series is indeed $$\mathbb {N}$$-recognizable since $$(S,w)=x(\mathrm {val}_b(w))\in \mathbb {N}$$ for all $$w\in (A_b^{\ d})^*$$. Hence x is $$(\mathbb {N},b)$$-regular. □

Theorem 3.4.15

If X is a b-definable subset of $$\mathbb {N}^{d+1}$$ , then the sequence $$a\colon \mathbb {N}^d\to \mathbb {N}_{\infty }$$ defined by
\displaystyle \begin{aligned} \forall (n_1,\ldots,n_d)\in\mathbb{N}^d,\ a(n_1,\ldots,n_d)=\mathrm{Card}\{m\in\mathbb{N}\mid (n_1,\ldots,n_d,m)\in X\}, \end{aligned}
(3.4)

is $$(\mathbb {N}_{\infty },b)$$ -regular. If moreover $$a(\mathbb {N}^d)\subseteq \mathbb {N}$$ , then a is $$(\mathbb {N},b)$$ -regular.

Proof

By Theorem 3.3.4, X is b-recognizable. So, the language
\displaystyle \begin{aligned} L=\{(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_{d+1}))^\#\mid (n_1,\ldots,n_{d+1})\in X\} \end{aligned}
is regular by Proposition 3.2.2. Then, for all $$n_1,\ldots ,n_d\in \mathbb {N}$$,
\displaystyle \begin{aligned} a(n_1,\ldots,n_d)=\mathrm{Card}\{z\in L\mid \pi_{1,\ldots,d}(z)\in\mathtt{\textbf{\#}}^*(\mathrm{rep}_b(n_1),\ldots,\mathrm{rep}_b(n_d))^\#\} \end{aligned}
where π1,…,d denotes the projection onto the first d components. Let A = (A b ∪{#}) d  ∖{#} and
\displaystyle \begin{aligned} S\colon A^*\to\mathbb{N}_{\infty},\ w\mapsto \mathrm{Card}\{z\in L\mid\pi_{1,\ldots,d}(z)\in\mathtt{\textbf{\#}}^*w\}. \end{aligned}
Observe that, for all w ∈ A and z ∈ L, we have π1,…,d(z) ∈#wτ # (π1,…,d(z)) = w since w does not contain the letter #. Here τ # is the morphism defined by aa for a ∈ A and #ε. Then S is $$\mathbb {N}_{\infty }$$-recognizable by Theorem 3.4.13. As (S, (rep b (n1), …, rep b (n d )) # ) = a(n1, …, n d ) for all $$n_1,\ldots ,n_d\in \mathbb {N}$$, we obtain that a is $$(\mathbb {N}_{\infty },b)$$-regular by Proposition 3.4.6.

The fact that a is $$(\mathbb {N},b)$$-regular if $$a(\mathbb {N})\subseteq \mathbb {N}$$ follows from Proposition 3.4.14. □

As an application, the factor complexity of a b-automatic sequence is $$(\mathbb {N},b)$$-regular.

Proposition 3.4.16

The factor complexity n↦Card(L n (x)) of a b-automatic sequence $$x\colon \mathbb {N}\to \mathbb {N}$$ is $$(\mathbb {N},b)$$-regular.

Proof

Let $$x\colon \mathbb {N}\to \mathbb {N}$$ be a b-automatic sequence. For all $$n\in \mathbb {N}$$, $$\mathrm {Card}(L_n(x))=\mathrm {Card}\{i\in \mathbb {N}\mid \forall j<i,\ x(j)\cdots x(j+n-1)\neq x(i)\cdots x(i+n-1)\}$$. Now let X = {(i, n)∣∀j < i, ∃t < n, x(j + t) ≠ x(i + t)}. Then $$X\subseteq \mathbb {N}^2$$ is b-definable by Theorem 3.3.4, and, for all $$n\in \mathbb {N}$$, we have $$\mathrm {Card}(L_n(x))=\mathrm {Card}\{i\in \mathbb {N}\mid (i,n)\in X\}$$; hence, the factor complexity of x is $$(\mathbb {N},b)$$-regular by Theorem 3.4.15. □

In a similar manner, we can show the following. In order not to overburden the text, we do not define these counting functions here and refer the interested reader to [148].

Proposition 3.4.17

Let $$x\colon \mathbb {N}\to \mathbb {N}$$ be a b-automatic sequence.
• The function that maps n to the number of squares (or palindromes, unbordered factors, k-powers) of x beginning at position n is $$(\mathbb {N}_{\infty },b)$$ -regular.

• The recurrence function of x is $$(\mathbb {N}_{\infty },b)$$ -regular.

• The appearance function of x is $$(\mathbb {N},b)$$ -regular.

• The separator length function of x is $$(\mathbb {N},b)$$ -regular.

• The permutation complexity of x is $$(\mathbb {N},b)$$ -regular.

• The periodicity function of x is $$(\mathbb {N}_{\infty },b)$$ -regular.

• The function that maps n to the number of unbordered factors of length n of x is $$(\mathbb {N},b)$$ -regular.

Using the same technique, it can be shown that all these quantities are either O(n) or infinite for at least one n.

Proposition 3.4.18

Let X be a b-definable subset of $$\mathbb {N}^2$$, and let $$a\colon \mathbb {N}\to \mathbb {N}_{\infty }$$ be the sequence defined by $$a(n)=\mathrm {Card}\{m\in \mathbb {N}\mid (n,m)\in X\}$$ for all $$n\in \mathbb {N}$$. Then either a(n) = ∞ for some $$n\in \mathbb {N}$$ or a(n) = O(n).

Proof

If $$L\in \mathbb {N}$$ is such that for all (m, n) ∈ X, |rep b (m)|≤|rep b (n)| + L, then for all $$n\in \mathbb {N}$$, a(n) ≤ b L n. If a is not O(n), then for all $$L\in \mathbb {N}$$, there exists (m, n) ∈ X such that |rep b (m)| > |rep b (n)| + L. Therefore (rep b (m), # K rep b (n)) ∈rep b (X) # for some K > L. As X is b-definable, there is a DFA accepting rep b (X) # . By choosing L equal to the number of states of this DFA and applying the pumping lemma, we obtain infinitely many elements (m′, n) in X. This means that a(n) = . □

It seems more difficult to obtain similar enumeration results in the multidimensional setting. For example, what about the following question?

Problem 3.4.19

Must the function $$f\colon \mathbb {N}^2\to \mathbb {N}$$ that counts the number of rectangular factors of size m × n in a bidimensional b-automatic sequence be $$(\mathbb {N},b)$$-regular?

3.4.4 b-Synchronized Sequences

The family of b-synchronized sequences lies in between the families of b-automatic sequences and b-regular sequences; see Proposition 3.4.21 and Theorem 3.4.23 below. Therefore, a natural question in the context developed in the present chapter is whether (various) enumeration problems about b-automatic sequences can or cannot be described by b-synchronized sequences.

Definition 3.4.20

A sequence $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is b-synchronized if its graph, i.e., the subset
\displaystyle \begin{aligned} G_x:=\{(n_1,\ldots,n_d,x(n_1,\ldots,n_d))\mid n_1,\ldots,n_d\in\mathbb{N}\}\end{aligned}
of $$\mathbb {N}^{d+1}$$, is b-recognizable.

Proposition 3.4.21

Let A be a finite subset of $$\mathbb {N}$$ and let $$x\colon \mathbb {N}^d\to A$$ . Then x is b-synchronized if and only if it is b-automatic.

Proof

For each a ∈ A, $$x^{-1}(a)=\{(n_1,\ldots ,n_d)\in \mathbb {N}^d\mid (n_1,\ldots ,n_d,a)\in G_x\}$$ and G x  =⋃aA (x−1(a) ×{a}). Therefore, the result follows from Proposition 3.2.8 and Theorem 3.3.4. □

Note that the use of Theorem 3.3.4 in the previous proof is somewhat superfluous since we could easily build finite automata recognizing the fibers x−1(a) and the graph G x .

We have the following useful lemma.

Lemma 3.4.22

If $$x\colon \mathbb {N}^d\to \mathbb {N}$$ is a b-synchronized sequence, then there is a b-definable subset X of $$\mathbb {N}^{d+1}$$ such that, for all $$n_1,\ldots ,n_d\in \mathbb {N}$$, $$x(n_1,\ldots ,n_d)=\mathrm {Card}\{m\in \mathbb {N}\mid (n_1,\ldots ,n_d,m)\in X\}$$.

Proof

Let x be a b-synchronized sequence. Then G x is b-definable by Theorem 3.3.4. Therefore, the subset $$X=\{(n_1,\ldots ,n_d,m)\in \mathbb {N}^{d+1}\mid m<x(n_1,\ldots ,n_d)\}=\{(n_1,\ldots ,n_d,m)\in \mathbb {N}^{d+1}\mid \exists \ell \ (n_1,\ldots ,n_d,\ell )\in G_x \text{ and }m<\ell \}$$ is b-definable as well, and of course $$x(n_1,\ldots ,n_d)=\mathrm {Card}\{m\in \mathbb {N}\mid (n_1,\ldots ,n_d,m)\in X\}$$ for all $$n_1,\ldots ,n_d\in \mathbb {N}$$. □

Theorem 3.4.23

Any b-synchronized sequence is $$(\mathbb {N},b)$$ -regular.

Proof

This is a consequence of Lemma 3.4.22 and Theorem 3.4.15. □

Proposition 3.4.24

If $$x\colon \mathbb {N}\to \mathbb {N}$$ is b-synchronized, then x(n) is O(n).

Proof

The result is a consequence of Lemma 3.4.22 and Proposition 3.4.18. □

We saw in Proposition 3.4.16 that the factor complexity of a b-automatic sequence is $$(\mathbb {N},b)$$-regular. In fact, we have the more precise following result, which we give without proof.

Proposition 3.4.25 ([522])

Let $$x\colon \mathbb {N}\to \mathbb {N}$$ be a b-automatic sequence. Then the factor complexity of x is b-synchronized.

In view of Propositions 3.4.18 and 3.4.24, one might think that all the quantities of Proposition 3.4.17 are in fact b-synchronized. However, it is not the case.

Proposition 3.4.26

Let $$X=\{2^i\mid i\in \mathbb {N}\}$$. Then χ X is 2-automatic, but the function that counts the number of unbordered factors of length n of χ X is not 2-synchronized.

Proof

As rep b (X) = 10, we get that χ X is 2-automatic. Let $$y\colon \mathbb {N}\to \mathbb {N}$$ be the function that maps n to the number of unbordered factors of length n of χ X . Suppose that y is 2-synchronized, i.e., that its graph $$G_y=\{(n,y(n))\mid n\in \mathbb {N}\}$$ is 2-recognizable. Then rep2(G) is accepted by some DFA $$\mathcal {M}$$. For all integers n ≥ 2, we have y(2 n  + 1) = n + 2; hence, $$(10^{n-1}1,0^{n-\lfloor \log _2(n+2)\rfloor }\mathrm {rep}_2(n+2))$$ is accepted by $$\mathcal {M}$$. By choosing n −⌊log2(n + 2)⌋ to be larger than the size of $$\mathcal {M}$$, the result follows from an application of the pumping lemma. □

3.5 First-Order Logic and U-Automatic Sequences

In order to be able to provide a logical framework for positional numeration systems, we encounter two major problems:
• In general, $$\mathbb {N}$$ is not U-recognizable.

• In general, the addition is not recognized by finite automaton.

Theorem 3.5.3 below shows that a nice setting is given by the so-called Pisot numeration systems.

Definition 3.5.1

A Pisot number is an algebraic integer greater than 1 such that all of its Galois conjugates have moduli less than 1.

Definition 3.5.2

A positional numeration system rep U is Pisot if the base sequence U satisfies a linear recurrence whose characteristic polynomial is the minimal polynomial of a Pisot number.

Theorem 3.5.3 ([113, 232])

If rep U is a Pisot numeration system, then the sets $$\mathbb {N}$$ and $$\{(x,y,z)\in \mathbb {N}^3\mid x+y=z\}$$ are U-recognizable.

Definition 3.5.4

A subset of $$\mathbb {N}^d$$ is U-definable if it is definable in the logical structure $$\langle \mathbb {N},+,V_U\rangle$$, where V U (0) = 1, and for x a positive integer, V U (x) denotes the smallest U i occurring in the greedy U-representation of x with a nonzero coefficient.

Example 3.5.5

We have V F (11) = 3 and V F (26) = 5.

Theorem 3.5.6 ([113])

If rep U is a Pisot numeration system, then a subset of $$\mathbb {N}^d$$ is U-recognizable if and only if it is U-definable. Consequently, the first-order theory of $$\langle \mathbb {N},+,V_U\rangle$$ is decidable.

As an application, one can prove (and reprove, or verify) many results about the Fibonacci word
\displaystyle \begin{aligned} f=01001010010 0101001010010 01010010 \cdots \end{aligned}
(which is the fixed point of 0↦01, 1↦0). Indeed, the Fibonacci word f is an F-automatic sequence as it is generated by the DFAO of Figure 3.4 whenever the inputs are the Zeckendorf representations of nonnegative integers.
Here are some concrete applications (among many others), all of which have been shown in a purely mechanical way [427]. Again, in order not to overburden the text, we give no definition but one. An infinite word is linearly recurrent if there exists a constant C such that the distance between any two occurrences of any factor x is at most C|x|. For the missing definitions (neither included here nor in Chapter ), we refer the interested reader to [427].
• f is not ultimately periodic.

• f contains no fourth powers.

• f is reversal invariant.

• f is linearly recurrent.

• Characterizations of the squares (or cubes, antisquares, palindromes, antipalindromes) occurring in f.

• Characterizations of the least periods of factors (or unbordered factors, Lyndon factors, special factors) of f.

• Computation of the critical exponent and initial critical exponent of f.

• The lexicographically least element in the shift orbit closure $$\mathcal {S}(f)$$ is 0f.

In a similar fashion, one can also obtain results concerning the Tribonacci word
\displaystyle \begin{aligned} t=01 02 010 01020 010201001 01020100102010102 \cdots \end{aligned}
(which is the fixed point of 0↦01, 1↦02, 2↦0) [428]. In this case, we work within the positional numeration system based on the sequence $$U\colon \mathbb {N}\to \mathbb {N}$$ defined by U(0) = 1, U(1) = 2, U(2) = 3 and U(n + 3) = U(n + 2) + U(n + 1) + U(n) for $$n\in \mathbb {N}$$.

We end this section by a problem.

Problem 3.5.7

Do the results on enumeration of b-automatic sequences described in this section extend to Pisot numeration systems?

3.6 First-Order Logic and Real Numbers

In general real numbers are represented by infinite words. In this context, we consider Büchi automata, which allows us to define a notion of (base-related) recognizability of multidimensional sets of reals. In the continuity of the ideas developed so far, we will show that the so-called β-recognizable sets can again be characterized in terms of first-order logic, which will provide us with decision procedures for various problems concerning those sets.

3.6.1 Büchi Automata

Büchi automata are defined as NFAs, but the acceptance criterion has to be adapted: an infinite word is accepted if it labels a path going infinitely many times through an accepting state. In the present chapter, we always assume that a Büchi automaton is finite. Without loss of generality, we also always assume that there is only one initial state.

Example 3.6.1

The Büchi automaton of Figure 3.5 accepts the infinite words over {a, b} containing finitely many a’s.

Subsets of $$A^{\mathbb {N}}$$ are called ω-languages, and ω-regular languages are defined as ω-languages which are accepted by (finite) Büchi automata. Regular languages and ω-regular languages share some important properties: their families are closed under Boolean operations, morphic image and inverse image under a morphism. Nevertheless, they differ in some other aspects. One of them is determinism. As with DFAs, we can define deterministic Büchi automata. But one has to be careful as the family of ω-languages that are accepted by deterministic Büchi automata is strictly included in that of ω-regular languages.

Example 3.6.2

No deterministic Büchi automaton accepts the ω-language accepted by the Büchi automaton of Figure 3.5.

For more on automata reading infinite words, see [476]. Let us stress that, contrary to the present chapter, Büchi automata are not considered finite by default in [476].

3.6.2 Real Bases β

Throughout the text, β designates a real number greater than 1. For a real number x, any infinite word u = u u1u0 ⋆ u−1u−2⋯ with  ≥ 0, u i  ∈ C for all i ≤  where C is a finite subset of $$\mathbb {Z}$$ and such that
\displaystyle \begin{aligned} \mathrm{val}_\beta(u):= \sum_{-\infty < i \le \ell} u_i \, \beta^i = x \end{aligned}
is a β-representation of x. In general, this is not unique.

Note that β-numeration systems are also presented in Chapter .

Example 3.6.3

Consider x = ϕ−1, where ϕ is the Golden Ratio. The words u = 0 ⋆ 001111⋯ , v = 0 ⋆ 0101010⋯, and w = 0 ⋆ 10 ω are all β-representations of x.

For x ≥ 0, among all β-representations of x, we distinguish the β-expansion
\displaystyle \begin{aligned} d_\beta(x)=x_\ell\cdots x_1 x_0\star x_{-1}x_{-2}\cdots \end{aligned}
which is obtained by the greedy algorithm: we fix the minimal $$\ell \in \mathbb {N}$$ such that
\displaystyle \begin{aligned} x=\sum_{-\infty < i \leq \ell} x_i\, \beta^i \text{ and, for all }i \le \ell,\ x_i \ge 0, \end{aligned}
and, for all k ≤ ,
\displaystyle \begin{aligned} \sum_{-\infty < i \le k} x_i\, \beta^i < \beta^{k+1}. \end{aligned}
The digits x i then belong to the alphabet A β  = {0, …, ⌈β⌉− 1}. One has x  ≠ 0 if and only if x ≥ 1 and real numbers in [0, 1) have a β-expansion of the form 0 ⋆ u with $$u\in A_\beta ^{\mathbb {N}}$$. In particular, d β (0) = 0 ⋆ 0 ω .
In order to deal with negative numbers, $$\overline {a}$$ denotes the integer − a for all $$a\in \mathbb {Z}$$. Moreover we write $$\overline {u\, v}=\overline {u}\, \overline {v}$$, $$\overline {u\star v}=\overline {u}\star \overline {v}$$, and $$\overline {\overline {u}}=u$$. For x < 0, the β-expansion of x is defined as
\displaystyle \begin{aligned} d_\beta(x)=\overline{d_\beta(-x)}. \end{aligned}
We let $$\bar {A}_\beta = \{\bar {0},\bar {1},\dots ,\overline {\lceil \beta \rceil -1}\}$$ and $$\tilde {A}_\beta =A_\beta \cup \bar {A}_\beta$$ (with $$\bar {0} = 0$$).

Now let us define the β-expansion of a vector x of $$\mathbb {R}^d$$.

Definition 3.6.4

Let x = (x1, …, x d ) be a vector in $$\mathbb {R}^d$$. We define the β-expansion of x as being the word d β (x) over the alphabet $$\tilde {A}_\beta ^{\ d}\cup \{{\scriptstyle \bigstar }\}$$ that belongs to 0d β (x1) × 0d β (x2) ×⋯ × 0d β (x d ) and that does not start with 0 except if |x i | < 1 for all i, in which case we consider the word starting with $$\mathbf {0}{\scriptstyle \bigstar }$$.

Otherwise stated, the β-expansions of each component are synchronized by possibly using some leading zeros in such a way that all the ⋆  symbols occur at the same position in every β-expansion.

Example 3.6.5

Consider $$\mathbf {x}=(x_1,x_2)=(\frac {1+\sqrt {5}}{4},2+\sqrt {5})$$. We have
\displaystyle \begin{aligned} d_\phi(\mathbf{x})= \begin{array}{cccccccccccc} 0&0&0&0& \star &1&0&0&1&0&0&\cdots\\ 1&0&0&0& \star &0&0&0&0&0&0&\cdots\\ \end{array} \end{aligned}
where the first ϕ-expansion is padded with some leading zeros. Now we consider an example where all the components have moduli less than one. With $$\mathbf {y}=(x_1,x_2)=(\frac {1+\sqrt {5}}{4},-\frac {1}{2})$$, we get
\displaystyle \begin{aligned} d_\phi(\mathbf{y})= \begin{array}{ccccccccc} 0& \star &1&0&0&1&0&0&\cdots\\ 0& \star &0&\overline{1}&0&0&\overline{1}&0&\cdots \end{array} \end{aligned}
where the two ϕ-expansions start with one symbol 0 followed by ⋆ .

We let $$S_\beta (\mathbb {R}^d)$$ be the topological closure of $$\mathbf {0}^*d_\beta (\mathbb {R}^d)$$. For $$u{\scriptstyle \bigstar } v \in (\mathbb {Z}^d)^+{\scriptstyle \bigstar }(\mathbb {Z}^d)^{\mathbb {N}}$$ with finitely many possible digits, we define $$\mathrm {val}_\beta (u{\scriptstyle \bigstar } v)$$ to be the vector in $$\mathbb {R}^d$$ obtained by evaluating each component of $$u{\scriptstyle \bigstar } v$$.

Definition 3.6.6

For $$X\subseteq \mathbb {R}^d$$, we define S β (X) as $$S_\beta (X)=S_\beta (\mathbb {R}^d)\cap \mathrm {val}_\beta ^{-1}(X)$$. For $$\mathbf {x}\in \mathbb {R}^d$$, the elements in S β (x) are called the quasi-greedy β-representations of x.

Here and throughout the text, we write S β (x) instead of S β ({x}). Note that β-expansions are particular quasi-greedy β-representations.

Remark 3.6.7

If β is an integer, then S β (X) is the set of all β-representations of elements in X. Otherwise stated, when β is an integer, any β-representation is a quasi-greedy β-representation.

Proposition 3.6.8

Let $$X\subseteq \mathbb {R}^d$$. Then X is closed if and only if S β (X) is closed.

Proof

Suppose first that X is closed. Then $$\mathrm {val}_\beta ^{-1}(X)$$ is closed since the function $$\mathrm {val}_\beta \colon (\tilde {A}_\beta ^{\ d})^+ {\scriptstyle \bigstar } (\tilde {A}_\beta ^{\ d})^\omega \to \mathbb {R}^d$$ is continuous. As $$S_\beta (\mathbb {R}^d)$$ is closed by definition, we obtain that $$S_\beta (X)=S_\beta (\mathbb {R}^d)\cap \mathrm {val}_\beta ^{-1}(X)$$ is closed as well.

Conversely, suppose that S β (X) is closed, and let x(n) be a sequence of X converging to some x. By the pigeonhole principle, there exists a subsequence x(k(n)) of x(n) such that, for all n, x(k(n)) −x has a constant sign (potentially 0) on each component. Then the sequence d β (x(k(n))) converges to some $$u{\scriptstyle \bigstar } v\in S_\beta (X)$$. The function val β being continuous, we have $$\mathrm {val}_\beta (u{\scriptstyle \bigstar } v)=\mathbf {x}$$, and hence x ∈ X. This proves that X is closed. □

As usual, we let $$d_\beta ^{\,*}(1)$$ denote the lexicographically greatest $$w\in \mathbb {N}^{\mathbb {N}}$$ not ending in 0 ω and such that val β (0 ⋆ w) = 1. The infinite word $$d_\beta ^{\,*}(1)$$ has the property of being the supremum of all its shifted sequences; see, for instance, [386]. For all bases β > 1, one has d β (1) = 1 ⋆ 0 ω , whereas the definition of $$d_\beta ^*(1)$$ indeed depends on β. The following theorem is known as Parry’s theorem or Parry’s criterion. A proof of this result can be found in [386].

Theorem 3.6.9 (Parry [469])

Let u = u u1u0 ⋆ u−1u−2with ℓ ≥ 0 and $$u_i\in \mathbb {N}$$ for all i  ℓ. Then
\displaystyle \begin{aligned} u\in 0^*d_\beta(\mathbb{R}^{\ge 0}) & \iff \forall k \le \ell,\, u_k u_{k-1}\cdots < d_\beta^{\, *}(1), \mathit{\text{ and}} \\ u\in S_\beta(\mathbb{R}^{\ge 0}) & \iff \forall k \le \ell,\, u_k u_{k-1}\cdots \le d_\beta^{\, *}(1). \end{aligned}

Example 3.6.10

We continue Example 3.6.3. We have $$d_\phi ^*(1)=(10)^\omega$$. Thanks to Parry’s theorem, the ϕ-expansions of real numbers in [0, 1) are of the form 0 ⋆ u, where $$u\in \{0,1\}^{\mathbb {N}}$$ does not contain 11 as a factor and does not end in (10) ω . So the ϕ-expansion of x is w, but both v and w belong to S β (x).

The following proposition characterizes which real numbers admit quasi-greedy β-representations other than those of the form 0 d β (x): they are exactly the real numbers in the set $$\{\frac {x}{\beta ^i}\mid x\in \mathbb {Z}_\beta ,\ i\in \mathbb {N}\}$$, where $$\mathbb {Z}_\beta$$ is the set of the so-called β-integers. The notion of β-integers will be central in Section 3.6.5 and thus deserves a proper definition.

Definition 3.6.11

A real number x is a β-integer if d β (x) is of the kind u ⋆ 0 ω . The set of β-integers is denoted by $$\mathbb {Z}_\beta$$.

Proposition 3.6.12

Let x ∈ [0, 1). If d β (x) = 0 ⋆ x1x k 0 ω with k ≥ 1 and x k ≠0, then $$S_\beta (x)=0^*\{ d_\beta (x),\, 0\star x_1\cdots x_{k-1}(x_k-1)d_\beta ^*(1)\}$$, and S β (x) = 0d β (x) otherwise.

Proof

Let u ⋆ v ∈ S β (x). As x ∈ [0, 1), we have u ∈ 0+. If v does not end in $$d_\beta ^*(1)$$, then u ⋆ v ∈ 0d β (x) by Theorem 3.6.9. Suppose now that v ends in $$d_\beta ^*(1)=d_1d_2\cdots$$. Let m ≥ 0 be minimal such that $$v=v_1\ldots v_m d_\beta ^*(1)$$. Then m ≥ 1 and v m  < d1. We claim that d β (x) = 0 ⋆ v1vm−1(v m  + 1)0 ω . By minimality of m, for all 1 ≤ j ≤ m, we have
\displaystyle \begin{aligned} v_j\ldots v_m d_\beta^*(1)<d_\beta^*(1)\le d_1\cdots d_{m-j+1}d_\beta^*(1), \end{aligned}
hence v j v m  < d1dmj+1. If v j vm−1 < d1dmj, then $$v_j\ldots v_{m-1}(v_m+1)0^\omega < d_\beta ^*(1)$$. If v j vm−1 = d1dmj, then v m  < dmj+1 and $$v_j\ldots v_{m-1}(v_m+1)0^\omega \le d_1\cdots d_{m-j+1}0^\omega < d_\beta ^*(1)$$. As val β (0 ⋆ v1vm−1(v m  + 1)0 ω ) = x, we obtain the claim by Theorem 3.6.9.

Now we suppose that d β (x) = 0 ⋆ x1x k 0 ω with k ≥ 1 and x k ≠0 (in particular, x > 0). From the previous paragraph, we obtain that $$S_\beta (x)\subseteq 0^*\{ d_\beta (x),\, 0\star x_1\cdots x_{k-1}(x_k-1)d_\beta ^*(1)\}$$. The other inclusion holds by Theorem 3.6.9.

If d β (x) = 0 ⋆ 0 ω , then x = 0 and S β (0) = 0+ ⋆ 0 ω . Finally we suppose that d β (x) does not end in 0 ω . From the first paragraph, we obtain that if u ⋆ v ∈ S β (x), then u ∈ 0+ and v does not end in $$d_\beta ^*(1)$$. This proves S β (x) = 0d β (x). □

Corollary 3.6.13

Let $$x\in \mathbb {R}^{\ge 0}$$ and let $$d_\beta ^*(1)=d_1d_2\cdots$$.
• If $$d_\beta (x)=x_\ell \cdots x_0\star x_{-1}\cdots x_{-k}0^\omega \in A_\beta ^{\ +}\star A_\beta ^{\ \omega }$$ with xk≠0, then
\displaystyle \begin{aligned} S_\beta(x)=0^*\{d_\beta(x),\, x_\ell\cdots x_0 \star x_{-1}\cdots x_{-k+1}(x_{-k}-1)d_1d_2\cdots\} \end{aligned}
• If $$d_\beta (x)=x_\ell \cdots x_k0^k \star 0^\omega \in A_\beta ^{\ +}\star A_\beta ^{\ \omega }$$ with x k ≠0, then
\displaystyle \begin{aligned} S_\beta(x)=0^*\{d_\beta(x),\, x_\ell\cdots x_{k+1}(x_k-1)d_1\cdots d_k \star d_{k+1}d_{k+2}\cdots\}. \end{aligned}
• S β (x) = 0d β (x) in all other cases.

Moreover, we have $$S_\beta (-x)=\overline {S_\beta (x)}$$.

Definition 3.6.14

A subset X of $$\mathbb {R}^d$$ is β-recognizable if S β (X) is ω-regular.

The following result shows that leading zeros do not affect the β-recognizability of a subset. We omit the proof as it is similar to that of Proposition 3.2.2.

Proposition 3.6.15

Let $$X \subseteq \mathbb {R}^d$$ . The following are equivalent:
• X is β-recognizable.

• $$S_\beta (X)\cap \big ((\tilde {A}_\beta ^{\ d}\setminus \{\mathbf {0}\})(\tilde {A}_\beta ^{\ d})^*{\scriptstyle \bigstar }(\tilde {A}_\beta ^{\ d})^\omega \cup \mathbf {0}{\scriptstyle \bigstar }(\tilde {A}_\beta ^{\ d})^\omega \big )$$ is ω-regular.

• There exists an ω-regular language $$L\subseteq (\tilde {A}_\beta ^{\ d})^+{\scriptstyle \bigstar }(\tilde {A}_\beta ^{\ d})^\omega$$ such that 0(0)−1L = S β (X).

We also have the following nice criterion.

Proposition 3.6.16

Two β-recognizable subsets of $$\mathbb {R}^d$$ coincide if and only if they have the same ultimately periodic quasi-greedy β-representations.

Proof

The result follows from the well-known fact that two ω-regular languages are equal if and only if they have the same ultimately periodic elements [476]. □

In the case of closed subsets of $$\mathbb {R}^d$$, we can require additional conditions on the Büchi automata recognizing them.

Proposition 3.6.17

A β-recognizable subset X of $$\mathbb {R}^d$$ is closed if and only if S β (X) is accepted by a deterministic Büchi automaton all of whose states are final.

Proof

It is easily seen that an ω-regular language L is closed if and only if it is accepted by a deterministic Büchi automaton in which each state is final (see, e.g., [476, Proposition 3.9]). Then the result follows from Proposition 3.6.8. □

We note that, in our context of Büchi automata recognizing sets of real numbers, the final/non-final status of the states occurring before an edge labeled $${\scriptstyle \bigstar }$$ has no impact on the accepted language.

Definition 3.6.18

A Parry number is a real number β greater than 1 for which $$d_\beta ^*(1)$$ is ultimately periodic.

Proposition 3.6.19

If β is Parry, then a subset X of $$\mathbb {R}^d$$ is β-recognizable if and only if d β (X) is ω-regular.

Proof

For the sake of clarity, we do the proof for d = 1. Let $$X\subseteq \mathbb {R}$$. First note that d β (X) is ω-regular if and only if 0d β (X) is as well. By Corollary 3.6.13, we have
\displaystyle \begin{aligned} 0^*d_\beta(X)=S_\beta(X)\setminus \{u\star v\in\tilde{A}_\beta^{\ +}\star \tilde{A}_\beta^{\ \omega}\mid uv\text{ ends in } d_\beta^*(1) \text{ or in } \overline{d_\beta^*(1)}\}. \end{aligned}
As β is a Parry number, $$\{u\star v\in \tilde {A}_\beta ^{\ +}\star \tilde {A}_\beta ^{\ \omega }\mid uv\text{ ends in } d_\beta ^*(1) \text{ or in } \overline {d_\beta ^*(1)}\}$$ is an ω-regular language. This shows that d β (X) is ω-regular if S β (X) is as well.
Conversely, as $$d_\beta ^*(1)=d_1d_2\cdots$$ is ultimately periodic, the two ω-languages
are ω-regular. By Corollary 3.6.13, we have
\displaystyle \begin{aligned} S_\beta(X) = &0^*d_\beta(X) \ \cup \ \pi_2\big( (L_1 \cup L_2 \cup \overline{L_1} \cup \overline{L_2})\cap (0^*d_\beta(X)\times (\tilde{A}_\beta\cup\{\star\})^\omega)\big). \end{aligned}
This proves that S β (X) is ω-regular if d β (X) is as well. □

As a consequence of Propositions 3.6.16 and 3.6.19, we obtain the following result.

Proposition 3.6.20

If β is Parry, then two β-recognizable subsets of $$\mathbb {R}^d$$ coincide if and only if they have the same ultimately periodic β-expansions.

3.6.4 Weakly β-Recognizable Sets of Real Numbers

We now consider particular β-recognizable sets of real numbers, namely, the weakly β-recognizable subsets. We note that we have chosen to respect the original terminology of [95, 384], even though the property of being weakly β-recognizable is in fact stronger than being β-recognizable. This terminology comes from the fact that weak Büchi automata are less expressive than Büchi automata: not all ω-regular languages are accepted by weak Büchi automata.

Definition 3.6.21

A Büchi automaton is said to be weak if each of its strongly connected components contains either only final states or only nonfinal states.

Definition 3.6.22

A subset X of $$\mathbb {R}^d$$ is weakly β-recognizable if S β (X) is accepted by a weak deterministic Büchi automaton.

The advantage of weak deterministic Büchi automata is that they admit a canonical form [384, 551]. Therefore, they can be viewed as the analogues of DFAs for infinite words. Moreover, the family of ω-languages accepted by weak deterministic Büchi automata is closed under the Boolean operations of union, intersection, and complementation [408, 551]. However, let us stress that weak Büchi automata cannot be determinized. For example, the Büchi automaton of Figure 3.5 is clearly weak, but as already pointed out, there is no deterministic Büchi automaton accepting the same ω-language. This has important consequences in our work, namely, for the choice of Definition 3.6.22, which is highlighted by the following remark.

Remark 3.6.23

It is not true that a subset X of $$\mathbb {R}^d$$ is weakly β-recognizable if and only if d β (X) is accepted by a weak deterministic Büchi automaton, even when β is an integer base. Indeed, the set $$\mathbb {R}$$ is weakly 2-recognizable as $$S_2(\mathbb {R})$$ is accepted by the weak deterministic Büchi automaton of Figure 3.6. Yet we have $$S_2(\mathbb {R})\setminus 0^*d_2(\mathbb {R})= \{0,1\}^+\star \{0,1\}^*1^\omega$$. Since the family of ω-languages accepted by weak deterministic Büchi automata is closed under intersection and complementation, if $$d_2(\mathbb {R})$$ were accepted by a weak deterministic Büchi automaton, then {0, 1}1 ω would be as well, which is known to be not true as already mentioned in Example 3.6.2. This remark has to be compared with Proposition 3.6.19.

It is interesting to note that, for closed subsets of $$\mathbb {R}^d$$, the concepts of β-recognizability and weak β-recognizability actually coincide.

Proposition 3.6.24

A closed subset of $$\mathbb {R}^d$$ is β-recognizable if and only if it is weakly β-recognizable.

Proof

This is a straightforward consequence of Proposition 3.6.17. □

The following result is a consequence of Theorem 3.6.9. We first fix some notation that will be useful here and in the proof of Theorem 3.6.29 below. For $$r\in \mathbb {R}$$, we define sign(r) to be +  if r ≥ 0 and − else. If $$\mathbf {x}=(x_1,\ldots ,x_d)\in \mathbb {R}^d$$, then sign(x) = (sign(x1), …, sign(x d )). For $$X\subseteq \mathbb {R}^d$$ and s ∈ {+, −} d , we define X s  = {x ∈ X∣sign(x) = s}).

Proposition 3.6.25

If β is a Parry number, then $$\mathbb {R}^d$$ is weakly β-recognizable.

Proof

As a consequence of Theorem 3.6.9, a DFA $$\mathcal {A}_\beta$$ is canonically associated with any Parry number β. For details on the construction of $$\mathcal {A}_\beta$$, we refer the reader to [386]. This DFA accepts the language of factors of those infinite words u such that 0 ⋆ u = d β (x) for some x ∈ [0, 1). All states of $$\mathcal {A}_\beta$$ are final (as any prefix of a factor is again a factor). Moreover, $$\mathcal {A}_\beta$$ has a loop labeled 0 on its initial state.

Given s ∈{+, −} d , we build a weak deterministic Büchi automaton $$\mathcal {A}_{\beta ,\mathbf {s}}$$ accepting $$S_\beta \big ((\mathbb {R}^d)_{\mathbf {s}}\big )$$. Then the union of those 2 d ω-languages will be $$S_\beta \big (\mathbb {R}^d)$$, which will still be accepted by a weak deterministic Büchi automaton since the class of ω-languages accepted by such automata is closed under union.

We construct the automaton $$\mathcal {A}_{\beta ,\mathbf {s}}$$ by considering two copies of $$\mathcal {A}_\beta \times \cdots \times \mathcal {A}_\beta$$ (d times), one for the β-integer part and one for the β-fractional part of the β-representations. For each state q of $$\mathcal {A}_\beta \times \cdots \times \mathcal {A}_\beta$$, we let (q, int) (resp. (q, frac)) denote the state of $$\mathcal {A}_{\beta ,\mathbf {s}}$$ that corresponds to q in the β-integer (resp. β-fractional) part copy. In all labels of transitions of both copies of $$\mathcal {A}_\beta \times \cdots \times \mathcal {A}_\beta$$, we replace the ith component by its opposite value if s i  = −, and we leave it unchanged otherwise.

The initial state of $$\mathcal {A}_{\beta ,\mathbf {s}}$$ is a new additional state i and, for each transition labeled $$a \in \tilde {A}_\beta ^{\ d}$$ from the initial state to any state (q, int) of the β-integer part copy of $$\mathcal {A}_\beta \times \cdots \times \mathcal {A}_\beta$$, there is a new transition labeled a from i to (q, int). The terminal states are all states (q, frac). We complete $$\mathcal {A}_{\beta ,\mathbf {s}}$$ by adding, for each state q of $$\mathcal {A}_\beta \times \cdots \times \mathcal {A}_\beta$$, a transition from (q, int) to (q, frac) labeled $${\scriptstyle \bigstar }$$. □

Example 3.6.26

The canonical DFA $$\mathcal {A}_\phi$$ is depicted in Figure 3.7. The deterministic Büchi automaton depicted in Figure 3.8 accepts the ω-language $$S_\phi (\mathbb {R}^{\ge 0})$$. Note that the two ϕ-representations v and w of ϕ−1 of Example 3.6.3 are accepted as they are both quasi-greedy, whereas u is not.

Theorem 3.6.27 provides a decomposition of weakly β-recognizable subsets into their β-integer and β-fractional parts. In the case where the base β is an integer, this decomposition is in fact independent of the chosen integer base; this is Theorem 3.6.29.

To express this decomposition, we introduce the following notation. For $$\mathbf {x}\in \mathbb {Z}_\beta ^d$$, we let rep β (x) be defined by $$d_\beta (\mathbf {x})=\mathrm {rep}_\beta (\mathbf {x}){\scriptstyle \bigstar }\mathbf {0}^\omega$$. Note that by Corollary 3.6.13, we have that, for all $$\mathbf {x}\in \mathbb {Z}_\beta ^d$$, $$S_\beta (\mathbf {x}) \cap \big ( (\tilde {A}_\beta ^{\ d})^*{\scriptstyle \bigstar } \mathbf {0}^\omega \big )=\mathbf {0}^*\mathrm {rep}_\beta (\mathbf {x}){\scriptstyle \bigstar } \mathbf {0}^\omega$$. Symmetrically, for $$u\in A_\beta ^+$$, we let $$\mathrm {val}_\beta (u)=\mathrm {val}_\beta (u{\scriptstyle \bigstar }\mathbf {0}^\omega )$$.

Recall that a Büchi automaton is said to be trim if it is accessible and coaccessible, i.e., each state can be reached from the initial state and from each state starts an infinite accepting path. From any given Büchi automaton, we can easily build another Büchi automaton which is trim and accepts the same ω-language. Moreover, if the original Büchi automaton is weak (resp. deterministic), the obtained trim Büchi automaton is as well.

Theorem 3.6.27

Any weakly β-recognizable subset X of $$\mathbb {R}^d$$ is a finite union of sets of the form X I  + X F where $$X^I\subseteq \mathbb {Z}_\beta ^d$$ is such that $$\mathrm {rep}_\beta (X^I)\subseteq (A_\beta ^{\ d})^*$$ is regular and X F  ⊆ [0, 1] d is weakly β-recognizable.

Proof

Let $$X\subseteq \mathbb {R}^ d$$ and let $$\mathcal {A}=(Q,q_0,\tilde {A}_\beta ^{\ d}\cup \{{\scriptstyle \bigstar }\},F,\delta )$$ be a trim deterministic Büchi automaton accepting S β (X). No infinite path (starting from any state) of $$\mathcal {A}$$ contains more than one occurrence of the letter $${\scriptstyle \bigstar }$$. Hence, the set of states Q can be divided into two parts: Q1 containing the states occurring before transitions labeled $${\scriptstyle \bigstar }$$ and Q2 containing the states occurring after those transitions. Note that F ⊆ Q2. Let q1, …, q m be the states of Q2 that can be reached (in one step) by reading the letter $${\scriptstyle \bigstar }$$. Without loss of generality, we assume that the ω-languages accepted from q1, …, q m are pairwise distinct. This implies that, for all $$u\in \mathbf {0}^*\mathrm {rep}_\beta (X\cap \mathbb {Z}_\beta ^d)$$ and all $$\ell \in \mathbb {N}$$, $$q_0\cdot \mathbf {0}^\ell u{\scriptstyle \bigstar }= q_0\cdot u{\scriptstyle \bigstar }$$. For each i, 1 ≤ i ≤ m, we define $$X^I_i=\{\mathrm {val}_\beta (u)\mid q_0\cdot u{\scriptstyle \bigstar }= q_i\}$$, and $$X^F_i=\{\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } v)\mid v \text{ is accepted from } q_i\}$$. We have $$X=\cup _{i=1}^m X^I_i+X^F_i$$. Now, for each i, 1 ≤ i ≤ m, we consider the DFA $$\mathcal {D}_i=(Q_1,q_0,\tilde {A}_\beta ^{\ d},F_i,\delta _1)$$ and the Büchi automaton $$\mathcal {B}_i=(Q_2,q_i,\tilde {A}_\beta ^{\ d},F,\delta _2)$$, where $$F_i=\{q\in Q_1\mid q\cdot {\scriptstyle \bigstar }=q_i\}$$ and δ1 (resp. δ2) is equal to the original transition function δ restricted to the domain $$Q_1\times \tilde {A}_\beta ^{\ d}$$ (resp. $$Q_2\times \tilde {A}_\beta ^{\ d}$$). Then the language accepted by $$\mathcal {D}_i$$ is $$\mathbf {0}^*\mathrm {rep}_\beta (X^I_i)$$ and the ω-language accepted by $$\mathcal {B}_i$$ is $$S_\beta (X^F_i)\cap \big (\mathbf {0}{\scriptstyle \bigstar } \tilde {A}_\beta ^{\ \omega }\big )$$. It is now easy to modify $$\mathcal {B}_i$$ to obtain a deterministic Büchi automaton accepting $$S_\beta (X^F_i)$$. Finally, if in addition $$\mathcal {A}$$ has the property of being weak, then the same is true for the obtained deterministic Büchi automata accepting $$S_\beta (X^F_j)$$. □

Remark that, in the previous proof, it is not true that the union $$X=\cup _{i=1}^m (X^I_i+X^F_i)$$ is disjoint as a Büchi automaton for S β (X) accepts all quasi-greedy β-representations of elements in X.

Example 3.6.28

In the Büchi automaton of Figure 3.8, the infinite paths corresponding to the ϕ-representations d ϕ (1) = 1 ⋆ 0 ω and $$0\star d_\phi ^*(1)=0\star (01)^\omega$$ of 1 go through the two different edges labeled ⋆ . This means that, in the decomposition of Theorem 3.6.27 corresponding to $$X=\mathbb {R}^{\ge 0}$$, the number 1 belongs to all of the sets X I  + X F .

The following result is a stronger version of Theorem 3.6.27 in the restricted case of integer bases. Indeed, in Theorem 3.6.29 below, the sets in the union are independent of the base b, whereas this is not the case in the previous theorem. Unfortunately, this stronger result does not generalize to real bases as in general $$\mathbb {Z}_\beta$$ differs from $$\mathbb {Z}_{\beta '}$$ if β ≠ β′, even for multiplicatively dependent β, β′. For example, $$2\in \mathbb {Z}_{\varphi ^2}\setminus \mathbb {Z}_\varphi$$.

Theorem 3.6.29

Any subset X of $$\mathbb {R}^d$$ is a finite union of sets of the form X I  + X F with $$X^I\subseteq \mathbb {Z}^d$$ and X F  ⊆ [0, 1] d and such that rep b (X I ) is regular and X F is weakly b-recognizable for all b for which X is weakly b-recognizable.

Proof

Let $$X\subseteq \mathbb {R}^d$$. With the notation introduced before Proposition 3.6.25, we have
\displaystyle \begin{aligned} X=\cup_{\mathbf{s}\in\{+,-\}^d}\ X_{\mathbf{s}}, \end{aligned}
and if $$\mathcal {A}$$ is a deterministic Büchi automaton accepting S b (X), then the ω-languages S b (X s ) are accepted by the deterministic Büchi automata obtained from $$\mathcal {A}$$ by only keeping those edges whose labels have sign s. For the sake of simplicity, we suppose that $$X\subseteq (\mathbb {R}^{\ge 0})^d$$. (If we had $$X\subseteq (\mathbb {R}^d)_{\mathbf {s}}$$ for some s≠(+, …, +) (d times), then we would have to discuss the sign of each component separately, which is just a tedious adaptation of what follows.)
For $$\mathbf {i}\in \mathbb {N}^d$$, we define F(X, i) = {x ∈ [0, 1] d i + x ∈ X} and $$I(X,\mathbf {i}) =\{\mathbf {i'} \in \mathbb {N}^d\mid F(X,\mathbf {i})=F(X,\mathbf {i'})\}$$. Then let $$C(X)=\{I(X,\mathbf {i})\mid \mathbf {i}\in \mathbb {N}^d \text{ and }F(X,\mathbf {i})\neq \emptyset \}$$. We have
\displaystyle \begin{aligned} X=\bigcup_{I(X,\mathbf{i})\in C(X)}\ I(X,\mathbf{i})+F(X,\mathbf{i}). \end{aligned}
Now suppose that $$\mathcal {A}$$ is a weak trim deterministic Büchi automaton accepting S b (X). Let q0 be the initial state of $$\mathcal {A}$$ and let q1, …, q m be the states of $$\mathcal {A}$$ that can be reached (in one step) by reading the letter $${\scriptstyle \bigstar }$$. Without loss of generality, we may suppose that the ω-languages accepted from the states q1, …, q m are pairwise distinct. We consider the same decomposition of X as in the proof of Theorem 3.6.27:
\displaystyle \begin{aligned} X=\bigcup_{j=1}^m \ (X^I_j+X^F_j), \end{aligned}
with $$X^F_j=\{\mathrm {val}_b(\mathbf {0}{\scriptstyle \bigstar } v)\mid v \text{ is accepted from } q_j\}$$ and $$X^I_j=\{\mathrm {val}_b(u)\mid q_0\cdot u{\scriptstyle \bigstar }=q_j\}$$. From the proof of Theorem 3.6.27, we know that, for each j, $$\mathrm {rep}_b(X^ I_j)$$ is regular and that $$X^F_j$$ is weakly b-recognizable.
Let us show that the two exhibited decompositions of X are actually the same. In particular, the obtained decomposition will be independent of the base b, which will prove the result. To obtain the correspondence between the two decompositions, it is enough to show that, for all $$u\in A_b^*$$ and all j ∈{1, …, m}, the following assertions are equivalent:
1. 1.

$$q_0\cdot u{\scriptstyle \bigstar }= q_j$$.

2. 2.

$$F(X,\mathrm {val}_b(u))=X^F_j$$.

3. 3.

$$I(X,\mathrm {val}_b(u))=X^I_j$$.

As $$\mathcal {A}$$ accepts all the b-representations of the elements of X and the ω-languages accepted from the states q1, …, q m are pairwise distinct, the subsets $$X^F_1,\ldots ,X^F_m$$ and $$X^I_1,\ldots ,X^I_m$$ are pairwise distinct. Therefore, we only have to show 1 ⇒ 2 ∧ 3. Suppose that $$q_0\cdot u{\scriptstyle \bigstar }= q_j$$. If $$x=\mathrm {val}_b(\mathbf {0}{\scriptstyle \bigstar } v)$$ and v is accepted from q j , then $$u{\scriptstyle \bigstar } v\in L(\mathcal {A})$$; hence, x + val b (u) ∈ X. Conversely, let x ∈ [0, 1] d such that x + val b (u) ∈ X. Then there exists $$v\in A_b^\omega$$ such that $$x=\mathrm {val}_b(\mathbf {0}{\scriptstyle \bigstar } v)$$. As $$\mathcal {A}$$ accepts all the b-representations of the elements of X, we have $$u{\scriptstyle \bigstar } v\in L(\mathcal {A})$$. Because $$\mathcal {A}$$ is deterministic, v is necessarily accepted from q j ; hence, $$x\in X^F_j$$. This proves 2; hence, we have obtained 1 ⇔ 2. Now, let i ∈ I(X, val b (u)). Then $$F(X,\mathbf {i})=F(X,\mathrm {val}_b(u))=X^F_j$$. From 2 ⇒ 1, we obtain $$q_0\cdot \mathrm {rep}_b(\mathbf {i}){\scriptstyle \bigstar }=q_j$$; hence, $$\mathbf {i}\in X^I_j$$. Finally, let $$\mathbf {i}\in X^I_j$$. Then i = val b (u′) with $$q_0\cdot u'{\scriptstyle \bigstar }= q_j$$. From 1 ⇒ 2, we obtain F(X, i) = F(X, val b (u)); hence, i ∈ I(X, val b (u)). Hence we have 3, which ends the proof. □

3.6.5 First-Order Theory for Mixed Real and Integer Variables in Base β and Büchi Automata

In order to obtain an analogue of the Büchi-Bruyère theorem for real numbers represented in base β, we need a suitable logical structure for defining the so-called β-definable subsets of $$\mathbb {R}^ d$$. In this section we present the chosen logical structure.

Definition 3.6.30

For $$a\in \tilde {A}_\beta$$, we define a binary relation Xβ,a as follows. Suppose that $$x,y\in \mathbb {R}$$ with d β (x) = x x0 ⋆ x−1x−2⋯, then Xβ,a(x, y) if and only if y = β i for some $$i\in \mathbb {Z}$$, and either i >  and a = 0 or i ≤  and x i  = a.

In other words, Xβ,a(x, y) is true whenever y is an integer power of the base β and the digit in ω 0d β (x) corresponding to this power is a. The notation ω 0 means that we add infinitely many zeros to the right of the greedy representation d β (x). Note that here we use the notation Xβ,a(x, y) for (x, y) ∈ Xβ,a.

Recall that $$\mathbb {Z}_\beta$$ is the set of β-integers; see Definition 3.6.11.

Definition 3.6.31

A subset of $$\mathbb {R}^d$$ is β-definable if it is definable by a first-order formula of
\displaystyle \begin{aligned} \langle \mathbb{R},+,\le,\mathbb{Z}_\beta,X_\beta\rangle, \end{aligned}
where X β is the finite collection of binary predicates $$\{X_{\beta ,a}\mid a\in \tilde {A}_\beta \}$$.

Remark 3.6.32

x = 0 is defined by x + x = x.

Remark 3.6.33

The property of being an integer power of β is definable in $$\langle \mathbb {R}, +, \le ~, X_\beta \rangle$$: x is a power of βXβ,1(x, x). Note that the letter 1 always belong to A β since β > 1. If x is a power of β, then one can define the next (or the previous) power of β as follows:
\displaystyle \begin{aligned} x'=\beta x\iff & (x'\text{ is a power of }\beta) \\ & \wedge (x'>x) \\ & \wedge \ (\forall y)((y\text{ is a power of }\beta \ \wedge \ y>x)\implies y\ge x'). \end{aligned}
By adding the constant 1 to the structure, we can also define the properties of being a positive or negative power of β by adding x > 1 or x < 1, respectively. Consequently, any constant power of β is definable in $$\langle \mathbb {R}, +, \le , 1,X_\beta \rangle$$.

Lemma 3.6.34

The structures $$\langle \mathbb {R}, +, \le , 1,X_\beta \rangle$$ and $$\langle \mathbb {R}, +, \le , \mathbb {Z}_\beta , X_\beta \rangle$$ are equivalent.

Proof

On the one hand, z = 1 can be defined in $$\langle \mathbb {R}, +, \le , \mathbb {Z}_\beta , X_\beta \rangle$$ by the formula
\displaystyle \begin{aligned} z \in \mathbb{Z}_\beta \ \wedge\ \big[(\forall x)\big(\big(x \in \mathbb{Z}_\beta \ \wedge\ x > 0 \big) \implies x \geq z\big) \big]. \end{aligned}
On the other hand, the set $$\mathbb {Z}_\beta$$ can be defined in $$\langle \mathbb {R}, +, \le , 1,X_\beta \rangle$$:
\displaystyle \begin{aligned} z \in \mathbb{Z}_\beta \iff (\forall y) \big[ (y \text{ is a negative power of } \beta) \implies X_{\beta,0}(z,y) \big]. \end{aligned}

Remark 3.6.35

Multiplication (or division) by β is β-definable:
\displaystyle \begin{aligned} y=\beta x \Leftrightarrow (\forall b) \big[\bigwedge_{a\in \tilde{A}_\beta} (X_{\beta,a}(x,b)\implies X_{\beta,a}(y,\beta b))\big]. \end{aligned}
Note that Xβ,a(x, b) implies that b is an integer power of β. Consequently, multiplication (or division) by a constant power of β is β-definable.

Remark 3.6.36

The structures $$\langle \mathbb {R},+,\le ,1\rangle$$ and $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$ are not logically equivalent : z = 1 is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$, whereas $$z\in \mathbb {Z}$$ is not definable in $$\langle \mathbb {R},+,\le ,1\rangle$$; see Proposition 3.6.38.

Let us characterize the subsets of $$\mathbb {R}^d$$ that are definable in $$\langle \mathbb {R},+,\le ,1\rangle$$ and in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$, respectively. We will make use of the following important result.

Theorem 3.6.37 ([221])

The structure $$\langle \mathbb {R},+,\le ,1\rangle$$ admits the elimination of quantifiers.

A rational polyhedron of $$\mathbb {R}^d$$ is the intersection of finitely many half-spaces whose borders are hyperplanes whose equations have integer coefficients. These sets are sometimes referred to as convex polytopes. Note that a rational polyhedron is not necessarily bounded.

Proposition 3.6.38

The subsets of $$\mathbb {R}^d$$ which are definable in $$\langle \mathbb {R},+,\le ,1\rangle$$ are the finite unions of rational polyhedra. In particular, the subsets of $$\mathbb {R}$$ which are definable in $$\langle \mathbb {R},+,\le ,1\rangle$$ are the finite unions of intervals with rational endpoints.

Proof

From Theorem 3.6.37, a subset X of $$\mathbb {R}^d$$ is definable in $$\langle \mathbb {R},+,\le ,1\rangle$$ if and only if it can be expressed by a finite Boolean combination of linear constraints with rational coefficients. Now consider an equivalent formula in disjunctive normal form. This gives us the desired result. □

We end this section by a characterization of those subsets X of $$\mathbb {R}^d$$ which are definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$. Note that the proof of this characterization depends on a subsequent result (namely, Theorem 3.6.44).

Theorem 3.6.39

A subset X of $$\mathbb {R}^d$$ is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$ if and only if it is a finite union of sets of the form X I  + X F , with $$X^I\subseteq \mathbb {Z}^d$$ definable in $$\langle \mathbb {Z},+,\le \rangle$$ and X F  ⊆ [0, 1] d definable in $$\langle \mathbb {R},+,\le ,1\rangle$$.

Proof

Suppose that X = X I  + X F where $$X^I\subseteq \mathbb {Z}^d$$ is definable in $$\langle \mathbb {Z},+,\le \rangle$$ and X F  ⊆ [0, 1] d is definable in $$\langle \mathbb {R},+,\le ,1\rangle$$. By Remark 3.6.36, X F is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$. If ϕ(y1, …, y d ) is a first-order formula of $$\langle \mathbb {Z},+,\le \rangle$$ defining X I , then $$\phi (y_1,\ldots ,y_d)\land y_1\in \mathbb {Z} \land \cdots \land y_d\in \mathbb {Z}$$ is a first-order formula of $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$ defining X I . Thus the predicate (x1, …, x d ) ∈ X is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$ by (∃y1)⋯(∃y d )(∃z1)⋯(∃z d )(x1 = y1+z1∧⋯∧x d  = y d +z d ∧(y1, …, y d ) ∈ X I ∧(z1, …, z d ) ∈ X F ). Finite unions of definable sets are always definable, in any structure.

For the other direction, suppose that $$X\subseteq \mathbb {R}^d$$ is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$. By Theorem 3.6.44, X is weakly b-recognizable for all b. By Theorem 3.6.29, X is a finite union of sets of the form X I  + X F , where $$X^I\subseteq \mathbb {Z}^d$$ is such that rep b (X I ) is regular and X F  ⊆ [0, 1] d is b-recognizable for all b. Then, by Theorem 3.2.28 (which can be adapted to $$\mathbb {Z}^d$$ in a straightforward way), each X I is semi-linear, hence definable in $$\langle \mathbb {Z},+,\le \rangle$$, and by Theorem 3.6.45, each X F is definable in $$\langle \mathbb {R},+,\le ,1\rangle$$. □

Note that we have used Theorem 3.6.29, which is a stronger version of Theorem 3.6.27. Indeed, we need the sets in the decomposition of X to be independent of the base b.

Finally, in the particular case of bounded subsets of $$\mathbb {R}^d$$, we have the following characterizations.

Corollary 3.6.40

For any bounded subset X of $$\mathbb {R}^d$$ , the following assertions are equivalent.
1. 1.

X is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$.

2. 2.

X is definable in $$\langle \mathbb {R},+,\le ,1\rangle$$.

3. 3.

X is a finite union of rational polyhedra.

Proof

This follows from Proposition 3.6.38 and Theorem 3.6.39. □

3.6.6 Characterizing β-Recognizable Sets Using Logic

The following theorem can be viewed as an analogue of Theorem 3.3.4 for real numbers represented in real bases β. Let us emphasize that the base β needs be a Pisot number in order to recognize the addition. We do not present here the details of the normalization in real Pisot bases, but the interested reader is referred to [145, 231].

Theorem 3.6.41 ([145])

• If β is a Parry number, then every β-recognizable subset of $$\mathbb {R}^d$$ is β-definable.

• If β is a Pisot number, then every β-definable subset of $$\mathbb {R}^d$$ is β-recognizable.

In the context of the present chapter, the relevant direction is given by the second assertion. Indeed, our aim is to build suitable DFAs starting from formulæ expressing various properties of β-recognizable sets of numbers, in order to decide whether a given set satisfies a given property. For this reason, we only give a proof of the second assertion of Theorem 3.6.41. The interested reader will find a proof of the other direction in [145].

Proof (of the second assertion)

The proof goes by induction on the length of the formula defining X. It is sufficient to discuss the logical operations ¬φ, φ ∨ ψ, ∃ as all others can be obtained from these three. At each step of the induction, we need to obtain Büchi automata for S β (X1), …, S β (X n ), where X1, …, X n are the current subsets of $$\mathbb {R}^d$$ in the recursive definition of X. Let φ, ψ be such that $$X_\varphi ,\,X_\psi \subseteq \mathbb {R}^d$$. We have $$S_\beta (X_{\neg \varphi })=S_\beta (\mathbb {R}^d)\setminus S_\beta (X_\varphi )$$ and S β (Xφψ) = S β (X φ ) ∪ S β (X ψ ). If $$\mathcal {B}$$ is a Büchi automata accepting S β (X ϕ ) where ϕ contains a free variable called x, then the ω-language L accepted by the Büchi automata obtained from $$\mathcal {B}$$ by deleting the component corresponding to x in every label is such that 0(0)−1L = S β (X). The induction step then follows from Propositions 3.6.15 and 3.6.25 and from the stability of ω-regular languages under Boolean operations and projection on components.

Let us verify that the atomic formulæ of $$\langle \mathbb {R},+\le ,\mathbb {Z}_\beta ,X_\beta \rangle$$ are all β-recognizable. We need β to be a Pisot number only for the addition to be β-recognizable [229]. Now we suppose that β is a Parry number. By Proposition 3.6.25, $$\mathbb {R}^d$$ is β-recognizable for any dimension d. Let $$\mathcal {G}$$ be a Büchi automaton accepting $$d_\beta (\mathbb {R}^2)$$ (such an automaton exists by Proposition 3.6.19). The ω-languages $$d_\beta (\{(x,y) \in \mathbb {R}^2 \mid x = y\})$$ and $$d_\beta (\{(x,y) \in \mathbb {R}^2 \mid x < y\})$$) are accepted by the intersections of $$\mathcal {G}$$ with the Büchi automata of Figures 3.9 and 3.10, respectively. We have $$d_\beta (\mathbb {Z}_\beta )=d_\beta (\mathbb {R})\cap (\tilde {A}_\beta )^+ \star 0^\omega$$. For each $$a \in \tilde {A}_\beta$$, d β (Xβ,a) is accepted by the intersection of $$\mathcal {G}$$ with the Büchi automaton represented in Figure 3.11. Finally, in order to start the induction process, we have to build Büchi automata accepting $$S_\beta (\{(x,y,z) \in \mathbb {R}^3 \mid x+y=z\})$$, $$S_\beta (\{(x,y) \in \mathbb {R}^2 \mid x < y\})$$, $$S_\beta (\mathbb {Z}_\beta )$$, and S β (Xβ,a), which can be done thanks to Proposition 3.6.19. □

Corollary 3.6.42

If β is a Pisot number, then the first-order theory of $$\langle \mathbb {R},+, \le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$ is decidable.

Proof

A closed first-order formula of $$\langle \mathbb {R},+,\le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$ is of the form ∃(x) or ∀(x). By Theorem 3.6.41, the sets $$X_\varphi =\{x\in \mathbb {R}\mid \varphi (x) \text{ is true}\}$$ and $$X_{\neg \varphi }=\{x\in \mathbb {R}\mid \varphi (x) \text{ is false}\}$$ are β-recognizable. As the emptiness of an ω-regular language is decidable [476], we can decide whether X φ is nonempty (resp. X¬φ is empty) and, thus, whether ∃(x) (resp. ∀(x)) is true. □

Like Theorem 3.3.4, this result has many applications: any property of β-recognizable sets that can be expressed by a first-order predicate in the structure $$\langle \mathbb {R},+, \le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$ is decidable. For example, it is decidable whether a β-recognizable subset of $$\mathbb {R}^d$$ is a subgroup of $$\mathbb {R}^d$$ with respect to the addition. As another example, we are also able to decide topological properties of β-recognizable sets. Note that, in this context, interesting examples of compact β-recognizable sets are given by a class of fractal sets, called β-self-similar sets [1]. Indeed, it follows from Theorem 3.6.56 below that β-self-similar sets are β-recognizable when β is Pisot. This fact is highlighted in Remark 3.6.59.

Proposition 3.6.43

If β is Pisot, then the following properties of β-recognizable subsets X of $$\mathbb {R}^d$$ are decidable: X has a nonempty interior, X is open, X is closed, X is bounded, X is compact, X is dense.

Proof

Suppose that β is Pisot and let X be a β-recognizable subset X of $$\mathbb {R}^d$$ and let φ be a first-order formula of $$\langle \mathbb {R},+,\le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$ defining X. For $$(x_1,\ldots ,x_d)\in \mathbb {R}^d$$ and ε > 0, we let B(x1, …, x d , ε) denote the set $$\{(y_1,\ldots ,y_d) \in \mathbb {R}^d \mid -\varepsilon < x_1-y_1<\varepsilon \ \land \ \cdots \ \land \ -\varepsilon < x_d-y_d < \varepsilon \}$$. Clearly, the predicate (y1, …, y d ) ∈ B(x1, …, x d , ε) is expressible by a first-order formula of $$\langle \mathbb {R},+,\le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$. Then, we can express that X has a nonempty interior by the formula
\displaystyle \begin{aligned}\displaystyle (\exists x_1) \cdots (\exists x_d) \Big(\varphi(x_1,\ldots,x_d) \ \land \ \Big[(\exists \varepsilon >0)\ (\forall y_1) \cdots (\forall y_d) \\\displaystyle \big((y_1,\ldots,y_d)\in B(x_1,\ldots,x_d,\varepsilon) \implies \varphi(y_1,\ldots,y_d)\big)\Big]\Big). \end{aligned}
It is open if and only if
\displaystyle \begin{aligned}\displaystyle (\forall x_1) \cdots (\forall x_d) \Big(\varphi(x_1,\ldots,x_d) \implies \Big[(\exists \varepsilon >0)\ (\forall y_1) \cdots (\forall y_d) \\\displaystyle \big ((y_1,\ldots,y_d)\in B(x_1,\ldots,x_d,\varepsilon) \implies \varphi(y_1,\ldots,y_d) \big)\Big]\Big). \end{aligned}
It is closed if and only if it is not open. It is bounded if and only if
\displaystyle \begin{aligned} (\exists R >0)\ (\forall x_1) \cdots (\forall x_d) \Big(\varphi(x_1,\ldots,x_d) \implies \ (x_1,\ldots,x_d)\in B(0,\ldots,0,R)\Big). \end{aligned}
It is compact if and only if it is closed and bounded. Finally, it is dense if and only if
\displaystyle \begin{aligned} (\forall x_1) \cdots (\forall x_d) (\forall \varepsilon>0) (\exists y_1) \cdots (\exists y_d) \big(\varphi(y_1,\ldots,y_d) \ \land \ (y_1,\ldots,y_d)\in B(x_1,\ldots,x_d,\varepsilon)\big). \end{aligned}
As those properties of X are all expressible by a closed first-order formula of $$\langle \mathbb {R},+,\le ,\mathbb {Z}_{\beta },X_{\beta }\rangle$$, they are decidable by Corollary 3.6.42. □

We note that, thanks to Proposition 3.6.17, the property of being closed can be directly verified from a Büchi automaton recognizing the set under consideration. Indeed, given a Büchi automaton accepting S β (X), we can effectively compute a DFA accepting Pref(S β (X)). Then, by Proposition 3.6.8, this DFA seen as a Büchi automaton accepts S β (X) if and only if X is closed. As it is decidable if two Büchi automata accept the same ω-language [476], we can decide whether a β-recognizable set X is closed.

3.6.7 Analogues of the Cobham–Semenov Theorem for Real Numbers

Several analogues of Cobham’s theorem were obtained in the context of integer base b representations of real numbers. In this section, we list some of them without proof. We will show the connections between these results, as well as with Theorem 3.6.61. This connection is achieved by using graph-directed iterated function systems (GDIFS) and allows us to provide extensions of the abovementioned results: Theorem 3.6.50 extends to $$\mathbb {R}^d$$, Theorem 3.6.61 extends to a large class of GDIFS, and the logical characterization of b-recognizable sets of reals used for proving Theorem 3.6.46 extends to the so-called Pisot real bases.

Theorem 3.6.44 ([95])

Let b and b′ be integer bases with different sets of prime divisors. A subset of $$\mathbb {R}^d$$ is simultaneously b-recognizable and b′-recognizable if and only if it is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$.

The hypothesis of sharing no prime divisors is stronger than that of being multiplicatively independent. In order to obtain an analogue of the Cobham theorem for multiplicatively independent integer bases, we need an extra hypothesis, which is the weak b-recognizability.

Theorem 3.6.45 ([94])

Let b and b′ be multiplicatively independent integer bases. A subset of [0, 1] d is simultaneously weakly b-recognizable and weakly b′-recognizable if and only if it is definable in $$\langle \mathbb {R},+,\le ,1\rangle$$.

Note that, together with Theorems 3.6.29 and 3.2.28, Theorem 3.6.45 implies the following result.

Theorem 3.6.46 ([94])

Let b and b′ be multiplicatively independent integer bases. A subset of $$\mathbb {R}^d$$ is simultaneously weakly b-recognizable and weakly b′-recognizable if and only if it is definable in $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$.

In the particular case where d = 1 and we consider only compact subsets of [0, 1], Theorem 3.6.45 is indeed another formulation of Theorem 3.6.50 below. To state this result, we need a definition first.

Definition 3.6.47

A subset X of [0, 1] d is b-self-similar if it is closed, and there are finitely many sets of the form
\displaystyle \begin{aligned} (b^a X - \mathbf{t}) \cap [0,1]^d \end{aligned}
for $$a \in \mathbb {N}$$ and $$\mathbf {t} \in ([0,b^a)\cap \mathbb {Z})^d$$.

Example 3.6.48

The Pascal triangle modulo 2 (see Figure 3.12) is 2-self-similar. It is the closure of the set $$\{ \frac {1}{2^\ell }(m,n) \mid \binom {n}{m}\equiv 1 \bmod 2,\ \ell \ge |\mathrm {rep}_2(m,n)|\}.$$

Example 3.6.49

The Menger sponge (see Figure 3.13) is 3-self-similar. It is the closure of the set of points x ∈ [0, 1]3 such that rep3(x) does not contain any of the digits (0, 1, 1), (1, 0, 1), (1, 1, 0), (1, 1, 1).

Theorem 3.6.50 ([1])

Let b, b′≥ 2 be multiplicatively independent integers. A compact subset of [0, 1] is simultaneously b-self-similar and b′-self-similar if and only if it is a finite union of closed intervals with rational endpoints.

The object of the next section is to study the connection between Theorems 3.6.45 and 3.6.50.

3.6.8 Linking Büchi Automata, β-Self-Similarity and GDIFS

We generalize Definition 3.6.47 to real bases β. The set of polynomials in β with integer coefficients is denoted by $$\mathbb {Z}[\beta ]$$. Note that it is not equal to the set $$\mathbb {Z}_\beta$$ of β-integers as, for example, d φ (φ − 1) = 0 ⋆ 10 ω , hence $$\varphi -1\in \mathbb {Z}[\varphi ]\setminus \mathbb {Z}_\varphi$$.

Definition 3.6.51

A subset X of $$\big [0,\frac {\lceil \beta \rceil -1}{\beta -1}\big ]^d$$ is β-self-similar if it is closed, and there are only finitely many sets of the form
\displaystyle \begin{aligned} (\beta^aX-\mathbf{t})\cap\Big[0,\frac{\lceil \beta\rceil-1}{\beta-1}\Big]^d, \end{aligned}
for $$a\in \mathbb {N}$$ and $$\mathbf {t} \in (\big [0,\frac {(\lceil \beta \rceil -1)}{\beta -1}\beta ^a \big )\cap \mathbb {Z}[\beta ])^d$$.

Definition 3.6.52

A graph-directed iterated function system (GDIFS for short) is given by a 4-tuple
\displaystyle \begin{aligned} (V,\ E,\ (X_v,\ v \in V),\ (\phi_e,\ e \in E)) \end{aligned}
where (V, E) is a connected digraph such that each vertex has at least one outgoing edge, for each v ∈ V , X v is a metric space and, for each e ∈ E uv , ϕ e : X v  → X u is a contraction map, where E uv denotes the set of edges in E from u to v.

Theorem 3.6.53 ([208, 306])

For each GDIFS (V, E, (X v , v  V ), (ϕ e , e  E)) on complete metric spaces X v , there is a unique list of nonempty compact subsets (K u , u  V ) such that, for all u  V , K u  ⊆ X u and
\displaystyle \begin{aligned} K_u = \bigcup_{v \in V} \bigcup_{e \in E_{uv}} \phi_e(K_v). \end{aligned}

Definition 3.6.54

The attractor of a GDIFS on complete metric spaces is the list of nonempty compact subsets from Theorem 3.6.53.

We will use the following result.

Theorem 3.6.55 ([70, 231])

The sets $$\big [\frac {-c}{\beta -1},\frac {c}{\beta -1} \big ]\cap \mathbb {Z}[\beta ]$$ are finite for all $$c\in \mathbb {N}$$ if and only if β is a Pisot number.

Theorem 3.6.56 ([145])

Let β be a Pisot number. For any compact subset X of $$\big [0,\frac {\lceil \beta \rceil -1}{\beta -1}\big ]^d$$ , the following are equivalent:
1. 1.

There is a Büchi automaton $$\mathcal {A}$$ over the alphabet $$A_\beta ^{\ d}$$ such that $$\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } L(\mathcal {A}))=X$$.

2. 2.

X belongs to the attractor of a GDIFS on $$\mathbb {R}^d$$ whose contraction maps are of the form $$\mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{\beta }$$ with $$\mathbf {t} \in A_\beta ^{\ d}$$.

3. 3.

X is β-self-similar.

Proof

1 ⇒ 2. Let $$\mathcal {A}=(Q,q_0,F,A_\beta ^{\ d},\delta )$$ be a trim Büchi automaton such that $$\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } L(\mathcal {A}))=X$$. Because X is closed and val β is continuous, we may suppose that Q = F, i.e., that all states are final. The GDIFS on $$\mathbb {R}^d$$ we build is obtained from $$\mathcal {A}$$ by replacing each label $$\mathbf {t} \in A_\beta ^{\ d}$$ by the contraction map $$\mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{\beta }$$. For all q ∈ Q, let L q denote the set of infinite words accepted from q in $$\mathcal {A}$$, and let $$X_q=\{\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } w)\mid w\in L_q\}$$. We claim that (X q , q ∈ Q) is the attractor of this GDIFS. This is sufficient as $$X=X_{q_0}$$. The fact that $$\mathcal {A}$$ is trim and contains only final states implies that the subsets X q are closed and nonempty. Moreover, they satisfy $$X_q\subseteq \big [0,\frac {\lceil \beta \rceil -1}{\beta -1}\big ]^d$$. Then, by Theorem 3.6.53, it suffices to show that the list (X q , q ∈ Q) satisfies
\displaystyle \begin{aligned} \forall q \in Q, \quad X_q = \bigcup_{p \in Q} \bigcup_{q \xrightarrow[]{\mathbf{t}} p} \frac{1}{\beta}(X_p+\mathbf{t}). \end{aligned}
This follows from the following two observations:
\displaystyle \begin{aligned} \begin{array}{rcl} \forall q \in Q, &\displaystyle &\displaystyle L_q = \bigcup_{p \in Q} \bigcup_{q \xrightarrow[]{\mathbf{t}} p} \mathbf{t} L_p \\ \forall \mathbf{w} \in (A_\beta^{\ d})^\omega, \forall \mathbf{t} \in A_\beta^{\ d}, &\displaystyle &\displaystyle \mathrm{val}_\beta (\mathbf{0} {\scriptstyle\bigstar} \mathbf{t} \mathbf{w}) = \frac{\mathrm{val}_\beta(\mathbf{0} {\scriptstyle\bigstar} \mathbf{w})+\mathbf{t}}{\beta}. \end{array} \end{aligned}

2 ⇒ 1. Let (K v , v ∈ V ) be the attractor of a GDIFS on $$\mathbb {R}^d$$ whose contraction maps are of the form $$\mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{\beta }$$ with $$\mathbf {t} \in A_\beta ^{\ d}$$ and suppose that $$X=K_{v_0}$$ for some v0 ∈ V . Let $$\mathcal {A}$$ be the Büchi automaton $$(V,v_0,V,A_\beta ^{\ d},\delta )$$ where the transitions correspond to the edges of the GDIFS in which we have replaced the labels $$\frac {\mathbf {x}+\mathbf {t}}{\beta }$$ by t. As the underlying digraph of a GDIFS is connected and such that there is at least one outgoing edge starting from each vertex, the Büchi automaton $$\mathcal {A}$$ is trim. Then, from the proof of 1 ⇒ 2, we obtain that $$K_v= \{\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } w)\mid w\in L_v\}$$ for all v ∈ V  (where L v is defined as before); hence, $$X=\{\mathrm {val}_\beta (\mathbf {0}{\scriptstyle \bigstar } w)\mid w\in L(\mathcal {A})\}$$.

2 ⇒ 3. Let (K v , v ∈ V ) be the attractor of a GDIFS on $$\mathbb {R}^d$$ whose contraction maps are of the form $$S_{\mathbf {t}}\colon \mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{\beta }$$ with $$\mathbf {t} \in A_\beta ^{\ d}$$, and suppose that $$X=K_{v_0}$$ for some v0 ∈ V . For all vertices u and v, we let $$E_{uv}^\ell$$ denote the set of words of length over $$A_\beta ^{\ d}$$ that label a path from u to v (where the labels $$\frac {\mathbf {x}+\mathbf {t}}{\beta }$$ are replaced by t). For all u ∈ V  and $$\ell \in \mathbb {N}$$, we have
\displaystyle \begin{aligned} K_u = \bigcup_{v\in V}\ \bigcup_{\mathbf{t}_1 \cdots \mathbf{t}_\ell \in E_{uv}^\ell} S_{\mathbf{t}_1} \circ \cdots \circ S_{\mathbf{t}_\ell}(K_v). \end{aligned}
For the sake of conciseness, we let $$r_\beta =\frac {\lceil \beta \rceil -1}{\beta -1}$$. By setting u = v0 and  = a in the previous equality, we obtain that
\displaystyle \begin{aligned} (\beta^a X - \mathbf{t}) \cap [0,r_\beta]^d = \ \bigcup_{v\in V}\ \bigcup_{\mathbf{t}_1 \cdots \mathbf{t}_a \in E_{v_0v}^a} \Big( \beta^a(S_{\mathbf{t}_1} \circ \cdots \circ S_{\mathbf{t}_a}(K_v)- \mathbf{t}) \cap [0,r_\beta]^d \Big) \end{aligned}
for all $$a\in \mathbb {N}$$ and $$\mathbf {t} \in \mathbb {R}^d$$. Observe that
\displaystyle \begin{aligned} \beta^a (S_{\mathbf{t}_1} \circ \cdots \circ S_{\mathbf{t}_a}(K_v) )- \mathbf{t} = K_v + ( \mathbf{t}_a + \beta \mathbf{t}_{a-1} + \cdots + \beta^{a-1} \mathbf{t}_1) - \mathbf{t} \end{aligned}
and, if $$\mathbf {t} \in (\mathbb {Z}[\beta ])^d$$ and, for each 1 ≤ i ≤ a, $$\mathbf {t}_i\in A_\beta ^{\ d}$$, then
\displaystyle \begin{aligned} \mathbf{t}_a + \beta \mathbf{t}_{a-1} + \cdots + \beta^{a-1} \mathbf{t}_1 - \mathbf{t} \in (\mathbb{Z}[\beta])^d. \end{aligned}
For all v ∈ V , the set K v is included in [0, r β ] d ; hence, the sets (K v  + x) ∩ [0, r β ] d are empty for all x∉[−r β , r β ] d . Since β is Pisot, Theorem 3.6.55 implies that $$[-r_\beta ,r_\beta ]\cap \mathbb {Z}[\beta ]$$ is finite. Consequently, there are finitely many sets of the form (K v  + x) ∩ [0, r β ] d , with $$\mathbf {x} \in (\mathbb {Z}[\beta ])^d$$ and v ∈ V . As any set (β a X −t) ∩ [0, r β ] d with $$a\in \mathbb {N}$$ and $$\mathbf {t} \in ([0,r_\beta \beta ^a)\cap \mathbb {Z}[\beta ])^d$$ is a finite union of such sets, this proves that X is β-self-similar.
3 ⇒ 2. Suppose that X is β-self-similar. Again, we let $$r_\beta =\frac {\lceil \beta \rceil -1}{\beta -1}$$. Define a GDIFS on $$\mathbb {R}^d$$ as follows: the vertices of the underlying digraph are the nonempty compact sets among
\displaystyle \begin{aligned} N_{a,\mathbf{t}}(X):=(\beta^a X - \mathbf{t}) \ \cap\ [0,r_\beta]^d, \end{aligned}
with $$a \in \mathbb {N}$$ and $$\mathbf {t} \in ([0,r_\beta \beta ^a)\cap \mathbb {Z}[\beta ])^d$$ and, for each $$\mathbf {s} \in A_\beta ^{\ d}$$, there is an edge labeled $$\frac {\mathbf {x}+\mathbf {s}}{\beta }$$ from Na,t(X) to Na+1,βt+s(X) if both are nonempty. For all $$a \in \mathbb {N}$$ and $$\mathbf {t} \in ([0,r_\beta \beta ^a)\cap \mathbb {Z}[\beta ])^d$$, we have
\displaystyle \begin{aligned} \begin{array}{rcl} \bigcup_{\mathbf{s} \in A_\beta^{\ d}} \ \frac{1}{\beta} \big(N_{a+1,\beta \mathbf{t}+\mathbf{s}}(X)+\mathbf{s}\big) &\displaystyle = &\displaystyle \bigcup_{\mathbf{s} \in A_\beta^{\ d}} \ \frac{1}{\beta} \Big(\Big[(\beta^{a+1}X-\beta \mathbf{t}-\mathbf{s})\ \cap\ [0,r_\beta]^d\Big] +\mathbf{s}\Big) \\ &\displaystyle = &\displaystyle \bigcup_{\mathbf{s} \in A_\beta^{\ d}} \ \Big((\beta^a X- \mathbf{t})\ \cap\ \frac{1}{\beta}\big([0,r_\beta]^d +\mathbf{s}\big)\Big) \\ &\displaystyle = &\displaystyle (\beta^a X- \mathbf{t})\ \cap\ \Big(\bigcup_{\mathbf{s} \in A_\beta^{\ d}}\ \frac{1}{\beta}\big([0,r_\beta]^d +\mathbf{s}\big)\Big) \\ &\displaystyle = &\displaystyle (\beta^a X- \mathbf{t})\ \cap\ [0,r_\beta]^d \\ &\displaystyle = &\displaystyle N_{a,\mathbf{t}}(X), \end{array} \end{aligned}
hence the sets Na,t(X) form the attractor of this GDIFS. To conclude with the proof, observe that X = N0,0(X). □

Note that, in the previous theorem, the Pisot condition is needed only for the implications 2 ⇒ 1 and 2 ⇒ 3. Also note that all the equivalences are effective, meaning that from any of the hypotheses 1, 2, or 3, we can effectively construct a Büchi automaton for 1, a GDIFS for 2, and the β-kernel for 3.

We are now able to show the connection between Theorems 3.6.45 and 3.6.50.

Proposition 3.6.57

Any b-self-similar subset of [0, 1] d is weakly b-recognizable.

Proof

Let X be a b-self-similar subset of [0, 1] d . By Theorem 3.6.56, there is a Büchi automaton $$\mathcal {A}$$ over the alphabet $$A_b^{\ d}$$ such that $$\mathrm {val}_b(\mathbf {0}\star L(\mathcal {A}))=X$$. We show that this implies that X is weakly b-recognizable. For the sake of clarity, we discuss the case d = 1 (the general case is just a tedious adaptation of the same arguments as we have to consider each component separately). We have
\displaystyle \begin{aligned} S_b(X)= 0^ +\star L(\mathcal{A}) \ \cup\ 0^*\pi_1 \big(M \ \cap \ [(A_b\cup\{\star\})^\omega\times (0\star L(\mathcal{A}))]\big) \end{aligned}
where
This shows that S b (X) is an ω-regular language; hence, X is b-recognizable. Since X is closed, it is weakly b-recognizable by Proposition 3.6.24. □

The following result generalizes Theorem 3.6.50 to the multidimensional setting.

Theorem 3.6.58 ([142, 145])

Let b, b′≥ 2 be two multiplicatively independent integers. A compact subset of [0, 1] d is simultaneously b-self-similar and b′-self-similar if and only if it is a finite union of rational polyhedra.

Proof

The result is a consequence of Proposition 3.6.38, Theorem 3.6.45, and Proposition 3.6.57. □

Remark 3.6.59

We have seen in Proposition 3.6.57 that any b-self-similar subset of [0, 1] d is weakly b-recognizable. By using Theorem 3.6.56 and the fact that the normalization is realizable by a letter-to-letter transducer [229, 231], we obtain that this fact also holds for Pisot bases β: any β-self-similar subset of [0, 1] d is weakly β-recognizable. However, the converse is not true as, for every base β > 1, there exist weak β-recognizable subsets of [0, 1] d which are not closed. For example, any interval of the form [r, s[ is weakly β-recognizable for all bases β > 1. Hence the hypothesis of b-self-similarity is strictly stronger than that of b-recognizability.

We also obtain the following analogue of the Cobham–Semenov theorem for GDIFS.

Theorem 3.6.60

Let b, b′≥ 2 be multiplicatively independent integers. A compact subset of $$\mathbb {R}^d$$ is the attractor of two GDIFS, one with contraction maps of the form $$\mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{b}$$ with $$\mathbf {t} \in A_b^{\ d}$$ and the other with contraction maps of the form $$\mathbf {x}\mapsto \frac {\mathbf {x}+\mathbf {t}}{b'}$$ with $$\mathbf {t} \in A_{b'}^{\ d}$$, if and only if it is a finite union of rational polyhedra.

Proof

The result is a consequence of Theorem 3.6.56, Proposition 3.6.57, Theorem 3.6.46, and Corollary 3.6.40. □

The previous result has to be compared with the following theorem. Here dim H denote the Hausdorff dimension, and an iterated function system (IFS for short) is a GDIFS whose graph contains only one vertex. An IFS Φ = (ϕ1, …, ϕ k ) is said to satisfy the open set condition if there exists a nonempty open set V  such that ϕ1(V ), …, ϕ k (V ) are pairwise disjoint subsets of V .

Theorem 3.6.61 ([220])

Suppose that a compact subset K of $$\mathbb {R}$$ is the attractor of two IFS Φ and Ψ all of whose contraction maps are affinities sharing the same contraction ratios, denoted r Φ and r Ψ , respectively, and suppose that Φ satisfies the open set condition.
• If dim H (K) < 1 then $$\frac {\log |r_\varPsi |}{\log |r_\varPhi |}\in \mathbb {Q}$$.

• If dim H (K) = 1 and K is not a finite union of intervals, then $$\frac {\log |r_\varPsi |}{\log |r_\varPhi |}\in \mathbb {Q}$$.

We note that Theorem 3.6.60 is more general than Theorem 3.6.61 in two ways as it concerns the more general setting of GDIFS and it is formulated for the d-dimensional Euclidean space. It is also weaker as the contraction ratios must be of the form $$\frac {1}{b}$$ and $$\frac {1}{b'}$$.

3.7 Exercises

The following exercises are related to Section 3.2.

Exercise 3.7.1

Consider the abstract numeration system S built on the language L accepted by the automaton of Figure 3.14. The set X = val S (L′), where L′ = {ε}∪ 2{0, 2}. By definition, X is S-recognizable. Show that $$t_X(n)=\varTheta (n\log (n))$$. Proceed by using two different methods: first, in a direct way by characterizing the elements in X and, second, by showing v L (n) = (n + 1)2 n and $$\mathbf {v}_{L'}(n)=2^n$$ for all $$n\in \mathbb {N}$$ and then by using Theorem 3.2.23.

Exercise 3.7.2

Consider the base 4 numeration system. Let X = val4(L) where L is the language accepted by the automaton of Figure 3.14. It is 4-recognizable by construction. Show that $$t_X(n)=\varTheta \big ((\frac {n}{\log (n)})^2\big )$$.

Exercise 3.7.3

Consider the 4-recognizable set X = val4({1, 2, 3}) and show that $$t_X(n)=\varTheta \Big (n^{\frac {\log (4)}{\log (3)}}\Big )$$.

Exercise 3.7.4

Define L F  = {ε}∪ 1(0 + 01) to be the language of the Zeckendorf numeration system, and let X = val4(L F ). Show that
\displaystyle \begin{aligned} \forall n\in\mathbb{N}, \ \mathbf{v}_{L_F}(n)=\frac{5+3\sqrt{5}}{10}\phi^n +\frac{5-3\sqrt{5}}{10}(1-\phi)^n \end{aligned}
and that $$t_X(n)=\varTheta \Big (n^{\frac {\log (4)}{\log (\varphi )}}\Big )$$.

Exercise 3.7.5

Define L to be the language accepted by the DFA depicted in Figure 3.15. Let X = val4(L) and show that $$\mathbf {v}_L(2n)\sim \frac {9}{5} 6^n$$ and $$\mathbf {v}_L(2n+1)\sim \frac {24}{5} 6^n$$ (n → +) and that $$t_X(n)=\varTheta \Big (n^{\frac {\log (4)}{\log (\sqrt {6})}}\Big )$$.

Exercise 3.7.6

Let X = val2(10). Show that $$\mathbf {v}_{1^*0^*}(n)=\binom {n+2}{2}$$ for all $$n\in \mathbb {N}$$ and that $$t_X(n)=2^{(1+o(1))\sqrt {2n}}$$.

The following exercises are related to Section 3.2.5.

Exercise 3.7.7

Show that semi-linear sets are b-recognizable for all b.

An ultimately periodic subset of $$\mathbb {N}$$ is a subset X of $$\mathbb {N}$$ for which there exist integers i ≥ 0 (the preperiod) and p ≥ 1 (the period) such that, for all $$x\in \mathbb {N}$$, x ∈ X if and only if x + p ∈ X.

Exercise 3.7.8

Let X be a subset of $$\mathbb {N}$$. Show that the following assertions are equivalent:
• X is a finite union of arithmetic progressions.

• X is ultimately periodic.

• X is semi-linear.

• X is a recognizable subset of $$\mathbb {N}$$.

• X is 1-recognizable.

• X is b-recognizable for all integers bases b.

• X is S-recognizable for all abstract numeration systems S.

The following exercise is related to Section 3.3.

Exercise 3.7.9

Show the following assertions
• x ≤ y is definable in $$\langle \mathbb {N},+\rangle$$ but not in $$\langle \mathbb {Z},+\rangle$$.

• x = y is definable in $$\langle \mathbb {N},+\rangle$$ but not in $$\langle \mathbb {Z},+\rangle$$.

• x = 0 is definable in $$\langle \mathbb {N},+\rangle$$ and in $$\langle \mathbb {Z},+\rangle$$.

• x = 1 is definable in $$\langle \mathbb {N},+\rangle$$ but not in $$\langle \mathbb {Z},+\rangle$$.

• For every $$c\in \mathbb {N}$$, x = c is definable in $$\langle \mathbb {N},+\rangle$$.

• The arithmetic progressions are definable in $$\langle \mathbb {N},+\rangle$$.

• A subset X of $$\mathbb {N}$$ is definable in $$\langle \mathbb {N},+\rangle$$ if and only if it is a finite union of arithmetic progressions.

• A subset X of $$\mathbb {N}^d$$ is definable in $$\langle \mathbb {N},+\rangle$$ if and only if it is semi-linear.

The following exercises are related to Section 3.6.

Exercise 3.7.10

Show that the structures $$\langle \mathbb {R},+,\le ,\mathbb {Z}\rangle$$ and $$\langle \mathbb {R},+,\le ,\mathbb {N}\rangle$$ are equivalent.

Exercise 3.7.11

Find a direct argument proving that $$\mathbb {Z}$$ is not definable in $$\langle \mathbb {R},+, \le ,1\rangle$$ (not using Theorem 3.6.39).

Exercise 3.7.12

Show that the finite unions of rational polyhedra are b-self-similar for all b.

3.8 Bibliographic Notes

Abstract numeration systems were introduced in [372]. A characterization of S-recognizable subsets of $$\mathbb {N}^d$$ was given in [143]. More precise asymptotics than those of Theorem 3.2.23 are given in [147].

Recognizable sets of $$\mathbb {N}^d$$ are a particular case of recognizable sets of a general monoid; see [211]. Kleene’s theorem [301] holds only for free monoids, so it holds for $$\mathbb {N}$$ but not for $$\mathbb {N}^d$$, d ≥ 2. In the case of the free monoid A, recognizable sets are regular languages over A.

Other applications of the decidability of the first-order theory of $$\langle \mathbb {N},+,V_b\rangle$$ than those presented in Section 3.3.4 were obtained in [524].

For more on automatic sequences, see the book [14].

The definition of (K, b)-regular sequences given in this chapter is that of Berstel and Reutenauer [77]. It differs from the original one of Allouche and Shallit [17] since K is an arbitrary semiring, hence not necessarily a Nœtherian ring. As here we are specifically interested in $$K=\mathbb {N}$$ and $$K=\mathbb {N}_\infty$$, we need this more general framework.

The notion of b-synchronized sequences was introduced in [130]. Related works are [129, 522]. In particular, see [522] for a proof of Proposition 3.4.25.

Most of the results presented in Section 3.4 come from [148]. The enumeration of properties of automatic sequences were also discussed in the surveys [540, 541].

The definition of β-recognizability in the present chapter differs from that of [145]. I believe that Definition 3.6.14 gives the right notion of β-recognizability as it allows us to prove that $$\mathbb {R}^d$$ is β-recognizable when β is a Parry number and to correct some mistakes in [145], in particular Fact 1 and Lemma 23. This choice is also justified by Remark 3.6.23. Finally, this definition is coherent with the original definition of b-recognizable sets of reals [96].

The proof of Theorem 3.6.29 is from [93, 111].

Theorem 3.6.55 is stated in [231] in a more general form. Let us also mention the related recent paper [230].

The complexity of all the algorithms provided by the methods presented in this chapter is given by a tower of exponentials whose height is given by the number of alternating quantifiers. However, some specific problems concerning b-recognizable sets of integers or real numbers have been shown to be decidable in an efficient way. I refer the interested reader to the following related works: [374, 413, 416].

In [220], a more general version of Theorem 3.6.61 is given. For a generalization of this result to $$\mathbb {R}^d$$, but under a more restrictive separation condition, see [213].

References

1. 1.
Adamczewski, B., Bell, J.P.: An analogue of Cobham’s theorem for fractals. Trans. Am. Math. Soc. 363(8), 4421–4442 (2011)
2. 12.
Allouche, J.-P., Rampersad, N., Shallit, J.: Periodicity, repetitions, and orbits of an automatic sequence. Theor. Comput. Sci. 410(30–32), 2795–2803 (2009)
3. 14.
Allouche, J.-P., Shallit, J.: Automatic Sequences: Theory, Applications, Generalizations. Cambridge University Press, Cambridge (2003)Google Scholar
4. 17.
Allouche, J.-P., Shallit, J.O.: The ring of k-regular sequences. Theor. Comput. Sci. 98, 163–197 (1992)
5. 70.
Berend, D., Frougny, C.: Computability by finite automata and Pisot bases. Math. Syst. Theory 27, 275–282 (1994)
6. 77.
Berstel, J., Reutenauer, C.: Noncommutative rational series with applications. Encyclopedia of Mathematics and Its Applications, vol. 137. Cambridge University Press, Cambridge (2011)Google Scholar
7. 78.
Berthé, V., Rigo, M. (eds.): Combinatorics, automata and number theory. Encyclopedia of Mathematics and Its Applications, vol. 135. Cambridge University Press, Cambridge (2010)Google Scholar
8. 93.
Boigelot, B., Brusten, J.: A generalization of Cobham’s theorem to automata over real numbers. Theor. Comput. Sci. 410(18), 1694–1703 (2009)
9. 94.
Boigelot, B., Brusten, J., Bruyère, V.: On the sets of real numbers recognized by finite automata in multiple bases. Log. Methods Comput. Sci. 6, 1–17 (2010)Google Scholar
10. 95.
Boigelot, B., Brusten, J., Leroux, J.: A generalization of Semenov’s theorem to automata over real numbers. In: Automated Deduction—CADE-22. Lecture Notes in Computer Science, vol. 5663, pp. 469–484. Springer, Berlin (2009)
11. 96.
Boigelot, B., Rassart, S., Wolper, P.: On the expressiveness of real and integer arithmetic automata (extended abstract). In: ICALP. Lecture Notes in Computer Science, vol. 1443, pp. 152–163. Springer, Berlin (1998)
12. 111.
Brusten, J.: On the sets of real vectors recognized by finite automata in multiple bases. PhD thesis, University of Liège (2011)Google Scholar
13. 112.
Bruyère, V.: Entiers et automates finis (1985). Mémoire de fin d’études, Université de MonsGoogle Scholar
14. 113.
Bruyère, V., Hansel, G.: Bertrand numeration systems and recognizability. Theor. Comput. Sci. 181, 17–43 (1997)
15. 114.
Bruyère, V., Hansel, G., Michaux, C., Villemaire, R.: Logic and p-recognizable sets of integers. Bull. Belg. Math. Soc. 1, 191–238 (1994). Corrigendum, Bull. Belg. Math. Soc. 1 (1994), 577Google Scholar
16. 115.
Büchi, J.R.: Weak second-order arithmetic and finite automata. Zeitschrift für mathematische Logik und Grundlagen der Mathematik 6, 66–92 (1960). Reprinted in Mac Lane, S., Siefkes, D. (eds.) The Collected Works of J. Richard Büchi. Springer, 1990, pp. 398–424Google Scholar
17. 129.
Carpi, A., D’Alonzo, V.: On factors of synchronized sequences. Theor. Comput. Sci. 411(44–46), 3932–3937 (2010)
18. 130.
Carpi, A., Maggi, C.: On synchronized sequences and their separators. Theor. Inform. Appl. 35(6), 513–524 (2002) (2001)
19. 142.
Chan, D.H.Y., Hare, K.G.: A multi-dimensional analogue of Cobham’s theorem for fractals. Proc. Am. Math. Soc. 142(2), 449–456 (2014)
20. 143.
Charlier, É., Kärki, T., Rigo, M.: Multidimensional generalized automatic sequences and shape-symmetric morphic words. Discret. Math. 310(6–7), 1238–1252 (2010)
21. 144.
Charlier, É., Lacroix, A., Rampersad, N.: Multi-dimensional sets recognizable in all abstract numeration systems. RAIRO Theor. Inform. Appl. 46(1), 51–65 (2012)
22. 145.
Charlier, É., Leroy, J., Rigo, M.: An analogue of Cobham’s theorem for graph directed iterated function systems. Adv. Math. 280, 86–120 (2015)
23. 147.
Charlier, É., Rampersad, N.: The growth function of S-recognizable sets. Theor. Comput. Sci. 412(39), 5400–5408 (2011)Google Scholar
24. 148.
Charlier, É., Rampersad, N., Shallit, J.: Enumeration and decidable properties of automatic sequences. Int. J. Found. Comput. Sci. 23(5), 1035–1066 (2012)
25. 149.
Charlier, É., Rigo, M., Steiner, W.: Abstract numeration systems on bounded languages and multiplication by a constant. Integers 8, A35, 19 (2008)Google Scholar
26. 155.
Cobham, A.: On the base-dependence of sets of numbers recognizable by finite automata. Math. Syst. Theory 3, 186–192 (1969)
27. 206.
Durand, F., Rigo, M.: On Cobham’s theorem. In: Handbook of Automata. European Mathematical Society Publishing House (in press)Google Scholar
28. 208.
Edgar, G.: Measure, Topology, and Fractal Geometry, 2nd edn. Undergraduate Texts in Mathematics. Springer, New York (2008)Google Scholar
29. 211.
Eilenberg, S.: Automata, Languages, and Machines, vol. A. Academic Press, New York (1974)
30. 213.
Elekes, M., Keleti, T., Máthé, A.: Self-similar and self-affine sets: measure of the intersection of two copies. Ergodic Theory Dyn. Syst. 30(2), 399–440 (2010)
31. 220.
Feng, D.J., Wang, Y.: On the structures of generating iterated function systems of Cantor sets. Adv. Math. 222(6), 1964–1981 (2009)
32. 221.
Ferrante, J., Rackoff, C.: A decision procedure for the first order theory of real addition with order. SIAM J. Comput. 4, 69–76 (1975)
33. 229.
Frougny, C.: Representations of numbers and finite automata. Math. Syst. Theory 25, 37–60 (1992)
34. 230.
Frougny, C., Pelantova, E.: Beta-representations of 0 and Pisot numbers. J. Théor. Nombres Bordeaux (in press)Google Scholar
35. 231.
Frougny, C., Sakarovitch, J.: Number representation and finite automata. In: Combinatorics, Automata and Number Theory. Encyclopedia of Mathematics and Its Applications, vol. 135, pp. 34–107. Cambridge University Press, Cambridge (2010)Google Scholar
36. 232.
Frougny, C., Solomyak, B.: On representation of integers in linear numeration systems. In: Pollicott, M., Schmidt, K. (eds.) Ergodic Theory of $${\mathbb {Z}}^d$$ Actions (Warwick, 1993–1994). London Mathematical Society Lecture Note Series, vol. 228, pp. 345–368. Cambridge University Press, Cambridge (1996)Google Scholar
37. 248.
Goč, D., Henshall, D., Shallit, J.: Automatic theorem-proving in combinatorics on words. Int. J. Found. Comput. Sci. 24(6), 781–798 (2013)
38. 250.
Goč, D., Mousavi, H., Shallit, J.: On the number of unbordered factors. In: Language and Automata Theory and Applications. Lecture Notes in Computer Science, vol. 7810, pp. 299–310. Springer, Heidelberg (2013)
39. 297.
Hollander, M.: Greedy numeration systems and regularity. Theory Comput. Syst. 31, 111–133 (1998)
40. 301.
Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, Boston (1979)
41. 306.
Hutchinson, J.E.: Fractals and self-similarity. Indiana Univ. Math. J. 30(5), 713–747 (1981)
42. 372.
Lecomte, P.B.A., Rigo, M.: Numeration systems on a regular language. Theory Comput. Syst. 34, 27–44 (2001)
43. 374.
Leroux, J.: A polynomial time Presburger criterion and synthesis for number decision diagrams. In: Proceedings of the 20th IEEE Symposium on Logic in Computer Science (LICS 2005), 26–29 June 2005, Chicago, IL, USA, pp. 147–156. IEEE Computer Society (2005)Google Scholar
44. 384.
Löding, C.: Efficient minimization of deterministic weak ω-automata. Inform. Process. Lett. 79(3), 105–109 (2001)
45. 386.
Lothaire, M.: Algebraic Combinatorics on Words. Encyclopedia of Mathematics and Its Applications, vol. 90. Cambridge University Press, Cambridge (2002)Google Scholar
46. 408.
Maler, O., Staiger, L.: On syntactic congruences for ω-languages. Theor. Comput. Sci. 183(1), 93–112 (1997)
47. 413.
Marsault, V., Sakarovitch, J.: Ultimate periodicity of b-recognisable sets: a quasilinear procedure. In: Developments in Language Theory. Lecture Notes in Computer Science, vol. 7907, pp. 362–373. Springer, Heidelberg (2013)
48. 416.
Milchior, A.: Büchi automata recognizing sets of reals definable in first-order logic with addition and order (2016). ArXiv:1610.06027Google Scholar
49. 426.
Mousavi, H.: Automatic theorem proving in Walnut (2016). ArXiv:1603.06017Google Scholar
50. 427.
Mousavi, H., Schaeffer, L., Shallit, J.: Decision algorithms for Fibonacci-automatic words, I: Basic results. RAIRO Theor. Inform. Appl. 50(1), 39–66 (2016)
51. 428.
Mousavi, H., Shallit, J.: Mechanical proofs of properties of the Tribonacci word. In: Combinatorics on Words. Lecture Notes in Computer Science, vol. 9304, pp. 170–190. Springer, Cham (2015)Google Scholar
52. 469.
Parry, W.: On the β-expansions of real numbers. Acta Math. Acad. Sci. Hung. 11, 401–416 (1960)
53. 476.
Perrin, D., Pin, J.E.: Infinite Words. Automata, Semigroups, Logic and Games. Elsevier/Academic Press, Amsterdam (2004)
54. 502.
Rigo, M.: Construction of regular languages and recognizability of polynomials. Discret. Math. 254, 485–496 (2002)
55. 503.
Rigo, M.: Formal Languages, Automata and Numeration Systems, Applications to Recognizability and Decidability, vol. 2. ISTE, Wiley (2014)
56. 520.
Salomaa, A., Soittola, M.: Automata-Theoretic Aspects of Formal Power Series. Springer, New York/Heidelberg (1978). Texts and Monographs in Computer Science
57. 522.
Schaeffer, D.G.L., Shallit, J.: Subword complexity and k-synchronization. In: Developments in Language Theory. 17th International Conference, DLT 2013, Marne-la-Vallée, France, June 18–21, 2013. Proceedings, no. 7907 in Lecture Notes in Computer Science, pp. 252–263. Springer, Berlin (2013)Google Scholar
58. 523.
Schaeffer, L.: Deciding properties of automatic sequences. Master’s Thesis, University of Waterloo (2013)Google Scholar
59. 524.
Schaeffer, L., Shallit, J.: The critical exponent is computable for automatic sequences. Int. J. Found. Comput. Sci. 23(8), 1611–1626 (2012)
60. 536.
Semenov, A.L.: Presburgerness of predicates regular in two number systems. Sibirskii Matematicheskii Zhurnal 18, 403–418 (1977, in Russian). English translation in Sib. J. Math. 18, 289–300 (1977)
61. 540.
Shallit, J.: Decidability and enumeration for automatic sequences: a survey. In: Computer Science—Theory and Applications. Lecture Notes in Computer Science, vol. 7913, pp. 49–63. Springer, Heidelberg (2013)
62. 541.
Shallit, J.: Enumeration and automatic sequences. Pure Math. Appl. (PU.M.A.) 25(1), 96–106 (2015)Google Scholar
63. 551.
Staiger, L.: Finite-state ω-languages. J. Comput. Syst. Sci. 27(3), 434–448 (1983)
64. 554.
Strogalov, A.S.: Regular languages with polynomial growth in the number of words. Diskret. Mat. 2(3), 146–152 (1990)
65. 592.
Zeckendorf, E.: Représentation des nombres naturels par une somme de nombres de Fibonacci ou de nombres Lucas. Bull. Soc. R. Liége 41, 179–182 (1972)