# Extensions of ω-Regular Languages

We consider extensions of monadic second order logic over ω-words, which are obtained by adding one language that is not ω-regular. We show that if the added language L has a neutral letter, then the resulting logic is necessarily undecidable. A corollary is that the ω-regular languages are the only decidable Boolean-closed full trio over ω-words.

## Authors

• 7 publications
• 5 publications
• 1 publication
• 10 publications

We study Monadic Second-Order Logic (MSO) over finite words, extended wi...
09/10/2017 ∙ by Nathanaël Fijalkow, et al. ∙ 0

• ### An Algebraic Characterisation of First-Order Logic with Neighbour

We give an algebraic characterisation of first-order logic with the neig...
05/19/2021 ∙ by Amaldev Manuel, et al. ∙ 0

• ### Positive first-order logic on words

We study FO+, a fragment of first-order logic on finite words, where mon...
01/06/2021 ∙ by Denis Kuperberg, et al. ∙ 0

• ### Languages ordered by the subword order

We consider a language together with the subword relation, the cover rel...
01/08/2019 ∙ by Dietrich Kuske, et al. ∙ 0

• ### Streaming Transformations of Infinite Ordered-Data Words

In this paper, we define streaming register transducer (SRT), a one-way,...
01/20/2020 ∙ by Xiaokang Qiu, et al. ∙ 0

• ### Temporal Logics with Language Parameters

Computation Tree Logic (CTL) and its extensions CTL* and CTL+ are widely...
10/25/2019 ∙ by Jens Oliver Gutsfeld, et al. ∙ 0

• ### Composing Conversational Negation

Negation in natural language does not follow Boolean logic and is theref...
07/14/2021 ∙ by Razin A. Shaikh, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1. Introduction

A famous theorem of Büchi [12, Theorem 2] says that the monadic second-order theory of is decidable. What can be added to this logic while retaining decidability? This question has seen a lot of interest, and we begin by discussing some of the existing results.

### What predicates can be added?

The first natural idea is to add predicates beyond the order , e.g. a unary predicate for the primes, or a binary addition function. This idea was pursued already by Robinson in [30], in what is possibly the first published paper to mention mso on . This is before Büchi’s theorem about decidability of mso, and even before the decidability results about weak mso of Büchi [11, Corollary 1], Elgot [15, Corollary 5.8] and Trakhtenbrot [35]. After describing mso, which he credits to Tarski’s lectures, Robinson shows that adding the doubling function to mso results in an undecidable logic [30, p.242]. Other examples of unary functions that lead to undecidability were given by Elgot and Rabin [16, Section 1]. One of these examples is that mso becomes undecidable after adding any function such that is infinite for all . This result was strengthened by Siefkes [32, Theorem 5] who showed that it is enough that is infinite for all with certain periodicity properties, and then by Thomas [33, Theorem 1] who showed that it is enough for to be infinite for infinitely many . Another example of undecidability is mso extended with any unary function that is monotone and satisfies for infinitely many , see [33, Theorem 2]. This line of research is summarised in [29] as follows: “for most examples of natural functions or binary relations it turned out that the corresponding monadic theory is undecidable, usually shown via an interpretation of first-order arithmetic”.

The undecidability issues mentioned above are avoided if one considers unary predicates. The first examples of this kind were given by Elgot and Rabin, who showed that mso remains decidable after adding unary predicates for the factorials, or squares, or cubes, etc. see [16, Theorem 4]). Following this result, a lot of attention has been devoted to identifying the unary predicates that keep mso decidable. An equivalent phrasing of this question is: which -words have a decidable mso theory? An interesting example is the Thue-Morse word; its mso theory is decidable, which follows from [25, Theorem 3]. A general classification of -words with a decidable mso theory was given by Semenov in [31, p. 165], this line of research was continued in  [13, 29]. It is worth pointing out that the classification can be hard to apply to some specific cases; an important one being the case of prime numbers. It is unknown if mso extended with a predicate for the prime numbers has a decidable theory; if this were the case then one could use the algorithm to decide if there are infinitely many twin primes111This theory is known to be decidable if one assumes Schinzel’s Hypothesis – a conjecture from number theory which implies that there are infinitely many twin primes [4, Theorem 4]..

