Computability of Data-Word Transductions over Different Data Domains

In this paper, we investigate the problem of synthesizing computable functions of infinite words over an infinite alphabet (data $\omega$-words). The notion of computability is defined through Turing machines with infinite inputs which can produce the corresponding infinite outputs in the limit. We use non-deterministic transducers equipped with registers, an extension of register automata with outputs, to describe specifications. Being non-deterministic, such transducers may not define functions but more generally relations of data $\omega$-words. In order to increase the expressive power of these machines, we even allow guessing of arbitrary data values when updating their registers. For functions over data $\omega$-words, we identify a sufficient condition (the possibility of determining the next letter to be outputted, which we call next letter problem) under which computability (resp. uniform computability) and continuity (resp. uniform continuity) coincide. We focus on two kinds of data domains: first, the general setting of oligomorphic data, which encompasses any data domain with equality, as well as the setting of rational numbers with linear order; and second, the set of natural numbers equipped with linear order. For both settings, we prove that functionality, i.e. determining whether the relation recognized by the transducer is actually a function, is decidable. We also show that the so-called next letter problem is decidable, yielding equivalence between (uniform) continuity and (uniform) computability. Last, we provide characterizations of (uniform) continuity, which allow us to prove that these notions, and thus also (uniform) computability, are decidable. We even show that all these decision problems are PSpace-complete for $(\mathbb{N},<)$ and for a large class of oligomorphic data domains, including for instance $(\mathbb{Q},<)$.

