PTL-separability and closures for WQOs on words

PTL-separability and closures for WQOs on words

Georg Zetzsche IRIF (Uniersité Paris-Diderot, CNRS), France,

We introduce a flexible class of well-quasi-orderings (WQOs) on words that generalizes the ordering of (not necessarily contiguous) subwords. Each such WQO induces a class of piecewise testable languages (PTLs) as Boolean combinations of upward closed sets. In this way, a range of regular language classes arises as PTLs. Moreover, each of the WQOs guarantees regularity of all downward closed sets. We consider two problems. First, we study which (perhaps non-regular) language classes permit a decision procedure to decide whether two given languages are separable by a PTL with respect to a given WQO. Second, we want to effectively compute downward closures with respect to these WQOs. Our first main result that for each of the WQOs, under mild assumptions, both problems reduce to the simultaneous unboundedness problem (SUP) and are thus solvable for many powerful system classes. In the second main result, we apply the framework to show decidability of separability of regular languages by , a fragment of first-order logic with modular predicates.

Supported by a fellowship of the Fondation Sciences Mathématiques de Paris.

O mAdh_#1(#2) \DeclareDocumentCommand\DclosureO m↓_#1#2 \DeclareDocumentCommand\UclosureO m↑_#1#2 \DeclareDocumentCommand\seqofO mRuns_#1(#2) \DeclareDocumentCommand\MODOmod_#1 \DeclareDocumentCommand\REGreg \DeclareDocumentCommand\LTTOLTT_#1 \DeclareDocumentCommand\BSSO_1[¡,#1]

1. Introduction

In the verification of infinite-state systems, it is often useful to construct finite-state abstractions. This is because finite-state systems are much more amenable to analysis. For example, if a pertinent property of our system is reflected in a finite-state abstraction, then we can work with the abstraction instead of the infinite-state system itself. Another example is that the abstraction acts as a certificate for correctness: A violation free overapproximation of the set of behaviors of a system certifies absence of violations in the system itself. Here, we study two types of such abstractions: downward closures, which are overapproximations of individual languages and separators as certificates of disjointness.

Downward closures

A particularly appealing abstraction is the downward closure, the set of all (not necessarily contiguous) subwords of the members of a language. What makes this abstraction interesting is that since the subword ordering is a well-quasi-ordering (WQO), the downward closure of any language is regular [17, 16]. Recently, there has been progress on when the downward closure is not only regular but can also be effectively computed. It is known that downward closures are computable for context-free languages [7, 30], Petri net languages [14], and stacked counter automata [32]. Moreover, recently, a general sufficient condition for computability was presented in [31]. Using the latter, downward closures were then shown to be computable for higher-order pushdown automata [15] and higher-order recursion schemes [6]. Hence, downward closures are computable for very powerful models.

If we want to use downward closures to prove absence of violations, then using the downward closure in this way has the disadvantage that it is not obvious how to refine it, i.e. systematically construct a more precise overapproximation in case the current one does not certify absence of violations. Therefore, we wish to find abstractions that are refinable in a flexible way and still guarantee regularity and computability.


Another type of finite-state abstractions is that of separators. Since safety properties of multi-threaded programs can often be formulated as the disjointness of two languages, one approach to this task is to use regular languages to certify disjointness [2, 4, 22]. A separator of two languages and is a set such that and . Therefore, especially in cases where disjointness of languages is undecidable or hard, it would be useful to have a decision procedure for the separability problem: Given two languages, it asks whether they are separable by a language from a particular class of separators. In particular, if we want to apply such algorithms to infinite-state systems, it would be desirable to find large classes of separators (and systems) for which the separability problem is decidable.

It has long been known that separability of context-free languages are undecidable already for very simple classes of regular languages [29, 18] and this stifled hope that separability would be decidable for any interesting classes of infinite-state systems and classes of separators. However, the subword ordering turned out again to have excellent decidability properties: It was shown recently that for a wide range of language classes, it is decidable whether two given languages are separable by a piecewise testable language (PTL) [9]. A PTL is a finite Boolean combination of upward closures (with respect to the subword ordering) of single words. In fact, in turned out that (under mild closure assumptions) separability by PTL is decidable if and only if downward closures are computable [10].

However, while this separability result applies to very expressive models of infinite-state systems, it is still limited in terms of the separators: The small class of PTL will not always suffice as disjointness certificates.


