Fabien Durand

Julien Leroy

Decidability of Isomorphism and Factorization between Minimal Substitution Subshifts

Keywords: subshift, substitution, automorphism, factorization, factor map, recognizability, decidability

Classification is a central problem for dynamical systems, in particular for families that arise in a wide range of topics, like substitution subshifts. It is important to be able to distinguish whether two such subshifts are isomorphic, but the existing invariants are not sufficient for this purpose. We first show that given two minimal substitution subshifts, there exists a computable constant R such that any factor map between these subshifts (if any) is the composition of a factor map with a radius smaller than R and some power of the shift map. Then we prove that it is decidable to check whether a given sliding block code is a factor map between two prescribed minimal substitution subshifts. As a consequence of these two results, we provide an algorithm that, given two minimal substitution subshifts, decides whether one is a factor of the other and, as a straightforward corollary, whether they are isomorphic.

Introduction

Classification is a central problem in the study of dynamical systems, in particular for families of systems that arise in a wide range of topics. Let us mention subshifts of finite type that appear, for example, in information theory, hyperbolic dynamics, C * -algebra, statistical mechanics and thermodynamic formalism [LM95, Bow75]. The most important and longstanding open problem for this family originates in [START_REF] Williams | Classification of subshifts of finite type[END_REF] and is stated in [Boy08] as follows: Classify subshifts of finite type up to topological isomorphism. In particular, give a procedure which decides when two non-negative integer matrices define topologically conjugate subshifts of finite type.

The existence of an isomorphism between two given subshifts of finite type is known to be equivalent to the Strong Shift Equivalence for matrices over Z + [START_REF] Williams | Classification of subshifts of finite type[END_REF], which is not known to be decidable [START_REF] Kim | The Williams conjecture is false for irreducible subshifts[END_REF]. In contrast, the Shift Equivalence for matrices over Z + is decidable and provides an invariant of isomorphism for subshifts of finite type.

