ON THE SETS OF REAL NUMBERS RECOGNIZED BY FINITE AUTOMATA IN MULTIPLE BASES

. This article studies the expressive power of ﬁnite automata recognizing sets of real numbers encoded in positional notation. We consider Muller automata as well as the restricted class of weak deterministic automata, used as symbolic set representations in actual applications. In previous work, it has been established that the sets of numbers that are recognizable by weak deterministic automata in two bases that do not share the same set of prime factors are exactly those that are deﬁnable in the ﬁrst order additive theory of real and integer numbers. This result extends Cobham’s theorem , which characterizes the sets of integer numbers that are recognizable by ﬁnite automata in multiple bases. In this article, we ﬁrst generalize this result to multiplicatively independent bases, which brings it closer to the original statement of Cobham’s theorem. Then, we study the sets of reals recognizable by Muller automata in two bases. We show with a counterexample that, in this setting, Cobham’s theorem does not generalize to multiplicatively independent bases. Finally, we prove that the sets of reals that are recognizable by Muller automata in two bases that do not share the same set of prime factors are exactly those deﬁnable in the ﬁrst order additive theory of real and integer numbers. These sets are thus also recognizable by weak deterministic automata. This result leads to a precise characterization of the sets of real numbers that are recognizable in multiple bases, and provides a theoretical justiﬁcation to the use of weak automata as symbolic representations of sets.


Introduction
By using positional notation, real numbers can be encoded as infinite words over an alphabet composed of a fixed number of digits, with an additional symbol for separating their numbers. Finally, we establish that a set S ⊆ R is simultaneously recognizable in two bases that do not share the same set of prime factors iff S is definable in R, Z, +, < . As a corollary, such a set must then be recognizable by a weak deterministic automaton. Our result thus provides a theoretical justification to the use of weak automata, by showing that their expressive power corresponds precisely to the sets of reals recognizable by infinite-word automata in every encoding base.