This work makes two contributions, a conceptual one and a technical one. The conceptual contribution is the introduction of a fairly flexible class of WQOs on words. These are refinable and provide generalizations of the subword ordering. These orders are parameterized by transducers, counter automata or other objects and can be chosen to reflect various properties of words. Moreover, the classes of corresponding PTLs are a surprisingly rich collection of classes of regular languages.

Moreover, it is shown that all these orders have the same pleasant properties in terms of downward closure computation and decidability of PTL-separability as the subword ordering. More specifically, it is shown that (under mild assumptions), decidability of the abovementioned unboundedness problem again characterizes {enumerate*}

those language classes for which downward closures are computable and

those classes where separability by PTL is decidable.

In addition, it turns out that this framework can also be used to obtain decidable separability of regular languages by , a fragment of first-order logic with modular predicates. This is technically relatively involved and generalizes the fact that definability of regular languages in is decidable [5].

2. Preliminaries

If is an alphabet, denotes the set of words over . The empty word is denoted by . A quasi-order is an ordering that is reflexive and transitive. An ordering is called a well-quasi-ordering (WQO) if for every sequence , there are indices with . This is equivalent to requiring that every sequence contains an infinite subsequence that is ascending, meaning for . For a subset , we define and . These are called the downward closure and upward closure of , respectively. A set is called downward closed (upward closed) if (). A (defining) property of well-quasi-orderings is that for every non-empty upward-closed set , there are finitely many elements such that . See [20] for an introduction. An ordering on words is called multiplicative if and implies .

For words , we write if and for some . This ordering is called the subword ordering and it is well-known that this is a well-quasi-ordering [17].

A well-studied class of regular languages is that of the piecewise testable languages. Classically, a language is a piecewise testable language (PTL) [27] if it is a finite Boolean combination of sets of the form for . However, this notion makes sense for any WQO  [13] and we call a set piecewise testable if it is a finite Boolean combination of sets for .

A (finite-state) transducer is a finite automaton where every edge reads input and produces output. For a transducer and a language , the language consists of all words output by the transducer while reading a word from . A class of languages is called a full trio if it is effectively closed under rational transductions, i.e. if for each and each rational transduction .

3. Parameterized WQOs and main results

In this section, we introduce the parameterized WQOs on words, state the main results of this work, and present some applications. We define the class of parameterized WQOs inductively using rules (Rules 3, 2 and 1). The simplest example is Higman’s subword ordering.

Rule 1.

For each , is a parameterized WQO.

Orderings defined by transducers

To make things more interesting, we have a type of WQOs that are defined by functions. Suppose and are sets and we have a function . A general way of constructing a WQO on is to take a WQO and set if and only if . It is immediate from the definition that then is a WQO on . We apply this idea to transducers.

A finite-state transducer over and is a tuple , where is a finite set of states, is its set of edges, is the set of initial states, and is the set of final states. Transducers accept sets of pairs of words. A run of is a sequence

of edges such that , . The pair read by the run is . Then, realizes the relation

Relations of this form are called rational transductions. A transduction is functional if for every , there is exactly one with . In other words, is a function and we can use it to define a WQO.

Rule 2.

Let be a functional transduction. If is a parameterized WQO, then so is .


Another way to build a WQO on a set is to combine two existing WQOs. Suppose and are WQOs. Their conjunction is the ordering with if and only if and . Then is a WQO via the characterization using ascending subsequences.

Rule 3.

If and are parameterized WQOs, then so is their conjunction .


Using the three building blocks in Rules 3, 2 and 1, we can construct a wealth of WQOs on words. Let us mention a few examples, including the accompanying classes of PTL.

Labeling transductions

Our first class of examples concerns orderings whose PTLs are fragments of first-order logic with additional predicates. A labeling transduction is a functional transduction for some alphabet labels such that for each , , we have for some .

In this case, we can interpret -PTLs logically. To each word , , we associate a finite relational structure as follows. Its domain is and as predicates, it has the binary , unary letter predicates for , and for each , we have a unary predicate . While the predicates and are interpreted as expected, we have to explain . If , then expresses that . Hence, the give access to the labels produced by . We denote the -fragment (Boolean combinations of -formulas) as .

Suppose and are relational structures over the same signature. An embedding of in is an injective mapping from the domain of to the domain of such that each predicate holds for a tuple in if and only the predicate holds for the image of that tuple. This defines a quasi-ordering: We write if can be embedded into . Observe that for , we have if and only if .