It is worth pointing out that in all of the results discussed above, it makes no difference whether one uses mso or weak mso. The undecidability proofs for unary functions in [16, 33, 32] use only weak mso. For the results about unary predicates, it makes no difference if mso or weak mso is used, because for every -word, its mso theory is decidable if and only if its weak mso theory is decidable, which follows from McNaughton’s determinisation theorem [22, p. 524]222The equivalence of mso and wmso need not hold after adding non-unary predicates. For example, wmso with addition can only define languages in the Borel hierarchy, while mso with addition can easily be shown to contain the logic mso+u that will be discussed later in the paper, and mso+u can define languages beyond the Borel hierarchy [19, Theorem 2.1].. In a sense, one could say that the results discussed above are really about extending weak mso. This will no longer be true when adding quantifiers and languages.

### What quantifiers can be added?

Another line of research concerns adding new quantifiers. If the added quantifier has some implicit arithemetic, such as the Härtig quantifier [18], which expresses the existence of two sets of equal size with a given property, then mso immediately becomes undecidable. This follows directly from Robinson’s result about , and it is also discussed in more detail in [20, Theorem 14]. However, there are quantifiers which describe only topological or asymptotic behaviour, and for such quantifiers proving undecidability can be much harder. One example of an asymptotic quantifier is the bounding quantifier from [5], which expresses the property “ is true for finite sets of unbounded size” [5]. The resulting logic, called mso+u, is undecidable [9, Theorem 1.1]. However, it is close to the decidability border; in particular weak mso with the bounding quantifier is decidable [6, Theorems 3 and 5]; and the same is true for its variants and extensions [10, Theorems 11 and 13]. Other extensions of mso with asymptotic quantifiers were proposed by Michalewski, Mio and Skrzypczak in [23, 24]

, including a quantifier related to Baire category and a quantifier related to probability. The Baire quantifier does not add to the expressive power of

mso [24, Theorem 4.1]. On the other hand, the probability quantifier leads to an undecidable logic [23, Theorem 1], because it can express the undecidable problem of checking if a probabilistic Büchi automaton accepts some word with nonzero probability [3, Theorem 7.2]. The theme for quantifiers seems to be that adding a well-behaved quantifier to (non-weak) mso either does not change the expressive power, or leads to an undecidable logic; but in the latter case the undecidability proof can be hard.

### What languages can be added?

We now turn to the final kind of feature that can be added to mso, namely languages. This is the main topic of this paper. A language over a binary alphabet can be viewed as a second-order unary predicate , which inputs a set and returns true if the language contains the word where positions from have label and the remaining positions have label . This can be generalized to alphabets with letters: Then, the predicate inputs sets and returns true if the sets form a partition of and contains the word encoding this partition. Let us write mso+ for the extension of mso which has the predicate described above.

Another equivalent way of describing the logic mso+ uses closure properties of languages. A folklore fact about mso is that existential monadic quantification is the same as taking the image of a language under a letter-to-letter homomorphism, see [28, p. 2] or [34, Section 2.3]. It follows that mso+ is exactly the smallest class of languages of -words which contains and all -regular languages, and which is closed under (a) Boolean combinations; (b) images of letter-to-letter homomorphisms; and (c) inverse images of letter-to-letter homomorphisms. We will return to this language theoretic approach in Section 2.

###### Example 1.1.

Suppose that is a singleton language, i.e. it contains only one word . Then mso+ has the same expressive power as mso extended with unary predicates

 Pa={n∈ω:the n-th letter of w is a}for a∈Σ.

Therefore, in the case of singleton languages mso+, corresponds to the mso extensions with unary predicates that were studied in [16, 33, 31, 13, 29].

###### Example 1.2.

Define to be the -words where blocks of ’s have unbounded size:

 Udef={ak1bak2⋯:limsupkn=∞}.

In [8, Theorem 1.3] it is shown that adding the language to mso gives exactly the logic mso+u. Hence it is unambiguous to write mso+u, with both meanings (adding a quantifier or a language) being equivalent. As mentioned before, this logic is undecidable.

###### Example 1.3.

