Semicocycle discontinuities for substitutions and reverse-reading automata

In this article we define the semigroup associated to a substitution. We use it to construct a minimal automaton which generates a substitution sequence u in reverse reading. We show, in the case where the substitution has a coincidence, that this automaton completely describes the semicocycle discontinuities of u.


Introduction
Automatic sequences are codings of constant length-substitutional fixed points.The latter generate discrete dynamical systems whose study is ubiquitous in the literature.Cobham [3] showed that an equivalent definition of an automatic sequence is that it is a sequence generated by a finite automaton with output (Definition 1).To generate u n , the n-th entry of the sequence, one feeds the base-expansion (n) of n into the automaton, to arrive at a final state, and u n is the coding, or output, of the final state.One has to set the order of reading of (n) , i.e., whether one reads starting with the most significant digit, in which case the reading is called direct, or starting with the least significant digit, in which case the reading is called reverse.A fixed automatic sequence can be generated in either direct or reverse reading, but in general, generating automata will be different.See Section 2 for definitions and background.
The relevance of the (minimal) direct-reading automaton in dynamics has long been understood.Indeed, Cobham's proof tells us that we can define this automaton directly in terms of the substitution rule.Furthermore, this direct-reading automaton also enables us to locate the irregular fibres of the maximal equicontinuous factor [4], and this is useful as these fibres drive the interesting dynamics in the shift.Cobham defined automatic sequences in terms of direct reading automata, and he did not consider reverse-reading automata.Eilenberg identified that reverse-reading automata gave information about the -kernel of a sequence u, that is, the set of all subsequences of u whose indices run along an arithmetic progression and such that its difference is a power of .Furthermore, the cardinality of the -kernel is also the size of a minimal automaton that generates u in reverse reading (Theorem 6).The reverse-reading automaton has been used extensively to generate algebraic characterisations of automatic sequences, in particular when their entries belong to a field, [2] or even sometimes a ring [6].However there has been little or no use of the reverse-reading automaton in dynamics.This paper arose out of a desire to understand the dynamical meaning of the -kernel, and also to understand what the reverse-reading automaton tells us about the dynamical system generated by u.For a special class of shift-dynamical systems, namely the Toeplitz shifts (see Section 3.2), the -kernel has a familiar dynamical interpretation.By Theorem 17, Toeplitz shifts are guaranteed to contain at least one Toeplitz sequence, i.e., a sequence which is constructed by filling in entries of one arithmetic progression of indices at a time, with a constant symbol, in a way such that eventually the sequence is completely specified.The first such sequences were studied by Oxtoby [12], who defined a Toeplitz sequence that generates a minimal shift supporting two invariant measures.
At the other end, Jacobs and Keane [8], introduced what is possibly the simplest nontrivial Toeplitz sequence, the well-known one-sided period-doubling sequence.It is a substitutional fixed point, and generates a uniquely ergodic shift which has very little "irregularity" as follows.Let (X, σ) be a Toeplitz shift, where X ⊂ A I with A a finite set, and where I equals Z or N 0 .Not all elements in X are Toeplitz sequences.How far away a sequence (x n ) n∈I is from being Toeplitz is a function of the cardinality of the set of discontinuities of the semicocycle that it defines; see Definition 18.The discontinuities of the semicocycle are strongly linked to the values that it takes on arithmetic progressions; see Lemma 19.In Example 20 we show that the one-sided period-doubling sequence defines a continuous semicocycle on N 0 , but any of its extensions to a two-sided sequence defines a semicocycle on Z with only one discontinuity, at n = −1.In general, Toeplitz shifts will contain non-Toeplitz elements whose semicocycle has far more discontinuities; see Example 14.
Williams [15] carried out the first systematic study of Toeplitz shifts.Given a point x = (x n ) in X, she partitions its indices up into two parts, the periodic part Per(x), and the aperiodic part Aper(x) (see Section 3.3).The periodic part is the set of indices that have been filled, with a constant symbol, using arithmetic progressions.The aperiodic part is what is left over.Thus, if x is actually a Toeplitz sequence, then Aper(x) is empty, and the semicocycle is continuous.The existence of a large Aper(x) is what makes the dynamics more complex, e.g., it can lead to the existence of several invariant measures, measurable but not continuous eigenvalues, positive entropy, and so on.
Our main result is Theorem 22.It tells us that given an automatic sequence u which belongs to a Toeplitz shift, the reverse-reading automaton which generates u gives us complete information about the indices which belong to Aper(u), and hence the set of discontinuities of the semicocycle defined by u.To prove Theorem 22, we first construct a suitable automaton that generates u in reverse reading, in Theorem 12.This automaton is minimal, so it can also be obtained using Eilenberg's classic construction, but we label the states in a different manner using the semigroup of the corresponding substitution (Definition 9).
Finally, consider a formal power series f (x) whose coefficients form an automatic sequence.Reverse-reading automata are instrumental in expressing f (x) as either a root of a polynomial, as given by Christol's theorem, or as a diagonal of a higher dimensional rational function, as given by Furstenberg's theorem; for an exposition of either result, see [1].In future work, we will use the reverse-reading automaton that we have constructed to translate certain dynamical features of substitution shifts to algebraic properties of their annihilating polynomials.