It was shown in [13] that if the embedding order is a WQO on a set of structures, then the -fragment (i.e. Boolean combinations of formulas) can express precisely the PTL with respect to . This implies that the languages definable in are precisely the -PTL.

To illustrate the utility of the fragments , suppose we are given regular languages , , , for . Suppose we have for each a -ary predicate that expresses that our whole word belongs to . For each we also have unary predicates and , which express that the prefix and suffix, respectively, corresponding to the current position, belongs to and , respectively. Then the corresponding fragment

can clearly be realized as .

Of course, we can capture many other predicates by labeling transducers. For example, it is easy to realize a predicates for “the distance to the closest position to the left with an is congruent modulo ” (for some fixed ). Finally, let us observe in passing that instead of enriching , we could also construct fragments that do not have access to letters: If just produces labels (and no input letters), we obtain a logic where, for example, we can only express whether “this position is even and carries an ”.

Orderings defined by finite automata

Our second example slightly specializes the first example. The reason we make it explicit is that we shall present explicit ideal representations that will be applied to decide separability of regular languages by . The example still generalizes the subword order. While in the latter, a smaller word is obtained by deleting arbitrary infixes, these orders use an automaton to restrict the permitted deletion.

A finite automaton is a tuple , where is a finite set of states, is the input alphabet, is the set of edges, is the set of initial states, and is the set of final states. The language is defined in the usual way. Here, we use automata as a means to assign a labeling to an input word. A labeling is defined by a run. A run of on , , is a sequence

with and . By , denote the set of runs of . Since we want to label every word from , we call an automaton a labeling automaton if for each word , has exactly one run on . In this case, we write for the run of on . Moreover, we define , where and are the first and last state, respectively, visited during ’s run. Hence, such an automaton defines a map .

Let if and only if is obtained from by “inserting loops of ”. In other words, can be written as with such that the run of on occupies the same state before reading and after reading . Equivalently, we have if and only if and . The order is a parameterized WQO: The order with if and only if is parameterized because we can use a functional transduction that maps to the length-1 word in . Moreover, with a functional transduction that maps a word to its run , the ordering is the conjunction of and .

  • If consists of just one state and a loop for every , then is the ordinary subword ordering.

  • Suppose is a complete deterministic automaton accepting a regular language . Then is simultaneously upward closed and downward closed with respect to , where is obtained from by making all states final. In particular, every regular language can occur as an upward closure and as a downward closure with respect to some .

As for labeling transducers, we can consider logical fragments where is the embedding order. Again, our signature consists of , for . Furthermore, for each , we have the -ary predicates and and unary predicates and . Let be the run of on . Then is true iff . Moreover, holds iff . Hence, and give access to the state occupied by to the left and to the right of each position, respectively. Accordingly, and concern the first and the last state: is satisfied iff and is true iff .

As an example, let be the automaton that consists of a single cycle of length so that on each input letter, moves one step forward in the cycle. This is equivalent to having a predicate for each that express that the current position is congruent modulo . Moreover, we have a predicate for each to express that the length of the word is modulo . This is sometimes denoted . If these predicates are available for every , the resulting class is denoted  [5] and will be the subject of Theorem 3.7.

Multiplicative well-partial orders

Ehrenfeucht et al. [11] have shown that a language is regular if and only if it is upward closed with respect to some multiplicative WQO. For the “only if” direction, they provide the syntactic congruence, which, as a finite-index equivalence, is a WQO. Here, we exhibit a natural example of a well-partial order for which a given regular language is upward closed. Suppose is a finite monoid and is a morphism that recognizes the language , i.e. . Let be the functional transduction such that for , , we have , where and . Then we have if and only if can be written as such that and for . In this case, we write for .

Note that is multiplicative and is -upward closed. Thus, the order is a natural example that shows: A language is regular if and only if it is upward closed with respect to some multiplicative well-partial order.

Remark 3.1.

Another source of WQOs on words is [3], where Bucher et al. have studied a class of multiplicative orderings on words arising from rewriting systems. They show that all WQOs considered there can be represented by finite monoids equipped with a multiplicative quasi-order. Given such a monoid and a morphism , they set if and only if , , and such that . However, they leave open for which monoids the order is a WQO.