Program synthesis aims at deriving, in an automatic way, a program that fulfils a given specification.It is very appealing when for instance the specification describes, in some abstract formalism (an automaton or ideally a logic), important properties that the program must satisfy.The synthesised program is then correct-by-construction with regard to those properties.It is particularly important and desirable for the design of safety-critical systems with hard dependability constraints, which are notoriously hard to design correctly.In their most general forms, synthesis problems have two parameters, a set of inputs In and a set of outputs Out, and relate two classes S and I of specifications and implementations respectively.A specification S ∈ S is a relation S ⊆ In × Out and an implementation I ∈ I is a function I : In → Out.The (S, I)-synthesis problem asks, given a (finite representation of a) specification S ∈ S, whether there exists I ∈ I such that for all u ∈ In, (u, I(u)) ∈ S. If such I exists, then the procedure must return a program implementing I.If all specifications in S are functional, in the sense that they are the graphs of functions from In to Out, then the (S, I)-synthesis is a membership problem: given f ∈ S, does f ∈ I hold?Automata-theoretic approach to synthesis.In this paper, we are interested in the automatatheoretic approach to synthesis, in the sense that specifications and implementations can be defined by automata, or by automata extended with outputs called transducers.In this approach, In and Out are sets of words over input and output alphabets Σ and Γ respectively.Perhaps the most well-known decidable instance of synthesis in this context is the celebrated result of Büchi and Landweber [JL69]: S is the class of ω-regular specifications, which relates infinite input words i 0 i 1 • • • ∈ Σ ω to infinite output words o 0 o 1 • • • ∈ Γ ω through ω-automata (e.g.deterministic parity automata), in the sense that the infinite convolution i 0 o 0 i 1 o 1 • • • ∈ (ΣΓ) ω must be accepted by an ω-automaton defining the specification.The class of implementations I is all the functions which can be defined by Mealy machines, or equivalently, deterministic synchronous transducers which, whenever they read some input i ∈ Σ, produce some output o ∈ Γ and possibly change their own internal state.The seminal result of Büchi and Landweber has recently triggered a lot of research in reactive system synthesis and game theory, both on the theoretical and practical sides, see for instance [CHVB18].We identify two important limitations to the now classical setting of ω-regular reactive synthesis: (i) specifications and implementations are required to be synchronous, in the sense that a single output o ∈ Γ must be produced for each input i ∈ Σ, and (ii) the alphabets Σ and Γ are assumed to be finite.Let us argue why we believe (i) and (ii) are indeed limitations.First of all, if a specification is not realizable by a synchronous transducer, then a classical synthesis algorithm stops with a negative answer.However, the specification could be realizable in a larger class of implementations I.As an example, if S is the set of words i 0 o 0 . . .such that o = i +1 , then S is not realizable synchronously because it is impossible to produce o before knowing i +1 .But this specification is realizable by a program which can delay its output production by one time unit.Enlarging the class of implementations can therefore allow one to give finer answers to the synthesis problem in cases where the specification is not synchronously realizable.We refer to this type of relaxations as asynchronous implementations.An asynchronous implementation can be modelled in automata-theoretic terms as a transducer which, whenever it reads an input i ∈ Σ, produces none or several outputs, i.e. a finite word u ∈ Γ * .Generalizations of reactive system synthesis to asynchronous implementations have been considered in [HKT12,FLZ11,WZ20].In these works however, the specification is still synchronous, given by an automaton which strictly alternates between reading input and output symbols.Here, we also assume that specifications are asynchronous, as it gives more flexibility in the relations that can be expressed.For instance, one can specify that some response has to be delayed, or, when transforming of data streams, allow for erasure and/or duplication of some data values.
The synchronicity assumption made by classical reactive synthesis is motivated by the fact that such methods focus on the control of systems rather than on the data, in the sense that input symbols are Boolean signals issued by some environment, and output symbols are actions controlling the system in order to fulfil some correctness properties.From a data-processing perpective, this is a strong limitation.The synthesis of systems which need to process streams of data, like a monitoring system or a system which cleans noisy data coming from sensors, cannot be addressed using classical ω-regular synthesis.Therefore, one needs to extend specifications to asynchronous specifications, in the sense that the specifications must describe properties of executions which do not strictly alternate between inputs and outputs.Already on finite words however, the synthesis problem of asynchronous specifications by asynchronous implementations, both defined by transducers, is undecidable in general [CL14], and decidable only in some restricted cases [FJLW16].The second limitation (ii) is addressed in the next paragraph.
From finite to infinite alphabets.To address the synthesis of systems where data are taken into account, one also needs to extend synthesis methods to handle infinite alphabets.As an example, in a system scheduling processes, the data values are process ids.In a stream processing system, data values can be temperature or pressure measurements for example.Not only one needs synthesis methods able to handle infinite alphabets of data values, but where those values can be compared through some predicates, like equality or a linear order.Recent works have considered the synthesis of (synchronous) reactive systems processing data words whose elements can be compared for equality [KMB18,ESKG14,KK19,EFR19] as well as comparison with a linear order on the data [EFK21].To handle data words, just as automata have been extended to register automata, transducers have been extended to register transducers.Such transducers are equipped with a finite set of registers in which they can store data values and with which they can compare them for equality, inequality or in general any predicate, depending on the considered data domain.When a register transducer reads a data value, it can compare it to the values stored in its registers, assign it to some register, and output the content of none or several registers, i.e., a finite word v of register contents.To have more expressive power, we also allow transducers to guess an arbitrary data value and assign it to some register.This feature, called data guessing, is arguably a more robust notion of non-determinism notion for machines with registers and was introduced to enhance register automata [KZ10].We denote by NRT the class of non-deterministic register transducers.As an example, consider the (partial1 ) data word function g which takes as input any data word of the form u = su 1 su 2 • • • ∈ N ω , s occurs infinitely many times in u, and u i ∈ (N \ {s}) + for all i ≥ 1.Now, for all i ≥ 1, denote by |u i | the length of u i and by d i the last data value occurring in u i .The function g is then defined as g(u) = d 2 s . . . .This function can be defined by the NRT of Figure 1.Note that without the guessing feature, this function could not be defined by any NRT.
Thanks to the non-determinism of NRT, in general and unlike the previous example, there might be several accepting runs for the same input data word, each of them producing a possibly different output data word.Thus, NRT can be used to define binary relations of data ω-words, and hence specifications.In the works [KMB18, ESKG14, KK19, EFR19, EFK21] already mentioned, NRT have been used as a description of specifications, however they are assumed to be synchronous and without guessing.
Objective: synthesis of computable data word functions.In this paper, our goal is to define a synthesis setting where both limitations (i) and (ii) are lifted.In particular, specifications are assumed to be given by (asynchronous) non-deterministic register transducers equipped with a Büchi condition (called NRT).To retain decidability, we however make some hypothesis: The current data value denoted by is tested with respect to the content of the registers on the left of the bar |.On the right of the bar, there are instructions such as assigning an arbitrary data value to r (notation ?r), outputting the content of a register or nothing (out r), or assigning the current data value to some register (↓ r).The Büchi condition makes sure that the first data value, initially stored in r s during the first transition, occurs infinitely many times.The register r c stores the last data value that has been read.r o is meant to store the last data value d i of an input chunk u i .It has to be guessed whenever a new chunk u i is starting to be read, and on reading again r s , the automaton checks that the guess was right by evaluating whether r c = r o (at that moment, r c contains d i ).
specifications are assumed to be functional, i.e., they already define a function from input data ω-words to output data ω-words.While this a strong hypothesis, it is motivated by two facts.First, the synthesis problem of asynchronous implementations from asynchronous specifications given by (non-functional) NRT is undecidable in general, already in the finite alphabet case [CL14].Second, functional NRT define uncomputable functions in general, and therefore they cannot be used as machines that compute the function they specify.Since those functions are defined over infinite inputs, let us make clear what we mean by computable functions.A (partial) function f of data ω-words is computable if there exists a Turing machine M that has an infinite input x ∈ dom(f ), and produces longer and longer prefixes of the output f (x) as it reads longer and longer prefixes of the input x.Therefore, such a machine produces the output f (x) in the limit.As an example, the function g previously defined is computable.A Turing machine computing it simply has to wait until it sees the last data value d i of a chunk u i (which necessarily happens after a finite amount of time), compute the length i of u i and once it sees d i , output d i i at once.However, consider the extension f to any input data word defined as follows: f (u) = g(u) if u is in the domain of g, and otherwise f (u) = s ω where s is the first data value of u.Such function is not computable.For instance, on input x = sd ω (where d = s is an arbitrary data value), we have f (sd ω ) = s ω , as x is not in the domain of g.Yet, on any finite prefix α k = sd k of sd ω , any hypothetical machine computing f cannot output anything.Indeed, there exists a continuation of α k which is in the domain of g, and for which f produces a word which starts with a different data value than f (α k d ω ): it suffices to take the continuation (sd) ω , as we have In this paper, our goal is therefore to study the following synthesis problem: given a functional NRT defining a function f of data ω-words, generate a Turing machine which computes f if one exists.In other words, one wants to decide whether f is computable, and if it is, to synthesize an algorithm which computes it.
Contributions.Register transducers can be parameterized by the set of data values from which the ω-data words are built, along with the set of predicates which can be used to test those values.We distinguish a large class of data sets for which we obtain decidability results for the later problem, namely the class of oligomorphic data sets [BKL14].Briefly, oligomorphic data sets are countable sets D equipped with a finite set of predicates which satisfies that for all n, D n can be partitioned into finitely many equivalence classes by identifying tuples which are equal up to automorphisms (predicate-preserving bijections).For example, any set equipped with equality is oligomorphic, such as (N, {=}), (Q, {<}) is oligomorphic while (N, {<}) is not.However (N, {<}) is an interesting data set in and of itself.We also investigate NRT over such data set, using the fact that it is a substructure of (Q, {<}) which is oligormorphic.Our detailed contributions are the following: (1) We first establish a general correspondence between computability and the classical mathematical notion of continuity (for the Cantor distance) for functions of data ωwords (Theorems 2.14 and 2.15).This correspondence holds under a general assumption, namely the decidability of what we called the next-letter problem, which in short asks that the next data value which can be safely outputted knowing only a finite prefix of the input data ω-word is computable, if it exists.We also show similar correspondences for more constrained computability and continuity notions, namely Cauchy, uniform and m-uniform computability and continuity.In these correspondences, the construction of a Turing machine computing the function is effective.(2) We consider a general computability assumption for oligomorphic data sets, namely that they have decidable first-order satisfiability problem [Boj19].We call such data sets decidable.We then show that functions defined by NRT over decidable oligomorphic data sets and over (N, {<}), have decidable next-letter problem.As a consequence (Theorems 3.12 and 4.22), we obtain that a function of data ω-words definable by an NRT over decidable oligomorphic data sets and over (N, {<}), is computable iff it is continuous (and likewise for all computability and continuity notions we introduce).This is a useful mathematical characterization of computability, which we use to obtain our main result.(3) As explained before, an NRT may not define a function in general but a relation, due to non-determinism.Functionality is a semantical, and not syntactical, notion.We nevertheless show that checking whether an NRT defines a function is decidable for decidable oligomorphic data sets (Theorem 3.13).This problem is called the functionality problem and is a prerequisite to our study of computability, as we assume specifications to be functional.We establish PSpace-completeness of the functionality problem for NRT over (N, {<}) (Corollary 4.20) and for oligomorphic data sets (Theorem 3.13) under some additional assumptions on the data set that we call polynomial decidability.In short, it is required that the data set has PSpace-decidable first-order satisfiability problem.(4) Finally, we show (again Theorem 3.13) that continuity of functions defined by NRT over decidable (resp.polynomially decidable) oligomorphic data sets is decidable (resp.PSpace-c).We also obtain PSpace-completeness in the non-oligomorphic case (N, {<}) (Theorem 4.28).These results also hold for the stronger notion of uniform continuity (see also Theorem 4.24).As a result of the correspondence between computability and continuity, we also obtain that computability and uniform computability are decidable for functions defined by NRT over decidable oligomorphic data sets, and PSPace-c for polynomially decidable oligomorphic data sets as well as (N, {<}).This is our main result and it answers positively our initial synthesis motivation.The proof techniques we use have the following structure in common: first, we characterize non-functionality and non-continuity by structural patterns on NRT and establish small witness properties for the existence these patterns.Then, based on the small witness properties, we show how to decide whether given an NRT, such patterns are matched or not.While the proofs have some similarities between the oligomorphic case, the case (N, {<}) and the functionality and continuity problems, there are subtle technical differences which make them hard to factorize with reasonable amount of additional notations and theoretical assumptions.
Related Work.We have already mentioned works related to the synthesis problem.We now give references to results on computability and continuity.The notion of continuity with regards to Cantor distance is not new, and for rational functions over finite alphabets, it was already known to be decidable [Pri02].The approach of Prieur is to reduce continuity to functionality by defining from a transducer T a transducer realizing its topological closure.We were able to extend this approach to almost all the cases we considered, except for transducers over (N, {<}) with guessing allowed, so we chose a different proof strategy.The connection between continuity and computability for functions of ω-words over a finite alphabet has recently been investigated in [DFKL20] for one-way and two-way transducers.Our results lift the case of one-way transducers from [DFKL20] to data words.Our results were partially published in conference proceedings [EFR20].In that publication, only the case of data sets equipped with the equality predicate was considered.We now consider oligomorphic data sets (which generalise the latter case), the data set (N, {<}) and new computability notions.Despite the fact that our results are more general, this generalisation also allows to extract the essential arguments needed to prove this kind of results.Moreover, compared to [EFR20], we add here the possibility for the register transducer to make nondeterministic register assignment (data guessing), which strictly increases their expressive power.
1. Data alphabet, languages and transducers 1.1.Data as logical structures.Let Σ be a finite signature with relation and constant symbols.Let D = (D, Σ D ) be a logical structure over Σ with a countably infinite domain D and an interpretation of each symbol of Σ.Note that we often identify D and D when the structure considered is clear, from context.
An automorphism of a structure D is a bijection µ : D → D which preserves the constants and the predicates of D: for any constant c in D, µ(c) = c and for any relation of Σ, R ⊆ D r , we have ∀ x, R(x) ⇔ R(µ(x)), where µ is naturally extended to D r by applying it pointwise.We denote by Aut(D) the set of automorphisms of D. Let x ∈ D d , the set {µ(x) | µ ∈ Aut(D)} is called the orbit of x under the action of Aut(D).
We will be interested in structures that have a lot of symmetry.For instance the structures (N, {0, =}), (Z, {<}) and (Q, {<}) fall under our study as well as more sophisticated Example 1.2.Oligomorphic structures can be thought of as "almost finite".Consider (N, {=}), then N 2 only has two orbits: the diagonal {(x, x) | x ∈ N} and its complement (x, y) ∈ N 2 | x = y .In fact (N, {=}) is oligomorphic, since the orbit of an element of N n is entirely determined by which coordinates are equal to each other.Similarly, one can see that the dense linear order (Q, {<}) is oligomorphic.
The automorphism group of (Z, {<}) consists of all translations n → n + c for some fixed c ∈ Z.This means that Z only has one orbit.However, Z 2 has an infinite number of orbits since the difference between two numbers is preserved by translation.Hence (Z, {<}) is not oligormorphic.However, the fact that (Z, {<}) is a substructure of (Q, {<}) will allow us to extend our results to this structure, with some additional work.For more details on oligomorphic structures see [Boj19, Chap.3].
Let G be a group acting on both X, Y , then a function f : 1.2.Words and data words.For a (possibly infinite) set A, we denote by A * (resp.A ω ) the set of finite (resp.infinite) words over this alphabet, and we let A ∞ = A * ∪ A ω .For a word u = u 1 . . .u n , we denote |u| = n its length, and, by convention, for x ∈ A ω , |x| = ∞.The empty word is denoted ε.For 1 ≤ i ≤ j ≤ |w|, we let w[i:j] = w i w i+1 . . .w j and w[i] = w[i:i] the ith letter of u.For u, v ∈ A ∞ , we say that u is a prefix of v, written u ≤ v, if there exists w ∈ A ∞ such that v = uw.In this case, we define u −1 v = w.For u, v ∈ A ∞ , we say that u and v match if either u ≤ v or v ≤ u, which we denote by u v, and we say that they mismatch, written u v, otherwise.Finally, for u, v ∈ A ∞ , we denote by u ∧ v their longest common prefix, i.e. the longest word w ∈ A ∞ such that w ≤ u and w ≤ v.
Let D be a logical structure.A word over D is called a D-data word (or just data word ).Note that Aut(D) naturally acts on D ∞ .1.3.Functions and relations.A (binary) relation between sets X and Y is a subset R ⊆ X × Y .We denote its domain dom(R) = {x ∈ X | ∃y ∈ Y, (x, y) ∈ R}.It is functional if for all x ∈ dom(R), there exists exactly one y ∈ Y such that (x, y) ∈ R.Then, we can also represent it as the function f R : dom(R) → Y such that for all x ∈ dom(R), f (x) = y such that y ∈ Y (we know that such y is unique).f R can also be seen as a partial function f R : X → Y .
Convention 1.3.In this paper, unless otherwise stated, functions of data words are assumed to be partial, and we denote by dom(f ) the domain of any (partial) function f .1.4.Register transducers.Let D be a logical structure, and let R be a finite set of variables.We define R-tests by the following grammar: where P is a symbol of arity k in the signature of D and t a k-tuple of terms.We denote by Test(R) the set of R-tests.Terms are defined by either a constant of D or a variable of R. In other words R-tests are exactly the quantifier-free formulas over the signature of D using variables in R.
Remark 1.4.We choose tests to be quantifier-free formulas.However we could have chosen existential first-order formulas without affecting our results.Note that we choose this formalism just for simplicity's sake, and that it does not make any difference for structures which admit quantifier elimination such as (N, {=}) or (Q, {<}).
A non-deterministic register transducer (NRT for short) over D is a tuple (Q, R, ∆, q 0 , c 0 , F ).Where Q is a finite set of states, R is a finite set of registers, q 0 ∈ Q, c 0 ∈ Σ R is a vector of constant symbols, F ⊆ Q, and ∆ is a finite subset of A non-guessing transducer (NGRT) has a transition function which is included in Finally, a deterministic transducer (DRT) satisfies an even stronger condition: its transition relation is a function of type δ : where, additionally, tests are mutually exclusive, i.e. for all φ, ψ ∈ dom(δ), φ ∧ ψ is unsatisfiable.
Remark 1.5.Note that in the definition of a transducer we require that D contains at least one constant symbol.This is needed for annoying technical reasons, namely in order to initialize registers to some value.However it is not too damaging since, given a Σ-structure D of domain D, one can always consider the Σ {c 0 }-structure D ⊥ with domain D {⊥}, which is just the structure D with the extra constant symbol being interpreted as the new element ⊥, the other relations and constants are unchanged, except naturally for the equality relation which is extended to include (⊥, ⊥).
For simplicity's sake we will sometimes talk about structures without mentioning any constant, implicitely stating that we extend the structure to include ⊥.Also note that this operation of adding a fresh constant does not affect oligomorphicity.
Let T be an NRT given as above.A configuration C of T is given by a pair (q, d) where q ∈ Q is a state and d ∈ D R is a tuple of data values, hence the group Aut(D) naturally acts on the configurations of T by not touching the states and acting on the content of the registers pointwise.The initial configuration is the pair C 0 = (q 0 , d0 ) with d0 = c 0 D being the interpretation of the constants in D. A configuration is called final if the state component is in F .Let C 1 = (q 1 , d1 ), C 2 = (q 2 , d2 ) be two configurations, let d ∈ D and let t = (q 1 , φ, q 2 , update, v) ∈ ∆.We say that C 2 is a successor configuration of C 1 by reading d through t and producing w ∈ D |v| if the following hold: We sometimes even don't write the output C u − → C stating that there is a sequence of transitions reading u going from C to C .
If an infinite number of configurations of ρ are final, we say that ρ is final.A run which is both initial and final is accepting.We say that the run ρ is over the input word x = d 1 . . .d n . . .and produces w = v 1 . . .v n . . . in the output.Then the semantics of T is defined as Note that in the following we will mainly consider transducers that only produce ω-words.Restricting the accepting runs of a transducer to runs producing infinite outputs is a Büchi condition and can easily be done by adding one bit of information to states.