Preliminaries
Let N and N 0 denote the positive integers and the non-negative integers respectively.Given n ∈ N, there is a unique expression n = j−1 i=0 n i i , where each n i ∈ {0, . . ., − 1} and n j−1 = 0; we call this the canonical base-expansion of n and we denote it as (n) := n j−1 . . .n 0 •.Note the use of the radix point "•", which indicates that n 0 is the least significant digit.We define the canonical base-expansion of 0 to be (0) := 0. Negative integers also have a baseexpansion, which we define as follows.If the natural number n satisfies (n) = n j−1 . . .n 0 •, then let w ∈ {0, . . ., − 1} j denote the unique word of length j such that where addition is performed mod and with carry from right to left.With this, we define the canonical base-expansion of the negative integer −n as the sequence  Let A be a finite alphabet.In this article, the indexing set Next we define some finite-state automata with which we will work.We gently modify existing definitions in [1] to allow the generation of two-sided sequences (see Definition 2).
Definition 1.A deterministic finite automaton (DFA) is a 4-tuple M = (S, Σ, δ, S 0 ), where S is a finite set of states, S 0 ⊆ S is a set of initial states, Σ is a finite input alphabet, and δ : S × Σ → S is the transition function.
The function δ extends in a natural way to the domain S × Σ * , where Σ * is the set of all finite words on the alphabet Σ.One way to do this is to define δ(s, recursively.Here, the way we have written things, we first feed n 0 , then n 1 , etc, so that we start with the least significant digit, the automaton is then called a reverse-reading automaton.However, we can also extend δ to words by starting with the most significant digit n k , and ending with n 0 .In other words we can also define δ(s, n k , then the automaton is a direct-reading automaton.In this article the automata that we investigate are reverse reading automata. If n ∈ −N, recall that its expansion (n) = ( − 1) n j • • • n 0 • is an infinite sequence which must eventually equal ( − 1)•.For negative integers, instead of working with the canonical baseexpansion, we shall see that we can set things up to work with the finite word ( − 1) This is because we will feed the transition function δ with base-expansions of integers, and the function δ only accepts finite words from Σ * .We will arrange it so that a "finite" expansion of a negative integer is sufficient for our needs, by ensuring that the appropriate edge labelled − 1 is a loop.
Note that in general a sequence generated by a DFAO in reverse reading will generally not equal the sequence generated by the same DFAO in direct reading.Also, an automatic sequence generated by a DFAO in direct reading can be generated by a, possibly different, DFAO in reverse reading, and vice versa.To transition from a direct-reading to a reading-reverse automaton one first reverses all edges in the given automaton, see for example [1,Theorem 4.3.3].The resulting automaton may be non-deterministic, i.e., there could be multiple edges labelled i emanating from one state, and in this case the automaton needs to be determinised [1,Theorem 4.1.3 ].However reversing the automaton reading can blow up the state size of the automaton exponentially in ; see for example the difference in state size in Figures 1 and 3 which are the direct and reverse reading automata that generate the same sequence in those examples.
Given a finite alphabet A, let A * denote the monoid of words on A, and A + ⊂ A * denote the set of nonempty words on A. Let θ : A * → A + be a morphism, also called a substitution.
Note that the image of any letter is a non-empty word.We will abuse the notation and write θ : A → A + .Let I = N 0 or Z, according to whether we are to construct a one-sided or twosided sequence.Using concatenation, we extend θ to A I .The finiteness of A guarantees that θ-periodic points, i.e., points x such that θ k (x) = x for some integer k ≥ 1, exist.A substitution is primitive if there exists an integer n ≥ 1 such that for all a, b ∈ A, the letter a occurs in In applications to dynamics we assume that θ is primitive and aperiodic, but our automata results do not require this constraint.
The following theorem by Cobham [3] connects automatic sequences to one-sided, right-infinite substitution fixed sequences.A coding is a map ω : A → B; it extends to a map τ : A I → B I .
Theorem 3 (Cobham's theorem).A sequence u = (u n ) n≥0 is -automatic in direct reading using if and only if u is the image under a coding of a right-infinite fixed point of a substitution of length .
Furthermore, Cobham's theorem gives us a constructive way of moving between automatic sequences and codings of substitutional fixed points.
Let θ be a length-substitution.We write θ(a) = θ 0 (a) • • • θ −1 (a); with this notation we see that for each 0 ≤ i ≤ − 1, we have a map θ i : A → A where, for each a ∈ A, θ i (a) is the i-th letter of the word θ(a).The map θ i can be visualised as the i-th column of letters if we stack the substitution words in an |A| × -array.
We will assume that our substitution is in simplified form, i.e. θ 0 and θ −1 are each idempotents in A A , i.e, θ 2 0 = θ 0 and θ 2 −1 = θ −1 .The benefit of working with idempotent first and last columns is as follows.Given a letter a ∈ A, the sequence of words (θ n (a)) n≥0 converges to a right-infinite θ-periodic sequence, i.e., a sequence u such that θ k (u) = u.However it can happen that for small values of n, the word θ (n+1)k (a) is not an extension of θ nk (a), i.e., we have to wait a little until convergence kicks in.The assumption that θ 0 is an idempotent guarantees both that θ (n+1)k (a) extends θ nk (a) for each n ≥ 1, and also that k = 1, so that we only need concern ourselves with θ-fixed points.Similarly, the assumption that θ −1 is an idempotent guarantees fast convergence to left-infinite θ-fixed points.The assumption that a substitution is simplified makes for simpler algebraic descriptions of a substitution, eg, see [9].The fact that A is finite and the pigeonhole principle imply that there always exists a power of θ which is in simplified form.Finally, if θ 0 and θ −1 are idempotents, then we will be able to reduce the base-expansion ( − 1)w• of a negative integer n to the finite expansion ( − 1)w•, and merely feed this finite expansion in to the automaton to generate u n .Similarly if n is a natural number, the same entry u n is obtained if we pad (n) with leading zeros.Also, we can then lightly strengthen the statement of Cobham's theorem, so that it concerns bi-infinite fixed points of substitutions; this is desired as we work with two-sided and hence invertible shifts.From a dynamical perspective, as we work with primitive aperiodic substitutions, the dynamical system generated by θ equals that generated by any of its powers, so there is no loss of generality in assuming that θ is in simplified form.
We can extend the definition of θ i for 0 ≤ i ≤ − 1 for a simplified substitution to define θ n where n ∈ Z as follows.
We can also extend the notion of a column map applied to a sequence denoted by a bold θ n : Given a substitution in simplified form, there is a very natural direct reading DFA that will generate a one-sided fixed point u, given by the proof of Cobham's theorem [3].Its initial state is the first letter u 0 of u, its states are labelled by letters in A, and its transition function is given by the maps θ i , as δ(a, i) := θ i (a).Moreover, although the classical literature concerning automata deals with one-sided sequences, it is straightforward to modify the statements to generate two-sided fixed points.Namely, to generate the entry u −n of the left-infinite fixed point reading, but starting at the initial state u −1 .We summarise some of the information that we will need in the following lemma; its proof can be found in [3] for the case when n ∈ N 0 , and a simple generalisation works for n ∈ −N.If u is a two-sided fixed point, we will call u −1 • u 0 its seed.
Lemma 4. Let θ be a length-substitution, in simplified form, with fixed point given by the seed b Example 5. Define θ : {a, b, c} → {a, b, c} 3 as a → acb, b → baa, and c → bba.While θ 0 is an idempotent, the substitution θ is not in simplified form as θ 2 is not an idempotent.However θ 2 is in simplified form.The substitution θ 2 is: A minimal direct-reading automaton of θ 2 that generates the fixed point given by the seed b • a is given in Figure 1.We feed non-negative integers to the initial state a, and negative integers to the initial state b.The following theorem is due to Eilenberg [1].The size of an automaton is the cardinality of its state set.
Theorem 6 (Eilenberg's theorem).A sequence u is -automatic in reverse reading if and only if it has a finite -kernel.Furthermore, the size of a minimal finite-state automaton which generates u is the cardinality of ker (u).
As with Cobham's theorem, Eilenberg's theorem is stated for one-sided sequences.However we can equally define the -kernel of a two-sided sequence, and give a statement and proof of Eilenberg's theorem that works for two-sided sequences.
Let I = N 0 or I = Z.To study the -kernel of a sequence u, we introduce the operators Λ i : In the case where the sequence u takes values in a finite field and = p j , with p prime, and when I = N, the operators Λ i are called the Cartier operaters, except that they act on formal power series instead of sequences.
The usual construction of a reverse-reading automaton that generates a one-sided automatic sequence, e.g., the one described in [1], has states labelled with elements of ker u , and output obtained by projecting the 0-indexed entry, π 0 ((u n )) := u 0 .For v, a sequence labelling one of the states, the transition function δ is δ(v, i) := Λ i (v).We will give an alternate construction of the reverse-reading automaton which will be useful for our application to Toeplitz sequences.To do this, we link the operators Λ i to the column maps θ i .Recall the definition of θ r in (1).Proposition 7. Let u = (u n ) n∈I be a fixed point of a length-substitution θ.Then for each 0 ≤ r ≤ − 1, we have Proof.Given a fixed point u, note that by definition, for each k ∈ I, we have from which the result follows.
As with the definition of the column maps θ n , we can extend the defintion of Λ i for 0 ≤ i ≤ − 1 to the definition of Λ n , where n ∈ N as follows: if We have the following as a corollary of Proposition 7.
Corollary 8. Let u = (u n ) n∈I be a fixed point of a length-substitution θ.Then for any n 0 , n 1 , . . ., n d with 0 ≤ n i ≤ − 1 for each i, we have Proof.Given d ∈ N and 0 ≤ n 0 , n 1 , . . ., n d ≤ −1, it can be shown as in the proof of Proposition 7 by induction that which will prove the corollary.
If d = 0, the assertion follows by Proposition 7. Inductively, assume that and the induction is complete.
Let id : A → A denote the identity map.
Definition 9. Let θ be a length-substitution on A in simplified form.The semigroup of θ, denoted S θ is the semigroup in A A defined by We write elements s ∈ A A as vectors, i.e., if A := {a 0 , . . ., a d }, then we write s = b 0 , . . ., b d T for the function s(a i ) = b i for each i.
Example 10.Define θ : {a, b} → {a, b} 2 as a → ab and b → aa.This is the period-doubling substitution, and its simplified form is θ 2 ; so a → abaa and b → abab.We have Note the importance of passing to a simplified form, otherwise the semigroup can be different, as it is here: A length-substitution θ is bijective if every θ j is a bijection, see [13] for their study.If θ is bijective, then S θ is a subgroup.Its importance is recognized in [10], and it is related to the Ellis semigroup in [9].Note that for non-bijective substitutions, the semigroup generated by the maps {θ 0 , . . ., θ −1 } does not necessarily contain id.
The proof of the following lemma is a straightforward induction argument.
Lemma 11.If π 0 : A I → A is the map which projects a sequence (u n ) to its zero-indexed entry u 0 , and if Theorem 12. Let θ be a length-substitution on A, in simplified form, and let S θ be the structure semigroup of θ.Then there is a minimal DFA M θ , whose state set is S θ , with the following property: for any fixed point of θ with seed u l •u r , there are output maps ω l , ω r : S θ → A where (M θ , {ω l , ω r }) generates u in reverse reading.
Proof.Suppose that θ is defined on A = {a 0 , . . ., a d }.We will assume that we are given a bi-infinite fixed point, generated by a l • a r .The fact that θ is in simplified form implies that θ(a l ) ends with a l and θ(a r ) starts with a r .
We first define the finite-state automaton M = (S θ , Σ, δ, s 0 , A, {ω r }) that generates the right part of u.We will abuse notation and think of states as functions (technically they are only labelled by functions).We let Σ = {0, . . ., − 1}, and we let the initial state s 0 := id.Given a ∈ A, let p a : S θ → A denote projection to the a-entry, p a (s) := s(a).
The output map ω r : S θ → A will be ω r = p a r .It remains to define the transition map δ.
For 0 ≤ i ≤ −1, define δ(id, i) := θ i .Note that by definition any element s in S θ can be written as It remains to show that M generates the right-infinite part of u. and as p a r commutes with each θ i .The result follows.
The left part of u will be generated similarly, except with the output map ω a l .Furthermore, the states are in one-to-one correspondence with the kernel of θ.This can be seen using Lemma 11, which identifies the elements of the kernel as the images under compositions of the maps Λ i .Hence a state is identified with the composition of the appropriate maps Λ i indexed by the edges in the path leading to that state.The initial state is identified with the fixed points.In particular, if a state is labelled by s ∈ S θ , then it represents that sequence s(u).Thus, M is minimal by Eilenberg's theorem.
Definition 13.Let θ be a length-substitution on A, in simplified form, and let S θ be the structure semigroup of θ.The minimal DFA M θ defined in Theorem 12 is called the semigroup automaton associated to θ.
Example 14.We look at Example 5 again.Recall that we have to consider η := θ 2 in order to work with a substitution in simplified form, if we want an automaton that generates bi-infinite fixed points.We start though with the simpler θ, which is left simple, i.e., θ 0 is an idempotent, so we can construct with it an automaton that will generate right infinite θ-fixed points; see Figure 2.
A minimal reverse-reading automaton for η = θ 2 , with states labelled using S θ , is given in Figure 3.To simplify the presentation of this automaton, Table 2 lists the states s i ∈ S θ in Figure 3. Table 2.The states in Figure 3 3

. Toeplitz sequences and Toeplitz shifts
There are many definitions of Toeplitz sequences, and a vast literature on Toeplitz shifts; we use the notions which bring us directly to our setting, which is that of substitution sequences.
Let A be a finite, and let A Z denote the set of Z-indexed infinite sequences over A. Endowing A with the discrete topology, we equip A Z with the metrisable product topology.A shift dynamical system, or shift, is a pair (X, σ) where X is a closed σ-invariant set of A Z and σ : A Z → A Z is the left shift map (x n ) n∈Z → (x n+1 ) n∈Z .A shift is minimal if it has no non-trivial closed shift-invariant subsets.We say that x ∈ A Z is (shift-)periodic if σ k (x) = x for some k ≥ 1, aperiodic otherwise.The shift (X, σ) is said to be aperiodic if each x ∈ X is aperiodic.For basics on continuous and measurable dynamics see Walters [14].The simplest to generate a shift is to take a point x ∈ A Z and X to be the shift orbit closure of x, i.e, X := {σ n (x) : n ∈ Z}.
If the substitution θ is primitive, then the shift orbit closure of a θ-periodic point is minimal and furthermore each θ-periodic point generates the same shift space.We write (X θ , σ) to denote this shift, and we call it a substitution shift.The substitution θ is aperiodic if (X θ , σ) is aperiodic.For details on the above and a study of substitution shifts, see [13].
3.1.The column number of a substitution.Let θ be a primitive length-substitution with fixed point u, and with (X θ , σ) infinite.The height h = h(θ) of θ is defined as , where a symbol from A i is always followed by a symbol from A i+1 mod h [5].The following theorem tells us that a length-substitution shift is a constant height suspension over another length-substitution shift which has trivial height h = 1.Theorem 15. [5, Remark 9, Lemmas 17 and 19] If θ is a primitive aperiodic length-substitution defined on A, and has height h, then there is a length-substitution θ which has trivial height, and (X θ , σ) ∼ = (Xθ × {0, . . ., h − 1}, T ) where The substitution θ is called the pure base of θ.If θ has trivial height h = 1, then it is its own pure base.
Let θ have pure base θ.We say that θ has column number c if for some k ∈ N, and some is the least such number.In particular, if θ has column number one, then we will say that θ has a coincidence.

3.2.
Odometers and Toeplitz shifts.Given a sequence ( n ) n≥1 of natural numbers, we work with the group where the group operation is given by coordinate-wise addition with carry.For a detailed exposition of equivalent definitions of Z ( n ) , we refer the reader to [7].Endowed with the product topology over the discrete topology on each Z/ n Z, the group Z ( n ) is a compact metrizable topological group, where the unit z = 01•, which we simply write as z = 1, is a topological generator.We write elements (z n ) of Z ( n ) as left-infinite sequences . . .z 2 z 1 • where z n ∈ Z/ n Z, so that addition in Z ( n ) has the carries propagating to the left as usual in Z.With the above notation, an odometer is a dynamical system (Z ( n ) , +1).Odometers are equicontinuous, i.e., the family of function {+n : n ∈ Z} is equicontinuous.
An equicontinuous factor of (X, T ) is maximal if any other equicontinuous factor of (X, T ) factors through it; the maximal equicontinuous factor always exists.A Toeplitz shift is a symbolic shift (X, σ), X ⊂ A Z , which is a somewhere one-to-one extension of an odometer.Toeplitz shifts are always minimal.The following theorem tells us that the Toeplitz shifts that are also lengthsubstitution shifts are precisely those that are primitive and with column number one.The first two parts are due to Dekking [5].
Theorem 16.Let θ be an aperiodic primitive, length-substitution of height h.Then • the maximal equicontinuous factor of (X θ , σ) is the odometer (Z × Z/hZ, (+1, +1)), • (X θ , σ) is a Toeplitz shift if and only if θ has column number one, and • if θ has column number one, then it has trivial height.
Proof.The first statement is proved in [5,Theorem 13].
Let π : X θ → (Z × Z/hZ, (+1, +1)) be a maximal equicontinuous factor map.To prove the second statement, we will use the fact that the minimal cardinality of π −1 (z), for z ∈ Z ×Z/hZ, equals the column number of θ [5, Theorem 3.1i].Suppose that (X θ , σ) is a Toeplitz shift, so that by definition, it is a somewhere one-to-one extension of an odometer.But then this odometer must be the maximal equicontinuous factor of (X θ , σ) [15, Proposition 1.1].Thus (X θ , σ) is a somewhere one-to-one extension of (Z × Z/hZ, (+1, +1)), which implies that θ has column number one.Conversely, if θ has column number one, then π is somewhere one-to-one so that (X θ , σ) is Toeplitz.
The third statement is proved by Lemanzcyk and Muellner in [11, Lemma 2.2].Theorem 17.If x is a Toeplitz sequence, and X is its shift orbit closure, then (X, σ) is a Toeplitz shift whose maximal equicontinuous factor is the odometer (lim ← − Z (m n ) , +1) generated by the essential period structure of x.Conversely, if (X, σ) is a Toeplitz shift, with the somewhere injective equicontinuous factor π : X → Z ( n ) , then any point x such that {x} = π −1 (π(x)) is a Toeplitz sequence, and its period structure generates lim ← − Z (m n ) .
Definition 18.The semicocycle defined by (x n ) n∈I is the map n ∈ I → x n ∈ A.
To discuss the discontinuities of a semicocycle, we briefly describe the topology that we impose on A and I.The finite set A has the discrete topology.By Theorem 16, a Toeplitz shift (X, σ) has the odometer (Z , +1) as maximal equicontinuous factor.The set I inherits a topology from Z .For, I is included in Z via the map which sends n to its base-expansion, as described in Section 2. From this inclusion I ⊂ Z , the integers m, n ∈ I are close if and only if their baseexpansions agree on a large initial block.
Next we will see that this choice of topology implies that semicocycle discontinuities are linked to arithmetic progressions of common difference j .We write such a progression as where |i| ≤ j − 1.We say that a sequence x is constant on a (i,j) if there is an a such that x n = a whenever n ∈ a (i,j) .
Lemma 19.Let f : I → A be the semicocycle defined by x.Then f is discontinuous at n if and only if for all j, there exists an arithmetic progression a (i,j) of common difference j such that n ∈ a (i,j) and x is not constant on a (i,j) .
Proof.First suppose that f is discontinuous at n.This implies that for all j, there exists m such that (m) and (n) agree on the j least significant entries, but x m = x n .In other words, there is |i| < j such that n = k j + i and m = k j + i; so that n, m ∈ a (i,j) , and x is not constant on a (i,j) .
Conversely, suppose that there is an n such that for each j there is an a (i,j) with n ∈ a (i,j) , but where there is m ∈ a (i,j) with x m = x n .Since m, n ∈ a (i,j) , we have d(n, m) < 1/ j .Since such m can be found for any j, we have shown that the semicocycle f is discontinuous at n.
Note that a substitution shift may be Toeplitz, but its fixed points are not necessarily Toeplitz sequences, as Example 20 shows.
Example 20.Recall the period-doubling substitution θ from Example 10.We will show that the unique right-infinite fixed point for θ is a Toeplitz sequence, but neither of the bi-infinite fixed points for θ 2 are Toeplitz.A minimal reverse-reading automaton that generates the period-doubling sequence x with states as θ i ∈ A A is the following:  Another way to state this is that every entry in the two fixed points possible is the same except at x −1 .Hence, the bi-infinite fixed points are not Toeplitz sequences.Although, notice that the right-infinite fixed point of θ is in fact a Toeplitz sequence, as every index in N 0 belongs to an arithmetic progression.The column number of the substitution θ is one, which confirms that it generates a Toeplitz shift.
On the other hand a contradicition to our assumption that b = u n .Therefore δ(id, (n) ) = π u n .
The case when n ∈ −N is similar: we just explain how to proceed with (n) .Recall that if the natural number −n has a base-expansion of length j , then (n) = ( − 1)( j − n) .As we assume that the substitution is in simplified form, we can replace (n) by ( − 1)( j − n) , a word of length j + 1.If for some j with |n| < j , (u k j +n ) k∈Z is a constant sequence, we can assume, by padding ( − 1)( j − n) with extra copies of − 1, to obtain a word of length j that will represent (n) .Now the rest of the proof is the same, except that we work with p u −1 instead of p u 0 .
Conversely, suppose that δ(id, (n) ) = π u n .Since θ is in simplified form, we can assume that all base-expansions of integers are finite, by cropping off all but one most significant entry − 1 in the expansion of a negative integer.Suppose that (n) has length j.We will show that (u k j +n ) k∈Z is constant.If k ∈ Z then u k j +n = p u 0 (δ(id, (k j + n) )) = p u 0 (δ(δ(id, (n) ), (k) )) = p u 0 (δ(π u n , (k) )) = p u 0 (π u n ) = u n , and the result follows.

Figure 2 .
Figure 2. Reverse-reading automaton for Example 14 generating a rightinfinite one-sided automatic sequence; Any two intersecting, or close, edges with the corresponding labels are coloured differently for more clarity.

Figure 3 .
Figure 3. Reverse-reading automaton that generates bi-infinite fixed points for Example 14; Any two intersecting, or close, edges with the corresponding labels are coloured differently for more clarity.Created by Graphviz web app.
is the classical ring of -adic integers.Equivalently, we can define Z ( n ) as the inverse limit Z ( n ) = lim ← − Z/(m n Z) of cyclic groups, where m n := 1 • • • n .

3. 3 .
Toeplitz sequences.A Toeplitz sequence is a sequence that is obtained by filling its entries one arithmetic sequence of indices at a time with a constant symbol, as follows.Let I = N 0 or Z.Let A be a finite alphabet.For x ∈ A I , k ∈ N and a ∈ A, we define recursively Per k (x, a) := {n ∈ I : x n = a for all n ≡ n mod k and n ∈ Per j (x, b) for any b ∈ A and j|k}, Per k (x) := a∈A Per k (x, a), Per(x) := k Per k (x), and Aper(x) := I\Per(x).We say that the sequence x is Toeplitz if Aper(x) = ∅.If x is Toeplitz and {k n : n ∈ N} is the set of integers such that Per k (x) = ∅, we call {k n : n ∈ N} the set of essential periods of x.A set of essential periods can be turned into a period structure {m n : n ∈ N}, where each m n is an essential period and m n divides m n+1 ; see [15, Proposition 2.1].The following result gives the connection between Toeplitz sequences and Toeplitz shifts.Namely, a Toeplitz shift always contains Toeplitz sequences, and a Toeplitz sequence generates a Toeplitz shift.It dates back to Williams, for details see [15, Theorem 2.2, Corollary 2.4]; see also [7, Theorem 5.1].

Figure 4 .
Figure 4.A minimal reverse-reading automaton generating x