Another well-known family of subshifts, also defined through matrices and interesting for a wide range of reasons, is the family of substitution subshifts. These subshifts are related, for example, to automata theory, first order logic, combinatorics on words, quasicrystallography, fractal geometry, group theory and number theory [AB07, [START_REF] Allouche | Automatic Sequences, Theory, Applications, Generalizations[END_REF][START_REF] Fogg | Substitutions in dynamics, arithmetics and combinatorics[END_REF]Nek18,[START_REF] Rigo | Formal Languages, Automata and Numeration Systems 2, Applications to Recognizability and Decidability[END_REF]. In this paper we show that not only is the existence of isomorphism between such subshifts decidable, but also the factorization. This answers a question asked in [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]. Observe that substitution subshifts form a subclass of subshifts generated by morphic sequences (see Section 2.3 for the definitions).

Theorem 1.1. Let (X , S) and (Y, S) be subshifts generated by uniformly recurrent morphic sequences. It is decidable whether or not there is a factor map f : (X , S) → (Y, S).

Using the fact that minimal substitution subshifts are coalescent [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF] one deduces the decidability of the isomorphism problem.

Corollary 1.2. It is decidable whether or not two subshifts generated by uniformly recurrent morphic sequences are isomorphic.

Our approach gives a precise and detailed description of the isomorphisms and factor maps. It is thus also concerned with the study of automorphism groups of topological dynamical systems and its recent developments. This was a classical topic in the 70's and 80's [Hed69, Cov72, BLR88] and it recently got a renewal of interest for subshifts with low complexity. V. Cyr and B. Kra [CK16] proved that for minimal subshifts (X , S) of sub-quadratic complexity, the quotient Aut(X , S)/ S is periodic, where Aut(X , S) stands for the automorphism group of (X , S) and S is the group generated by the shift map. Whereas in [CQY16, [START_REF] Cyr | The automorphism group of a shift of linear growth: beyond transitivity[END_REF][START_REF] Donoso | On automorphism groups of low complexity minimal subshifts[END_REF] it was shown that automorphism groups of subshifts with subaffine complexity along a subsequence (which includes minimal substitution subshifs) are virtually Z. In other words, there exists a finite set of automorphisms F such that any automorphism is the composition of an element of F with a power of the shift.

When studying factor maps instead of automorphisms we lose the group structure. The main feature used in the articles cited above is that automorphisms can be iterated, which is not the case for factor maps, and that automorphisms preserve some key features of the dynamics. In [START_REF] Donoso | On automorphism groups of low complexity minimal subshifts[END_REF], the authors used the concept of asymptotic pairs. Unfortunately images and preimages of asymptotic pairs via factor maps are neither well controlled nor understood. Nevertheless, for specific families and with different approaches similar results can be obtained: Theorem 1.3 for minimal substitution subshifts and Theorem 1.5 for linearly recurrent subshifts.

The first author proved that for linearly recurrent subshifts there are finitely many subshift factors up to isomorphism [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF]. V. Salo and I. Törmä [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] gave a more precise result for factor maps between two minimal substitution subshifts of constant length and for a very particular family of substitutions (mainly Pisot substitutions): there exists a bound R such that any factor map is the composition of a sliding block code of radius less than R with a power of the shift map. A similar result has also been obtained in [START_REF] Coven | Topological conjugacy to given constant length substitution minimal systems[END_REF] (see also [START_REF] Coven | A characterization of the morse minimal set up to topological conjugacy[END_REF]). Salo and Törmä use a renormalization process that, given a factor map with some radius, allows one to obtain another one with a smaller radius. It has also been used in [START_REF] Coven | Computing automorphism groups of shifts using atypical equivalence classes[END_REF] to study the automorphism groups of constant length substitution subshifts. We extend the result of Salo and Törmä to the whole class of aperiodic minimal morphic subshifts. Furthermore, we show that the bound R is computable.

Theorem 1.3. Let (X , S) and (Y, S) be two subshifts generated by uniformly recurrent morphic sequences. Then there exists a computable constant R such that every factor map from (X , S) to (Y, S) is the composition of a power of the shift map S with a factor map of radius less than R.

This greatly extends the results obtained in the papers mentioned above, which considered the much more restrictive case of constant length substitutions (except for [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] where the non-uniform Pisot case is also considered). The proof will be divided into two cases: when (Y, S) is periodic and when it is not. Theorem 1.3 is one of the two main ingredients of the proof of Theorem 1.1. The other one is the following.

Theorem 1.4. Let (X , S) and (Y, S) be two subshifts generated by uniformly recurrent morphic sequences and φ be a sliding block code. It is decidable whether φ defines a factor map from (X , S) to (Y, S).

The proof of Theorem 1.4 relies on a different method. We consider constructions based on return words to clopen sets and use the fact that minimal morphic subshifts have finitely many induced systems on cylinder sets up to conjugacy [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF][START_REF] Holton | Descendants of primitive substitutions[END_REF]. In the context of constant length substitutions (or more generally, for subshifts generated by automatic sequences), this theorem was obtained 20 years ago by I. Fagnot [START_REF] Fagnot | Sur les facteurs des mots automatiques[END_REF] using the first order logic framework of Presburger arithmetic, without assuming minimality.

Let us mention an interesting problem tackled in [CDK17] for minimal constant length substitution subshifts that naturally follows the discussion above. From [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF][START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF], minimal morphic subshifts have finitely many aperiodic subshift factors. Thus, it is natural to try to produce (to compute) the finite list of all such factors of a given minimal morphic subshift (X , S) (up to isomorphism). A strategy would be to consider one by one factor maps of increasing radius. For each new factor map, a factor (Y, S) is obtained. One can compare it with the previously obtained subshifts using Corollary 1.2. It is tempting to say in view of Theorem 1.3 that there are finitely many factor maps to test, those of radius less than R. Unfortunately in our proof this constant strongly depends on the factor (Y, S), in fact on the constant of recognizability of the substitution defining it. We leave this as an open problem. Nevertheless, if we ask for both (X , S) and (Y, S) to be constant length substitution subshifts then this strategy is successful and the list of factors can be given (Section 8.4) as shown in [CDK17].

Organization of the paper

In Section 2 the different classical notions and constructions are defined and some of their properties stated, which will be used throughout this paper.

In Section 3 we prove (Theorem 3.1) that minimal morphic subshifts are isomorphic to primitive substitution subshifts. In fact this was already known as it is a straightforward consequence of a combination of results from [START_REF] Durand | Substitutive dynamical systems, Bratteli diagrams and dimension groups[END_REF] and [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]. We provide a proof as we need to make precise the radius of the isomorphisms involved. This is used in many proofs of this paper as it substantially simplifies the assumptions.

Dealing with decision problems we need throughout this paper computable bounds of key features of the substitution subshifts. This is done in Section 4 for the recognizability, the linear recurrence, the return words, the growth of the substitutions, the complexity functions and the ergodic measures. We also recall the classical construction of substitutions on the blocks of length n [Que10].

Section 5 is devoted to the proof of Theorem 1.3 for the aperiodic case. We introduce a crucial concept for this paper. This is what Salo and Törmä [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] called dill maps. These dill maps are defined by a renormalization process on factor maps. Salo and Törmä showed that, starting with a factor map between two constant length substitution subshifts, this renormalization process yields another factor map between the same subshifts and with a smaller radius. This is no longer true for non-constant length substitutions. Nevertheless this produces dill maps for which the notion of radius can also be defined. Furthermore, the renormalization of a dill map provides another dill map and the iteration of the process leads to dill maps with radius smaller than some computable constant R. Using the pigeonhole principle, we obtain twice the same dill map in this iteration process and it happens that these two dill maps are in fact factor maps, thus with a small computable radius. It finally turns out that these factor maps are equal to the original factor map up to a power of the shift map.

When the factors are periodic the decision problems are easier to deal with. This is done in Section 6. Theorem 1.1, Corollary 1.2 and Theorem 1.4 are shown in Section 7. We first prove these results for minimal substitution subshifts and then for minimal morphic subshifts using Theorem 3.1. We use Theorem 1.3 and constructions based on return words to sets of words.

In Section 8 we consider as a particular example the family of constant length substitution subshifts. For this context, we make precise Theorem 1.3 showing we have a much better control on the radius of the factor maps. This improves one of the main results in [CDK17]. We also give a different proof of Theorem 1.4 using first order logic of the Presburger arithmetic. This provides a new proof of Theorem 1.1 and more efficient algorithms for this framework.

In Section 9 we consider the wider family of linearly recurrent subshifts. We obtain the following analogue of Theorem 1.3 but without any control on the radius of the factor maps.

Theorem 1.5. Let (X , S) and (Y, S) be aperiodic subshifts. Suppose (X , S) is linearly recurrent for the constant K. Then, there exist N ≤ (2(K + 1)) 36(K+1) 5 and some factor maps f i : (X , S) → (Y, S), 1 ≤ i ≤ N such that if f : (X , S) → (Y, S) is a factor map then there exist k ∈ Z and i ∈ {1, . . . , N} such that f = S k • f i .

In Section 10 we discuss some open questions.

2 Basic materials DISCRETE ANALYSIS, 2022:7, 66pp.

Words and sequences

An alphabet A is a set of elements called letters. Unless explicitly stated, we consider that the alphabets are finite. A word over A is an element of the free monoid generated by A, denoted by

A * . Let u = u 0 u 1 • • • u n-1 (with u i ∈ A, 0 ≤ i ≤ n -1)
be a word, its length is n and is denoted by |u|. The empty word is the neutral element of A * and is denoted by ε; |ε| = 0. The set of non-empty words over A is denoted by A + . A subword of u is a finite word y such that there exist two words v and w satisfying u = vyw. When v (resp. w) is the empty word, we say that y is a prefix

(resp. suffix) of u. If k, l are integers such that 0 ≤ k ≤ l < |u|, we let u [k,l] = u [k,l+1) denote the subword u k u k+1 • • • u l of u. If l < k, then u [k,l]
is the empty word. If y is a subword of u, the occurrences of y in u are the integers i such that u [i,i+|y|) = y. If y has an occurrence in u, we also say that y occurs in u.

In this article K will stand for N or Z. The elements of A K are called sequences. When we want to emphasize the type of sequences we are dealing with we say one-sided sequences for elements of A N and two-sided sequences for elements of A Z . For x = (x n ) n∈Z ∈ A Z , we let x + and x -respectively denote the sequences (x n ) n≥0 and (x n ) n<0 . The notion of subword is naturally extended to sequences, as well as the notion of prefixes when K = N. The set of subwords of length n of x is written L n (x) and the set of subwords of x, or the language of x, is denoted by L(x). We let p x : N → N, n → #L n (x), denote the word complexity (function) of x.

The sequence x ∈ A N is ultimately periodic if there exist a word u and a non-empty word v such that x = uv ω , where v ω = vvv • • • . It is periodic if u is the empty word. A sequence that is not ultimately periodic is called aperiodic. A word u is recurrent in x if it occurs in x infinitely many times. A sequence x is recurrent if every subword u of x is recurrent in x + and in x -(whenever x is two-sided). It is uniformly recurrent if it is recurrent and for any subword u of x, the greatest difference between two successive occurrences of u in x is finite. It is linearly recurrent for the constant K if it is recurrent and if this greatest difference is at most K|u|.

Subshifts, minimality, factors, local and induced maps

A (topological) dynamical system is a pair (X , S) where S is a continuous map from X to X and X is a compact metric space. It is aperiodic if there do not exist S-periodic points, that is points x such that S n x = x for some n > 0. A subset Y ⊂ X is S-invariant if S -1 Y = Y . A dynamical system (X , S) is minimal whenever the only closed S-invariant subsets of X are X and / 0. A dynamical system (X , S) is a subshift when X is a closed S-invariant subset of A Z (for the usual topology on A Z ) and S is the shift map (S :

A Z → A Z , (x n ) n∈Z → (x n+1 ) n∈Z ).
In this paper, even if the alphabet changes, S will always denote the shift map and we usually say that X itself is a subshift. The language L(X ) of a subshift (X , S) is the union of the languages of x for x ∈ X . The word complexity function naturally extends to subshifts. We denote it by p X .

Let x be a sequence belonging to A Z or A N . Consider the set Ω(x) = {y ∈ A Z | L(y) ⊂ L(x)}. Then, (Ω(x), S) is a subshift. We call it the subshift generated (or defined) by x. If x is two-sided or one-sided and recurrent, the subshift (Ω(x), S) is minimal if and only if x is uniformly recurrent. In this case all sequences y in Ω(x) are uniformly recurrent and satisfy Ω(y) = Ω(x), L(x) = L(y) and Ω(x) = {S n y | n ∈ Z}. A subshift (X , S) is linearly recurrent if it is a subshift generated by a linearly recurrent sequence x. If K is a constant of linear recurrence of x, then all sequences y ∈ X are linearly recurrent for the constant K.

Let (X , S) be a subshift on the alphabet A, let D be some set endowed with the discrete topology and let g : X → D be a continuous map. Then g is locally constant, which implies that there exist t, s ∈ N and a map ĝ : A t+s+1 → D, called a local map defining g, such that g(x) = ĝ(x [-t,s] ) for all x ∈ X . We say that ĝ defines g, and t is called the memory and s the anticipation of ĝ. When s = t we call their common value r the radius of ĝ and a radius of g (there exist other local maps defining g). The radius of g is the smallest one among the set of radii of local maps defining g.

Let (X , T ) and (Y, R) be two dynamical systems. We say that (Y, R) is a factor of (X , T ) if there is a continuous and onto map f : X → Y such that f • T = R • f . We call f a factor map. If, moreover, f is one-to-one we say that f is an isomorphism.

Suppose f : (X , S) → (Y, S) is a factor map between subshifts, where X ⊂ A Z and Y ⊂ B Z . Then, considering the map g : X → B given by g(x) = f (x) 0 there is a local map ĝ : A t+s+1 → B defining g and satisfying f (x) n = ĝ(x [n-t,n+s] ) for any n ∈ Z and x ∈ X . This is the Curtis-Hedlund-Lyndon Theorem (see [LM95]). The map ĝ is called a sliding block code defining f and we extend the notions of memory, anticipation and radius of the map g to the map f . The sliding block code ĝ naturally extends to the set of words of length at least t + s + 1, and we denote this map also by ĝ.

Morphic and substitutive sequences

Let A and B be finite or infinite alphabets. By a morphism from A * to B * we mean a homomorphism of free monoids. Let σ be a morphism from A * to B * . When σ (A) = B, we say that σ is a coding. Thus, codings are onto. We set |σ | = max a∈A |σ (a)| and σ = min a∈A |σ (a)|. The morphism σ is of constant length if σ = |σ |. We say σ is erasing if there exists b ∈ A such that σ (b) is the empty word. If σ is non-erasing, it induces by concatenation a map from A N to B N and a map from A Z to B Z . These maps are also denoted by σ . The language of the endomorphism σ : A * → A * is the set L(σ ) of words occurring in some σ n (a), a ∈ A, n ∈ N. When L(σ ) is infinite, we let X σ denote the set {y ∈ A Z | L(y) ⊂ L(σ )}. It is closed and S-invariant. We say that (X σ , S) is the subshift generated by σ .

In this paper we use the definition of substitution from [Que10] and the notion of substitutive sequence defined in [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF]. Both are restrictive in general but not in the uniformly recurrent case as shown in [START_REF] Durand | Decidability of the HD0L ultimate periodicity problem[END_REF]. For non-restrictive context we will speak of (prolongable) endomorphisms and (purely) morphic sequences. We warn the reader that in what follows, we define several closely related notions such as morphic subshift, (primitive) substitutive subshift and (primitive) substitution subshift. The notions of minimal morphic subshifts and primitive substitution subshifts are equivalent in terms of topological dynamical systems, as shown in Theorem 3.1, but not in term of sets. In Section 3.4 we give an example of a minimal morphic subshift (X , S) that is not, in terms of sets, a primitive substitution subshift.

Let σ : A * → A * be an endomorphism. If there exist a letter a ∈ A and a non-empty word u such that σ (a) = au and if moreover lim n→+∞ |σ n (a)| = +∞, then σ is said to be right-prolongable on a. It is a substitution whenever it is right-prolongable on some letter a ∈ A and growing (that is, lim n σ n = +∞). Then (X σ , S) is called the substitution subshift generated by σ . Suppose that σ is right-prolongable on a ∈ A. Since for all n ∈ N, σ n (a) is a prefix of σ n+1 (a) and because |σ n (a)| tends to infinity with n, the sequence (σ n (aaa • • • )) n≥0 converges in A N to a sequence denoted by σ ω (a) which is a fixed point of σ : σ (σ ω (a)) = σ ω (a). A sequence obtained in this way is said to be purely morphic (w.r.t. σ ) or purely substitutive when σ is a substitution. If x ∈ A N is purely morphic and φ : A * → B * is a morphism such that φ (x) is a sequence, then y = φ (x) is said to be a morphic sequence (w.r.t. (σ ,φ )) and the subshift it generates is called a morphic subshift. When φ is a coding and σ a substitution, we say y is substitutive (w.r.t. (σ , φ )) and the subshift it generates is called substitutive subshift.

Two-sided fixed points of σ can be similarly defined: When σ is right-prolongable on a ∈ A and left-prolongable on b ∈ A (that is σ (b) = vb for some non-empty word v and lim

n→+∞ |σ n (b)| = +∞), the sequence σ n (• • • bbb • aaa • • • ) converges to σ ω (b • a) which is a fixed point of σ . It can happen that σ ω (b • a)
does not belong to X σ . In fact, σ ω (b • a) belongs to X σ if and only if ba belongs to L(σ ). In this case, we say that σ ω (b • a) is an admissible fixed point of σ .

With a morphism σ : A * → B * is naturally associated the incidence matrix M σ = (m b,a ) b∈B,a∈A where m b,a is the number of occurrences of b in the word σ (a). Let τ : B * → C * be a morphism. It is useful, and classical, to observe that M τ•σ = M τ M σ , |σ | = max a∈A (1M σ ) a and σ = min a∈A (1M σ ) a where 1 is the row vector consisting of ones.

Whenever A = B and the matrix associated with σ is primitive (i.e., when it has a power with strictly positive coefficients) we say that σ is a primitive endomorphism. In this situation we easily check that L(σ ) = L(σ ω (a)) for any letter a ∈ A on which σ is right-prolongable. In particular, we also have that for all x ∈ X σ , Ω(x) = Ω(σ ω (a)) = X σ . If σ is primitive we say (X σ , S) is a primitive substitution subshift. Such a subshift is minimal [Que10]. A sequence x is primitive substitutive if it is substitutive w.r.t. a primitive substitution. The subshift (Ω(x), S) it generates is called primitive substitutive subshift. It is clearly minimal. It can be easily checked that a subshift is a primitive substitution subshift if and only if it is the orbit closure of a primitive purely substitutive sequence. We say σ is aperiodic whenever (X σ , S) is aperiodic.

It is well known that if a matrix M is primitive, its spectral radius ρ(M) = max{|λ | | λ ∈ Spec(M)} is an eigenvalue of M which is algebraically simple. Furthermore, any eigenvalue of M different from ρ(M) has modulus less than ρ(M). We call ρ(M) the dominant eigenvalue of M. By abuse of language, when M is the incidence matrix of a primitive endomorphism σ , we call ρ(M) the dominant eigenvalue of σ .

Data of computation

This paper is concerned with decidability and computability problems about morphic subshifts. It is therefore important to make precise what are the data that we are working with.

When a statement concerns a morphic sequence x, the data that we assume to be given are two morphisms σ : A * → A * , φ : A * → B * and a letter a ∈ A such that 1. σ is right prolongable on a 2. lim n→+∞ |φ (σ n (a))| = +∞ and it is understood that x = lim n→+∞ φ (σ n (a)). Observe that both conditions are decidable from (σ , φ , a). Furthermore, such statements usually assume that x is uniformly recurrent, which is also decidable from (σ , φ , a) [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]. They also sometimes assume that x is aperiodic, which is again decidable from (σ , φ , a) [START_REF] Durand | Decidability of the HD0L ultimate periodicity problem[END_REF].

Examples

Throughout the paper, we will try to illustrate our results with examples. To keep computations reasonable, we stick to well-known examples. In particular, we will mainly focus on:

1. The Fibonacci sequence is the fixed point ϕ ω (a), where ϕ is the Fibonacci substitution defined by

ϕ : a → ab b → a .
We have

ϕ ω (a) = abaababaabaababaababaabaababaabaababaababaabaababaa • • •
The Fibonacci substitution is primitive, and therefore the Fibonacci sequence is uniformly recurrent. The Fibonacci subshift is Ω(ϕ ω (a)).

2. The Thue-Morse sequence is the fixed point ν ω (a), where ν is the Thue-Morse substitution defined by

ν : a → ab b → ba .
We have

ν ω (a) = abbabaabbaababbabaababbaabbabaabbaababbaabbabaababb • • •
The Thue-Morse substitution is primitive, hence the Thue-Morse sequence is uniformly recurrent. The Thue-Morse subshift is Ω(ν ω (a)).

3. The Chacon sequence is the fixed point γ ω (a), where γ is the Chacon morphism defined by

γ : a → aaba b → b .
We have

γ ω (a) = aabaaababaabaaabaaababaababaabaaababaabaaabaaababaa • • •
The Chacon sequence is uniformly recurrent, but γ is clearly not primitive. The Chacon subshift is Ω(γ ω (a)).

3 From uniformly recurrent morphic sequences to purely substitutive sequences w.r.t. proper primitive substitutions

In this section we show that we can restrict our study to subshifts generated by purely substitutive sequences where the underlying substitution is primitive and proper. A substitution σ :

A * → A * is left proper if there exists a ∈ A such that σ (A) is included in aA * . It is right proper if there exists b ∈ A such that σ (A) is included in A * b.
It is proper whenever it is both left and right proper. We show in Theorem 3.1 below that any aperiodic minimal morphic subshift is isomorphic to a subshift generated by a purely substitutive sequence whose underlying substitution is primitive and proper. We also give computable bounds for the radii of the isomorphism and of its inverse.

Nevertheless it is not true that minimal morphic subshifts are substitution subshifts. In Section 3.4 we give an example of a minimal morphic subshift that is not a substitution subshift.

Theorem 3.1. Let y ∈ A N be an aperiodic uniformly recurrent morphic sequence and let (Y, S) be the subshift it generates. There exist a computable constant K, a computable primitive proper substitution σ and an isomorphism φ from (X σ , S) onto (Y, S) whose radius is 0 and such that the radius of φ -1 is less than K.

Remark 3.2. Theorem 3.1 is the first step to prove Theorem 1.3 and Theorem 1.4 (hence Theorem 1.1) for aperiodic subshifts. Indeed, suppose that we are given two aperiodic minimal morphic subshifts (X , S) and (Y, S). Using Theorem 3.1, we can compute primitive and proper substitutions σ and τ such that (X , S) is isomorphic to (X σ , S) and (Y, S) is isomorphic to (X τ , S), with isomorphisms of computable radii. In the next sections, we show that for factor map f : (X σ , S) → (X τ , S), with σ and τ primitive and (X τ , S) non-periodic, the radius of some f • S n is bounded by a computable constant only depending on σ and τ, Theorem 5.10. We also show that it is decidable whether a given sliding block code defines a factor map from (X σ , S) onto (X τ , S) (Theorem 7.27). This will complete the proofs of Theorem 1.3 and Theorem 1.4 by composing the factor maps with the isomorphisms. Remark 3.3. As the sequence y in Theorem 3.1 is uniformly recurrent, we have Y = Ω(y + ). Therefore, except for the definitions, we essentially consider one-sided sequences in this section.

Return words and derived sequences

Let x ∈ A K be a sequence and u be a word in L(x). We call return word to u any word w ∈ A * such that wu is a word in L(x) that admits u as a prefix and u occurs exactly twice in wu. The set of return words to u in x is denoted by R x,u . It is easily seen that a recurrent sequence x is uniformly recurrent if and only if for all u ∈ L(x), the set R x,u is finite.

Remark 3.4. If w is a return word to u in x ∈ A K , then wu = w 1+|u|/|w| , where the fractional power w p/|w| , p ∈ N, of a word w is the word w n w [0,r[ such that p/|w| = n + r/|w| with n, r ∈ N and r < |w|. In particular, the word w 1+|u|/|w| belongs to L(x).

When dealing with return words, it is convenient to enumerate the elements of R x,u in the order of their first occurrence in x + . Formally, we consider the set R x,u = {1, 2, . . . } with #R x,u = #R x,u and we define Θ x,u : R * x,u → R *

x,u as the unique morphism that maps R x,u bijectively onto R x,u and such that for all i ∈ R x,u , Θ x,u (i)u is the ith word of R x,u u occurring in x + . When x is uniformly recurrent, for all y ∈ X = Ω(x) we have R y,u = R x,u so we let R X,u denote this set.

DISCRETE ANALYSIS, 2022:7, 66pp.

Example 3.5. For the Fibonacci sequence x, we have the return words R x,a = {a, ab} and R x,aa = {aab, aabab} and the morphisms Θ x,a , Θ x,aa are given by Θ x,a : 1 → a 2 → ab and Θ x,aa : 1 → aabab 2 → aab .

For the Thue-Morse sequence y, we have the following sets of return words R y,b = {b, ba, baa}, R y,bb = {bbaa, bbaaba, bbabaa, bbabaaba} and the morphisms Θ y,b , Θ y,bb are given by Θ y,b :

     1 → b 2 → ba 3 → baa and Θ y,bb :            1 → bbabaa 2 → bbaaba 3 → bbaa 4 → bbabaaba .
For the Chacon sequence z, we have the following sets of return words R z,a = {a, ab}, R z,aab = {aaba, aabab} and the morphisms Θ z,a , Θ z,aab are given by Θ z,a :

1 → a 2 → ab and Θ z,aab : 1 → aaba 2 → aabab .

The next results are classical when dealing with return words. The first three are proved in [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF] for one-sided sequences and when u is a prefix of x, but the proofs are exactly the same in the two-sided case and when u is a factor but not a prefix. The proof of Proposition 3.7 that is in [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF] only concerns x itself (and not y ∈ Ω(x)) but again, the proof is the same. Proposition 3.6 ([Dur98a]). Let x ∈ A K be a uniformly recurrent sequence and u be a word in L(x). The set R x,u is a code, i.e., the map Θ x,u : R *

x,u → R * x,u is one-to-one.

Proposition 3.7 ([Dur98a]). Let x be a uniformly recurrent sequence in A K and let u be a word in L(x). Let y ∈ Ω(x) and i ∈ N be the first occurrence of u in y + . Then, there exists a unique sequence z ∈ R K

x,u satisfying Θ x,u (z) = S i (y); we call the sequence z the derived sequence of y (w.r.t. u) and we denote it by D u (y). Furthermore, for all y ∈ Ω(x), D u (y) is uniformly recurrent and Ω(D u (y)) = Ω(D u (x)).

Proposition 3.8 ([Dur98a]

). Let x be a uniformly recurrent sequence in A K . Let u and u ′ be two prefixes of x + where u is a prefix of u ′ .

1. There is a unique non-erasing morphism λ x,u,u ′ : R * x,u ′ → R * x,u such that

Θ x,u ′ = Θ x,u • λ x,u,u ′ ; 2. If D u (x + ) = D u ′ (x + )
and if for all (w, w ′ ) ∈ R x,u × R x,u ′ , wu occurs in w ′ u ′ , then λ x,u,u ′ is primitive, left proper (λ x,u,u ′ (R x,u ′ ) ⊂ 1R + x,u ) and such that D u (x + ) = λ ω x,u,u ′ (1).

Example 3.9. For the Fibonacci sequence x, the Thue-Morse sequence y and the Chacon sequence z, the morphisms λ x,a,aa : R * x,aa → R * x,a , λ y,b,bb : R * y,bb → R * y,b and λ z,a,aab : R * z,aab → R * z,a given by the previous proposition are respectively λ x,a,aa :

1 → 122 2 → 121 , λ y,b,bb :

           1 → 123 2 → 132 3 → 13 4 → 1232
and λ z,a,aab : 1 → 121 2 → 122 .

It could furthermore be checked that D a (z) = D aab (z) (see Theorem 3.10 below), so that

D a (z) = λ ω z,a,aab (1) = 1211221211211221221211221211211221211211 • • • z = Θ z,a (D a (z)) = aabaaababaabaaabaaababaababaabaaababaaba • • •
The next result is a direct consequence of results in [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]. Since it is not exactly stated as follows, we give a short proof.

Theorem 3.10 ( [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]). Let x be a uniformly recurrent morphic sequence in A N .

1. For all prefixes u of x, the morphism Θ x,u is computable and there exist some computable morphisms σ u : B * → B * and ψ u :

B * → R * x,u such that D u (x) = ψ u (σ ω u (b)).
2. There is computable constant C such that the set {(σ u , ψ u ) | u prefix of x} has cardinality at most C. In particular, the number of derived sequences of x (on its prefixes) is at most C.

Proof. The existence of σ u and ψ u is [Dur13b, Proposition 28] and the fact that Θ x,u , σ u and ψ u are computable is explained in [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF]Section 4]. The bound on the number of possible pairs (σ u , ψ u ) is [Dur13b, Theorem 29].

Theorem 3.11 ([DHS99]). Let x be an aperiodic linearly recurrent sequence for the constant K. For all words u of L(x),

1. For all n, every word of L n (x) occurs in every word of L (K+1)n (x);

2. For all words v belonging to R x,u , 1

K |u| ≤ |v| ≤ K|u|; 3. #(R x,u ) ≤ (K + 1) 3 ; 4. p x (n) ≤ Kn for all n ≥ 1.
The bound K of Theorem 3.1 is associated with some constant of linear recurrence of (Y, S) and (X σ , S). The next result states that it is computable for primitive substitutive sequences. Proposition 3.12 ([Dur98a, DHS99]). If x is an aperiodic primitive substitutive sequence (w.r.t. σ : A * → A * ), then it is linearly recurrent for the computable constant

K σ = Q σ R σ |σ |, (1)
where Q σ is a constant such that |σ n | ≤ Q σ σ n for all n and R σ is the maximal length of a return word to a word of length 2 in x.

Example 3.13. Using the previous result, the Fibonacci sequence is linearly recurrent for the constant 10 1+ √ 5

2 . Using Walnut1 [START_REF] Mousavi | Automatic theorem proving in walnut[END_REF], it is possible to show that the optimal constant is 3, but that 3 is only necessary for words of length 1 (aab is a return word to b). For longer words, the optimal bound is close to 2.65. Similarly, the Thue-Morse sequence is linearly recurrent for the constant 16. Again using Walnut, it can be shown that the optimal constant is 9. For the Chacon sequence, we would first need to consider it as a primitive substitutive sequence (the Chacon morphism not being primitive) to obtain an upper bound on its constant of linear recurrence.

Observe that in the next sections, we do not always suppose that the substitutions are proper, several results being true without this hypothesis.

Proof of Theorem 3.1

Proof. We make use of Proposition 3.7, Proposition 3.8, Theorem 3.10, Theorem 3.11 and Proposition 3.12.

Assume that y is a one-sided sequence, otherwise, take y = y + . As y is uniformly recurrent, we have lim n→+∞ min{|w| | u ∈ L n (y), w ∈ R y,u } = +∞. Using Theorem 3.10, we can algorithmically find two prefixes u and u ′ of y such that

• D u ′ (y) = D u (y); • Θ y,u (1)u is a prefix of u ′ ; • for all (w, w ′ ) ∈ R y,u × R y,u ′ , wu occurs in w ′ u ′ .
Set R = R y,u = R y,u ′ . By Proposition 3.8, there is a primitive and left proper substitution τ = λ y,u,u ′ (τ(1) ⊂ 1R + ) such that D u (y) = τ ω (1). Since Θ y,u and Θ y,u ′ are computable by Theorem 3.10, the substitution τ is computable as well. In particular, we have X τ = Ω(D u (y)), Θ y,u (X τ ) ⊂ Y and, by Proposition 3.7, for all y ′ ∈ Y , there exists a unique pair

(x, n) ∈ X τ × N such that • u is prefix of S -n (y ′ ) and is not prefix of S -m (y ′ ) for all integer m such that 0 ≤ m < n (in particular, we have 0 ≤ n < |Θ y,u |); • y ′ = S n Θ y,u (x).
Set Θ = Θ y,u and consider the alphabet

D = {(r, k) | r ∈ R, 0 ≤ k < |Θ(r)|} and the morphism ψ : R * → D * defined by: ψ(r) = (r, 0) . . . (r, |Θ(r)| -1).
Since τ ≥ 2, there is an integer n ≤ |Θ| such that τ n | ≥ |Θ|. Let σ be the endomorphism from D * to D * defined by:

σ ((r, k)) = ψ(τ n (r) [k,k] ), if 0 ≤ k < |Θ(r)| -1; σ ((r, |Θ(r)| -1)) = ψ(τ n (r) [|Θ(r)|-1,|τ n (r)|-1] ), otherwise.
Observe that τ being primitive, so is σ . Furthermore, since τ is left proper, it is easily seen that σ 2 is left proper. For all r in R, we have

σ (ψ(r)) = σ ((r, 0) • • • (r, |Θ(r)| -1)) = ψ(τ n (r) [0,0] ) • • • ψ(τ n (r) [|Θ(r)|-1,|τ n (r)|-1] ) = ψ(τ n (r)), hence σ • ψ = ψ • τ n . Since τ is left proper, it has a fixed point z ∈ R N (which is unique) and it satisfies σ (ψ(z)) = ψ(τ n (z)) = ψ(z). Hence ψ(z)
is a fixed point of the substitution σ and X σ = Ω(ψ(z)). In particular, ψ(X τ ) ⊂ X σ and for all x ∈ X σ , there exists a unique pair

(z ′ , n) ∈ X τ × N such that • (S -n (x)) 0 = (r, 0) for some r ∈ R and (S -m (x)) 0 / ∈ R × {0} for all integer m such that 0 ≤ m < n (in particular we have 0 ≤ n < |ψ| = |Θ|); • x = S n ψ(z ′ ).
Let φ be the coding from

D * to A * defined by φ ((r, k)) = Θ(r) [k,k] for all (r, k) in D. For all r in R we obtain φ (ψ(r)) = φ ((r, 0) • • • (r, |Θ(r)| -1)) = Θ(r),
and then φ • ψ = Θ. Let us show that φ defines a factor map of radius 0 from (X σ , S) onto (Y, S).

We have φ

(X σ ) = Y : if x ∈ X σ , then x = S n ψ(z ′ ) for some integer n and some z ′ ∈ X τ . Therefore, φ (x) = S n (φ • ψ(z ′ )) = S n (Θ(z ′ )) ∈ Y . Reciprocally, if y ′ ∈ Y , there exists a unique pair (x, n) ∈ X τ × N such that y ′ = S n Θ y,u (x) where u is not prefix of S -m (y ′ ) for all integer m such that 0 ≤ m < n. As φ • ψ = Θ, we then have y ′ = φ (S n (ψ(x))), with ψ(x) ∈ X σ .
To show that φ is an isomorphism, we build a factor map f from (Y, S) onto (X σ , S) and we show that f • φ is the identity. Let L be some constant of linear recurrence of D u (y). It is computable by Proposition 3.12 (since τ is computable). Since y = Θ(D u (y)), y is also linearly recurrent and for the constant

L ′ = |Θ|L. Set K = (L + 1)|u| + 1. Let w = w -K • • • w K , w i ∈ A for all i, be a word of length 2K + 1 of L(Y ). By Theorem 3.11, there is a smallest non-negative integer i < (L + 1)|u| such that w [-i,-i+|u|[ = u. With the same argument, there is a smallest positive integer j ≤ L|u| + 1 such that w [ j, j+|u|[ = u. This defines a letter r w ∈ R such that Θ(r w ) = w [-i, j[ . We define f : A 2K+1 → R by f (w) = ψ(r w ) i = (r w , i) and we call f : A Z → R Z the map defined by f , i.e., ( f (x)) n = f (x [n-K,n+K] ) for all x, n. Let us show f • φ is the identity. Indeed, let x ∈ X σ and y = φ (x). To show that f (y) = x, it is enough to show that f (y [-K,K] ) = x 0 .
Let i ≥ 0 and j > 0, be the smallest integers such that x -i = (r, 0) and

x j = (r ′ , 0) for some r, r ′ ∈ R. Then, x [-i, j-1] = ψ(r) and y [i, j+|u|[ = φ (x [i, j+|u|[ ) = φ (ψ(r))u = Θ(r)u. Setting w = y [-K,K] , we have r = r w and f (y [-K,K] ) = ψ(r w ) i = x 0 .
This shows that φ is a isomorphism of radius 0 from (X σ , S) onto (Y, S) and that its inverse f = φ -1 has radius K.

To conclude the proof, it suffices to show that (X σ , S) can be obtained as a primitive substitution subshift with a proper substitution. Indeed, up to now, we only know that σ 2 is left proper. Let a ∈ D be the letter such that σ 2 (D) ⊂ aD + . We consider the substitutions σ ′ and ξ respectively defined by aσ ′ (d) = σ 2 (d)a for all d ∈ D and ξ = σ ′ • σ 2 . The substitution ξ is proper, primitive and such that X ξ = X σ , which ends the proof. DISCRETE ANALYSIS, 2022:7, 66pp.

Examples

Let us apply Theorem 3.1 on two examples. Our aim is to follow the construction given in the proof of the theorem.

The first one is the Chacon subshift generated by the Chacon sequence z. Let us recall what we know from Example 3.5 and Example 3.9:

Θ z,a : 1 → a 2 → ab ; Θ z,aab : 1 → aaba 2 → aabab ; λ z,a,aab : 1 → 121 2 → 122 .
We consider the notation of the theorem and successively obtain:

• τ = λ z,a,aab ; • D = {(1, 0), (2, 0), (2, 1)} and n = 1; • ψ : 1 → (1, 0) 2 → (2, 0)(2, 1)
and σ :

     (1, 0) → (1, 0)(2, 0)(2, 1)(1, 0) (2, 0) → (1, 0) (2, 1) → (2, 0)(2, 1)(2, 0)(2, 1) ; • φ :      (1, 0) → a (2, 0) → a (2, 1) → b .
The theorem states that φ is an isomorphism from the Chacon subshift onto the subshift (X ξ , S), where ξ is the primitive and proper substitution defined by ξ = σ ′ • σ 2 and σ ′ is defined by

(1, 0)σ ′ (d) = σ 2 (d)(1, 0) for all d ∈ D.
Let us consider a second example with a sequence y which is not purely morphic like the Chacon sequence. We consider the morphisms σ :

           0 → 0123 1 → 02 2 → 13 3 → 3 and ψ :            0 → abb 1 → ab 2 → a 3 → ε . Let x = σ ω (0).
It is clearly non-uniformly recurrent and non-periodic as the words 3 n , n ∈ N, appears infinitely many times separated by some words over the alphabet {0, 1, 2}. Nonetheless, y = ψ(x) is uniformly recurrent, as it could be checked by the algorithm given in [START_REF] Durand | Decidability of uniform recurrence of morphic sequences[END_REF].

The algorithm of Theorem 3.10 gives D u (y) = D u ′ (y), with u = abba and u ′ = abbabaabb. Then, we obtain z = D u (y) = τ ω (1), with τ defined by Θ y,u ′ = Θ y,u • τ and Θ y,u :

           1 → abbaba 2 → abbaab 3 → abbabaab 4 → abba , Θ y,u ′ :            1 → abbabaabbaab 2 → abbabaababba 3 → abbabaabbaababba 4 → abbabaab , τ :            1 → 12 2 → 34 3 → 124 4 → 3 .
We finally obtain a primitive and proper substitution ξ : A * → A * on the 24 letter alphabet D = {(i, j) | i ∈ {1, 2, 3, 4}, 0 ≤ j < |Θ y,u (i)|} and a coding φ : D * → {a, b} * that induces an isomorphism from (X ξ , S) onto (Ω(y), S). We could moreover show that (Ω(y), S) is the Thue-Morse subshift, as it could be checked by using the algorithm that we provide later in this paper.

3.4 There are minimal morphic subshifts that are not purely morphic When dealing with morphic sequences or subshifts it is rather natural to ask whether it is a purely morphic sequence. Indeed, it is much easier to work directly with an endomorphism without having to take care of some coding identifying letters. A lot, most, of the papers dealing with morphic sequences only consider the case of purely morphic sequences.

Theorem 3.1 asserts that when working up to isomorphism one can always suppose that a subshift generated by a uniformly recurrent morphic sequences is in fact generated by a primitive proper substitution.

In [ACSZ18] is discussed the case of sequences instead of subshifts. The authors give an example (Example 23) of a sequence that is primitive morphic, but not purely morphic. But this sequence generates a subshift that is purely morphic.

Thus, one may ask whether there are minimal morphic subshifts (X , S) that are not purely morphic subshifts, that is X = X σ for any endomorphism σ . The following result shows that such examples exist. Proposition 3.14. Let (X , S) be an aperiodic linearly recurrent subshift for the constant K. There exists a factor map φ : (X , S) → (Y, S) such that (Y, S) is not purely morphic.

Proof. Let A be the alphabet of X . Since (X , S) is minimal, there exists an integer r ≥ 0 such that for all u ∈ L 2r+1 (X ), there exists a return word w ∈ R X,u of length bigger than 3(K + 1). Let us build a sliding block code φ : A 2r+1 → B such that (φ (X ), S) is aperiodic and not generated by a primitive substitution.

For all u ∈ L 2r+1 (X ), let φ u : A 2r+1 → B be defined by

φ u (v) = 1, if v = u; 0, otherwise. There exists u ∈ L 2r+1 (X ) such that (φ u (X ), S) is aperiodic. Indeed, if for all u ∈ L 2r+1 (X ), (φ u (X ), S) is periodic of period p u , then (X , S) is periodic of period at most ∏ u∈L 2r+1 (X) p u . Consider Y = φ u (X ) such that (Y, S
) is aperiodic. By the assumption on r, the word 0 3(K+1) be- longs to L(Y ). If Y is generated by a primitive substitution τ, then (τ n (0)) 3(K+1) belongs to L(Y ) for all n ∈ N. As τ is primitive, we have |τ N (0)| ≥ r for some N. From Theorem 3.11, all words of K+1) . As there are at most |τ N (0)| words of length |τ N (0)| in (τ N (0)) 3(K+1) , Morse and Hedlund's Theorem implies that (Y, S) is periodic, which is a contradiction.

L |τ N (0)|+2r (X ) occur in all words of L (K+1)(|τ N (0)|+2r) (X ). Thus all words of L |τ N (0)| (Y ) occur in all words of L (K+1)(|τ N (0)|+2r)-2r (Y ). In particular, all words of L |τ N (0)| (Y ) occur in (τ n (0)) 3(
Example 3.15. Let (X , S) be the Thue-Morse subshift that is linearly recurrent for the constant 16 (see Example 3.13). Considering the word u = bν 4 (a)ba ∈ L(X ), we can check that the word

bν 4 (abaa)ν 3 (b)ν 2 (a)ν(b)a DISCRETE ANALYSIS, 2022:7, 66pp.
is a return word to u in X and has length 80 and that the sliding block code φ u : {a, b} 19 → {0, 1} defined by

φ u (v) = 1 ⇔ v = u
is such that (φ u (X ), S) is aperiodic. Indeed, it could be checked by hand or using Walnut. Since 0 79 belongs to L(φ u (X )), (φ u (X ), S) cannot be generated by a primitive substitution (see the proof above).

Bounds for primitive substitutive sequences

In the previous section, we have shown that to prove Theorem 1.1, Corollary 1.2, Theorem 1.3 and Theorem 1.4, we can restrict ourselves to the case of subshifts generated by primitive and proper substitutions (see Remark 3.2). In this section, we consider primitive substitution subshifts (X σ , S) and (X τ , S) and develop some tools that will help us to bound the radius of factor maps from (X σ , S) onto (X τ , S) (whenever such maps exist). In particular, we give some computable constants about the substitutions σ and τ (sometimes assuming that there is a factor map from (X σ , S) onto (X τ , S)) and we consider a variation of the notion of substitution on the words of length n [Que10].

Observe that in this section, we do not assume that σ and τ are proper, the results being true without this hypothesis.

Recognizability

Let σ : A * → A * be a primitive substitution. Taking a power of σ if needed, we can suppose σ has an admissible fixed point x in A Z . Let E(x, σ ) = {e n | n ∈ Z} be the subset of integers defined by:

e n =    -|σ (x[n, -1])|, if n < 0; 0, if n = 0; |σ (x[0, n -1])|, if n > 0.
The integers e n are usually called the cutting bars of the substitution. The following result is fundamental for substitutive subshifts. Observe that while it was initially written for one-sided sequences, the same proof holds for two-sided ones (see for instance [START_REF] Durand | The constant of recognizability is computable for primitive morphisms[END_REF][START_REF] Durand | Dimension Groups and Dynamical Systems: Substitutions, Bratteli Diagrams and Cantor Systems[END_REF]).

Theorem 4.1. Let σ : A * → A * be an aperiodic primitive substitution and x ∈ A Z be an admissible fixed point of σ .

[Mos96]

There exists M > 0 such that

(n ∈ E(x, σ ), m ∈ Z, x[n -M, n + M] = x[m -M, m + M]) =⇒ m ∈ E(x, σ ).

[Mos92]

There exists L ≥ M such that

(i, j ∈ Z, x[e i -L, e i + L] = x[e j -L, e j + L]) =⇒ x i = x j .
In particular, the constants M and L do not depend on the admissible fixed point x.

DISCRETE ANALYSIS, 2022:7, 66pp.

The smallest L satisfying (2) in the previous theorem is called the recognizability constant for the substitution σ and is denoted L σ .

Observe that if u ∈ L(σ ) has length at least 2L + 1 and if i, j ∈ Z, i < j, are two occurrences of u in x, then the first part of Mossé's Theorem ensures that

[i + L, i + |u| -L) ∩ E(x, σ ) = ([ j + L, j + |u| -L) ∩ E(x, σ )) -( j -i)
and the second part states that the central part of u has the same preimage under σ at positions i and j. We call the set

([i + L, i + |u| -L) ∩ E(x, σ )) -i the set of relative cutting bars of u. Example 4.2. Let us consider τ : a → aab b → ab .
It is classical to show that it also defines the Fibonacci subshift. Let x be the unique admissible fixed point of τ. We have E(x, τ) = {i ∈ Z | x i-1 x i = ba} and so M = 1. The words of length 3 with prefix ba are baa and bab. Observe that if x [e i -1,e i +1] = baa, then x i = a, and, if

x [e i -1,e i +1] = bab, then x i = b.
Hence the constant of recognizability L τ of τ is 1.

For the Thue-Morse substitution ν, the constant M has to be greater than 1, since the word aba both occurs in the language as aν(b) and ν(a)b. On the contrary, any word u in L 5 (ν) contains an occurrence of the word aa or bb and these two words uniquely determine the relative cutting bars in u. Then for all i, we have x e i = x i , which shows that the constant of recognizability of ν is L ν = 2.

The two following lemmas are consequences of Mossé's theorem (Theorem 4.1).

Corollary 4.3 ([Que10, Corollary 5.11]). Let σ be an aperiodic primitive substitution. For all n ≥ 1, 1. σ n is a homeomorphism from X σ onto the clopen σ n (X σ ); 2. for every x ∈ X σ , there is a unique y ∈ X σ and a unique k, 0 ≤ k < |σ n (y 0 )|, such that x = S k (σ n (y)).

Corollary 4.4. Let σ be an aperiodic primitive substitution and x, y be two elements in X σ . Then, 1. If there exists n such that σ (x) = S n σ (y) then there exists m such that x = S m (y). Later, we will not only need the existence of the recognizability constant but also a bound on its value depending on the data of the primitive substitution.

Moreover, if n ≥ 0 then 0 ≤ m ≤ n/ σ ; 2. If σ k (x) and σ k (y) coincide on the indices [-m, n], with m, n ≥ L σ k ,

then x and y coincide on the indices

-m+L σ k |σ k | , n-L σ k |σ k | . 3. If σ has constant
Theorem 4.6 ([DL17]). Let σ : A * → A * be an aperiodic primitive substitution that has an admissible fixed point x ∈ A Z . Then

L σ ≤ 2|σ | 6(CardA) 2 +6(CardA)|σ | 28(CardA) 2 + |σ | CardA .
Moreover, if σ is one-to-one on letters then,

L σ ≤ 2|σ | 6(CardA) 2 +6|σ | 28(CardA) 2 + |σ |.
In [KM16] better bounds are given for the case of constant length substitutions on a two letter alphabet but in terms of "synchronization delay" and "circularity". As the recognizability constant is bounded by the synchronization delay (see comments in [START_REF] Durand | The constant of recognizability is computable for primitive morphisms[END_REF]), this gives the following theorem that greatly improves our bounds.

Theorem 4.7 ([KM16]). If CardA = 2 and σ : A * → A * is an aperiodic primitive substitution of constant length k, then 1. L σ ≤ 8, if k = 2; 2. L σ ≤ k 2 + 3k -4, if k is an odd prime number; 3. L σ ≤ k 2 k d -1 + 5k -4, otherwise
, where d is the least divisor of k. Later we will need to control the recognizability constant of σ k with respect to its growth. Proposition 4.8 ([DL17, Proposition 13]). If σ : A * → A * is an aperiodic primitive substitution that has an admissible fixed point x ∈ A Z . Then, for all k > 0, so is σ k and we have

L σ k ≤ L σ k-1 ∑ i=0 |σ i |.

Block representations of subshifts and substitutions on the blocks of radius n

Let (X , S) be a subshift over the alphabet A. For any positive integer n, we let A (n) denote the set

A (n) = {(w) | w ∈ L 2n+1 (σ )} considered as an alphabet. The following result is classical [Que10]. Lemma 4.9. Let φ : A 2n+1 → {(w) | w ∈ A 2n+1 } be the sliding block code defined by φ (a 1 • • • a 2n+1 ) = (a 1 • • • a 2n+1 ).
Then φ defines an isomorphism f from (X , S) to (X (n) , S), where X (n) = f (X ) is a subshift over the alphabet A (n) .

We call (X (n) , S) the n-block representation of (X , S). When the subshift X of the previous result is a substitutive subshift associated with a substitution σ , then X (n) is also substitutive and associated with the substitution on the words of length 2n + 1 of σ . The definition we give below of the well-known notion of substitution on the words of length n (see [Que10] for more details) is slightly different from the usual one as we need to define it for a "two-sided context".

Let σ : A * → A * be a substitution and n ≥ 1. Below any time we take (uv) in A (n) , we suppose that u belongs to A n and v belongs to A n+1 . We define the map π (n) : (A (n) ) * → A * by, for all (uv

) ∈ A (n) , π (n) ((uv)) = v 0 , where v = v 0 v 1 . . . v n , v i ∈ A for all i. We also define the substitution σ (n) : (A (n) ) * → (A (n) ) * by, for (uv) ∈ A (n) with σ (u) = a 1 • • • a k-1 , σ (v) = a k . . . a k+l where the a i 's belong to A and p = |σ (v 0 )|, σ (n) ((uv)) = (a k-n • • • a k+n )(a k-n+1 • • • a k+n+1 ) • • • (a k-n+p-1 • • • a k+p+n-1 ).
In other words, σ (n) ((uv)) consists in the ordered list of the first p factors of length 2n+ 1 of σ (uv) = a 1 • • • a k a k+1 • • • a k+l starting from the index k-n. We say that σ (n) the substitution on the blocks of radius n.

Example 4.10. Let us build the substitution γ (5) on the blocks of radius 2 associated with the Chacon morphism γ. The words of length 5 in L(γ) are L 5 (γ) = {aabaa, abaaa, baaab, aaaba, aabab, ababa, babaa, abaab, baaba}.

We obtain γ (5) :

              
(aabaa), (aabab), (babaa) → (babaa) (abaaa), (abaab) → (abaab)(baaba)(aabab)(ababa) (baaba), (aaaba) → (baaab)(aaaba)(aabab)(ababa) (baaab) → (baaab)(aaaba)(aabaa)(abaaa) (ababa) → (abaab)(baaba)(aabab)(ababa)

Proposition 4.11. Let σ be a primitive substitution, then for all n, σ (n) is computable, primitive and such that X

(n) σ = X σ (n) .
In particular, for all i and n, if x is a two-sided admissible fixed point of σ and x

(n) = ((x [-n+m,n+m] )) m∈Z , then x (n) is an admissible fixed point of σ (n) and { j ∈ Z | S j (x) ∈ σ i (X σ )} = { j ∈ Z | S j (x (n) ) ∈ (σ (n) ) i (X σ (n) )}. (2)
Moreover, for all n and i, (

σ (n) ) i = (σ i ) (n) and |σ (n)i ((uv))| = |σ i (v 0 )| for all uv ∈ A (n) where v = v 0 v 1 • • • v n .
In particular, the incidence matrices M σ and M σ (n) have the same spectral radius.

Proof. First, let us prove by induction that for every i ≥ 1,

(σ (n) ) i = (σ i ) (n) . (3)
The base case is trivial so let us assume that the result holds for some i ≥ 1. For any (uv) ∈ A (n) , we have

(σ (n) ) i+1 ((uv)) = σ (n) (σ (n) ) i ((uv)) = σ (n) (σ i ) (n) ((uv)),
where we have used the induction hypothesis. Let us write

σ i (uv) = a 1 • • • a p , a j ∈ A for all j σ i+1 (uv) = b 1 • • • b q , b j ∈ A for all j.
By definition, we have, with the values

k i = |σ i (u)| + 1, k i+1 = |σ i+1 (u)| + 1, ℓ i = |σ i (v 0 )| -1 and ℓ i+1 = |σ i+1 (v 0 )| -1, (σ i ) (n) ((uv)) = (a k i -n • • • a k i +n ) • • • (a k i -n+ℓ i • • • a k i +n+ℓ i ); (σ i+1 ) (n) ((uv)) = (b k i+1 -n • • • b k i+1 +n ) • • • (b k i+1 -n+ℓ i+1 • • • b k i+1 +n+ℓ i+1 ).
For all m ∈ {0, 1, . . . , ℓ i }, if we set

r m = |σ (a 1 • • • a k i -n+m-1 )| s m = |σ (a k i -n+m • • • a k i +n+m )| t m = |σ (a k i -n+m • • • a k i +m-1 )| + 1 z m = |σ (a k i +m )| -1, we get σ (a k i -n+m • • • a k i +n+m ) = b r m +1 • • • b r m +s m and thus σ (n) ((a k i -n+m • • • a k i +n+m )) = (b r m +t m -n • • • b r m +t m +n ) • • • (b r m +t m -n+z m • • • b r m +t m +n+z m ).
To finish the proof of (3), it suffices to notice that we have

r 0 + t 0 = k i+1 ; r m + t m + z m + 1 = r m+1 + t m+1
, for all m ∈ {0, . . . , ℓ i -1};

r ℓ i + t ℓ i + z ℓ i = k i+1 + ℓ i+1 .
Using (3), for the sake of simplicity we let σ (n)i denote the substitution (σ (n) ) i . We deduce that for all i

σ (n)i ((x [-n,n] )) = (x [-n,n] ) • • • (x [|σ i (x 0 )|-1-n,|σ i (x 0 )|-1+n] ) σ (n)i ((x [-n-1,n-1] )) = (x [-|σ i (x -1 )|-n,-|σ i (x -1 )|+n] ) • • • (x [-n-1,n-1] )
and that x (n) = ((x [-n+i,n+i] )) i∈Z is an admissible two-sided fixed point of σ (n) . In particular, for all

(uv) ∈ A (n) , we have |σ (n)i ((uv))| = |σ i (v 0 )
|, from which we deduce (2) and the fact that M σ and M σ (n) have the same spectral radius.

Let us show that σ (n) is primitive. If i is large enough, every w ∈ L(σ ) of length 2n + 1 is a factor of σ i (a) for every a ∈ A. Thus, every (uv

) ∈ A (n) occurs in σ (n)i ((u ′ v ′ )) for every (u ′ v ′ ) ∈ A (n) .
For the equality

X (n) σ = X σ (n) , as x (n) is uniformly recurrent, we hence have X (n) σ = Ω(x (n) )
. Furthermore, as x (n) is also an admissible fixed point of the primitive substitution σ (n) , we have X σ (n) = Ω(x (n) ).

Computable bounds for linear recurrence of substitutive sequences

We now develop some lemmas that allow to relate the quantities |σ n | and σ n to the spectral radius of M n σ . First recall that if (X , T ) is a dynamical system, an invariant measure for (X , T ) is a probability measure µ on the σ -algebra of Borel sets such that µ(T -1 B) = µ(B) for all Borel sets B. Such a measure is ergodic if every T -invariant Borel set has measure 0 or 1. The system (X , T ) is said to be uniquely ergodic if there exists a unique invariant measure (which is then ergodic). Let us recall the ergodic theorem for such systems: Let µ be the unique T -invariant ergodic measure of (X , T ) and f : X → R be a continuous function, then ((1/n) ∑ n-1 i=0 f • T i ) n converges uniformly to X f dµ. We refer the reader to [START_REF] Hasselblatt | Introduction to the modern theory of dynamical systems[END_REF] for more details on ergodicity.

Proposition 4.12 ([Dur00, Proposition 13]). If (X , S) is an aperiodic linearly recurrent subshift, then it is uniquely ergodic. Furthermore, if µ denotes the unique invariant measure of (X , S) and if K is a constant of linear recurrence for X , we have for all non-empty u ∈ L(X ),

1/K ≤ |u|µ([u]) ≤ K.
Any substitution subshift (X σ , S), where σ is primitive, has a unique ergodic measure µ [Que10]. We denote by µ (ℓ) the vector whose entries are µ([u]), u ∈ L 2ℓ+1 (σ ).

As we already said above, our definition of n-block substitutions is slightly different from the usual one in [Que10], nevertheless the following result remains true for our definition.

Lemma 4.13 ([Que10, Corollary 5.4 and Proposition 5.10]). Let σ : A * → A * be an aperiodic primitive substitution and let µ be the unique invariant measure of (X σ , S). The matrix M σ (ℓ) has the same domi- nant eigenvalue as M σ . Furthermore, the vector µ (ℓ) is a positive eigenvector of M σ (ℓ) associated with this dominant eigenvalue.

Lemma 4.14. Let σ : A * → A * be an aperiodic and primitive substitution. There exists a positive integer k ≤ Card(A) 2 such that for all n ≥ k, σ n ≥ |σ n-k |. Then for all n ≥ k, one as

ρ(M σ ) n-k ≤ σ n ≤ |σ n | ≤ K σ ρ(M σ ) n , |σ n | ≤ ρ(M σ ) k K σ σ n ,
where ρ(M σ ) denotes the spectral radius of M σ and K σ is given by Equation (1). Moreover, if M σ has positive entries then one can take k = 1.

Proof. Since σ is primitive, there exists k ≤ Card(A) 2 such that M k σ contains only positive entries (see [HJ90, Corollary 8.5.8]), which trivially implies σ n ≥ |σ n-k |.

By the previous lemma, the vector µ (0) is a positive eigenvector of M σ associated with the eigenvalue ρ(M σ ). Furthermore, it satisfies µ (0) 1 = ∑ a∈A µ([a]) = 1. For all n, we thus have

∑ a∈A |σ n (a)|µ([a]) = M n σ µ (0) 1 = ρ(M σ ) n .
Using Proposition 4.12, we deduce that |σ n | ≤ K σ ρ(M σ ) n . Since for all n, one also has ρ(M σ ) n ≤ |σ n |, we deduce from the definition of k that for all n ≥ k, σ n ≥ ρ(M σ ) n-k .

5 Bounding the radius of a factor map between primitive substitution subshifts

In this section we show that for aperiodic primitive proper substitutions σ and τ, the radius of a factor map from X σ to X τ can be chosen smaller than a bound only depending on σ and τ and that one can algorithmically compute.

Orbit-preserving maps, cocycles and dill maps

Let (X 1 , T 1 ) and (X 2 , T 2 ) be two topological dynamical systems. A map f :

X 1 → X 2 is said to be orbit- preserving if f (O T 1 (x)) ⊂ O T 2 ( f (x)) holds for all x ∈ X 1 , where O T 1 (x) stands for {T n 1 (x) | n ∈ Z}. Observe that, in this case, f satisfies f (T 1 (x)) = T c(x) 2 ( f (x)), (4)
for all x ∈ X 1 , for some map c : X 1 → Z we call a cocycle for f . If f and c are continuous and if for all x, c(x) ≥ 0 and there exists some y such that c(y) > 0, then we say f is a dill map. Observe that if f is a dill map, then the associated cocycle c is bounded. Furthermore, when (X 2 , T 2 ) has no periodic point, f is a factor map if and only if c(x) = 1 for all x. Other examples of dill maps are given by morphisms Θ : A * → B * . Indeed, take a minimal subshift (X , S) generated by a sequence x ∈ A Z and let (Y, S) be generated by y = Θ(x) ∈ B Z . Then Θ defines a dill map from X to Y .

In the definition of dill maps, the existence of y such that c(y) > 0 is only required to avoid degenerated cases such as trivial maps satisfying f (O T 1 (x)) = { f (x)} for all x. The next lemma shows that the existence of the point y is just a consequence of the continuity of f . Lemma 5.1. Let (X 1 , T 1 ) and (X 2 , T 2 ) two topological dynamical systems such that (X 1 , T 1 ) is minimal. If f : X 1 → X 2 is a continuous orbit-preserving map such that f (X 1 ) is not a singleton and the cocycle c : X 1 → Z associated with f is continuous and non-negative, then f is a dill map.

Proof. Let assume that c(x) = 0 for all x ∈ X 1 . Then, f (T 1 (x)) = f (x) for all x ∈ X 1 . Hence, f (T n 1 (x)) = f (x) for all n ∈ Z. Since O T 1 (x) is dense in X 1 and f is continuous, we get that f (X 1 ) is a singleton, which contradicts the hypothesis.

The notion of dill map has been introduced by Salo and Törmä [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] in a one-sided context. Suppose (X , S) and (Y, S) are subshifts and f :

(X , S) → (Y, S) is a dill map. A continuous function φ : X → A * satisfying f (x) = • • • φ (S -1 (x)).φ (x)φ (S(x))φ (S 2 (x)) • • • (5)
for all x ∈ X is called an implementation of f . Observe that φ (x) could be the empty word. Notice that |φ (x)| = c(x) and that φ (x) is the empty word whenever c(x) = 0. It is straightforward to check (as observed in [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF]) that if Y does not contain S-periodic points then c and φ are unique. As we will deal with infinite minimal subshifts, there will be no S-periodic points in Y , and, thus, both maps will be unique.

Let f : (X , S) → (Y, S) be a dill map between subshifts without S-periodic points and with implementation map φ . The map c = |φ | is the unique cocycle of f . By compactness of X and continuity of c, the set c(X ) is finite. Using the continuity of f , we can thus define

r = min{R ∈ N | x [-R,R] = y [-R,R] =⇒ φ (x) = φ (y)} and m = max{|φ (x)| | x ∈ X }.
The couple (r, m) is a called the radius pair of f . It is clear that r is a radius for φ and c. If f is a factor map, then its radius pair is (r, 1) and φ is a sliding block code defining f . Let f and g be two continuous maps from (X 1 , T 1 ) to (X 2 , T 2 ). We say f and g are orbitally related (and we write f ≡ g) whenever there exists a continuous map c :

X 1 → Z satisfying, for all x ∈ X 1 , T c(x) 2 • f (x) = g(x). (6)
It is clear that the orbit relation is an equivalence relation.

Lemma 5.3. Let f and g be two orbitally related factor maps from (X 1 , T 1 ) to (X 2 , T 2 ). Suppose (X 1 , T 1 ) is minimal and (X 2 , T 2 ) is aperiodic. Then, there exists e ∈ Z such that f = T e 2 • g.

Proof. Let c : X 1 → Z be a continuous map satisfying, for all x ∈ X 1 ,

T c(x) 2 • f (x) = g(x). Therefore T c(T 1 (x)) 2 • f (T 1 (x)) = g(T 1 (x)) = T 2 • g(x) = T c(x) 2 • f (T 1 (x)).
As (X 2 , T 2 ) is aperiodic, one gets c(T 1 (x)) = c(x) for all x. From the minimality of (X 1 , T 1 ) and by continuity of c, one concludes that c is a constant function.

Specific dill maps associated with factor maps

Let σ : A * → A * and τ : B * → B * be two aperiodic primitive substitutions. We let K σ and K τ denote the constant given by (1). In this section, starting with a factor map f : (X σ , S) → (X τ , S), we build pairwise orbitally related dill maps F n : (X σ , S) → (X τ , S), n ∈ N. We show that for n large enough, these dill maps have bounded radius pairs and so that there exist only finitely many such maps. In Section 5.3, we will use these dill maps to build a new factor map from (X σ , S) to (X τ , S) with a radius only depending on σ and τ, not on the radius of f . Let us thus consider a factor map f : (X σ , S) → (X τ , S) with radius r. We recall a Cobham-type theorem proved in [START_REF] Durand | Sur les ensembles d'entiers reconnaissables[END_REF].

Theorem 5.4. If (X τ , S) is aperiodic then the dominant eigenvalues of σ and τ share a non-trivial common power.

Consequently, we can suppose that σ and τ have the same dominant eigenvalue λ (taking powers of the substitutions does not change the subshifts). We also assume that σ and τ are positive, i.e., their incidence matrices have only positive entries. Observe that this implies that λ ≥ 2. We finally let L τ denote the constant of recognizability of τ.

For all n ≥ 0 we define the map F n : X σ → X τ by

τ n • F n (x) = S r n • f •σ n (x) • f • σ n (x), x ∈ X σ , (7)
where r n : X τ → N is the return map to the clopen set τ n (X τ ) (see Corollary 4.3):

r n (x) = min{i ≥ 0 | S i (x) ∈ τ n (X τ )}.
Thus, we have τ n •F n ≡ f •σ n . Observe that, using Mossé's theorem (Theorem 4.1), r n is continuous and F n is well-defined. Now let us show that F n is a dill map and that, for n large enough, its radius pair is bounded by a computable bound only depending on σ and τ.

Proposition 5.5. For all n, F n is a dill map. Furthermore, if n is such that r/|τ n | ≤ 1, the radius pair

(s 1 , s 2 ) of F n satisfies s 1 ≤ ⌈K τ λ (⌊(K τ + K σ )λ ⌋ + L τ + 2)⌉ and s 2 ≤ ⌊(K τ + K σ )λ ⌋.
In particular, we have

#{F n | r/|τ n | ≤ 1} ≤ K τ λ 2 (K σ + K τ ) 2K σ K τ λ 2 (K τ +K σ +L τ +3) .
Proof. Let n be a positive integer. By Corollary 4.3, F n is a continuous map. We have:

τ n • F n (S(x)) = S r n • f •σ n (S(x)) • f • σ n (S(x)) = S r n • f •S |σ n (x 0 )| •σ n (x) • f • S |σ n (x 0 )| • σ n (x) = S r n • f •S |σ n (x 0 )| •σ n (x)+|σ n (x 0 )| • f • σ n (x) = S r n •S |σ n (x 0 )| • f •σ n (x)+|σ n (x 0 )|-r n • f •σ n (x) • τ n • F n (x). (8)
The map

x ∈ X σ → r n • S |σ n (x 0 )| • f • σ n (x) + |σ n (x 0 )| -r n • f • σ n (x)
is continuous and F n (X σ ) is obviously not a singleton as (X τ , S) is aperiodic. Therefore, from Corollary 4.4 and Lemma 5.1, to prove that F n is a dill map it suffices to show that

r n • S |σ n (x 0 )| • f • σ n (x) + |σ n (x 0 )| -r n • f • σ n (x)
is non-negative for all x. This is clear if

r n • f • σ n (x) ≤ |σ n (x 0 )|. Suppose r n • f • σ n (x) > |σ n (x 0 )|. This means that S i • f • σ n (x) does not belong to τ n (X τ ) for all i such that 0 ≤ i ≤ |σ n (x 0 )|. Hence r n • S |σ n (x 0 )| • f • σ n (x) + |σ n (x 0 )| = r n • f • σ n (x) and F n is a dill map.
Now suppose that n ∈ N is such that r/|τ n | ≤ 1. We let c : X σ → N and φ : X σ → B * respectively denote the cocycle and the implementation of F n . Let us also denote (s 1 , s 2 ) the radius pair of F n . From Equation (8) and Corollary 4.4, we get

c(x) ≤ r n • S |σ n (x 0 )| • f • σ n (x) + |σ n (x 0 )| -r n • f • σ n (x) / τ n ≤ (|τ n | + |σ n |)/ τ n .
Thus, using the fact that σ and τ are positive and have the same dominant eigenvalue λ , we deduce from Lemma 4.14 that

s 2 = max{c(x) | x ∈ X σ } ≤ ⌊(K σ + K τ )λ ⌋. Now let s = ⌈K τ λ (⌊(K τ + K σ )λ ⌋ + L τ + 2)
⌉ and let us show that φ (x) only depends on x [-s,s] . This will imply that s 1 is at most equal to s. Consider x, y ∈ X σ such that

x [-s,s] = y [-s,s] . Then S r n • f •σ n • f • σ n (x) and S r n • f •σ n • f • σ n (y) coincide on the indices [-s σ n + r -k, s σ n -r -k] for some integer k satisfying 0 ≤ k < |τ n |. From Corollary 4.4, F n (x) and F n (y) coincide on the indices -s σ n + r -k + L τ n |τ n | , s σ n -r -k -L τ n |τ n | and, since 0 ≤ k, r ≤ |τ n |, on the indices -s σ n + L τ n |τ n | + 1 , s σ n -L τ n |τ n | -2, ,
where L τ n is a recognizability constant of τ n . Recalling that λ ≥ 2 and that |τ n | ≤ K τ λ n by Lemma 4.14, we get from Proposition 4.8 that L τ n ≤ K τ L τ λ n . Hence, F n (x) and F n (y) coincide on the indices

-s σ n K τ λ n + L τ + 1 , s σ n K τ λ n -L τ -2 .
Then, it suffices to observe using Lemma 4.14 that

s σ n K τ λ n -L τ -2 ≥ s 2 , -s σ n K τ λ n + L τ + 1 ≤ 0, which shows that s 1 ≤ s.
To conclude the proof, the number of possible dill maps F n with r/|τ n | ≤ 1 is at most equal to the number of maps from L s (σ ) to

⌊(K σ +K τ )λ ⌋ i=0
L i (τ). We get, using Theorem 3.11,

#{F n | r/|τ n | ≤ 1} ≤ ⌊(K σ +K τ )λ ⌋ ∑ i=0 p τ (i) p σ (s) ≤ K τ λ 2 (K σ + K τ ) 2K σ K τ λ 2 (K τ +K σ +L τ +3)
DISCRETE ANALYSIS, 2022:7, 66pp.

Corollary 5.6. The set {F n | n ∈ N} is finite. In particular, there exists an increasing sequence (n i ) i∈N of integers such F n i = F n 0 for all i.

The following lemma will provide a key argument in the proof of Theorem 5.10 which is a detailed version of Theorem 1.3.

Lemma 5.7. If F n ≡ F m for some n = m, then F n-1 ≡ F m-1 . Proof. Suppose F n ≡ F m . As τ n-1 • F n-1 ≡ f • σ n-1 , one gets τ n-1 • F n-1 • σ ≡ f • σ n ≡ τ n • F n . Thus, from Corollary 4.4, F n-1 • σ ≡ τ • F n . We also have F m-1 • σ ≡ τ • F m . Hence, F n-1 • σ ≡ F m-1 • σ from which we deduce, F n-1 and F m-1 being dill maps, that F n-1 ≡ F m-1 .

Factorizations with smaller radius using dill maps

In this section, we show that if σ is proper and if there exists a factor map f : (X σ , S) → (X τ , S), then there exists another factor map g : (X σ , S) → (X τ , S) whose radius is bounded by some computable constant depending on σ and τ. Observe that if σ : A * → A * is proper and if a, b ∈ A are such that σ (A) ⊂ aA * ∩ A * b, then x = σ ω (b • a) is the unique admissible fixed point of σ and we have {x} = n∈N σ n (X σ ).

Let (X , T ) be a minimal dynamical system. A continuous function c :

X → R is a coboundary of (X , T ) if there is some continuous function d : X → R such that c = d • T -d.
Let c : X → R be a continuous function. For n ∈ N, we write

c (n) =      0 if n = 0, ∑ n-1 k=0 c • T k if n > 0, ∑ -1 k=n c • T k if n < 0, (9)
We remind the following useful identity: c (n+m) (x) = c (n) (x) + c (m) (T n (x)) and recall the following well-known result of Gottschalk and Hedlund [START_REF] Gottschalk | Topological Dynamics[END_REF]. A proof can be found in [HK95] (Theorem 2.9.4 p. 102).

Theorem 5.8. Let (X , T ) be a minimal dynamical system and c : X → R be a continuous function. The following are equivalent.

c is a coboundary;

2. The sequence of functions (c (n) ) n∈N is uniformly bounded; 3. The sequence (c (n) (x)) n∈N is bounded for some x ∈ X .

Let us show this result in a particular case but obtaining more information. Let (X , S) be a subshift and c : X → Z be a continuous map of radius r defined by ĉ: c is constant, and equal to ĉ(uv), on any cylinder [u.v] where |u| = r and |v| = r + 1. In the sequel we identify ĉ with the vector ( ĉ(uv)) uv∈L 2r+1 (σ ) .

Lemma 5.9. Let σ : A * → A * be a primitive, aperiodic and proper substitution, and let x ∈ A Z be its admissible fixed point. Suppose that c : X σ → Z is a continuous map with radius r, defined by ĉ, such that (c (n) ) n is bounded. We have the following.

1. There exists k > 0 such that ∑ e 2 -1 i=e 1 c(S i (x)) = 0 for all e 1 , e 2 ∈ E(σ k , x), where E(σ k , x) = {i ∈ Z | S i (x) ∈ σ k (X σ )}. 2r+1) , where M t denotes the transposed matrix of M and p σ denotes the factor complexity function of X σ .

ĉ belongs to Ker

(M t σ (r) ) p σ (
3. In (1), k can be chosen equal to p σ (2r + 1). Proof. Let U k = σ k (X σ ). Since the admissible fixed point x of σ satisfies {x} = ∩ k∈N U k , for any neighborhood V of x there exists k such that U k is included in V . We set

Λ k = {c (n) (x) | n ∈ N, S n (x) ∈ U k } and Λ = ∩ k∈N Λ k .
Obviously 0 belongs to Λ. Let us show that Λ = {0}. The map c being continuous and thus bounded, it is sufficient to prove that 2a belongs to Λ whenever a belongs to Λ. Let a ∈ Λ and k ∈ N. There exists n ≥ 0 such that S n (x) belongs to U k and c (n) (x) = a. Because S n and c (n) are continuous, there exists a clopen set V included in U k and containing x such that for all y ∈ V , S n (y) ∈ U k and c (n) (y) = a.

Observe that there exists l such that U l is included in V . Thus, one can suppose V = U l . As a belongs to Λ l , there exists m ≥ 0 with S m (x) in U l and c (m) (x) = a. We get that S n+m (x) belongs to U k and c (n+m) (x) = c (n) (S m (x)) + c (m) (x) = 2a. Thus 2a belongs to Λ k . As this is true for all k, we get that 2a belongs to Λ.

Observe that, since c takes integer values and Λ l+1 ⊂ Λ l for all l, there exists k such that Λ l = {0} for all l ≥ k. Thus (1) is proved.

Consider σ (r) : A (r) * → A (r) * the substitution on the blocks of radius r defined in Section 4.2 and the notation used therein. Let e 1 and e 2 be two consecutive integers in E(σ k , x) and uv ∈ L(σ ) with |u| = r and |v| = r + 1. The number of occurrences of uv in x [e 1 -r,e 2 -1+r] is equal to the number of occurrences of (uv) in

W = (x [e 1 -r,e 1 +r] )(x [e 1 -r+1,e 1 +r+1] ) • • • (x [e 2 -1-r,e 2 -1+r] ).
Then, as c (e 1 ) (x) = c (e 2 ) (x) = 0, one gets

0 = e 2 -1 ∑ i=e 1 c(S i (x)) = e 2 -1 ∑ i=e 1 ĉ(x [i-r,i+r] ) (10)
Observe that we can write

e 2 -1 ∑ i=e 1 ĉ(x [i-r,i+r] ) = ĉ, -→ W , (11)
where -→ W = (|W | w ) w∈L 2r+1 (σ ) , ĉ = ( ĉ(w)) w∈L 2r+1 (σ ) and •, • stands for the usual scalar product. From Proposition 4.11, we have

E(σ k , x) = E(σ (r)k , x (r) ).
Hence, e 1 and e 2 also belong to E(σ (r)k , x (r) ) and W = σ (r)k (β ) for some β ∈ A (r) .

Let 1 β be the column vector defined by 1 β (β ) = 1 and 0 elsewhere. From the conjunction of ( 10) and ( 11) we obtain

0 = ĉ, M k σ (r) 1 β .
As this is true for all such e 1 and e 2 , it is true for all β ∈ A (r) and one gets ĉt

M k σ (r) = 0. The dimension of M σ r is p σ (2r + 1) × p σ (2r + 1), hence ĉt M p σ (2r+1) σ (r)
= 0 and (2) is proved. Tracing back the previous arguments shows that for all e 1 , e 2 ∈ E(σ p σ (2r+1) , x) one gets

0 = e 2 -1 ∑ i=e 1 c(S i (x))
and that k could be chosen to be p σ (2r + 1). This proves (3) and we set k = p σ (2r + 1). For all n ∈ N, there exists ℓ ∈ {0, 1, . . . , |σ k |} such that S n+ℓ (x) ∈ U k . Observe that all functions c (ℓ) and S ℓ , ℓ ∈ {0, 1, . . . , |σ k |}, are uniformly continuous on X . Thus there exists L > 0 such that for all m, n ∈ N such that S m (x) and S n (x) coincide on the indices [-L, L], there exists ℓ ∈ {0, 1, . . . , |σ k |} such that S ℓ+m (x) and S ℓ+n (x) belong to U k and c (ℓ) (S m (x)) = c (ℓ) (S n (x)). Observe that, as S ℓ+m (x) and S ℓ+n (x) belong to U k , we have c (m+ℓ) (x) = c (n+ℓ) (x) = 0. We thus have

Let us find a continuous map

|d(S m (x)) -d(S n (x))| = |c (m) (x) -c (n) (x)| = |c (m) (x) + c (ℓ) (S m (x)) -c (n) (x) -c (ℓ) (S n (x))| ≤ |c (m+ℓ) (x)| + |c (n+ℓ) (x)| = 0, which shows that d is uniformly continuous on O + (x).
Let us end showing that the radius of d is at most |σ k | + max{L σ k , r}. We recall (see Corollary 4.5

) that P = {S m σ k ([a]) | a ∈ A, 0 ≤ m < |σ k (a)|} is a clopen partition of X σ k = X σ .
Let n ∈ N with n ≥ max a∈A |σ k (a)|. We have S n (x) ∈ S m(S n (x)) σ k ([a]) for some a ∈ A and some m(S n (x)) ∈ {0, . . . , |σ k (a)| -1}. In particular, we have nm(S n (x)) ≥ 0 and, since S n-m(S n (x)) (x) ∈ U k , c (n-m(S n (x))) (x) = 0. We get

d(S n (x)) = c (n) (x) = c (m(S n (x))) (S n-m(S n (x)) (x)).
By continuity of d, for all y ∈ X , we have

d(y) = c (m(y)) (S -m(y) y), (12)
where 0 ≤ m(y) < |σ k (a)| for some a ∈ A such that y ∈ S m(y) σ k ([a]). Below we prove a more detailed version of Theorem 1.3 when the subshift are generated by substitutions and where σ is a proper substitution.

Theorem 5.10. Let σ : A * → A * and τ : B * → B * be two aperiodic and positive substitutions, σ being proper. Suppose σ and τ have the same dominant eigenvalue λ . The following are equivalent.

1. There exists a factor map f : (X σ , S) → (X τ , S).

2. There exists a dill map F : (X σ , S) → (X τ , S) such that

• its radius (s 1 , s 2 ) satisfies s 1 ≤ ⌈K τ λ (⌊(K τ + K σ )λ ⌋) + L τ + 2⌉ and s 2 ≤ ⌊(K τ + K σ )λ ⌋. • for all x ∈ X τ , F • S(x) = S c(x) • F(x) where c : X → Z is a continuous map satisfying that (∑ n-1 k=0 (c • S k -1)) n is bounded.
3. There exists a factor map g : (X σ , S) → (X τ , S) having a radius bounded by, with R = ⌈K τ λ

(⌊(K τ + K σ )λ ⌋) + L τ + 2⌉, ⌊(K τ + K σ )λ ⌋(K σ + 1)(2R + 1)|σ p σ (2R+1) |.
Moreover, once given f one can find g (as above) such that f = S n • g for some n.

Proof. Of course (3) implies (1). Let us first show that (1) implies [START_REF] Authors Fabien | Amiénois de Mathématiques Fondamentales et Appliquées[END_REF]. Recall that for all n, F n : X σ → X τ is the dill map defined by

τ n • F n = S r n • f •σ n • f • σ n .
Let r be a radius of f and L τ the constant of recognizability of τ. From Proposition 5.5, we have

#{F n | r/|τ n | ≤ 1} ≤ K τ λ 2 (K σ + K τ ) 2K σ K τ λ 2 (K τ +K σ +L τ +3) .
Thus there exist n and m, n ≥ m, verifying |τ n-m | ≥ r and such that F n = F m . From Lemma 5.7 we obtain that f = F 0 ≡ F n-m . We fix N = nm, F = F N and we let (s 1 , s 2 ) be the radius pair of F. From Proposition 5.5 one has

s 1 ≤ ⌈K τ λ (⌊(K τ + K σ )λ ⌋) + L τ + 2⌉ and s 2 ≤ ⌊(K τ + K σ )λ ⌋.
Let c, d : X σ → Z be the unique continuous maps verifying for all x ∈ X σ ,

F(Sx) = S c(x) F(x) and F(Sx) = S d(x) f (x).
One has |c(x)| ≤ s 2 for all x ∈ X σ . Furthermore, we have, for all x,

F(Sx) = S d(x)+1 f (S -1 x) = S d(x)+1-d(S -1 (x)) F(x), hence c(x) = d(x) -d(S -1 (x)) + 1. This proves (2).
Let us show that (2) implies (3). Observe that the radius R of c is at most ⌈K τ λ (⌊(K τ + K σ )λ ⌋) + L τ + 2⌉. From Lemma 5.9, there exists a continuous map D : X → Z with radius

H ≤ |σ p σ (2R+1) | + max{L σ pσ (2R+1) , R} such that c -1 = D • S -D and for all x ∈ X σ , |D(x)| ≤ ⌊(K τ + K σ )λ ⌋|σ p σ (2R+1) |.
Let G : X → Y be the continuous map defined by G(x) = S -D(x) • F(x). We have:

G • S(x) = S -D(S(x)) • F(S(x)) = S -D(S(x))+c(x)-1+1 • F(x) = S -D(x)+1 • F(x) = S • G(x).
Thus G is a factor map from (X σ , S) to (X τ , S).

Let us give a bound on the radius of G. Let us set M = ⌊(K τ + K σ )λ ⌋|σ p σ (2R+1) |. The radius of G is at most equal to N, where N is such that for all x ∈ X σ , x [-N,N] uniquely determines F(x) [-M,M] , i.e., for all x, y ∈ X σ ,

x [-N,N] = y [-N,N] =⇒ F(x) [-M,M] = F(y) [-M,M] .
Let φ be the implementation of F given by Lemma 5.2. For all n, we have

F(x) [0,c (n) (x)-1] = φ (x)φ (Sx) • • • φ (S n-1 x), if n > 0; F(x) [c (n) (x),-1] = φ (S n x)φ (S n+1 x) • • • φ (S -1 x), if n < 0.
Furthermore, there is a local map φ : A 2s 1 +1 → B * defining φ so that

F(x) [0,c (n) (x)-1] = ∏ n-1 i=0 φ (x [-s 1 +i,s 1 +i] ), if n > 0; F(x) [c (n) (x),-1] = ∏ n-1 i=0 φ (x [-s 1 -n+i,s 1 -n+i] ), if n < 0.
As F is a dill map, there is a word u ∈ L(σ ) of length 2s 1 + 1 such that φ (u) = ε. By Theorem 3.11, u occurs in any word v ∈ L(σ ) of length (K σ + 1)(2s 1 + 1). Therefore, u occurs at least M times both in

x [-s 1 ,s 1 +M(K σ +1)(2s 1 +1)] and in x [-s 1 -1-M(K σ +1)(2s 1 +1),s 1 -1] .
The radius of G is thus at most equal to

N ≤ M(K σ + 1)(2s 1 + 1) ≤ ⌊(K τ + K σ )λ ⌋(K σ + 1)(2⌈K τ λ (⌊(K τ + K σ )λ ⌋) + L τ + 2⌉ + 1)|σ p σ (2R+1) |,
which ends the proof.

As a corollary, and using Theorem 3.1, we obtain Theorem 1.3 when (Y, S) is aperiodic.

6 Decidability of the factorization in the case of periodic subshifts

In this section we consider Theorem 1.1, Corollary 1.2, Theorem 1.3 and Theorem 1.4 under the assumptions that (X , S) and, or, (Y, S) are periodic. Recall that a minimal subshift (X , S) is periodic if there is some n > 0 such that S n = id. Such an n is called a period of (X , S) and for any x ∈ X , we have X = {x, Sx, S 2 x, . . . S n-1 x}.

As we are dealing with decision problems, it is important to recall that it is decidable to know whether a minimal morphic subshift is periodic and that the minimal period can be computed. Theorem 6.1 ( [START_REF] Durand | Decidability of the HD0L ultimate periodicity problem[END_REF]). Let x be a uniformly recurrent morphic sequence. It is decidable whether x is periodic. Moreover some u such that x = uuu • • • with |u| minimal can be computed.

We also recall Fine and Wilf theorem. Theorem 6.2 ([FW65]). Let x, y be two sequences with respective periods p and q. If x and y coincide on the indices {0, 1, . . . , p + q -gcd(p, q) -1}, then they are equal and have period gcd(p, q). In particular, if p and q are two periods of a minimal periodic subshift (X , S), then every sequence in X has periods p and q, so also has period gcd(p, q). Thus gcd(p, q) is also a period of (X , S).

Let us give the following notation that will facilitate the description of the different situations. Let (X , T ) be a minimal topological dynamical system and consider the set P(X , T ) = {p ∈ N | (X , T ) admits a factor of cardinality p}.

For the remaining of this section, we assume that (Y, S) is periodic with minimal period q and we write Y = {y, Sy, . . . S q-1 y} for some fixed y ∈ Y . We also assume without loss of generality that X = X σ for some primitive and proper substitution σ : A * → A * . We can trivially make this assumption if (X , S) is periodic. Otherwise, we use Theorem 3.1.

Let q = q r 1 1 • • • q r k k where the q i 's are distinct prime numbers. For every q i , we have q i ∈ P(Y, S) ⊂ (P(X , S)). Thus, by Lemma 6.4, the vector (|σ d (a)|) a∈A belongs to q i Z d . Considering the value r = max{r 1 , . . . , r k }, we then have (|σ rd (a)|) a∈A ∈ q r i Z d . Having gcd(q r i , q r j ) = 1 for every distinct i, j, we deduce that

(|σ rd (a)|) a∈A ∈ k ∏ i=1 q r i Z d ⊂ qZ d
By Corollary 4.5, the map f : X → Y defined by

f (x) = S i y whenever x ∈ S i σ rd ([a]
) for some a ∈ A and some 0 ≤ i < |σ rd (a)| is well defined and is a factor map with radius L σ rd + |σ rd |, where L σ rd is the recognizability constant of σ rd (see Theorem 4.6). Let finally g : (X , S) → (Y, S) be another factor map and let x ∈ X be the unique fixed point of σ . There exist unique 0 ≤ i, j < q such that f (x) = S i y and g(x) = S j y = S j-i f (x). We deduce that g = S j-i • f from the minimality of (X , S).

Proof of Theorem 1.4 for the periodic case

Let φ be a sliding block code. Taking some block representation of (X σ , S), one can suppose φ is a coding, see Section 4.2. This can be done algorithmically. If x is a fixed point of σ , then φ defines a factor map from (X , S) to (Y, S) if and only if φ (x) and y have the same language. This problem is decidable using Theorem 6.1.

Decidability of the factorization

In this section we prove that the factorization and isomorphism problems between minimal morphic subshifts are decidable, that is Theorem 1.1 and Corollary 1.2. Let us sketch briefly how we proceed.

From Theorem 3.1, and in particular Remark 3.2, it is enough to consider primitive substitution subshifts. Let σ and τ be two primitive substitutions.

In Section 5, we have shown there is a computable constant R such that if there is a factor map f : (X σ , S) → (X τ , S), then there is another factor map F : (X σ , S) → (X τ , S) with radius at most R. In this section, we show that there is an algorithm that answers whether or not a given sliding block code f : A 2R+1 → B defines a factor map from (X σ , S) to (X τ , S). Using Lemma 4.9 and Proposition 4.11, we can assume that f has radius 0, i.e., f : A → B defines a coding. As a subshift is uniquely determined by its language, we want to check whether or not f (L(σ )) = L(τ). If x is an admissible fixed point of σ , as well as y for τ, all we have to check is that L( f (x)) = L(y).

To this end, we will deeply use return words. Roughly speaking, we will show that we have L( f (x)) = L(y) if, and only if, there exists a prefix u of x, whose length is bounded by a computable constant, such that the return words to f (u) in y and the return words to f -1 ({ f (u)}) in x (as defined in Section 7.1) are identically concatenated in y and in x respectively (as precisely stated by Lemma 7.11 and Theorem 7.12). A key argument is to find some "canonical morphisms", i.e., morphisms that only depend on the combinatorics of x and y and not on the substitutions σ and τ. One of the main steps for this is to extend the results of Section 3.1 to return words to sets of words instead of words.

Return words to a set of words

Let x ∈ A N be a sequence and let U ⊂ L(x) be a set of non-empty words of the same length. We call return word to U any non-empty word w [i, j-1] = w i w i+1 • • • w j-1 for which there exist u, v ∈ U such that wv is a word in L(x) that admits u as a prefix and that contains no other occurrences of a word in U . The set of return words to U in x is denoted by R x,U .

With such a definition, we can define a bijection Θ x,U as in the case of return words to a single word. We consider the set R x,U = {1, 2, . . . } with #R x,U = #R x,U and we define

Θ x,U : R * x,U → R * x,U
as the unique morphism that maps R x,U bijectively onto R x,U and such that for all i ∈ R x,U , Θ x,U (i) is the ith word of R x,U occurring in x.

Example 7.1. Considering the Thue-Morse sequence y and the set of words U = {aa, bb}, we have R y,U = {aa, bb, aaba, bbab} and Θ y,U :

           1 → bbab 2 → aa 3 → bb 4 → aaba .
Similarly, for the Fibonacci sequence x and the set U = {aa, ab}, we have R x,U = {a, ab} and

Θ x,U : 1 → ab 2 → a .
Our aim is to prove a result similar to Proposition 3.8, but for return words to sets of words. In the case where U is a singleton {u}, a key argument in the proof of Proposition 3.8 is that R x,u is a code (see Proposition 3.6). This is in particular needed for the morphism λ x,u,u ′ of that proposition to be properly defined. Unfortunately, this property is not true anymore when U is not a singleton. Indeed, in [START_REF] Leroy | A combinatorial proof of S-adicity for sequences with linear complexity[END_REF], the authors exhibit an admissible fixed point x of a primitive substitution for which, if we take U n to be the set of left special words of length n, we have {a, b, ab} ⊂ R x,U n for infinitely many values of n. We thus introduce the following notion (see also [START_REF] Durand | Decidability of the HD0L ultimate periodicity problem[END_REF]). Definition 7.2. Let x ∈ A N be a sequence and let U ⊂ L(x) be a set of non-empty words with the same length. A return pair to U is a pair (w, u) ∈ R x,U × U such that wu belongs to L(x) and contains only two occurrences of words in U (u and the prefix of length |u|). We let Rx,U denote the set of return pairs to U in x.

Using these return pairs, we again enumerate the elements (w, u) in Rx,U in the order of the first occurrence of wu in x. Formally, we consider the set Rx,U = {1, 2, . . . } with # Rx,U = # Rx,U and we define Θx,U : R *

x,U → R * x,U
as the unique morphism that maps bijectively Rx,U onto Rx,U and for which for all i ∈ Rx,U , the element Θx,U (i) = (w, u) is such that wu is the ith such word occurring in x. Observe that we should only consider

words (w 1 , u 1 ) • • • (w n , u n ) ∈ R *
x,U that correspond to real concatenations of return words. More precisely, we say that (w

1 , u 1 ) • • • (w n , u n ) ∈ R * x,U is admissible if 1. w 1 w 2 • • • w n u n is a factor of x; 2. for all i ∈ {1, 2, . . . , n -1}, u i is a prefix of w i+1 w i+2 • • • w n u n . By extension, a sequence (w 1 , u 1 )(w 2 , u 2 )(w 3 , u 3 ) • • • ∈ RN
x,U is admissible if so are its prefixes. By symmetry, we also say that a finite or infinite word w on Rx,U is admissible if so is Θx,U (w).

Example 7.3. We continue our running examples with the Thue-Morse sequence and the Fibonacci sequence. For the Thue-Morse sequence, we have Ry,U = {(aa, bb), (bb, aa), (aaba, bb), (bbab, aa)} and Θy,U :

           1 → (bbab, aa) 2 → (aa, bb) 3 → (bb, aa) 4 → (aaba, bb) .
Observe that the word (aa, bb)(bb, aa)(aaba, bb) is admissible (because the word aabbaababb occurs in y), but (aa, bb)(bb, aa)(aa, bb) is not.

For the Fibonacci sequence, we have Rx,U = {(ab, aa), (a, ab), (ab, ab)} and Θx,U :

     1 → (ab, aa) 2 → (a, ab) 3 → (ab, ab)
.

This notion of return pairs satisfies a generalization of Proposition 3.6.

Proposition 7.4. Let x be a sequence in A N and let U ⊂ L(x) be a set of non-empty words with the same length.

1. If (w 1 , u 1 ) • • • (w k , u k ) ∈ R * x,U is admissible, and, if (r, v) ∈ Rx,U is such that rv occurs in the word w 1 w 2 • • • w k u k , then (r, v) = (w i , u i ) for some i ∈ {1, . . . , k}.

If two admissible words

(w 1 , u 1 ) • • • (w k , u k ) and (r 1 , v 1 ) • • • (r ℓ , v ℓ ) belonging to R * x,U are such that w 1 w 2 • • • w k u k = r 1 r 2 • • • r ℓ v ℓ , then k = ℓ and for all i ∈ {1, . . . , k}, (w i , u i ) = (r i , v i ).
Proof. Let us prove (1). Let i ≤ k be the largest integer such that rv occurs in

w i • • • w k u k . If (r, v) = (w i , u i ), there exists a non-empty word p such that prv is a prefix of w i • • • w k u k . Furthermore, by choice of i, we have |p| < |w i |. Let v ′ denote the prefix of rv which is in U . If |pr| ≤ |w i |,
then w i u i contains at least three occurrences of words of U : u i-1 , v ′ and u i , where u 0 is the prefix of w 1 u 1 which is in U . This contradicts the fact that (w i , u i ) is a return pair. If |pr| > |w i |, then we get an analogous contradiction with rv containing occurrences of v ′ , u i and v. In all cases, we get a contradiction, so we have (r, v) = (w i , u i ).

Let us now prove [START_REF] Authors Fabien | Amiénois de Mathématiques Fondamentales et Appliquées[END_REF]. The proof goes by induction on k and uses the same reasoning as for (1). Assume that k = 1 and let u ′ be the prefix of w 1 u 1 which is in U . Since w 1 u 1 = r 1 r 2 • • • r ℓ v ℓ , all words u, r 1 , . . . , r ℓ occur in w 1 u 1 . By definition of a return pair, we must have ℓ = 1. As

|u 1 | = |v 1 |, this shows that (w 1 , u 1 ) = (r 1 , v 1 ).
Assume that the result is true for k ≥ 1 and let us prove it for k + 1. With the same reasoning as for the case k = 1, we must have ℓ > 1. Since

|u k+1 | = |v ℓ |, we again have u k+1 = v ℓ . If w k+1 = r ℓ , then since w 1 • • • w k+1 = r 1 • • • r ℓ , we have |w k+1 | = |r ℓ |.
Let us consider the case |w k+1 | < |r ℓ |, the other one being symmetric. Then r ℓ v ℓ contains at least three occurrences of words of U : v ℓ-1 has a prefix, v ℓ as a suffix and u k . This contradicts the definition of a return pair, so we have (w k+1 , u k+1 ) = (r ℓ , v ℓ ), hence

w 1 • • • w k u k = r 1 • • • r ℓ-1 v ℓ-1 , which ends the proof.
Let δ x,U,1 : R *

x,U → R * x,U and δ x,U,2 : R * x,U → U * be respectively defined δ x,U,1 (w, u) = w and δ x,U,2 (w, u) = u.

Let also d x,U,1 : R * x,U → R * x,U and d x,U,2 : R * x,U → U * be respectively defined by

d x,U,1 (i) = δ x,U,1 ( Θx,U (i)) and d x,U,2 (i) = δ x,U,2 ( Θx,U (i)).
We get the following generalization of Proposition 3.7.

Proposition 7.5. Let x be a sequence in A N and let U ⊂ L(x) be a set of non-empty words with the same length. Suppose that x has infinitely many occurrences of elements of U and let i ∈ N be the first occurrence of a word of U in x. Then, 1. There exists a unique admissible sequence (w n , u n ) n belonging to RN x,U such that for all n, the word w 0 w 1 • • • w n u n is a prefix of S i (x);

2. There exists a unique admissible sequence z ∈ RN

x,U satisfying d x,U,1 (z) = S i (x).

Proof. The existence of an admissible sequence (w n , u n ) n ∈ RN x,U satisfying item 1 directly follows from the fact that x has infinitely many occurrences of elements of U . Let us show that it is unique. Let

(w ′ n , u ′ n ) n ∈ RN
x,U be another such admissible sequence and assume that n 0 is the smallest integer for which (w n 0 ,

u n 0 ) = (w ′ n 0 , u ′ n 0 ). Since both w 0 w 1 • • • w n 0 u n 0 and w ′ 0 w ′ 1 • • • w ′ n 0 u ′ n 0 are prefixes of S i (x), with |u n 0 | = |u ′ n 0 |, we must have |w n 0 | = |w ′ n 0 |. Assume without loss of generality that |w n 0 | < |w ′ n 0 |. Thus w n 0 u n 0 is a proper prefix of w ′ n 0 u ′ n 0 ,
which implies that w ′ n 0 u ′ n 0 contains at least three occurrences of words in U . This contradicts the fact that (w ′ n 0 , u ′ n 0 ) is a return pair to U . Item 2 directly follows from Item 1.

Definition 7.6. The sequence z ∈ RN

x,U of the previous proposition is called a derived sequence of x (w.r.t. U ). We denote it by D U (x).

Remark 7.7. Observe that when U is a singleton {u}, we have Rx,{u} = R x,u × {u} and D {u} (x) = D u (x).

The next result directly follows from Proposition 7.4.

Corollary 7.8. Let x ∈ A N be uniformly recurrent and let U ⊂ L(x) be a set of non-empty words with the same length. Then the derived sequence D U (x) is uniformly recurrent.

We can now state a result analogous to Proposition 3.8. We first independently define the morphism λ x,U,V in a more general setting. Lemma 7.9. Let x be a uniformly recurrent sequence in A N . Let U and V be subsets of L(x) such that all words of U have the same length ℓ U ≥ 1 and all words of V have the same length ℓ V > ℓ U . Assume that any word of V has a prefix in U . There exists a unique morphism λ x,U,V : R *

x,V → R *

x,U such that

d x,U,1 • λ x,U,V = d x,V,1 ; d x,U,2 (λ x,U,V (i) |λ x,U,V (i)|-1 ) = (d x,V,2 (i)) [0,ℓ U -1] , for all i ∈ Rx,U . (13)
In particular, we have λ

x,U,V (D V (x)) = S k D U (x),
where k ≥ 0 is the smallest integer such that the sequence d x,U,1 (S k D U (x)) has a prefix in V .

Proof. Let us first show that the morphism λ x,U,V is well defined. Let i ∈ Rx,V and let w ∈ R x,V and v ′ , v ∈ V be the words such that Θx,V (i) = (w, v) and v ′ is a prefix of wv. As any word in V has a prefix in U , there exists an admissible word

(w 1 , u 1 ) • • • (w k , u k ) ∈ R * x,U such that wv [0,ℓ U -1] = w 1 w 2 • • • w k u k
. By Proposition 7.4, this admissible word is unique. We thus define λ x,U,V (i) as the unique word

i 1 • • • i k ∈ R *
x,U such that Θx,U (i j ) = (w j , u j ) for all j such that 1 ≤ j ≤ k. Observe that this definition is equivalent to (13). Now let us prove that λ x,U,V (D V (x)) = S k D U (x). By Proposition 7.4, D U (x) is the unique sequence z ∈ Rx,U satisfying d x,U,1 (z) = S i (x), where i is the first occurrence in x of a word of U . Similarly, the sequence D V (x) is such that d x,V,1 (D V (x)) = S j (x), where j is the first occurrence in x of a word of V . The result thus directly follows from (13).

Proposition 7.10. Let x be a linearly recurrent sequence for the constant K. Let U and V be subsets of L(x) such that all words of U have the same length ℓ U ≥ 1 and all words of V have the same length ℓ V ≥ 1. Assume the following:

1. ℓ V ≥ K(K + 1)ℓ U ;
2. any word of V has a prefix in U ; 3. any return word to V has length at least ℓ V /K;

4. Ω(D U (x)) = Ω(D V (x)).
Then the morphism λ x,U,V is a primitive substitution and X λ x,U,V = Ω(D U (x)).

Proof. To prove that λ x,U,V is primitive, we show that for all (i, j) ∈ Rx,V × Rx,U , j occurs in λ x,U,V (i). Let Θx,U ( j) = (w, u) ∈ Rx,U be a return pair to U . We have |w| ≤ max{|r| | r ∈ R x,u }. Hence, by Theorem 3.11, we have |wu| ≤ (K + 1)ℓ U and wu occurs in any factor of length (K + 1) 2 ℓ U of x. Since any return pair (r, v) ∈ Rx,V is such that |rv| ≥ ℓ V K+1 K ≥ (K + 1) 2 ℓ U , we deduce from Theorem 3.11 that j occurs in λ x,U,V (i) for all i ∈ Rx,V .

With Lemma 7.9 one has λ x,U,V (D V (x)) = S k (D U (x)) for some k. As Ω(D U (x)) = Ω(D V (x)), we deduce that X λ x,U,V is included in Ω(D U (x)), which implies the equality by minimality of Ω(D U (x)) (see Corollary 7.8).

7.2 Some sufficient conditions for f : A → B to be a factor map Let σ and τ be two primitive substitutions. In this section, we give some sufficient conditions for f : A → B to be a factor map from (X σ , S) to (X τ , S). These conditions are defined on pairs of words (u, v) ∈ L(τ) × L(τ). In the next sections, we will show that they are algorithmically checkable and that if f : A → B really defines a factor map, then there should exist such a pair (u, v) where u, v have length bounded by a computable constant.

Lemma 7.11. Let x ∈ A N and y ∈ B N be uniformly reccurrent sequences and let f :

A * → B * be a coding. Assume that u ∈ f (L(x)) is a non-empty prefix of y such that for U = f -1 ({u}) ∩ L(x), one has f (R x,U ) ⊂ R y,u .
Then there is a unique coding ϕ u : R *

x,U → R * y,u such that

f • d x,U,1 = Θ y,u • ϕ u .
In particular, if f (L(x)) = L(y), then ϕ u defines a factor map from Ω(D U (x)) to Ω(D u (y)).

Proof. The existence of ϕ u directly follows from f (R x,U ) ⊂ R y,u and the fact that Θ y,u is injective (see Proposition 3.6). If f (L(x)) = L(y), then by uniform recurrence of D U (x) and D u (y) (see Proposition 3.7 and Corollary 7.8), it suffices to show that ϕ u (L(D U (x))) is included in L(D u (y)), which is direct from the definition of ϕ u .

Theorem 7.12. Let σ : A * → A * and τ : B * → B * be primitive substitutions and x ∈ A N and y ∈ B N be fixed points of σ and τ respectively. Let K σ and K τ denote some constants of linear recurrence of x and y respectively, and set K = max{K σ , K τ }. Let f : A * → B * be a coding. Assume that there exist non-empty words u, v ∈ f (L(σ )) that are prefixes of y and satisfy, for U = f -1 ({u}) ∩ L(σ ) and

V = f -1 ({v}) ∩ L(σ ), 1. |v| ≥ K(K + 1)|u|; 2. f (R x,U ) ⊂ R y,u and f (R x,V ) ⊂ R y,v ; 3. ϕ u = ϕ v ; 4. D u (y) = D v (y) and Ω(D U (x)) = Ω(D V (x)).
Then f defines a factor map from (X σ , S) to (X τ , S).

Proof. By minimality, it suffices to show that f (L(σ )) ⊂ L(τ). Since for any return word w to V in x, f (w) is a return word to v in y and |w| = | f (w)|, we have from Theorem 3.11 that |w| ≥ |v|/K. We are thus in the conditions of Proposition 3.8 and Proposition 7.10 and we can define the primitive morphisms λ y,u,v and λ x,U,V such that X λ y,u,v = Ω(D u (y)) and X λ x,U,V = Ω(D U (x)). Using Proposition 3.8, Equation (13) and Lemma 7.11, we get

Θ y,u • λ y,u,v • ϕ v = Θ y,v • ϕ v = f • d x,V,1 = f • d x,U,1 • λ x,U,V = Θ y,u • ϕ u • λ x,U,V .
DISCRETE ANALYSIS, 2022:7, 66pp.

Using Proposition 3.6 and setting ϕ = ϕ u = ϕ v , we then obtain

λ y,u,v • ϕ = ϕ • λ x,U,V .
By definition of return words, we have

L(σ ) = L(d x,U,1 (D U (x))) = L(d x,U,1 (L(λ x,U,V ))) L(τ) = L(Θ y,u (D u (y))) = L(Θ y,u (L(λ y,u,v )))
Let w be a word in L(σ ). By primitiveness, there is a positive integer n such that w occurs in d x,U,1 (λ n x,U,V (1)). Thus f (w) occurs in the word

f (d x,U,1 (λ n x,U,V (1))) = Θ y,u (ϕ(λ n x,U,V (1))) = Θ y,u (λ n y,u,v (ϕ(1))),
which belongs to the set L(Θ y,u (L(λ y,u,v ))) = L(τ) and this concludes the proof.

7.3

The sufficient conditions of Theorem 7.12 are necessary and algorithmically checkable

The aim of this section is to show that for f : A → B to be a factor map from (X σ , S) to (X τ , S), there should exist some words u, v of bounded length (with a computable bound) that satisfy the hypotheses of Theorem 7.12. We also show that these hypotheses are algorithmically checkable. This can be achieved through return substitutions.

Return substitutions for a single word

We first recall the classical notion of return substitution that has been introduced in [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF]. Observe that the notions that we develop here are closely related to the discussion made in Section 3.1. We decide to introduce them in this section because we want to extend them to the more general notion of return words to a set of words.

Proposition 7.13 ([Dur98a]). Let σ be an aperiodic primitive substitution, x ∈ A N be a fixed point of σ and u be a non-empty prefix of x. The sequence D u (x) is the admissible fixed point starting with 1 of the primitive substitution σ x,u : R * x,u → R * x,u defined by

Θ x,u • σ x,u = σ • Θ x,u . (14)
Furthermore, if K is a constant of linear recurrence of x, then D u (x) is linearly recurrent for the constant K 3 .

Definition 7.14. The morphism σ x,u of the previous proposition is called a return substitution (w.r.t. u).

From Theorem 3.11 and the definition of σ x,u we deduce the following corollary.

DISCRETE ANALYSIS, 2022:7, 66pp.

Lemma 7.20. Let σ be an aperiodic primitive substitution, x ∈ A N be a fixed point of σ . There is a recursively enumerable sequence (u n ) n≥0 of non-empty prefixes of x such that 1. |u 0 | = 1 and for every n,

K σ +1 K σ |u n | ≤ |u n+1 | ≤ (K σ + 1)|u n |;
2. there exists m, p such that p > 0, 0 ≤ m ≤ Q σp and for every i ∈ {0, 1, . . . , p -1} and every n ∈ N, σ x,u m+i+pn = σ x,u m+i .

Proof. Let us define the following sequence of derived sequences (x (n) ) n≥0 by

x (0) = D x 0 (x) x (n+1) = D 1 (x (n) ), n ≥ 0.
By Proposition 7.13, each x (n) is the fixed point starting with 1 of the return substitution σ n defined by

Θ x,x 0 • σ 0 = σ • Θ x,x 0 Θ x (n) ,1 • σ n+1 = σ n • Θ x (n) ,1 , n ≥ 0.
We recursively define the sequence (u n ) n≥0 by u 0 = x 0 and u n+1 = Θ x,u n (1)u n .

By Theorem 3.11, one has

K σ +1 K σ |u n | ≤ |u n+1 | ≤ (K σ + 1)|u n |
for each n and, using Lemma 7.16, the sequence (u n ) n≥0 is recursively enumerable. Furthermore, each u n is a prefix of x and, using Lemma 7.18, it is easily seen by induction that for all n ≥ 0, x (n) = D u n (x) and σ n = σ x,u n . By Corollary 7.15, there exists m, p such that p > 0, 0 ≤ m ≤ Q σ -p and σ m = σ m+p . This implies that x (m) = x (m+p) and so by induction on n, for all n ≥ m, x (n) = x (n+p) , Θ x (n) ,1 = Θ x (n+p) ,1 and σ n = σ n+p .

Example 7.21. We continue the previous example and ilustrate Lemma 7.20 with y the Thue-Morse sequence. Considering the notation of the proof, we have u 0 = a, u 1 = abba and

y (0) = D u 0 (y) = ν ω y,u 0 (1); y (1) = D 1 (y (0) ) = D u 1 (y) = ν ω y,u 1 (1) = 1234124312343124123412431241234312341243 • • •
Since ν y,u 0 = ν y,u 1 , we continue and set u 2 = Θ y,u 1 (1)u 1 = abbabaabba and we find (by computing Θ y (1) ,1 DISCRETE ANALYSIS, 2022:7, 66pp. and the return substitution associated with y (2) = D 1 (y (1) )):

Θ y,u 2 :            1 → abbabaabbaababbabaababba 2 → abbabaabbaababbaabbabaab 3 → abbabaabbaababbabaababbaabbabaab 4 → abbabaabbaababba ν y,u 2 :            1 → 12 2 → 34 3 → 124 4 → 3 .
As ν y,u 1 = ν y,u 2 , we have y (2) = y (1) and we conclude that when setting u n+1 = Θ y,u n (1)u n for every n ≥ 1, we have ν y,u n = ν y,u 1 for all n. 7.3.2 Return substitutions for a set of words U When x is an admissible fixed point of a primitive substitution σ , Proposition 7.13 states that the derived sequence w.r.t. any prefix u of x is again an admissible fixed point of a primitive substitution σ x,u . This result can be generalized to the case where U is not a singleton but we need to be more careful. Indeed, the existence of σ x,u uses the fact that σ (R x,u )u ⊂ R *

x,u u ∩ L(σ ), which may be not be the case when U is not a singleton.

Example 7.22. Consider the Thue-Morse substitution ν and the set U = {aa, bb}. We obtain R y,U = {aa, bb, aaba, bbab} and, for instance, ν(aa) = abab is not prefix-comparable to any word in R * y,U U . Proposition 7.23. Let σ : A * → A * be an aperiodic primitive substitution, x be an element of X σ , f : A * → B * be a coding such that f (x) is not periodic, u a non-empty word in f (L(σ )) and U = f -1 (u) ∩ L(σ ). There is a computable primitive substitution σ x,U : R *

x,U → R *

x,U such that X σ x,U = Ω(D U (x)). Furthermore, Card( Rx,U ) ≤ K σ (K σ + 1) 2 and there is a computable constant Qσ such that

Card({σ x,U | ε = u ∈ f (L(σ )),U = f -1 (u) ∩ L(σ )}) ≤ Qσ
Proof. Let us firstly define the morphism σ x,U . First observe that for any return word w to U in x, f (w) is a return word to u in f (x) and has length |w|. The sequence f (x) is obviously linearly recurrent and K σ is a constant of linear recurrence for it. As f (x) is aperiodic by assumption, Theorem 3.11 implies that any return word w to U in x satisfies

|u| K σ ≤ |w| ≤ K σ |u|. (16)
It also implies that for every (w, u) ∈ Rx,U , the word wu occurs in every word of length (K σ + 1)|wu|. This shows that Card( Rx,U ) ≤

(K σ + 1) 2 |u| min w∈R x,U |w| ≤ K σ (K σ + 1) 2 = C. (17)
DISCRETE ANALYSIS, 2022:7, 66pp.

Let k U be the smallest integer such that for every (w, u) ∈ Rx,U , both |σ k U (w)| U ≥ 2 and |σ k U (u)| U ≥ 1, where |z| U stands for the number of occurrences of words of U in z. The constant k U is obviously computable.

For any w ∈ R x,U ∪U , we set σ k U (w) = p(w)m(w)s(w)

where m(w) belongs to U and p(w)m(w) has a unique occurrence of a word of U . Now take (w, u) ∈ Rx,U . Then σ k U (wu) = p(w)m(w)s(w)p(u)m(u)s(u)

and, by Proposition 7.4, there exists a unique admissible word (w 1 , u 1 )

• • • (w ℓ , u ℓ ) in R * x,U such that w 1 • • • w ℓ u ℓ = m(w)s(w)p(u)m(u)
We set σx,U (w, u) = (w 1 , u 1 ) . . . (w ℓ , u ℓ ).

This defines an endomorphism of R * x,U and σx,U is clearly computable. We then define σ x,U as the unique endomorphism of R *

x,U satisfying σx,U • Θx,U = Θx,U • σ x,U .
It is also computable. Using equation ( 16) and the choice of k U , we then have

2 ≤ σ x,U ≤ |σ x,U | ≤ max (w,u)∈ Rx,U |σ k U (wu)| min (w,u)∈ Rx,U |w| ≤ |σ k U | max (w,u)∈ Rx,U |wu| min w∈R x,U |w| ≤ |σ k U |K σ (K σ + 1). ( 18
)
Observe that if k is the smallest integer such that σ k ≥ 2K σ (K σ + 1), then from Equation (16) and Theorem 3.11, for every (w, u) ∈ Rx,U , every word of U occurs twice both in σ k (w) and in σ k (u). This implies that k U ≤ k. In particular, k does not depend on U and, K σ being computable, so is k. The constant D = |σ k |K σ (K σ + 1) is thus also computable and does not depend on U . Together with Equation (17), this shows that

Card({σ x,U | ε = u ∈ f (L(σ )),U = f -1 (u) ∩ L(σ )}) ≤ C C(D+1) = Qσ
and the constant Qσ is computable. Now let us show that σ x,U is primitive and satisfies X σ x,U = Ω(D U (x)). By Corollary 7.8, the subshift Ω(D U (x)) is minimal. Since σ n

x,U goes to infinity when n increases, it suffices to show that each word σ n

x,U (a) belongs to L(D U (x)). Indeed, the minimality of Ω(D U (x)) will imply the primitiveness of σ x,U , hence the minimality of X σ x,U , henceforth the equality X σ x,U = Ω(D U (x)).

We proceed by induction on n. By construction of σ x,U , the result is true for n = 1. Let us suppose it is true for n -1. Let a ∈ Rx,U and let us write σ n-1

x,U (a) = a 1 a 2 • • • a ℓ ∈ L(D U (x)), with a 1 , . . . , a ℓ ∈ Rx,U .

For i ∈ {1, . . . , ℓ}, let us write Θx,U (a i ) = (w i , u i ). As a 1 a 2 • • • a ℓ belong to L(D U (x)), the word w 1 w 2 • • • w ℓ u ℓ belongs to L(x) and for all i such that 1

≤ i ≤ ℓ, w 1 w 2 • • • w i u i is a prefix of w 1 w 2 • • • w ℓ u ℓ .
We have to show that σ x,U (a 1 a 2 • • • a ℓ ) belongs to L(D U (x)). By definition of σ x,U , we have for all i ∈ {1, . . . , ℓ}, σ x,U (a i ) = b i,1 • • • b i,L i , where b i,1 , . . . , b i,L i are the unique letters in Rx,U that satisfy both conditions

1. σ k U (w i u i ) = p(w i )d x,U,1 (b i,1 • • • b i,L i )m(u i )s(u i );
2. for all j such that j ∈ {1 . . . , L i }, the word

d x,U,1 (b i,1 • • • b i, j )d x,U,2 (b i, j ) is a prefix of d x,U,1 (b i,1 • • • b i,L i )m(u i ).
Observe that for all i ∈ {1, . . . , ℓ -1}, the word w i u i is a prefix of w i w i+1 u i+1 and we have

σ k U (w i u i ) = p(w i )m(w i )s(w i )p(u i )m(u i )s(u i ) and σ k U (w i w i+1 u i+1 ) =p(w i )m(w i )s(w i )p(w i+1 )m(w i+1 )s(w i+1 )p(u i+1 )m(u i+1 )s(u i+1 ).
Consequently, we have p(u i ) = p(w i+1 ) and m(u i ) = m(w i+1 ).

In definitive, we have that σ k U (w 1 w 2 • • • w ℓ u ℓ ) belongs to L(x) and the letters b 1,1 , . . . , b 1,L 1 , . . . , b ℓ,1 , . . . , b ℓ,L ℓ are the unique letters in Rx,U that satisfy

1. σ k U (w 1 w 2 • • • w ℓ u ℓ ) = p(w 1 )d x,U,1 (b 1,1 • • • b 1,L 1 • • • b ℓ,1 • • • b ℓ,L ℓ )m(u ℓ )s(u ℓ );
2. for all i ∈ {1, . . . , ℓ}, for all j ∈ {1, L i }, the word

d x,U,1 (b 1,1 • • • b 1,ℓ 1 • • • b i,1 • • • b i, j )d x,U,2 (b i, j ) is a prefix of d x,U,1 (b 1,1 • • • b 1,ℓ 1 • • • b ℓ,1 • • • b ℓ,L ℓ )m(u ℓ ).
Hence, the word σ x,U (a 1 • • • a ℓ ) belongs to L(D U (x)), which ends the proof.

Definition 7.24. The substitution σ x,U of the previous proposition is called a return substitution (w.r.t. U ).

Example 7.25. Let us consider our running example with the Fibonacci sequence and follow the algorithm given by Proposition 7.23. Recall that we have U = {aa, ab}, Rx,U = {(ab, aa), (a, ab), (ab, ab)} and Θy,U :

     1 → (ab, aa) 2
           1 → (bbab, aa) 2 → (aa, bb) 3 → (bb, aa) 4 → (aaba, bb) .
We have |ν(aa)| U = 0 and |ν 2 (aa)| U = |ν 2 (bb)| U = 3 so that, with the notation of the proof, k U = 2

Computing the images of U ∪ R y,U under ν 2 , we get

ν 2 :            aa → abbaabba aaba → abbaabbabaababba bb → baabbaab bbab → baabbaababbabaab , hence νy,U :           
(aa, bb) → (bb, aa)(aa, bb)(bbab, aa) (aaba, bb) → (bb, aa)(aa, bb)(bbab, aa)(aaba, bb)(bbab, aa) (bb, aa) → (aa, bb)(bb, aa)(aaba, bb) (bbab, aa) → (aa, bb)(bb, aa)(aaba, bb)(bbab, aa)(aaba, bb) and ν y,U :

           1 → 23414 2 → 321 3 → 234 4 → 32141 .

It suffices to compute a finite number of return substitutions

We are now ready to state a necessary and sufficient condition for a coding to be a factor map between two minimal substitution subshifts.

Theorem 7.27. Let σ : A * → A * and τ : B * → B * be aperiodic primitive substitutions and let x ∈ A N and y ∈ B N be fixed points of σ and τ respectively. Let f : A * → B * be a coding and K = max{K σ , K τ }. There is a computable constant C such that f defines a factor map from (X σ , S) to (X τ , S) if and only if there exist non-empty words u, v ∈ f (L(X σ )) that are prefixes of y and satisfy the following conditions, where U = f -1 ({u}) ∩ L(σ ) and V = f -1 ({v}) ∩ L(τ):

1. K(K + 1)|u| ≤ |v| ≤ C; 2. f (R x,U ) ⊂ R y,u and f (R x,V ) ⊂ R y,v ; 3. ϕ u = ϕ v ;
4. τ y,u = τ y,v and σ x,U = σ x,V .

Proof. Let us first define the computable constant C. Let Q τ and Qσ be the computable constants of Corollary 7.15 and Proposition 7.23 respectively. Let also D = (K + 1) 3(K+1) 3 and let k denote the smallest positive integer such that K+1 K k ≥ K(K + 1). It is computable. We set C = (K(K + 1)) Q σ +kDQ σ Qσ . Assume that u, v ∈ f (L(X σ )) satisfy the hypotheses. By Propositions 7.13 and 7.23, we get

D u (y) = τ ω y,u (1) = τ ω y,v (1) = D v (y); Ω(D U (x)) = X σ x,U = X σ x,V = Ω(D V (x)).
Theorem 7.12 then shows that f defines a factor map from X σ to X τ . Now assume that f defines a factor map from X σ to X τ . Then by minimality of X τ and X σ , every prefix u of y belongs to f (L(σ )), satisfies f (R x,U ) ⊂ R y,u with U = f -1 ({u}) ∩ L(σ ) and defines a factor map ϕ u from Ω(D U (x)) to Ω(D u (y)) (see Lemma 7.11).

Let (u n ) n≥0 be the recursively enumerable sequence of prefixes of y given by Lemma 7.20 and let m, p be the constants given by that lemma. We consider the finite subsequence (v n ) 0≤n≤D Qσ , where v n = u m+npk for every n. By choice of k, for every n > 0, we have

K(K + 1)|v n-1 | ≤ |v n | ≤ C. For each n, we set V n = f -1 ({v n }) ∩ L(σ )
. Using Corollary 7.15 and Proposition 7.23, there exist i, j such that 0 ≤ i < j ≤ D Qσ and (σ x,V i , ϕ v i ) = (σ x,V j , ϕ v j ), which ends the proof. Since all data in Theorem 7.27 are computable from σ and τ, we obtain Theorem 1.4 as a corollary. DISCRETE ANALYSIS, 2022:7, 66pp.

Our proof follows the strategy used in [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] to show that the automorphism group of subshifts generated by primitive one-to-one constant length substitutions is virtually Z.

We then use Theorem 8.1 to show the decidability of the factorization between two minimal constant length substitution subshifts.

Observe that when dealing with one-to-one property it is important to distinguish σ : A * → A * and σ : A K → A K as there exists substitutions σ such that σ : A * → A * is not one-to-one but σ : X σ → X σ is. For example not all primitive aperiodic substitutions σ : A * → A * are one-to-one but all of them are such that σ : X σ → X σ is one-to-one (Corollary 4.3).

As taking powers of a substitution does not change the associated subshift, the next result implies that we can restrict ourselves to the case of substitutions of the same constant length. Proposition 8.2 ([Fag97b, Théorème 15]). Let σ and τ be two primitive substitutions of constant length. If (X τ , S) is aperiodic and if there exists a factor map f : (X σ , S) → (X τ , S), then there is exist k, l ≥ 1 such that |σ k | = |τ l |.

Lemma 8.3. Let σ and τ be two primitive substitutions of constant length p. Suppose there exists a factor map φ : (X σ , S) → (X τ , S) with (X τ , S) aperiodic. Then, there exists a unique i belonging to [0, . . . , p -1] such that if x belongs to σ (X σ ) then φ (x) belongs to S -i (τ(X τ )).

Proof. Let x ∈ σ (X σ ). From Corollary 4.5, there exists a unique i(x) belonging to [0, . . . , p -1] such that φ (x) belongs to S -i(x) (τ(X τ )). Let us show i(x) is constant on σ (X σ ). Observe that S j (x) belongs to σ (X σ ) if and only if j = k|σ | for some k and, in this case, we have φ (S k|σ | (x)) = S k|σ | φ (x) ∈ S -i(x) (τ(X τ )). Let y ∈ σ (X σ ). Using the minimality of (X σ , S), there exists a sequence (S k n |σ | x) n tending to y. As φ (S k n |σ | x) belongs to S -i(x) τ(X τ ) for all n, we get that φ (y) also belongs to S -i(x) τ(X τ ).

Proposition 8.4. Let σ and τ be two primitive substitutions of the same constant length and let l ≥ 0. Suppose there exists a factor map f : (X σ , S) → (X τ , S) with radius r and that (X τ , S) is aperiodic. Then, 1. There exist n and a factor map F : (X σ , S) → (X τ , S) uniquely defined by

τ l • F = S n • f • σ l , 0 ≤ n < |τ| l . ( 19
)
2. The memory t and the anticipation s of F satisfy

t ≤ max(0, L + ⌈(r -n)/|τ| l ⌉), s ≤ L + ⌈(r + n)/|τ| l ⌉,
where L = 0 if τ is one-to-one on letters and L = L τ otherwise.

Proof.

(1) By Lemma 8.3, there exists a unique n such that 0 ≤ n < |τ| l and for all x ∈ X σ , S n • f • σ l (x) belongs to τ l (X τ ).

τ l • F • S(x) = S n+|σ | l • f • σ l (x) = S |σ | l • τ l • F(x) = τ l • S • F(x),
DISCRETE ANALYSIS, 2022:7, 66pp.

Proof. For the first assertion, we observe that for all n such that N σ ,τ (g) -|τ| < n ≤ N σ ,τ (g), we have 0 ≤ N σ ,τ (g)n < |τ| and

S N σ,τ (g) • g • σ = S N σ,τ (g)-n • S n • g • σ .
We thus have N σ ,τ (S m g) = N σ ,τ (g)n, which implies, using Corollary 4.3, that Φ σ ,τ (S n g) = Φ σ ,τ (g).

Let us now prove the second assertion and consider g and h in ∆(σ , τ) such that Φ σ ,τ (g) = S k Φ σ ,τ (h) for some k. Then, one gets

S N σ,τ (g) • g • σ = τ • Φ σ ,τ (g) = τ • S k • Φ σ ,τ (h) = S k|τ| • τ • Φ σ ,τ (h) = S k|τ| • S N σ,τ (h) • h • σ .
By minimality of (X σ , S) we deduce that g = S k|τ|+N σ,τ (h)-N σ,τ (g) • h.

We now prove the third assertion. Let m, n be two positive integers. One has the following equalities:

τ m • Φ σ m ,τ m (g) = S N σ m ,τ m (g) • g • σ m , τ n • Φ σ n ,τ n • Φ σ m ,τ m (g) = S N σ n ,τ n (Φ σ m ,τ m (g)) • Φ σ m ,τ m (g) • σ n .
Thus, we get

τ n+m • Φ σ n ,τ n • Φ σ m ,τ m (g) = τ m • S N σ n ,τ n (Φ σ m ,τ m (g)) • Φ σ m ,τ m (g) • σ n = S |τ m |N σ n ,τ n (Φ σ m ,τ m (g)) • τ m • Φ σ m ,τ m (g) • σ n = S |τ m |N σ n ,τ n (Φ σ m ,τ m (g))+N σ m ,τ m (g) • g • σ n+m . As 0 ≤ |τ m |N σ n ,τ n (Φ σ m ,τ m (g)) + N σ m ,τ m (g) ≤ |τ m |(|σ n | -1) + |σ m | -1 ≤ |σ m+n | -1,
we obtain, by definition, that

N σ m+n ,τ m+n (g) = |τ m |N σ n ,τ n (Φ σ m ,τ m (g)) + N σ m ,τ m (g), hence that Φ σ n ,τ n • Φ σ m ,τ m (g) = Φ σ n+m ,τ n+m (g).
For the (4), the equality Φ n σ ,τ = Φ σ n ,τ n is a direct consequence of (3).

Proof of Theorem 8.1. Let r be the radius of f . From Proposition 8.2, one can assume, taking powers of the substitutions if needed, that |σ | = |τ|. We recall that from Lemma 8.5, Φ σ n ,τ n ( f ) = Φ n σ ,τ ( f ) is a factor map from (X σ , S) to (X τ , S). We will find F among these maps.

Observe that the quantity N n defined in the statement of Theorem 8.1 is exactly N σ n ,τ n ( f ).

Let us show that for some n > 0 the memory and the anticipation of Φ n σ ,τ ( f ) are as required. Indeed, let n ∈ N. Let t and s be, respectively, the memory and the anticipation of Φ n σ ,τ ( f ). From Proposition 8.4 one can take

t = max(0, L + ⌈(r -N σ n ,τ n ( f ))/|τ n |⌉) s = L + ⌈(r + N σ n ,τ n ( f ))/|τ n |⌉.
This shows the first three statements in the conclusion.

As there are finitely many such factor maps of radius at most 1, there exist p, q, with p < q, such that Φ p σ ,τ ( f ) = Φ q σ ,τ ( f ). From Lemma 8.5, one gets Φ q-p ( f ) = S m • f for some m.

An example in [START_REF] Coven | A characterization of the morse minimal set up to topological conjugacy[END_REF] studying the subshifts isomorphic to the Thue-Morse subshift shows that these bounds are sharp. In particular, this implies that, considering the notations of Theorem 8.1, if τ is a one-to-one primitive constant length substitution, then (X τ , S) can be a factor of (X σ , S) only if τ is defined on an alphabet of size at most #L 3 (σ ). This result is not true anymore for non-constant length substitutions. Indeed, using a slightly different definition of the substitution ξ of Theorem 3.1, we could build a primitive and non-constant length substitution ξ ′ that is injective on the letters, defined on a 24-letter alphabet and such that (X ξ ′ , S) is isomorphic to the Thue-Morse subshift (see also Section 3.3).

Decidability of the factorization

Assume that we are given two primitive substitutions of constant length σ and τ. By Theorem 8.1, to decide whether there exists a factor map between (X σ , S) and (X τ , S), it suffices to test all sliding block codes of radius L + 1. Thus, for each such sliding block code f , we have to decide whether L( f (X σ )) is equal to L(X τ ). But it can be observed that both languages are languages of automatic sequences. A result attributed to V. Bruyère in [START_REF] Fagnot | Sur les facteurs des mots automatiques[END_REF] allows to conclude as it states that the inclusion of automatic languages is decidable. We give some details below.

Background on automatic sequences

For more details concerning this section, we refer to [START_REF] Bruyère | Logic and p-recognizable sets of integers[END_REF] and [START_REF] Rigo | Formal Languages, Automata and Numeration Systems 2, Applications to Recognizability and Decidability[END_REF].

A k-automatic sequence is a substitutive sequence w.r.t. some constant substitution σ such that k = |σ |.

Let k ≥ 2 be an integer and define the function V k : N → N by V k (0) = 1 and V k (n) = k p , where p = max{r | k r divides n}, n = 0.

Let us consider the first order logical structure N, +,V k , = . A subset E ⊂ N is k-definable if there exists a formula in N, +,V k , = describing E. For example, the formula "V 2 (n) = n" describes the set {2 n | n ∈ N} as the power of 2 are exactly the fixed points of V 2 . Consider the formula φ (n) defined by (∃m)(n = m + m), then {n | φ (n)} = 2N. As φ is a formula expressed in N, +, = , this means that 2N is k-definable for all k ≥ 2.

A sequence x ∈ A N is k-definable if for all a ∈ A the set {n | x n = a} is k-definable.

Then, there exists a unique endomorphism τ : B * → B * defined by

τ • φ = φ • σ .
It is clear that τ is primitive. We say τ is an injectivization of σ .

Proposition 8.10. [BDM04] Let τ be an injectivization of the non-periodic primitive endomorphism σ . Then, (X σ , S) is conjugate to (X τ , S). Moreover τ can be chosen injective and such a τ can be algorithmically found.

Proof. The first claim is proved in [START_REF] Blanchard | Constant-length substitutions and countable scrambled sets[END_REF]. The two other claims are straightforward but we provide a proof below. Suppose there exist a and b such that σ (a) = σ (b). Let B = A \ {b}. Consider the map φ : A * → B * defined by φ (c) = c if c = b and φ 1 (b) = a. It satisfies (21) and thus defines an injectivization ζ of σ . Observe that the cardinality of the alphabet decreases. If ζ is not injective, we proceed in the same way to obtain a new substitution τ that will be an injectivization of ζ and of σ and that will be defined on a smaller alphabet. As A is finite, iterating the process, we will obtain an injectivization τ of σ that is injective. This achieves the proof.

Listing of the factors

Let σ be a primitive constant length substitution. We know from [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF] that the number of aperiodic subshift factors of (X σ , S) is finite and all such factors are conjugate to a substitution subshift (Theorem 3.1). We are not able to establish the list of its subshift factors but what precedes allows to find the exhaustive list of its constant length substitution subshift factors. Indeed, periodic factors can be easily found with the main result in [START_REF] Dekking | The spectrum of dynamical systems arising from substitutions of constant length[END_REF], see Section 6. For the aperiodic constant length substitution subshift factors, Section 8.3 allows us to suppose the substitutions are one-to-one on letters. Then, Theorem 8.1 indicates it suffices to test finitely many sliding block codes. Theorem 8.8 can decide whether or not they are conjugate one to the other. This gives the exhaustive list of aperiodic constant length substitution subshift factors.

In [CDK17] another algorithm is given but with more assumptions on the subshifts.

There are examples of primitive constant length substitution subshifts having factors that are aperiodic non-constant length substitution subshifts. Consider the subshift (X , S) generated by the primitive substitution A → ABCAA, B → AAAAA and C → AABCA. It has as a factor the non-constant length substitution subshift (Y, S) generated by A → ABCAA, B → AAAAAA and C → ABCA. Indeed, one has X = Y .

But it is now known [MY21, Theorem 22] that factors of primitive constant length substitution subshifts are isomorphic to constant length substitution subshifts. This answers a question we asked in a previous version of this work.

As a consequence, the list obtained above corresponds to the list of all subshift factors.

2. #(R X (r ′ ) ,u ) ≤ (K + 1) 3 .

For all i ∈ {1, • • • , N} let ψ i : A (r ′ ) * → B * be the morphism defined by, for (u) ∈ A (r ′ ) , ψ i ((u)) = φi (u). It defines a factor map g i : (X (r ′ ) , S) → (Y, S). Since for all i, fi = g i • h, it suffices to prove that there exist i and j, i = j, such that g i = g j . By minimality, it is enough to show that g i (x (r ′ ) ) = g j (x (r ′ ) ) for some i = j. Indeed, for all z (r ′ ) ∈ X (r ′ ) , there is an increasing sequence of integers (n ℓ ) ℓ∈N such that z (r ′ ) = lim ℓ→+∞ S n ℓ x (r ′ ) . If g i (x (r ′ ) ) = g j (x (r ′ ) ), we get by continuity that g i (z (r ′ ) ) = lim ℓ→+∞ g i (S n ℓ x (r ′ ) ) = lim ℓ→+∞ S n ℓ g i (x (r ′ ) ) = lim ℓ→+∞ S n ℓ g j (x (r ′ ) ) = g j (z (r ′ ) ).

Take u = (x (r ′ ) ) [0,r ′ ) and v = y [0,r ′ ) . From (23) we have ψ i (u) = v for all i. Hence for each return word w ∈ R x (r ′ ) ,u , the word ψ i (w) is a concatenation of return words in R y,v . This induces a non-erasing morphism λ i from R * x (r ′ ) ,u to R * y,v defined by

ψ i • Θ x (r ′ ) ,u = Θ y,v • λ i .
This morphism naturally induces a map from R Z x (r ′ ) ,u to R Z y,v that we also denote by λ i and that satisfies

g i • Θ x (r ′ ) ,u = Θ y,v • λ i .
As ψ i is a coding and |v| = r ′ , for all b ∈ R x (r ′ ) ,u we have from (1) above and (3) of Proposition 9.2 Since, from (4) of Proposition 9.2, we also have #(R Y,v ) ≤ (K + 1)K 2 (r(4K + 1) + 2r) + 2rK 2 2rK + 1 ≤ (K + 1)K 2 4K + 3 2K + K < 2(K + 1) 3 , we get #{λ i | 1 ≤ i ≤ N} < N which implies that there exist i, j, i = j, such that λ i = λ j . We set λ = λ i . Since u is a prefix of x (r ′ ) [0,+∞) , from Proposition 3.7 there exists a unique sequence z ∈ R Z x (r ′ ) ,u such that Θ x (r ′ ) ,u (z) = x (r ′ ) . We get g i (x (r ′ ) ) = g i • Θ x (r ′ ) ,u (z) = Θ y,v • λ (z) = g j • Θ x (r ′ ) ,u (z) = g j (x (r ′ ) ), which ends the proof.

Other decidability problems for morphic subshifts

In this section we mention some open problems of decidability concerning morphic subshifts. The inputs will always be the morphism φ and the endomorphism σ defining the morphic sequence or pairs of such couples (φ , σ ). belongs or not to Q. She managed to treat the multiplicatively independent case using the extension of Cobham's theorem for automatic languages she obtained in the same paper, then testing the ultimate periodicity of the languages to see whether they are equal. For the dependent case she used the logical framework of Presburger arithmetic associated with automatic sequences.

Theorem 10. 2 ([Fag97b]). Inclusion problem for morphic languages is decidable for automatic sequences.

Equality problem of morphic sequences

Given two morphic sequences x and y, is it decidable whether x = y?

For purely morphic sequences, the Equality problem of morphic sequences is called the D0L ωequivalence problem and was solved in 1984 by K. Culik II and T. Harju [START_REF] Culik | The ω-sequence equivalence problem for D0L systems is decidable[END_REF]. In [START_REF] Durand | HD0L ω-equivalence and periodicity problems in the primitive case (dedicated to the memory of G. Rauzy)[END_REF], it was shown to be true for primitive morphic sequences and that more can be said for the D0L ω-equivalence problem in the primitive case: the two (underlying) primitive substitutions have some non-trivial powers that should coincide on some cylinders if x = y.

The general case of the Equality problem remains open.

The listing of the factors

As we mentioned in Section 8.4 for constant length substitution subshifts it would be of interest to find an algorithm that, given a minimal morphic subshift, provides the list of all its (finitely many) aperiodic subshift factors. More precisely, to consider the following problem.

Computability of the set of aperiodic factor subshifts of a minimal morphic subshift. Given a minimal morphic subshift (X , S), can we compute a finite set of primitive substitutions {σ 1 , . . . , σ N } such that any aperiodic factor subshift of (X , S) is isomorphic to some (X σ n , S)?

We have seen in Section 8.4 that the answer is positive when (X , S) is a primitive constant length substitution subshift.

In the general case, from [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF] and Theorem 3.1 we know that such a set of substitutions exists but we do not have an algorithm to find them. We leave this as an open question.

Orbit equivalence

A factor map φ : (X , S) → (Y, T ) between minimal dynamical has the property that orbits are sent to orbits:

φ ({S n (x) | n ∈ Z}) = {S n (φ (x)) | n ∈ Z}) (24)
for all x ∈ X . When considering isomorphisms, this defines an equivalence relation. One can relax the conditions and consider φ is just an homeomorphism satisfying (24). In this case we say (X , S) and (Y, T ) are orbit equivalent. It is classical to observe that in this situation there exists N : X → Z such that φ (S(x)) = S N(x) φ (x).

When N has at most one point of discontinuity, we say (X , S) and (Y, T ) are strong orbit equivalent.

A remarkable result in [START_REF] Giordano | Topological orbit equivalence and C * -crossed products[END_REF] characterizes strong orbit equivalence of minimal Cantor systems by means of dimension groups. In [START_REF] Bratteli | Decidability of the isomorphism problem for stationary AF-algebras and the associated ordered simple dimension groups[END_REF] it is shown that the isomorphism of stationary simple dimension groups is decidable. This shows, as dimension groups of minimal substitution subshifts are simple and stationary [START_REF] Forrest | K-groups associated with substitution minimal systems[END_REF][START_REF] Durand | Substitutive dynamical systems, Bratteli diagrams and dimension groups[END_REF] that the strong orbit equivalence is decidable for minimal substitution subshifts. However, this result does not provide a new proof of Corollary 1.2 since for a given minimal substitution subshift (X , S), there might be other minimal substitution subshifts that are not isomorphic to (X , S), but that are in the same strong orbit equivalence class of (X , S) [START_REF] Werner | An example of Kakutani equivalent and strong orbit equivalent substitution systems that are not conjugate[END_REF]. Thus, decidability of the strong orbit equivalence for minimal substitution subshifts is not sufficient to decide the isomorphism between minimal substitution subshifts.

For the orbit equivalence we address the following question: Is orbit equivalence decidable for minimal substitution subshifts? 10.7 Beyond substitution and linearly recurrent subshifts Considering Theorem 9.1 and Theorem 1.5 we wonder whether the conclusion of the second is true under the assumptions of the first. We leave this as an open question. We know that assuming zero entropy is too weak to have such a conclusion [START_REF] Donoso | On automorphism groups of low complexity minimal subshifts[END_REF]. We have no counter example for finite topological rank subshifts (see [START_REF] Bressaud | On the eigenvalues of finite rank Bratteli-Vershik dynamical systems[END_REF] for the definition).

For tilings

All these questions could also be asked for self-similar tilings or multidimensional substitutions. The more tractable problems would certainly concern "square multidimensional substitutions" (see, for example, [ ČG86, Sal87a, Sal87b, Sal89] or, in an interesting logical context, the nice survey [START_REF] Bruyère | Logic and p-recognizable sets of integers[END_REF]). Moreover, the striking papers [START_REF] Mozes | Tilings, substitution systems and dynamical systems generated by them[END_REF] and [START_REF] Goodman-Strauss | Matching rules and substitution tilings[END_REF] should also be mentioned as they show that in higher dimension the situation is not as "simple" as it is in dimension 1.

  length and is one-to-one on the letters, and if σ k (x) and σ k (y) coincide on the indices [-m, n], then x and y coincide on the indices -m |σ k | , n |σ k | . Corollary 4.5 ([Que10, Proposition 5.20]). Let σ : A * → A * be an aperiodic primitive substitution with recognizability constant L σ . Then, {S i σ ([a]) | a ∈ A, 0 ≤ i < |σ (a)|} is a clopen partition of X σ . Moreover, if x, y ∈ X σ coincide on the indices [-n, n] with n = L σ + |σ |, then they belong to the same atom of this partition.

Lemma 5. 2 (

 2 [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] Lemma 8]). Let (X , S) and (Y, S) be subshifts and f : (X , S) → (Y, S) a dill map with cocycle c. Then, f has an implementation φ given by φ (x) = f (x) [0,c(x)-1] for all x ∈ X . DISCRETE ANALYSIS, 2022:7, 66pp.

  4. c = d • Sd for some continuous map d : X → Z having a radius bounded by |σ p σ (2r+1) | + max{L σ pσ (2r+1) , r} and such that max x∈X σ |d(x)| ≤ |σ p σ (2r+1) | max x∈X σ |c(x)|.

  d : X → Z such that c = d • Sd. For all n ∈ N, we set d(S n (x)) = c (n) (x). On the positive orbit O + (x) = {S n (x) | n ∈ N}, we trivially have c = d • Sd. Let us show that d is uniformly continuous on O + (x). By density of O + (x) in X , the function will then uniquely extend to a continuous function d on X still satisfying c = d • Sd.

.

  → (a, ab) 3 → (ab, ab) . We have |ϕ 2 (a)| U = 1 and |ϕ 3 (a)| U = 2 so that, with the notation of the proof, k U = 3. Computing the images of U ∪ R x,U under ϕ 3 , we get ab) → (ab, aa)(a, ab) (ab, ab) → (ab, aa)(a, ab)(ab, ab)(ab, aa)(a, ab) (ab, aa) → (ab, aa)(a, ab)(ab, ab)(ab, aa)(a, ab) and finally ϕ x,U : Example 7.26. Let us consider our running example with the Thue-Morse sequence and follow the algorithm given by Proposition 7.23. Recall that we have U = {aa, bb}, Ry,U = {(aa, bb), (bb, aa), (aaba, bb), (bbab, aa)} and Θy,U :

  if φ (a) = φ (b) then σ (a) = σ (b).

  |λ i (b)| ≤ K(|u| + 2r ′ )

  By Corollary 4.5, the function m : X → {0, . . . , |σ k |} is continuous and has radius at most L σ k + |σ k |, hence d has radius at most |σ k | + max{L σ k , r}. The inequality

	max x∈X σ	|d(x)| ≤ |σ k | max x∈X σ	|c(x)|
	directly follows from (12).

DISCRETE ANALYSIS, 2022:7, 66pp.

Walnut is a software program allowing to answer questions or compute quantities related to automatic sequences.DISCRETE ANALYSIS,

2022:7, 66pp.

If r < N n ≤ |τ n |r for all large enough n, then the anticipation of F is bounded by L and its memory by L + 1;

If N n ≥ |τ n |r for all large enough n, then the anticipation of F is bounded by L and its memory by L + 2;

f = F • S n for some n ∈ Z.DISCRETE ANALYSIS, 2022:7, 66pp.

Ref. ANR-13-BS02-0003

Ref. SCO/AD/FR/SOR/2015/2019880 DISCRETE ANALYSIS, 2022:7, 66pp.

Acknowledgments

The authors would like to thank Samuel Petite for many interesting discussions. This research is supported by the ANR project 2 "Dyna3S" as well as by a Hubert Curien Partnership 3 (PHC) "Tournesol".

* Supported by ANR project "Dyna3S" and by Hubert Curien Partnership "Tournesol" 34212UG † Supported by Hubert Curien Partnership "Tournesol" 34212UG

Proof of Theorem 1.1 and Corollary 1.2 for the periodic case If (X , S) is periodic with minimal period p then it suffices to test whether q divides p to decide whether (Y, S) is a factor of (X , S). Indeed, if (Y, S) is a factor of (X , S), then both p and q are periods of (Y, S) and thus so is gcd(p, q). As q is the minimal period of (Y, S), we get q = gcd(p, q), hence p is a multiple of q. Respectively, if q divides p, then we may write X = {x, Sx, . . . S nq-1 x} for some x ∈ X . Then the map f : X → Y defined by f (S i x) = S i mod q y is a factor map from (X , S) to (Y, S). Now assume that (X , S) is not periodic. Then the following result allows to conclude for the proofs of 1.1 and Corollary 1.2 in this periodic context. Theorem 6.3 ([DG19]). Let (X , S) be an aperiodic uniformly recurrent morphic subshift and p be a positive integer. It is decidable to check whether p belongs to P(X , S) or not.

Proof of Theorem 1.3 for the periodic case Like in the previous case, we split the proof depending on whether (X , S) is periodic or not. If (X , S) is periodic with minimal period p then, as explained above, q should divide p and, writing X = {x, Sx, . . . S nq-1 x}, the map f : X → Y defined by f (S i x) = S i mod q y is a factor map from (X , S) to (Y, S). Let us show that p -1 is a radius of f . We claim that all words x (n-p,n+p) , n ∈ {0, 1, . . . , p -1} are pairwise distinct. Indeed, if x (n-p,n+p) = x (m-p,m+p) for some 0 ≤ m < n < p, then for 0 ≤ k < p, we obtain

By p-periodicity, we deduce that nm is a period of (X , S), which contradicts the minimality if p. It is then clear that the sliding block code f defines f where f is defined by f (x [n-p,n+p] ) = y n mod q , 0 ≤ n < p. Now if g : (X , S) → (Y, S) is another factor map, there exists i ∈ {0, . . . , q -1} such that g(x) = S i y = S i ( f (x)). Since both f and g are factor maps, this implies that g = S i • g. Now assume that (X , S) is not periodic. Thus the primitive and proper substitution σ is aperiodic. Let us recall the following lemma (Proposition 3 and Lemma 10 in [START_REF] Durand | Decidability, arithmetic subsequences and eigenvalues for substitution subshifts[END_REF] or Lemma 28 in [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF]). Lemma 6.4. Let σ : A * → A * be an aperiodic and left proper substitution with incidence matrix M and let p be an integer. The following properties are equivalent: 1. p belongs to P(X σ , S) ; Corollary 7.15. Let σ be an aperiodic primitive substitution and x ∈ A N be a fixed point of σ . We have

The following three lemmas are clear from [START_REF] Durand | A characterization of substitutive sequences using return words[END_REF], but not exactly stated as follows. We give the proofs as they are a key point of one decision procedure.

Lemma 7.16. Let σ be an aperiodic primitive substitution, x ∈ A N be a fixed point of σ and u be a non-empty prefix of x. The morphisms σ x,u and Θ x,u are algorithmically computable. Sketch of the algorithm. Since x is a fixed point of σ , the word u is a prefix of σ (u) and there is an integer n such that u occurs at least twice in σ n (u). We define Θ x,u (1) as the shortest non-empty word w such that wu is a prefix of σ n (u). We then compute σ (Θ x,u (1)). By construction, the word σ (Θ x,u (1))u is a prefix of x and has u as prefix. By Proposition 3.6, there exist some unique words w 1 , w 2 , . . . ,

We add some letters 2, 3, . . . , ℓ ≤ k to R x,u and define Θ x,u on {1, . . . , ℓ} by {Θ x,u (i) | 1 ≤ i ≤ ℓ} = {Θ x,u (1), w 1 , . . . , w k } and in the order of occurrences of the words w i 's in σ (Θ x,u (1)). This also defines the image σ x,u (1). We iterate the process on the added letters. The algorithm stops when no new return word appears when we compute the images σ (Θ x,u (i)) for i ∈ R x,u .

Example 7.17. Let ν be the Thue-Morse substitution and y be the Thue-Morse sequence. Let us follow the algorithm described above to compute the return substitution ν x,a .

1. We have ν 2 (a) = abba, so we set Θ y,a (1) = abb.

2. We compute ν • Θ y,a (1) = ν(abb) = abbaba. The return words ab and a do not belong yet to R y,a so we add the letters 2 and 3 to R y,a and set Θ y,a (2) = ab, Θ y,a (3) = a and ν y,a (1) = 123.

3. We compute ν • Θ y,a (2) = ν(ab) = abba. The return words abb and a already belong to R y,a so we do not add any letter to R y,a . We set ν y,a (2) = 13.

4. We compute ν • Θ y,a (3) = ν(a) = ab. The return word ab already belongs to R y,a so we do not add any letter to R y,a . We set ν y,a (3) = 2.

5. No more letters have to be checked so the algorithm stops and returns Θ y,a :

Lemma 7.18. Let x be an aperiodic uniformly recurrent sequence. If u is a non-empty prefix of x, v is a non-empty prefix of D u (x) and w = Θ x,u (v)u, then w is a non-empty prefix of x, D w (x) = D v (D u (x)) and

Furthermore, if x is a fixed point of a primitive substitution σ and if τ is the return substitution σ x,u , then

DISCRETE ANALYSIS, 2022:7, 66pp.

Proof. The first part of the statement is exactly [Dur98a, Proposition 2.6 (5)] and Equation (15) directly follows from the definition of these maps. To alleviate notation, we set y = D u (x). By Proposition 7.13, we have the equalities

from which we deduce

Using Proposition 3.6, we finally get σ x,w = τ y,v .

Example 7.19. We continue the previous example and ilustrate Lemma 7.20 with y the Thue-Morse sequence. We have

If we set τ = ν y,a and compute Θ z,1 and τ z,1 following Lemma 7.16, we get

a = abba, we find

and we indeed check that ν y,u 1 = τ z,1 and Θ y,u 1 = Θ y,a • Θ z,1 .

DISCRETE ANALYSIS, 2022:7, 66pp.

Proof of Theorem 1.1 and Corollary 1.2

We deduce Theorem 1.1 from Theorem 3.1, Lemma 4.9, Proposition 4.11 and Theorem 7.27.

To prove Corollary 1.2, observe that one can decide whether there exist two factor maps f : (X σ , S) → (X τ , S) and f : (X τ , S) → (X σ , S). And thus that f • g : (X σ , S) → (X σ , S) is an endomorphism. But it is known from [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF] (see also [Cov72] for binary alphabets) that endomorphisms of minimal substitution subshifts are isomorphisms. This is what is called the coalescence property. This shows Corollary 1.2.

The constant length case

In this section we look in more details to the factor maps between constant length substitution subshifts and in particular to the maps F n defined by (7). The main theorem in [CDK17] shows that when there exists a factor map f : (X σ , S) → (X τ , S) between aperiodic minimal one-to-one constant length substitution subshifts then there exists another factor map g : (X σ , S) → (X τ , S) given by a sliding block code of radius 1. In [START_REF] Coven | Computing automorphism groups of shifts using atypical equivalence classes[END_REF] the result is improved for automorphism f : (X σ , S) → (X σ , S) with some extra assumptions. In this case g can be chosen with memory 0 and anticipation 1.

In this section we improve these results by removing the assumption of injectivity and the additional assumptions in [START_REF] Coven | Computing automorphism groups of shifts using atypical equivalence classes[END_REF] and by giving a link between f and g. This is Theorem 8.1.

Factor maps between constant length primitive substitution subshifts

We say that a substitution σ : A * → A * is one-to-one on letters when σ (a) = σ (b) whenever a = b. When σ has constant length, it is clear that if σ : A * → A * is one-to-one on letters then σ : A * → A * is one-to-one and σ n is one-to-one for all n ≥ 1.

Theorem 8.1. Let σ and τ be two primitive substitutions of constant length. Suppose there exists a factor map f : (X σ , S) → (X τ , S) of radius r with (X τ , S) aperiodic. Let

and, set L = 0 if τ is one-to-one on letters and L = L τ otherwise.

Then, there exists a factor map F : (X σ , S) → (X τ , S) such that:

1. If r ≥ N n for all large enough n, then the anticipation of F is bounded by L + 1 and its memory by L + 1; one obtains that F is a factor map between (X σ , S) and (X τ , S).

(2) We know from the Curtis-Hedlund-Lyndon theorem that F is a factor map if and only if there exist s,t ≥ 0 such that for all x, F(x) 0 only depends on x [-t,s] .

Let s,t ≥ 0 and x ∈ X σ . Then the word σ l (x) [-t|σ | l ,s|σ | l ] only depends on x [-t,s] . Thus, it is also the case of the words f

Let L l = 0 if τ is one-to-one on letters and L l = L τ l otherwise. From Corollary 4.4,

, and thus, from Proposition 4.8,

only depends on x[-t, s]. Hence it is sufficient that s and t satisfy s -L 1 -(r + n)/|τ| l ≥ 0 and -t + L + (rn)/|τ| l ≤ 0, which ends the proof.

Consider ∆(σ , τ) the set of factor maps from (X σ , S) to (X τ , S). From Proposition 8.4 there is a map Φ σ ,τ from ∆(σ , τ) to itself defined by

for some uniquely defined integer

Lemma 8.5. Let σ and τ be two primitive substitutions of the same constant length. Suppose (X τ , S) is non-periodic. Let g, h ∈ ∆(σ , τ). We have the following properties.

h) for some k then g = S l • h for some l.

3. For all m, n > 0 one has

4. For all n > 0, Φ n σ ,τ = Φ σ n ,τ n .

Theorem 8.6 ([B 60, Cob72]). Let k ≥ 2 and A be a finite alphabet. A sequence x ∈ A N is k-automatic if and only if it is k-definable.

Theorem 8.7. [B 60] The theory N, +,V k , = is decidable, that is, for each closed formula expressed in the first order logical structure N, +,V k , = , there is an algorithm deciding whether it is true or not.

We refer to [START_REF] Charlier | Enumeration and decidable properties of automatic sequences[END_REF]Cha18] for expository texts on this decision procedure. In particular, it has been implemented in the software Walnut [START_REF] Mousavi | Automatic theorem proving in walnut[END_REF] and can be downloaded from www.cs.uwaterloo.ca/shallit/papers.ht

As a consequence of Theorem 8.7 the following theorem is proved in [START_REF] Fagnot | Sur les facteurs des mots automatiques[END_REF] and attributed to Bruyère.

Theorem 8.8. Let x and y be two k-automatic sequences. It is decidable whether L(x) is included in L(y).

Decidability of the factorization for constant length primitive substitution subshifts

Let us prove that the factorization is decidable for aperiodic subshifts generated by primitive constant length substitutions. Let σ and τ be two primitive substitutions of constant length. Let us describe the algorithm testing whether there exists a factor map F from (X σ , S) to (X τ , S).

Algorithm: Test all sliding block codes of radius L + 1 using the algorithm given by Theorem 8.8 where L is defined in Theorem 8.1.

Let us give some explanations. First we check whether (X τ , S) is periodic or not as this is decidable [Hon86, Hon08, ARS09]. If (X τ , S) is periodic then one can decide whether there exists a factor map (Section 6). Suppose (X τ , S) is non-periodic. One has first to test whether σ and τ have some (non-trivial) power of their length that are equal. This is clearly decidable. If they do not, then there is no factor map (Proposition 8.2). If they do, then Theorem 8.4 ensures that it suffices to consider sliding block codes of radius L + 1. There are finitely many such maps. Thus it suffices to test each of them. Let f be such a sliding block code of radius L + 1. To test whether it defines a factor map from (X σ , S) to (X τ , S) is equivalent to prove that L( f (x)) = L(y) where x and y are respectively fixed points of σ and τ. Due to Theorem 8.8 it suffices to prove that f (x) is an automatic sequence. This is clear using the substitutions on the blocks of radius L + 1 (see Section 4.2). Thus we proved the following theorem.

Theorem 8.9. Let (X , S) and (Y, S) be two minimal constant length substitution subshifts. It is decidable to know whether there exists a factor map between these two systems.

How to get rid of the injective substitution assumption

The proof of Theorem 8.9 involves sliding block codes of radius L + 1 where L = 0 if the substitutions are one-to-one. In this section, we show one can always suppose the substitutions are one-to-one, up to isomorphism. This will reduce the number of sliding block codes to test and the size of the involved alphabets. Hence, this improves the algorithm to decide the factorization.

Let σ : A * → A * be a primitive substitution such that (X σ , S) is not periodic. Let B ⊂ A and φ : A * → B * be a coding such that: DISCRETE ANALYSIS, 2022:7, 66pp.

Factor maps between linearly recurrent subshifts

In this section we prove Theorem 1.5. Given a dynamical system (X , T ), Aut(X , T ) will stand for the group of automorphisms of (X , T ), that is the group of continuous and bijective maps defined on X and commuting with T . In [START_REF] Donoso | On automorphism groups of low complexity minimal subshifts[END_REF] (see also [CK16]) has been proved the following result.

Theorem 9.1. Let (X , S) be an aperiodic minimal subshift. If

then Aut(X , S) is virtually Z, i.e., the quotient of Aut(X , S) by the group generated by the shift map is a finite group.

The previous result means that there exist finitely many elements f 1 , . . . , f n of Aut(X , S) such that for any f ∈ Aut(X , S) there exist m ∈ Z and i ∈ {1, . . . , n} satisfying f = f i • S m . In this section we extend this result to factor maps but in the restrictive context of the linearly recurrent subshifts (which are known to have linear complexity). Observe that for factor maps we loose the group structure which is a key argument in both papers [START_REF] Donoso | On automorphism groups of low complexity minimal subshifts[END_REF] and [CK16].

Theorem 1.5 includes answers to questions stated in [START_REF] Salo | Block maps between primitive uniform and pisot substitutions[END_REF] but in the more general context of factor maps. The proof is inspired by the one of Theorem 1 in [START_REF] Durand | Linearly recurrent subshifts have a finite number of non-periodic subshift factors[END_REF] and uses the following result. Proposition 9.2. Let (X , S) be an aperiodic linearly recurrent subshift for the constant K and (Y, S) be one of its aperiodic factors given by a factor map of radius r. We have the following.

1. For all n, p Y (n) ≤ K(n + 2r).

2. For all n, every word of L n (Y ) occurs in every word of L (K+1)n+2rK (Y ).

For all v ∈ L(Y ) and all w

Proof. Let f be a block map with radius r defining a factor map from (X , S) to (Y, S).

(1) We have L n (Y ) = f (L n+2r (X )) so the result follows from Theorem 3.11.

(

(3) Let v ∈ L(Y ). For any return word w ∈ R Y,v , there exist v 1 , v 2 ∈ f -1 ({v}) and w ′ ∈ L(X ) such that v 1 is a prefix of w ′ v 2 , w ′ v 2 contains only two occurrences of words in f -1 ({v}) and f (w ′ v 2 ) = wv. DISCRETE ANALYSIS, 2022:7, 66pp.

In particular w ′ is a subword of a return word in R X,v 1 and, using Theorem (4) Let v ∈ L(Y ) with |v| ≥ 2rK +1. From (3), the length of return words to v are less than K(|v|+2r). Let w be a word of length (K + 1)K(|v| + 2r) + 2rK. From (2) all return to v appear in w. Hence, from (3) the number of return words to v is bounded by

We are now ready to Prove Theorem 1.5.

Proof of Theorem 1.5. Let A and B be the alphabets of X and Y respectively. Consider the constant N = 1 + (2(K + 1)) 36(K+1) 5 and suppose that for all i ∈ {1, . . . , N}, f i : (X , S) → (Y, S) is a factor map. It suffices to show that there exist i = j and k ∈ Z such that f i = S k • f j . By the Curtis-Hedlund-Lyndon Theorem there exists a positive integer r such that for all i ∈ {1, • • • , N} there is a sliding block code φ i : A 2r+1 → B satisfying

Let us fix some x ∈ X and some y ∈ Y . By Proposition 9.2, all return words to y [0,2r) have length at most 4rK. Thus for all i ∈ {1, . . . , N}, there exists some integer k i satisfying 0 ≤ k i ≤ 4rK and such that (S k i f i (x)) [0,2r) = y [0,2r) .

We then define the factor map fi : (X , S) → (Y, S) by fi (x ′ ) = S k i f i (x ′ ) for all x ′ ∈ X . Thus fi has a radius of 4rK + r: there exists a sliding block code φi : A 2r(4K+1)+1 → B such that

Furthermore, by choice of k i we have for all i

We will now show that there exist i and j, i = j, such that fi = f j , hence f i = S k j -k i f j . We fix r ′ = r(4K + 1) and we consider the block representation X (r ′ ) of X which is isomorphic to X through the isomorphism h associated with the sliding block code φ :

Observe that, from Theorem 3.11, for all u ∈ L(X (r ′ ) ) we have:

1. for all words v ∈ R X (r ′ ) ,u , 1 K (|u| + 2r ′ ) ≤ |v| ≤ K(|u| + 2r ′ ), and, DISCRETE ANALYSIS, 2022:7, 66pp.

Factor maps for subshifts generated by automatic sequences

Fixed points of constant length substitutions are a special kind of automatic sequences. Even if Theorem 1.3 applies to minimal automatic subshifts, to have a better radius for factor maps it would be interesting to know whether Theorem 8.1 remains valid for minimal automatic subshifts. This would make more efficient the algorithm to find its automatic subshift factors.

The non-minimal case

We recall that primitive substitutions, as well as uniformly recurrent sequences, generate minimal subshifts. Is it possible to extend the main results stated in the introduction (Theorem 1.1, Corollary 1.2, Theorem 1.3 and Theorem 1.4) to (non-uniformly recurrent) morphic sequences? Let us focus on Theorem 1.4. Extension to the non-minimal case, in this case, is equivalent to the decidability problem of the equality problem of morphic languages.

Equality problem of morphic languages. Given two morphic sequences x and y, is it decidable whether L(x) = L(y)? Indeed, suppose (X , S) and (Y, S) are two morphic subshifts generated by, respectively, the morphic sequences x and y, and let φ : A Z → B Z be a factor map. It is easy to show that φ is a factor map from (X , S) to (Y, S) if and only if L(φ (x)) is equal to L(y).

If we do not ask the factor map φ : (X , S) → (Y, S) to be onto, then it is equivalent to the inclusion problem of morphic languages.

Inclusion problem of morphic languages. Given two morphic sequences x and y, is it decidable whether L(x) is included in L(y)?

Of course the Inclusion problem implies the Equality problem, both problems being open.

Morphic languages

Let us consider the Inclusion and Equality problems.

In [START_REF] Fagnot | On the subword equivalence problem for morphic words[END_REF], positive answers are given to the Inclusion problem for some families of purely morphic sequences, one for those defined on a 2-letter alphabet and another one for those generated by primitive substitutions under some mild assumptions. Observe that Theorem 1.4 solves this problem for uniformly recurrent morphic sequences as inclusion of languages of uniformly recurrent sequences implies the equality.

Theorem 10.1. Inclusion problem for morphic languages is decidable for uniformly recurrent morphic sequences.

Proof. It is left as an exercise.

Both problems are open if we do not assume uniform recurrence. Nevertheless, Fagnot [START_REF] Fagnot | Sur les facteurs des mots automatiques[END_REF] solved both decidability problem for automatic sequences, without the assumption of uniform recurrence. She considered two cases: the multiplicative dependence and independence of the dominant eigenvalues p and q (which are integers in these settings) of the underlying substitutions, that is whether log p/ log q DISCRETE ANALYSIS, 2022:7, 66pp.