Continuity and computability
2.1.Continuity notions.We equip the set A ∞ with the usual distance: for u, v ∈ A ∞ , u, v = 0 if u = v and u, v = 2 −|u∧v| otherwise.A sequence of (finite or infinite) words (w n ) n∈N converges to some word w if for all > 0, there exists N ≥ 0 such that for all n ≥ N , w n , w ≤ .Given a language L ⊆ A ∞ , we denote by L its topological closure, i.e. the set of words which can be approached arbitrarily close by words of L.
Remark 2.1.Whether the alphabet A is finite or infinite substantially modifies the properties of the metric space A ∞ .Indeed when A is finite this space is compact, but it is not when A is infinite.

Definition 2.2 (Continuity). A function
(a) for all sequences of words (x n ) n∈N converging towards x, where for all i ∈ N,

Cauchy continuity. A Cauchy continuous function maps any Cauchy sequence to a
Cauchy sequence.One interesting property of Cauchy continuous functions is that they always admit a (unique) continuous extension to the completion of their domain.Since we deal with A ∞ which is complete, the completion of the domain of a function f , denoted dom(f ), is simply its closure.

Definition 2.3 (Cauchy continuity). A function
Remark 2.4.Any Cauchy continuous function f can be continuously extended over dom(f ) in a unique way, which we denote by f .2.1.3.Uniform continuity.

Definition 2.5 (Uniform continuity). A function
Such a function m is called a modulus of continuity2 for f .We also say that f is m-continuous.Finally, a functional NRT T is uniformly continuous when T is uniformly continuous.
Remark 2.6.In the case of a finite alphabet, and in general for compact spaces, Cauchy continuity is equivalent to uniform continuity, but for infinite alphabets this does not hold anymore.Consider the following function f computable by a DRT over the data alphabet (N, {0, <}) and defined by u0x → x, for u0 ∈ N * being a strictly decreasing sequence.Then this function is not uniformly continuous, since two words may be arbitrarily close yet have very different images.However one can check that the image of a Cauchy sequence is indeed Cauchy: let (x n ) n∈N be a Cauchy sequence in the domain of f .Let us assume without loss of generality that all the x n 's begin with the same letter i ∈ N.Then, after reading at most i + 1 symbols of one of the x n 's, the DRT outputs something.Let j ∈ N and let N be such that for all m, n ≥ N we have We've seen in the previous remark that Cauchy continuity and uniform continuity don't coincide over infinite alphabets.However when dealing with oligomorphic structures we recover some form of compactness, that is compactness of D ∞ /Aut(D), which ensures that the two notions do coincide in this case.[Exi21,Proposition 12.28] for details).As a consequence, we can extract a subsequence (which we also call ([x n ], [y n ]) n∈N for convenience) and which is convergent.This means that there are automorphisms (µ n ) n∈N such that the sequence (µ n (x n )) n∈N (and thus (µ n (y n )) n∈N ) converges.Hence by interleaving (µ n (x n )) n∈N and (µ n (y n )) n∈N , we obtain a converging sequence whose image is divergent, which means that f is not Cauchy continuous.
Remark 2.8.In order to refine uniform continuity one can study m-continuity for particular kinds of functions m.For instance for m : i → i + b, m-continuous functions are exactly 2 b -Lipschitz continuous functions.Similarly, for m : i → ai + b, m-continuous function are exactly the 1 a -Hölder continuous functions.Note that while these notions are interesting in and of themselves, they are very sensitive to the metric that is being used.For instance the metric d(x, y) = 1 |x∧y| while defining the same topology over words, yields different notions of Lipschitz and Hölder continuity.

Computability notions.
Let D be a data set.In order to reason with computability, we assume in the sequel that the countable set of data values D we are dealing with has an effective representation, meaning that each element can be represented in a finite way.For instance, this is the case when D = N.Moreover, we assume that checking if a tuple of values belongs to some relation of D is decidable.We say that the structure D is representable.Formally, a structure is representable if there exists a finite alphabet A and an injective function enc : We now define how a Turing machine can compute a function from D ω to D ω .We consider deterministic Turing machines whose cells can contain a letter from A ∪ { } or a letter from a finite working alphabet.They have three tapes: a read-only one-way input tape on alphabet A ∪ { } (containing an encoding of an infinite input data word), a two-way working tape, and a write-only one-way output tape on alphabet A ∪ { } (on which they write the encoding of the infinite output data word).Since we always work modulo encoding, for the sake of simplicity, from now on and in the rest of the paper, we assume that each cell of the Turing machine, on the input and output tapes, contain a data value d ∈ D, while cells of the working tape are assumed to contain either a data value d ∈ D or a letter from the working alphabet.So, instead of saying the input contains the encoding of a data word x, we just say that it contains the input data word x.We discuss in Remark 2.13 how the computability notions we introduce hereafter are sensitive to encodings.
Consider such a Turing machine M and some input data word x ∈ D ω .For any integer k ∈ N, we let M (x, k) denote the finite output data word written by M on its output tape after reaching cell number k of the input tape (assuming it does).Observe that as the output tape is write-only, the sequence of data words (M (x, k)) k≥0 is non-decreasing, and thus we denote by M (x) the limit content of the output tape.Definition 2.9 (Computability).Let D be a representable data domain.A data word function f : D ω → D ω is computable if there exists a deterministic multi-tape machine M such that for all x ∈ dom(f ), M (x) = f (x).We say that M computes f .Definition 2.10 (Cauchy computability).Let D be a representable data domain.A data word function f : D ω → D ω is Cauchy computable if there exists a deterministic multi-tape machine M computing f such that for all x in the topological closure dom(f ) of dom(f ), the sequence (M (x, k)) k≥0 converges to an infinite word.In other words a Cauchy computable function is a function which admits a continuous extension to the closure of its domain and which is computable.We say that M Cauchy computes f .Definition 2.11 (Uniform computability).Let D be a representable data domain.A data word function f : D ω → D ω is uniformly computable if there exists a deterministic multi-tape machine M and a computable mapping m : N → N such that M computes f and for all i ≥ 0 and x ∈ dom(f ), |M (x, m(i))| ≥ i.Such a function m is called a modulus of computability for f .In that case f is called m-computable.We say that M uniformly computes f , and also that M m-computes f .
Example 2.12.The function g defined in the Introduction (p.4), for the data domain of integers, is computable.Remind that it is defined on all input words of the form x = su 1 d 1 su 2 d 2 s . . .such that s occurs infinitely often, and for all i, s does not occur in s . . . .A Turing machine just needs to read the input up to d 1 , then output d 1 exactly |u 1 | + 1 times, and so on for the other pieces of inputs.
In Remark 2.6, the function f is not uniformly continuous but Cauchy continuous.It is actually not uniformly computable but Cauchy computable.As a matter of fact, all the computability notions we define here entail the respective continuity notions defined before.We make this formal in Section 2.3.Remark 2.13 (Robustness to encoding).When actually representing words over an infinite alphabet, it is not realistic to assume that one letter takes a constant amount of space and can be read in a constant amount of time.Then, which of the many notions introduced above are sensitive to encoding and which ones are more robust?
Let D be a representable structure, and let enc : D → A * be its encoding function.Let f : D ω → D ω be a function and let f enc : (A ) ω → (A * ) ω be defined as enc • f • enc −1 , where enc : Continuity and computability are robust enough so that f is continuous (resp.computable) if and only if f dec is.Cauchy continuity and computability also fall under this category.In contrast, uniform continuity and uniform computability are very sensitive to encoding.As an example, the function which maps a word to the second letter in the word is never uniformly continuous, since the encoding of the first letter may be arbitrarily long.Nevertheless, uniform computability is still a relevant notion, as it provides guarantees on the maximal number of input data values which need to be read to produce a given number of output data values, even though the encoding of those values can be arbitrarily large.

Computability versus continuity.
In this section, we show that all the computability notions (computability, Cauchy continuity, . . . ) imply their respective continuity notions.We then give general conditions under which the converse also holds.