Consider the ultimately periodic words, i.e.

 P={wvω:w,v∈{a,b}∗ and v is nonempty}.

It is not hard to see that mso+ can express the language from Example 1.2, and therefore this logic is undecidable [8, Theorem 1.4]. In contrast, adding to weak mso yields a decidable logic [10, Theorem 13].

Our goal in this paper is to classify the languages

such that mso+ is undecidable. By the discussion in Example 1.1, this project is at least as difficult as classifying the -words with a decidable mso theory. However, in the spirit of “asymptotic” conditions, we restrict attention to languages which have a neutral letter, which means that there is a letter in the alphabet, denoted by , such that

 w11w21⋯∈L⇔w1w2⋯∈L

holds for every words where infinitely many are nonempty333In the definition of neutral letters, we require that the language is stable under inserting or deleting infinitely many neutral letters. However, this also implies that the language is stable under inserting or deleting finitely many neutral letters.. We now state the main theorem of this paper.

###### Theorem 1.4.

If has a neutral letter and is not definable in mso, then mso+ is undecidable.

In the above theorem, by undecidable we mean that there is no algorithm which decides the sentences of mso+ that are true in . Since mso can quantify over words, this is the same as saying that satisfiability is undecidable for mso+ for -words. The proof of Theorem 1.4 will be given in Section 4.

###### Example 1.5.

Define to be the words such that eliminating all ’s gives a word in the language from Example 1.2. We claim that the logic is obtained by extending mso with (a) the bounding quantifier; or (b) the language ; or (c) the language . The equality of (a) and (b) was discussed in Example 1.2. The language can be defined using the bounding quantifier, hence the inclusion (c) (a). The language is the intersection of with language of words that do not contain the letter , hence the inclusion (b) (c). The equality of these three logics is discussed in more detail in [8].

The language will play an important role in the proof of Theorem 1.4. We will show that if is not definable in mso and contains a neutral letter, then is definable in mso+. Undecidability will then follow by Theorems [9, Theorem 1.1] and [8, Theorem 1.3]. In this sense, is the simplest undecidable extension of mso.

The paper is structured as follows. In Section 2, we discuss a version of our main theorem for finite words, which was proved by Zetzsche et al. in [36]. Like [36], we prove our main theorem using syntactic congruences, and therefore Section 3 is devoted to a discussion of syntactic congruences for -languages. In Section 4, we prove our main result, and in Section 5 we show that the main theorem implies that the -regular languages are the only Boolean-closed full trios that are decidable.

## 2. Finite words

In this section, we describe the starting point for our work, which is a theorem by Zetzsche et al., which says that the regular languages of finite words are the only decidable Boolean-closed full trio. To define full trios444Full trios are sometimes called cones in formal languages literature, they are meant to be a formalisation of robust classes of languages., recall that a homomorphism is a function

 h:Σ∗→Γ∗such that h(wv)=h(w)h(v).

Define the arithmetic hierarchy, see [36, Section 2], to be the least class of languages of finite words that contains all recursively enumerable languages, and which is closed under complementation and homomorphic images.

###### Theorem 2.1.

[36, Corollary 3.2] Let be a class of languages of finite words which is a full trio, i.e. it is closed under:

1. images under homomorphisms; and

2. inverse images under homomorphisms; and

3. intersections with regular languages.

If is additionally Boolean-closed (closed under union and complementation) and it contains at least one non-regular language, then it contains the arithmetic hierarchy.

In the above theorem, there is no assumption on neutral letters. This is because condition 2 deprecates the assumption, since a neutral letter can be added to any language by taking the inverse image under the homomorphism which eliminates the neutral letter. The closure properties used in Theorem 1.4 are weaker, and hence the assumption on neutral letters is needed. As a warm-up for the case of -words, we give below a proof sketch for the above theorem.

###### Proof sketch.

The proof uses rational relations [14, p.236]. Recall that a rational relation is a binary relation on words that is recognised by a nondeterministic automaton where each transition is labelled by a pair (input word, output word), with both words being possibly empty. By Nivat’s theorem (Propositions 1 and 2 in [26]), if a language class is a full trio, then it is closed under images under rational relations, which can be visualised as the following reasoning rule:

 K⊆Σ∗ is in LR⊆Σ∗×Γ∗ is a rational relation{v∈Γ∗:∃w∈L with (w,v)∈R} is in L