Basic notions
2.1. Encodings of numbers. Let r ∈ N >1 be an integer numeration base and let Σ r = {0, . . . , r − 1} be the corresponding set of digits. We encode a real number x in base r, most significant digit first, by words of the form w I w F , where w I ∈ Σ * r encodes an integer part x I ∈ Z of x and w F ∈ Σ ω r encodes a fractional part x F ∈ [0, 1]. Note that the decomposition of x into x I and x F is not necessarily unique, e.g., x = 3 gives either x I = 3 and x F = 0, or x I = 2 and x F = 1. Negative integer numbers are represented by their r's-complement, i.e., the encodings of x I ∈ Z <0 are formed by the last p digits of the encodings of r p + x I . The length p of w I is not fixed but has to be large enough for −r p−1 ≤ x I < r p−1 to hold; thus, the most significant digit of an encoding is equal to 0 for positive integer parts and to r − 1 for negative ones [BBR97]. As a consequence, the set of valid encodings of numbers in base r forms the language {0, r − 1}Σ * r Σ ω r . Some numbers have two distinct encodings with the same integer-part length, e.g., in base 10, the number 11/2 admits the encodings 0 + 5 50 ω and 0 + 5 49 ω . Such encodings are called dual. For a word w = b I p−1 b I p−2 . .
Σ ω r , we denote by [w] r the real number encoded by w in base r, i.e., For finite words w ∈ Σ * r , we denote by [w] r the natural number encoded by w, i.e., [w] r = [0w 0 ω ] r .
It is known [HW85] that a word w ∈ {0, r − 1}Σ * r Σ ω r is ultimately periodic, i.e., of the form {0, r − 1}u 1 u 2 u ω 3 with u 1 , u 2 ∈ Σ * r and u 3 ∈ Σ + r , if and only if [w] r is rational. The word u 3 is then called a period of w.
2.2. Real Number Automata. For a set S ⊆ R, we denote by L r (S) the language of all the base-r encodings of the elements of S. If L r (S) is ω-regular, then it can be accepted by a (non-unique) infinite-word automaton, called a Real Number Automaton (RNA), recognizing S. Such a set S is then said to be r-recognizable. RNA can be generalized into Real Vector Automata (RVA), suited for subsets of R n , with n > 0 [BBR97].
RNA have originally been defined as Büchi automata [BBR97]. In this article, we will instead consider them to be deterministic Muller automata. This adaptation can be made without loss of generality, since both classes of automata share the same expressive power [McN66,PP04]. The fact that RNA have a deterministic transition relation will simplify technical developments.
The r-recognizable sets of real numbers are precisely described by the following result. This logical characterization will often be used in this article.
Theorem 2.1 ( [BRW98]). Let r ∈ N >1 be a base. A subset of R is r-recognizable iff it is definable in the first-order theory R, Z, +, <, X r , where X r (x, u, k) is a base-dependent predicate that holds whenever u is an integer power of r, and there exists an encoding of x in which the digit at the position specified by u is equal to k.
It is known that the full expressive power of infinite-word automata is not needed for representing the subsets of R that are definable in R, Z, +, < . The following theorem establishes that such sets can be recognized by weak deterministic automata, i.e., deterministic Büchi automata such that each strongly connected component of their transition graph contains either only accepting or only non-accepting states. A set recognized by a weak deterministic automaton in base r is said to be weakly r-recognizable, and such an automaton is then called a weak RNA.
Theorem 2.2 ( [BJW05]). If a subset of R is definable in the first-order theory R, Z, +, < , then it is weakly r-recognizable in every base r ∈ N >1 .
2.3. Topology. In this section, we recall some notions about topology, which is a useful tool for reasoning about the properties of sets of words and numbers [PP04].
2.3.1. General concepts. Given a set S, either of words or of numbers, a distance d(x, y) defined on this set induces a metric topology on subsets of S.
A closed set is a set whose complement with respect to S is open, or, equivalently, a set that contains the limits of all its converging sequences of elements. The following notations will be used: • F is the class of closed sets, • G is the class of open sets, • F σ is the class of countable unions of closed sets, • G δ is the class of countable intersections of open sets.
Other classes can be defined from these notations: The class B(F ) = B(G) contains the finite Boolean combinations of open and closed sets, whereas F σ ∩ G δ is the class of sets that can be expressed as countable unions of closed sets as well as countable intersections of open sets.
Those classes of sets are the first levels of the Borel hierarchy. In a metric topology, this hierarchy states that F and G are subclasses of B(F ) = B(G), which is itself a subclass of F σ ∩ G δ .
2.3.2. Topology of ω-words. Given a base r ∈ N >1 and the alphabet Σ r ∪ { }, we define the following distance relation between infinite words over this alphabet: where |common(w, w )| denotes the length of the longest common prefix of w and w . This distance induces a topology on (Σ r ∪ { }) ω .
It has been established [MS97] that weak deterministic automata accept exactly the ω-regular languages that belong to the topological class F σ ∩ G δ .
It is also known [BJW05] that the ω-regular languages that satisfy the dense oscillating sequence property cannot be accepted by weak deterministic automata.
2.3.3. Topology of real numbers. We consider the topology on the sets of real numbers induced by the distance relation defined by d(x, y) = |x − y|.
In this topology, a notion of dense oscillating sequence can be defined in the same way as for ω-words: We say that a set S ⊆ R satisfies the dense oscillating sequence property if, x 1 , x 2 , x 3 , . . . being real numbers and ε 1 , ε 2 , ε 3 , . . . being distances, one has that ∃x 1 ∀ε 1 ∃x 2 ∀ε 2 ∃x 3 ∀ε 3 · · · such that d(x i , x i+1 ) ≤ ε i for all i ≥ 1, x i ∈ S for all odd i, and x i / ∈ S for all even i. We have the following theorem.
Theorem 2.3. Let r ∈ N >1 be a base. The r-recognizable sets S ⊆ R that satisfy the dense oscillating sequence property are not weakly r-recognizable.
Proof. Consider a r-recognizable set S ⊆ R satisfying the dense oscillating sequence property. It is sufficient to establish that L r (S) satisfies the dense oscillating sequence property as well.
Recall that each real number admits multiple encodings. First, the first digit of an encoding can be repeated at will. Second, for a given length of the integer part (assumed to be sufficiently large), a number admits either one encoding, or two (dual) ones.
Let S 1 , S 2 ⊆ R be sets of numbers such that S 1 ∩ S 2 = ∅. Consider any number x 1 ∈ S 1 for which there exist arbitrarily close numbers in S 2 . Then, there exists an encoding w 1 of x 1 for which there exist arbitrarily close encodings w 2 of numbers x 2 of S. We can ask more: There exists an encoding w 1 of x 1 for which there exist arbitrarily close encodings w 2 of numbers x 2 of S 2 , including the dual encodings with the same integer part length as w 1 , if any. Formally, ( where |w| I denotes the integer part length of the encoding w. By hypothesis, there exists x 1 ∈ S such that ∀ε 1 ∃x 2 ∀ε 2 ∃x 3 ∀ε 3 · · · , d(x i , x i+1 ) ≤ ε i for all i ≥ 1, x i ∈ S for all odd i, and x i / ∈ S for all even i. We choose S 1 = S, and define S 2 as the subset of S whose elements x 2 satisfy ∀ε 2 ∃x 3 ∀ε 3 ∃x 4 ∀ε 4 · · · , d(x i , x i+1 ) ≤ ε i for all i ≥ 2, x i ∈ S for all odd i, and x i / ∈ S for all even i. By the previous property, there exists an encoding w 1 of x 1 such that for arbitrarily small ε > 0, there exists an element x 2 of S 2 whose all encodings w 2 satisfy d(w 1 , w 2 ) < ε , provided that they share the same integerpart length as w 1 . Moreover, there exists at least one such encoding w 2 . By applying a similar reasoning to x 2 , x 3 , x 4 , . . ., one obtains ∃w 1 ∀ε 1 ∃w 2 ∀ε 2 ∃w 3 ∀ε 3 · · · , d(w i , w i+1 ) ≤ ε i for all i ≥ 1, w i ∈ L r (S) for all odd i, and w i / ∈ L r (S) for all even i. It follows that the language L r (S) satisfies the dense oscillating sequence property.

2.3.4.
Links between the topology of ω-words and the topology of real numbers. In this section, the notations F σ , G δ and F σ ∩ G δ (resp. F σ , G δ and F σ ∩ G δ ) will be used when dealing with the topology of ω-words (resp. real numbers).
Lemma 2.4. Let r ∈ N >1 be a base, and let L ⊆ (Σ r ∪ { }) ω be a language. If L belongs to F σ , then the set of real numbers that have an encoding in L belongs to F σ .
This language is open for all j. Since L belongs to F σ , it can be expressed as is a sublanguage of L such that the language of valid encodings it contains is exactly the language of valid encodings that belong to L. When i and j are fixed, the set F i ∩ W j is the intersection of a closed and an open set; hence, it belongs to F σ and is thus a countable union of closed sets: For each of these closed sets L i,j,k , define S i,j,k ⊆ R as the set of numbers that have at least one encoding in L i,j,k . The set S i,j,k is closed. Indeed, suppose that S i,j,k is not closed. Thus, there exists a converging sequence of points of S i,j,k whose limit x does not belong to S i,j,k . If this sequence contains infinitely many points greater than x, one extracts its subsequence composed of those points. Otherwise, one extracts the subsequence composed of its points that are lower than x. Each of the points of S i,j,k has at least one encoding in F i ∩ W j . Since the valid encodings in F i ∩ W j have the same integer part length, the converging subsequence of points of S i,j,k is mapped to a converging sequence of words encoding those points. Since L i,j,k is closed, it contains the limit of its converging sequences, hence the limit x of the converging sequence of points of S i,j,k has an encoding in L i,j,k , which leads to a contradiction since this limit would be in S i,j,k .
It follows that the set of real numbers that have an encoding in L is a countable union (i,j,k)∈N 3 S i,j,k of closed sets in R, and thus belongs to F σ . Lemma 2.5. Let S ⊆ R, and r ∈ N >1 be a base. The set S belongs to F σ ∩ G δ iff the language L r (S) belongs to F σ ∩ G δ .
Proof. It is known [BJW05] that if a set S ⊆ R belongs to F σ ∩ G δ , then the language L r (S) belongs to F σ ∩ G δ .
If L r (S) belongs to F σ ∩ G δ , then it belongs in particular to F σ . By Lemma 2.4, S then belongs to F σ . On the other hand, L r (S) belongs to G δ . It follows that the complement of L r (S) belongs to F σ . By Lemma 2.4, the set of real numbers that have an encoding in this language belongs to F σ , which implies that S belongs to G δ .
In the sequel, we will need to apply transformations to sets represented by RNA (or weak RNA), or to the chosen encoding base.
Theorem 2.6. Let S ⊆ R, r ∈ N >1 , and a, b ∈ Q. If S is (resp. weakly) r-recognizable then the sets aS + b and S ∩ [a, b] are (resp. weakly) r-recognizable as well.
Proof. If S is r-recognizable, then it is definable in R, Z, +, <, X r by Theorem 2.1, and so are the sets aS + b and S ∩ [a, b], that thus are both r-recognizable.
If S is weakly r-recognizable, then the language L r (S) belongs to the class F σ ∩ G δ . By Lemma 2.5, the set S belongs to the class F σ ∩ G δ , and so are the sets aS + b and S ∩ [a, b]. Since these sets are r-recognizable by the first part of the proof, it follows from [MS97] that they are also weakly r-recognizable.
Proof. If S is r-recognizable, then the result is a consequence of Theorem 2.1, since the predicate X r (x, u, k) can be expressed in terms of X r l (x, u, k), and reciprocally. Indeed, testing the value of the digit at a given position in an encoding in base r l can be reduced to the test of l digits in base r, and conversely.
If S is weakly r-recognizable, then L r (S) belongs to the class F σ ∩ G δ . By Lemma 2.5, S belongs to the class F σ ∩ G δ , and L r l (S) belongs to the class F σ ∩ G δ . Since S is r lrecognizable, S is weakly r l -recognizable. The case of a r l -recognizable set S is handled in the same way.

Prior results and objectives
This article is aimed at characterizing precisely the conditions under which a set of real numbers is recognizable, or weakly recognizable, in multiple bases. We start by summarizing some known results.
First, the case of sets of integer numbers is handled by the following result, which is a direct corollary of the well-known Cobham's theorem. Note that for sets of integer numbers, the notions of r-recognizability and weak r-recognizability coincide, and correspond to the existence of a finite-word automaton accepting only the integer part of encodings. BHMV94]). Let r, s ∈ N >1 be bases that are multiplicatively independent, i.e., such that r p = s q for all p, q ∈ N >0 . A set S ⊆ Z is both r-and s-recognizable iff it is definable in the first-order theory Z, +, < .
If r, s ∈ N >1 are multiplicatively dependent, then a set S ⊆ Z is r-recognizable iff it is s-recognizable, as a consequence of Theorem 2.7. It follows that Theorem 3.1 fully characterizes recognizability in multiple bases for sets of integer numbers.
Next, for sets of real numbers recognized by weak automata, we have the following result.
Theorem 3.2 ( [BB09]). Let r, s ∈ N >1 be bases that do not share the same set of prime factors. A set S ⊆ R is both weakly r-and weakly s-recognizable iff it is definable in the first-order theory R, Z, +, < .
In this paper, we extend Theorem 3.2 in two ways. First, we will show in Section 5 that this result also holds for multiplicatively independent bases, which weakens the hypotheses of the theorem and brings its statement closer to Theorem 3.1. Formally, we will prove the following theorem.
Theorem 3.3. Let r, s ∈ N >1 be two multiplicatively independent bases. A set S ⊆ R is both weakly r-and weakly s-recognizable iff it is definable in the first-order theory R, Z, +, < .
Second, we will establish in Section 6 that a similar result holds for recognizable (as opposed to weakly recognizable) sets of real numbers. Formally, we will prove the following theorem.
Theorem 3.4. Let r, s ∈ N >1 be two bases that do not share the same set of prime factors. A set S ⊆ R is both r-and s-recognizable iff it is definable in the first-order theory R, Z, +, < .
In this particular case, we will also show that considering bases with different sets of prime factors is essential, and that multiplicatively independent bases do not lead to a similar property.
Before proving Theorems 3.3 and 3.4, we show in the next section that these problems can be reduced to simpler ones.

Problem reductions
In the next sections, we will consider sets S ⊆ R that are simultaneously recognizable, either by RNA or by weak RNA, in two bases r and s that either are multiplicatively independent, or have different sets of prime factors. We will then tackle the problem of proving that such sets are definable in R, Z, +, < . In this section, we reduce this problem, by restricting the domain to the interval [0, 1], and introducing the notion of boundary point.
4.1. Reduction to [0, 1]. This section is adapted from [BB09]. Let S ⊆ R be a set of real numbers. The set S can be decomposed into a countable union where for all i, S F i ⊆ [0, 1] is the set of fractional parts that can be added to the integer i to obtain an element x ∈ S.
If we decompose the set Z into equivalence classes S I 1 , S I 2 , S I 3 , . . . such that two integers i and j are in the same equivalence class iff the sets S F i and S F j are identical, then this union becomes a (finite or infinite) union Assume now that S is recognizable by a (resp. weak) RNA A in some base r ∈ N >1 . Recall that A has a deterministic transition relation. For each encoding of each possible value x I ∈ Z , the path in A that reads this encoding followed by the separator leads to a state q accepting a language L q . The language 0 + L q encodes the set of all fractional parts x F that can be associated to x I , i.e., the set S q = {x F ∈ [0, 1] | x I + x F ∈ S}. Note that the dual encodings of 0 and 1 may be missing, but this is not problematic.
Such states q are in a finite number n, and can w.l.o.g. be supposed to accept languages that are pairwise different (otherwise, it suffices to modify the destinations of the transitions labeled by that lead to redundant states). Assuming w.l.o.g. that the languages accepted from every state are not empty, it follows that the languages L q are in the same finite number n, and so are the sets S q . The sets S q correspond exactly to those of the sets S F i that are not empty. Hence, the number n of sets S q is independent from the representation base.
The set S can thus be decomposed into a finite union where the sets S I i ⊆ Z are non-empty and pairwise distinct, and the sets S F i ⊆ [0, 1] are non-empty and pairwise different. Furthermore, each set S I i is recognizable by a finite-word automaton in every base in which S is recognizable, and each set S F i is (resp. weakly) recognizable in every base in which S is (resp. weakly) recognizable 1 .
Assume now that S ⊆ R is simultaneously (resp. weakly) r-and s-recognizable, with respect to bases r and s that are multiplicatively independent. By Theorem 3.1, each set S I i is thus definable in Z, +, < . This reduces the problem of establishing that S is definable in R, Z, +, < to the same problem for each set S F i . Since we have S F i ⊆ [0, 1] for all i, the problem has thus been reduced from the domain R to the interval [0, 1].

Boundary points.
A point x ∈ R is a boundary point of a set S ⊆ R iff all its neighborhoods contain at least one point from S as well as one from its complement S = R \ S.
Lemma 4.1. Let r ∈ N >1 be a base. If a set S ⊆ R is r-recognizable, then the set B S of boundary points of S is r-recognizable.
Proof. Since S is r-recognizable, it is definable in R, Z, +, <, X r by Theorem 2.1. It is sufficient to show that B S is definable in R, Z, +, <, X r . A formula defining B S in this theory is Lemma 4.2. Let r ∈ N >1 be a base. If a r-recognizable set S ⊆ R has only finitely many boundary points, then it is definable in the first-order theory R, Z, +, < .
Proof. If S ⊆ R has only finitely many boundary points, then it can be decomposed into a finite union of intervals such that the extremities of these intervals are the boundary points of S.
In order to prove that S is definable in R, Z, +, < , it is sufficient to show that the boundary points of S are rational numbers. Since S is r-recognizable, the finite set B S of its boundary points is r-recognizable by Lemma 4.1. It follows that its elements are encoded by words accepted by a finite automaton, and that share a finite number of fractional parts. These are necessarily ultimately periodic, from which the elements of B S are rational.

Multiplicatively independent bases
Let r, s ∈ N >1 be two multiplicatively independent bases. The first aim of this section is to prove Theorem 3.3, i.e., to establish that the subsets of R that are both weakly r-and weakly s-recognizable are exactly those that are definable in R, Z, +, < . Then, a second goal will be to show that the subsets of R that are both r-and s-recognizable do not enjoy the same property.
Thanks to the reduction discussed in Section 4.1, it is sufficient to prove these results for sets restricted to the interval [0, 1]. Besides, Lemma 4.2 implies that, in order to show that a recognizable set is definable in R, Z, +, < , it suffices to prove that it admits only a finite number of boundary points.
1 Indeed, in any (resp. weak) RNA recognizing the set S, there exists a state q accepting a language Lq such that the language encoding S F i is 0 + Lq. In order for such a language to contain all encodings of the numbers it encodes, it should also contain the words (r − 1) + (r − 1) ω if 0 ω ∈ Lq, and 0 + 1 0 ω if (r − 1) ω ∈ Lq.
We thus proceed as follows. We consider a set S ⊆ [0, 1] that is both (resp. weakly) rand s-recognizable, and assume by contradiction that S has infinitely many boundary points. In Section 5.1, we derive some useful properties under this assumption. In Section 5.2, we then show that our assumption leads to a contradiction in the case of weak recognizability, proving that the sets that are both weakly r-and weakly s-recognizable are necessarily definable in R, Z, +, < , hence Theorem 3.3. Finally, in Section 5.3, we show with the help of a counterexample that this result does not generalize to sets that are both r-and s-recognizable.
5.1. Product stability. By hypothesis, the set S ⊆ [0, 1] is (resp. weakly) r-recognizable. Let A r be a (resp. weak) RNA recognizing S in base r. We assume w.l.o.g. that the transition relation of A r is complete.
Since S is r-recognizable, the set B S of boundary points of S is r-recognizable by Lemma 4.1. Let A B r be a RNA recognizing B S . By assumption, S has infinitely many boundary points, hence there exist infinitely many distinct paths of A B r that end up cycling in the same set of accepting states. One can thus extract from A B r an infinite language L = 0 uv * tw ω , where t, u, v, w ∈ Σ * r , |v| > 0, |w| > 0, and L encodes an infinite subset of the boundary points of S. We then define y = [0 uv ω ] r and, for each k ∈ N >0 , y k = [0 uv k tw ω ] r . The sequence y 1 , y 2 , y 3 , . . . ∈ Q ω forms an infinite sequence of distinct boundary points of S, converging to y ∈ Q. If we have y k > y for infinitely many k, then we define S 1 = (S − y) ∩ [0, 1]. Otherwise, we define S 1 = (−S + y) ∩ [0, 1]. From Theorem 2.6, the set S 1 is both (resp. weakly) r-and s-recognizable. Moreover, this set admits an infinite sequence of distinct boundary points that converges to 0.
Let A 1 r and A 1 s be (resp. weak) RNA recognizing S 1 in the respective bases r and s. The path π 0 of A 1 r that reads 0 0 ω is composed of a prefix labeled by 0 , followed by an acyclic path of length p ≥ 0, and finally by a cycle of length q > 0. It follows that a word of the form 0 0 p t, with t ∈ Σ ω r , is accepted by A 1 r iff the word 0 0 p+q t is accepted as well. Remark that the set S 1 admits infinitely many boundary points with a base-r encoding beginning with 0 0 p . Similar properties hold for A 1 s . In this automaton, the path π 0 recognizing 0 0 ω reads the symbols 0 and , and then follows an acyclic sequence of length p before reaching a cycle of length q .
We now define S 2 = r p S 1 ∩ [0, 1]. Like S 1 , the set S 2 admits an infinite sequence of boundary points that converges to 0. Moreover, by Theorem 2.6, S 2 is both (resp. weakly) r-and s-recognizable. Let A 2 r be a (resp. weak) RNA recognizing S 2 in base r. For every t ∈ Σ ω r , the word 0 t is accepted by A 2 r iff the word 0 0 q t is accepted as well. In other words, the fact that a number x ∈ [0, 1] belongs or not to S 2 is not influenced by the insertion of q zero digits in its encodings, immediately after the symbol . This amounts to dividing the value of x by r q , which leads to the following definition.
From the previous discussion, we have that S 2 is r q -product-stable in [0, 1]. We then define S 3 = s p S 2 ∩ [0, 1]. The set S 3 is r q -product-stable in [0, 1] as well. By Theorem 2.6, S 3 is also both (resp. weakly) r-and s-recognizable. Besides, since S 3 = r p s p S 1 ∩ [0, 1], the set S 3 can alternatively be obtained by first defining S 4 = s p S 1 ∩ [0, 1], which is both (resp. weakly) r-and s-recognizable by Theorem 2.6. Then, one has S 3 = r p S 4 ∩ [0, 1]. By a similar reasoning in base s, we get that S 3 is s q -product-stable in [0, 1]. Like S 2 , the set S 3 admits an infinite sequence of distinct boundary points that converges to 0.
Finally, we replace the bases r and s by r = r q and s = s q , thanks to Theorem 2.7. The results of this section are then summarized by the following lemma.
Lemma 5.2. Let r, s ∈ N >1 be two multiplicatively independent bases, and let S ⊆ [0, 1] be a set that is both (resp. weakly) r-and s-recognizable, and that admits infinitely many boundary points. There exist powers r = r i and s = s j of r and s, with i, j ∈ N >0 , and a set S ⊆ [0, 1] that is both (resp. weakly) r -and s -recognizable, both r -and s -product-stable in [0, 1], and that admits infinitely many boundary points.

5.2.
Recognizability by weak RNA. We are now ready to prove that our initial assumption that the set S ⊆ [0, 1] has infinitely many boundary points leads to a contradiction, under the hypothesis that S is both weakly r-and weakly s-recognizable.
By Lemma 5.2, we can assume w.l.o.g. that S is r-and s-product-stable in [0, 1]. Hence, there exist α, β ∈ (0, 1] such that α ∈ S and β ∈ S. For every i, j ∈ Z such that r i s j α ∈ (0, 1], we thus have r i s j α ∈ S. Similarly, for every i, j ∈ Z such that r i s j β ∈ (0, 1], we have r i s j β ∈ S. Let γ be an arbitrary point in the open interval (0, 1). Since r and s are multiplicatively independent, it follows from Kronecker's approximation theorem [HW85] that any open interval of R >0 contains some number of the form r i /s j with i, j ∈ N >0 [Per90]. Hence, for every sufficiently small ε > 0 and δ ∈ {α, β}, there exist i, j ∈ N >0 such that 0 < γ − ε < (r i /s j )δ < γ + ε < 1 showing that every neighborhood N ε (γ) of γ contains one point from S as well as one from S. The latter property leads to a contradiction, since it implies that S satisfies the dense oscillating sequence property, and therefore, by Theorem 2.3, cannot be recognized by a weak RNA.
Taking into account the problem reductions introduced in Sections 4.1 and 4.2, we thus have proven Theorem 3.3.
Thanks to the above mentioned reductions, Theorem 3.3 has the following corollary. A set S ⊆ R is weakly r-and weakly s-recognizable in two multiplicatively independent bases iff it can be expressed as a finite union i ( is a finite union of intervals with rational extremities. It has already been observed in [Wei99] that such a structural description of subsets of R is equivalent to definability in R, Z, +, < . 5.3. Recognizability by RNA. We now show that Theorem 3.3 does not directly generalize to non-weak recognizability. Indeed, a set can then be recognizable in two multiplicatively independent bases without being definable in R, Z, +, < . This property is established by the following theorem.
Theorem 5.3. For every pair of bases r, s ∈ N >1 that share the same set of prime factors, there exists a set S that is both r-and s-recognizable, and that is not definable in the firstorder theory R, Z, +, < .

Proof. A counterexample is provided by the set
where f 1 , f 2 , . . . f k are the prime factors of r and s. In either base t ∈ {r, s}, this set is encoded by the language L t = {0, t − 1}Σ * t Σ * t (0 ω ∪ (t − 1) ω ), i.e., the set S contains the numbers that admit dual encodings. Indeed, each word of L t represents a number x = n/t k (n ∈ Z, k ∈ N) that belongs to S. Reciprocally, let x be an element of S. One can assume w.l.o.g. that the denominator of x is a power of t.
Hence, x admits an encoding that ends with 0 ω .
The language L t is clearly ω-regular, hence S is both r-and s-recognizable. Suppose that S is definable in R, Z, +, < . Then, it is weakly t-recognizable in any base t thanks to Theorem 2.2. By Theorem 2.3 and since S satisfies the dense oscillating sequence property, this leads to a contradiction.
Note that the set S (resp. R\S) defined in the previous proof is recognizable by deterministic co-Büchi automata (resp. deterministic Büchi automata) in both bases r and s. It follows that Theorem 3.3 does not generalize to sets recognizable by those classes of automata either.
The case of bases that do not share the same set of prime factors is investigated in the next section.

Bases with different sets of prime factors
We now consider two bases r, s ∈ N >1 that do not share the same set of prime factors. Since this property implies that r and s are multiplicatively independent, we know by Theorem 3.3 that any subset of R that is simultaneously weakly r-and weakly s-recognizable must be definable in R, Z, +, < .
The goal of this section is now to prove Theorem 3.4, i.e., that a subset of R that is both r-and s-recognizable is necessarily definable in R, Z, +, < . Recall that, as shown in Section 5.3, this result does not extend to pairs of bases that are multiplicatively independent but share the same prime factors.
We proceed like in Section 5 and start from an arbitrary set S that is both r-and s-recognizable. Thanks to the reduction discussed in Section 4.1, it suffices to consider S ⊆ [0, 1]. Moreover, according to Lemma 4.2, one can prove that S is definable in R, Z, +, < by showing that it admits only finitely many boundary points. We thus assume that S admits infinitely many boundary points. From this assumption, we will derive in Sections 6.1 and 6.2 additional properties that will eventually lead to a contradiction.
It is possible to reuse part of the reasoning made in Section 5. By Lemma 5.2, there exist bases r and s with different sets of prime factors, and a set S ⊆ [0, 1] that is both r -and s -recognizable, both r -and s -product-stable in [0, 1], and that has infinitely many boundary points. Replacing the set S by S , and the bases r, s by r , s , we can thus assume w.l.o.g. that the set S that we consider is both r-and s-product-stable in [0, 1]. Finally, we also impose w.l.o.g. that there exists a prime factor of s that does not divide r.
6.1. Sum stability. Our first strategy consists in exploiting Cobham's theorem so as to derive additional properties of S. The initial step is to build from S a set S ⊆ R ≥0 that coincides with S over [0, 1], shares the same recognizability and product-stability properties, and contains numbers with non-trivial integer parts.
Lemma 6.1. Let r, s ∈ N >1 be two bases with different sets of prime factors, and let S ⊆ [0, 1] be a set that is r-and s-recognizable, r-and s-product-stable in [0, 1], and that has infinitely many boundary points. There exists a set S ⊆ R ≥0 that is r-and s-recognizable, r-and s-product-stable in R ≥0 , and that has infinitely many boundary points.
This set is clearly r-product-stable in R ≥0 . Since S is r-product-stable in [0, 1], we have S ∩ [0, 1] = S showing that S has infinitely many boundary points. A RNA A r recognizing S in base r is built from an automaton A r recognizing S by delaying arbitrarily the reading of the symbol . In other words, a word uv w is accepted by A r , with u ∈ {0, r − 1}Σ * r , v ∈ Σ * r , and w ∈ Σ ω r , whenever the word u vw is accepted by A r .
In order to prove that S is s-recognizable, notice that, since S is both r-and s-productstable in [0, 1], we have S = {r i s j x | x ∈ S ∧i, j ∈ Z}. The set S can therefore be expressed as S = {s k x | x ∈ S ∧ k ∈ N}. By the same reasoning as in base r, this set is s-recognizable, as well as s-product-stable in R ≥0 .
Consider now a set S obtained from S by Lemma 6.1. As discussed in Section 4.1, this set can be expressed as a finite union S = i (S I i + S F i ), where for each i, we have S I i ⊆ N and S F i ⊆ [0, 1]. Moreover, for each i, the set S I i is both r-and s-recognizable, and it follows from Theorem 3.1 that this set is definable in N, +, < . Since such a set is ultimately periodic [Cob69,BHMV94], there exists n i ∈ N >0 for which ∀x ∈ N, x ≥ n i : x ∈ S I i ⇔ x + n i ∈ S I i . By defining n = lcm i (n i ), we obtain ∀x ∈ R ≥0 , x ≥ n : x ∈ S ⇔ x + n ∈ S . This prompts the following definition.
Definition 6.2. Let D ⊆ R be a domain, and let t ∈ R. A set S ⊆ D is t-sum-stable in D iff for all x ∈ D such that x + t ∈ D, we have x ∈ S ⇔ x + t ∈ S.
Let us show that the set S = (1/n)S \{0} is 1-sum-stable in R >0 . For every x ≥ 1, we have x ∈ S ⇔ x + 1 ∈ S . For x < 1, we choose k ∈ N such that r k x ≥ 1. Exploiting the properties of S (transposed to S ), we get x ∈ S ⇔ r k x ∈ S ⇔ r k x + r k ∈ S ⇔ x + 1 ∈ S . Lemma 6.1 can thus be refined as follows.
Lemma 6.3. Let r, s ∈ N >1 be two bases with different sets of prime factors, and let S ⊆ [0, 1] be a set that is r-and s-recognizable, r-and s-product-stable in [0, 1], and that has infinitely many boundary points. There exists a set S ⊆ R >0 that is r-and s-recognizable, has infinitely many boundary points, and is r-product-, s-product-and 1-sum-stable in R >0 .
Note that Lemmas 6.1 and 6.3 still hold if the bases r and s are multiplicatively independent.
6.2. Exploiting sum-stability properties. Consider a set S ⊆ R >0 that satisfies the properties expressed by Lemma 6.3. It remains to show that these properties lead to a contradiction. The hypothesis on the prime factors of r and s is explicitly used in this section.
We proceed by characterizing the numbers t ∈ R for which S is t-sum-stable in R >0 . These form the set T S = {t ∈ R | ∀x ∈ R >0 : x + t ∈ R >0 ⇒ (x ∈ S ⇔ x + t ∈ S )}. Since S is r-recognizable, it is definable in R, Z, +, <, X r by Theorem 2.1, and so is T S , that is therefore r-recognizable as well.
The set T S enjoys interesting closure properties: As a consequence, we either have S = ∅ or S = R >0 , which contradicts our initial assumption that this set has infinitely many boundary points. As a consequence, our original set S is definable in R, Z, +, < , and we have proven Theorem 3.4.

Conclusions
In this article, we have established that the sets of real numbers that can be recognized by finite automata in two sufficiently different bases are exactly those that are definable in the first-order additive theory of real and integer variables R, Z, +, < . In the case of weak deterministic automata, used in actual implementations of symbolic representation systems [LASH, FAST, LIRA], the condition on the bases turns out to be multiplicative independence. It is worth mentioning that recognizability in multiplicatively dependent bases is equivalent to recognizability in one of them, and that definability in R, Z, +, < implies recognizability in every base. We have thus obtained a complete characterization of the sets of numbers recognizable in multiple bases, similar to the one known for the integer domain [Cob69].
For Muller, deterministic Büchi, and co-Büchi automata, we have demonstrated that multiplicative independence of the bases is not a strong enough condition, and that the bases must have different sets of prime factors in order to force definability of the represented sets in R, Z, +, < . Recall that the sets definable in that theory can all be recognized by weak deterministic automata. We have thus established that the sets of real numbers that can be recognized by infinite-word automata in all encoding bases are exactly those that are recognizable by weak deterministic automata.
It is worth mentioning that, prior to this result, weak deterministic automata were already been used as actual data structures for representing sets of real numbers in statespace exploration tools [BJW05,LASH]. The motivation behind their use was at this time essentially practical: The algorithmic manipulation of these automata was considerably simpler than that of unrestricted infinite-word ones. Moreover, their expressive power was known to be sufficient for handling the sets definable in R, Z, +, < , which matched the application requirements. The results developed in this article now bring an additional theoretical justification to the choice of weak deterministic automata for representing sets of real and integer numbers: If recognizability by automata has to be achieved regardless of the representation base, then the representable sets are exactly those that can be recognized by weak deterministic automata.