From computability to continuity.
Theorem 2.14.Let f : D ω → D ω and let m : N → N, the following implications hold: Assume that f is computable by a deterministic multi-tape Turing machine M .Let x be in the topological closure of dom(f ) and (x n ) n be a sequence in dom(f ) converging to x.We show that (f (x n )) n converges to M (x) if M (x) is infinite, which is the case for all x ∈ dom(f ) since f is computable.For all k ≥ 0, let p k the prefix of x of length k.Since lim n→∞ x n = x, for all k, there exists n k such that for all m ≥ n k , , entailing continuity of f .If additionally f is Cauchy computable, then it is also the case for all x ∈ dom(f ), entailing Cauchy continuity of f .It remains to show the fourth statement, which entails the third.So, let us assume that f is m-computable by some machine M .We show it is m-continuous.
2.3.2.From continuity to computability.While, as we have seen in the last section, computability of a function f implies its continuity, and respectively for all the notions of computability and continuity we consider in this paper, the converse may not hold in general.We give sufficient conditions under which the converse holds for f , namely when it has a computable next-letter problem.This problem asks, given as input two finite words u, v ∈ D * , to output, if it exists, a data value d ∈ D such that for all y ∈ D ω such that uy ∈ dom(f ), we have vd ≤ f (uy).Because of the universal quantification on y, note that d is unique if it exists.Formally: Theorem 2.15.Let f : D ω → D ω be a function with a computable next-letter problem and let m : N → N, the following implications hold: Let us assume the existence of a procedure Next f (u, v) which computes the next-letter problem.To show the four statements, we show the existence of a deterministic Turing machine M f common to the four statements, in the sense that M f computes f if f is continuous, respectively Cauchy computes f is f is Cauchy continuous, etc.The Turing machine M f is best presented in pseudo-code as follows.
Algorithm 1: Turing machine M f defined in pseudo-code.Data: Now, we show that if f is continuous, then . .be the sequence of data values outputted at line 5 at the ith iteration of the for loop.Note that the ith iteration may not exist when the test at line 4 is forever true.In that case, we set It remains to show that it is indeed true when f is continuous.Suppose it is not the case.Then there exists i 0 such that for all i ≥ i 0 the call Next f (x[:i], v 0 . . .v i 0 ) returns none (assume i 0 is the smallest index having this property).Let d such that v 0 . . .v i 0 d < f (x).Then, for all i ≥ i 0 , there exists α i ∈ D ω and d = d such that x[:i]α i ∈ dom(f ) and v 0 . . .v i 0 d < f (x[:i]α i ).Clearly, the sequence (f (x[:i]α i )) i , if it converges, does not converge to f (x).Since (x[:i]α i ) i converges to x, this contradicts the continuity of f .Consider now the case where f is Cauchy-continuous.It implies that f admits a unique continuous extension f to dom(f ) (see Remark 2.4).By the first statement we just proved, M f computes f , and by definition of Cauchy-computability, we conclude that M f Cauchy-computes f .
We finally prove the fourth statement, which implies the third.Suppose that f is m-continuous for some modulus of continuity m.We show that M f m-computes f .We already proved that •) until it returns none, we get that v 0 v 1 . . .v j is the longest output which can be safely output given only x[:j], i.e. v 0 . . .
and we are done.Suppose v j is finite.Then, there exists

Oligomorphic data
In this section we consider a structure D which is oligomorphic.We will show that in this case one can decide, under reasonable computability assumptions, all the notions of continuity introduced in the previous section, as well as compute the next-letter problem.The first step is to prove characterizations of these properties, and then show that the characterizations are decidable.Let R : N → N denote the Ryll-Nardzewski function of D which maps k to the number of orbits of k-tuples of data values, which is finite thanks to oligomorphism.
3.1.Characterizing functionality and continuity.The main goal of this section is to give for NRT characterizations of functionality, continuity and uniform continuity, that consist in small witnesses.These small witnesses are obtained by pumping arguments that rely on the fact that there is only a finite number of configuration orbits.
We start by defining loop removal, a tool which will prove useful throughout this section.The main idea is that although no actual loop over the same configuration can be guaranteed over infinite runs, the oligomorphicity property guarantees that a configuration orbit will be repeated over long enough runs.A loop is a run of the shape C Proof.The idea behind this proposition is simple: any large enough run must contain a loop and can thus be shortened.
Let us assume that n > |Q|R(2k), we want to obtain a shorter run from C 1 to C n .Let us consider the orbits of the pairs (C 1 , C 1 ), (C 1 , C 2 ), . . ., (C 1 , C n ).Since n > |Q|R(2k), there must be two pairs in the same orbit, i.e. there must be two indices 1 ≤ i < j ≤ n and some automorphism µ such that µ(C 1 , C i ) = (C 1 , C j ).Hence we obtain the run 3.1.1.Characterization of non-emptiness.Let an NRA (non deterministic register automaton) be simply an NRT without any outputs.We give a characterization of non-emptiness in terms of small witnesses.Proposition 3.2.Let A be an NRA, the following are equivalent: (1) A recognizes at least one word (2) there exist C 0 Proof.Let us assume (1) and let x be a word accepted by A. Since D is oligomorphic, there is only a finite number of orbits of configurations.Thus an accepting run of A over x must go through some accepting configuration orbit infinitely often, and in particular at least twice.Hence (2) holds.
Let us assume that (2) holds.To bound the size of u 1 and u 2 and obtain (3), we apply Proposition 3.1 twice in A (seen as a trivial NRT producing only epsilon outputs): once to remove loops in the run C 0 Let us assume (3), then the word 3.1.2.Characterizing functionality.Characterizing functionality is slightly more complicated since we have to care about outputs.Moreover, we need to exhibit patterns involving two runs which makes pumping more involved.
We start with a useful yet quite technical lemma, which will allow us to remove loops while preserving mismatches.
Lemma 3.3 (Small mismatch witness).There exists a polynomial P (x, y, z) such that the following hold.
Let T be an NRT, with k registers, a state space Q and a maximal output length L. Let Then there exists u of length less than −−→ D 2 be runs such that u 1 u 2 .Our goal is to show that either |u| is smaller than some polynomial in R(4k + 2), |Q| and L or we can remove a synchronous loop in ρ 1 , ρ 2 while preserving the mismatch.A synchronous loop is defined as a loop over the same input in the product transducer T × T .Let u 1 = αa 1 β 1 , u 2 = αa 2 β 2 with a 1 = a 2 .We will only consider removing loops that do not contain the transitions producing the mismatching letters a 1 or a 2 .
In order to make things more precise we introduce some useful loop vocabulary.An so that there is no pair of configurations B, λ(B) with λ(C) = C which occur within the part D → µ(D) of the run.Similarly a simple synchronous loop is a simple loop over T × T .
In the following we will consider loops that are synchronous and simple.They will be of the shape . Moreover, we will ask that the automorphism satisfies µ(a 1 ) = a 1 and µ(a 2 ) = a 2 , this is done to be sure that removing or adding loops does not affect the fact that a 1 = a 2 (note that it would be enough to simply ask that µ(a 1 ) = a 1 ).We call such loops nice.With these constraints, if we have a sequence of configuration pairs in (ρ 1 , ρ 2 ) of length larger than R(4k + 2)Q 2 , we are sure to find a nice loop that preserves (a 1 , a 2 ).
We call the effect of a loop on ρ 1 , the length of the output factor removed from α, in particular the effect is 0 if the factor removed is in β 1 (and symmetrically for ρ 2 ).We call the net effect of a synchronous loop on ρ 1 , ρ 2 the difference between the effect in ρ 1 and the effect on ρ 2 .Loops with a positive, negative and null net effect are called positive, negative and null loops, respectively.
If there exists a null nice loop, then removing it preserves the mismatch and we are done.We split the proof into the two remaining cases: (1) either all nice loops are strictly positive (without loss of generality) or (2) some nice loops are strictly positive while others are strictly negative.In the first case, we will show that u has to be small.In the second case, we will show that, after removing all nice loops, we can repump (a small number of) positive and negative nice loops to realign the mismatch.
Let us consider a configuration (B 1 , B 2 ) in (ρ 1 , ρ 2 ).The effects of (B 1 , B 2 ) is the set of effects of nice loops starting in (C 1 , C 2 ) ending in (B 1 , B 2 ) (note that we consider any nice loop, not just the ones occurring in (ρ 1 , ρ 2 )).Then we say that (B 1 , B 2 ) is positive (resp.negative) if all its effect are positive (resp.negative).
We consider two cases, (1) either (ρ 1 , ρ 2 ) only has strictly positive configurations (without loss of generality) or ( 2) it has configurations with positive and negative effects (possibly different configurations).
Let us start with the first case, we observe two simple facts: the effect of a nice loop is bounded by R(4k + 2)|Q| 2 L and, similarly, the output length of a run without nice loops is bounded by R(4k + 2)|Q| 2 L. Let us denote by ∆ 0 the difference of output lengths |u 2 | − |u 1 |.Since there are no nice loops having 0 effect on ρ 1 this means that |β 1 | ≤ R(4k +2)|Q| 2 L, and thus ∆ 0 ≥ −R(4k + 2)|Q| 2 L. We denote by ∆ 1 the difference of output length after removing one nice loop from (ρ 1 , ρ 2 ).We observe that −R(4k +2)|Q| 2 L ≤ ∆ 0 < ∆ 1 since all nice loops must be strictly positive.We carry on removing nice loops until there are none left.Note that removing nice loops cannot introduce configurations with new effects: some configurations are erased, and to some an automorphism after removing l nice loops and obtaining a run without nice loops.Hence we get that l ≤ 2R(4k + 2)|Q| 2 L. This means that the runs ρ 1 , ρ 2 could not have been very large.In fact we have We only have left to consider the second case, that is, (ρ 1 , ρ 2 ) has configurations with positive and negative effects.Note that the effects of configurations belong to the interval [−R(4k + 2)|Q| 2 L, R(4k + 2)|Q| 2 L].Let d denote in the following the gcd of all effects of configurations in (ρ 1 , ρ 2 ).Let (B 1 1 , B 1 2 ), . . ., (B l 1 , B l 2 ) be configurations so that the gcd of their collective effects is d, and with at least one positive and one negative effect.We can assume that l ≤ R(4k + 2)|Q| 2 L. We remove nice loops without deleting these configurations.Note that removing loops may mean applying an automorphism to some of these configurations.However, the automorphisms always preserve (C 1 , C 2 , a 1 , a 2 ) so the effect set of the configuration is left unchanged.Also note that the effects of such loops are all multiples of d.After removing all these loops we are left with runs that are small (≤ (l + 1)R(4k + 2)|Q| 2 ) but the outputs a 1 , a 2 may very well be misaligned (by a factor of d).The idea is to use the configurations (B 1 1 , B 1 2 ), . . ., (B k 1 , B k 2 ) to pump simple loops into the run to realign the two mismatching outputs.Let us explain how these nice loops can be pumped into the runs: Let 2 ) be a nice loop.By applying µ −1 to α and the second part of β we obtain a run of the shape: , with the added effect of β.
Note that we have chosen the configurations carefully so that we can change the alignment by any multiple of d.The next lemma (whose proof can be found in Appendix A) shows that it is possible to find small iteration numbers for each loop so as to realign the outputs: Lemma 3.4 (Signed generalized Bézout identity).Let p 1 , . . ., p k ∈ Z\{0} be non-zero integers, such that at least two have different signs.Then there exist natural numbers n 1 , . . ., n k ≤ max(|p 1 | 3 , . . ., |p k | 3 ) such that: Using this lemma, we can change the alignment by d using only a polynomial number of times each loop (at most (R(4k + 2)|Q| 2 L) 3 for each loop).Since the runs are small, the misalignment is also small (at most (l + 1)R(4k + 2)|Q| 2 L) and we only need to repeat this operation a polynomial number of times.Finally since we have chosen automorphisms that preserve a 1 , a 2 , we are sure to obtain a mismatch.
End of Proof of Lemma 3.3 Proposition 3.5 (Functionality).There exists a polynomial P (x, y, z) such that the following holds.
Let R ⊆ D ω ×D ω be given by an NRT T with k registers, a state space Q and a maximum output length L. The following are equivalent: (1) R is not functional Proof.Let us assume that (1) holds, meaning that T has two accepting runs ρ 1 , ρ 2 over some word x ∈ D ω which produce different outputs.Let C 0 , C 1 , C 2 . . .denote the configurations of ρ 1 and C 0 , C 1 , C 2 . . . the ones of ρ 2 .Let us consider the orbits of pairs of configurations C i , C i .We know that there is a finite number of such orbits.We also know that an infinite number of such pairs is accepting in the first component and an infinite number is accepting in the second component.Thus we can see (ρ 1 , ρ 2 ) as a sequence of the following shape, with C and D final: Since the outputs are different and infinite then they mismatch at some position i.Then, there exists n such that u = u 0 v 0 • • • u n v n has produced at least i symbols, both for ρ 1 and ρ 2 .Hence we have shown that C 0 Let us assume that (2) holds: i.e. we have C 0 . We now only have to use some loop removal on v and w, just as in Proposition 3.2, in order to obtain words smaller than |Q| 2 R(4k).