In the case that above is a morphism into a finite group (whose order is the equality), the order coincides with . However, while the orderings considered by Bucher et al. are always multiplicative, this is not always the case for parameterized WQOs.

Orderings defined by counter automata

We can also use automata with counters to produce parameterized WQOs. A counter automaton is a tuple , where is a finite set of states, is the input alphabet, is a set of counters, is the finite set of edges, is the set of initial states, and is the set of final states. A configuration of is a tuple , where , , . The step relation is defined as follows. We have iff there is an edge such that and . A run (arriving at ) on an input word is a sequence such that for , , , , , and .

We use counter automata not primarily as accepting devices, but rather to define maps and to specify unboundedness properties. We call a counting automaton if it has exactly one run for every word . In this case, it defines a function : We have iff has a run on arriving at .

This gives rise to an ordering: Let be a counting automaton. Then, given , let if and only if . This is a parameterized WQO for the following reason. For each , we can build a functional transduction that operates like , but instead of incrementing , it outputs a . Then, is the conjunction of all the WQOs for .

Let and . We say that a word occurs at position in if with . It is easy to construct a counting automaton with counter set that satisfies iff for each ,

  • if is a prefix of , then , otherwise ,

  • if is a suffix of , then , otherwise ,

  • is the number of positions in where occurs.

Using this counting automaton, we can realize another class of regular languages. Let . A -locally threshold testable language is a finite Boolean combination of sets of the form

  • for some ,

  • for some , or

  • for some and .

The class of -locally threshold testable languages is denoted . Observe that the -PTL are precisely the -locally threshold testable languages. Indeed, each of the basic building blocks of -locally threshold testable languages is -upward closed and hence a -PTL. Conversely, for each , the upward closure of with respect to is clearly in .


Let us illustrate the utility of conjunctions. Let be a finite collection of WQOs on . We call a language an -PTL if it is a finite Boolean combination of sets of the form , where belongs to and . Our framework also applies to -PTLs for the following reason.

Observation 3.2.

Let be the conjunction of the WQOs in . Then a language is an -PTL iff it is a -PTL.

As an example, suppose we have subsets and the functional transductions , , such that is the projection onto , meaning for and for . If consists of the for , then the -PTL are precisely those languages that are Boolean combinations of sets for . Hence, we obtain a subclass of the classical PTL. Of course, there are many other examples. One can, for example, combine WQOs for logical fragments with WQOs defined by counting automata and thus obtain logics that refer to positions as well as counter values, etc.

Computing downward closures

The first problem we will study is that of computing downward closures. As in the case of the subword ordering, we will see that for all parameterized WQOs, every downward closed language is regular. While mere regularity is often easy to see, it is not obvious how, given a language , to compute a finite automaton for . We are insterested in when this can be done algorithmically. If is a WQO on words, we say that -downward closures are computable for a language class if there is an algorithm that, given a language from , computes a finite automaton for . This is especially interesting when is a class of languages of infinite-state systems.

Until now, downward closure computation has focused mainly on the case where is the subword ordering. In that case, there is a charaterization for when downward closures are computable [31]. For a rational transduction and a language , let . When we talk about language classes, we always assume that there is a way of representing their languages such as by automata or grammars. We call a language class a full trio if it is effectively closed under rational transductions, i.e. given a representation of from , we can compute a representation of in . The simultaneous unboundedness problem (SUP) for is the following decision problem.


A language from .


Does hold?

The aforementioned characterization now states that downward closures for the subword ordering are computable for a full trio if and only if the SUP is decidable. The SUP is decidable for many important and very powerful infinite-state systems. It is known to be decidable for Petri net languages [10, 31, 14] and matrix languages [31]. Moreover, it was shown to be decidable for indexed languages [31], which was generalized to higher-order pushdown automata [15] and then further to higher-order recursion schemes [6].

An indication for why computing downward closures for parameterized WQOs might be more difficult than for subwords is that the latter ordering is a rational relation, i.e. is rational. This fact was crucial for the method in [31]. However, one can easily construct parameterized WQOs for which this is not the case.

PTL and separability

We also consider separability problems. We say that two languages and are separated by a language if and . If two languages are separated by a regular language, we can regard this regular language as a finite-state abstraction of the two languages. We therefore want to decide when two given languages can be separated by a language from some class of separators. More precisely, we say that for a language class and a class of separators , separability by is decidable if given language and from , it is decidable whether there is an in that separates and . In the case where is the class (subword) PTL, it is known when separability is decidable: In [10], it was shown that in a full trio, separability by PTL is decidable if and only if the SUP is decidable (the “if” direction had been obtained in [9]).

