Computability of Data-Word Transductions over Different Data Domains
Léo Exibard, Emmanuel Filiot, Nathan Lhote, Pierre-Alain Reynier
aa r X i v : . [ c s . F L ] J a n COMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVERDIFFERENT DATA DOMAINS
L´EO EXIBARD, EMMANUEL FILIOT, NATHAN LHOTE, AND PIERRE-ALAIN REYNIERUniversit´e Libre de Bruxelles, Brussels, Belgium and Aix Marseille Univ, Universit´e de Toulon,CNRS, LIS, Marseille, France e-mail address : [email protected]´e Libre de Bruxelles, Brussels, BelgiumAix Marseille Univ, Universit´e de Toulon, CNRS, LIS, Marseille, FranceAix Marseille Univ, Universit´e de Toulon, CNRS, LIS, Marseille, France
Abstract.
In this paper, we investigate the problem of synthesizing computable functionsof infinite words over an infinite alphabet (data ω -words). The notion of computability isdefined through Turing machines with infinite inputs which can produce the correspondinginfinite 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 ofdata ω -words. In order to increase the expressive power of these machines, we even allowguessing of arbitrary data values when updating their registers.For functions over data ω -words, we identify a sufficient condition (the possibility ofdetermining the next letter to be outputted, which we call next letter problem) underwhich computability (resp. uniform computability) and continuity (resp. uniform continu-ity) coincide.We focus on two kinds of data domains: first, the general setting of oligomorphicdata, which encompasses any data domain with equality, as well as the setting of rationalnumbers with linear order; and second, the set of natural numbers equipped with linearorder. For both settings, we prove that functionality, i.e. determining whether the relationrecognized 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) continuityand (uniform) computability. Last, we provide characterizations of (uniform) continuity,which allow us to prove that these notions, and thus also (uniform) computability, aredecidable. We even show that all these decision problems are PSpace -complete for ( N , < )and for a large class of oligomorphic data domains, including for instance ( Q , < ). Key words and phrases:
Data Words and Register Automata and Register Transducers and Functionalityand Continuity and Computability.Funded by a FRIA fellowship from the F.R.S.-FNRS..Research associate of F.R.S.-FNRS. Supported by the ARC Project Transform F´ed´eration Wallonie-Bruxelles and the FNRS CDR J013116F; MIS F451019F projects.Partly funded by the ANR projects DeLTA (ANR-16-CE40-0007) and Ticktac (ANR-18-CE40-0015).Partly funded by the ANR projects DeLTA (ANR-16-CE40-0007) and Ticktac (ANR-18-CE40-0015).
Preprint submitted toLogical Methods in Computer Science © L. Exibard, E. Filiot, N. Lhote, and P.-A. Reynier CC (cid:13) Creative Commons
L. EXIBARD, E. FILIOT, N. LHOTE, AND P.-A. REYNIER
Contents
Introduction 21. Data alphabet, languages and transducers 71.1. Data as logical structures 71.2. Words and data words 81.3. Functions and relations 81.4. Register transducers 82. Continuity and computability 102.1. Continuity notions 102.2. Computability notions 122.3. Computability versus continuity 133. Oligomorphic data 153.1. Characterizing functionality and continuity 153.2. Deciding functionality, continuity and computability 204. A non oligomorphic case: ( N , { <, } ) 234.1. On loop iteration 234.2. Q -types 244.3. Relations between machines over N and over Q + Introduction
Synthesis.
Program synthesis aims at deriving, in an automatic way, a program that fulfilsa given specification. It is very appealing when for instance the specification describes, insome abstract formalism (an automaton or ideally a logic), important properties that theprogram must satisfy. The synthesised program is then correct-by-construction with regardto those properties. It is particularly important and desirable for the design of safety-criticalsystems 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 anda set of outputs Out , and relate two classes S and I of specifications and implementationsrespectively. 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 representationof a) specification S ∈ S , whether there exists I ∈ I such that for all u ∈ In , ( u, I ( u )) ∈ S . Ifsuch I exists, then the procedure must return a program implementing I . If all specifications OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 3 in S are functional , in the sense that they are the graphs of functions from In to Out , thenthe ( 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 automata-theoretic approach to synthesis, in the sense that specifications and implementations canbe defined by automata, or by automata extended with outputs called transducers . In thisapproach, 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 celebratedresult of B¨uchi and Landweber [JL69]: S is the class of ω -regular specifications, whichrelates infinite input words i i · · · ∈ Σ ω to infinite output words o o · · · ∈ Γ ω through ω -automata (e.g. deterministic parity automata), in the sense that the infinite convolution i o i o · · · ∈ (ΣΓ) ω must be accepted by an ω -automaton defining the specification. Theclass of implementations I is all the functions which can be defined by Mealy machines, orequivalently, deterministic synchronous transducers which, whenever they read some input i ∈ Σ, produce some output o ∈ Γ and possibly change their own internal state. Theseminal result of B¨uchi and Landweber has recently triggered a lot of research in reactivesystem synthesis and game theory, both on the theoretical and practical sides, see forinstance [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 asingle 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 specificationis not realizable by a synchronous transducer, then a classical synthesis algorithm stopswith a negative answer. However, the specification could be realizable in a larger class ofimplementations I . As an example, if S is the set of words i o . . . 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 productionby one time unit. Enlarging the class of implementations can therefore allow to give fineranswers to the synthesis problem in cases where the specification is not synchronouslyrealizable. We refer to this type of relaxations as asynchronous implementations. Anasynchronous implementation can be modelled in automata-theoretic terms as a transducerwhich, 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 havebeen considered in [HKT12, FLZ11, WZ20]. In these works however, the specification isstill synchronous, given by an automaton which strictly alternates between reading inputand output symbols.The synchronicity assumption made by classical reactive synthesis is motivated by thefact that such methods focus on the control of systems rather than on the data, in thesense that input symbols are Boolean signals issued by some environment, and outputsymbols 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 systemswhich need to process streams of data, like a monitoring system or a system which cleansnoisy data coming from sensors, cannot be addressed using classical ω -regular synthesis.Therefore, one needs to extend specifications to asynchronous specifications, in the sensethat the specifications must describe properties of executions which do not strictly alternate L. EXIBARD, E. FILIOT, N. LHOTE, AND P.-A. REYNIER between inputs and outputs. Already on finite words however, the synthesis problem ofasynchronous specifications by asynchronous implementations, both defined by transducers,is undecidable in general [CL14], and decidable only in some restricted cases [FJLW16]. Thesecond limitation ( ii ) is addressed in the next paragraph. From finite to infinite alphabets.
To address the synthesis of systems where data are takeninto account, one also needs to extend synthesis methods to handle infinite alphabets. As anexample, in a system scheduling processes, the data are process ids. In a stream processingsystem, data can be temperature or pressure measurements for example. Not only oneneeds synthesis methods able to handle infinite alphabets of data, but where those data canbe compared through some predicates, like equality or a linear order. Recent works haveconsidered the synthesis of (synchronous) reactive systems processing data words whosedata can be compared for equality [KMB18, ESKG14, KK19, EFR19] as well as comparisonwith a linear order on the data [EFK21]. To handle data words, just as automata havebeen 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 dataand with which they can compare data for equality, inequality or in general any predicate,depending on the considered data domain. When a register transducer reads a data, itcan compare it to the data stored in its registers, assign it to some register, and outputthe content of none or several registers, i.e., a finite word v of register contents. To havemore expressive power, we also allow transducers to guess an arbitrary data and assign itto some register. This feature, called data guessing, is arguably a more robust notion ofnon-determinism notion for machines with registers and was introduced to enhance registerautomata [KZ10]. We denote by NRT the class of non-deterministic register transducers.As an example, consider the (partial ) data word function g which takes as input any dataword of the form u = su su . . . 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 dataoccurring in u i . The function g is then defined as g ( u ) = d | u | sd | u | s . . . . This function canbe defined by the NRT of Figure 1. Note that without the guessing feature, this functioncould not be defined by any
NRT .Thanks to the non-determinism of
NRT , in general and unlike the previous example,their might be several accepting runs for the same input data word, each of them producinga possibly different output data word. Thus,
NRT can be used to define binary relationsof data ω -words, and hence specifications. In the works [KMB18, ESKG14, KK19, EFR19,EFK21] already mentioned, NRT have been used as a description of specifications, howeverthey are assumed to be synchronous and without guessing.
Objective: synthesis of computable data word functions.
In this paper, our goal is to definea synthesis setting where both limitations ( i ) and ( ii ) are lifted. In particular, specificationsare assumed to be given by (asynchronous) non-deterministic register transducers equippedwith a B¨uchi condition (called NRT ). To retain decidability, we however make some hypoth-esis: specifications are assumed to be functional, i.e., they already define a function frominput data ω -words to output data ω -words. While this a strong hypothesis, it is motivated In this paper, data word functions can be partial by default and therefore we do not explicitly mentionit int the sequel
OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 5 i f o ⊤ |↓ r s , ? r o , out ε ⋆ = r s |↓ r c , out r o ∧ ⋆ = r s r c = r o | ? r o , out r s ⋆ = r s |↓ r c , out r o Figure 1: An
NRT defining the data word function g , equipped with a B¨uchi condition. Thecurrent data denoted by ⋆ is tested with respect to the content of the registerson the left of the bar | . On the right of the bar, there are instructions suchas assigning an arbitrary data to r (notation ? r ), outputting the content of aregister or nothing (out r ), or assigning the current data to some register ( ↓ r ).The B¨uchi condition makes sure that the first data, initially stored in r s duringthe first transition, occurs infinitely many times. The register r c stores the lastdata that has been read. r o is meant to store the last data 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 onreading again r s , the automaton checks that the guess was right by evaluatingwhether r c = r o (at that moment, r c contains d i ).by two facts. First, the synthesis problem of asynchronous implementations from asyn-chronous specifications given by (non-functional) NRT is undecidable in general, alreadyin the finite alphabet case [CL14]. Second, functional
NRT define uncomputable functionsin general, and therefore they cannot be used as machines that compute the function theyspecify. Since those functions are defined over infinite inputs, let us make clear what wemean by computable functions. A (partial) function f of data ω -words is computable ifthere exists a Turing machine M that has an infinite input x ∈ dom( f ), and produceslonger and longer prefixes of the output f ( x ) as it reads longer and longer prefixes of theinput 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 simplyhas to wait until it sees the last data d i of a chunk u i (which necessarily happens after afinite 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 of u . Such functionis not computable. For instance, on input x = sd ω (where d = s are arbibtrary data), wehave 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 existsa continuation of α k which is in the domain of g , and for which f produces a word whichstarts with a different data than f ( α k d ω ): it suffices to take the continuation ( sd ) ω , as wehave f ( α k ( sd ) ω ) = g ( α k ( sd ) ω ) = d k ( sd ) ω .In this paper, our goal is therefore to study the following synthesis problem: given afunctional NRT defining a function f of data ω -words, generate a Turing machine whichcomputes f if one exists. In other words, one wants to decide whether f is computable, andif it is, to synthesize an algorithm which computes it. L. EXIBARD, E. FILIOT, N. LHOTE, AND P.-A. REYNIER
Contributions.
Register transducers can be parameterized by the set of data from which the ω -data words are built, along with the set of predicates which can be used to test those data.We distinguish a large class of data sets for which we obtain decidability results for the laterproblem, namely the class of oligomorphic data sets [BKL14]. Briefly, oligomorphic datasets 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 areequal up to automorphisms (predicate-preserving bijections). For example, any set equippedwith equality is oligomorphic, such as ( N , { = } ), ( Q , { < } ) is oligomorphic while ( N , { < } ) isnot. 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 classicalmathematical 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 asksthat the next data which can be safely outputted knowing only a finite prefix of theinput data ω -word is computable, if it exists. We also show similar correspondences formore constrained computability and continuity notions, namely Cauchy, uniform and m -uniform computability and continuity. In these correspondences, the construction ofa Turing machine computing the function is effective.(2) We consider a general computability assumption for oligomorphic data sets, namely thatthey have decidable first-order satisfiability problem [Boj19]. We call such data sets decidable . We then show that functions defined by NRT over decidable oligomorphicdata sets and over ( N , { < } ), have decidable next-letter problem. As a consequence(Theorems 3.11 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 iscontinuous (and likewise for all computability and continuity notions we introduce).This is a useful mathematical characterization of computability, which we use to obtainour main result.(3) As explained before, an NRT may not define a function in general but a relation, dueto non-determinism. Functionality is a semantical, and not syntactical, notion. Wenevertheless show that checking whether an
NRT defines a function is decidable for de-cidable oligomorphic data sets (Theorem 3.12). This problem is called the functionalityproblem and is a prerequisite to our study of computability, as we assume specificationsto be functional. We establish
PSpace -completeness of the functionality problem for
NRT over ( N , { < } ) (Corollary 4.20) and for oligomorphic data sets (Theorem 3.12) un-der 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 satisfiabilityproblem.(4) Finally, we show (again Theorem 3.12) 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 andcontinuity, we also obtain that computability and uniform computability are decidablefor functions defined by NRT over decidable oligomorphic data sets, and
PSPace -c for
OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 7 polynomially decidable oligomorphic data sets as well as ( N , { < } ). This is our mainresult and it answers positively our initial synthesis motivation.The proof techniques we use have in common the following structure: first, we char-acterize non functionality and non continuity by structural patterns on NRT and establishsmall witness properties for the existence these patterns. Then, based on the small witnessproperties, 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 whichmake them hard to factorize with reasonable amount of additional notations and theoreticalassumptions. Related Work.
We have already mentioned works related to the synthesis problem. We nowgive references to results on computability and continuity. The notion of continuity withregards to Cantor distance is not new, and for rational functions over finite alphabets, it wasalready known to be decidable [Pri02]. The approach of Prieur is to reduce continuity tofunctionality 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 fortransducers over ( N , { < } ) with guessing allowed, so we chose a different proof strategy.The connection between continuity and computability for functions of ω -words over a finitealphabet 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 resultswere partially published in conference proceedings [EFR20]. In this later publication, onlythe case of data sets equipped with the equality predicate was considered. We now consideroligomorphic data sets (which generalise the latter case), the data set ( N , { < } ) and newcomputability notions. Despite the fact that our results are more general, this generalisationalso 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 non-deterministic register assignment (data guessing), which strictly increases their expressivepower. 1. Data alphabet, languages and transducers
Data as logical structures.
Let Σ be a finite signature with relation and constantsymbols. 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 whenthe structure considered is clear, from context.An automorphism of a structure D is a bijection µ : D → D which preserves theconstants 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 applyingit 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 struc-tures ( N , { , = } ), ( Z , { < } ) and ( Q , { < } ) fall under our study as well as more sophisticatedstructures like (1(0 + 1) ∗ , ⊗ ) where ⊗ is the bitwise xor operation. Other structures like( Z , { + } ) will not have enough internal symmetry to be captured by our results. L. EXIBARD, E. FILIOT, N. LHOTE, AND P.-A. REYNIER
Definition 1.1.
A logical structure D is oligomorphic if for any natural number n the set D n has finitely many orbits under the action of Aut( D ). Example 1.2.
Oligomorphic structures can be thought of as “almost finite”. Consider( N , { = } ), then N only has two orbits: the diagonal { ( x, x ) | x ∈ N } and its complement (cid:8) ( x, y ) ∈ N | x = y (cid:9) . 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 seethat the dense linear order ( Q , { < } ) is oligomorphic.The automorphism group of ( Z , { < } ) consists of all translations. This means that Z only has one orbit. However, Z has an infinite number of orbits since the difference betweentwo 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 tothis 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 : X → Y is called equivariant if for all x ∈ X, µ ∈ G we have f ( µ ( x )) = µ ( f ( x )).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 aword u = u . . . 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 i th 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 − 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 k v , and we saythat 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 canalso 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 as-sumed 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 ofvariables. We define R -tests by the following grammar: φ ::= P (¯ t ) | φ ∧ φ | φ ∨ φ |¬ φ where P is a symbol of arity k in the signature of D and ¯ t a k -tuple of terms. We denoteby 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 . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 9
Remark 1.4.
We choose tests to be be quantifier-free formulas. However we could havechosen existential first-order formulas without affecting our results. Note that we choose thisformalism just for simplicity’s sake, and that it does not make any difference for structureswhich admit quantifier elimination such as ( N , { = } ) or ( Q , { < } ).A non-deterministic register transducer ( NRT for short) over D is a tuple ( Q, R, ∆ , q , c , F ).Where Q is a finite set of states, R is a finite set of registers, q ∈ Q , c ∈ Σ R is a vector ofconstant symbols, F ⊆ Q , and ∆ is a finite subset of Q |{z} current state × Test ( R ⊎ { input } ) | {z } current registers + input data × Q |{z} target state × { keep , set , guess } R | {z } register operations × R ∗ |{z} output word A non-guessing transducer ( NGRT ) has a transition function which is included in Q × Test ( R ⊎ { input } ) × Q × { keep , set } R × R ∗ . Finally, a deterministic transducer ( DRT ) sat-isfies an even stronger condition: its transition relation is a function of type Q × Test ( R ⊎{ input } ) → Q × { keep , set } R × R ∗ . Remark 1.5.
Note that in the definition of a transducer we require that D contains atleast one constant symbol. This is needed for annoying technical reasons, namely in orderto initialize registers to some value.However it is not too damaging since, given a Σ-structure D of domain D , one canalways consider the Σ ⊎ { c } -structure D ⊥ with domain D ⊎ {⊥} , which is just the structure D with the extra constant symbol being interpreted as the new element ⊥ , the other relationsand constants are unchanged, except naturally for the equality relation which is extendedto include ( ⊥ , ⊥ ).For simplicity’s sake we will sometimes talk about structures without mentioning anyconstant, implicitely stating that we extend the structure to include ⊥ . Also note that thisoperation 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 ) naturallyacts on the configurations of T by not touching the states and acting on the content ofthe registers pointwise. The initial configuration is the pair C = ( q , ¯ d ) with ¯ d = c D being the interpretation of the constants in D . A configuration is called final if the statecomponent is in F . Let C = ( q , ¯ d ) , C = ( q , ¯ d ) be two configurations, let d ∈ D and let t = ( q , φ, q , update , v ) ∈ ∆. We say that C is a successor configuration of C by reading d through t and producing w ∈ D | v | if the following hold: • for all r ∈ R , if update ( r ) = keep , then ¯ d ( r ) = ¯ d ( r ) • for all r ∈ R , if update ( r ) = set , then ¯ d ( r ) = d • w ( i ) = ¯ d ( v ( i )) for all i ∈ { , . . . , | v |} Moreover, we write C d,φ, update | w −−−−−−−−→ T C to indicate that fact. Often we don’t mention T (when clear from context), nor φ and update , and we simply write C d | w −−→ C . Given asequence of successor configurations, called a run , ρ = C d | w −−−→ C d | w −−−→ C . . . C n d n | w n −−−−→ C n +1 , we write C d d ··· d n | w w ··· w n −−−−−−−−−−−−→ C n +1 . 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 ′ . Let ρ = C d | v −−−→ C . . . C n d n | v n −−−→ C n +1 . . . denote a possibly infinite run. If C = C ,then ρ is called initial . 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 theinput word x = d . . . d n . . . and produces w = v . . . v n . . . in the output. Then the semanticsof T is defined as J T K = { ( x, w ) | ρ is over x , produces y and is accepting } ⊆ D ω × D ∞ . An NRT is called functional if J T K is a (partial) function. Note that in the following we willmainly consider transducers that only produce ω -words. Restricting the accepting runs ofa transducer to runs producing infinite outputs is a B¨uchi condition and can easily be doneby adding one bit of information to states.2. Continuity and computability
Continuity notions.
We equip the set A ∞ with the usual distance: for u, v ∈ A ∞ , k u, v k = 0 if u = v and k u, v k = 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 ≥ n ≥ N , k w n , w k ≤ ǫ . 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 prop-erties of the metric space A ∞ . Indeed when A is finite this space is compact, but it is notwhen A is infinite.2.1.1. Continuity.
Definition 2.2 (Continuity) . A function f : A ω → B ω is continuous at x if (equivalently):(a) for all sequences of words ( x n ) n ∈ N converging towards x ∈ dom( f ), where for all i ∈ N , x i ∈ dom( f ), we have that ( f ( x n )) n ∈ N converges towards f ( x ).(b) ∀ i ≥ , ∃ j, ∀ y ∈ dom( f ) , | x ∧ y | ≥ j ⇒ | f ( x ) ∧ f ( y ) | ≥ i The function f is called continuous if it is continuous at each x ∈ dom( f ).2.1.2. Cauchy continuity.
A Cauchy continuous function maps any Cauchy sequence to aCauchy sequence. One interesting property of Cauchy continuous functions is that theyalways admit a (unique) continuous extension to the completion of their domain. Since wedeal with A ∞ which is complete, the completion of the domain of a function f , denoteddom( f ), is simply its closure. Definition 2.3 (Cauchy continuity) . A function f : A ω → A ω is Cauchy continuous if theimage of a Cauchy sequence in dom( f ) is a Cauchy sequence. Remark 2.4.
Any Cauchy continuous function f can be continuously extended over dom( f )in a unique way, which we denote by ¯ f . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 11
Uniform continuity.
Definition 2.5 (Uniform continuity) . A function f : A ω → A ω is uniformly continuous ifthere exists a mapping m : N → N such that: ∀ i ≥ , ∀ x, y ∈ dom( f ) , | x ∧ y | ≥ m ( i ) ⇒ | f ( x ) ∧ f ( y ) | ≥ i Such a function m is called a modulus of continuity for f . We also say that f is m -continuous . Finally, a functional NRT T is uniformly continuous when J T K is uniformlycontinuous. Remark 2.6.
In the case of a finite alphabet, and in general for compact spaces, Cauchycontinuity is equivalent to uniform continuity, but for infinite alphabets this does not holdanymore. Consider the following function f computable by a DRT over the data alphabet( N , { , < } ) and defined by u x x , for u ∈ N ∗ being a strictly decreasing sequence. Thenthis function is not uniformly continuous, since two words may be arbitrarily close yet havevery different images. However one can check that the image of a Cauchy sequence is indeedCauchy: let ( x n ) n ∈ N be a Cauchy sequence in the domain of f . Let us assume without lossof 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 suchthat for all m, n ≥ N we have | x m ∧ x n | ≥ i + j + 1. Thus we have | f ( x m ) ∧ f ( x n ) | ≥ j ,which means that ( f ( x n )) n ∈ N is Cauchy.We’ve seen in the previous remark that Cauchy continuity and uniform continuity don’tcoincide over infinite alphabets. However when dealing with oligomorphic structures werecover some form of compactness, that is compactness of D ∞ / Aut( D ), which ensures thatthe two notions do coincide in this case. Proposition 2.7.
Let D be an oligomorphic structure and let f : D ω → D ω be an equivariantfunction. 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. Letus assume that f is not uniformly continuous. This means that there exists i ∈ N and asequence ( 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 usconsider the sequence ([ x n ] , [ y n ]) n ∈ N of pairs of elements in D ω / Aut( D ), i.e. words are seenup to automorphism. Since D ω / Aut( D ) is compact, we can extract a subsequence (which wealso call ([ x n ] , [ y n ]) n ∈ N for convenience) and which is convergent. This means that there aremorphisms ( µ 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 whoseimage 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 particu-lar kinds of functions m . For instance for m : i i + b , m -continuous functions are exactly2 b -Lipschitz continuous functions. Similarly, for m : i ai + b , m -continuous function areexactly the a -H¨older continuous functions.Note that while these notions are interesting in and of themselves, they are very sensitiveto the metric that is being used. For instance the metric d ( x, y ) = | x ∧ y | while defining thesame topology over words, yields different notions of Lipschitz and H¨older continuity. The usual notion of modulus of continuity is defined with respect to distance, but here we choose todefine it with respect to longest common prefixes, for convenience. Given m a modulus of continuity in oursetting we can define ω : x − m ( ⌈ log ( x ) ⌉ ) and recover the usual notion. 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 aneffective representation, meaning that each element can be represented in a finite way. Forinstance, this is the case when D = N . Moreover, we assume that checking if a tuple of valuesbelongs 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 injectivefunction enc : D → A ∗ such that the sets { enc ( d ) | d ∈ D } , { enc ( c ) | c is a constant of D } and { enc ( d ) ♯ · · · ♯ enc ( d k ) | ( d , . . . , d k ) ∈ R } are decidable for all predicates R of D and ♯ A . Any infinite word d d · · · ∈ D ω can be encoded as the ω -word enc ( d ) ♯ enc ( d ) ♯ · · · ∈ ( A ∗ ♯ ) ω .We now define how a Turing machine can compute a function from D ω to D ω . Weconsider deterministic Turing machines whose cells can contain a letter from A ∪ { ♯ } or aletter from a finite working alphabet. They have three tapes: a read-only one-way inputtape 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 whichthey write the encoding of the infinite output data word). Since we always work moduloencoding, for the sake of simplicity, from now on and in the rest of the paper, we assumethat each cell of the Turing machine, on the input and output tapes, contain a data d ∈ D ,while cells of the working tape are assumed to contain either a data d ∈ D or a letter fromthe 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 thecomputability 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 tapeafter reaching cell number k of the input tape (assuming it does). Observe that as theoutput tape is write-only, the sequence of data words ( M ( x, k )) k ≥ is non-decreasing, andthus 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 wordfunction 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 dataword function f : D ω → D ω is Cauchy computable if there exists a deterministic multi-tapemachine M computing f such that for all x in the topological closure dom( f ) of dom( f ), thesequence ( M ( x, k )) k ≥ converges to an infinite word. In other words a Cauchy computablefunction is a function which admits a continuous extension to the closure of its domain andwhich is computable. We say that M Cauchy computes f . Definition 2.11 (Uniform computability) . Let D be a representable data domain. A dataword 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 andfor all i ≥ x ∈ dom( f ), | M ( x, m ( i )) | ≥ i . Such a function m is called a modulusof computability for f . In that case f is called m -computable . We say that M uniformlycomputes f , and also that M m -computes f . Example 2.12.
The function g defined in the Introduction (p. 4), for the data domainof integers, is computable. Remind that it is defined on all input words of the form x = su d su d s . . . such that s occurs infinitely often, and for all i , s does not occur in u i d i , by OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 13 g ( x ) = d | u | +11 sd | u | +12 s . . . . A Turing machine just needs to read the input up to d , thenoutput d exactly | u | + 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. Itis actually not uniformly computable but Cauchy computable. As a matter of fact, all thecomputability notions we define here entails 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 infinitealphabet, it is not realistic to assume that one letter takes a constant amount of space andcan be read in a constant amount of time. Then, which of the many notions introducedabove 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 ♯ − ,where enc ♯ : d · · · d n enc ( d ) ♯ · · · ♯ enc ( d n ). Continuity and computability are robustenough so that f is continuous (resp. computable) if and only if f dec is. Cauchy continuityand computability also fall under this category. In contrast, uniform continuity and uniformcomputability are very sensitive to encoding. As an example, the function which maps aword to the second letter in the word is never uniformly continuous, since the encoding ofthe first letter may be arbitrarily long. Nevertheless, uniform computability is still relevantnotion, as it provides guarantees on the maximal number of input data which need to beread to produce a given number of output data, even though the encoding of those datacan be arbitrarily large.2.3. Computability versus continuity.
In this section, we show that all the computabil-ity notions (computability, Cauchy continuity, ...) imply their respective continuity notions.We then give general conditions under which the converse also holds.2.3.1.
From computability to continuity.
Theorem 2.14.
Let f : D ω → D ω and let m : N → N , the following implications hold: • f is computable ⇒ f is continuous • f is Cauchy computable ⇒ f is Cauchy continuous • f is uniformly computable ⇒ f is uniformly continuous • f is m -computable ⇒ f is m -continuousProof. 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 ) convergingto x . We show that ( f ( x n )) n converges to M ( x ) if M ( x ) is infinite. 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 , p k ≤ x m . As M is a deterministic machine, it implies that M ( x, k ) ≤ f ( x m ). So,for all k , M ( x, k ) ≤ f ( x m ) for all but finitely many m . It follows that ( f ( x m )) m convergesto M ( x ) = lim k ∞ M ( x, k ) if M ( x ) is an infinite word. It is the case for all x ∈ dom( f ) since f is computable, entailing continuity of f . If additionally f is Cauchy computable, then itis 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 assumethat f is m -computable by some machine M . We show it is m -continuous. Let i ≥ x, y ∈ dom( f ) such that | x ∧ y | ≥ m ( i ). We must show that | f ( x ) ∧ f ( y ) | ≥ i . We have M ( x, m ( i )) = M ( y, m ( i )) because M is deterministic and | x ∧ y | ≥ m ( i ). By definition of m -computability, we also have | M ( x, m ( i )) | ≥ i . Since M ( x, m ( i )) ≤ f ( x ) and M ( y, m ( i )) ≤ f ( y ), we get | f ( x ) ∧ f ( y ) | ≥ i , concluding the proof.2.3.2. From continuity to computability.
While, as we have seen in the last section, com-putability of a function f implies its continuity, and respectively for all the notions ofcomputability and continuity we consider in this paper, the converse may not hold in gen-eral. We give sufficient conditions under which the converse holds for f , namely when ithas a computable next-letter problem. This problem asks, given as input two finite words u, v ∈ D ∗ , to output, if it exists, a data 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 ifit exists. Formally: Next-Letter Problem for f : Input u, v ∈ D ∗ Output (cid:26) d ∈ D if for all y ∈ D ω s.t. uy ∈ dom( f ) , vd ≤ f ( uy ) none otherwise Theorem 2.15.
Let f : D ω → D ω be a function with a computable next-letter problem andlet m : N → N , the following implications hold: • f is continuous ⇒ f is computable • f is Cauchy continuous ⇒ f is Cauchy computable • f is uniformly continuous ⇒ f is uniformly computable • f is m -continuous ⇒ f is m -computableProof. 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 deterministicTuring 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 Turingmachine M f is best presented in pseudo-code as follows. Algorithm 1:
Turing machine M f defined in pseudo-code. Data: x ∈ D ω v := ǫ ; for i = 0 to + ∞ do d := Next f ( x [: i ] , v ); while d = none do output d ; // write d on the output tape v := vd ; d := Next f ( x [: i ] , v ); end /* end while loop when d = none */ end Now, we show that if f is continuous, then M f computes f , i.e. M f ( x ) = f ( x ) for all x ∈ dom( f ). First, for all i ≥
0, let v i = d i, d i, . . . be the sequence of data outputted atline 5 at the i th iteration of the for loop. Note that the i th iteration may not exist whenthe test at line 4 is forever true. In that case, we set v i = ǫ . By definition of M f ( x, i ), OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 15 we have M f ( x, i ) = v v . . . v i for all i ≥
0. Moreover, by definition of the next-letterproblem, we also have M f ( x, i ) ≤ f ( x ). Now, by definition, M f ( x ) = v v v . . . . So, ifit is infinite, then M f ( x ) = f ( x ). It remains to show that it is indeed true when f iscontinuous. Suppose it is not the case. Then there exists i such that for all i ≥ i the call Next f ( x [: i ] , v . . . v i ) returns none (assume i is the smallest index having this property).Let d such that v . . . v i d < f ( x ). Then, for all i ≥ i , there exists α i ∈ D ω and d ′ = d suchthat x [: i ] α i ∈ dom( f ) and v . . . v i d ′ < f ( x [: i ] α i ). Clearly, the sequence ( f ( x [: i ] α i )) i , if itconverges, does not converge to f ( x ). Since ( x [: i ] α i ) i converges to x , this contradicts thecontinuity of f .Consider now the case where f is Cauchy-continuous. It implies that f admits a uniquecontinuous 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 . Wealready proved that M f computes f (as f is continuous). Let i ≥ x ∈ dom( f ).It remains to show that | M f ( x, m ( i )) | ≥ i . Let j = m ( i ). Since the algorithm M f calls Next f ( x [: j ] , · ) until it returns none , we get that v v . . . v j is the longest output which canbe safely output given only x [: j ], i.e. v . . . v j = V { f ( x [: j ] α ) | x [: j ] α ∈ dom( f ) } . If v j isinfinite, then | M f ( x, j ) | = + ∞ and we are done. Suppose v j is finite. Then, there exists α ∈ D ω such that x [: j ] α ∈ dom( f ) and f ( x ) ∧ f ( x [: j ] α ) = v v . . . v j = M f ( x, j ). Since | x ∧ x [: j ] α | ≥ j = m ( i ), by m -continuity of f , we get that | M f ( x, j ) | ≥ i , concluding theproof. 3. Oligomorphic data
In this section we consider a structure D which is oligomorphic. We will show that inthis case one can decide, under reasonable computability assumptions, all the notions ofcontinuity 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 thecharacterizations 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 tooligomorphism.3.1. Characterizing functionality and continuity.
The main goal of this section isto give for
NRT characterizations of functionality, continuity and uniform continuity, thatconsist in small witnesses. These small witnesses are obtained by pumping arguments thatrely 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 guaranteedover infinite runs, the oligomorphicity property guarantees that a configuration orbit willbe repeated over long enough runs. A loop is a run of the shape C u | v −−→ D w | z −−→ µ ( D ) suchthat µ ( C ) = C . The shorter run C µ ( u ) | µ ( v ) −−−−−−→ µ ( D ) is thus called the run obtained after removing the loop . For any ω -word α , we let α.ǫ = α . 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 (2 k ) such that C u ′ | v ′ −−−→ D .Proof. The idea behind this proposition is simple: any large enough run must contain aloop and can thus be shortened. Let u = a · · · a n with a run C a | v −−−→ C a | v −−−→ C · · · C n .Let us assume that n ≥ | Q |R (2 k ), we want to obtain a shorter run from C to C n . Letus consider the orbits of the pairs ( C , C ) , ( C , C ) , . . . , ( C , C n ). Since n ≤ | Q |R (2 k ),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 , C i ) = ( C , C j ). Hence we obtain the run µ ( C ) µ ( a ··· a i − | v ··· v i − ) −−−−−−−−−−−−−→ µ ( C i ) = C µ ( a ··· a i − | v ··· v i − ) −−−−−−−−−−−−−→ C j which is strictly shorter.3.1.1. Characterization of non-emptiness.
Let an
NRA (non deterministic register automa-ton) be simply an
NRT without any outputs. We give a characterization of non-emptinessin terms of small witnesses.
Proposition 3.2.
Let A be an NRA , the following are equivalent: (1) A recognizes at least a word (2) there exist C u −→ C v −→ µ ( C ) with C being a final configuration, and µ ∈ Aut( D )(3) there exist C u −→ C v −→ µ ( C ) with | u | , | v | ≤ | Q | · R (2 k ) , C being a final configuration,and µ ∈ Aut( D ) Proof.
Let us assume (1) and let x be a word accepted by A . Since D is oligomorphic, thereis only a finite number of orbits of configurations. Thus an accepting run of A over x mustgo through some accepting configuration orbit infinitely often, and in particular at leasttwice. Hence (2) holds.Let us assume that (2) holds. We obtain (3) by using loop removal from Proposition 3.1.Let us assume (3), then the word uvµ ( v ) µ ( v ) · · · is accepted by A .3.1.2. Characterizing functionality.
Characterizing functionality is slightly more compli-cated since we have to care about outputs. Moreover, we need to exhibit patterns involvingtwo runs which makes pumping more involved.We start with a useful yet quite technical lemma, which will allow us to remove loopswhile preserving mismatches.
Lemma 3.3 (Small mismatch witness) . There exists a polynomial P ( x, y, z ) such that thefollowing hold.Let T be an NRT , with k registers, a state space | Q | and a maximal output length L .Let C u | u −−→ D and C u | u −−→ D be runs such that u u . Then there exists u ′ of lengthless than P ( R (4 k ) , | Q | , L ) and u ′ , u ′ , so that C u ′ | u ′ −−−→ D , C u ′ | u ′ −−−→ D with u ′ u ′ .Proof. Let ρ = C u | u −−→ D and ρ = C u | u −−→ D be runs such that u u . We assumethat | u | > P ( R (2 k ) , | Q | , L ), and we want to show that we can obtain a strictly smallerword with the desired property. Our goal is thus to remove synchronous loops in ρ , ρ while preserving the mismatch. A synchronous loop is defined as a loop over the same input OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 17 in the product transducer T × T . Let u = αa β , u = αa β with a = a . We will onlyconsider removing loops that do not contain the transitions producing the mismatchingletters a or a .We call the effect of a loop on ρ , the length of the output factor removed from α , inparticular the effect is 0 if the factor removed is in β (and symmetrically for ρ ). Removingloops that have the same effect on ρ and ρ preserves the mismatch.The only case remaining is when any loop has different effects on ρ and ρ . The firststep is to show that removing a loop with different effects and which cancels a mismatchensures a very strong periodicity property on the outputs.Let us consider the first synchronous loop occuring in ρ , ρ which does not contain thetransitions producing the mismatching outputs. From the previous cases we can assumethat this loop has a non-zero effect on ρ (without loss of generality). Let us assume that theloop occurs after the transition producing the mismatching output in ρ . This means thatthere are no loops occuring before the transition producing a , and thus | α | < L | Q | · R (4 k )and that all loops have a null effect on ρ . From that we can deduce that there are fewerthan L | Q | · R (4 k ) loops in total since any loop has to have a non null effect on ρ . Thuswe can deduce that | u | ≤ ( L | Q | · R (4 k ))( | Q | · R (4 k )), which yields a contradiction.The only case which remains is that all loops occur before the transitions producingthe mismatching outputs. We can assume, for u large enough, that there are at least twoloops. Let u = α β β ′ γ δ δ ′ ζ a η and u = α β β ′ γ δ δ ′ ζ a η with α β β ′ γ δ δ ′ ζ = α β β ′ γ δ δ ′ ζ = u ∧ u , where β β ′ , β β ′ denote the outputs produced by the firstoccurring loop and δ δ ′ , δ δ ′ correspond to the outputs of the second loop. What wemean by that is that removing the first loop gives the outputs α λ ( β ) γ δ δ ′ ζ a η and α λ ( β ) γ δ δ ′ ζ a η ; while removing the second loop gives the outputs α β β ′ γ µ ( δ ) ζ a η and α β β ′ γ µ ( δ ) ζ a η . Without loss of generality, we assume that d = | β ′ |−| β ′ | >
0. Af-ter removing the first loop we obtain u ′ = α λ ( β ) γ δ δ ′ ζ a η and u ′ = α λ ( β ) γ δ δ ′ ζ a η ,and we assume that u ′ k u ′ , otherwise we are done. We define u = αζa η and u = αζa η where α is the longest word bewteen α β β ′ γ δ δ ′ and α β β ′ γ δ δ ′ , so that ζ is a suffixof both ζ and ζ .Let us assume that | ζ | < d . This means that | u ∧ u | ≤ L | Q | · R (4 k ). Since any loophas to produce at least one letter in u or u , u must have fewer than 4 L | Q | · R (4 k ) doubleloops. Thus we get that | u | < (4 L | Q | · R (4 k ))( | Q | · R (4 k )) which gives a contradiction.Thus we can safely assume that d ≤ | ζ | . Let v denote the length d suffix of ζ , then wehave that α λ ( β ) γ δ δ ′ ζ v = α λ ( β ) γ δ δ ′ ζ . Thus we have that ζ ends in v , assumingthat it is long enough. Repeating this we obtain that ζ is in the language v ′ v ∗ for some v ′ suffix of v . Let t be the primitive root of v then we can even say that ζ is in t ′ t ∗ for some t ′ suffix of t . So we obtain that ζa k t ′ t ω and ζ k t ′ t ω and ζa t ′ t ω . Let us consider nowremoving the second loop corresponding to outputs δ ′ , δ ′ . Using the same arguments weget that | β ′ | − | β ′ | and | δ ′ | − | δ ′ | are both multiples of | t | . Note moreover that we cannothave | δ | − | δ | <
0, otherwise we would conclude that ζa t ′ t ω . Hence we obtain that allloops must have a larger effect on ρ than on ρ and that the effect difference is a multipleof | t | . Now that we have established that strong periodicity property of ζa , the main ideais the following: remove all loops while preserving a ζ larger than the maximal effect of aloop but still smaller than e.g. twice that. Once this is done, repump just enough loops sothat the first word is larger than the second word. This is sure to cause a mismatch since xζ yζa , for any x, y satisfying 0 < | x | − | y | < | ζ | . Proposition 3.4 (Functionality) . There exists a polynomial P ( x, y, z ) such that the follow-ing holds.Let R ⊆ D ω × D ω be given by an NRT T with k registers, a state space Q and a maximumoutput length L . The following are equivalent: (1) R is not functional (2) there exist C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ) , C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ) with C , D final, µ ∈ Aut( D ) such that u u (3) there exist C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ) , C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ) with C , D final and | u | , | v | , | w | ≤ P ( R ( k ) , | Q | , L ) , µ ∈ Aut( D ) such that u u Proof.
Let us assume that (1) holds, meaning that T has two accepting runs ρ , ρ over someword x ∈ D ω which produce different outputs. Let C , C , C . . . denote the configurationsof ρ and C , C ′ , C ′ . . . the ones of ρ . 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 infinitenumber of such pairs is accepting in the first component and an infinite number is acceptingin the second component. Thus we can see ( ρ , ρ ) as a sequence of the following shape,with C and D ′ final:( C , C ) u −→ ( C, C ′ ) v −→ ( D, D ′ ) u −→ µ ( C, C ′ ) v −→ ν ( D, D ′ ) u −→ · · · Since the outputs are different and infinite then they mismatch at some position i .Then, there exists n such that u = u v · · · u n v n has produced at least i symbols, both for ρ and ρ . Hence we have shown that C u | α −−−→ µ n ( C ) u n +1 | β −−−−−→ ν n +1 ( D ) v n +1 | γ −−−−−→ µ n +1 ( C ), C u | α −−−→ µ n ( C ′ ) u n +1 | β −−−−−→ ν n +1 ( D ′ ) v n +1 | γ −−−−−→ µ n +1 ( C ′ ), and by assumption | α | , | α | ≥ i , andthus α α . Hence we have shown that (2) holds.Let us assume that (2) holds: i.e. we have C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ), C u | u −−→ C v | v −−→ D w | w −−−→ µ ( C ) with C , D final, µ ∈ Aut( D ) such that u u . We use Lemma 3.3(small mismatch witness) to obtain that C u ′ | u ′ −−−→ C , C u ′ | u ′ −−−→ C with u ′ u ′ and | u ′ | small. We get C u ′ | u ′ −−−→ C v | v −−→ D w | w −−−→ µ ( C ), C u ′ | u ′ −−−→ C v | v −−→ D w | w −−−→ µ ( C ). Wenow only have to use some loop removal on v and w , just as in Proposition 3.2, in order toobtain words smaller than | Q | R (4 k ).Showing that (3) implies (1) is the easiest part since the pattern clearly causes non-functionality over the word uvwµ ( vw ) µ ( vw ) · · · .3.1.3. Characterizing continuity.
Here we characterize continuity and uniform continuity us-ing patterns similar to the one of functionality. Before doing so we introduce two propertiesof 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.5.
Let T be an NRT . We associate to it the set of critical patterns, de-noted
Critical T ( u, v, w, z, C , µ ( C ) , D , C , µ ( C ) , D ) ( T is omitted when clear from con-text), given by the runs C u | u −−→ C v | v −−→ µ ( C ) w | w −−−→ D , C u | u −−→ C v | v −−→ µ ( C ) z | w −−−→ D so that D , D are co-reachable and one of the following holds:a) u u , or OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 19 b) v i = ǫ and u j u i w i for { i, j } = { , } , orc) v = v = ǫ and u w u w Before characterizing continuity and uniform continuity, we show a small critical patternproperty.
Claim 3.6 (Small critical pattern) . There exists a polynomial P ′ ( x, y, z ) such that thefollowing holds.Let T be an NRT , with k registers, a state space | Q | and a maximal output length L .Let C u | u −−→ C v | v −−→ µ ( C ) w | w −−−→ D , C u | u −−→ C v | v −−→ µ ( C ) z | w −−−→ D be a critical pattern.Then there exists u ′ , v ′ , w ′ , z ′ of length less than P ′ ( R (4 k ) , | Q | , L ) and u ′ , v ′ , w ′ , u ′ , v ′ , w ′ ,so that C u ′ | u ′ −−−→ C v ′ | v ′ −−−→ µ ( C ) w ′ | w ′ −−−→ D , C u ′ | u ′ −−−→ C v ′ | v ′ −−−→ µ ( C ) z ′ | w ′ −−−→ D is a criticalpattern. Proof.
We want to remove loops in u, v, w, z without affecting the mismatches. The idea isto see such a critical pattern as a pair of runs which mismatch and leverage Lemma 3.3. Inorder to make sure that the loops which are removed do not interfere with the intermediateconfigurations, we consider runs which are colored. We consider runs which start with redconfigurations, then the middle parts C v | v −−→ µ ( C ) and C v | v −−→ µ ( C ) are colored in blackand the final parts are colored in crimson again. Using Lemma 3.3, we obtain runs smallerthan P ( R (4 k ) , | Q | , L ). 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 givenby an NRT . Proposition 3.7 (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, astate 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 Critical ( u, v, w, z, C , µ ( C ) , D , C , µ ( C ) , D ) (resp. with C final). (3) there exists a critical pattern in Critical ( u, v, w, z, C , µ ( C ) , D , C , µ ( C ) , D ) such that | u | , | v | , | w | , | z | ≤ P ′ ( R (4 k ) , | Q | , L ) (resp. with C final).Proof. Let us assume that (1) holds, meaning that f is not uniformly continuous (resp. notcontinuous) at some point x ∈ D ω . This means that there exists i such that for any n ,there are two accepting runs ρ , ρ over x , x and producing y , y respectively such that | x ∧ x ∧ x | > n and | y ∧ y | < i −
1. Moreover, if f is not continuous, we can even assumethat x = x and ρ = ρ , some accepting run over x . Let us consider some n > i ·| Q | ·R (2 k ).Let u = x ∧ x ∧ x , since u is large enough we have that some pair of configurations in ρ , ρ has to repeat at least 2 i times, up to automorphism. If f is not continuous, we choose n large enough so that a final configuration appears at least 2 i · | Q | · R (2 k ) times in the first n transitions of ρ . That way we can ensure that some pair of configuration in ρ, ρ repeatsat least 2 i times, up to automorphism, with the configuration of ρ being accepting.Thus we obtain two sequences: C u | v −−−→ C u | v −−−→ µ ( C ) · · · µ i − ( C ) u i | v i −−−−→ µ i ( C ) and C u | w −−−→ D u | w −−−→ µ ( D ) · · · µ i − ( D ) u i | w i −−−−→ µ i ( D ). Moreover, let x = ux ′ , x = ux ′ ,let y = v · · · v i y ′ and y = w · · · w i y ′ . We do a case analysis; note that the cases arenot necessarily mutually exclusive. Case 1) let us first assume that there is some index j ∈ { , . . . , i } so that µ j ( C ) u j | ǫ −−→ µ j ( C ) and µ j − ( D ) u i | ǫ −−→ µ j ( D ). Since the outputs y , y mismatch, we have some prefixes of ρ , ρ of the shape C u ··· u j − | v ··· v j − −−−−−−−−−−−→ µ j ( C ) u j | ǫ −−→ µ j ( C ) x ′′ | y ′′ −−−→ E and C u ··· u j − | w ··· w j − −−−−−−−−−−−−→ µ j ( D ) u j | ǫ −−→ µ j ( D ) x ′′ | y ′′ −−−→ F with v · · · v j − y ′′ w · · · w j − y ′′ . Hence we obtain a criticalpattern of shape c).Case 2) we assume that there are at least i indices j ∈ { , . . . , i } such that v j = ǫ andat least i indices such that w j = ǫ . Then we have that v · · · v i w · · · w i and thus we geta critical pattern of shape a).Case 3), let us assume (without loss of generality) that there strictly fewer than i indicessuch that w j = ǫ . This means that ther must be at least i indices such that v j = ǫ , otherwisewe refer back to case 1). Let us consider a prefix of ρ C u ··· u i | w ··· w i −−−−−−−−−−→ µ i D x ′′ | y ′′ −−−→ suchthat v · · · v i w · · · w i y ′′ . Let j be such that w j = ǫ , then we add the loop correspondingto index j after the configuration ( µ i ( C ) , µ i ( D )). Doing this may modify the mismatchingletter of y ′′ as to cancelling the mismatch, however if it is the case, we can simply add theloop twice, which guarantees that the mismatch is preserved. Thus we obtain a criticalpattern of shape b).If we assume that (2) holds then Claim 3.6 gives us (3).Let us assume that (3) holds. Then f is discontinuous at x = uvµ ( v ) µ ( v ) · · · ∈ dom( f )and is thus not uniformly continuous. Moreover, if C is final we have that f is discontinuousat x ∈ dom( f ), and hence f is not continuous.3.2. Deciding functionality, continuity and computability.
We use a key propertyof 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-orderformulas over signature Σ, and just FO if Σ is clear from the context. Proposition 3.8 ([Boj19, Lemma 4.11]) . Let D be an oligomorphic structure and let k bea 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 [Σ] hasdecidable 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 similarnotion of exponentially decidable, or f -decidable for some fixed complexity function f .Roughly speaking the main automata problems which we will consider (emptiness, func-tionality, continuity, etc ) will be PSpace (resp. decidable) whenever the structure D ispolynomially decidable (resp. decidable).3.2.1. Computing the next letter.
In this section, we show how to compute the next let-ter problem for
NRT over a decidable representable oligomorphic structure D . By Theo-rems 2.15 and 2.14, this entails that continuity and computability coincide for functionsdefined by transducers over decidable representable oligomorphic structures, as stated inTheorem 3.11 below.Before tackling the next letter problem, we consider the emptiness problem of registerautomata. OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 21
Theorem 3.9.
Let D be a decidable (resp. polynomially decidable) oligomorphic structure.The emptiness problem for NRA is decidable (resp. in
PSpace ).Proof.
We show the result in case of a polynomially decidable structure, the more generalcase can be obtained by forgetting about complexity. Let D be a polynomially decidableoligomorphic structure and let T be an NRA with k registers and state space Q . Since D ispolynomially decidable, any orbit of D k can be represented by a formula of size polynomialin k . This means that R ( k ) is exponential. Using the non-emptiness characterization fromProposition 3.2, we only need to find a run of length polynomial in Q and R ( k ). Theidea is to use a counter bounded by this polynomial, using space in log( | Q |R ( k )), andexecute an NPSpace algorithm which will guess a run of the automaton and update thetype of configurations in space polynomial in k and log( | Q | ). Simulating the run goeslike this: first the type of the configuration is initialized to q , ( d , . . . , d ). Then a newtype φ ( y , . . . , y k ) is guessed, as well as a transition which we see as given by a state q and a formula ψ ( x , . . . , x k , y , . . . , y k ). We check that the transition is valid by decidingthe satisfiability of ∃ y , . . . , y k ψ ( d , . . . , d , y , . . . , y k ) ∧ φ ( y , . . . , y k ) which can be done in PSpace , by assumption. We thus move to the new configuration type given by q, φ and wecontinue the simulation. At some point when q is final, we keep the configuration type inmemory and guess that we will see it again. Lemma 3.10.
Let f : D ω → D ω be a function defined by an NRT over a decidable repre-sentable 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 goalis to decide if there exists d ∈ D such that f ( u D ω ) ⊆ vd D ω . In other words we wantto know if there exist two runs C u | u −−→ C w | w −−−→ D , C u | u −−→ C w | w −−−→ D such that | u w | , | u w | > | v | and either | u w ∧ v | < | v | or | u w ∧ u w | ≤ | v | . The existence of suchruns only depends on the type of u, v , hence we can define a an automaton which simulates T and starts by reading some input of type of u and checks whether there is a mismatchoccurring before the | v | outputs. Thus we reduce the non-existence of a next letter to theemptiness 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 u , and see what the | v | + 1 th output is (note that we can avoid ǫ -producing loops).To be able to simulate T over u , we use the fact that D is representable and decidable.For every transition that we want to take, from decidability we can check whether thetransition is possible. Then, once we know the transition is possible, we can enumerate therepresentations of elements of D and check that they satisfy the transition formula.As a direct corollary of Lemma 3.10, Theorem 2.15 and Theorem 2.14, we obtain: Theorem 3.11.
Let f : D ω → D ω be a function defined by an NRT over a decidableoligomorphic structure D , and let m : N → N be a total function. Then, (1) f is computable iff f is continuous (2) f is uniformly computable iff f is uniformly continuous (3) f is m -computable iff f is m -continuous Deciding functionality, continuity and computability.
Theorem 3.12.
Given a decidable (resp. polynomially decidable) oligomorphic structure D functionality, continuity and uniform continuity are decidable (resp. PSpace -c) for func-tions given by
NRT . As a consequence, if D is representable, then computability and unifor-mity computability are decidable (resp. PSpace -c).Proof.
The proofs are very similar, whether we consider functionality, continuity or uniformcontinuity. Let us show the result for functionality. Moreover we assume that D is poly-nomially decidable, the argument in the more general case can easily be obtained just byforgetting about complexity.Let us consider an NRT T with k register, state space Q and maximum output length L . We want to show that we can decide the existence of two runs with a mismatch. Fromthe characterization given in Proposition 3.4, we know that the pattern we are looking foris small. We consider a counter bounded by the value 3 P ( R (4 k ) , | Q | , L ), which can berepresented using polynomial space because R (4 k ) is exponential in k ( D is polynomiallydecidable). Our goal is to simulate T and exhibit a pattern of length bounded by thatcounter. As we have seen before, we can easily simulate runs of T in PSpace . The ad-ditional difficulty here is that at some point we have to check that two output positionsmismatch. We use two additional counters which will ensure that the two mismatchingoutputs correspond to the same position. Let us now describe how the algorithm goes, ina high-level manner. We start by initializing two runs in parallel, as well as our counters.We keep in memory the 2 k -type of the two configurations, which can be done in polynomialspace since D is polynomially decidable. We keep guessing in parallel two transitions for ourruns and updating the 2 k -type using the fact that satisfiability of FO is in PSpace . Everytime a run outputs some letter, its counter is incremented. At some point we may guessthat we output the mismatching value in one of the runs, in which case we stop the countercorresponding to that run. We crucially also need to be able to check later that the valueoutput mismatches. In order to do this we keep in memory a 2 k + 1-type, always keepingthe value which we output. At some point we output the second mismatching position, wecheck that the counters coincide and that the outputs are indeed different, which is given bythe 2 k + 1-type. In parallel, we also have to check that we reach some final configurationsand that some configuration repeats. To do this we need to keep one or two additional2 k -type in memory, which again can easily be done in PSpace .The approach for continuity and uniform continuity is exactly the same except that thepatterns of Proposition 3.7 are slightly more involved. Moreover we also need to decide onthe fly that the configurations reached are co-reachable. This can be done exactly like fornon-emptiness of automata in
PSpace .Finally, the
PSpace lower bound is obtained by reducing the problems to emptinessof register automata over ( N , { = } ), which is PSpace -c [DL09]. Since the data domainsare countable, they can always simulate ( N , { = } ), and the proofs of [EFR20] can easily beadapted. Theorem 3.13.
For relations given by
NRT over ( Q , { < } ) deciding functionality, continu-ity/computability and uniform continuity/uniform computability are PSpace -complete.Proof.
We only need to argue that ( Q , { < } ) is representable and polynomially decidable.Clearly rational numbers are representable. Moreover, since ( Q , { < } ) is homogeneous, itadmits quantifier elimination, which means that any k -type can be defined by a formula OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 23 polynomial in k (actually linear). Indeed a type is just given by the linear order between thefree variables. Moreover, satisfiability of first-order logic over ( Q , { < } ) is in PSpace .4.
A non oligomorphic case: ( N , { <, } )We now turn to the study of the case of natural numbers equipped with the usual order.Such domain is not oligomorphic (cf Example 1.2), so there might not exist loops in thetransducer, as there are infinitely many orbits of configurations. Notation 4.1.
For simplicity, in the rest of this section, ( N , { <, } ) and ( Q + , { <, } ) (where Q + is the set of rational numbers which are greater than or equal to 0) are respectivelydenoted N and Q + .We thus need to study more precisely which paths are iterable, i.e. can be repeatedunboundedly or infinitely many times. We show that such property only depends on therelative order between the registers, i.e. on the type of the configurations, seen as belongingto Q + , where the type of a configuration is an FO-formula describing its orbit (cf Propo-sition 3.8 and Section 4.2). More generally, the fact that N is a subdomain of Q + , alongwith the property that any finite run in Q + corresponds to a run in N (by multiplying allinvolved data by the product of their denominator), allows us to provide a characterisationof continuity and uniform continuity which yields a PSpace decision procedure for thoseproperties.4.1.
On loop iteration.Example 4.2. ⊤ , ↓ r ∗ < r, ↓ r Example 4.3. r M r < ∗ < r M , ↓ r The
NRA of Example 4.2 is non-empty in Q + , since it accepts e.g. the word 1 12 . . . n . . . .However, it is empty in N . Indeed, any data word compatible with its only infinite run neces-sarily 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 seean infinite increasing chain which is bounded from above by B . This is possible in Q + , butnot in N .That is why we need to study more closely what makes a given path ω -iterable , i.e. thatcan be taken an infinite number of times. To characterise continuity, we will also need theweaker notion of iterable path, i.e. of a path that can be taken arbitarily many times overfinite inputs which are increasing for the prefix order. For instance, the loop in Example 4.2is 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 valuesof the initial upper bound. However, there can be no infinite run which contains infinitelymany occurrences of such loop, as the value that is initially guessed for a given run sets abound 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 byproperties on the order between registers of a pair of configurations, which can be summedup 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. Suchinformation is summed up by the type of the configuration, interpreted as a configurationin Q + .Since we will need to manipulate different types of copies of some set of registers, weadopt the following convention: Convention 4.4.
In the following, we assume that for a set of registers R , R and R aretwo disjoint copies of R , whose elements are respectively r and r for r ∈ R . Similarly, R ′ is a primed copy of R , whose elements are r ′ for r ∈ R . Note that the two can be combinedto get R ′ , R ′ . Note also that primes and indices are also used as usual notations, but noambiguity should arise. Definition 4.5.
For a configuration C : R → N , we define τ ( C ) as τ Q + ( C ) the type ofthe configuration in Q + , i.e. an FO-formula describing its orbit (such FO-formula exists byProposition 3.8 since Q + is oligomorphic). Note that such type can be represented e.g. bythe formula p = q ∧ V ⊲⊳ ∈{ <,>, = } V r,r ′ ∈ R | C ( r ) ⊲⊳C ( r ′ ) r ⊲⊳ r ′ ∧ V r ∈ R | C ( r )=0 r = 0. Thus, the typespecifies 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 configu-rations. Thus, for two configurations C , C : R → N , we define σ ( C , C ) = τ Q + ( C ⊎ C ′ ),where C ⊎ C ′ is the disjoint union of C and of a primed copy of C , so that the registersof C can be distinguished from those of C . We then have, for all registers r, s ∈ R and allrelations ⊲⊳ ∈ { <, >, = } that σ ( C , C ) ⇒ r ⊲⊳ s ′ if and only if C ( r ) ⊲⊳ C ( s ). Remark 4.6.
Recall that by definition of an orbit, we have that for any configurations C and C ′ such that τ ( C ) = τ ( C ′ ), there exists a morphism µ ∈ Aut( Q + ) such that µ ( C ) = C ′ .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: • for all r ∈ X , σ ⇒ r ≤ r ′ • for all r, s ∈ X , if σ ⇒ s = s ′ and σ ⇒ r ≤ s , then σ ⇒ r = r ′ By extension, for two configurations C and C ′ over R , we say that C and C ′ have theproperty ⋆ 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 induceinfinite descending chains nor infinite bounded increasing chains, if a run loops over config-urations whose pairwise type is σ . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 25
Relations between machines over N and over Q + . There is a tight relationbetween machines operating over N and over Q + . First, since N is a subdomain of Q + , runsin N are also runs in Q + . Over finite runs, by multiplying all data by the product of theirdenominators, we can get the converse property. Proposition 4.8.
Let X ⊂ f Q + be a finite subset of Q + . There exists an automorphism λ ∈ Aut( Q + ) such that λ ( X ) ⊂ N , λ ( N ) ⊆ N and λ is non-contracting, i.e. for all x, y ∈ Q + , | λ ( x ) − λ ( y ) | ≥ | x − y | .Proof. By writing X = n p q , . . . , p n q n o , let K = Q i q i . Then λ : d Kd is an automorphismsatisfying the required properties.We then get the following: Proposition 4.9.
Let A be a NRA , and let ν and ν ′ be Q -types.If there exists two configurations C, C ′ : R → Q + such that τ ( C ) = ν , τ ( C ′ ) = ν ′ anda data word v ∈ Q ∗ + such that C u −→ C ′ , then there also exists two configurations D, D ′ and a data word w which satisfy the same properties, and which belong to N , i.e. such that D, D ′ : R → N and w ∈ N ∗ .Proof. Let A be a NRA , and assume that C u −→ C ′ . By applying Proposition 4.8 to X = C ( R ) ∪ C ′ ( R ) ∪ data ( u ), 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.2and 4.3. The property ⋆ ensures that a loop can be iterated in N , as shown in the next keyproposition: Proposition 4.11.
Let T be an NRT and assume that B u −→ B ′ following some sequenceof transitions π , where τ ( B ) = τ ( B ′ ) , u ∈ Q ∗ + and B and B ′ have the property ⋆ . Thenthere exists an infinite run D x −→ over the sequence of transitions π ω , with x ∈ N ω and τ ( D ) = τ ( B ) . Before showing this proposition, let us introduce some intermediate notions:
Definition 4.12.
Let
C, C ′ be two configurations over Q + such that τ ( C ) = τ ( C ′ ). Wesay that C ′ is wider than C whenever for any r, s ∈ R , we have: • | C ′ ( s ) − C ′ ( r ) | ≥ | C ( s ) − C ( r ) |• C ′ ( r ) ≥ C ( r )Note that the second item of the definition is required to ensure that the interval between C ′ ( r ) and 0 is also wider than the interval between C ( r ) and 0. Proposition 4.13.
Let σ be a type over R ⊎ R ′ such that σ | R = σ | R ′ . If σ has the ⋆ property,then there exist two configurations C and C ′ in N such that σ ( C, C ′ ) = σ and such that C ′ is wider than C .Proof. First, assume that there exists some register r ∈ R such that σ ⇒ r = 0 (thus σ ⇒ r ′ = 0, since we assumed that σ | R = σ | R ′ ). If this is not the case, consider instead thetype σ = σ ∧ r = 0 ∧ r ′ = 0 over R ⊎ { r } . Indeed, the reader can check that if C and C ′ are two configurations in N such that σ ( C, C ′ ) = σ and C ′ is wider than C ′ , then C | R and C ′| R are two configurations in N such that σ ( C, C ′ ) = σ and C ′| R is wider than C | R .Now, for a pair of configurations ( C, C ′ ), define its shrinking intervals: S ( C, C ′ ) = { ( r, s ) | | C ′ ( s ) − C ′ ( r ) | < | C ( s ) − C ( r ) |} , and say that ( C, C ′ ) has k = | S ( C, C ′ ) | shrinkingintervals. We need to show that given a pair of configurations B and B ′ such that σ ( B, B ′ ) = σ , if they have k > C and C ′ such that σ ( C, C ′ ) = σ and which has l < k intervals that shrink.Thus, let B and B ′ be two configurations such that σ ( B, B ′ ) = σ and which have k > r, s ) ∈ S ( B, B ′ ); w.l.o.g. assume that B ′ ( s ) ≥ B ′ ( r ). As B and B ′ have the same type, we get B ( s ) ≥ B ( r ). Moreover, as ( r, s ) ∈ S , B ( s ) = B ( r ), so B ( s ) > B ( r ), which implies B ′ ( s ) > B ′ ( r ). Finally, we have that B ′ ( s ) > B ( s ). Indeed,since σ has the ⋆ property, we have that B ′ ( s ) ≥ B ( s ), and moreover if we had B ′ ( s ) = B ( s ),we would get that B ( r ) = B ′ ( r ) as B ( r ) ≤ B ( s ), which would mean that ( r, s ) / ∈ S ( B, B ′ ).Finally, let M = max ( { B ( t ) | t ∈ R, B ( t ) < B ′ ( s ) } ∪ { B ′ ( t ) | t ∈ R, B ′ ( t ) < B ′ ( s ) } ) bethe maximum value seen in B and B ′ which is lower than B ′ ( s ). Note that we have M ≥ B ( r ), M ≥ B ′ ( r ) and M ≥ B ( s ).Now, let c = (cid:0) B ( s ) − B ( r ) (cid:1) − (cid:0) B ′ ( s ) − B ′ ( r ) (cid:1) . As ( r, s ) ∈ S , c >
0. Then, consider themorphism µ ∈ Aut( Q + ) defined as x ∈ [0; M ] xx ∈ ] M ; B ′ ( s )] M + B ′ ( s )+ c − MB ′ ( s ) − M ( x − M ) x ∈ ] B ′ ( s ); + ∞ [ x + c It can be checked that for all x, y ∈ Q + , | µ ( y ) − µ ( x ) | ≥ | y − x | , so | S ( µ ( B ) , µ ( B ′ )) | ≤| S ( B, B ′ ) | . Now, we have that ( r, s ) / ∈ S ( µ ( B ) , µ ( B ′ )). Indeed, µ ( B ( s )) = B ( s ), µ ( B ( r )) = B ( r ) and µ ( B ′ ( r )) = B ′ ( r ) since B ( s ) , B ( r ) , B ′ ( r ) ∈ [0; M ]. Finally, µ ( B ′ ( s )) = B ′ ( s ) + c .Overall, we get that (cid:0) µ ( B ( s )) − µ ( B ( r )) (cid:1) − (cid:0) µ ( B ′ ( s )) − µ ( B ′ ( r )) (cid:1) = (cid:0) B ( s ) − B ( r ) (cid:1) − (cid:0) B ′ ( s ) + c − B ′ ( r ) (cid:1) = c − c = 0, which means that | B ′ ( s ) − B ′ ( r ) | = | B ( s ) − B ( r ) | , so( r, s ) / ∈ S ( µ ( B ) , µ ( B ′ )): | S ( µ ( B ) , µ ( B ′ )) | < | S ( B, B ′ ) | .Since µ ∈ Aut( Q + ), we get that ( µ ( B ) , µ ( B ′ )) is such that σ ( µ ( B ) , µ ( B ′ )) = σ , so weexhibited a pair of configurations which has l < k intervals that shrink.By iteratively applying this process to ( B, B ′ ) until no shrinking intervals remain, we geta pair ( C, C ′ ) which is such that σ ( C, C ′ ) = σ and C ′ is wider than C . Now, by multiplyingall data in C and C ′ by the product of their denominators, we get two configurations D and D ′ which are in N such that σ ( D, D ′ ) = σ and D ′ is wider than D .We finally need the following technical result: Proposition 4.14.
Let C and C ′ be two configurations in N such that C ′ is wider than C .Then, there exists some morphism µ ∈ Aut( Q + ) such that C ′ = µ ( C ) and µ ( N ) ⊆ N .Proof. Let { a , . . . , a k } = C ( R ) ∪{ } and { a ′ , . . . , a ′ k } = C ( R ) ∪{ } , with 0 = a < · · · < a k and a ′ < · · · < a ′ k . Note that since τ ( C ) = τ ( C ′ ), we indeed have that | C ( R ) ∪ { }| = | C ′ ( R ) ∪ { }| ; moreover, since C ′ is wider than C , we have that for all 0 ≤ i < k , a ′ i +1 − a ′ i >a i +1 − a i . Consider the following easy lemma (the proof is in Appendix A for completeness): Lemma 4.15.
Let a, b, c, d ∈ N be such that a < b , c < d and d − c ≥ b − a . Then,there exists a function f : [ a ; b ] → [ c ; d ] which is increasing and bijective, and such that f ([ a ; b ] ∩ N ) ⊆ N . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 27
Then, apply it to each interval [ a i ; a i +1 ] to get a family of increasing and bijectivefunctions ( µ i ) ≤ i Let T be an NRT and assume that B u −→ π B ′ following somesequence 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 somemorphism such that ν ( B ) = C and ν ( B ′ ) = C ′ (such morphism exists since σ ( B, B ′ ) = σ ( C, C ′ )). Then, we have that C ν ( u ) −−→ π C ′ . By multiplying all involved data by theircommon denominator (cf Propostion 4.8), we get two configurations D and D ′ , along withsome 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 a morphism µ ∈ Aut( Q + ) such that µ ( D ) = D ′ and µ ( N ) ⊆ N . Thus, by letting x = vµ ( v ) µ ( v ) . . . , we get that D v −→ π µ ( D ) µ ( v ) −−→ π µ ( D ) . . . is arun 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 , 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 configura-tions D, D ′ : R → N such that D w −→ D ′ x −→ , τ ( C ) = τ ( D ) and τ ( C ′ ) = τ ( D ′ ) .Proof. Since τ ( C ′ ) = τ ( C ′′ ), there exists some µ ∈ Aut( Q + ) such that µ ( C ′ ) = C ′′ , thus µ ( C ) µ ( u ) −−−→ C ′′ . Now, by applying Proposition 4.8 to X = ( µ ( C ))( R ) ∪ C ′′ ( R ) ∪ data ( µ ( u )),we get that λ ( µ ( C )) λ ( µ ( u )) −−−−→ λ ( C ′′ ) λ ( v ) −−→ satisfies the required property.4.4. Emptiness of automata.Proposition 4.17 (Non-emptiness) . Let A be an NRA over N ω . The following are equiv-alent: (1) L ( A ) is non-empty (2) there exist two runs whose input words belong to Q ∗ + , which are as follows: (a) C u −→ C (b) D v −→ D ′ with τ ( D ) = τ ( D ′ ) = τ ( C ) , D is a final configuration, and σ = σ ( D, D ′ ) satisfies ⋆ property.Proof. Assume (2) holds. The result easily follows from Propositions 4.9, 4.11 and 4.16.Assume now that L ( A ) is non-empty. Let ρ = C d −→ C d −→ C . . . be an accepting runover input x = d d . . . in A (where C = ( q , i ≥ 0, let ν i = τ ( C i ). As ρ isacccepting and there are only finitely many types, we get that there exists some type ν suchthat the state is accepting and ( q i , ν i ) = ( q, ν ) for infinitely many i ∈ N . Let ( C j ) j ∈ N be aninfinite subsequence of C i such that for all j , τ ( C j ) = ν . Now, colour the set of unorderedpairs as follows: c ( { τ ( C j ) , τ ( C k ) } ) = σ jk ( 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 ( r ) > C ( r ) > · · · > C n ( r ) . . . , which yields an infinitedescending 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 ( r ) < C ( r ) < · · · < C n ( r ) < . . . . On the other hand, C ( s ) = C ( s ) = · · · = C n ( s ) = . . . . But we also have that for all k ∈ N , C k ( r ) < C k ( s ) = C ( s ).Overall, we get an infinite increasing chain which is bounded from above by C ( s ), whichagain leads to a contradiction.Thus, σ satisfies the ⋆ property. So, this is in particular the case for some pair of configura-tions 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 runover some input, which is in particular initial):(a) C u −→ C (b) D v −→ D ′ .Moreover, τ ( D ) = τ ( D ′ ) = τ ( C ) and D is final, by definition of ( C k ) k ∈ N . Corollary 4.18. Emptiness for NRA over N ω is decidable in PSpace .Proof. The algorithm is similar to the one for deciding non-emptiness for NRA over oligo-morphic domains. Indeed, the sought witness lies in Q + , which is oligomorphic; it suffices toadditionally check that the pairwise type of D and D ′ satisfies the star property. Thus, thealgorithm initially guesses τ ( C ) and σ . Then, checking that there indeed exists a configura-tion whose type is τ ( C ) and that can be reached from C (item 2a of Propostion 4.17) canbe done in the same way as for Theorem 3.12, by simulating symbolically (i.e. over Q -types)a run of the automaton. Now, for item 2b, the algorithm again symbolically simulates a runfrom D , by keeping track of the type of the current configuration τ ( D ′ ), and additionallyof the pairwise type σ ( D, D ′ ). Since σ ( D, D ′ ) is a Q -type over 2 | R | registers, it can bestored in polynomial space; moreover, given a transition test φ , it can also be updated inpolynomial space.4.5. Functionality. Following the study of the relationships between N and Q , we are nowready to provide a characterization of non functionality over N . Intuitively, it amounts tofinding two pairs of runs whose inputs are in Q : first, a prefix witnessing a mismatch, andsecond, 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 followingare equivalent: (1) R is not functional (2) there exist two pairs of runs whose input words belong to Q ∗ + , which are as follows: (a) C u | u −−→ C and C u | u −−→ C with u u , (b) D v −→ D ′ and D v −→ D ′ with τ ( D ⊎ D ) = τ ( D ′ ⊎ D ) = τ ( C ⊎ C ) , both runsvisit a final state of T , and σ i = τ (( D ⊎ D ) ⊎ ( D ′ ⊎ D ′ )) satisfies property ⋆ . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 29 Proof. First, assume that (2) holds. By applying Proposition 4.11 to the product transducer T × T , there exists two configurations E and E and an infinite data word x ∈ N ω suchthat E x | y −−→ and E x | y −−→ . Moreover, both runs are accepting as each finite run is requiredto visit a final state of T .Now, since τ ( E ⊎ E ) = τ ( D ⊎ D ) = τ ( C ⊎ C ), we can apply Proposition 4.16 toget two runs C u ′ | u ′ −−−→ F x ′ | y ′ −−−→ and C u ′ | u ′ −−−→ F x ′ | y ′ −−−→ . Moreover, since morphisms preservemismatches, we know that u ′ u ′ . Thus, we obtained a witness of non-functionality, sincewe have ( u ′ x, u ′ y ′ ) , ( u ′ x, u ′ y ′ ) ∈ T , with u ′ y ′ = u ′ y ′ since u ′ u ′ .We now assume that R is not functional. By definition, and as we assume R onlycontains infinite output words, there are two runs on some input word x whose outputsmismatch. By splitting both runs after the first mismatch, we get two runs C t | t −−→ B w | y −−→ and C t | t −−→ B w | z −−→ with t t (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 ( A ) = (cid:26) w ′ | E w ′ | y ′ −−−→ T , E w ′ | z ′ −−−→ T and τ ( E ⊎ E ) = τ ( B ⊎ B ) (cid:27) which starts by guessing some configuration E ⊎ E and checks that τ ( E ⊎ E ) = τ ( B ⊎ B ), then simulates T × T . Such language is non-empty, since it at least contains w . ByProposition 4.17, we get that there exists runs whose input words belong to Q ∗ + which are C ⊎ C u ′ −→ C ⊎ C and D ⊎ D v −→ D ′ ⊎ D ′ with τ ( D ⊎ D ) = τ ( D ′ ⊎ D ′ ) = τ ( C ⊎ C ), D and D ′ final and σ ( D ⊎ D , D ′ ⊎ D ′ ) satisfies the ⋆ property, which immediately yieldsitem 2b.Since C ⊎ C u ′ −→ C ⊎ C , by definition of the considered NRA , we have that E u ′ | u ′ −−−→ T C and E u ′ | u ′ −−−→ T C , with τ ( E ⊎ E ) = τ ( B ⊎ B ). Thus, by applying a morphism µ such that µ ( B ) = E , µ ( B ) = E , such runs can be glued with the runs C t | t −−→ B and C t | t −−→ B toyield two runs C u | u −−→ C and C u | u −−→ C , with u = µ ( t ) u ′ and u = µ ( t ) u ′ , u = µ ( t ) u ′ ,with u u since µ ( t ) µ ( t ) (recall that morphisms preserve mismatches, since they arebijective), 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 boundedby P ( R (4 k ) , | Q | , L ), where R denotes the Ryll-Nardzewski function of Q + , which is ex-ponential. Thus, the existence of u can be checked with a counter that is polynomiallybounded. Then, item 2b can be checked in polynomial space, since it reduces to checkingemptiness 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, itsnext-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 itRemind 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 , c , 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 functionalityproblem for an NRT T uv . First, let us define the convolution x ⊗ x of two data words x = d d . . . , x = d ′ d ′ · · · ∈ N ω as the data word d d ′ d d ′ . . . . The intuitive idea isto construct T uv in such a way that it defines the relation R uv = R uv ∪ R uv defined by R iuv = { ( ux ⊗ ux , vd ω ) | ux , ux ∈ dom( f ) , vd (cid:22) f ( ux i ) } . It is not difficult to seethat R uv is a function iff the next-letter has a positive answer for u and v . Once T uv isconstructed, checking its functionality is possible thanks to Corollary 4.20. Let us nowexplain how to construct T uv . It is the union of two transducers T uv and T uv defining R uv and R uv respectively. The constructions are similar for both: T uv ignores the even positionof the input word after u has been read while T uv ignores the odd position after u has beenread, but they otherwise are defined in the same way. Let us explain how to construct T uv .First, T 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 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 i th data d i of v , it sufficeswhen T outputs a register r on its transitions, to add the test r = d i ). So, T uv simulates arun 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 simulatedrun outputs something, the data is kept in a special register and outputted all the time by T uv .2. If we know that there exists a next letter d , the only thing that remains to be doneis to compute it. To do so, we can again construct a transducer T ′ uv which simulates T butmakes sure to accept only input words that start with u , accepted by runs which outputswords starting with v . This can again be done by hardcoding u and v in T . Then, to computea data d , it suffices to execute T ′ uv by computing, at any point i , all the configurationsreached by T ′ uv , and by keeping only those which are co-reachable. Testing whether aconfiguration is co-reachable can be done by testing the non-emptiness of an NRA startingin 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, (1) f is computable iff f is continuous (2) f is uniformly computable iff f is uniformly continuous (3) f is m -computable iff f is m -continuous Uniform continuity. We now turn to uniform continuity over N , and show that it isenough to consider uniform continuity over Q and restrict our attention to configurationsthat are co-reachable w.r.t. data words over N . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 31 Given a configuration Q -type τ , we say that it is co-reachable in N if there is an actualconfiguration C of type τ which is co-reachable. Proposition 4.23. Let T be an NRT over ( N , { < } ) and f = J T K . The following areequivalent: • f is uniformly continuous, • There is a critical pattern with D , D co-reachable in N .Proof. Let T ′ denote the same transducer as T except that 1) it is over Q and 2) it isrestricted to configurations which are co-reachable in N .We claim that T realizes a uniformly continuous function if and only if T ′ does. FromProposition 3.7, 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.7, this means that we can exhibit a critical pattern C u | u −−→ C v | v −−→ µ ( C ) w | w −−−→ D , C u | u −−→ C v | v −−→ µ ( C ) z | w −−−→ D such that D , D are co-reachable.By definition we have that D , D are co-reachable in N . Let i denote the mismatchingposition in the pattern. Let n > n but outputs that have a longest common prefix smaller than i . Weconsider the two runs C u | u −−→ C v | v −−→ µ ( C ) · · · µ n ( C ) µ n ( v ) | µ n ( v ) −−−−−−−−→ µ n +1 ( C ) µ n ( w ) | µ n ( w ) −−−−−−−−→ µ n ( D ) and C u | u −−→ C v | v −−→ µ ( C ) · · · µ n ( C ) µ n ( v ) | µ n ( v ) −−−−−−−−→ µ n +1 ( C ) µ n ( w ) | µ n ( w ) −−−−−−−−→ µ n ( D ).Note that it could be that µ n cancels the mismatch, in which case we can consider µ n +1 .Since µ n ( D ) and µ n ( D ) are co-reachable, we can use Proposition 4.16 and we obtain theresult.As a corollary, we obtain: Theorem 4.24. Let f : N ω → N ω be a function defined by an NRT over N . Deciding itsuniform 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.12. We have to be careful however, since computing T ′ explicitlymay be too costly. The trick is that checking if a configuration is co-reachable can be doneon 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 empti-ness 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 areequipped with a distinguished register r m which along the run stores the maximal data seenin the input so far. Proposition 4.26 (Continuity) . Let f : N ω → N ω be given by an NRT T over N . Thefollowing are equivalent: (1) f is not continuous (2) there exists a critical pattern in Critical ( u, v, w, z, C , C , C ′ , C ′ , D , D ) with u, v, w, z ∈ Q ∗ + , where C is final, D and D are co-reachable in N and such that σ = τ (( C ⊎ C ) ⊎ ( C ′ ⊎ C ′ )) satisfies the ⋆ property for X = R ∪ R l , where R l = { r ∈ R | ∃ r ′ ∈ R ′ , σ ⇒ r ≤ r ′ } .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 extractingsubsequences, 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 suchthat ( ρ 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, we do not have the property that afterreading input u , the configuration of the transducer takes its values in data ( u ) ∪ { } , whichwould allow to build a concrete run by extracting subsequences of runs whose configurationscoincide 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 , whichnecessarily correspond to data that have been guessed, otherwise their content is at mostequal to the one of r m ), and having two runs that can be instantiated by actual data wordsallow 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 fi-nite set, by using compactness arguments, we can extract two subsequences ( τ ′ n,i ) n,i ∈ N and( σ ′ n,i,j ) n ∈ N , ≤ i 0, there exists some N ≥ n ≥ N , we havethat τ ′ n,i = τ ′ i and σ ′ n,i,j = σ i,j for all 0 ≤ i < j ≤ M (note that for types τ ′ n,i , this cor-responds 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 arefinal. We further restrict to E i which all have the same type ν (there is at least one typewhich 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 ) ≤ i 1, which does not exist in N . – If s ∈ R l then let r ′ M ∈ R be such that σ ⇒ s ≤ r ′ M . Then, let B = E ( r ′ M ) + 1,and let N be such that σ N,i,j = σ for all 0 ≤ i < j ≤ B . If r ∈ R then we have that E ( r ) < E ( d ) < · · · < E B ( r ) ≤ E B ( s ) = E ( s ) ≤ E ( r ′ M ); similarly if r ∈ R l we get C N, ( r ) < C N, ( r ) < · · · < C N,B ( r ) ≤ C N,B ( s ) = C N, ( s ) ≤ E ( r ′ M ). In both cases,this leads to a contradiction.As a consequence, σ indeed has the property ⋆ for X = R ∪ R l .Now, it remains to exhibit a critical pattern from ρ and the (last) extracted subsequence( ρ n ) n ∈ N and the corresponding inputs ( x n ) n ∈ N . Let k ∈ N be such that for all n ∈ N , | f ( x ) ∧ f ( x n ) | ≤ k . On the one hand, we have ρ = E u | v −−−→ E u | v −−−→ E . . . , where x = u u . . . and such that all ( E i ) i> are final and they all have the same type. On theother hand, each ρ n can be written ρ n = C n, u n | v n −−−→ C n, u n | v n −−−→ C n, . . . , where for all j ≥ , | u nj | = | u j | (the configurations C n,i are synchronised with those of E i , as we alwaysextracted subsequences in a synchronous way) and u n u n · · · = x n . Now, let M be such that ∀ n ≥ M , we have ∀ ≤ i < j ≤ B + 3 , σ n,i,j = σ , where B = 2 k . Finally, take some l ≥ M such that | x l ∧ x | ≥ | u u . . . u B +1 | . There are two cases: • v . . . v B v l . . . v lB . Then, we exhibited a critical parttern with two runs E u ...u B | v ...v B −−−−−−−−−→ E B +1 u B +1 | v B +1 −−−−−−−→ E B +2 u B +2 | v B +2 −−−−−−−→ E B +3 along with C l, u l ...u lB | v l ...v lB −−−−−−−−−→ C l,B +1 u lB +1 | v lB +1 −−−−−−−→ C l,B +2 u lB +2 | v lB +2 −−−−−−−→ C l,B +3 . First, the outputs indeed mismatch, by hypothesis, so we arein case a) of the definition of a critical pattern (see Definition 3.5). • v . . . v B k v l . . . v lB . Then, since v . . . v B ≤ f ( x ) and v l . . . v lB ≤ f ( x l ), and since | f ( x ) ∧ f ( x l ) | ≤ k , we get that | v . . . v B | ≤ k or | v l . . . v lB | ≤ k . Now, there are again two cases: – There exists some i ≤ B such that v i = v li = ε . Then, we exhibited a critical pat-tern with two runs E u ...u i − | v ...v i − −−−−−−−−−−−→ E i u i | ε −−→ E i +1 u i +1 ...u m | v i +1 ...v m −−−−−−−−−−−−→ E m +1 and C l, u l ...u li − | v l ...v li − −−−−−−−−−−−→ C l,i u li | ε −−→ C l,i +1 u li +1 ...u lm | v li +1 ...v lm −−−−−−−−−−−−→ C l,m +1 , where m is such that v l . . . v lm v . . . v m (such m exists since f ( x n ) f ( x )). We are then in case c) of thedefinition of a critical pattern (see Definition 3.5). – Otherwise, there necessarily exists some i ≤ B such that v i = ε or v li = ε since | v . . . v B | ≤ k or | v l . . . v lB | ≤ k . We assume that v i = ε , the reasoning is symmetricif instead v li = ε . Necessarily, v l . . . v li − f ( x ), otherwise we can find some i suchthat both v i = v li and we are back to the previous case. Then, we exhibited a critical pattern with two runs E u ...u i − | v ...v i − −−−−−−−−−−−→ E i u i | ε −−→ E i +1 u i +1 ...u m | v i +1 ...v m −−−−−−−−−−−−→ E m +1 and C l, u l ...u li − | v l ...v li − −−−−−−−−−−−→ C l,i u li | v li −−−→ C l,i +1 u li +1 ...u lm | v li +1 ...v lm −−−−−−−−−−−−→ C l,m +1 , where m is such that v l . . . v lm v . . . v m (such m exists since we assumed that v l . . . v li − f ( x )). We arethen in case b) of the definition of a critical pattern (see Definition 3.5).Finally, in all the considered cases, the last configuration D = E j of the first run of thecritical pattern (the one which is a prefix of ρ ) is final, since we extracted the ( E i ) so thatwe only kept the final ones. Also, both D = E j and D = C l,j are co-reachable in N sincethey are configurations of accepting runs in N , which concludes the proof of (1) ⇒ (2). Proof of (2) ⇒ (1) . We assume now that (2) holds and show that f is not continuous.Intuitively, following notations of the critical pattern, we will prove that f is not continuousat some input x = u ′ v ′ µ ( v ′ ) µ ( v ′ ) . . . , where u ′ , v ′ elements of N + , images of u, v by someautomorphism.Thus, let us consider two runs C u | u −−→ C v | v −−→ µ ( C ) with C final, and C u | u −−→ C v | v −−→ µ ( C ) z | w −−−→ D with D co-reachable in N . Two cases can occur: either u u , or v = ǫ and u u w . As in the proof in the oligomorphic setting, we want to show that itis possible to build from the first run an infinite run looping forever along (some renamingof) v , and from the second run a family of infinite runs, looping more and more. While thisis directly true in some oligomorphic data domain, as we saw before, iteration in N is moretricky.These runs can be seen as finite runs in the transducer T × T , with twice as manyregisters as T , which we denote by R for the first copy, and R for the second. Byassumption, σ = τ (( C ⊎ C ) ⊎ ( C ′ ⊎ C ′ )) satisfies the ⋆ property for X = R ∪ R l . Ifwe had that σ satisfies the ⋆ property for R ∪ R , then we could immediately deduce byProposition 4.11 that the two loops on v could be iterated infinitely many times. However,the weaker hypothesis we have will only allow us to show that the loop from C can indeedby ω -iterated, while the loop from C can be iterated as many times as we want, but finitelymany times. To this end, we have to take care of registers in R \ R l to show that theseruns indeed exist.As we assumed that there is a register r m storing the maximal data appearing in theinput word, the definition of the set R l ensures that every register not in R l has its valuecoming from a guess along the run C u −→ C . This is directly linked with the technicaldifficulty inherent to the presence of guessing. In particular, this allows us to considerdifferent runs, in which the input data word is not modified, but the guessed values are.As C and µ ( C ) have the same type, and registers not in R l have “large” values, theirbehaviour along the cycle (w.r.t. types) C v −→ µ ( C ) is very restricted: they can onlyincrease or decrease at each step. In particular, if one starts from some configuration C in which values of registers not in R l are very far apart, this will allow to iterate the cycleseveral times. More precisely, for any integer n , we can compute an integer n ′ and valuesfor the guesses of registers not in R l which are pairwise n ′ far apart, ensuring that the cyclecan be repeated at least n times.Thus, the previous reasoning allows us to replicate the proof of Proposition 4.11 toshow that there exist a word v ′ ∈ N ∗ and an automorphism α preserving N , such that: • C ′ x | y −−→ , with τ ( C ′ ) = τ ( C ) and x = v ′ α ( v ′ ) α ( v ′ ) . . . OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 35 • there exists C ′ and, for all n , some C ′ ( n ) with C ′ ( n ) | R l = C ′ | R l , τ ( C ′ ( n )) = τ ( C ), and C ′ ( n ) v ′ −→ α ( C ′ ( n )) . . . α n ( v ′ ) −−−−→ α n +1 ( C ′ ( n ))Using previous remark on guessed values, together with Proposition 4.16 applied on C u −→ C and C u −→ C , and Proposition 4.9 applied on µ ( C ) z | w −−−→ D z l −→ , we end up with: • a run C u ′ | u ′ −−−→ E x ′ | y ′ −−−→ , with x ′ = v ′′ α ( v ′′ ) α ( v ′′ ) . . . • for every n , there is a run C u ′ | u ′ −−−→ E v ′′ −→ α ( E ) . . . α n ( v ′′ ) −−−−→ α n +1 ( E ) z ′ | w ′ −−−→ D ′ z ′ l −→• u ′ u ′ or u ′ u ′ w ′ Hence, this proves the non functionality as we have a sequence of runs whose inputs convergetowards u ′ x ′ but whose outputs mismatch. Theorem 4.28. Continuity of NRT on N is PSpace -c.Proof. Small critical pattern property (Claim 3.6) on oligomorphic data can easily beadapted to N . Indeed, the only difference lies in the loops on v , but is is important tonotice that loop removal used to reduce length of runs preserves the extremal configura-tions (see Proposition 3.1), hence it preserves the type of the global run, here the type σ = τ (( C ⊎ C ) ⊎ ( C ′ ⊎ C ′ )).Then, one can proceed similarly by guessing such a small critical pattern, and checkingmismatches with counters. Note that we have to verify in addition that D is co-reachable in N , but again, as already detailed in previous proofs, this property can be decided on-the-fly.Finally, the PSpace lower bound can again be obtained by a reduction to the emptinessproblem of register automata over ( N , { = } ), which is PSpace -c [DL09].4.9. Transfer result. We have extended our result to one non-oligomorphic structure,namely ( N , { <, } ), which is a substructure of ( Q , { <, } ). If we want to extend the resultto other substructures of ( Q , { < } ), say ( Z , { < } ), we could do the same work again and studythe properties of iterable loops in Z . However, a simpler way is to observe that ( Z , { < } ) canbe simulated by N , using two copies of the structure. We show a quite simple yet powerfulresult: given a structure D , if the structure D ′ can be defined as a first-order interpretationover D then the problems of emptiness, functionality, continuity, etc reduce to the sameproblems over D .A first-order interpretation of dimension l with signature Γ over a structure ( D , Σ)is given by FO [Σ] formulas: a formula φ domain ( x , . . . , x l ), for each constant symbol c of Γ a formula φ c ( x , . . . , x l ) and for each relation symbol R of Γ of arity r a formula φ R ( x , . . . , x l , . . . , x r , . . . , x rl ). The structure D ′ is defined by the following: a domain D ′ = { ( d , . . . , d l ) | D | = φ domain ( d , . . . , d l ) } ; an interpretation ( d , . . . , d l ) ∈ D ′ for eachconstant symbol c such that D | = φ c ( d , . . . , d l ) (we assume that there is a unique possibletuple satisfying the formula, which can be syntactically ensured); an interpretation R D = (cid:8) ( x , . . . , x l , . . . , x r , . . . , x rl ) | D | = φ R ( x , . . . , x l , . . . , x r , . . . , x rl ) (cid:9) for each relation symbol R . Theorem 4.29. Let D ′ be a first-order interpretation over D . Let P denote a decisionproblem among non-emptiness, functionality, continuity, Cauchy continuity or uniform con-tinuity. There is a PSpace reduction from P over D ′ to P over D . Proof. Let R ⊆ D ′ ω × D ′ ω be given by an NRT T . If we assume that D ′ is an l -dimensioninterpretation of D , then we can view R as a relation P ⊆ ( D l ) ω × ( D l ) ω . Note that P isempty (resp. functional, continuous, Cauchy continuous, uniformly continuous) if and onlyif R is.Moreover, since D ′ is an interpretation, one can construct an NRT S which realizes P .It uses l registers for every register of T plus l − l − l transition, it simulates a transition of T ,just by substituting the formulas of the interpretation for the predicates. As usual, we donot construct S explicitly, but we are able to simulate it using only polynomial space.As a direct corollary we can, in particular, transfer our result over ( N , { <, } ) to ( Z , { <, } ): Corollary 4.30. The problems of non-emptiness, functionality, continuity, Cauchy conti-nuity, uniform continuity over ( Z , { <, } ) are in PSpace .Proof. From Theorem 4.29, using the fact that ( Z , { <, } ) is given by the following twodimensional interpretation over ( N , { <, } ): φ domain := ( x = 0) ∨ ( y = 0), φ := ( x = y =0) , φ < := ( x = x = 0 ∧ ( y < y )) ∨ ( y = y = 0 ∧ ( x > x )) ∨ ( x = y = 0 ∧ ¬ ( x = y = 0)). Remark 4.31. Of course our transfer result applies to many other substructures of ( Q , { <, } ), such as the ordinals ω + ω , ω × ω , etc . Future work We have given tight complexity results in a family of oligomorphic structures, namely poly-nomially decidable ones. An example of an exponentially decidable oligomorphic structureis the one of finite bitvectors with bitwise xor operation. Representing the type of k elementsmay require exponential sized formulas (for example stating that a family of k elements isfree, i.e. any non-trivial sum is non-zero). The same kind of proof would give ExpSpace algorithms over this particular data set (for the transducer problems we have been study-ing). One could try to classify the different structures based on the complexity of solvingthese kinds of problems.We have been able to show decidability of several transducer problems over the dataset N with the linear order. This was done using two properties: 1) that N is a substructureof Q and 2) that we were able to characterize the iterable loops in N . Moreover we cantransfer the result to other substructures of Q , e.g. Z . One possible extension would be toinvestigate data sets which have a tree-like structure, e.g. the infinite binary tree. Thereexists a tree-like oligomorphic structure, of which the binary tree is a substructure. Studyingthe iterable loops of the binary tree may yield a similar result as in the linear order case.Of course this does not have to be restricted to tree-like structures, but may be applied toany substructure of an oligomorphic structure for which we are able characterize iterableloops.There are several classical ways of extending synthesis results, for instance consider-ing larger classes of specifications, larger classes of implementations or both. In partic-ular, an interesting direction is to consider non-functional specifications. As mentionedin Introduction however, and as a motivation for studying the functional case, enlargingboth (non-functional) specifications and implementations to an asynchronous setting leads OMPUTABILITY OF DATA-WORD TRANSDUCTIONS OVER DIFFERENT DATA DOMAINS 37 to undecidability. Indeed, already in the finite alphabet setting, the synthesis problemof deterministic transducers over ω -words from specifications given by non-deterministictransducers is undecidable [CL14]. A simple adaptation of the proof of [CL14] allows toshow that in this finite alphabet setting, enlarging the class of implementations to any com-putable function also yields an undecidable synthesis problem. An interesting case howeveris yet unexplored already in the finite alphabet setting: given a synchronous specifications,as an ω -automaton, is to possible to 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). Moreprecisely, it is shown that realizability by a continuous function is decidable, but it turns outthat the synthesised function is definable by a deterministic transducer (hence computable).When the domain of the specification is partial, the situation changes drastically: deter-ministic transducers may not suffice to realize a specification realizable by a computablefunction. This can be seen by considering the (partial) function g of Introduction, seen as aspecification and casted to a finite alphabet { a, b, c } : it is not computable by a deterministictransducer, since it requires an unbounded amount of memory to compute this function. References [BKL14] Mikolaj Bojanczyk, Bartek Klin, and Slawomir Lasota. Automata theory in nominal sets. Log.Methods Comput. Sci. , 10(3), 2014.[Boj19] Miko laj Boja´nczyk. Atom Book . 2019.[CHVB18] Edmund M. Clarke, Thomas A. Henzinger, Helmut Veith, and Roderick Bloem, editors. Handbookof Model Checking . Springer, 2018.[CL14] Arnaud Carayol and Christof L¨oding. Uniformization in Automata Theory. In Proceedings of the14th Congress of Logic, Methodology and Philosophy of Science Nancy, July 19-26, 2011 , pages153–178. London: College Publications, 2014.[DFKL20] Vrunda Dave, Emmanuel Filiot, Shankara Narayanan Krishna, and Nathan Lhote. Synthesisof computable regular functions of infinite words. In Igor Konnov and Laura Kov´acs, editors, , volume 171 of LIPIcs , pages 43:1–43:17. Schloss Dagstuhl- Leibniz-Zentrum f¨ur Informatik, 2020.[DL09] St´ephane Demri and Ranko Lazic. LTL with the freeze quantifier and register automata. ACMTrans. Comput. Log. , 10(3):16:1–16:30, 2009.[EFK21] L´eo Exibard, Emmanuel Filiot, and Ayrat Khalimov. Church synthesis on register automata overinfinite ordered data domains. STACS , 2021.[EFR19] L´eo Exibard, Emmanuel Filiot, and Pierre-Alain Reynier. Synthesis of data word transducers.In , pages 24:1–24:15, 2019.[EFR20] L´eo Exibard, Emmanuel Filiot, and Pierre-Alain Reynier. On computability of data word func-tions defined by transducers. In Jean Goubault-Larrecq and Barbara K¨onig, editors, Founda-tions of Software Science and Computation Structures - 23rd International Conference, FOS-SACS 2020, Held as Part of the European Joint Conferences on Theory and Practice of Software,ETAPS 2020, Dublin, Ireland, April 25-30, 2020, Proceedings , volume 12077 of Lecture Notes inComputer Science , pages 217–236. Springer, 2020.[ESKG14] R¨udiger Ehlers, Sanjit A. Seshia, and Hadas Kress-Gazit. Synthesis with identifiers. In Pro-ceedings of the 15th International Conference on Verification, Model Checking, and AbstractInterpretation - Volume 8318 , VMCAI 2014, pages 415–433, 2014.[FJLW16] Emmanuel Filiot, Isma¨el Jecker, Christof L¨oding, and Sarah Winter. On equivalence and uniformi-sation problems for finite transducers. In , pages 125:1–125:14, 2016. [FLZ11] Wladimir Fridman, Christof L¨oding, and Martin Zimmermann. Degrees of lookahead in context-free infinite games. In Marc Bezem, editor, Computer Science Logic, 25th International Workshop/ 20th Annual Conference of the EACSL, CSL 2011, September 12-15, 2011, Bergen, Norway,Proceedings , volume 12 of LIPIcs , pages 264–276. Schloss Dagstuhl - Leibniz-Zentrum f¨ur Infor-matik, 2011.[HKT12] Michael Holtmann, Lukasz Kaiser, and Wolfgang Thomas. Degrees of lookahead in regular infinitegames. Logical Methods in Computer Science , 8(3), 2012.[JL69] J.R. B¨uchi and L.H. Landweber. Solving sequential conditions finite-state strategies. Transactionsof the American Mathematical Society , 138:295–311, 1969.[KK19] Ayrat Khalimov and Orna Kupferman. Register-bounded synthesis. In ,pages 25:1–25:16, 2019.[KMB18] Ayrat Khalimov, Benedikt Maderbacher, and Roderick Bloem. Bounded synthesis of registertransducers. In Automated Technology for Verification and Analysis, 16th International Sympo-sium, ATVA 2018, Los Angeles, October 7-10, 2018. Proceedings , 2018.[KZ10] Michael Kaminski and Daniel Zeitlin. Finite-memory automata with non-deterministic reassign-ment. Int. J. Found. Comput. Sci. , 21(5):741–760, 2010.[Pri02] Christophe Prieur. How to decide continuity of rational functions on infinite words. Theor. Com-put. Sci. , 276(1-2):445–447, 2002.[WZ20] Sarah Winter and Martin Zimmermann. Finite-state strategies in delay games. Inf. Comput. ,272:104500, 2020. Appendix A. Proof of Lemma 4.15 Lemma A.1. Let a, b, c, d ∈ N be such that a < b , c < d and d − c ≥ b − a . Then, there existsa function f : [ a ; b ] → [ c ; d ] which is increasing and bijective, and such that f ([ a ; b ] ∩ N ) ⊆ N .Proof. There are two cases: • If d − c = b − a , then take f : x → x + c − a . • Otherwise, define f as: for all x ∈ [ a ; b − 1] (note that such interval can be empty),let f ( x ) = x + c − a as above. Then, for x ∈ [ b − b ], let e = c + ( b − − a ) and f ( x ) = d − ( b − x )( d − e ). We have f ( b − 1) = e , which is consistent with the definitionof f on [ a ; b − f ( b ) = d , and f is moreover increasing and bijective. Finally, f ( b − ∈ N and f ( b ) ∈ N . Overall, f satisfies the required properties. • a • c · · · • b − • e = c + ( b − − a ) • b − / • e + d − e • b • d This work is licensed under the Creative Commons Attribution License. To view a copy of thislicense, visit https://creativecommons.org/licenses/by/4.0/https://creativecommons.org/licenses/by/4.0/