Characterizing continuity.
Here we characterize continuity and uniform continuity using patterns similar to the one of functionality.Before doing so we introduce a property of configuration: a configuration is co-reachable if there is a final run from it.
For this we define a notion of critical pattern.
Definition 3.6.Let T be an NRT.A pair of runs of the form C 0 are co-reachable and one of the following holds: (a) u 1 u 2 , or (b) v i = and u j u i w i for {i, j} = {1, 2}, or (c) v 1 = v 2 = and u 1 w 1 u 2 w 2 We denote by Critical T (u, v, w, z, C 1 , µ(C 1 ), D 1 , C 2 , µ(C 2 ), D 2 ) (T is omitted when clear from context) the set of critical patterns.
Before characterizing continuity and uniform continuity, we show a small critical pattern property.
Claim 3.7 (Small critical pattern).There exists a polynomial P (x, y, z) such that the following holds.
Let T be an NRT, with k registers, a state space Q and a maximal output length L.
− −− → D 2 be a critical pattern.Then there exists u , v , w , z of length less than P (R(4k), |Q|, L) and Proof.We want to remove loops in u, v, w, z without affecting the mismatches.The idea is to see such a critical pattern as a pair of runs which mismatch and leverage Lemma 3.3.In order to make sure that the loops which are removed do not interfere with the intermediate configurations, we color the states of the transducer.We consider runs which start with red configurations, then the middle parts C 1 are colored in blue and the final parts are colored in green.Using Lemma 3.3, we obtain runs smaller than P (R(4k), 3|Q|, L) (the 3 factor comes from the coloring).Since the loops have to be removed in the monochromatic parts, we obtain the desired result.
Let us give a characterization of continuity and uniform continuity for functions given by an NRT.Proposition 3.8 (Continuity/uniform continuity).There exists a polynomial P (x, y, z) such that the following holds.Let f : D ω → D ω be given by an NRT T with k registers, a state space Q and a maximum output length L. The following are equivalent: (1) f is not uniformly continuous (resp.continuous) (2) there exists a critical pattern in Proof.Let us assume that (1) holds, meaning that f is not uniformly continuous (resp.not continuous) at some point x ∈ D ω .This means that there exists i such that for any n, there are two accepting runs ρ 1 , ρ 2 over x 1 , x 2 and producing y 1 , y 2 respectively such that |x ∧ x 1 ∧ x 2 | > n and |y 1 ∧ y 2 | < i − 1.Moreover, if f is not continuous, we can even assume that x 1 = x and ρ 1 = ρ, some accepting run over x.Let us consider some n > 2i , since u is large enough we have that some pair of configurations in ρ 1 , ρ 2 has to repeat at least 2i times, up to automorphism.If f is not continuous, we choose n large enough so that a final configuration appears at least 2i • |Q| 2 • R(2k) times in the first n transitions of ρ.That way we can ensure that some pair of configuration in ρ, ρ 2 repeats at least 2i times, up to automorphism, with the configuration of ρ being accepting.
Thus we obtain two sequences: We do a case analysis; note that the cases are not necessarily mutually exclusive.
Case (1) let us first assume that there is some index j ∈ {1, . . ., 2i} so that µ j (C) . Since the outputs y 1 , y 2 mismatch, we have some prefixes of Hence we obtain a critical pattern of shape (c).
Case (2) we assume that there are at least i indices j ∈ {1, . . ., 2i} such that v j = and at least i indices such that w j = .Then we have that v 0 • • • v 2i w 0 • • • w 2i and thus we get a critical pattern of shape (a).
Case (3), let us assume (without loss of generality) that there strictly fewer than i indices such that w j = .This means that ther must be at least i indices such that v j = , otherwise we refer back to case (1).Let us consider a prefix of ρ 2 C 0 Let j be such that w j = , then we add the loop corresponding to index j after the configuration (µ 2i (C), µ 2i (D)).Doing this may modify the mismatching letter of y 2 as to cancelling the mismatch, however if it is the case, we can simply add the loop twice, which guarantees that the mismatch is preserved.Thus we obtain a critical pattern of shape (b).
Let us assume that (3) holds.Then f is discontinuous at and is thus not uniformly continuous.Moreover, if C 1 is final we have that f is discontinuous at x ∈ dom(f ), and hence f is not continuous.
3.2.Deciding functionality, continuity and computability.We use a key property of oligomorphic structures, namely that orbits can be defined by first order formulas.
Let D = (D, Σ D ) be an oligomorphic structure.We denote by FO[Σ] the set of first-order formulas over signature Σ, and just FO if Σ is clear from the context.Proposition 3.9 [Boj19, Lemma 4.11].Let D be an oligomorphic structure and let k be a natural number.Any orbit of an element of D k is first-order definable.
We say that D is decidable if its Ryll-Nardzewski function is computable and FO[Σ] has decidable satisfiability problem over D.Moreover, we say that D is polynomially decidable if an orbit of D k can be expressed by an FO formula of polynomial size in k and the FO satisfiability problem is decidable in PSpace.One (but not us) could easily define a similar notion of exponentially decidable, or f -decidable for some fixed complexity function f .Roughly speaking the main automata problems which we will consider (emptiness, functionality, continuity, etc) will be PSpace (resp.decidable) whenever the structure D is polynomially decidable (resp.decidable).

