DEFINABILITY AND DECIDABILITY IN EXPANSIONS BY GENERALIZED CANTOR SETS 7 1 WILLIAMBALDERRAMAANDPHILIPPHIERONYMI 0 2 Abstract. Wedeterminethesetsdefinableinexpansionsoftheorderedreal n additive group by generalized Cantor sets. Given a natural number r ≥ 3, a J we say a set C is a generalized Cantor set in base r if there is a non-empty K⊆{1,...,r−2}suchthatC isthesetofthosenumbersin[0,1]thatadmit 9 abaserexpansionomittingthedigitsinK. Whileitisknownthatthetheory 2 of an expansion of the ordered real additive group by a single generalized Cantor set is decidable, we establish that the theory of an expansion by two ] O generalizedCantorsetsinmultiplicativelyindependentbases isundecidable. L . h t a 1. Introduction m Oneofthemostfamousandwell-studiedobjectsinmathematicsisthemiddle- [ thirds Cantor set C, a set that is constructed by repeatedly removing middle- 1 thirds from the unit interval. As pointed out by Dolich, Miller, and Steinhorn v [7], when we expand (R,<) by a predicate for C, the resulting structure is model- 6 theoretically tame. However, by Fornasiero, Hieronymi, and Miller [9], the expan- 2 4 sion (R,<,+,·,C) of the real field by C defines N and hence every projective set1. 8 ThisimmediatelyraisesthequestionofwhathappenswhenaddingC toastructure 0 between (R,<) and (R,<,+,·). . 1 0 In this note we will consider the expansion of the ordered real additive group 7 (R,<,+) by C. In fact, we will not only consider expansions by the usual middle- 1 thirds Cantor set, but by generalized Cantor sets. Given a natural number : v r ≥ 3 and a nonempty K ⊆ {1,...,r−2}, we define C to be the set of those r,K Xi numbers in [0,1] admitting a base r expansion that omits the digits in K. We call r the base of C . The classical middle-thirds Cantor set is then just C . r r,K 3,{1} a Whileithasneverbeenstatedexplicitly,itisknownthatthetheoryofthestructure (R,<,+,C )isdecidable. Forr ∈N ,considertheexpansionT of(R,<,+)by r,K ≥2 r a ternary predicate V (x,u,k) that holds if and only if u is an integer power of r, r k ∈{0,...,r−1}, and the digit of some base r representation of x in the position corresponding to u is k. As shown in Boigelot, Rassart, and Wolper [4], it follows from Bu¨chi’s work in [5] that the theory of T is decidable. For every non-empty r K ⊆ {1,...,r − 2}, the Cantor set C is ∅-definable in T , and therefore the r,K r 2010 Mathematics Subject Classification. Primary03B25Secondary03B70,03C64,28A80. This is a preprint version. Later versions might still contain significant changes. Comments arewelcome! ThefirstauthorwassupportedbyaGraduateAssistanceinAreasofNationalNeed (GAANN)Fellowship. Thesecondauthor waspartiallysupportedbyNSFgrantDMS-1300402. 1Projectiveinsenseofdescriptivesettheory. SeeKechris[14,ChapterV]. 1 2 W.BALDERRAMAANDP.HIERONYMI theory of (R,<,+,C ) is decidable. r,K This leads to the following two natural questions which we will address: (Q1) What can be said about sets definable in (R,<,+,C )? r,K (Q2) Are expansions of (R,<,+) by multiple generalized Cantor sets model- theoretically tame? Before we address these, let us fix some notation. Say that two expansions R and R′ of (R,<) are interdefinable if they define the same sets (with parameters). In such a situation, we write R = R′. Let W be the intersection of V with r r [0,1]×r−N×{0,...,r−1}, and set S :=(R,<,+,W ). r r Theorem A. Let r ∈N , and let K ⊆{1,...,r−2} be nonempty. Then ≥3 (R,<,+,C )=S . r,K r Theorem A determines the definable sets in an expansion by a single generalized Cantor set, giving an answer to our first question. A reader looking for a more detailed description of definable sets in S may want to consult [4] where a precise r automata-theoretic description of definable sets in T (and hence in S ) is given. r r Observe that by Belegradek [1, Corollary 1.7], S does not define N. Therefore, r (R,<,+,C ) is not interdefinable with T . While the theory of (R,<,+,C ) is r,K r r,K decidable, it is very easy to deduce from Theorem A that the structure does not satisfyany ofthe combinatorialtameness notions inventedby Shelah, suchas NIP, NTP2, or n-dependence (see also Hieronymi and Walsberg [13, Theorem B]). WenowturntothesecondquestionaboutexpansionsbymultipleCantorsets. Let r,s∈N , and K ⊆{1,...,r−2} and L⊆{1,...,s−2} be non-empty. Observe ≥3 that whenever log (s)∈Q, we have (R,<,+,W )=(R,<,+,W ). This statement r r s follows easily from the fact that Wr and Wrℓ can be expressed in terms of each other for ℓ∈N . Therefore, Theorem A immediately implies that if log (s)∈Q, ≥1 r then (R,<,+,C ,C ) = S . We can thus restrict our attention to the case r,K s,L r where log (s)∈/ Q. In this situation, we are able to prove the following result. r Theorem B. Let r,s ∈ N with log (s) ∈/ Q, and let K ⊆ {1,...,r −2} and ≥3 r L⊆{1,...,s−2}be non-empty. Then(R,<,+,C ,C ) defines everycompact r,K s,L set. The theory of an expansion that defines every compact set is clearly undecidable, as it defines an isomorphic copy of (R,+,·,N). Indeed, every projective subset of [0,1]k is definable in such an expansion. However, while (R,<,+,C ,C ) r,K s,L defines every compact set, multiplication on R does not need to be definable, by Pillay, Scowcroft, and Steinhorn [16]. We deduce Theorem B directly from Theorem A and the following analogue of Villemaire’s theorem [18, Theorem 4.1]. Theorem C. Let r,s ∈ N be such that log (s) ∈/ Q. Then (R,<,+,W ,W ) ≥2 r r s defines every compact set. Afew remarksaboutthe proofofTheoremC areinorder. Inthe casewherer and sarerelativelyprime,TheoremC followsfromaslightgeneralizationofHieronymi and Tychonievich [12, Theorem A] without significant use of further technology. GENERALIZED CANTOR SETS 3 However, when r and s share a common prime factor, we need to rely in addition on earlier ideas from [18]. This extra complication arises from the fact that when- ever r and s share a common prime factor, the set of numbers admitting a finite base r expansionintersects non-triviallywith the set of numbers admitting a finite base s expansion. It is natural to ask whether there are any interesting structures between (R,<,+) and(R,<,+,·)suchthatthetheoryoftheexpansionofsuchastructurebyasingle generalized Cantor set remains decidable. However, the answer to such a question is probably negative. For example, fix a ∈ R and let λ : R → R be the function a that maps x to ax, and consider (R,<,+,λ ,C ) for some generalized Cantor a r,K set C . It was already pointed out in Fornasiero, Hieronymi, and Walsberg [10, r,K Corollary 3.10] that (R,<,+,λ ,C ) defines every compact set whenever a is ir- a 3,1 rational. An inspection of the proof shows that the same argument works for a generalized Cantor set C . r,K We finish with a remark about the optimality of Theorem A. Observe that it is an immediateconsequenceofTheoremsAandCthatC isnotdefinableinS when- r,K s ever log (s)∈/ Q. This consequence is a very special case of a version of Cobham’s r Theorem for such expansions due to Boigelot, Brusten, and Bruy`ere [3]. Indeed, if log (s) ∈/ Q and X ⊆ R is both definable in S and weakly recognizable2, then X r r is definable in S if and only if X is definable in (R,<,+,Z). See Charlier, Leroy, s andRigo [6] for aninteresting restatement ofthis result in terms of graphdirected iterated function systems. This suggests that it would be natural to expect that Theorem A holds for a larger class of definable sets in S . The obvious extension r to weakly recognizable sets fails. To see this, observe that r−N is definable in S r and weakly recognizable, but every subset of R definable in (R,<,+,r−N) either hasinteriororisnowheredense. ThelatterstatementfollowseasilyfromFriedman and Miller [11, Theorem A] (see [10, Theorem 7.3]). Since S defines sets that r are both dense and codense in (0,1), it follows that W can not be definable in r (R,<,+,r−N). Nevertheless, we can imagine that Theorem A extends to sets that sharethe same topologicalproperties as the generalizedCantorsets. As we do not see how our proof generalizes to this setting, we leave this as an open question. Open question. Let r ∈ N , and let C ⊆ R be a nonempty compact set ∅- ≥2 definable in S that has neither interior nor isolated points. Is (R,<,+,C)=S ? r r This question has a negative answer3 when parameters can be used to define C. In [10, Section 7.2] a subset E ⊆ R is constructed such that E is compact, S S neither has interior nor isolated points, and (R,<,+,E ) does not define a dense S and codense subset of (0,1). It is clear from the construction of E that E is S S definable in S . 2 Acknowledgements. TheauthorsthankAlexisB`es,BernarndBoigelot,V´eronique Bruy`ere,ChristianMichaux,andFranc¸oisePointforansweringtheirquestionsand pointing out references, and Erik Walsberg for helpful comments. 2See [3] for a precise definition of weakly recognizable. By Maler and Staiger [15] and [3, Lemma 2.5], a subset X ⊆R definable in Sr is weakly recognizable if and only if X is both Fσ andGδ. 3WethankErikWalsbergforpointingthisout. 4 W.BALDERRAMAANDP.HIERONYMI Notations. We will now fix a few conventions and notations. First of all, N de- notes the set of natural numbers including 0. When we say “definable”, we mean “definable possibly with parameters”. Let r ∈N and let Σ ={0,...,r−1}. Let ≥2 r x∈R. Abase r expansionofx is aninfinite Σ ∪{⋆}-worda ···a ⋆a a ··· r p 0 −1 −2 such that p−1 (1.1) z =−a rp+ a ri p i i=−∞ X witha ∈{0,r−1}anda ,a ,...∈Σ . We will callthe a ’s the digitsofthe p p−1 p−2 r i base r expansionofx. The digita is the digit in the position corresponding k to rk. We define V (x,u,k) to be the ternary predicate of R that holds whenever r there exists a base r expansion a ···a ⋆a a ··· of x such that u = rn for p 0 −1 −2 some n ∈ Z and a = k. As is commonly done, we will often identify the word n a ···a ⋆a a ··· with the expression in (1.1). p 0 −1 −2 A number x ∈ R can possibly admit two distinct base r expansions. We can use the following to pick out a preferred expansion. Define U (x,u,k) to be the r ternary predicate of R that holds whenever x∈ R and there is a base r expansion a ···a ⋆a a ··· of x such that p 0 −1 −2 • a 6=r−1 for infinitely many i∈N, −i • u=r−n for some n∈Z, and • a =k. n Let X ⊆ R. When we refer to the restriction of V to X, we actually mean the r restriction of V to X ×R×R. Similarly, the restriction of U to X refers to the r r restriction of U to X ×R×R. r Fact 1.1. Let R be an expansion of (R,<) that defines r−N. Let X ⊆ R be definable in R. Then the following are equivalent: (1) R defines the restriction of V to X; r (2) R defines the restriction of U to X. r Proof. Letx∈R. Thenxhasatmosttwobaser expansions,andifxhastwobase r expansions, then there is n∈N and a ,··· ,a ,a ,··· ,a ∈Σ such that >0 p 0 −1 −n r a ···a ⋆a ···a and a ···a ⋆a ···a (a −1)(r−1)(r−1)··· p 0 −1 −n p 0 −1 −(n−1) −n are the two base r expansions of x. Thus, V (x,u,k) ⇐⇒ U (x,u,k)∨ ∃v ∈r−N¬U (x,v,0) r r r h ∧(∀t∈r−N(t<v)→U (x,v,0)) r ∧(u=v →U (x,u,k+1)) r ∧((u<v)→(k =r−1)) . Therefore, (2) implies (1). The other direction is similar. i (cid:3) 2. Proof of Theorem A Let r ∈N , and let K ⊆{1,...,r−2} be nonempty. In this section, we show ≥3 that (R,<,+,C ) = S . For ease of notation, we will write C for C in this r,K r r,K section. Since C is definable in S , it is only left to show that W is definable in r r GENERALIZED CANTOR SETS 5 (R,<,+,C). To do this, we first show that the definability of W follows from the r definability of the restriction of V to C, and then we show that the restriction of r V to C is in fact definable. Throughout the rest of this section, “definable” will r mean “definable in (R,<,+,C)”. Let k ,...k ∈K and m ,...,m ∈Σ \K be such that 1 l 1 l r • k <m <k <m <···<k <m and 1 1 2 2 l l • K =N∩ l [k ,m ). i=1 i i Set M :={m ,..S.,m }. 1 l Recall that C is the set of elements in [0,1] that admit a base r representation omittingthedigitsinK,andthatr−1∈/ K. Therefore,foreverysubsetX ⊆N , >0 there is some c∈C whose base r representation is c= (r−1)r−n. n∈X X From this observation, we deduce directly that for every x ∈ [0,1] there are c ,...,c ∈C such that 1 r−1 1 x= (c +···+c ). 1 r−1 r−1 This is an analogue of the standard fact that Minkowski sum of the middle-thirds Cantor set with itself is the interval [0,2]. Define E ⊆ Cr−1 to be the set of all tuples (c ,...,c ) such that each c admits a base r expansion in which only 1 r−1 i the digits 0 and r−1 occur. Let h: E×r−N>0 → {0,r−1} be the function that maps the tuple (c ,...,c ,r−n) to the cardinality ofthe set {i∈{0,...,r−1} : 1 r−1 V (c ,r−n,r−1)}. Note that both E and h are definable if the restriction V to C r i r is definable. Lemma 2.1. Let x ∈ [0,1), n ∈ N , and k ∈ {0,...,r−1}. Then V (x,r−n,k) ≥1 r holds if and only if there is c=(c ,...,c )∈E such that 1 r−1 • x= 1 (c +···+c ), and r−1 1 r−1 • h(c,r−n)=k. Proof. Suppose that x = ∞ a r−i is some base r expansion of x. For j ∈ i=1 i {1,...,r−1}, set P c := (r−1)r−i. j i∈XN>0, ai≥j Then(c ,...,c )∈E,andx= 1 (c +···+c ). Moreover,h(c ,...,c ,r−n)= 1 r−1 r−1 1 r−1 1 r−1 a . n 6 W.BALDERRAMAANDP.HIERONYMI Supposenextthatthereisc=(c ,...,c )∈E suchthatx= 1 (c +···+c ). 1 r−1 r−1 1 r−1 Then we get the following base r expansion of x: r−1 1 x= c i r−1 i=1 X r−1 1 = (r−1)r−i r−1 Xi=1Vr(cii∈,XrN−>i0,r,−1) = h(c,r−i)r−i. i∈XN>0 Thus, V(x,r−n,h(c,r−n)). (cid:3) ByLemma2.1,thedefinabilityofW followsfromthedefinabilityoftherestriction r of V to C. To establish the definability of the restriction of V to C, we will rely r r heavily on the regularity of the complementary intervals of C. Definition 2.2. A complementary interval of C is an open interval c ,c ⊆ 1 2 [0,1] such that c ,c ∈C but c ,c ∩C =∅. 1 2 1 2 (cid:0) (cid:1) For example, (1,2) is a comp(cid:0)lemen(cid:1)tary interval of the middle-thirds Cantor set. 9 9 For a ∈ R , denote by R the set of right endpoints of complementary intervals >0 a of C that are of length at least a. Observe that the set R := {(a,x) : x ∈ R } is a definable. Let D be the set of all right endpoints of C. As D = R , D is a∈R>0 a definable. Moreover,the set S L:={z ∈R : z is the length of a complementary interval of C in [0,1]} is definable. Lemma 2.3. Let d∈(0,1] and let n∈N. Then, the following are equivalent: (1) d∈Rr−n; (2) there are b ,...,b ∈Σ \K and b ∈M such that d= n b r−i. 1 n−1 r n i=1 i Proof. Suppose first that d = n b r−i with b ∈ Σ \K for i <Pn and b ∈ M. i=1 i i r n Suppose towards a contradiction that there is c ∈ C such that 0 < d−c < r−n. P We can assume without loss of generality that c has a unique base r expansion ∞ b′r−i. Our assumption that 0 < d−c < r−n implies c−r−n < d < c, or in i=1 i other words, P n−1 ∞ n (b −1)r−n+ b r−i < b′r−i < b r−i. n i i i i=1 i=1 i=1 X X X Thus b′ = b for i < n, and b′ = b −1. Since b ∈ M, b′ ∈ K. Since c has only i i n n n n one base r expansion, c∈/ C. This is a contradiction. Supposenextthatd∈Rr−n. Becaused∈C,wecanwritedas ∞i=1bir−iwitheach b ∈Σ \K. Thenthe truncationd := n b r−i is inC, with0≤d−d ≤r−n. Siince dr is the right endpoint of a cnomplemi=en1tairy interval of lPength r−n, int follows thateitherd=d ord=d +r−n. ButPitcannotbe thelatter,forifd=d +r−n, n n n thenc=d +(r−1)d−(n+1) ∈C with0<d−c<r−n,contradictingtheassumption n GENERALIZED CANTOR SETS 7 that d ∈ Rr−n. Thus, d = dn. It is left to show that bn ∈ M. Suppose towards a contradiction that b −1∈/ K. Then n n−1 c′ =(b −1)r−n+(r−1)r−(n+1)+ b r−i ∈C, n i i=1 X andd−c′ <r−n,againcontradictingtheassumptionthatd∈Rr−n. Thus,bn ∈M, and d has the desired form.. (cid:3) Corollary 2.4. Let d ∈ D, and let n ∈ N , b ,...,b ∈ Σ \K, m ∈ M be >0 1 n−1 r j suchthatd= n−1b r−i+m r−n. Thenthelengthofthecomplementaryinterval i=1 i j with right endpoint d is (m −k )r−n. j j P Proof. Itcanbecheckedeasilythatthecomplementaryintervalwithrightendpoint d is exactly the interval n−1 n−1 b r−i +k r−n, b r−i +m r−n . i j i j ! ! ! i=1 i=1 X X The length of this interval is (m −k )r−n. (cid:3) j j The following description of L follows immediately from Corollary 2.4. Corollary 2.5. The set L is equal to l {(m −k )r−n : i∈{1,...,l},n∈N }= (m −k )r−N>0. i i >0 i i i=1 [ (cid:3) Corollary 2.6. The set r−N is definable. Proof. Define v ∈Σ by r v := min (m −k ). i i i∈{1,...,l} Letj ∈{1,...,l}beminimalsuchthatm −k =v. Letf: D →Lbethefunction j j that maps d∈ D to the length of the complementary interval with right endpoint d. Let D′ be the set of all d ∈ D such that there is no e ∈ D with e < d and f(e)≤f(d). Observethatboth f andD′ aredefinable. ItfollowsfromLemma2.3 and Corollary 2.4 that D′ ={m r−n : n∈N }=m r−N>0. j >0 j The definability of r−N follows. (cid:3) Wenowusethe definabilityofr−N toprovethedefinabilityoftherestrictionofW r to C. Definition 2.7. Let µ: r−N × C → C map (s,c) to max(R ∩ (−∞,c]) if this s maximum exists, and to 0 otherwise. Observe that µ is definable, as both R and r−N are. Loosely speaking, µ(r−n,c) is the best approximation of c from the left by a right endpoint of a complementary interval of length at most r−n. We now establish the precise connection between the function µ and the base r expansion of elements of C. 8 W.BALDERRAMAANDP.HIERONYMI Lemma 2.8. Let n∈N, and let c= ∞ b r−i be such that b ∈Σ \K. Then i=1 i i r n−1 P µ(r−n,c)= b r−i+max(M ∩(−∞,b ])r−n. i n i=1 X Proof. Set d:= in=−11bir−i+max(M ∩(−∞,bn])r−n. By Lemma 2.3, d∈Rr−n. It is left to show that (d,c)∩Rr−n is empty. Suppose towardsa contradictionthat P there is e ∈ (d,c)∩Rr−n. Then 0 < c−e < c−d < r−(n−1), so by Lemma 2.3, there exists a∈M with n−1 e= b r−i+ar−n. i i=1 X Thus max(M ∩(−∞,b ])<a≤b , and therefore a∈/ M. This is a contradiction. n n (cid:3) In the following, we will show that given an element c ∈ C, we just need to know µ(r−n,c)andµ(r−(n−1),c) inorderto recoverthe digitin the positioncorrespond- ing to r−n in a preferred base r expansion of c. We now define a set Z ⊆ R3 that formalizes this idea. Definition 2.9. Define Z ⊆R3 to be the setof alltriples (c,s,d) suchthat c∈C, s∈r−N>0, and r−1r−1 d=j ∧ µ(rs,c)+irs≤µ(s,c)<µ(rs,c)+(i+1)rs i_=0j_=0(cid:16) ∧ µ(rs,c)+irs+js≤c<µ(rs,c)+irs+(j+1)s . (cid:17) Lemma 2.10. The set Z is equal to U ∩ C×R2 . r Proof. Letc∈C besuchthatc= ∞ b r−(cid:0)i,where(cid:1)eachb ∈Σ \K,andb 6=r−1 i=1 i i r i for infinitely many i. Let n∈N, and set s=r−(n+1). By Lemma 2.8, P µ(s,c)−µ(rs,c)= b −max(M ∩(−∞,b ]) rs+max(M ∩(−∞,b ])s. n n n+1 Set i:=bn−max(M ∩(cid:0) (−∞,bn]). It follows that(cid:1) µ(rs,c)+irs≤µ(s,c)<µ(rs,c)+(i+1)rs. Thus, there is j ∈Σ such that r (*) µ(rs,c)+irs+js≤c<µ(rs,c)+irs+(j+1)s. By Lemma 2.8, c−(µ(rs,c)+irs+js) n−1 =c− b r−i +max(M ∩(−∞,b ])r−n+ir−n+js i n ! ! i=1 X ∞ = b r−i−js. i i=n+1 X From (*), we deduce ∞ 0≤ b r−i −js<s, i ! i=n+1 X GENERALIZED CANTOR SETS 9 or in other words, ∞ 0≤(b −j)r−(n+1)+ b r−i <r−(n+1). n+1 i i=n+2 X Thus (b − j)r−(n+1) < r−(n+1), so that b = j. This demonstrates that n+1 n+1 U (c,s,d) if and only if there are i,j ∈Σ such that d=j and i,j satisfy (*). The r r latter statement holds if and only if (c,s,d)∈Z. (cid:3) We can now finish the proof of Theorem A. Proof of Theorem A. ByLemma2.10,the restrictionofU toC isdefinable. Since r r−N isdefinablebyCorollary2.6,therestrictionofV toC isdefinablebyFact1.1. r The definability of W then follows from Lemma 2.1. (cid:3) r 3. Finite base r expansions and ω-orderable sets Throughout this section, fix some r ∈ N . The purpose of this section is to ≥2 collect some basic facts we will need about numbers with finite base r expansions. Define D to be the set of numbers in [0,1) admitting a finite base r expansion. r NoticethatD isadensesubsetof[0,1),andthatthatD isdefinablein(R,<,W ) r r r by d∈D ⇐⇒ d∈[0,1)∧(∃v >0)(∀u<v)W (d,u,0). r r We let D1 := {0}. Define τr: Dr → r−N>0 so that τr(d) is the least u ∈ r−N>0 appearingwithnonzerocoefficientinthefinite baser expansionofd. Notethatfor x∈D and d∈N , we haveτ (x)=r−d if andonly ifthere is k ∈{0,...,rd−1} r >0 r such that x=kr−d. For d,e∈D , let r d≺ e ⇐⇒ τ (d)>τ (e) or (τ (d)=τ (e) and d<e). r r r r r It is worth distinguishing the following observations. Lemma 3.1. The ordered set (D ,≺ ) has order type ω. r r Proof. As Dr is bounded, τ−1(r−d) is finite for each d ∈ N>0. As (r−N>0,>) has order type ω, the lemma follows. (cid:3) Lemma 3.2. Letr=pα1···pαn betheprimefactorizationofr, andletw ∈[0,1). 1 n Then (1) w ∈D if and only if it can be written in the form r k w = pk1···pkn 1 n where k,k ,...,k ∈N. 1 n (2) if w ∈ D and d ∈ N , then τ (w) = r−d if and only if d is minimal in N r >0 r such that wrd ∈N. Proof. We will prove (1) and leave the easy proof of (2) to the reader. If w ∈ D , r we can write w as w r−1 +···+w r−l with 0 ≤ w ≤ r−1 for −l ≤ i ≤ −1. −1 −l i Thus w·rl ∈N, and so w is of the desired form. Conversely, if we write k kpl−k1···pl−kn w = = 1 n pk1···pkn rl 1 n with l ≥ max{k ,...,k }, then rlw = kpl−k1···pl−kn ∈ N. Hence rlw has finite 1 n 1 n base r expansion, and so too does w. (cid:3) 10 W.BALDERRAMAANDP.HIERONYMI Lemma 3.3. Letr =pα1···pαn be the primefactorizationofr, w ∈D , andm∈ 1 n r N and d ,...,d ∈Z be such that w =mpd1···pdn with p ∤ m for i∈{1,...,n}. 1 n 1 n i Then τ (w)=re, where r d d 1 n e=min ,..., . α α (cid:26)(cid:22) 1(cid:23) (cid:22) n(cid:23)(cid:27) Proof. Let e∈Z be maximal such that d −eα ≥0 for each i. Then i i r−ew =mpd1−eα1···pdn−eαn ∈N. 1 n Since r ∤mpd1−eα1···pdn−eαn, −e is the minimal element of N with this property. 1 n By Lemma 3.2(2), τ (w)=re. The statement of the Lemma follows. (cid:3) r Lemma 3.4. Let r,s∈N . Then ≥2 (1) D ∩D =D ; r s gcd(r,s) (2) if r and s are coprime, then D ∩D ={0}; r s (3) if r and s share the same prime factors, then D =D ; r s Proof. Statement (3) follows directly from Lemma 3.2(1), and Statement (2) is a special case of Statement (1). Therefore, we just need to prove (1). Write r = pα1···pαn and s = qβ1···qβm for the prime factorizations of r and s. If w ∈ 1 n 1 m D ∩D , then by Lemma 3.2(1) we can write w as r s k l w = = pk1···pkn ql1···qlm 1 n 1 m with k,k ,...,k ,l,l ,...,l ∈ N. If these are written in reduced form, then 1 n 1 m {p :k 6=0}={q :l 6=0}byuniquenessofsuchpresentations. Thusw ∈D i i i i gcd(r,s) by Lemma 3.2(1). The other inclusion is immediate by Lemma 3.2(1). (cid:3) Statement (3) of Lemma 3.4 was already recognized in [3, Proof of Theorem 5.3] asanobstructiontoestablishingstrongeranaloguesofCobham’stheorem. Wewill seeinthenextsectionthatLemma3.4isalsothereasonwhytheproofofTheorem C is more complicated in the case that r,s are not coprime. Corollary 3.5. Let r,s∈N be coprime. Then (D −D )∩(D −D )={0}. ≥2 r r s s Proof. Let a ,a ∈ D and b ,b ∈ D be such that a −a = b −b . From the 1 2 r 1 2 s 1 2 1 2 definition of D and D we deduce that a −a ∈ D and b −b ∈ D whenever r s 1 2 r 1 2 s a −a ≥ 0, and that a −a ∈ D and b −b ∈ D whenever a −a < 0. The 1 2 2 1 r 2 1 s 1 2 statement of the corollary follows now directly from Lemma 3.4(2). (cid:3) 3.1. Dense ω-orderable sets. Let R be an expansion of (R,<) and I be an in- terval of R. We say a set D ⊆ R is a dense ω-orderable subset of I in R if D is dense in I and there exists a definable order ≺ on D such that (D,≺) has order type ω. By Lemma 3.1, D is a dense ω-orderablesubset of [0,1) in the expansion r (R,<,W ). r The following fact is a slight generalization of [12, Theorem A] that was first ob- served in [10, Proposition 3.8]. Fact 3.6. Let R be an expansion of (R,<). Suppose R defines an order (D,≺), an open interval I ⊆R, and a function g: R3×D →D such that • (D,≺) has order type ω and D is dense in I, and