Main result

We are now ready to state the first main result.

Theorem 3.3.

For every full trio , the following are equivalent:

  1. The SUP is decidable for .

  2. For every parameterized WQO , -downward closures are computable for .

  3. For every parameterized WQO , separability by -PTL is decidable for .

This generalizes the two aforementioned results on downward closures and PTL separability. In addition, Theorem 3.3 applies to all the examples of -PTL described above.

Recall that for each regular language , there is a labeling automaton such that is -upward closed and thus a -PTL. Thus, for languages and , the following are equivalent: (i) There exists a labeling automaton such that and are separable by a -PTL and (ii) and are separable by a regular language. Already for one-counter languages, separability by regular languages is undecidable [8] (for context-free languages, this was shown in [29, 18]). However, Theorem 3.3 tells us that for each fixed , separability by -PTL is decidable. We make a few applications explicit.

Corollary 3.4.

Let be a full trio with decidable SUP. For each , separability by is decidable for .

A direct consequence from Theorem 3.3 is that we can decide whether a regular language is a -PTL. Note that since a language is separable from its complement by some -PTL if and only if is an -PTL itself, Theorem 3.3 implies the following.

Corollary 3.5.

Let be a parameterized WQO. Given a regular language , it is decidable whether is an -PTL.

It was shown by Place et al. [25] that for context-free languages, separability by is decidable for each . Their algorithm uses semilinearity of context-free languages and Presburger arithmetic. Here, we extend this result to all full trios with a decidable SUP.

Corollary 3.6.

Let be a full trio with decidable SUP. For each , separability by is decidable for .

Separability beyond PTLs

Our framework can also be applied to separators that do not arise as PTLs for a particular WQO. This is because we can sometimes apply the developed ideal representations to separator classes that are infinite unions of invidual classes of PTLs. For example, consider the fragment of first-order logic on words with modular predicates. In terms of expressible languages, it is the union over all fragments with . Using a non-trivial algebraic proof, it was shown by Chaubard, Pin, and Straubing [5] that it is decidable whether a regular language is definable in . Here, we show the following generalization using a purely combinatorial proof.

Theorem 3.7.

Given two regular languages, it is decidable whether they are separable by .

Of course, this raises the question of whether separability by reduces to the SUP, as it is the case of separability by for fixed . However, this is not the case, as is shown here as well.

Theorem 3.8.

Separability by is undecidable for second-order pushdown languages.

Since the second-order pushdown languages constitute full trio [24, 1] and have a decidable SUP [31], this means separability by does not reduce to the SUP.

4. Computing closures and deciding separability

In this section, we present the algorithms used in Theorem 3.3. These algorithms work with WQOs on words under the assumption that these enjoy certain effectiveness properties. In section 5, we will then show that all parameterized WQO indeed satisfy these properties. Our algorithms for computing downward closures and deciding separability rely heavily on the concept of ideals, which have recently attracted attention [21, 12, 13]. Observe that, in the case of the separability problem, it is always easy to devise a semi-algorithm for the separability case: We just enumerate separators–verifying them is possible because we have decidable emptiness and intersection with regular sets. The difficult part is to show that inseparability can be witnessed.

These witnesses are always ideals. Let be a WQO. An -ascending chain is a sequence with for every . A subset is called (-)directed if for any , there is a with and . An (-)ideal is a non-empty subset that is -downward closed and -directed. Equivalently, a non-empty subset is an -ideal if is -downward closed and for any two -downward closed sets with , we have or . It is well-known that every downward closed set can be written as a finite union of ideals. For more information on ideals, see [21, 13].

As observed in [13], an ideal can witness inseparability of two languages by belonging to both of their adherences. For a set , its adherence is defined as the set of those ideals of such that there exists a directed set with . Equivalently, if and only if  [21, 13]. In this work, we also use a slightly modified version of adherences in order to describe ideals of conjunctions of WQOs. Let be a family of well-quasi-orderings on a common set . Moreover, let denote the conjunction of . For , is the set of all families of ideals for which there exists a -directed set such that for each .

Unboundedness reductions