3.2.1.
Computing the next letter.In this section, we show how to compute the next letter problem for NRT over a decidable representable oligomorphic structure D. By Theorems 2.15 and 2.14, this entails that continuity and computability coincide for functions defined by transducers over decidable representable oligomorphic structures, as stated in Theorem 3.12 below.
Before tackling the next letter problem, we consider the emptiness problem of register automata.
Proof.We show the result in case of a polynomially decidable structure, the more general case can be obtained by forgetting about complexity.Let D be a polynomially decidable oligomorphic structure and let T be an NRA with k registers and state space Q.Since D is polynomially decidable, any orbit of D k can be represented by a formula of size polynomial in k.This means that R(k) is exponential.Using the non-emptiness characterization from Proposition 3.2, we only need to find a run of length polynomial in Q and R(k).The idea is to use a counter bounded by this polynomial, using space in log(|Q|R(k)), and execute an NPSpace algorithm which will guess a run of the automaton and update the type of configurations in space polynomial in k and log(|Q|).Simulating the run goes like this: first the type of the configuration is initialized to q 0 , (d 0 , . . ., d 0 ).Then a new type φ(y 1 , . . ., y k ) is guessed, as well as a transition which we see as given by a state q and a formula ψ(x 1 , . . ., x k , y 1 , . . ., y k ).We check that the transition is valid by deciding the satisfiability of ∃y 1 , . . ., y k ψ(d 0 , . . ., d 0 , y 1 , . . ., y k ) ∧ φ(y 1 , . . ., y k ) which can be done in PSpace, by assumption.We thus move to the new configuration type given by q, φ and we continue the simulation.At some point when q is final, we keep the configuration type in memory and guess that we will see it again.
Lemma 3.11.Let f : D ω → D ω be a function defined by an NRT over a decidable representable oligomorphic structure D.Then, its next letter problem is computable.
Proof.In the next letter problem we get as input two words u, v ∈ D * .Our first goal is to decide whether there exists d ∈ D such that f (uD ω ) ⊆ vdD ω .We check the negation of this property, i.e. we try to exhibit two runs C 0 The non-existence of such runs only depends on the type of u, v, hence we can define an automaton which simulates T and starts by reading some input of the type of u and checks whether there is a mismatch occurring before the |v| outputs, which can be done by adding one register to store the mismatch, and two |v|-bounded counters in memory (recall that v is given as input).It finally checks that the reached configurations are co-reachable by guessing some continuation for each and simulating T over it.Thus we reduce the non-existence of a next letter to the non-emptiness of an automaton, which is decidable.
Once we know that such a next letter exists, we only have to simulate any run of T over uw for an arbitrary w ∈ D ω such that uw ∈ dom(T ), and see what the |v| + 1 th output is (note that we can avoid -producing loops, so this data value will be output in a finite number of steps).To be able to simulate T over uw, we use the fact that D is representable and decidable.For every transition that we want to take, from decidability we can check whether the transition is possible.Then, once we know the transition is possible, we can enumerate the representations of elements of D and check that they satisfy the transition formula.
As a direct corollary of Lemma 3.11, Theorem 2.15 and Theorem 2.14, we obtain: Theorem 3.12.Let f : D ω → D ω be a function defined by an NRT over a decidable oligomorphic structure D, and let m : N → N be a total function.Then, Deciding functionality, continuity and computability.Theorem 3.13.Given a decidable (resp.polynomially decidable) oligomorphic structure D functionality, continuity and uniform continuity are decidable (resp.PSpace-c) for functions given by NRT.As a consequence, if D is representable, then computability and uniform computability are decidable (resp.PSpace-c).
Proof.The proofs are very similar, whether we consider functionality, continuity or uniform continuity.Let us show the result for functionality.Moreover we assume that D is polynomially decidable, the argument in the more general case can easily be obtained just by forgetting about complexity.
Let us consider an NRT T with k registers, state space Q and maximum output length L. We want to show that we can decide the existence of two runs with a mismatch.From the characterization given in Proposition 3.5, we know that the pattern we are looking for is small.We consider a counter bounded by the value 3P (R(4k), |Q|, L), which can be represented using polynomial space because R(4k) is exponential in k (D is polynomially decidable).Our goal is to simulate T and exhibit a pattern of length bounded by that counter.As we have seen before, we can easily simulate runs of T in PSpace.The additional difficulty here is that at some point we have to check that two output positions mismatch.We use two additional counters which will ensure that the two mismatching outputs correspond to the same position.Let us now describe how the algorithm goes, in a high-level manner.We start by initializing two runs in parallel, as well as our counters.We keep in memory the 2k-type of the two configurations, which can be done in polynomial space since D is polynomially decidable.We keep guessing in parallel two transitions for our runs and updating the 2k-type using the fact that satisfiability of FO is in PSpace.Every time a run outputs some letter, its counter is incremented.At some point we may guess that we output the mismatching value in one of the runs, in which case we stop the counter corresponding to that run.We crucially also need to be able to check later that the value output mismatches.In order to do this we keep in memory a 2k + 1-type, always keeping the value which we output.At some point we output the second mismatching position, we check that the counters coincide and that the outputs are indeed different, which is given by the 2k + 1-type.In parallel, 4.1.On loop iteration.
The NRA of Example 4.2 is non-empty in Q + , since it accepts e.g. the word 1 However, it is empty in N. Indeed, any data word compatible with its only infinite run necessarily forms an infinite descending chain, which is impossible in N. Similarly, in Example 4.3, the NRA initially guesses some upper bound B which it stores in r M , and then asks to see an infinite increasing chain which is bounded from above by B. This is possible in Q + , but not in N.
That is why we need to study more closely what makes a given path ω-iterable, i.e. that can be taken an infinite number of times.To characterise continuity, we will also need the weaker notion of iterable path, i.e. of a path that can be taken arbitarily many times over finite inputs which are increasing for the prefix order.For instance, the loop in Example 4.2 is not iterable: the first letter in the input sets a bound on the number of times it can be taken.The loop in Example 4.3 is iterable: it suffices to guess bigger and bigger values of the initial upper bound.However, there can be no infinite run which contains infinitely many occurrences of such loop, as the value that is initially guessed for a given run sets a bound on the number of times the loop can be taken, so it is not ω-iterable.
We show that the notions of iterability and ω-iterability are both characterised by properties on the order between registers of a pair of configurations, which can be summed up into a type, hence opening the way to deciding such properties.4.2.Q-types.In our study, the relative order between registers plays a key role.Such information is summed up by the type of the configuration, interpreted as a configuration in Q + .
Since we will need to manipulate different types of copies of some set of registers, we adopt the following convention: Convention 4.4.In the following, we assume that for a set of registers R, R 1 and R 2 are two disjoint copies of R, whose elements are respectively r 1 and r 2 for r ∈ R. Similarly, R is a primed copy of R, whose elements are r for r ∈ R. Note that the two can be combined to get R 1 , R 2 .Note also that primes and indices are also used as usual notations, but no ambiguity should arise.Definition 4.5.For a register valuation d : R → N, we define τ ( d) as τ Q + ( d) the type of the valuation in Q + , i.e. an FO-formula describing its orbit (such an FO-formula exists by Proposition 3.9 since Q + is oligomorphic).Note that such type can be represented e.g. by the formula ∈{<,>,=} r,r ∈R| d(r) d(r ) r r ∧ r∈R| d(r)=0 r = 0. We extend the notion to configurations (p, d) ∈ Q × N R by letting τ ((p, d)) = (p, τ ( d)).Thus, the type specifies the current state, and summarises the information of the order between registers, as well as whether they are equal to 0 or not.We will also need to have access to the relative order between registers of two configurations.Thus, for two register valuations d1 , d2 : R → N, we define σ( d1 , d2 ) = τ Q + ( d1 d 2 ), where d1 d 2 is the disjoint union of d1 and of a primed copy of d2 , so that the registers of d2 can be distinguished from those of d1 .We then have, for all registers r, s ∈ R and all relations ∈ {<, >, =} that σ( d1 , d2 ) ⇒ r s if and only if d1 (r) d2 (s).Again, the definition is naturally lifted to configurations by letting σ((p, d1 ), (q, d2 )) = (p, q, σ( d1 , d2 )).
The core property is the following: Property 4.7.Let R be a set of registers, and let σ be a Q-type defined over R R , where R is a primed copy of R. We say that σ has the property for the set of registers X ⊆ R if: By extension, for two configurations C and C over R, we say that C and C have the property for the set of registers X ⊆ R if σ(C, C ) has the property for X.
Finally, when X = R, we simply state that σ has the property.
Such property ensures, for the considered subset of registers, that they cannot induce infinite descending chains nor infinite bounded increasing chains (as both are not feasible in N), if a run loops over configurations whose pairwise type is σ.