Because is closed under complementation, we can also use a variant of the above rule where is used instead of in the conclusion of the rule (i.e. below the line).

The key idea is to use the closure properties to formalise the syntactic right congruence of the language. Let be some non-regular language in , which exists by assumption, and let be its syntactic right congruence, i.e. the equivalence relation defined by

 u∼u′def=∀v∈Σ∗   uv∈L⇔u′v∈L.

By the Myhill-Nerode theorem, has infinite index, i.e. infinitely many equivalence classes. Using the reasoning rule with rational relations, one shows that contains the language

 L1={u#u′:u∼u′},

where is a fresh separator symbol. Consider now two separator symbols and . Define to be the language

 {w1#⋯#wn#v1\definecolor[named]pgfstrokecolorrgb1,0,0\pgfsys@color@rgb@stroke100\pgfsys@color@rgb@fill100#⋯\definecolor[named]pgfstrokecolorrgb1,0,0\pgfsys@color@rgb@stroke100\pgfsys@color@rgb@fill100#vm\definecolor[named]pgfstrokecolorrgb1,0,0\pgfsys@color@rgb@stroke100\pgfsys@color@rgb@fill100#:⎧⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪⎩w1∼v1wn∼vmwi≁wj for i≠jvi≁vj for i≠jwi∼vj⇒wi+1∼vj+1}.

Using the closure properties, one shows . A short analysis of the conditions defining reveals that every word in satisfies

 m=nandw1∼v1,w2∼v2,…,wn∼vn.

Furthermore, since has infinitely many equivalence classes, it follows that can be arbitrarily large. By projecting away the words using a homomorphisms, it follows that contains the language

 L3={#n\definecolor[named]pgfstrokecolorrgb1,0,0\pgfsys@color@rgb@stroke100\pgfsys@color@rgb@fill100#n:n∈{1,2,…}}.

A string encoding of runs of two-counter machines, see [17, Theorem 2], can be used to show that contains every recursively enumerable language. The arithmetic hierarchy follows, by closure of under homomorphic images and complementation. ∎

## 3. Congruences for ω-words

Like in Theorem 2.1, the proof of Theorem 1.4 also uses congruences. However, there are several issues with congruences for -words, which mean that some new ideas are needed. The main problem is that there is no good notion of syntactic congruence for languages of -words.

We begin by discussing several existing approaches to congruences for -words, see also [21]. In all cases, we begin with a language , and use it to define an equivalence relation on finite words. The first candidate is the right congruence, which identifies two finite words if

 ∀v∈Σω uv∈L⇔u′v∈L.

This right congruence does not characterise the -regular languages, although it does have some use, for example in automata learning [1]. There could be finitely many equivalence classes despite a language not being -regular. For example, every prefix independent language will have one equivalence class of right congruence, but there are prefix independent languages which are not -regular, such as

 {w(anb)ω:w∈{a,b}∗ and n is prime}.

By induction on formula size one can show that if has a right congruence of finite index, then the same is true for every language definable in mso+; which shows that right congruences will not be useful for our main result. Similar problems arise for the two-sided version of right congruence.

A more useful congruence for -words uses two-sided environments and -iteration; this leads to the Arnold congruence [2, Section 2], which identifies if

 ∧{∀w∈Σ∗ ∀v∈Σωwuv∈L⇔wu′v∈L∀w,v∈Σ∗w(uv)ω∈L⇔w(u′v)ω∈L.

The Arnold congruence still does not characterise the -regular languages. For example, the language is not -regular, but it has two equivalence classes under Arnold congruence: words which contain , and words which do not contain .

Fortunately, there is a successful characterisation of -regular languages via congruences. This characterisation is stated below, and it corresponds to -semigroups.

###### Theorem 3.1.

[27, Theorem 7.5] A language is -regular if and only if there is an equivalence relation which has finite index and satisfies the following conditions for all sequences of finite words :

 (1) (⋀i∈{1,2}ui∼u′i) ⇒ u1u2∼u′1u′2 (2) (⋀i∈Nui∼u′i) ⇒ (u1u2⋯∈L⇔u′1u′2⋯∈L)

We use the name -congruence for an equivalence relation that satisfies conditions (1) and (2) in the above theorem. We use the above theorem in our main result. Although promising, the characterisation in terms of -congruences has one important drawback, namely non-uniqueness. For the right congruence, the defining property

 ∀v∈Σωuv∈L⇔u′v∈L.

gives a unique equivalence relation, and hence it makes sense to speak of the right congruence. A similar property holds for the Arnold congruence. The uniqueness of the definition of right congruence, and the fact that its definition can be formalised using rational relations, is what drives the proof of Theorem 2.1.

In contrast, there is no uniqueness in Theorem 3.1, and there cannot be. A language might not have a unique coarsest -congruence (such an equivalence relation is called the syntactic -congruence). An example is the language , see [7, Running Example 2]. For -regular languages, the syntactic -congruence exists and coincides with Arnold congruence, see [27, Proposition 8.8], but this is not very helpful in our setting, since we want to study congruences for languages that are not -regular. These are issues that we will need to overcome in the proof of our main result.

We finish this section with a simple observation, which says that condition (1) in Theorem 3.1 is superfluous. This observation will be useful later on, since condition (2) will be easier to formalise.

###### Lemma 3.2.

If there is an equivalence relation of finite index which satisfies (2), then there is an equivalence relation of finite index which satisfies both (1) and  (2).

###### Proof.

Induction on the number of equivalence classes in the equivalence relation, call it . In the base case, when has one equivalence class, condition (1) holds vacuously. Consider the induction step. For this proof, it is easier to work with the following equivalent form of (1):

 u∼u′⇒(uw∼u′w)∧(wu∼wu′).

If satisfies the above implication, then we are already done. Otherwise, choose a violation of the implication, i.e. words which do not satisfy the conclusion of the implication. By symmetry, assume . Define to be the equivalence relation obtained from by merging the equivalence classes of and . We claim that still satisfies condition (2), and therefore the induction assumption can be applied. We visualize (2) as follows:

By definition of and assumption (2) for , we can replace every in the equivalence class of by and every in the equivalence class of by , without affecting membership in . Therefore we can assume without loss of generality that every is either , or , or a word that is -equivalent to neither of these. The same can be done for . By definition of , if then has to be one of or . We can now split each into two words and , likewise for , and then use again the assumption that satisfies (2) to finish the proof. ∎

## 4. Proof of the main theorem

In this section we prove Theorem 1.4. Fix a language that is not -regular, and which contains a neutral letter. We will show that the logic mso+ is undecidable.

To prove undecidability, we will show that mso+ contains the language , and therefore undecidability follows thanks to the results about the logic mso+u. To explain how can be defined, we use a game called the congruence game. This game is played by two players called Spoiler and Duplicator, and it is parametrised by an -word . The congruence game is designed so that player Duplicator wins if and only if , which means that has -labelled intervals of unbounded size. This is achieved as follows. Roughly speaking, the goal of player Duplicator is to show that from the perspective of the language , each finite word is equivalent to some word which can fit infinitely often into -labelled intervals in the word . Since the language is not -regular, Duplicator needs intervals of unbounded size to win.

Define an interval to be a finite connected subset of , i.e. it contains all positions between its first and last position. If are intervals, then we write if the last position of is strictly before the first position of .

###### Definition 4.1 (Congruence Game).

The congruence game for is the following game played by two players, called Spoiler and Duplicator.

1. Spoiler chooses an infinite family of pairwise disjoint intervals.

2. Duplicator chooses intervals

 W1

such that are from and contain only positions with label in the word .

3. Spoiler chooses words

 w1,w2,…∈Σ∗

such that for every .

4. Duplicator chooses words

 v1,v2,…∈Σ∗

such that for every .

5. Spoiler chooses a sequence of natural numbers

 i1
6. Duplicator wins the game if and only if:

 wj1wj2wj3⋯∈L⇔vj1vj2vj3⋯∈L.

The key result about the congruence game is the following lemma. The lemma does not use the assumption that contains a neutral letter; this assumption will be used later when formalising the congruence game in mso+.

###### Lemma 4.2.

Assume that is not -regular. Then

 Duplicator wins the congruence game for u  ⇔  u∈U.
###### Proof.

() Assume . We will show a winning strategy for player Duplicator. Suppose that player Spoiler has chosen a family in round 1. Since , intervals with only -labelled positions have unbounded size, and therefore in round 2, player Duplicator can choose the intervals so that for all . For every choice of words made by player Spoiler in round 3, Duplicator’s response in round 4 is to choose the words so that for all . This guarantees victory for Duplicator, regardless of Spoiler’s move in round 5.

() Assume . We will show a winning strategy for player Spoiler. In round 1, Spoiler picks so that the lengths of the intervals tend to infinity, i.e. no size appears infinitely often. Let and be the intervals that are chosen in round 2 by player Duplicator. By choice of , the lengths of the intervals tend to infinity, while by assumption that , the lengths of the intervals are bounded. In round 3, Spoiler chooses the words so that every word from appears infinitely often. This can be done because the lengths of the intervals tend to infinity. Suppose that Duplicator chooses some words in round 4. Since the intervals have bounded size, the words chosen by Duplicator come from a finite set . This means that for every , there is some such that infinitely often and . Choose some function

 f:Σ∗→F

which realises the dependency , i.e. for every ,

 (3) w=wiandf(w)=vifor infinitely% many i.

Apply Lemma 3.2 with being the kernel of , i.e. the equivalence relation that identifies two words if they have the same image under . Since is not -regular, then by Lemma 3.2 there must be a violation of (2), i.e. there must be words such that

 (4) u1u2⋯∈L⧸⟺f(u1)f(u2)⋯∈L.

By (3), in Round 5, Spoiler can choose the indices so that

 un=winf(un)=f(vin)for all n∈{1,2,…}

and therefore win thanks to (4). ∎

The following corollary, and undecidability of the logic mso+u, complete the proof of Theorem 1.4.

###### Corollary 4.3.

If is not -regular and contains a neutral letter, then mso+u mso+.

###### Proof.

By [8, Theorem 1.3], it is enough to show that the language is definable in mso+. By Lemma 4.2, it is enough to show that mso+ can express that Duplicator has a winning strategy in the congruence game.

A family of disjoint intervals is represented by two sets of positions: the set of leftmost positions in the intervals, and the set of rightmost positions in the intervals. The condition that all intervals are disjoint means that

 ∀x1,x2∈X x1

Using this representation, the choices of intervals in rounds 1 and 2 can be represented by set quantification, with choices of player Duplicator using existential quantifiers and choices of player Spoiler using universal quantifiers. The words chosen in round 3 are represented by colouring the intervals with letters from ; and using the neutral letter for positions not in the intervals . The same goes for round 4. The subsequence in round 5 is represented by a subset of leftmost positions in the intervals . The winning condition in round 6 is checked by using the predicate for . ∎

## 5. Boolean closed full trios

We finish the paper with a corollary of our main theorem, which is an analog of Theorem 2.1 for infinite words: if a Boolean-closed full trio of languages of infinite words contains at least one non-regular language, then it contains the entire arithmetic hierarchy, subject to a certain representation.

As mentioned in the introduction, a language of -words is definable in mso+ if and only if it belongs to the smallest class of languages that contains , contains all -regular languages, is closed under Boolean combinations, as well as images and inverse images under letter-to-letter homomorphisms. If we lift the restriction on homomorphisms being letter-to-letter, then we get a Boolean-closed full trio, as discussed below.

When applying a homomorphism that may erase some letters, an -word can be mapped to a finite word. Therefore, in the presence of such homomorphisms, it makes sense to consider languages of words of length , i.e. words which are either finite or -words. For such words, define a regular language to be a union of two languages: a regular language of finite words, plus a regular language of -words. Define a homomorphism for words of length to be a function

 h:Σ≤ω→Γ≤ω

which is obtained by applying to each letter a function of type .

###### Theorem 5.1.

Let be a class of languages of words of length at most which is closed under:

1. images under homomorphisms; and

2. inverse images under homomorphisms; and

3. intersections with regular languages.

If is additionally Boolean-closed (closed under union and complementation) and it contains at least one non-regular language, then for every in the arithmetic hierarchy,

 {wvω:w∈Σ∗,v∈L}loop % representation of L∈L.
###### Proof.

By closure under inverse images of homomorphisms and under intersection with and for any , if contains some non-regular language, then it contains some non-regular -language with a neutral letter. By Corollary 4.3, contains all languages definable in mso+u. By [9, Lemma 3.2], for every recursively enumerable language , the logic mso+u defines some -language , over an alphabet extended with a neutral letter, such that

 loop representation of L=h(K),

where is the homomorphism that eliminates the neutral letter. Since is closed under homomorphic images, it follows that contains the loop representations of all recursive enumerable languages. For the arithmetic hierarchy, it is enough to observe that the class

 {L⊆Σ∗:L contains the loop % representation of L}

is closed under Boolean combinations and homomorphic images. ∎

In contrast to the finite word setting, we cannot conclude that contains itself: Standard arguments show that if a language has a finite-index right congruence, then every language obtained from using Boolean full trio operations also has a finite-index right congruence. Thus, for example, if we start with , all obtainable languages over finite words are regular.

One could also consider Boolean closed full trios of -languages. Then, homomorphisms would be defined by functions of type and the (inverse) image of a homomorphism on a subset of would contain only those resulting words that are infinite. For this notion of (inverse) image, Theorem 5.1 follows with essentially the same proof.

## References

• [1] Dana Angluin and Dana Fisman, Regular -languages with an informative right congruence, GandALF 2018, Saarbrücken, Germany, 2018, 2018, pp. 265–279.
• [2] André Arnold, A syntactic congruence for rational -languages, Theoret. Comput. Sci. 39 (1985), no. 2-3, 333–335.
• [3] Christel Baier, Marcus Grösser, and Nathalie Bertrand, Probabilistic –automata, J. ACM 59 (2012), no. 1, 1:1–1:52.
• [4] P. T. Bateman, C. G. Jockusch, and A. R. Woods, Decidability and undecidability of theories with a predicate for the primes, Journal of Symbolic Logic 58 (1993), no. 2, 672–687.
• [5] Mikołaj Bojańczyk, A bounding quantifier, Computer Science Logic, CSL 2004, Karpacz (Jerzy Marcinkowski and Andrzej Tarlecki, eds.), Lecture Notes in Computer Science, vol. 3210, Springer, 2004, pp. 41–55.
• [6] by same author, Weak MSO with the unbounding quantifier, Theory Comput. Syst. 48 (2011), no. 3, 554–576.
• [7] by same author, Recognisable languages over monads, CoRR abs/1502.04898 (2015).
• [8] Mikołaj Bojańczyk, Laure Daviaud, Bruno Guillon, Vincent Penelle, and A. V. Sreejith, Undecidability of MSO+”ultimately periodic”, Logical Methods in Computer Science abs/1807.08506 ((to appear)).
• [9] Mikołaj Bojańczyk, Pawel Parys, and Szymon Toruńczyk, The MSO+U theory of is undecidable, 33rd STACS Orléans, France (Nicolas Ollinger and Heribert Vollmer, eds.), LIPIcs, vol. 47, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2016, pp. 21:1–21:8.
• [10] Mikołaj Bojańczyk and Szymon Toruńczyk, Deterministic automata and extensions of Weak MSO, FSTTCS 2009, IIT Kanpur, India, LIPIcs, vol. 4, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2009, pp. 73–84.
• [11] J. Richard Büchi, Weak second-order arithmetic and finite automata, Z. Math. Logik und Grundl. Math. 6 (1960), 66–92.
• [12] by same author, On a decision method in restricted second order arithmetic, Logic, Methodology and Philosophy of Science (Proc. 1960 Internat. Congr .), Stanford Univ. Press, Stanford, Calif., 1962, pp. 1–11.
• [13] Olivier Carton and Wolfgang Thomas, The monadic theory of morphic infinite words and generalizations, Information and Computation 176 (2002), no. 1, 51–65.
• [14] Samuel Eilenberg, Automata, languages, and machines. Vol. A, Academic Press [A subsidiary of Harcourt Brace Jovanovich, Publishers], New York, 1974.
• [15] Calvin C. Elgot, Decision problems of finite automata design and related arithmetics, Trans. Amer. Math. Soc. 98 (1961), 21–51.
• [16] Calvin C. Elgot and Michael O. Rabin, Decidability and undecidability of second (first) order theory of (generalized) successor, J. of Symbolic Logic 31 (1966), 169–181.
• [17] Juris Hartmanis and John E. Hopcroft, What makes some language theory problems undecidable, J. Comput. Syst. Sci. 4 (1970), no. 4, 368–376.
• [18] Heinrich Herre, Michał Krynicki, Alexandr Pinus, and Jouko Väänänen, The härtig quantifier: a survey, The Journal of symbolic logic 56 (1991), no. 4, 1153–1183.
• [19] Szczepan Hummel and Michał Skrzypczak, The topological complexity of MSO+U and related automata models, Fundamenta Informaticae 119 (2012), no. 1, 87–111.
• [20] Felix Klaedtke and Harald Rueß, Monadic second-order logics with cardinalities, 30th ICALP 2003, Eindhoven, The Netherlands, 2003, pp. 681–696.
• [21] Oded Maler and Ludwig Staiger, On syntactic congruences for -languages, Theoret. Comput. Sci. 183 (1997), no. 1, 93–112.
• [22] Robert McNaughton, Testing and generating infinite sequences by a finite automaton, Information and Control 9 (1966), 521–530.
• [23] Henryk Michalewski and Matteo Mio, Measure quantifier in monadic second order logic, International Symposium on Logical Foundations of Computer Science, Springer, 2016, pp. 267–282.
• [24] Matteo Mio, Michał Skrzypczak, and Henryk Michalewski, Monadic second order logic with measure and category quantifiers, Logical Methods in Computer Science 14 (2018), no. 2.
• [25] Andrei Muchnik, Alexei Semenov, and Maxim Ushakov, Almost periodic sequences, Theoretical Computer Science 304 (2003), no. 1-3, 1–33.
• [26] Maurice Nivat, Transductions des langages de chomsky, Annales de l’Institut Fourier 18 (1968), no. 1, 339–455 (fr). MR 38 #6909
• [27] Dominique Perrin and Jean-Eric Pin, Infinite words - automata, semigroups, logic and games, Pure and applied mathematics series, vol. 141, Elsevier Morgan Kaufmann, 2004.
• [28] Michael O. Rabin, Decidability of second-order theories and automata on infinite trees., Trans. Amer. Math. Soc. 141 (1969), 1–35.
• [29] Alexander Rabinovich and Wolfgang Thomas, Decidable theories of the ordering of natural numbers with unary predicates, Computer Science Logic (Berlin, Heidelberg) (Zoltán Ésik, ed.), Springer Berlin Heidelberg, 2006, pp. 562–574.
• [30] Raphael M. Robinson, Restricted set-theoretical definitions in arithmetic, Proceedings of the American Mathematical Society 9 (1958), no. 2, 238–238.
• [31] Alexei L. Semenov, Decidability of monadic theories, Mathematical foundations of computer science, 1984 (Prague, 1984), Springer, Berlin, 1984, pp. 162–175.
• [32] Dirk Siefkes, Undecidable extensions of monadic second order successor arithmetic, Mathematical Logic Quarterly 17 (1971), no. 1, 385–394.
• [33] Wolfgang Thomas, A note on undecidable extensions of monadic second order successor arithmetic, Archive for Mathematical Logic 17 (1975), no. 1, 43–44.
• [34] by same author, Languages, automata, and logic, Handbook of Formal Languages, Volume 3: Beyond Words. (Grzegorz Rozenberg and Arto Salomaa, eds.), Springer, 1997, pp. 389–455.
• [35] Boris A. Trakhtenbrot, Finite automata and the logic of single-place predicates, Dokl. Akad. Nauk SSSR 140 (1961), no. 2, 326–329.
• [36] Georg Zetzsche, Dietrich Kuske, and Markus Lohrey, On Boolean closed full trios and rational Kripke frames

, Theory of Computing Systems

60 (2017), no. 3, 438–472.