We use counter automata (that are not necessarily counting automata) to specify unboundedness properties. Let be a counter automaton with counter set . Let and extend to by setting for all . We define a function by

We say that a counter automaton is unbounded on if for every , there is a with . In other words, iff for every , there is a such that has a run on arriving at some .

The following can be shown using a straightforward reduction to the diagonal problem [10, 9], which in turn is known to reduce to the SUP [31].

Lemma 4.1.

Let be a full trio with decidable SUP. Then, given a counter automaton and a language from , it is decidable whether is unbounded on .

We are now ready to state the effectiveness assumptions on which our algorithms rely. Let be an alphabet and be a WQO. We say that is an effective WQO with an unboundedness reduction (EWUR) if the following are satisfied:

  1. For each , the set is effectively regular.

  2. The set of ideals of is a recursively enumerable set of regular languages.

  3. Given an ideal , one can effectively construct a counter automaton such that for every , is unbounded on if and only if belongs to .

It should be noted that in order to decide separability by -PTL and compute downward closures, it would have sufficed to require decidability of adherence membership in full trios with decidable SUP. The reason why we require the stronger condition (c) is that in order to show that all parameterized WQOs satisfy these conditions, we want the latter to be passed on to conjunctions and to WQOs .

The conditions imply that every upward closed language (hence every downward closed language) is regular: If is upward closed, then we can write , which is regular because each is regular. Moreover, we may conclude that given a regular language it is decidable whether is an ideal: If is an ideal, we find it in an enumeration; if it is not an ideal, we find words that violate directedness or downward closedness.

According to the definition of EWUR, we can construct a counter automaton such that if and only if is unbounded on . Hence, Lemma 4.1 implies the following.

Proposition 4.2.

Let be an EWUR and let be a full trio with decidable SUP. Then, given an ideal and , it is decidable whether .

In section 5, we develop ideal representations for all parameterized WQOs and thus show that they are EWUR.

Let us now sketch how to show Theorem 3.3 assuming that every parameterized WQO is an EWUR. The implication “21” holds because computing downward closures clearly allows deciding the SUP. This was shown in [31]. The implication “31” follows from [10], which presents a reduction of the SUP to separability by PTL. Thus, it remains to prove that downward closures are computable and PTL-separability is decidable for EWUR. We begin with the former. The following was shown in [21].

Lemma 4.3.

Let be a WQO and be ideals such that and for . Then if and only if .

We can now use an algorithm for downward closure computation from [13], which reduces the computation to adherence membership.

Proposition 4.4.

Let be a full trio with decidable SUP and let be an EWUR. Then -downward closures of languages in are computable.

We continue with the decidability of separability by -PTL for EWUR . We employ the following characterization of separability in terms of adherences [13] for reducing the separability problem to adherence membership.

Proposition 4.5.

Let be a WQO. Then, and are separable by a -PTL iff .

We can now use the algorithm from [13] for deciding separability of languages and in our setting. By Proposition 4.5, we can use two semi-decision procedures. On the one hand, we enumerate potential separators and check whether and . On the other hand, we enumerate -ideals and check if belongs to .

Proposition 4.6.

Let be a full trio with decidable SUP and be an EWUR. Then separability by -PTL is decidable for .

5. Ideal representations

In this section, we show that every parameterized WQO is an EWUR. The fact that the subword ordering is an EWUR follows using arguments from [10, 31].

Proposition 5.1.

The subword ordering is an EWUR.

The next step is to show that if is an EWUR and is a functional transduction, then is an EWUR. We begin with some general observations about ideals of WQOs of the shape , where is an arbitrary function and is a WQO. First, we describe ideals of in terms of ideals of .

It is easy to see that every ideal of is of the form form for some ideal of . However, a set is not always an ideal of . For example, suppose has if is even and if is odd. Then is not upward directed although is an ideal.

Lemma 5.2.

is an ideal of if and only if for some ideal of such that .

Note that Lemma 5.2 tells us how to represent ideals of when we have a way of representing ideals of . Hence, if the set of ideals of is recursively enumerable, then so is the set of ideals of . We will also need to transfer membership in adherences from to .

Lemma 5.3.

If is an ideal of with , then if and only if .

Equipped with Lemmas 5.3 and 5.2, it is now straightforward to show that is an EWUR.

Proposition 5.4.

If is an EWUR and is a functional transducer, then is an EWUR.