Relations between machines over N and over
There is a tight relation between machines operating over N and over Q + .First, since N is a subdomain of Q + , runs in N are also runs in Q + .Over finite runs, by multiplying all data values by the product of their denominators, we can get the converse property.
Proof.By writing X = p 1 q 1 , . . ., pn qn , let K = i q i .Then λ : d → Kd is an automorphism satisfying the required properties.
We then get the following: Proposition 4.9.Let A be a NRA over Q + , and let ν and ν be Q-types.
If Before showing this proposition, let us introduce some intermediate notions: Definition 4.12.Let d, d be two register valuations over Q + such that τ ( d) = τ ( d ).We say that d is wider than d whenever for any r, s ∈ R, we have: Note that the second item of the definition is required to ensure that the interval between d (r) and 0 is also wider than the interval between d(r) and 0.
The notion is extended to configurations by saying that C = (p , d ) is wider than C = (p, d) if d is wider than d.In the following, we only apply this notion to configurations C and C that have the same state, i.e. p = p .Proof.First, assume that there exists some register r 0 ∈ R such that σ ⇒ r 0 = 0 (thus σ ⇒ r 0 = 0, since we assumed that σ |R = σ |R ).If this is not the case, consider instead the type σ 0 = σ ∧ r 0 = 0 ∧ r 0 = 0 over R {r 0 }.We need to show that given a pair of valuations ē and ē such that σ(ē, ē ) = σ, if they have k > 0 intervals that shrink, we can exhibit a pair of valuations d and d such that σ( d, d ) = σ and which has l < k intervals that shrink.
By iteratively applying this process to (ē, ē ) until no shrinking intervals remain, we get a pair ( d, d ) which is such that σ( d, d ) = σ and d is wider than d.Now, by multiplying all data values in d and d by the product of their denominators, we get two valuations f and f which are in N such that σ( f , f ) = σ and f is wider than f .We finally need the following technical result: Then, apply it to each interval [a i ; a i+1 ] to get a family of increasing and bijective functions (µ i ) 0≤i<k which are such that µ i ([a i ;  Proof.Assume (2) holds.The result easily follows from Propositions 4.9, 4.11 and 4.16.

Assume now that
. .be an accepting run over input x = d 0 d 1 . . . in A (where C 0 = (q 0 , 0)).For each i ≥ 0, let ν i = τ (C i ).As ρ is acccepting and there are only finitely many types, we get that there exists some type ν such that the state is accepting and (q i , ν i ) = (q, ν) for infinitely many i ∈ N. Let (C j ) j∈N be an infinite subsequence of C i such that for all j, τ (C j ) = ν.Now, colour the set of unordered pairs as follows: c ({τ (C j ), τ (C k )}) = σ(C j , C k ) (where we assume w.l.o.g. that j < k).By Ramsey's theorem, there is an infinite subset such that all pairs have the same colour σ.Let (C k ) k∈N be an infinite subsequence such that for all j < k, σ(C j , C k ) = σ.Now, assume that σ breaks the property.There are two cases: • There exists some r such that σ ⇒ r > r .Then, it means that for all j < k, C j (r) > C k (r).
In particular, this means that C 0 (r) > C 1 (r) > • • • > C n (r) . . ., which yields an infinite descending chain in N, and leads to a contradiction.• There exists some s such that σ ⇒ s = s and some r which satisfies σ ⇒ r < s and σ ⇒ r = r .If σ ⇒ r > r , we are back to the first case.Otherwise, it means σ ⇒ r < r .Then, on the one hand, C 0 (r) . . .But we also have that for all k ∈ N, C k (r) < C k (s) = C 0 (s).Overall, we get an infinite increasing chain which is bounded from above by C 0 (s), which again leads to a contradiction.
Thus, σ satisfies the property.So, this is in particular the case for some pair of configurations C = D = C k and D = C k for some k < k taken from the last extracted subsequence.Such configurations are such that (recall that the C k are configurations of an accepting run over some input, which is in particular initial): Proof.The algorithm is similar to the one for deciding non-emptiness for NRA over oligomorphic domains.Indeed, the sought witness lies in Q + , which is oligomorphic; it suffices to additionally check that the pairwise type of D and D satisfies the star property.Thus, the algorithm initially guesses τ (C) and σ.Then, checking that there indeed exists a configuration whose type is τ (C) and that can be reached from C 0 (item 2a of Propostion 4.17) can be done in the same way as for Theorem 3.13, by simulating symbolically (i.e. over Q-types) a run of the automaton.Now, for item 2b, the algorithm again symbolically simulates a run from D, by keeping track of the type of the current configuration τ (D ), and additionally of the pairwise type σ(D, D ).Since σ(D, D ) is a Q-type over 2|R| registers, it can be stored in polynomial space; moreover, given a transition test φ, it can also be updated in polynomial space.4.5.Functionality.Following the study of the relationships between N and Q, we are now ready to provide a characterization of non functionality over N. Intuitively, it amounts to finding two pairs of runs whose inputs are in Q: first, a prefix witnessing a mismatch, and second, an accepting loop satisfying the property to ensure its iterability over N.
Proposition 4.19 (Functionality).Let R ⊆ N ω × N ω be given by an NRT T .The following are equivalent: (1) R is not functional (2) there exist two pairs of runs whose input words belong to Q * + , which are as follows: Proof.First, assume that (2) holds.By applying Proposition 4.11 to the product transducer T × T , there exist two configurations E 1 and E 2 and an infinite data word x ∈ N ω such that − −− →.Moreover, since automorphisms preserve mismatches, we know that u 1 u 2 .Thus, we obtained a witness of non-functionality, since we have (u x, u 1 y 1 ), (u x, u 2 y 2 ) ∈ T , with u 1 y 1 = u 2 y 2 since u 1 u 2 .
We now assume that R is not functional.By definition, and as we assume R only contains infinite output words, there are two runs on some input word x whose outputs mismatch.By splitting both runs after the first mismatch, we get two runs C 0 which starts by guessing some configuration E 1 E 2 and checks that τ (E 1 E 2 ) = τ (B 1 B 2 ), then simulates T × T .Such language is non-empty, since it at least contains w.By Proposition 4.17, we get that there exist runs whose input words belong to . Thus, by applying an automorphism µ such that µ(B 1 ) = E 1 , µ(B 2 ) = E 2 , such runs can be glued with the runs C 0 with u 1 u 2 since µ(t 1 ) µ(t 2 ) (recall that automorphisms preserve mismatches, since they are bijective), so we get item 2a.
Corollary 4.20.Functionality for relations over N ω × N ω given by NRT is decidable in PSpace.
Proof.By Lemma 3.3, if item 2a holds, then we can assume that the length of u is bounded by P (R(4k), |Q|, L), where R denotes the Ryll-Nardzewski function of Q + , which is exponential.Thus, the existence of u can be checked with a counter that is polynomially bounded.Then, item 2b can be checked in polynomial space, since it reduces to checking emptiness of the NRA A that we described in the above proof.4.6.Next-letter problem.We now show that for any function definable by an NRT over N, the next-letter problem is computable.Lemma 4.21.Let f : N ω → N ω be a function defined by an NRT over N.Then, its next-letter problem is computable.
Proof.The algorithm is in two phases: (1) decide whether there exists a next letter (2) if there exists a next letter, compute it Recall that as input to the next-letter problem, there are two finite data words u, v ∈ N * and the goal is to decide whether there exists some d ∈ N such that for all uy ∈ dom(f ), v ≤ f (uy) implies vd ≤ f (uy).Let us assume that f is defined by some NRT T = (Q, R, ∆, q 0 , c 0 , F ). Let us explain how to algorithmically realize the two latter steps.
1. To decide the existence of such a d, we reduce the problem to a functionality problem for an NRT T uv .First, let us define the convolution x 1 ⊗ x 2 of two data words respectively.The constructions are similar for both: T 1 uv ignores the even position of the input word after u has been read while T 2 uv ignores the odd position after u has been read, but they otherwise are defined in the same way.Let us explain how to construct T 1 uv .First, T 1 uv makes sure that its input α ⊗ β is such that u ≤ α and u ≤ β, or equivalently that α ⊗ β = (u ⊗ u)(x ⊗ y) for some x, y.This is possible by hardcoding u in the transitions of T .Likewise, T 1 uv also makes sure that v is a prefix of f (ux).It is also possible by hardcoding in T the output v (to check for instance that a run of T output the ith data value d i of v, it suffices when T outputs a register r on its transitions, to add the test r = d i ).So, T 1 uv simulates a run of T on ux (the odd positions of α ⊗ β) and a run of T on uy (the even positions of α ⊗ β).Once v has been consumed by the simulated run on ux, the first time this simulated run outputs something, the data value is kept in a special register and outputted all the time by T 1 uv .2. If we know that there exists a next letter d, the only thing that remains to be done is to compute it.To do so, we can again construct a transducer T uv which simulates T but makes sure to accept only input words that start with u, accepted by runs which outputs words starting with v.This can again be done by hardcoding u and v in T .Then, to compute a data value d, it suffices to execute T uv by computing, at any point i, all the configurations reached by T uv , and by keeping only those which are co-reachable.Testing whether a configuration is co-reachable can be done by testing the non-emptiness of an NRA starting in this initial configuration.Doing so, the algorithm computes all prefixes of accepting runs.Eventually, since there exists a next letter d, one of the run will output it.
As a direct corollary of Lemma 4.21, Theorem 2.15 and Theorem 2.14, we obtain: Theorem 4.22.Let f : N ω → N ω be a function defined by an NRT over N, and let m : N → N be a total function.Then, Uniform continuity.We now turn to uniform continuity over N, and show that it is enough to consider uniform continuity over Q + and restrict our attention to configurations that are co-reachable w.r.t.data words over N.
Given a configuration Q-type τ , we say that it is co-reachable in N if there is an actual configuration C of type τ which is co-reachable.Proof.Let T denote the same transducer as T except that (1) it is over Q and (2) it is restricted to configurations which are co-reachable in N.
We claim that T realizes a uniformly continuous function if and only if T does.From Proposition 3.8, this is enough to show the expected result.
Any run over T is in particular a run over T , hence if T is not uniformly continuous then, in particular, T is not either.Conversely, let us assume that T is not uniformly continuous.
According to Proposition 3.8, this means that we can exhibit a critical pattern C 0 ).Note that it could be that µ n cancels the mismatch, in which case we can consider µ n+1 .Since µ n (D 1 ) and µ n (D 2 ) are co-reachable, we can use Proposition 4.16 and we obtain the result.
As a corollary, we obtain: Theorem 4.24.Let f : N ω → N ω be a function defined by an NRT over N. Deciding its uniform continuity is PSpace-c.
Proof.We are left to show that uniform continuity of T is in PSpace.This problem is in PSpace from Theorem 3.13.We have to be careful however, since computing T explicitly may be too costly.The trick is that checking if a configuration is co-reachable can be done on the fly in PSpace, using Proposition 4.17 and Corollary 4.18.
The complexity lower bound can again be obtained by reducing the problem to emptiness of register automata over (N, {=}), which is PSpace-c [DL09].4.8.Continuity.We end our study with the property of continuity of NRT over N.
Assumption 4.25.To simplify the following statement, we assume that transducers are equipped with a distinguished register r m which along the run stores the maximal data value seen in the input so far.Proposition 4.26 (Continuity).Let f : N ω → N ω be given by an NRT T over N. The following are equivalent: (1) f is not continuous (2) there exists a critical pattern in Critical(u, v, w, z, C 1 , C 2 , C 1 , C 2 , D 1 , D 2 ) with u, v, w, z ∈ Q * + , where C 1 is final, D 1 and D 2 are co-reachable in N and such that σ = τ ((C 1 C 2 ) (C 1 C 2 )) satisfies the property for Proof of (1) ⇒ (2).Assume first that f is not continuous.Let x ∈ N ω , and let (x n ) n∈N be such that ∀n ∈ N, x n ∈ dom(f ) x n − − → n∞ x but f (x n ) − − → n∞ f (x).Up to extracting subsequences, we can assume w.l.o.g. that there exists some k ∈ N such that for all n ∈ N, |f (x) ∧ f (x n )| ≤ k.We denote by ρ a run of T over x yielding output f (x), and by (ρ n ) n∈N a sequence of runs of T such that ρ n yields output f (x n ) over input f (x).
First, since the set ∆ of transitions of T is finite, ∆ ω is compact (cf Remark 2.1), so (ρ n ) n∈N admits a converging subsequence, so we can assume w.l.o.g. that (x n ) n∈N is such that (ρ n ) n∈N converges to some infinite sequence of transitions π.
Remark 4.27.Note however that π is not necessarily a run over some concrete data word: since transducers are allowed to guess arbitrary data value, we do not have the property that after reading input u, the configuration of the transducer takes its values in data(u) ∪ {0}, which would allow to build a concrete run by extracting subsequences of runs whose configurations coincide on longer and longer prefixes.If we disallow guessing, such property is restored, which greatly simplifies the proof.Indeed, then, we can require that σ has the property, without allowing some wild registers to go astray (namely those that are above r k , which necessarily correspond to data values that have been guessed, otherwise their content is at most equal to the one of r m ), and having two runs that can be instantiated by actual data words allow to extract σ with a Ramsey argument which is similar to the one used for emptiness (see Proposition 4.17).Now, let (E i ) i∈N be the sequence of configurations of ρ, and, for each ρ n , let (C n,i ) i∈N be its corresponding sequence of configurations.Then, for all 0 ≤ i < j, let τ n,i = τ (C n,i ) and σ n,i,j = σ(E i C n,i , E j C n,j ).Since the τ n,i and σ n,i,j take their values in a finite set, by using compactness arguments, we can extract two subsequences (τ n,i ) n,i∈N and (σ n,i,j ) n∈N,0≤i<j which respectively converge to (τ i ) i∈N and to a family (σ i,j ) 0≤i<j .Formally, we require that for all M ≥ 0, there exists some N ≥ 0 such that for all n ≥ N , we have that τ n,i = τ i and σ n,i,j = σ i,j for all 0 ≤ i < j ≤ M (note that for types τ n,i , this corresponds to convergence for infinite words).By first restricting to final configurations in ρ (we know there are infinitely many since ρ is accepting), we can assume that all E i are final.We further restrict to E i which all have the same type ν (there is at least one type which repeats infinitely often).To avoid cluttering the notations, we name again (ρ n ) n∈N the corresponding subsequence of runs, (τ n,i ) n,i∈N the corresponding types, and (σ n,i,j ) n,i,j their associated family of pairwise types.Finally, by applying Ramsey's theorem to (τ i ) i∈N and (σ i,j ) 0≤i<j , we know that there exists some type τ , some pairwise type σ and some infinite subset I ⊆ N such that for all i, j ∈ I such that i < j, τ i = τ and σ i,j = σ.For simplicity, we reindex the (E j ) j∈I and the (C n,j ) j∈I over N, that we again name (E j ) j∈N and (C n,i ) i∈N .Now, assume by contradiction that σ does not have the property for X = R 1 ∪ R l 2 .There are two cases, that we treat iteratively: • There exists some r ∈ X such that σ ⇒ r > r .There are two subcases: -If there exists such r ∈ R 1 , then we get that for all 0 ≤ i < j, E i (r) > E j (r), which immediately yields an infinite descending chain in N, and hence a contradiction.-If there exists such r ∈ R l 2 , then let r M be such that σ ⇒ r ≤ r M .Since r M ∈ R 1 , we know that σ ⇒ r M ≤ r M , otherwise we are back to the previous case.Then, let N ∈ N be such that σ N,i,j = σ for all 0 ≤ i < j ≤ B = E 1 (r M ) + 1.Such N necessarily exists since we took the (ρ n ) n∈N such that the (σ n,i,j ) 0≤i<j converges.Thus, E 1 (r M ) ≥ C N,0 (r) > C N,1 (r) > . . .C N,B (r), which again yields a contradiction.
• Assume now that there exists r, s ∈ X such that σ ⇒ s = s , σ ⇒ r ≤ s but σ ⇒ r < r .
There are again two subcases: -If s ∈ R 1 , then we know that for all i ∈ N, E i (s) = E 0 (s).Now, if r ∈ R 1 , then we get that E 0 (r) < E 1 (r) < . . .but for all i ∈ N, E i (r) < E i (s), which leads to a contradiction.If r ∈ R l 2 , then let N be such that σ N,i,j = σ for all 0 ≤ i < j ≤ B = E 0 (s) + 1.We then get a strictly increasing chain C N,0 (r) < C N,1 (r) < • • • < C N,B (r) of length B which is bounded from above by B − 1, which does not exist in N.
-If s ∈ R l 2 then let r M ∈ R 1 be such that σ ⇒ s ≤ r M .Then, let B = E 1 (r M ) + 1, and let N be such that σ N,i,j = σ for all 0 ≤ i < j ≤ B. If r ∈ R 1 then we have that synthesise a computable function realizing it?In [HKT12,FLZ11], this question has been shown to be decidable for specifications with total input domain (any input word has at least one correct output by the specification).More precisely, it is shown that realizability by a continuous function is decidable, but it turns out that the synthesised function is definable by a deterministic transducer (hence computable).When the domain of the specification is partial, the situation changes drastically: deterministic transducers may not suffice to realize a specification realizable by a computable function.This can be seen by considering the (partial) function g of Introduction, seen as a specification and casted to a finite alphabet {a, b, c}: it is not computable by a deterministic transducer, since it requires an unbounded amount of memory to compute this function.

Figure 1 :
Figure 1: An NRT defining the data word function g, equipped with a Büchi condition.The current data value denoted by is tested with respect to the content of the registers on the left of the bar |.On the right of the bar, there are instructions such as assigning an arbitrary data value to r (notation ?r), outputting the content of a register or nothing (out r), or assigning the current data value to some register (↓ r).The Büchi condition makes sure that the first data value, initially stored in r s during the first transition, occurs infinitely many times.The register r c stores the last data value that has been read.r o is meant to store the last data value d i of an input chunk u i .It has to be guessed whenever a new chunk u i is starting to be read, and on reading again r s , the automaton checks that the guess was right by evaluating whether r c = r o (at that moment, r c contains d i ).

Proposition 2. 7 .
Let D be an oligomorphic structure and let f : D ω → D ω be an equivariant function.Then f is uniformly continuous if and only if it is Cauchy continuous.Proof.It is clear that a uniformly continuous function is in particular Cauchy continuous.Let D be an oligomorphic structure and let f : D ω → D ω be an equivariant function.Let us assume that f is not uniformly continuous.This means that there exists i ∈ N and a sequence (x n , y n ) n∈N such that for all n, |x n ∧y n | ≥ n and |f (x n )∧f (y n )| ≤ i.Let us consider the sequence ([x n ], [y n ]) n∈N of pairs of elements in D ω /Aut(D), i.e. words are seen up to automorphism.Using standard arguments, one can show that the set D ω /Aut(D), equipped with the distance d

4
while d = none do 5 output d; // write d on the output tape 6 v := vd; 7 d := Next f (x[:i], v); 8 end /* end while loop when d = none */ 9 end µ(D) such that µ(C) = C.The shorter run C µ(u)|µ(v) − −−−−− → µ(D) is thus called the run obtained after removing the loop.Proposition 3.1 (Small run witness).let T be an NRT with k registers and state space Q, and let C u|v − − → D be a run.Then there exists u , v with |u | ≤ |Q| • R(2k) such that C u |v − −− → D.
there exist two configurations C = (p, d), C = (q, d ) where d, d : R → Q + are such that τ ( d) = ν, τ ( d ) = ν and if there exists a data word v ∈ Q * + such that C u − → C , then there also exist two configurations D = (p, ē), D = (q, ē ) and a data word w which satisfy the same properties, i.e. τ (D) = ν, τ (D ) = ν and D w − → D ; and which belong to N, i.e. such that ē, ē : R → N and w ∈ N * .Proof.Let A be a NRA over Q + , and assume that C u − → C .By applying Proposition 4.8 to X = C(R) ∪ C (R) ∪ data(u) (states do not play a role here), we get that λ(C) λ(u) −−→ λ(C ) is also a run of A, and D = λ(C), D = λ(C ) and w = λ(u) satisfy the required properties.Remark 4.10.As a corollary, we obtain that for any NRA A over finite words, L N (A) = ∅ if and only if L Q + (A) = ∅.Note that such property does not hold over infinite runs, as witnessed by Examples 4.2 and 4.3.The property ensures that a loop can be iterated in N, as shown in the next key proposition: Proposition 4.11.Let T be an NRT and assume that B u − → B following some sequence of transitions π, where τ (B) = τ (B ), u ∈ Q * + and B and B have the property .Then there exists an infinite run D x − → over the sequence of transitions π ω , with x ∈ N ω and τ (D) = τ (B).
Proposition 4.13.Let σ be a type over R R such that σ |R = σ |R .If σ has the property, then there exist two register valuations d and d in N such that σ( d, d ) = σ and such that d is wider than d.
Indeed, if d and d are two valuations in N such that σ( d, d ) = σ 0 and d is wider than d , then d|R and d |R are two valuations in N such that σ( d, d ) = σ and d |R is wider than d|R .Now, for a pair of valuations ( d, d ), define its shrinking intervals: S( d, d ) = {(r, s) | | d (s) − d (r)| < | d(s) − d(r)|}, and say that ( d, d ) has k = |S( d, d )| shrinking intervals.
and satisfies µ(N) ⊆ N. We are now ready to prove Proposition 4.11: Proof of Proposition 4.11.Let T be an NRT and assume that B u − → π B following some sequence of transitions π, where τ (B) = τ (B ), u ∈ Q * + and B and B have the property .Let σ = σ(B, B ).By Proposition 4.13, we know that there exist two configurations C and C in N such that σ(C, C ) = σ and C is wider than C. Let ν ∈ Aut(Q + ) be some automorphism such that ν(B) = C and ν(B ) = C (such an automorphism exists since σ(B, B ) = σ(C, C )).Then, we have that C ν(u) −−→ π C .By multiplying all involved data values by their common denominator (cf Propostion 4.8), we get two configurations D and D , along with some data word v, all belonging to N, such that D v − → π D , and such that D is wider than D. By Proposition 4.14, there exists an automorphism µ ∈ Aut(Q + ) such that µ(D) = D and µ(N) ⊆ N. Thus, by letting x = vµ(v)µ 2 (v) . . ., we get that D D) . . . is a run over x ∈ N ω over the sequence of transitions π ω , and τ (D) = τ (B).A last important property is the following: Proposition 4.16.Let A be a NRA over Q + , and assume that C u − → C and that C v − →, where τ (C ) = τ (C ), u ∈ Q * + and v ∈ N ω .Then there exist w ∈ N * , x ∈ N ω and two configurations D, D whose valuations take their values in N such that D w − → D x − →, τ (C) = τ (D) and τ (C ) = τ (D ).
. Moreover, both runs are accepting as each finite run is required to visit a final state of T .Now, since τ(E 1 E 2 ) = τ (D 1 D 2 ) = τ (C 1 C 2 ),we can apply Proposition 4.16 to get two runs C 0 with t 1 t 2 (note that we do not necessarily have that y = z).Now, from the product transducer T × T , one can define an NRA A with registers R R recognising the language L Proposition 4.23.Let T be an NRT over (N, {<, 0}) and f = T .The following are equivalent:• f is uniformly continuous, • There is a critical pattern (see Definition 3.6) with D 1 , D 2 co-reachable in N.