It remains to be shown that being an EWUR is preserved by taking a conjunction. Our first step is to characterize which sets are ideals of a conjunction. Once the statement is found, the proof is relatively straightforward.

Proposition 5.5.

Let be a finite family of WQOs over and let be the conjunction of . Then is an ideal of iff it can be written as , where each is an ideal of and belongs to .

The next step describes how to reduce the adherence membership problem for conjunctions to the adherence membership problem for the participating orderings. Again, proving the statement is straightforward.

Proposition 5.6.

Let be a finite family of WQOs over and let be the conjunction of . Suppose is an -ideal for each and and that belongs to . Then belongs to iff belongs to .

As expected, a product construction allows us to characterize the adherence membership for conjunction.

Lemma 5.7.

Suppose is an EWUR for . Given ideals and for and , respectively, we can construct a counter automaton such that for every language , is unbounded on iff belongs to .

The following is now a consequence of the previous steps.

Proposition 5.8.

If and are EWUR, then their conjunction is an EWUR as well.

Orderings defined by labeling automata

The preceding results already show that every parameterized WQO is an EWUR. However, since we will study separability by , it will be crucial to have an explicit, i.e. syntactic representation of ideals of a particular type of parameterized WQOs, namely those defined by labeling automata. Here, we develop such a syntax.

Let be a labeling automaton over , , and . The word (more precisely: this particular decomposition) is a loop pattern (for ) if the run of on loops at each , . In other words, is in the same state before and after reading .

Theorem 5.9.

Let be a labeling automaton. The -ideals are precisely the sets of the form , where is a loop pattern for .

By standards arguments about ideals, it is enough to show that those sets are ideals and that every downward closed set is a finite union of such sets.

6. Separability by

In this section, we prove Theorem 3.7 and Theorem 3.8. The latter will be shown in section 6.1 and the former is an immediate consequence of the following.

Proposition 6.1.

Let be finite automata with states. and are separable by if and only if they are separable by , where .

Recall that are the -PTL, where is the labeling automaton defined on section 3. From now on, we write for . Proposition 6.1 follows from:

Proposition 6.2.

Let be a finite automaton for with states and let be a multiple of . If


for every .

The “if” direction of Proposition 6.1 is trivial and the “only if” follows from Proposition 6.2: If and are separable by for some , then this separator is also expressible in . Moreover, together with Proposition 4.5, Proposition 6.2 tells us that separability by implies separability by .

The rest of this section outlines the proof of Proposition 6.1. Note that according to Theorem 5.9, the ideals for are the sets of the form where . The ideal belongs to if for each , there is a word such that and . We call such words witness words.

It is tempting to think that Proposition 6.2 just requires a simple pumping argument: Suppose the ideal belongs to the adherence of some language. Then, we pump the gaps in between embedded letters from the witness word . These gaps, after all, always have length divisible by . For a with sufficiently many divisors, we would be able to pump the gaps up to a length divisible by so that we can embed via . However, in order to show that the -ideal is contained in the -adherence, we also have to make sure that resulting witness words are members of . This makes the proof challenging.

Part I: Small periods

Our proof of Proposition 6.2 consists of three parts. In the first part, we show that if two regular languages share an ideal in their adherences, then there exists one in which all loops (the words ) are in a certain sense, highly periodic. Let denote the power set of and let denote the set of mappings . For each word and , let be defined as follows. For , we set

For each word , let be obtained from rotating by one position to the right. Hence, for and we have , and . Let be the inverse map of , i.e. rotation to the left. For and , let be the smallest that divides such that for all . Thus, can be thought of as a period of . An automaton is cyclic if and . The first step towards ideals with high periodicity is to achieve high periodicity in single-loop ideals in cyclic automata:

Lemma 6.3.

Let be a cyclic automaton with states for each and let be a multiple of . If belongs to for , then there is a such that (i) , (ii)  also belongs to for , and (iii) .

The idea is to find in witness words a factor such that left and right of , we can pump factors of suitable length. By pumping both of these factors up by multiplicities that sum up to a constant, we can essentially move back and forth and obtain a computation in which the occurrences of letters in are spread over all residue classes modulo some small number .

Associated patterns

In order to extend this to general ideals and automata, we need more guarantees on how words embed into witness words.

Let be a loop pattern for and let . We say that the loop pattern is associated to if for every , there is a word such that for every