Ph.D. Thesis by

103
Logic and tree automata Ph.D. Thesis by SzabolcsIv´an Supervisor Zolt´ an ´ Esik Doctoral School in Mathematics and Computer Science Department of Foundations of Computer Science University of Szeged, Szeged, Hungary 2008.

Transcript of Ph.D. Thesis by

Logic and tree automata

Ph.D. Thesis

by

Szabolcs Ivan

Supervisor

Zoltan Esik

Doctoral School in Mathematics and Computer Science

Department of Foundations of Computer Science

University of Szeged, Szeged, Hungary

2008.

Contents

Introduction 1

1 Preliminaries 4

1.1 Brief summary of earlier results . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Sets, words, trees and languages . . . . . . . . . . . . . . . . . . . . . . . . 7

1.3 Σ-tree automata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

1.4 Logics on trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2 Future temporal logics and the definability problem 19

2.1 The logics FTL(L) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.2 Products of tree automata . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.2.1 The Moore product and Moore pseudovarieties . . . . . . . . . . . . 23

2.2.2 Definite tree automata . . . . . . . . . . . . . . . . . . . . . . . . . 28

2.2.3 Relating the three products . . . . . . . . . . . . . . . . . . . . . . 31

2.3 Definability and membership . . . . . . . . . . . . . . . . . . . . . . . . . . 36

2.4 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.4.1 Fragments of CTL . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

2.4.2 Some Moore properties of tree automata . . . . . . . . . . . . . . . 41

2.4.3 Characterizing 〈E+EF〉M . . . . . . . . . . . . . . . . . . . . . . . . . 47

2.4.4 Characterizing 〈E∗EF〉M . . . . . . . . . . . . . . . . . . . . . . . . . 53

2.4.5 Adding D0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

i

2.5 Ehrenfeucht-Fraısse type games . . . . . . . . . . . . . . . . . . . . . . . . 61

3 Aperiodicity 64

3.1 The notion of n-aperiodicity . . . . . . . . . . . . . . . . . . . . . . . . . . 64

3.2 The generalized cascade product . . . . . . . . . . . . . . . . . . . . . . . . 68

3.3 Strict containments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

3.4 Decidability and complexity . . . . . . . . . . . . . . . . . . . . . . . . . . 73

3.5 Aperiodicity and logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

3.6 A generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

3.7 Aperiodicity for polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Summary 83

Osszefoglalas 87

References 91

Index 95

ii

Acknowledgments

I thank Zoltan Esik for the guidance and for his valuable time over the years; I can onlyhope that our joint work will be continued.

I am also thankful to Magnus Steinby for his hospitality during my ten-day visit to theUniversity of Turku.

Introduction

This thesis is concerned with the definability problem of several classes of logics on finitetrees, viewed mostly from the algebraic point of view.

The first chapter contains all the notations and preliminary facts we will use throughoutthe thesis, as well as a brief summary of the previous results from the involved field.

In the second chapter we recall the operator FTL introduced in [15], see also [14], Part I,which associates to each class L of tree languages a logic FTL(L); this logic is a branchingtime future temporal logic. This is done in Section 2.1. The definability problem of such alogic FTL(L) is the following: given a (regular) tree language, is it definable in FTL(L)?This problem is attacked by two different methods, neither of them yielding an immediatedecidability result, but some kind of alternative characterization from a different point ofview.

In Sections 2.2 and 2.3 an algebraic treatment is introduced. Here we define the Mooreproduct of tree automata, which is a restricted form of the cascade product [43] and whichturns out to be very suitable for our needs. In Section 2.2 the key concepts (such as theaforementioned Moore product, Moore pseudovarieties as well as the connected variantsof these notions) and also definite tree automata are formalized. Afterwards, in Section2.3 a characterization theorem (Theorem 2.3.3) is proved: we show that when L is a classof regular tree languages having the additional technical property that “all quotients ofany L ∈ L are definable in FTL(L)”, then a tree language L is definable in FTL(L) if andonly if it is regular and its minimal automaton AL is contained in the least class of finitetree automata that contains all the minimal automata of the members of L and a specificdefinite tree automaton D0, and is closed under renamings, and taking homomorphicimages, subautomata and Moore products. Such classes are called Moore pseudovarietiesof finite tree automata. These two sections contain results that are published in [18].

The characterization theorem does not immediately provide decidability results. Sec-tion 2.4 gives an application of the above characterization: we show that two fragmentsCTL(EF+) and CTL(EF∗) of the well-known and heavily researched temporal logic CTL[2, 45] both have a polynomial-time decidable definability problem, at least for finite trees.

INTRODUCTION 2

This is achieved by identifying all the algebraic properties (that we call Moore properties)that a finite connected tree automaton AL exactly has to possess in order to be containedin the Moore pseudovariety generated by the two automata E+

EF and D0 (in the case ofCTL(EF+)) or by the two automata E∗EF and D0 (in the case of CTL(EF∗)). Here E+

EF

and E∗EF respectively denote the minimal automata of the regular tree languages LEF+

and LEF∗ , that correspond to the strict, resp. non-strict variants of the temporal modalityEF (“existence in the future”). By showing that these Moore pseudovarieties have a de-cidable membership problem we get as a byproduct that the above logics have a decidabledefinability problem. This section contains results that are published in [19].

The last section of Chapter 2, Section 2.5 provides another characterization of the logicsFTL(L). This characterization is based on a game-theoretic approach: for any class L oftree languages and integer n ≥ 0 we introduce an Ehrenfeucht-Fraısse type game, calledthe n-round L-game which is played on two trees, s and t, between two players, Spoilerand Duplicator. We say that Spoiler wins the n-round L-game on a language L, if hewins the n-round L-game on any pair (s, t) of trees with s ∈ L and t /∈ L. The mainresult of this section is that when L is a finite class of tree languages, then Spoiler winsthe n-round L-game on a language L for some n ≥ 0 if and only if L is definable in thelogic FTL(L). This section contains results that are not yet published.

Section 3 is devoted to different notions of aperiodicity in finite tree automata. For finitesemigroups, aperiodicity is a well understood concept: a finite semigroup S is aperiodicif there exists an n ≥ 1 such that sn = sn+1 holds for each element s ∈ S. This form ofaperiodicity can be straightforwardly extended to languages of nonempty words: a regularword language L is aperiodic if and only if its syntactic semigroup is aperiodic, i.e. whenthere exists an n ≥ 1 such that uvnw ∈ L ⇔ uvn+1w ∈ L for any triple (u, v, w) of words.Aperiodicity nicely correlates with both first-order definability and LTL-definability inthis classical case, see [30, 32, 46]. However, when one tries to extend this notion totrees, by defining a tree language to be aperiodic if and only if its syntactic semigroup[54] is aperiodic (this is further referred as “context aperiodicity”), the correlation fades:the class of all aperiodic regular tree languages properly contains the class of first-orderdefinable tree languages.

Thus, in this chapter we define more restrictive variants of aperiodicity: the notion ofn-aperiodicity, for each n ≥ 1, and that of strong aperiodicity, which is the limit of then-aperiodicity notions: a tree automaton is defined to be strongly aperiodic if it is n-aperiodic for every n ≥ 1. These notions form a hierarchy: the outermost class definedby this hierarchy is the class of context aperiodic finite tree automata, which contains theclass of 1-aperiodic finite tree automata; for each n ≥ 1, the class of n-aperiodic finite treeautomata contains the class of (n + 1)-aperiodic finite tree automata, and the smallestaperiodicity class is that of strongly aperiodic finite tree automata which contains all thefinite definite tree automata.

INTRODUCTION 3

It turns out that in the classical word case (which corresponds to the rank type {0, 1}or {1}, i.e. when the signature consists of unary symbols and optionally constants), thishierarchy collapses to two levels: in that setting, the two outermost classes (that of contextaperiodic and 1-aperiodic finite automata) coincide, and this class strictly contains theclass of 2-aperiodic finite automata, which coincides with all the inner classes down tothe class of finite definite automata. Interestingly, for any non-classical rank type (thatcontains at least one integer greater than one) we prove that the hierarchy does notcollapse: the class of context aperiodic finite tree automata is strictly greater than theclass of 1-aperiodic finite tree automata; for any n, the class of n-aperiodic finite treeautomata strictly contains the class of all (n + 1)-aperiodic finite tree automata, andthere also exist strongly aperiodic finite tree automata that are not definite. These claimsare proved in Section 3.3.

We also examine the complexity of the membership problem of these classes, which arein fact generalized cascade pseudovarieties of finite tree automata (as shown in Section3.2), i.e. they are closed under renamings, taking subautomata, homomorphic images anda generalized version of the cascade product, with the exception of the class of contextaperiodic finite tree automata, that forms a cascade pseudovariety. From the fact thatdeciding aperiodicity is a PSPACE-complete problem already in the word case [4, 7], weconclude that deciding n-aperiodicity is PSPACE-hard for any n. We also show thatthe problem is solvable in exponential time for each n. On the other hand, we give apolynomial time algorithm for deciding strong aperiodicity. This is done in Section 3.4.

In Section 3.5 we relate the above notions of aperiodicity to logic. It turns out thatthe class of 1-aperiodic tree languages (a regular tree language is called n-aperiodic if itsminimal tree automaton is 1-aperiodic) lies strictly between the class of CTL-definabletree languages and the class of context aperiodic tree languages, whereas the class of first-order definable tree languages is incomparable with the class of 1-aperiodic tree languages.Section 3.6 is devoted to a generalization of the aperiodicity notions, motivated by thecelebrated Krohn-Rhodes decomposition theory. Finally, in Section 3.7 we slightly mod-ify the definition of our aperiodicity notions, by involving polynomial functions instead ofterm functions in the conditions. It turns out that, based on polynomial functions, theaperiodicity hierarchy collapses at level 2. As a last conclusion we show that the polyno-mial variant of 1-aperiodicity is incomparable with the original version of n-aperiodicityfor any n > 1. The results of Chapter 3 were published in [17].

Chapter 1

Preliminaries

1.1 Brief summary of earlier results

This section briefly summarizes the known results about connections between logical de-finability and algebra related to the thesis.

The characterization of the expressive power of various logics on words, trees and otherstructures (the classical logics, e.g. first- or second-order logic as well as several kinds oftemporal logics) has received a lot of attention. The classical case, when one deals with(finite or infinite) words, is mostly well understood.

For instance, considering monadic second-order logic (MSO) on words, equipped eitherwith the successor relation or a total ordering on the positions of the word, exactly theregular languages are definable, see [6, 10], or [49].

Regarding the less expressive logic FO(<), i.e., first-order logic equipped with the totalordering of the positions, a classical result of McNaughton and Papert [32] in conjunctionwith a result of Schutzenberger [46] states that a language of finite words is first-orderdefinable if and only if its syntactic monoid is a finite aperiodic monoid, or equivalently,its minimal automaton is a finite counter-free automaton. Furthermore, this class of lan-guages also coincides with the class of languages that are definable in the linear temporallogic LTL [30].

A similar aperiodicity condition characterizes the expressive power of first-order logic andLTL on infinite words, cf. [35, 36]. It follows from these results that it is decidablewhether a regular language of finite or infinite words is first-order definable. From theKrohn-Rhodes theorem [9], it is known that a finite monoid is aperiodic if and only if itbelongs to the least pseudovariety of finite monoids containing a certain 3-element monoid

1.1. BRIEF SUMMARY OF EARLIER RESULTS 5

U2 which is closed under the wreath product, or equivalently, to the least pseudovarietycontaining a certain 2-element monoid U1 which is closed under the block product [49].

The logic FO(+1), first-order logic equipped with the successor relation (but withoutthe ordering) on the positions corresponds exactly to the class LTT of locally thresholdtestable languages [30]; this is again a decidable property, see [38, 51, 53].

When formulated on the domain of (say, finite, ranked and ordered) trees, most of theabove questions are still open. It still holds that in MSO, exactly the regular tree languagesare definable [42, 50] (when the logic is equipped with the successor relations). Also, thelogic FO(+1) still corresponds to the class of locally threshold testable languages, see [31];but just as in the word case, this characterization is by no means effective. The questionhas been further studied in [3] where a decidable characterization has been found.

The decidability status of the definability problem of first-order logic on finite trees,equipped with the descendant relation, or with the descendant relation and all the suc-cessor relations, denoted FO(<) and FO(<,Si), respectively, has been a long standingopen problem, cf. [29, 40, 41, 54].

Aperiodicity can be generalized to trees in several different ways. One of them wasstudied in [29, 54] and shown to be a necessary but not a sufficient condition of first-order definability. In [17] we have defined an infinite hierarchy of aperiodicity notions andstudied their relations to logical definability.

In [20], it was shown that a language of (ranked and ordered) finite trees is first-orderdefinable if and only if its “syntactic preclone” belongs to the least pseudovariety of finitarypreclones closed under the “block product” of preclones which is generated by the preclonecanonically associated to a simple two-element algebra. Thus decidability of first-orderdefinability reduces to the decidability of membership in that specific pseudovariety offinitary preclones. However the question whether membership in that pseudovariety offinitary preclones is decidable is left open in [20].

A problem related to first-order definability is the characterization of the expressive powerof CTL and CTL∗ [2, 11, 45]: What tree languages can be defined in CTL, or in CTL∗?These logics are both generalizations of LTL over words (although a third generalization,also called LTL is incomparable with CTL). It is shown in [27] that for certain types oftrees first-order definability is equivalent to definability in CTL∗. In [14, 15], a CTL-likelogic FTL(L) was associated to each class L of (regular) languages of finite (ranked andordered) trees. As a main result, it was shown that when any quotient of each languagein L is definable in FTL(L), and when the “next modalities are expressible”, then a treelanguage is definable in FTL(L) if and only if its minimal tree automaton belongs tothe least pseudovariety of finite tree automata containing the minimal automata of thelanguages in L and the finite definite tree automata [12, 28], which is closed under thecascade product. (Any such tree language is clearly regular, or recognizable, cf. [25].)

1.1. BRIEF SUMMARY OF EARLIER RESULTS 6

Cascade products of finite tree automata were studied e.g. in [12, 16, 21, 24, 43]. Thisnotion is closely related to the wreath product of clones defined in [55].

In [18] we removed from the above mentioned result the assumption that the next modali-ties are expressible. This was achieved by the introduction of a special case of the cascadeproduct of tree automata that we called the Moore product. We have shown that underthe assumption that any quotient of each language in L (where L is a class of regulartree languages) is definable in FTL(L), a tree language is definable in FTL(L) if and onlyif its minimal tree automaton belongs to the least pseudovariety of finite tree automatacontaining the finite 1-definite tree automata and the minimal tree automata of the lan-guages in L which is closed under the Moore product. An alternative formulation of thisresult is as follows. Let K denote a class of finite tree automata, and let FTL(K) denotethe logic FTL(L), where L is the class of (regular) tree languages recognizable by the treeautomata in K. Then a tree language is definable in FTL(K) if and only if its minimaltree automaton belongs to the least pseudovariety of finite tree automata containing Kand the finite 1-definite tree automata, which is closed under the Moore product.

In [19], an application of the above theorem has been elaborated; we provided polynomialtime decidable characterizations of several small Moore pseudovarieties of finite connectedtree automata. As a byproduct of these results, we derived decidability of the CTLfragments CTL(EF+) and CTL(EF∗) equipped respectively only with the strict and non-strict version of the EF-modality of CTL. The decidability of the expressive power ofCTL(EF+) was already established by Bojanczyk and Walukiewicz in [5] using differentmethods; the decidability of the expressive power of the latter fragment was left openthere.

Using a different approach, Z. Wu [58] also proved that CTL(EF∗) has a decidable defin-ability problem. His approach is based on an Ehrenfeucht-Fraısse type game. A celebratedresult (see e.g. [31]) states that first-order logic over relational structures over an arbitraryfinite relational signature can be reformulated in terms of a game between two players,Spoiler and Duplicator. It has been shown that a property P of structures is definablein first-order logic if and only if there exists a number n of rounds such that when Ais a structure having property P and B is a structure not having P , then Spoiler has awinning strategy in the so-called n-round Ehrenfeucht-Fraısse game on the pair (A,B) ofstructures. One (yet unpublished) contribution of this thesis is that we define for eachclass L of tree languages and number n of rounds a two-player game, called the n-roundL-game with the following property: two trees, s and t satisfy the same set of FTL(L)-formulas of depth at most n (denoted s ≡n

L t) if and only if Duplicator has a winningstrategy in the n-round L-game, played on the pair (s, t) of trees. Standard argumentsin finite model theory (see e.g. [31]) show that when L is a finite class of tree languages,then ≡n

L is an equivalence relation of finite index for each n. Thus, for any finite classL of tree languages it holds that a tree language L is definable in FTL(L) if and only if

1.2. SETS, WORDS, TREES AND LANGUAGES 7

there exists some number n of rounds such that whenever s is a tree contained in L andt is a tree not in L, then Spoiler has a winning strategy in the n-round L-game, playedon the pair (s, t).

1.2 Sets, words, trees and languages

When n ≥ 0 is an integer, [n] denotes the set {1, . . . , n}. Thus, [0] is another notation forthe empty set ∅. N denotes the set of all nonnegative integers.

When S is a set, S∗ denotes the set {s1 . . . sn : n ∈ N, s1, . . . , sn ∈ S} of (finite) wordsover S. This set contains the empty word that consists of zero symbols and is denoted ε.The concatenation (or simply product) u · v of the words u = s1 . . . sk and v = s′1 . . . s′n isthe word s1 . . . sks

′1 . . . s′n. The symbol · is often omitted. It is clear that (S∗, ·) is the free

monoid generated by S, with the unit element ε. The prefix relation ¹S∗ over words isdefined as u ¹S∗ v if v = uu′ for some word u′ ∈ S∗. u ≺S∗ v holds if u ¹S∗ v and u 6= v,i.e. u is a proper prefix of v. We will usually omit the subscript S∗.

A rank type R is a finite nonempty subset of N. Elements of R are called arities. Asignature Σ of rank type R is a union

⋃n∈R

Σn of finite, pairwise disjoint, nonempty sets of

symbols. We fix once and for all a countably infinite set X = {x1, x2, . . . } of variables,that is assumed to be disjoint from any signature. The subset {x1, . . . , xn} of X is denotedXn.

Given a signature Σ of rank type R, and an integer n ≥ 0, the set TΣ(Xn) of ΣXn-trees(or ΣXn-terms) is the least set satisfying the following conditions:

1. any variable x ∈ Xn is a ΣXn-tree;

2. any symbol σ ∈ Σ0 is a ΣXn-tree;

3. if 0 < k ∈ R is an arity, σ ∈ Σk is a symbol and t1, . . . , tk are ΣXn-trees, thenσ(t1, . . . , tk) is a ΣXn-tree.

It is clear that TΣ(Xn) is nonempty if and only if n > 0 or 0 ∈ R holds, and it isinfinite if and only if it is nonempty and R contains at least one positive integer. A treet ∈ TΣ(Xn)−Xn which is not a variable is called proper.

Symbols σ ∈ Σ0 are called constant symbols. When σ is a constant symbol, we can viewthe ΣXn-tree σ also as the tree σ() (i.e. of the form t = σ(t1, . . . , tk) with k = 0 andσ ∈ Σ0).

1.2. SETS, WORDS, TREES AND LANGUAGES 8

TΣ is written for TΣ(X0), the set of variable-free trees over Σ. These trees are also calledΣ-trees. The set of Σ-contexts is the subset CTΣ of TΣ(X1) which contains the trees inwhich x1 occurs exactly once. Contexts will usually be denoted by ζ, ξ etc, whereas treesin general by s, t etc. We write TΣ(X) for

⋃n≥0

TΣ(Xn), the set of all ΣX-trees.

The height hg(t) of a tree t ∈ TΣ(X) is defined as usual:

1. when t ∈ X ∪ Σ0, then hg(t) = 0;

2. when t = σ(t1, . . . , tn) with σ ∈ Σn for some n > 0, then hg(t) is defined as1 + max{hg(ti) : i ∈ [n]}.

When t ∈ TΣ(Xn) is a Σ-tree and t = (t1, . . . , tn) is an n-tuple of ΣXm-trees, then thetree t(t) ∈ TΣ(Xm) is defined inductively as follows:

1. if t = xi for some i ∈ [n], then t(t) = ti;

2. if t = σ(t′1, . . . , t′k) for some σ ∈ Σk, k ≥ 0, and trees t′1, . . . , t

′k ∈ TΣ(Xn), then

t(t) = σ(t′1(t), . . . , t′k(t)).

If t ∈ TΣ(X1), thus t = (t1) is a one-tuple, we may omit the parentheses and write tt1for t(t1). This will be done mostly when t = ζ ∈ CTΣ is a Σ-context and t1 is either avariable-free tree or a context, i.e. t1 ∈ TΣ ∪ CTΣ.

Sometimes it will be convenient to think about a Σ-tree as a mapping from a tree domainto Σ∪X. In this setting, the domain dom(t) of a tree t is a finite subset of [max R]∗ andis defined as follows:

1. when t ∈ X ∪ Σ0, dom(t) = {ε};2. when t = σ(t1, . . . , tn) for some arity n > 0, symbol σ ∈ Σn and trees ti, i ∈ [n],

then dom(t) = {ε} ∪ {i · v : i ∈ [n], v ∈ dom(ti)}.

When t ∈ TΣ(X) is a tree and v ∈ dom(t) is a node (or vertex ) of t, t(v) denotes the labelof v in t, that is,

1. t(ε) = t for any t ∈ X ∪ Σ0;

2. t(ε) = σ, when t = σ(t1, . . . , tn) for some σ ∈ Σn, t1 . . . , tn ∈ TΣ(X);

3. t(i · v) = ti(v), when t = σ(t1, . . . , tn) for some σ ∈ Σn, t1, . . . , tn ∈ TΣ(X).

1.2. SETS, WORDS, TREES AND LANGUAGES 9

Root(t) is a shorthand for t(ε).

Another notion regarding trees is that of the subtree t|v of a tree t rooted at v ∈ dom(t).The domain of this tree is dom(t|v) = {w : v · w ∈ dom(t)}, and the labeling is given byt|v(w) = t(v · w) for each w ∈ dom(t|v). It is clear that these notions are well-defined. Asubtree t|v of t is called a proper subtree of t if v 6= ε and is called an immediate subtreeof t if v ∈ [max R]. (Note that a proper subtree of a tree is not always a proper tree.)

The above notions are extended to tuples of trees as follows. When t = (t1, . . . , tn) is ann-tuple of trees, let dom(t) denote the set {i · v : i ∈ [n], v ∈ dom(ti)}. Furthermore, forany node i · v ∈ dom(t) of t above, let t(i · v) = ti(v) and t|i·v = ti|v. These notions arealso well-defined.

We consider a (Σ-)tree language any set of variable-free Σ-trees, i.e. any L ⊆ TΣ. Whenζ ∈ CTΣ is a Σ-context and L ⊆ TΣ is a tree language, the quotient of L with respect toζ is the language ζ−1(L) = {t : ζt ∈ L}.Suppose Σ and ∆ are signatures having the same rank type R. A tree t ∈ T∆ is a relabelingof a tree s ∈ TΣ if dom(t) = dom(s), and for any vertex v ∈ dom(t) and variable x ∈ X,t(v) = x if and only if s(v) = x, i.e. we get the tree s from t by relabeling each nodewhich are labeled by some symbol from Σ, but preserving the variables.

When Σ and ∆ are signatures having the same rank type R and h : Σ → ∆ is a rank-preserving map (i.e. for any n ∈ R and σ ∈ Σn, the symbol h(σ) is contained in ∆n), thenh induces a literal tree homomorphism from TΣ(X) to T∆(X), also denoted h as follows:for any tree s ∈ TΣ(X) let dom(h(s)) = dom(s) and for any vertex v ∈ dom(s) define

(h(s))(v) =

{s(v) if s(v) ∈ X;h(s(v)) if s(v) ∈ Σ.

Given a signature Σ of rank type R and an arbitrary set A, which is disjoint from bothΣ and X, we also define the set TΣ,A(Xn) of ΣAXn-polynomial symbols for each n as theleast set satisfying the following conditions:

1. any x ∈ Xn is a ΣAXn-polynomial symbol;

2. any a ∈ A is a ΣAXn-polynomial symbol;

3. when σ ∈ Σk is a symbol and p1, . . . , pk are ΣAXn-polynomial symbols, thenσ(p1, . . . , pk) is also a ΣAXn-polynomial symbol.

The ΣAXn-polynomial symbols are also called n-ary ΣA-polynomial symbols. The setCTΣ,A of ΣA-polynomial contexts is the subset of TΣ,A(X1) consisting of the polynomialsymbols in which x1 occurs exactly once. The set TΣ,A(X) of ΣAX-polynomial symbols

1.3. Σ-TREE AUTOMATA 10

is the union⋃

n≥0

TΣ,A(Xn). A polynomial symbol which is not a variable is called proper.

Elements of the set TΣ,A = TΣ,A(X0) (that is, the variable-free polynomial symbols) arecalled ΣA-polynomial symbols.

We will also use occasionally the notation Root(p) to denote the root symbol of thepolynomial symbol p ∈ TΣ,A(X), that is,

Root(p) =

{p if p ∈ X ∪ A;σ if p = σ(p1, . . . , pk) for some σ ∈ Σk, pi ∈ TΣ,A(X).

The domain dom(p) of a polynomial symbol p and relabelings of polynomial symbols aredefined analogously to the respective notions for trees. When Σ and ∆ are signatures, h1 :Σ → ∆ is a rank-preserving map, A and B are sets disjoint from Σ and ∆, respectively, andh2 : A → B is a function, then the pair (h1, h2) induces a relabeling TΣ,A(X) → T∆,B(X)that replaces the label of each node v of a polynomial symbol p ∈ TΣ,A(X) by h1(v) ifp(v) ∈ Σ and by h2(v) if p(v) ∈ A. When p(v) ∈ X, then the label remains unchanged.When either h1 or h2 is the identity function (so that Σ ⊆ ∆ or A ⊆ B), we say that therelabeling is induced by h2 or h1, respectively.

1.3 Σ-tree automata

Given a signature Σ of some rank type R, a (Σ-)tree automaton A = (A, Σ) consists ofa nonempty state (or carrier) set A and for each symbol σ ∈ Σn, there is an associatedelementary operation σA : An → A. Elements of the state set A are usually called states.When σ ∈ Σn is a symbol, ImgA(σ) denotes the image set {σA(a1, . . . , an) : a1, . . . , an ∈ A}of σ in A. When the set A of states is finite, we call A a finite tree automaton; when even|A| = 1, A is called a trivial tree automaton.

When A = (A, Σ) and B = (B, Σ) are Σ-tree automata with B ⊆ A such that all elemen-tary operations σB of B are the restrictions of the corresponding elementary operationsσA, then we say that B is a subautomaton of A. When also B ⊂ A holds, B is called aproper subautomaton of A.

When A = (A, Σ) and B = (B, Σ) are tree automata over the same signature Σ, then theirdirect product is the Σ-tree automaton A×B = (A×B, Σ) having the state set A×B andthe elementary operations σA×B

((a1, b1), . . . , (an, bn)

)=

(σA(a1, . . . , an), σB(b1, . . . , bn)

)for all σ ∈ Σn and states a1, . . . , an ∈ A, b1, . . . , bn ∈ B.

The ∆-tree automaton B = (B, ∆) is a renaming of the Σ-tree automaton A = (A, Σ)(here Σ and ∆ both have the same rank type) if B = A and each elementary operationof B is also an elementary operation of A, i.e. for each δ ∈ ∆n there exists a symbol

1.3. Σ-TREE AUTOMATA 11

σ ∈ Σn having δB = σA. Observe that this relation is not symmetric. When Σ and ∆ aresignatures over the same rank type R, A = (A, Σ) is a tree automaton and h : ∆ → Σ is arank-preserving map, then h determines the renaming B = (A, ∆) of A where δB = (h(δ))A

for each δ ∈ ∆.

Given a Σ-tree automaton A = (A, Σ), we associate a term function tA : Am → A to anytree t ∈ TΣ(Xm) defined as:

1. any xi, i ∈ [m] induces the projection to the i-th coordinate, i.e. xAi (a1, . . . , am) = ai;

2. any constant symbol σ ∈ Σ0 induces the constant function Am → A having thevalue σA;

3. any tree t = σ(t1, . . . , tn) with σ ∈ Σn for some n > 0 induces the composition ofthe elementary operation σA with the tupling of the term functions tAi , i ∈ [n], i.e.for any a = (a1, . . . , am), tA(a) = σA(tA1 (a), . . . , tAn(a)).

Term functions that are induced by proper trees are called proper term functions.

Thus, any tree t ∈ TΣ has a constant function as associated term function. When tA

is the constant function having the value a ∈ A, we say that t evaluates to a in A anddenote this by tA = a, identifying the constant-valued function with its value. Then,if a Σ-tree automaton A = (A, Σ) is given along with a set A′ ⊆ A of final states, wedefine the tree language LA,A′ recognized by A (with the set A′ of final states) as the set{t ∈ TΣ : tA ∈ A′}. A tree language L is recognizable by the tree automaton A if L = LA,A′

for some set A′ ⊆ A of final states.

When the rank type R of a signature Σ contains 0, the connected part of a tree automatonA = (A, Σ) is the subautomaton (A′, Σ) of A where A′ = {tA : t ∈ TΣ} consists of theaccessible states of A. Note that since 0 is contained in R, TΣ is not empty, thus A′

cannot be empty either. It is easy to see that (A′, Σ) is the least subautomaton of A.Also when Σ is a signature of rank type R which contains 0, we call a Σ-tree automatonA = (A, Σ) connected if it is generated by the constants (or equivalently, if it has noproper subautomata).

When A = (A, Σ) is a tree automaton and p ∈ TΣ,A(Xn), then p induces an (n-ary)polynomial function pA : An → A as follows:

1. xAi is the projection πi to the i-th coordinate for any xi ∈ Xn;

2. each symbol σ ∈ Σ0 induces the constant function An → A with value σA;

3. each a ∈ A induces the constant function An → A with value a;

1.3. Σ-TREE AUTOMATA 12

4. when p = σ(p1, . . . , pk), then pA is defined as the composition of σA with the targettupling of the functions pAi , i ∈ [k], i.e. for any a = (a1, . . . , an) let pA(a) =σA(pA1 (a), . . . , pAk (a)).

Polynomial functions of A = (A, Σ) induced by (proper) ΣA-polynomial contexts arecalled (proper) translations of A.

We note that ΣXn-trees are Σ∅Xn-polynomial symbols and any ΣXn-tree t induces thesame term function (when t is viewed as a tree) and polynomial function (when t isviewed as a ΣAXn-polynomial symbol) in any tree automaton (A, Σ). Thus, we coulddefine trees as special polynomial symbols and term functions as polynomial functionsinduced by trees. The reason why we define these notions this way is to emphasize thattrees play a central role in this thesis.

We call a tree language L ⊆ TΣ regular if it is recognizable by some finite tree automaton.It is well-known (see e.g. [25]) that if L is a regular tree language, then it has only finitelymany quotients and each of these quotients is regular.

When A = (A, Σ) and B = (B, Σ) are Σ-tree automata, we call a mapping h : A → B ahomomorphism if it is compatible with all elementary operations, i.e. h(σA(a1, . . . , an)) =σB(h(a1), . . . , h(an)) holds for all arities n ∈ R, symbol σ ∈ Σn and states a1, . . . , an ∈ A.We call B a homomorphic image or a quotient of A if there exists a surjective homomor-phism from A to B; if this homomorphism is even injective (in which case it is calledan isomorphism), then A and B are said to be isomorphic (it is easy to see that in thiscase the inverse of the given homomorphism is also a bijective homomorphism, thus thedefinition is symmetric). We call a quotient of a subautomaton of a tree automaton A adivisor of A.

Homomorphic images are strongly related to congruences. Suppose A = (A, Σ) is aΣ-tree automaton and Θ ⊆ A × A is an equivalence relation on A which is compati-ble with all the elementary operations of A, i.e. whenever σ ∈ Σn is an n-ary sym-bol and a1, . . . , an, b1, . . . , bn ∈ A are states with aiΘbi for each i ∈ [n], then alsoσA(a1, . . . , an)ΘσA(b1, . . . , bn) holds. Then Θ is called a congruence of A. Clearly, theidentity relation ∆A = {(a, a) : a ∈ A} and the complete relation ∇A = A×A over A arecongruences of A; these are called the trivial congruences, whereas a congruence Θ whichis different from both ∆A and ∇A is a nontrivial congruence of A.

It is clear that the intersection⋂i∈I

Θi of any family (Θi)i∈I of congruences of A is also a

congruence. Thus, when A is a given tree automaton, the set Con(A) of congruences ofA forms a complete lattice. In this lattice, the meet and join operators are defined as∧i∈I

Θi =⋂i∈I

Θi and∨i∈I

Θi =⋂

(Θ ∈ Con(A) :⋃i∈I

Θi ⊆ Θ); the least (resp. greatest) element

of Con(A) is ∆A (resp. ∇A). When Θ is in Con(A) and a ∈ A, then the congruence class

1.3. Σ-TREE AUTOMATA 13

of A/Θ containing a will be denoted a/Θ, or sometimes just a when Θ is understood.

When Θ is a congruence of A = (A, Σ), then the factor automaton A/Θ = (B, Σ) isdefined as follows:

1. the state set of A/Θ is B = {a/Θ : a ∈ A};2. for any symbol σ ∈ Σn, the elementary operation σA/Θ maps the n-tuple

(a1/Θ, . . . , an/Θ) to the congruence class σA(a1, . . . , an)/Θ.

From the congruence properties it is clear that the above interpretation of the symbols iswell-defined. Obviously, A/Θ is a quotient of A.

The Homomorphism Theorem states that for any Σ-tree automaton A = (A, Σ) andhomomorphic image B = (B, Σ) of A there exists a congruence Θ of A such that thefactor automaton A/Θ is isomorphic to B. When h is a homomorphism from A onto B,we may define Θ by a1Θa2 ⇔ h(a1) = h(a2), which is called the kernel of h.

A nontrivial Σ-tree automaton A = (A, Σ) is said to be subdirectly irreducible if wheneverA is isomorphic to a subautomaton of some direct product

∏i∈I

A/Θi for some family (Θi)i∈I

of congruences of A, then Θj = ∆A holds for some j ∈ I. Any nontrivial Σ-tree automatonA is either subdirectly irreducible or is isomorphic to a subautomaton of the direct productof a family (A/Θi)i∈I , where each Θi is a nontrivial congruence of A. In this case A issubdirectly reducible. Clearly when A is finite, the above I can be also assumed finite.

It is well-known that for any tree language L ⊆ TΣ there exists a minimal automaton AL,unique up to isomorphism, having the following properties:

1. AL is connected.

2. L is recognized by AL.

3. AL is a divisor of any Σ-tree automaton B by which L is recognizable.

Thus, a tree language L is regular if and only if its minimal automaton AL is finite.Given a finite tree automaton A = (A, Σ) with a set A′ ⊆ A of final states, the minimalautomaton AL of the recognized language L = LA,A′ can be effectively constructed.

We call a nonempty class V of finite tree automata a pseudovariety of finite tree au-tomata if it is closed under taking direct products, homomorphic images, subautomataand renamings. It is clear that the intersection of any family of pseudovarieties is also apseudovariety (observe that the intersection cannot be empty since every pseudovarietycontains all the trivial tree automata), thus for any class K of finite tree automata there

1.3. Σ-TREE AUTOMATA 14

exists a least pseudovariety 〈K〉 containing K. We also say that 〈K〉 is the pseudovarietygenerated by K. When K = {A1, . . . ,An} is a finite class, we write 〈A1, . . . ,An〉 for 〈K〉.When K is a class of finite tree automata, we let Kc denote the class consisting of theconnected parts of the members of K.

When A and B are connected Σ-tree automata, their connected direct product, also denotedA × B is the connected part of their direct product. Similarly, we say that the treeautomaton A = (A, Σ) is a connected renaming of the tree automaton B = (B, ∆) if A isthe connected part of a renaming of B. (Note that any homomorphic image of a connectedtree automaton is connected, thus there is no need to define a notion such as “connectedhomomorphism”.) When we write A × B, it will be always clear whether this notationstands for a direct product or a connected direct product. Observe that no connectedtree automaton A has a proper subautomaton. Moreover, when A and B are connectedΣ-tree automata, then there is at most one homomorphism from A to B.

A nonempty class Vc of finite connected tree automata is called a pseudovariety of finiteconnected tree automata if it is closed under connected renamings, connected direct prod-ucts and homomorphic images. When Kc is a class of finite connected tree automata,there exists a least pseudovariety of finite connected tree automata, also denoted 〈Kc〉,containing Kc. We also say that 〈Kc〉 is generated by Kc.

Since our logics will be defined over variable-free trees, in connection with logical defin-ability it will suffice to deal with pseudovarieties of finite connected tree automata. Alsothe following hold:

1. When V is a pseudovariety of finite tree automata, Vc is a pseudovariety of finiteconnected tree automata.

2. Let K be an arbitrary class of finite tree automata. Then 〈K〉c, the class of allconnected tree automata contained in the pseudovariety of finite tree automatagenerated by K, coincides with 〈Kc〉, the pseudovariety of finite connected treeautomata generated by the connected parts of the members of K.

The class of pseudovarieties of finite (connected) tree automata is a complete lattice. Inthis lattice, when (Vi)i∈I is a family of pseudovarieties of finite (connected) tree automata,∧i∈I

Vi =⋂i∈I

Vi is their meet and∨i∈I

Vi = 〈⋃i∈I

Vi〉 is their join; the least element contains

only the trivial tree automata and the greatest element contains every finite (connected)tree automaton.

A closely related notion is that of literal varieties of tree languages. A nonempty class Lof regular tree languages is a literal variety of tree languages if it is closed under takingquotients, boolean operations and inverse literal tree homomorphisms, i.e. when Σ and

1.4. LOGICS ON TREES 15

∆ are signatures having the same rank type, ζ ∈ T∆ is a ∆-context, K,L ∈ T∆ are treelanguages contained in L and h : TΣ → T∆ is a literal tree homomorphism, then each ofthe languages ζ−1L, K ∩ L, L = T∆ − L over ∆ and the language h−1(L) over Σ is amember of L.

The class of literal varieties of tree languages also forms a complete lattice: when (Li)i∈I

is a family of literal varieties of tree languages,∧i∈I

Li =⋂i∈I

Li is their meet and their

join∨i∈I

Li is the smallest literal variety of tree languages containing⋃i∈I

Li. (From the

definition of literal varieties it is clear that when (Li)i∈I is a family of literal varieties oftree languages, then their intersection

⋂i∈I

Li is also a literal variety of tree languages, thus

the concept of “smallest literal variety containing⋃i∈I

Li” is well-defined.)

There exists an Eilenberg correspondence [9] between two of the lattices defined above:

1. The lattice of all pseudovarieties of finite connected tree automata is isomorphic tothe lattice of all literal varieties of tree languages.

2. The following mapping establishes an order isomorphism from the lattice of allpseudovarieties of finite connected tree automata to the lattice of all literal varietiesof tree languages:

Vc 7→ LVc = {L : L is recognizable in some A ∈ Vc}.

3. The following mapping establishes the order isomorphism that is the inverse of theabove isomorphism:

L 7→ VcL = 〈{AL : L ∈ L}〉.

Recall that AL stands for the minimal automaton of the tree language L.

For more information on tree automata we refer the reader to [26]; several different no-tions of (pseudo)varieties and Eilenberg correspondence between classes of automata andlanguages were investigated in [1, 13, 37, 44, 47, 48].

1.4 Logics on trees

In this section we briefly recall the syntax and semantics of two classical logics on trees,first-order logic and the temporal logic CTL.

1.4. LOGICS ON TREES 16

Let Σ be a signature over the rank type R where 0 ∈ R.

The set of first-order formulas over Σ (equipped with the descendant relation and thesuccessor relations), denoted FO(<, Si), is the least set satisfying the following conditions:

1. for any symbol σ ∈ Σ and variable x ∈ X, Pσ(x) is a formula;

2. for any variables x, y ∈ X, (x = y) and (x < y) are formulas;

3. for any variables x, y ∈ X and integer i ∈ [max R], Si(x, y) is a formula;

4. if ϕ is a formula, then (¬ϕ) is also a formula;

5. if ϕ1 and ϕ2 are formulas, then (ϕ1 ∨ ϕ2) is a formula;

6. if x ∈ X is a variable and ϕ is a formula, then (∃xϕ) is a formula.

Note that we use the same set X of variables as in the case of ΣX-trees. This will notcause any confusion.

Let t ∈ TΣ be a tree, ϕ an FO(<,Si)-formula and v : X → dom(t) a mapping from the setof variables to the domain of t. We say that the pair (t,v) satisfies ϕ, denoted (t,v) |= ϕ,if one of the following holds:

1. ϕ = Pσ(x) for some σ and x with t(v(x)) = σ;

2. ϕ = (x = y) for some x, y ∈ X and v(x) = v(y);

3. ϕ = (x < y) for some x, y ∈ X and v(x) ≺ v(y) (i.e. v(x) is a proper prefix of v(y),or y is a proper descendant of x);

4. ϕ = Si(x, y) for some x, y ∈ X and i ∈ [max R], and v(y) = v(x) · i;5. ϕ = (¬ϕ1) and it is not the case that (t,v) |= ϕ1;

6. ϕ = (ϕ1 ∨ ϕ2) and (t,v) |= ϕ1 or (t,v) |= ϕ2;

7. ϕ = (∃xϕ1) and there exists a node u ∈ dom(t) such that (t,v[x 7→ u]) |= ϕ1. Herev[x 7→ u] is the assignment from X to dom(t) where v[x 7→ u](x) = u and for anyy 6= x, v[x 7→ u](y) = v(y).

In order to define the semantics of FO(<,Si) over trees without a given mapping v of thevariables, we first have to define the set FreeVar(ϕ) of free variables in the formula ϕ asfollows:

1.4. LOGICS ON TREES 17

1. for any σ ∈ Σ and x ∈ X, FreeVar(Pσ(x)) = {x};2. for any x, y ∈ X, FreeVar((x = y)) = {x, y};3. for any x, y ∈ X, FreeVar((x < y)) = {x, y};4. for any x, y ∈ X and i ∈ [max R], FreeVar(Si(x, y)) = {x, y};5. for any formula ϕ, FreeVar((¬ϕ)) = FreeVar(ϕ);

6. for any formulas ϕ1, ϕ2, FreeVar((ϕ1 ∨ ϕ2)) = FreeVar(ϕ1) ∪ FreeVar(ϕ2);

7. for any formula ϕ and variable x ∈ X, FreeVar((∃xϕ)) = FreeVar(ϕ)− {x}.

A formula ϕ is called a sentence if FreeVar(ϕ) = ∅. It is easy to see that if ϕ is a formula,t is a Σ-tree and v1,v2 : X → dom(t) are two assignments of the variables that agreeon FreeVar(ϕ), then (t,v1) |= ϕ if and only if (t,v2) |= ϕ. Thus, for any sentence ϕ andΣ-tree t, the following are equivalent:

1. There exists an assignment v : X → dom(t) with (t,v) |= ϕ.

2. For any assignment v : X → dom(t), (t,v) |= ϕ.

Thus, one can define t |= ϕ for the tree t and the sentence ϕ if (t,v) satisfies ϕ for someassignment, or for all assignments v : X → dom(t).

A sentence ϕ over Σ defines the language Lϕ = {t ∈ TΣ : t |= ϕ}. The class FO(<,Si) ofFO(<,Si)-definable tree languages is {Lϕ : ϕ is a FO(<, Si)-formula}.The fragment FO(<) of FO(<,Si) is obtained by excluding the successor relations Si

from the syntax. It is clear that FO(<) is weaker than FO(<,Si), since e.g. it cannotdistinguish the trees σ2(σ0, ν0) and σ2(ν0, σ0).

Now we turn to the temporal logic CTL.

The set of CTL-formulas over Σ is the least set satisfying the following conditions:

1. for any σ ∈ Σ, pσ is a formula;

2. if ϕ is a formula, then (¬ϕ) and (EXϕ) are also formulas;

3. if ϕ1 and ϕ2 are formulas, then (ϕ1 ∨ ϕ2) and (EU(ϕ1, ϕ2)) are also formulas.

The semantics of CTL is defined as follows: for a tree t ∈ TΣ and a CTL-formula ϕ overΣ we say that t satisfies ϕ, in notation t |= ϕ if and only if one of the following holds:

1.4. LOGICS ON TREES 18

1. ϕ = pσ and Root(t) = σ;

2. ϕ = (¬ϕ1) and it is not the case that t |= ϕ1;

3. ϕ = (ϕ1 ∨ ϕ2) and t |= ϕ1 or t |= ϕ2;

4. ϕ = (EXϕ1) and t = σ(t1, . . . , tn) for some σ ∈ Σn and trees t1, . . . , tn ∈ TΣ, andthere exists an index i ∈ [n] with ti |= ϕ1;

5. ϕ = (EU(ϕ1, ϕ2)) and there exists a node v ∈ dom(t) such that both of the followingtwo conditions hold:

(a) t|v |= ϕ2;

(b) for any u ≺ v, t|u |= ϕ1.

A CTL-formula ϕ defines the tree language Lϕ = {t ∈ TΣ : t |= ϕ}. CTL denotes theclass of all CTL-definable tree languages1.

Two formulas, ϕ and ψ, of any logic are said to be equivalent, denoted ϕ ≡ ψ if theydefine the same language, i.e. Lϕ = Lψ.

1The reader familiar with the logic CTL may observe the fact the unary modality EG is left outfrom the definition of the logic. This is due to the fact that for finite trees, EG(ϕ) is equivalent toEU(ϕ,ϕ ∧ ¬EX>), where > is a formula satisfied by any tree.

Chapter 2

Future temporal logics and thedefinability problem

In this chapter we recall from [15] the operator FTL, which associates to each class Lof tree languages a temporal logic FTL(L). This class of logics covers a wide range ofbranching time future temporal logics; for instance, the logic CTL is equivalent to a logicFTL(L) for a specific class L of simple tree languages.

After introducing the logic FTL(L), we state its definability problem, and present analgebraic characterization of its expressive power, at least when the parameter class Lconsists of regular tree languages and possesses a natural property. This characterizationis not effective, but as an application we show decidability of the definability problem ofFTL(L) for some special classes L related to fragments of CTL.

In the last section of this chapter we present a game-based, Ehrenfeucht-Fraısse typeapproach and provide another characterization of the logic FTL(L), this time for anarbitrary finite class L of tree languages. This last section contains results that are stillunpublished.

This chapter deals with variable-free trees only. For the whole section we now fix a ranktype R; to avoid trivial situations we assume that 0 ∈ R to ensure that TΣ is nonemptyfor any signature Σ (of rank type R), moreover, we also assume that R contains at leastone positive integer.

In the definition of the semantics of FTL(L) we use a lexicographic ordering of signatures;we assume that each signature Σ (all of them are of rank type R) comes with a fixedlexicographic ordering, denoted <Σ or just < when Σ is understood.

2.1. THE LOGICS FTL(L) 20

2.1 The logics FTL(L)

This section is devoted to the definition of the logics FTL(L). For further use, we alsostate some properties of these logics.

Syntax. Let Σ be a signature. The set of FTL-formulas over Σ is defined as the leastset satisfying the following conditions:

1. For each σ ∈ Σ, pσ is an (atomic) formula (of depth 0).

2. If ϕ is a formula (of depth d), then (¬ϕ) is also a formula (of depth d).

3. If ϕ1 and ϕ2 are formulas (having maximal depth d), then (ϕ1∨ϕ2) is also a formula(of depth d).

4. If ∆ is a signature, L ⊆ T∆ is a tree language and for each δ ∈ ∆, ϕδ is a formula(still over Σ and having maximal depth d), then

L(δ 7→ ϕδ)δ∈∆ (2.1)

is also a formula (of depth d + 1).

The notion of subformulas of a formula ϕ is defined as usual.

Semantics. Suppose that ϕ is a formula over Σ and t ∈ TΣ is a tree. We say that tsatisfies ϕ, in notation t |= ϕ, if one of the following holds:

1. ϕ = pσ for some σ ∈ Σ and Root(t) = σ;

2. ϕ = (¬ϕ1) and it is not the case that t |= ϕ1;

3. ϕ = (ϕ1 ∨ ϕ2) and t |= ϕ1 or t |= ϕ2;

4. ϕ = L(δ 7→ ϕδ)δ∈∆ and the characteristic tree t ∈ T∆ of t determined by the family(ϕδ)δ∈∆ belongs to L. Here t is a ∆-relabeling of t (such a relabeling always existssince the signatures Σ and ∆ have the common rank type R); a vertex v witht(v) ∈ Σn is relabeled to δ ∈ ∆n if one of the following holds:

• either t|v |= ϕδ and δ is the first (least wrt. <∆) such element of ∆n;

• or t|v 6|= ϕδ′ for any δ′ ∈ ∆n, and δ is the last (greatest wrt. <∆) element of∆n.

2.1. THE LOGICS FTL(L) 21

For any formula ϕ over Σ, we let Lϕ denote the language defined by ϕ: Lϕ = {t ∈ TΣ :t |= ϕ}.We will consider subsets of formulas associated with classes of tree languages. When Lis a class of tree languages, we let FTL(L) denote the collection of formulas all of whosesubformulas of the form (2.1) above are such that L belongs to L. We define FTL(L) tobe the class of all languages definable by formulas in FTL(L).

We say the formulas ϕ and ψ are equivalent, denoted ϕ ≡ ψ if Lϕ = Lψ. We also definethe equivalence relation ≡n

L on TΣ for any signature Σ and integer n ≥ 0: let s ≡nL t

hold for the trees s, t ∈ TΣ if s and t satisfy the same set of FTL(L)-formulas (over Σ)having depth at most n. The relation s ≡L t denotes that s and t satisfy the same set ofFTL(L)-formulas, regardless of depth.

We will use the Boolean connectives ∧ (conjunction) and→ (implication) as abbreviations.Moreover, for any signature Σ and n ∈ R, we define ttn =

∨σ∈Σn

pσ and ffn = ¬ttn. Thus,t |= ttn if and only if Root(t) ∈ Σn.

It was shown in [15] that the operator FTL preserves regularity and is a closure operatoron classes of regular languages, i.e. the following holds:

Theorem 2.1.1 For any class L of regular tree languages the following all hold:

1. FTL(L) is a class of regular tree languages;

2. L ⊆ FTL(L);

3. FTL(FTL(L)) ⊆ FTL(L).

Moreover, if L1 and L2 are classes of regular tree languages, then L1 ⊆ L2 impliesFTL(L1) ⊆ FTL(L2).

Given a tree t ∈ TΣ and a family (ϕδ)δ∈∆ of formulas over Σ, we say that the family(ϕδ)δ∈∆ is deterministic over t if for any node v ∈ dom(t) there exists at most one δ ∈ ∆with t|v |= ϕδ, moreover, this δ, if exists, is contained in ∆n, where n is the arity of t(v).The notion is extended to tuples of Σ-trees: a family of formulas is deterministic overa tuple t = (t1, . . . , tn) if it is deterministic over each ti, i ∈ [n]. The family is calleddeterministic if it is deterministic over any tree t ∈ TΣ.

Given a tree t ∈ TΣ and a family (ϕδ)δ∈∆ of formulas over Σ, we say that the family(ϕδ)δ∈∆ is complete over t if for any node v ∈ dom(t) there exists at least one δ ∈ ∆n

with t|v |= ϕδ, where n is the arity of t(v). A family is complete over a tuple (t1, . . . , tn)of Σ-trees if it is complete over each ti, i ∈ [n]; and it is complete if it is complete overevery t ∈ TΣ.

2.2. PRODUCTS OF TREE AUTOMATA 22

A formula ϕ is called deterministic if for each subformula of ϕ of the form (2.1) the family(ϕδ)δ∈∆ is deterministic; completeness of a formula is defined similarly.

It is clear that when ϕ is a complete and deterministic formula, then the particularordering of the signatures does not affect the language Lϕ. Also observe that for anyclass L of tree languages and FTL(L)-formula ϕ, there exists an equivalent, complete anddeterministic FTL(L)-formula ϕ′. This can be shown by induction on the depth of theformula: when the depth is 0, ϕ has no subformulas of the form (2.1); when ϕ = (¬ϕ1)or ϕ = (ϕ1 ∨ ϕ2), we can define ϕ′ = (¬ϕ′1) or ϕ′ = (ϕ′1 ∨ ϕ′2), respectively. Finally, whenϕ = L(δ 7→ ϕδ)δ∈∆, we can define ϕ′ as

L(δ 7→ ϕ∗δ)δ∈∆,

where for each δ ∈ ∆n,

ϕ∗δ =

ttn ∧∧

δ′<δ

(¬ϕ′δ′) if δ is the last element of ∆n;

ttn ∧ ϕ′δ ∧∧

δ′<δ

(¬ϕ′δ′) otherwise.

From the definition of the semantics and the formulas ttn, and by the induction hypothesis,it is clear that the resulting formula is indeed equivalent to ϕ, and is complete anddeterministic.

Thus, for any formula ϕ of FTL(L) there exists an equivalent, complete and deterministicformula ϕ′ of FTL(L), having at most the same depth as ϕ.

The following has been also shown in [15]:

Theorem 2.1.2 For any class L of tree languages, FTL(L) is closed under the Booleanoperations and inverse literal homomorphisms.

Moreover, when L is a class of regular tree languages, then FTL(L) is a literal varietyof tree languages if and only if for each quotient L of a language in L it holds thatL ∈ FTL(L).

2.2 Products of tree automata

In this section we define the cascade [43], Moore and strict Moore [18] products of treeautomata, as well as the connected variants of these notions, giving rise to (connected) cas-cade, Moore and strict Moore pseudovarieties of finite (connected) tree automata. Thesepseudovarieties (especially the connected Moore pseudovarieties) will play a fundamentalrole in the algebraic characterization of the logics FTL(L) developed in the next section.

2.2. PRODUCTS OF TREE AUTOMATA 23

2.2.1 The Moore product and Moore pseudovarieties

In this subsection we define the three product operations mentioned above, and provideseveral examples for further use.

Suppose A = (A, Σ) and B = (B, ∆) are tree automata and γ is a family (γn)n∈R offunctions, γn : An × Σ → ∆n for each n ∈ R. Then the cascade product A×γ B of A andB determined by γ is the tree automaton (A×B, Σ) with

σA×γB((a1, b1), . . . , (an, bn))

=(σA(a1, . . . , an), δB(b1, . . . , bn)

),

where

δ = γn(a1, . . . , an, σ)

for all σ ∈ Σn, n ∈ R and (a1, b1), . . . , (an, bn) ∈ A × B. (Note that when n = 0, δ is afunction of σ).

We state the following lemma:

Lemma 2.2.1 Suppose A = (A, Σ) and B = (B, ∆) are tree automata and C = (C, Σ) =A ×γ B is a cascade product. Then for any ΣCXn-polynomial symbol p and statesa1, . . . , an ∈ A of A, there exists a relabeling p′ ∈ ΣAXn and a relabeling p′′ ∈ ∆BXn ofp such that

pC((a1, b1), . . . , (an, bn)

)=

(p′A(a1, . . . , an), p′′B(b1, . . . , bn)

),

for any b1, . . . , bn ∈ B. Moreover, p′ can be assumed to be the relabeling of p determinedby the projection A×B → A, (a, b) 7→ a.

Proof. Let A, B, C, a1, . . . , an as given above. We define the relabelings p′ and p′′ of apolynomial symbol p ∈ TΣ,C(Xn) as follows:

1. If p = xi ∈ Xn, let p′ = p′′ = xi.

2. If p = (a, b) ∈ A×B, let p′ = a and p′′ = b.

3. If p = σ(p1, . . . , pk), let p′ = σ(p′1, . . . , p′k) and p′′ = δ(p′′1, . . . , p

′′k), where δ =

γk

(p′A1 (a1, . . . , an), . . . , p′Ak (a1, . . . , an), σ

).

It is easy to check that p′ and p′′ satisfy the required properties for any states b1, . . . , bn ∈B. ¥

2.2. PRODUCTS OF TREE AUTOMATA 24

We call a cascade product A×γB a Moore product if there exists a rank-preserving functionα : A× Σ → ∆ (i.e. for any σ ∈ Σn, n ∈ R and a ∈ A, α(a, σ) ∈ ∆n holds) with

γn(a1, . . . , an, σ) = α(σA(a1, . . . , an), σ)

for all σ ∈ Σn, n ∈ R and a1, . . . , an. Moore products of the above form will be writtenas A×α B, i.e. by specifying the function α : A× Σ → ∆.

We call a Moore product A ×α B, α : A × Σ → ∆ a strict Moore product if there is afunction β : A × R → ∆ with α(a, σ) = β(a, n), for all a ∈ A and σ ∈ Σn. Accordingly,we will sometimes specify a strict Moore product by the function β.

Note that the direct product is a special case of the Moore product but it is not a specialcase of the strict Moore product. Any class of finite tree automata which is closed underthe Moore product is also closed under the direct product, but the same fact is not truefor the strict Moore product: the class of all finite tree automata A = (A, Σ) such thatfor each n ∈ R and a1, . . . , an the cardinality of the set {σA(a1, . . . , an) : σ ∈ Σn} is atmost 2 is closed under the strict Moore product but not under the direct product.

Remark 2.2.2 In the classical case, i.e. when R = {0, 1}, the function β in a strict Moore productA×β B assigns an output symbol in ∆1 to each pair (a, 1), so that forgetting about the symbols of rank0, (A, β) may be viewed as a Moore automaton with input alphabet Σ1 and output alphabet ∆1. Thisexplains the terminology.

When A = (A, Σ) and B = (B, ∆) are connected tree automata and γ is a family (γn)n∈R

of functions, γn : An × Σ → ∆n, the connected cascade product of A and B determinedby γ, also written as A ×γ B, is the connected part of the cascade product of A and Bdetermined by γ. The notions of connected Moore product and connected strict Mooreproduct are defined analogously.

Recall that when V is a class of finite tree automata, then Vc denotes the class of finiteconnected tree automata consisting of the connected parts of the members of V. Thus,when V is a pseudovariety of finite tree automata, Vc consists of the connected treeautomata contained in V and is a pseudovariety of finite connected tree automata. Wewill use the superscript c to indicate that a class is a pseudovariety of finite connectedtree automata.

When V and W are pseudovarieties of finite tree automata, let V × W denote thepseudovariety of finite tree automata generated by all direct products A×B with A ∈ Vand B ∈ W. Moreover, let V ×M W denote the pseudovariety of finite tree automatagenerated by all Moore products A×α B with A ∈ V and B ∈ W. Similarly, let V×s Wand V×c W respectively denote the pseudovarieties of finite tree automata generated byall strict Moore products and cascade products A×αB with A ∈ V and B ∈ W. Moreover,

2.2. PRODUCTS OF TREE AUTOMATA 25

when K is an arbitrary class of finite tree automata, let 〈K〉s, 〈K〉M and 〈K〉c respectivelydenote the least pseudovariety of finite tree automata containing K which is closed underthe strict Moore, Moore and cascade product, respectively. We call pseudovarieties ofthe form 〈K〉s, 〈K〉M and 〈K〉c strict Moore pseudovarieties, Moore pseudovarieties andcascade pseudovarieties, respectively.

The above notions are extended also to finite connected tree automata as follows. WhenVc and Wc are pseudovarieties of finite connected tree automata, let Vc×Wc denote thepseudovariety of finite connected tree automata generated by all connected direct productsA× B with A ∈ Vc and B ∈ Wc. Also, let Vc ×M Wc denote the pseudovariety of finiteconnected tree automata generated by all connected Moore products A×αB with A ∈ Vc

and B ∈ Wc. Similarly, let Vc×sWc and Vc×cW

c respectively denote the pseudovarietiesof finite connected tree automata generated by all connected strict Moore products andconnected cascade products A ×α B with A ∈ Vc and B ∈ Wc. Finally, when Kc is anarbitrary class of finite connected tree automata, let 〈Kc〉M , 〈Kc〉s, 〈Kc〉c respectivelydenote the least pseudovariety of finite connected tree automata containing Kc whichis closed under the connected Moore product, the connected strict Moore product, andthe connected cascade product. We call pseudovarieties of the form 〈Kc〉s and 〈Kc〉Mconnected strict Moore pseudovarieties and connected Moore pseudovarieties, respectively,and pseudovarieties of the form 〈Kc〉c connected cascade pseudovarieties.

When K = {A1, . . . ,An}, for some finite tree automata A1, . . . ,An, we will write〈A1, . . . ,An〉M for 〈K〉M . The notations 〈A1, . . . ,An〉s and 〈A1, . . . ,An〉c are used in thesame way. Each of these notations is extended to connected tree automata as well. Itwill always be clear whether 〈A1, . . . ,An〉M (〈A1, . . . ,An〉s,〈A1, . . . ,An〉c, resp.) standsfor the generated Moore (strict Moore, cascade, resp.) pseudovariety or for the generatedconnected Moore (strict Moore, cascade, resp.) pseudovariety.

Proposition 2.2.3 For any pseudovarieties V and W of finite tree automata, V×M Wis the class of all divisors of Moore products A×α B with A ∈ V and B ∈ W. A similarfact holds for V ×c W and V ×s W.

Proof. Let A,B be finite Σ-tree automata contained in V, A′ = (A′, ∆1) and B′ =(B′, ∆2) finite tree automata contained in W, and let A×αA′, B×βB′ be Moore products.We show that (A ×α A′) × (B ×β B′) is isomorphic to a Moore product C ×γ C′, whereC ∈ V and C′ ∈ W.

Indeed, consider the direct product C = A × B and define C′ as the tree automaton(A′ × B′, ∆), where for each n ∈ R, ∆n = ∆1

n × ∆2n and the function symbols are

interpreted componentwise, i.e.

(δ1, δ2)C′((a′1, b

′1), . . . , (a

′n, b

′n)) = (δA

′1 (a′1, . . . , a

′n), δB

′2 (b′1, . . . , b

′n))

2.2. PRODUCTS OF TREE AUTOMATA 26

for each δ1 ∈ ∆1n, δ2 ∈ ∆2

n, a′1, . . . , a′n ∈ A′ and b′1, . . . , b

′n ∈ B′. It is easy to see that C′ is

a direct product of ∆-renamings of A′ and B′.

Now (A×αA′)× (B×β B′) is isomorphic to the Moore product C×γ C′ where γ is definedby

γ((a, b), σ

)=

(α(a, σ), β(b, σ)

)

for each (a, b) ∈ C, σ ∈ Σ. An isomorphism C×γ C′ → (A×α A′)× (B×β B′) is given bythe map ((a, b), (a′, b′)) 7→ ((a, a′), (b, b′)) for all states ((a, b), (a′, b′)) of C×γ C′.

It is easy to see that any renaming of a Moore product A×α B is isomorphic to a Mooreproduct A′ ×α′ B where A′ is a renaming of A. Since any divisor of a divisor of A is alsoa divisor of A, the claim is proved for Moore pseudovarieties.

The case of the cascade and the strict Moore product is analogous. ¥It is easy to check that for any pseudovarieties V and W of finite tree automata we have(V×M W)c = Vc×M Wc, and similarly for the strict Moore and the cascade products.Thus Proposition 2.2.3 implies the following:

Corollary 2.2.4 For any pseudovarieties Vc and Wc of finite connected tree automata,Vc ×M Wc is the class of all quotients of connected Moore products A×α B with A ∈ Vc

and B ∈ Wc. A similar fact holds for Vc ×c Wc and Vc ×s Wc.

Remark 2.2.5 The Moore product is associative on pseudovarieties: For any pseudovarieties of finitetree automata V1,V2,V3,

(V1 ×M V2)×M V3 = V1 ×M (V2 ×M V3).

A similar fact holds for the cascade product.

We now give some examples of Moore pseudovarieties. We say that a Σ-tree automatonA is commutative if it satisfies all equations

σA(x1, . . . , xn) = σA(xπ(1), . . . , xπ(n))

for all σ ∈ Σn, n ∈ R, n > 0 and for all permutations π of the set [n]. Moreover, we saythat a Σ-tree automaton A is idempotent if it satisfies the equations

σA(x1, . . . , xn) = σA(y1, . . . , yn)

for all σ ∈ Σn, n ∈ R, n > 0 where {x1, . . . , xn} = {y1, . . . , yn}. Note that A is idempotentif and only if for each σ ∈ Σn and a1, . . . , an ∈ A, σA(a1, . . . , an) depends only on the set{a1, . . . , an}. In particular, any idempotent tree automaton is commutative.

2.2. PRODUCTS OF TREE AUTOMATA 27

Proposition 2.2.6 Suppose that C = A ×α B is a Moore product. If A and B arecommutative, or idempotent, then so is C.

Proof. Assume that A is a Σ-tree automaton and B is a ∆-tree automaton, so thatα : A × Σ → ∆. Suppose that A and B are commutative. Then for all σ ∈ Σn, n ∈ R,n > 0, a1, . . . , an ∈ A and permutations π,

α(σA(a1, . . . , an), σ) = α(σA(aπ(1), . . . , aπ(n)), σ).

Thus, when b1, . . . , bn ∈ B and δ = α(σA(a1, . . . , an), σ),

σC((a1, b1), . . . , (an, bn)) = (σA(a1, . . . , an), δB(b1, . . . , bn))

= (σA(aπ(1), . . . , aπ(n)), δB(bπ(1), . . . , bπ(n)))

= σC((aπ(1), bπ(1)), . . . , (aπ(n), bπ(n))).

The argument is similar in the idempotent case. ¥We say that a Σ-tree automaton A is stutter invariant if

σA(a1, . . . , an−1, σA(a1, . . . , an)) = σA(a1, . . . , an)

for all σ ∈ Σn, n > 0, a1, . . . , an ∈ A.

Proposition 2.2.7 Suppose that C = A×αB is a Moore product. If A and B are stutterinvariant, then so is C.

Proof. Assume that A = (A, Σ) and B = (B, ∆) are tree automata, so that α : A×Σ →∆. Suppose that A and B are stutter invariant. Let σ ∈ Σn, n > 0, n ∈ R, a1, . . . , an ∈ A,b1, . . . , bn ∈ B. Since A is stutter invariant, we have

σA(a1, . . . , an−1, σA(a1, . . . , an)) = σA(a1, . . . , an).

Thus,

α(σA(a1, . . . , an), σ) = α(σA(a1, . . . , an−1, σA(a1, . . . , an)), σ).

Let δ denote this symbol. Then, using the assumption that B is also stutter invariant,

σC((a1, b1), . . . , (an, bn))

= (σA(a1, . . . , an), δB(b1, . . . , bn))

= (σA(a1, . . . , an−1, σA(a1, . . . , an)), δB(b1, . . . , bn−1, δ

B(b1, . . . , bn)))

= σC((a1, b1), . . . , (an−1, bn−1), σC((a1, b1), . . . , (an, bn)))).

2.2. PRODUCTS OF TREE AUTOMATA 28

¥It is clear that any divisor of a commutative tree automaton is commutative; similarly,idempotence and stutter invariance are also preserved under taking divisors. This impliesthe following:

Corollary 2.2.8 The classes of commutative, idempotent, and stutter invariant finitetree automata, denoted Com, Idem and Stu, respectively, are all Moore pseudovarieties,as is any intersection of these classes.

It is easy to check that when a class V of finite tree automata forms a Moore (cascade,resp.) pseudovariety of finite tree automata, then the class Vc forms a connected Moore(connected cascade, resp.) pseudovariety of finite connected tree automata. Thus thefollowing also holds:

Corollary 2.2.9 The classes of commutative, idempotent, and stutter invariant finiteconnected tree automata, denoted Comc, Idemc and Stuc, respectively, are all connectedMoore pseudovarieties, as is any intersection of these classes.

2.2.2 Definite tree automata

Let Σ be a signature, k ≥ 0 an integer and s, t ∈ TΣ(X) trees. We say that s and t agreeup to depth k if one of the following holds:

1. k = 0 and Root(s) = Root(t);

2. s = t ∈ X;

3. k > 0, s = σ(s1, . . . , sn), t = σ(t1, . . . , tn) holds for some σ ∈ Σn and ΣX-treess1, . . . , sn, t1, . . . , tn, moreover, the trees si and ti agree up to depth k− 1 for each i.

Agreement of polynomial symbols p, q ∈ TΣ,A(X) up to some depth k is defined analo-gously.

We say that a Σ-tree automaton A is k-definite, for some k ≥ 1, if for all polynomialsymbols p, q ∈ TΣ,A, if p and q agree up to depth k − 1, then pA = qA. By extension, atree automaton is definite if it is k-definite for some k. We let Dk denote the class of allfinite k-definite tree automata and D the class of all finite definite tree automata. Thus,Dc

k and Dc denote the class of all finite k-definite connected tree automata and the classof all finite definite connected tree automata, respectively.

2.2. PRODUCTS OF TREE AUTOMATA 29

It is clear that each Dk is a pseudovariety of finite tree automata as is the class D.

We call a tree language L ⊆ TΣ k-definite for some k ≥ 1 if for any two trees s, t ∈ TΣ, ifs and t agree up to depth k− 1, then s ∈ L ⇔ t ∈ L. Also, we say that a tree language isdefinite if it is k-definite for some k. For each k, let Dk denote the class of all k-definitetree languages and let D be the union of the classes Dk, so that D is the class of all definitetree languages. Then each Dk is the literal variety of tree languages corresponding to Dc

k

by the Eilenberg correspondence, moreover, D is the literal variety corresponding to Dc.Definite tree languages were studied e.g. in [33].

The following fact was shown in [12]:

Proposition 2.2.10 For all n,m ≥ 1, it holds that Dn ×c Dm = Dn+m and thus Dcn ×c

Dcm = Dc

n+m. Hence, D = 〈D1〉c and Dc = 〈Dc1〉c.

Observe that a Σ-tree automaton A is 1-definite if and only if ImgA(σ) is a singleton setfor each σ ∈ Σ.

Proposition 2.2.11 D1 is a Moore pseudovariety of finite tree automata.

Proof. We only prove that if A and B are in D1, and C = A×α B is any Moore productof A and B, then C is also in D1. Let us write in more detail A = (A, Σ), B = (B, ∆),C = (C, Σ) and α : A×Σ → ∆. Assume that σ ∈ Σn, n ∈ R and (a1, b1), . . . , (an, bn) and(c1, d1), . . . , (cn, dn) are all in C. Then

σC((a1, b1), . . . , (an, bn)) = (σA(a1, . . . , an), δB(b1, . . . , bn))

σC((c1, d1), . . . , (cn, dn)) = (σA(c1, . . . , cn), δ′B(d1, . . . , dn))

where

δ = α(σA(a1, . . . , an), σ)

δ′ = α(σA(c1, . . . , cn), σ).

However, σA(a1, . . . , an) = σA(c1, . . . , cn), since A ∈ D1, and thus δ = δ′. But thenδB(b1, . . . , bn) = δ′B(d1, . . . , dn), since B ∈ D1. Thus

σC((a1, b1), . . . , (an, bn)) = σC((c1, d1), . . . , (cn, dn)).

¥The Boolean signature Bool has exactly two symbols of rank n, for each n ∈ R, thesymbols ↑n and ↓n.

2.2. PRODUCTS OF TREE AUTOMATA 30

Proposition 2.2.12 The Moore pseudovariety D1 of finite tree automata is generatedby the two-element Bool-tree automaton D0 =

({0, 1}, Bool), where for each n ∈ R and

a1, . . . , an ∈ {0, 1} we have

↑D0n (a1, . . . , an) = 1 and

↓D0n (a1, . . . , an) = 0;

that is, 〈D0〉M = D1.

For any Σ, let AΣ denote the Σ-tree automaton whose state set is Σ such thatσAΣ(σ1, . . . , σn) = σ for all σ1, . . . , σn ∈ Σ and σ ∈ Σn. It is clear that AΣ is in Dc

1.Moreover, any finite connected Σ-tree automaton B ∈ Dc

1 is a quotient of AΣ. As anextension, when A is some set, let AA

Σ denote the tree automaton whose state set isΣ + A (that is, the disjoint union of Σ and A) and where each function symbol σ ∈ Σis interpreted as a constant function with value σ. Clearly, AA

Σ is contained in D1 forany signature Σ and finite set A. Also observe that any 1-definite Σ-tree automatonA = (A, Σ) is a quotient of AA

Σ.

Proposition 2.2.13 For any pseudovariety V of finite tree automata we have

V ×M D1 = D1 ×V.

Consequently, Vc ×M Dc1 = Dc

1 ×Vc.

Proof. Suppose that A = (A, Σ) is a Σ-tree automaton in V and B = (B, ∆) is a ∆-treeautomaton in D1. Consider a Moore product C = A×αB. Since B is in D1, for each δ ∈ ∆n

there exists some δ ∈ B such that ImgB(δ) = {δ}. Thus, C is a quotient of the directproduct AB

Σ ×A: a homomorphism is given by (b, a) 7→ (a, b) and (σ, a) 7→ (a, α(a, σ)) foreach a ∈ A, b ∈ B and σ ∈ Σ. ¥

Proposition 2.2.14 For any pseudovariety V of finite tree automata,

D1 ×M V = D1 ×V.

Thus, Dc1 ×M Vc = Dc

1 ×Vc also holds for any pseudovariety Vc of finite connected treeautomata.

Proof. We only have to prove that D1 ×M V ⊆ D1 × V. Let A = (A, Σ) be a finite1-definite Σ-tree automaton, B = (B, ∆) ∈ V a finite ∆-tree automaton and C = A×α Ba Moore product.

2.2. PRODUCTS OF TREE AUTOMATA 31

Let B′ be the renaming of B determined by the rank preserving map σ 7→ α(σ, σ), where σis the unique element of ImgA(σ). Then C is a homomorphic image of the direct productAA

Σ × B′: a homomorphism is given by (a, b) 7→ (a, b) and (σ, b) 7→ (σ, b) for each a ∈ A,b ∈ B and σ ∈ Σ. ¥

Corollary 2.2.15 For any Moore pseudovariety V of finite tree automata, D1 ×V isa Moore pseudovariety. Thus, 〈D1 ∪V〉M = D1 ×V. Analogous facts hold for connectedMoore pseudovarieties.

Proof.

(D1 ×V)×M (D1 ×V) ⊆ (D1 ×M V)×M (D1 ×M V)

= D1 ×M (V ×M D1)×M V

= D1 ×M (D1 ×M V)×M V

= (D1 ×M D1)×M (V ×M V)

= D1 ×M V

= D1 ×V.

¥

2.2.3 Relating the three products

In this subsection we relate the Moore product to the strict Moore product and to thecascade product. As a first observation we note that the Moore product is strictly weakerthan the cascade product, since 〈D0〉M = D1 ⊂ D = 〈D0〉c.

Proposition 2.2.16 For any pseudovarieties V and W of finite tree automata,

V ×M W ⊆ (V ×D1)×s W.

Thus, if D1 ⊆ V, then V ×s W = V ×M W.

Proof. Let A be a Σ-tree automaton in V, B a ∆-tree automaton in W, and letC = A ×α B be a Moore product. It suffices to show that there exists a strict Mooreproduct C′ = A′×β B with A′ ∈ V×D1 which can be mapped homomorphically onto C.

Let A′ = A × AΣ and let β be the function β((a, σ), n) = α(a, σ), for all a ∈ A andσ ∈ Σn. When σ 6∈ Σn, define β((a, σ), n) arbitrarily. A homomorphism C′ → C isdefined by ((a, σ), b) 7→ (a, b). ¥

2.2. PRODUCTS OF TREE AUTOMATA 32

Corollary 2.2.17 For any pseudovariety V of finite tree automata, if D1 ⊆ V then〈V〉M = 〈V〉s.

Now we turn our attention to the cascade product.

Suppose that A and B are finite Σ-tree and ∆-tree automata, respectively, and consider acascade product A×γ B. We will give two constructions of a Moore product A0×αB suchthat A×γ B is a quotient of A0×α B. In the first construction, A0 = Aγ will be a cascadeproduct of A and a finite 1-definite tree automaton. In the second construction, A0 =Del(A) will be a divisor of a Moore product of A and a finite 2-definite tree automaton.

Define Aγ = (Aγ, Σ) as the cascade product A ×γ A∆. Then, the function symbols areinterpreted as

σAγ((a1, δ1), . . . , (an, δn)

)=

(σA(a1, . . . , an), γn(a1, . . . , an, σ)

),

for all σ ∈ Σn, (ai, δi) ∈ A×∆, i ∈ [n].

Lemma 2.2.18 Any cascade product A ×γ B of a Σ-tree automaton A and a ∆-tree au-tomaton B is a quotient of a strict Moore product Aγ ×β B.

Proof. We define β so that β((a, δ), n) = δ, for all (a, δ) ∈ Aγ with δ ∈ ∆n. Ahomomorphism Aγ ×β B→ A×γ B maps a state ((a, δ), b) of Aγ ×β B to (a, b). ¥

Corollary 2.2.19 For any pseudovarieties V and W of finite tree automata,

V ×c W ⊆ (V ×c D1)×s W.

Thus, if V ×c D1 ⊆ V, then V ×c W = V ×M W = V ×s W.

Proof. We have to show that each cascade product A ×γ B with A ∈ V and B ∈ Wis contained in (V ×c D1) ×s W. But by Lemma 2.2.18, A ×γ B is a quotient of a strictMoore product Aγ ×β B, and clearly, Aγ ∈ V ×c D1. ¥

Corollary 2.2.20 Suppose that V is a Moore pseudovariety with D1 ⊆ V. Then V isa cascade pseudovariety if and only if V ×c D1 ⊆ V.

Proof. Suppose that V ×c D1 ⊆ V. Then V ×c V = V ×M V, so that V is a Moorepseudovariety if and only if it is a cascade pseudovariety. ¥

2.2. PRODUCTS OF TREE AUTOMATA 33

We now turn to the second construction. Let A = (A, Σ) be a finite Σ-tree automaton.We denote the set A ∪⋃

n∈R(Σn × An) by A.

Let Σ denote the signature with

Σn = {σa : σ ∈ Σn, a ∈ ImgA(σ)},for each n ∈ R. Note that since A is finite, Σ is also finite, and thus a signature (of ranktype R).

Now we construct a finite Σ-tree automaton A = (A, Σ) as follows. For any σa ∈ Σn andb1, . . . , bn ∈ A, let

σAa (b1, . . . , bn) =

{(σ, a1, . . . , an) if σA(a1, . . . , an) = a;(σ, c1, . . . , cn) otherwise,

where for each i ∈ [n],

ai =

{bi if bi ∈ A;σAi (ai1, . . . , aiki

) if bi = (σi, ai1, . . . , aiki) for some σi ∈ Σki

, ai1, . . . , aiki∈ A,

and c1, . . . , cn ∈ A are arbitrary fixed elements of A, depending only on σ and a, withσA(c1, . . . , cn) = a.

The following fact is straightforward from the above definition.

Lemma 2.2.21 For any (variable-free) ΣA-polynomial symbol p with Root(p) = σa for

some σ ∈ Σn and a ∈ A it holds that pA = (σ, a1, . . . , an) for some a1, . . . , an withσA(a1, . . . , an) = a.

With this lemma, we can prove the following:

Lemma 2.2.22 For any finite tree automaton A, the tree automaton A is contained inD2.

Proof. Let p, q be ΣA-polynomial symbols that agree up to depth one. We show thatpA = qA.

When Root(p) ∈ A, then from Root(p) = Root(q) this clearly holds. Otherwise, writep = σa(p1, . . . , pn) and q = σa(q1, . . . , qn). Then for each i ∈ [n], Root(pi) = Root(qi). Wedefine the states a1, . . . , an ∈ A as follows: let

ai =

σAi (ai1, . . . , aiki) if Root(pi) = (σi, ai1, . . . , aiki

) ∈ Σki× Aki ;

bi if Root(pi) = σibifor some σi ∈ Σ, bi ∈ ImgA(σi);

pi otherwise (i.e. when pi ∈ A).

2.2. PRODUCTS OF TREE AUTOMATA 34

Then,

pA = qA =

{(σ, a1, . . . , an) if σA(a1, . . . , an) = a;(σ, c1, . . . , cn) otherwise,

where the states ci are fixed elements depending only on σ and a. ¥Suppose that A is a finite Σ-tree automaton. Then the delay automaton of A is thefollowing Σ-tree automaton Del(A). The set of states of Del(A) is A (thus, Del(A) is alsofinite). The operations are defined as follows. Given states zi, i ∈ [n] and σ ∈ Σn, let

σDel(A)(z1, . . . , zn) = (σ, a1, . . . , an),

where

ai =

{zi if zi ∈ A;σAi (ai1, . . . , aiki

) if zi = (σi, ai1, . . . , aiki) ∈ Σki

× Aki .

Note that A is a quotient of Del(A), a homomorphism Del(A) → A is the map(σ, a1, . . . , an) 7→ σA(a1, . . . , an) for each σ ∈ Σn, a1, . . . , an ∈ A and a 7→ a for eacha ∈ A. More generally, we show that the delay automaton and the strict Moore producttogether can be used to simulate a cascade product:

Lemma 2.2.23 Any cascade product A×γ B of a finite Σ-tree automaton A and a finite∆-tree automaton B is a quotient of a strict Moore product Del(A)×β B.

Proof. We define β as

β((σ, a1, . . . , an), n) = γ(a1, . . . , an, σ),

for all a1, . . . , an ∈ A and σ ∈ Σn. A homomorphism Del(A) ×β B → A ×γ B maps((σ, a1, . . . , an), b) to (σA(a1, . . . , an), b), and (a, b) to (a, b) for all σ ∈ Σn, a, a1, . . . , an ∈ Aand b ∈ B. ¥

Remark 2.2.24 Actually Aγ is a quotient of Del(A), so Lemma 2.2.23 follows from Lemma 2.2.18.

Lemma 2.2.25 For any finite Σ-tree automaton A, the tree automaton Del(A) dividesthe Moore product B = A ×α A determined by the map α(a, σ) = σa, for all a ∈ A andσ ∈ Σ.

2.2. PRODUCTS OF TREE AUTOMATA 35

Proof. Let B′ be the subautomaton of B consisting the states of the form (a, a) and ofthe form (σA(a1, . . . , an), (σ, a1, . . . , an)). A homomorphism B′ → Del(A) is given by themap (a, a) 7→ a for each a ∈ A and

(σA(a1, . . . , an), (σ, a1, . . . , an)) 7→ (σ, a1, . . . , an)

for all σ ∈ Σn, n ∈ R, a1, . . . , an ∈ A. ¥

Corollary 2.2.26 For any pseudovariety V of finite tree automata and tree automatonA ∈ V, Del(A) is contained in V ×M D2.

Corollary 2.2.27 For any pseudovarieties V and W of finite tree automata,

V ×c W ⊆ (V ×M D2)×s W.

Thus, if V ×M D2 ⊆ V, then V ×c W = V ×M W = V ×s W.

So finally, we have the following:

Corollary 2.2.28 For any class K of finite tree automata,

〈D2 ∪K〉M = 〈D ∪K〉M = 〈D ∪K〉c.

In particular, from D = 〈D〉c we have D = 〈D2〉M .

Analogous facts hold for classes of finite connected tree automata.

Summarizing the results of this subsection, we conclude the section with the followingcorollary:

Corollary 2.2.29 The following conditions are equivalent for any class V of finite treeautomata.

1. V is a Moore pseudovariety containing D2.

2. V is a Moore pseudovariety containing D.

3. V is a cascade pseudovariety containing D.

2.3. DEFINABILITY AND MEMBERSHIP 36

2.3 Definability and membership

In this section we state a characterization theorem that establishes a correspondence be-tween the definability problem of logics of the form FTL(L) and the membership problemof connected Moore pseudovarieties of finite connected tree automata, at least in the casewhen L is a class of regular tree languages satisfying a natural property.

When L is a class of tree languages, the definability problem of FTL(L) is stated as follows:given a tree language L, is L contained in FTL(L)?

Also, when Vc is a pseudovariety of finite connected tree automata, the membershipproblem of Vc is stated as follows: given a finite connected tree automaton A, is itcontained in Vc?

Following [15], we also associate a logic FTL(Kc) to each class Kc of finite connected treeautomata. First let LKc denote the class of regular tree languages recognizable by themembers of Kc. Then we let FTL(Kc) be the logic FTL(LKc) and define FTL(Kc) =FTL(LKc). In [15] it was shown that for any class L of regular tree languages, FTL(L)is a literal variety of tree languages if and only if FTL(L) = FTL(Kc) for some class Kc

of finite connected tree automata.

Our aim is to show that for every class Kc of finite connected tree automata, a language Lis definable in the logic FTL(Kc) if and only if its minimal tree automaton AL belongs to〈Dc

1 ∪Kc〉M , the least connected Moore pseudovariety of finite connected tree automatacontaining Kc and the 1-definite connected tree automata. As a consequence of this fact weobtain that the Eilenberg correspondence establishes a bijection between connected Moorepseudovarieties of finite connected tree automata containing Dc

1 and literal varieties of treelanguages of the form FTL(Kc). Moreover, we obtain that for any class L of regular treelanguages such that any quotient of each language in L belongs to FTL(L), a languageL is in FTL(L) if and only if AL is in the least connected Moore pseudovariety of finiteconnected tree automata containing Dc

1 and the minimal automata of the languages in L.

We note that the following are equivalent for any regular tree language L and class V offinite tree automata:

1. AL is contained in the least connected Moore pseudovariety of finite connected treeautomata containing Vc;

2. AL is contained in the least Moore pseudovariety of finite tree automata containingV.

(This is due to the fact that the two above classes contain the same connected treeautomata and for any regular tree language L, the minimal automaton AL is connected).

2.3. DEFINABILITY AND MEMBERSHIP 37

Proposition 2.3.1 Suppose that L is a class of regular tree languages, A is a finiteconnected Σ-tree automaton, B is a finite connected ∆-tree automaton and C = (C, Σ) =A×α B is a connected Moore product of A and B. If every language recognizable by A orB belongs to FTL(L), then every language recognizable by C also belongs to FTL(L).

Proof. It suffices to show that for each (a, b) ∈ C, the language h−1((a, b)) belongsto FTL(L), where h denotes the unique homomorphism TΣ → C. Recall that everyconnected Moore product can be viewed as a connected cascade product. Let α denotethe family of functions An × Σn → ∆n, n ∈ R determined by α such that A ×α B isthe connected cascade product corresponding to the connected Moore product A ×α B.By assumption, for each a ∈ A there exists a formula τa over Σ in FTL(L) defining thetree language h−1(π−1(a)), where π denotes the projection C → A, (a, b) 7→ a. For eachb ∈ B, let Tb = {s ∈ T∆ : sB = b}.It is shown in [15] that h−1((a, b)) is definable by the formula

ϕ = τa ∧ Tb(δ 7→ ϕδ)δ∈∆

where

ϕδ =∨

αn(a1,...,an,σ)=δ

pσ ∧X1τa1 ∧ . . . ∧Xnτan .

Here for each i, Xiτaiholds for a tree if and only if its ith immediate subtree exists and sat-

isfies the formula τai. But since our connected cascade product is derived from a connected

Moore product, we have αn(a1, . . . , an, σ) = δ if and only if α(σA(a1, . . . , an), σ) = δ. Thuswe can redefine ϕδ as

ϕδ =∨

α(a′,σ)=δ

pσ ∧ τa′ . (2.2)

Since by assumption each Tb is definable in FTL(L), and FTL is a closure operator, itfollows that there is a formula in FTL(L) which is equivalent to ϕ. ¥

Proposition 2.3.2 Suppose that ϕ = K(δ 7→ ϕδ)δ∈∆ is a formula over Σ in FTL(L),where (ϕδ)δ∈∆ is a complete and deterministic family. Suppose that K is recognizable byB and that each Lϕδ

is recognizable by A, where A and B are (possibly infinite) connectedtree automata. Then Lϕ ⊆ TΣ is recognizable by a connected strict Moore product of Aand B.

Proof. The proof of the corresponding fact in [15], Proposition 28 actually constructs aconnected strict Moore product. ¥From these results, we can derive:

2.3. DEFINABILITY AND MEMBERSHIP 38

Theorem 2.3.3 For any class Kc of finite connected tree automata, every language inFTL(Kc) is recognizable by some tree automaton in 〈Dc

1 ∪Kc〉M .

Proof. Let ϕ denote a complete and deterministic formula over Σ in FTL(Kc). Weshow that Lϕ is recognizable by some tree automaton in 〈Dc

1 ∪ Kc〉M . When ϕ is pσ,for some σ ∈ Σ, then Lϕ is 1-definite and thus recognizable by some tree automaton inDc

1. We proceed by induction on the structure of ϕ. Assume that ϕ = ϕ1 ∨ ϕ2 suchthat Lϕi

is recognizable by Ai in 〈Dc1 ∪ Kc〉M , i = 1, 2. Then Lϕ is recognizable by

the connected direct product A1 × A2 which is also in 〈Dc1 ∪ Kc〉M . When ϕ = ¬ϕ1,

where Lϕ1 is recognizable by A1 above, then Lϕ is also recognizable by A1. Finally, whenϕ = L(δ 7→ ϕδ)δ∈∆ and each Lϕδ

is recognizable by some tree automaton in 〈Dc1 ∪Kc〉M ,

then it follows by Proposition 2.3.2 that Lϕ is recognizable by some tree automaton in〈Dc

1 ∪Kc〉M . (Note that since 〈Dc1 ∪Kc〉M is closed with respect to the connected direct

product, we may assume without loss of generality that each Lϕδis recognizable by the

same tree automaton A in 〈Dc1 ∪Kc〉M). ¥

Note that 〈Dc1 ∪Kc〉M = 〈Dc

1 ∪Kc〉s is just Dc1 × 〈Kc〉M .

Theorem 2.3.4 For any class Kc of finite connected tree automata, a language L belongsto FTL(Kc) if and only if its minimal tree automaton AL belongs to 〈Dc

1 ∪Kc〉M if andonly if L is recognizable by an automaton in 〈Dc

1 ∪Kc〉M .

Proof. It is clear that FTL(Kc) contains the 1-definite tree languages and thusFTL(Kc) = FTL(Dc

1∪Kc), by Theorem 2.1.1. Let us define the rank of A ∈ 〈Dc1∪Kc〉M

to be the least number of Moore product and quotient operations needed to generate Afrom Dc

1 ∪Kc. We prove by induction on the rank of A that every language recognizableby A is in FTL(Dc

1 ∪Kc). When the rank is 0 we have A ∈ Dc1 ∪Kc and the result is

immediate. When the rank of A is positive, then A is either a quotient of a tree automa-ton B in 〈Dc

1 ∪Kc〉M of smaller rank, or A is a connected Moore product of some treeautomata in 〈Dc

1 ∪Kc〉M of smaller rank. In the first case, every language recognizableby A is recognizable by B. In the second case, the result follows from Proposition 2.3.1.Conversely, by Theorem 2.3.3, every language in FTL(Kc) is recognizable by some treeautomaton in 〈Dc

1 ∪Kc〉M . ¥

Corollary 2.3.5 Assume that L is a class of regular tree languages such that any quo-tient of each language in L belongs to FTL(L). Then a language L is in FTL(L) if andonly if AL is in the least connected (strict) Moore pseudovariety of finite connected treeautomata containing Dc

1 and the minimal automata of the languages in L.

2.4. APPLICATION 39

Corollary 2.3.6 For every connected Moore pseudovariety Vc of finite connected treeautomata containing Dc

1 it holds that LVc = FTL(Vc). Moreover, the map Vc 7→FTL(Vc) is an order isomorphism between the lattice of all connected Moore pseudovari-eties of finite connected tree automata containing Dc

1 and the lattice of all literal varietiesof regular tree languages V with FTL(V) = V.

Proof. By Theorem 2.3.4, FTL(Vc) = L〈Dc1∪Vc〉M . When Vc is a connected Moore

pseudovariety containing Dc1, then 〈Dc

1 ∪Vc〉M = Vc and thus FTL(Vc) = LVc . Let Vc1

and Vc2 be connected Moore pseudovarieties of finite connected tree automata containing

Dc1. By the Eilenberg correspondence, Vc

1 ⊆ Vc2 if and only if LVc

1⊆ LVc

2, i.e., when

FTL(Vc1) ⊆ FTL(Vc

2). Assume finally that V is a literal variety of regular tree lan-guages containing D1 with V = FTL(V). By the Eilenberg correspondence, there existsa pseudovariety Vc of finite connected tree automata with V = LVc . Since D1 ⊆ V , wehave Dc

1 ⊆ Vc. Thus, V = LVc = FTL(Vc). ¥In [15] it has been shown that the map Vc 7→ FTL(Vc), restricted to connected cascadepseudovarieties containing Dc, is an order isomorphism between such connected cascadepseudovarieties of finite connected tree automata and literal varieties V of tree languagescontaining the definite tree languages and satisfying FTL(V) = V . Combining this resultwith Corollary 2.3.6, we obtain a new proof of the fact, proved in Corollary 2.2.29, thatany connected Moore pseudovariety containing Dc is a connected cascade pseudovariety.

2.4 Application

In this section, we present some applications of Theorem 2.3.3. The characterizationprovided by the Theorem is not effective by itself; in the major part of this sectionwe show that some fragments of the temporal logic CTL have a decidable definabilityproblem.

2.4.1 Fragments of CTL

Below we assume that the lexicographic order on Bool (see page 29) satisfies ↑n < ↓n, foreach n ∈ R (as we have seen before, the particular ordering is not important).

Let LEF+ ⊆ TBool denote the regular language of those trees in TBool having at least onenon-root vertex labeled in {↑n: n ∈ R}, and let LEF∗ ⊆ TBool consist of all trees in TBool

with at least one vertex labeled in {↑n: n ∈ R}. Let Σ be a signature and ϕ a fixed formulaover Σ. If (ϕδ)δ∈Bool is such that ϕ↑n = ϕ, for all n ∈ R, then t |= LEF+(δ 7→ ϕδ)δ∈Bool

if and only if s |= ϕ for some proper subtree s of t. And t |= LEF∗(δ 7→ ϕδ)δ∈Bool if and

2.4. APPLICATION 40

only if some subtree of t satisfies ϕ. Thus, the modal operators corresponding to theselanguages are closely related to the strict and non-strict EF modalities of CTL, cf. [45].

In the same way, the strict and non-strict EG modalities are closely related to the modaloperators associated to the following languages, where we use the letter p to range overthe maximal paths of a tree, while u and v range over non-root vertices and all vertices,respectively:

LEG+ = {t ∈ TBool : ∃p∀u ∈ p t(u) ∈ {↑n: n ∈ R}}LEG∗ = {t ∈ TBool : ∃p∀v ∈ p t(v) ∈ {↑n: n ∈ R}}.

It is easy to check that the minimal tree automaton of LEF+ is the automaton E+EF =

({0, 1, 2}, Bool), where the interpretation of the function symbols is the following:

↑E+EF

n (x1, . . . , xn) =

{1 if xi = 0 for all i ∈ [n];2 otherwise

and

↓E+EF

n (x1, . . . , xn) =

{0 if xi = 0 for all i ∈ [n];2 otherwise.

Moreover, the minimal tree automaton of LEF∗ is E∗EF = ({0, 1}, Bool), where the inter-pretation of the function symbols is the following:

↑E∗EFn (x1, . . . , xn) = 1

and

↓E∗EFn (x1, . . . , xn) =

{0 if xi = 0 for all i ∈ [n];1 otherwise.

As for the languages LEG+ and LEG∗ , their minimal automata are E+EG = ({0, 1, 2}, Bool)

and E∗EG = ({0, 1}, Bool) with

↑E+EG

0 = 2;

↓E+EG

0 = 1;

↑E∗EG0 = 1;

↓E∗EG0 = 0,

and when n > 0,

↑E+EG

n (x1, . . . , xn) =

{0 if xi ∈ {0, 1} for all i ∈ [n];2 otherwise,

↓E+EG

n (x1, . . . , xn) =

{0 if xi ∈ {0, 1} for all i ∈ [n];1 otherwise,

2.4. APPLICATION 41

and

↑E∗EGn (x1, . . . , xn) =

{0 if xi = 0 for all i ∈ [n];1 otherwise,

↓E∗EGn (x1, . . . , xn) = 0.

It is easy to show that any quotient of the language LEF+ is in FTL({LEF+}): any languageof the form ζ−1(LEF+) where ζ is a proper Bool-context, is either TBool (when ζ has a non-root vertex labeled ↑n for some n), or LEF+ ∪{t ∈ TBool : Root(t) =↑n for some n} (whenall non-root vertices but x1 of ζ are labeled by ↓n for some n); these languages are clearlydefinable in FTL({LEF+}). Analogous facts hold also for the other languages.

Thus we have that the logics corresponding to the languages LEF+ , LEF∗ , LEG+ and LEG∗

are exactly the logics corresponding to the automata E+EF, E∗EF, E+

EG and E∗EG. Let usdenote these logics by CTL(EF+), CTL(EF∗), CTL(EG+) and CTL(EG∗), respectively.

Proposition 2.4.1 Let Y denote either F or G. Then a tree language is definable inCTL(EY+) if and only if its minimal automaton is in the connected Moore pseudovariety〈Dc

1∪{E+EY}〉M of finite connected tree automata. Similarly, a tree language is definable in

CTL(EY∗) if and only if its minimal automaton is in the connected Moore pseudovariety〈Dc

1 ∪ {E∗EY}〉M of finite connected tree automata.

In the following subsections, we give decidable characterizations of the connected Moorepseudovarieties 〈Dc

1 ∪ {E+EF}〉M and 〈Dc

1 ∪ {E∗EF}〉M , and hence of the logics CTL(EF+)and CTL(EF∗).

2.4.2 Some Moore properties of tree automata

When A is a Σ-tree automaton, let ¹A denote the accessibility relation of A, that is, a ¹A bholds for a, b ∈ A if and only if for some ΣA-polynomial context p we have pA(a) = b.Clearly, ¹A is a reflexive and transitive relation (a preorder). The relation ∼A over A isdefined by a ∼A b if and only if a ¹A b and b ¹A a hold; since ¹A is a preorder, ∼A is anequivalence relation. a ≺A b denotes a ¹A b ∧ b 6¹A a.

Before we continue with a deeper investigation of these relations, we need the followingauxiliary results:

Lemma 2.4.2 Let A = (A, Σ) be a finite tree automaton and Θ a congruence of A. Leta denote the congruence class a/Θ, and let B denote the factor automaton A/Θ. Leta, b ∈ A with a ∼B b. Then there exist a′, b′ ∈ A such that a′Θa, b′Θb and a′ ∼A b′.

2.4. APPLICATION 42

Similarly, if a ¹B b then there exists b′ ∈ A with b′Θb and a ¹A b′.

Proof. We only prove the first claim.

Suppose A, Θ, a and b satisfy the assumptions above. From a ¹B b there exists aΣB-polynomial context p1 with pB1 (a) = b. Similarly, from b ¹B a there exists a ΣB-polynomial context p2 with pB2 (b) = a. Let q1 be a ΣA-polynomial context such thath(q1) = p1 for the relabeling h induced by the map A → B, a 7→ a. Such a relabelingalways exists, since B is a homomorphic image of A. Let q2 be a ΣA-polynomial contextwith h(q2) = p2. Consider the following sequence a0, b0, a1, b1, . . . of states of A as follows:let a0 = a, bi = qA1 (ai) and ai+1 = qA2 (bi) for each i ≥ 0. Then for all i we have aiΘa andbiΘb.

From the definition of the sequence it is clear that aj ¹A ak for all j < k. Since A isfinite, there exist integers j < k such that aj = ak. For the states a′ = aj and b′ = bj, allthe required properties hold. ¥We state a corollary of Lemma 2.2.1:

Corollary 2.4.3 Suppose that C = (C, Σ) = A ×γ B is a cascade product of the treeautomata A = (A, Σ) and B = (B, ∆). Then for any (a, b) and (a′, b′) ∈ C, if (a, b) ¹C(a′, b′) then a ¹A a′ and b ¹B b′. Thus, if (a, b) ∼C (a′, b′) then a ∼A a′ and b ∼B b′.

Proof. Suppose (a, b) ¹C (a′, b′) holds. Then there exists a ΣC-polynomial context pwith pC((a, b)) = (a′, b′). By Lemma 2.2.1, there exists a ΣA-polynomial context p′ and a∆B-polynomial context p′′ (depending on p and a) such that p′A(a) = a′ and p′′B(b) = b′.Thus, a ¹A a′ and b ¹B b′ indeed hold. ¥A tree automaton A is called monotone if ¹A is a partial order (or equivalently, when∼A= ∆A).

It is known, c.f., e.g. [15], that any homomorphic image of a finite monotone tree au-tomaton is monotone. Moreover, as noted in [15], any cascade product of monotone treeautomata is monotone, so that finite monotone tree automata form a cascade pseudova-riety of finite tree automata.

We call a property P of finite tree automata a Moore property if the class of all finitetree automata having P forms a Moore pseudovariety of finite tree automata. Cascadeproperties are defined a similar way.

Corollary 2.4.4 Monotonicity is a cascade property.

Let Mon denote the class of all finite monotone tree automata. Then, Monc denotes

2.4. APPLICATION 43

the class of all finite monotone connected tree automata, which is a connected cascadepseudovariety.

Remark 2.4.5 Finite monotone word automata (corresponding to the case R = {0, 1}) have been studiedin detail in [9, 37], for example. They correspond to finite R-trivial monoids. In [37], finite monotoneautomata are called extensive. The equivalence of finite extensive automata and finite automata having anR-trivial monoid was extended to tree automata in [39]. Monotone tree automata were also investigatedin [23].

The second property we will study is that of maximal dependency.

Definition 2.4.6 We call a tree automaton A = (A, Σ) maximal dependent if for anyfunction symbol σ ∈ Σn and a1, . . . , an−1, an, a′n ∈ A with an ¹A ai and a′n ¹A aj for somei, j ∈ [n− 1], we have σA(a1, . . . , an−1, an) = σA(a1, . . . , an−1, a

′n).

Note that for unary symbols σ ∈ Σ1 this property is trivial, so that when R = {0, 1}, alltree automata are maximal dependent.

Proposition 2.4.7 Any homomorphic image of a finite maximal dependent tree automa-ton is also maximal dependent.

Proof. Let A = (A, Σ) be a finite maximal dependent tree automaton and Θ a congruenceof A. The congruence class a/Θ of a state a will be denoted by a. We have to prove thatthe factor automaton B = A/Θ is maximal dependent.

Now let σ ∈ Σn be a function symbol and a1, . . . , an−1, b, c states of B such that for someindices i, j ∈ [n−1] both b ¹B ai and c ¹B aj hold. By Lemma 2.4.2, there exist a′i, a

′j ∈ A

such that a′i = ai, a′j = aj, b ¹A a′i and c ¹A a′j. So from the congruence properties andthe maximal dependency of A we get:

σB(a1, a2, . . . , an−1, b) = σB(a1, . . . , ai−1, a′i, ai+1, . . . , an−1, b)

= σB(a1, . . . , ai−1, a′i, ai+1, . . . , an−1, a′i)

= σB(a1, . . . , ai−1, ai, ai+1, . . . , an−1, ai)

= σB(a1, . . . , ai−1, ai, ai+1, . . . , an−1, aj)

= σB(a1, . . . , aj−1, a′j, aj+1, . . . , an−1, a′j)

= σB(a1, . . . , aj−1, a′j, aj+1, . . . , an−1, c)

= σB(a1, . . . , aj−1, aj, aj+1, . . . , an−1, c).

(Note: we do not change ai and aj in one single step in order to handle the case i = jproperly.) So B = A/Θ is indeed maximal dependent. ¥

2.4. APPLICATION 44

Proposition 2.4.8 If A = (A, Σ) and B = (B, ∆) are maximal dependent tree automata,then any Moore product C = (C, Σ) = A×α B is also maximal dependent.

Proof. Let σ ∈ Σn, (a1, b1), . . . , (an−1, bn−1), (y1, y2), (z1, z2) ∈ C and let i, j ∈ [n− 1] beindices such that both (y1, y2) ¹C (ai, bi) and (z1, z2) ¹C (aj, bj) hold.

By Corollary 2.4.3, we have y1 ¹A ai, z1 ¹A aj, y2 ¹B bi and z2 ¹B bj. Leta = σA(a1, a2, . . . , an−1, y1). Since A is maximal dependent, we also have a =σA(a1, a2, . . . , an−1, z1).

Thus,

σC((a1, b1), . . . , (an−1, bn−1), (y1, y2))

=(a, α(a, σ)B(b1, b2, . . . , bn−1, y2)

)

=(a, α(a, σ)B(b1, b2, . . . , bn−1, z2)

)

= σC((a1, b1), . . . , (an−1, bn−1), (z1, z2)),

since B is maximal dependent.

So C is indeed maximal dependent. ¥

Corollary 2.4.9 Maximal dependency is a Moore property.

Let MaxDep denote the Moore pseudovariety of finite tree automata containing exactlythe finite maximal dependent tree automata. Then, MaxDepc denotes the connectedMoore pseudovariety of finite maximal dependent connected tree automata.

Definition 2.4.10 We call a tree automaton A = (A, Σ) component dependent if forany function symbol σ ∈ Σn and a1 ∼A a′1, . . . , an ∼A a′n ∈ A it holds that σA(a1, . . . , an) =σA(a′1, . . . , a

′n).

Note that in any component dependent automaton A the relation ∼A is a congruencerelation. However, this latter property is not a Moore property (not preserved undertaking Moore products); this is the reason why we have to define the stronger conceptof component dependency. Also note that any monotone tree automaton is triviallycomponent dependent, as well as any 1-definite tree automaton.

Proposition 2.4.11 Any homomorphic image of a finite component dependent tree au-tomaton is component dependent.

2.4. APPLICATION 45

Proof. Let A = (A, Σ) be a finite component dependent tree automaton, Θ a congruenceof A and let B denote the factor automaton A/Θ. For each a ∈ A, let a denote thecongruence class a/Θ. Let σ ∈ Σn be a function symbol and a1, . . . , an, b1, . . . , bn ∈ Asuch that ai ∼B bi for all i ∈ [n].

Then, by Lemma 2.4.2 there exist a′1, . . . , a′n, b′1, . . . , b

′n ∈ A such that a′iΘai, biΘb′i and

a′i ∼A b′i for all i ∈ [n]. Then we have

σB(a1, . . . , an) = σB(a′1, . . . , a′n)

= σB(b′1, . . . , b′n)

= σB(b1, . . . , bn).

¥

Proposition 2.4.12 Let A and B be component dependent tree automata and C = A×αBa Moore product. Then C is also component dependent.

Proof. Let σ ∈ Σn be a function symbol and (a1, b1), . . . , (an, bn), (a′1, b′1), . . . , (a

′n, b

′n) be

states of C such that (ai, bi) ∼C (a′i, b′i) for all i ∈ [n].

By Corollary 2.4.3 we know that ai ∼A a′i and bi ∼B b′i for all i ∈ [n]. Let δ denote thesymbol α(a, σ) where a = σA(a1, . . . , an). From the component dependency of A we knowthat a = σA(a′1, . . . , a

′n) also holds. Now we have the following:

σC((a1, b1), . . . , (an, bn)) = (a, δB(b1, . . . , bn))

= (a, δB(b′1, . . . , b′n))

= σC((a′1, b′1), . . . , (a

′n, b

′n)).

¥

Corollary 2.4.13 Component dependency is a Moore property.

Let CompDep denote the Moore pseudovariety containing exactly the finite componentdependent tree automata. Then, the class CompDepc of all finite component dependentconnected tree automata is a connected Moore pseudovariety.

The last property considered in this section is the following:

Definition 2.4.14 Call a tree automaton A = (A, Σ) componentwise unique if for anya, b ∈ A and proper ΣA-polynomial contexts p1, p2 such that Root(p1) = Root(p2), pA1 (a) =b and pA2 (b) = a, it holds that a = b.

2.4. APPLICATION 46

Proposition 2.4.15 Any homomorphic image of a finite componentwise unique tree au-tomaton is componentwise unique.

Proof. Let A = (A, Σ) be a finite componentwise unique tree automaton and Θ acongruence of A. We write a for a/Θ as before. Let B = (B, Σ) be the factor automatonA/Θ. Let a, b ∈ B and p1, p2 be proper ΣB-polynomial contexts such that Root(p1) =Root(p2), pB1 (a) = b and pB2 (b) = a.

Let q1 and q2 respectively be ΣA-polynomial contexts such that h(q1) = p1 and h(q2) = p2

for the relabeling h induced by the mapping A → B, a 7→ a. Such relabelings alwaysexist, moreover, Root(q1) = Root(p1) = Root(p2) = Root(q2) holds.

Consider the sequence a0, b0, a1, b1, . . . ∈ A of states such that a0 = a, bi = qA1 (ai) andai+1 = qA2 (bi) for each i ≥ 0. Clearly, ai = a and bi = b for all i ≥ 0. Since A isfinite, there exist integers 0 ≤ j < k with aj = ak. Thus, we have qA1 (aj) = bj and(q2(q1q2)

k−j−1)A(bj) = ak = aj.

Moreover Root(p1) = Root(p2(p1p2)k−j−1), since Root(p1) = Root(p2). From the compo-

nentwise uniqueness of A we have aj = bj, so a = aj = bj = b. ¥

Proposition 2.4.16 Any Moore product of two componentwise unique tree automata isalso componentwise unique.

Proof. Let A = (A, Σ) and B = (B, ∆) be componentwise unique tree automata andC = A ×α B a Moore product. Let (a1, b1), (a2, b2) ∈ C be two states of C and p1, p2

proper ΣC-polynomial contexts such that Root(p1) = Root(p2), pC1 ((a1, b1)) = (a2, b2)and pC2 ((a2, b2)) = (a1, b1).

Then there exist proper ΣA-polynomial contexts p′1 and p′2 with p′A1 (a1) = a2 and p′A2 (a2) =a1, moreover Root(p′1) = Root(p1) = Root(p2) = Root(p′2). Since A is componentwiseunique we have that a1 = a2. Let a denote a1 from now on.

Now consider the automaton B. From pC1 (a, b1) = (a, b2) we have that there exists a proper∆B-polynomial context p′′1 such that both p′′B1 (b1) = b2 and Root(p′′1) = α(a, Root(p1))hold. Also, since pC2 (a, b2) = (a, b1) we have that there exists a proper ∆B-polynomialcontext p′′2 with p′′B2 (b2) = b1 and Root(p′′2) = α(a, Root(p2)). Since Root(p1) = Root(p2)we have Root(p′′1) = Root(p′′2), and from the componentwise uniqueness of B it followsthat b1 = b2, so C is indeed componentwise unique. ¥

Corollary 2.4.17 Componentwise uniqueness is a Moore property.

Let CompUnique denote the Moore pseudovariety containing exactly the finite com-ponentwise unique tree automata. Also, CompUniquec denotes the corresponding con-nected Moore pseudovariety.

2.4. APPLICATION 47

The following relation holds between the properties we defined so far:

Proposition 2.4.18

CompDep ∩MaxDep ∩Com ⊆ CompUnique.

Consequently,

CompDepc ∩MaxDepc ∩Comc ⊆ CompUniquec.

Proof. Let A = (A, Σ) be a finite tree automaton that is component dependent, max-imal dependent and commutative. Suppose a, b ∈ A are states and p, q are proper ΣA-polynomial contexts such that pA(a) = b, qA(b) = a and Root(p) = Root(q) = σ ∈ Σn.We prove that a = b also holds in this case.

Write p = σ(p1, . . . , pn). There exists exactly one index i0 ∈ [n] such that pi0 is a ΣA-polynomial context. For each i ∈ [n], let ai denote the state pAi if i 6= i0, and let ai0 bethe state pAi0(a). We clearly have a ¹A ai0 ¹A b, moreover, ai ¹A b for each i ∈ [n]. Thus,since a ∼A b, we have ai0 ∼A a and ai ¹A ai0 for each i ∈ [n].

It follows now from commutativity and maximal dependency that

b = σA(a1, . . . , an) = σA(ai0 , . . . , ai0).

We have thus proved that there exists a′ ∈ A with a′ ∼A a and b = σA(a′, . . . , a′).Analogously, there exists a state b′ ∼A b with a = σA(b′, . . . , b′).

But since a′ ∼A a ∼A b ∼A b′ and A is component dependent, we have a = b. ¥

2.4.3 Characterizing 〈E+EF〉M

Recall the automaton E+EF defined on page 39. In this subsection, we characterize the

connected Moore pseudovariety 〈E+EF〉M by three easily verifiable conditions.

It can be checked easily that E+EF is a finite, monotone, commutative and maximal de-

pendent connected tree automaton, so by the results of Subsection 2.4.2,

〈E+EF〉M ⊆ Monc ∩Comc ∩MaxDepc.

We will show that the reverse inclusion is also true.

First we claim the following facts about commutative and maximal dependent tree au-tomata:

2.4. APPLICATION 48

Proposition 2.4.19 Let A = (A, Σ) be a commutative and maximal dependent treeautomaton. Let σ ∈ Σj+k be a function symbol, where j ≥ 1 and k > 0, and assume thata1, . . . , aj, b1, . . . , bk, c1, . . . , ck ∈ A such that for all i ∈ [k] there exist i′, i′′ ∈ [j] such thatbi ¹A ai′ and ci ¹A ai′′. Then σA(a1, . . . , aj, b1, . . . , bk) = σA(a1, . . . , aj, c1, . . . , ck).

This statement can be proved easily by a straightforward induction on k.

Proposition 2.4.20 Any commutative maximal dependent tree automaton is idempo-tent.

The proof of this statement is analogous to that of Proposition 2.4.22 below.

For a tree automaton A = (A, Σ), we define the function Values+A mapping Σ-trees to

finite subsets of A as follows. Given a Σ-tree t we define Values+A(t) to be the (finite) set

{sA : s is a proper subtree of t}.We prove a couple of facts concerning the function Values+

A .

Proposition 2.4.21 Let A = (A, Σ) be a monotone tree automaton and t = σ(t1, . . . , tn)a Σ-tree. Then for any maximal element a of Values+

A(t) (with respect to ¹A) there existsan index ia ∈ [n] such that tAia = a.

Proof. Let a be a maximal element of Values+A(t). From the definition of Values+

A(t) wehave that there exists a proper subtree s of t with sA = a. Since s is a proper subtree oft, there exists an integer ia ∈ [n] such that s is a subtree of tia . For this tia we clearlyhave a = sA ¹A tAia ∈ Values+

A(t).

Since a is a maximal element of Values+A(t), it follows that a = tAia completing the proof.

¥

Proposition 2.4.22 Let A = (A, Σ) be a monotone, commutative and maximal depen-dent tree automaton. Assume that s, t ∈ TΣ are Σ-trees such that Values+

A(s) = Values+A(t)

and Root(s) = Root(t). Then sA = tA.

Proof. Let t = σ(t1, . . . , tn) and s = σ(s1, . . . , sn) be two Σ-trees satisfying the assump-tions. Let {a1, . . . , ak} be the set of maximal elements of Values+

A(t) = Values+A(s) (this

set, as well as Values+A(t) itself, is finite). From Proposition 2.4.21 we have that for all

i ∈ [k] there exist i′, i′′ ∈ [n] such that tAi′ = sAi′′ = ai. Of course if i 6= j then i′ 6= j′ andi′′ 6= j′′. Let π and ν be permutations of [n] with tAπ(i) = sAν(i) = ai for all i ∈ [k]. Then, for

2.4. APPLICATION 49

any k < i ≤ n there exist indices i′, i′′ ∈ [k] with tAπ(i) ¹A ai′ and sAν(i) ¹A ai′′ . ApplyingProposition 2.4.19 we have

tA = σA(tA1 , . . . , tAn)

= σA(tAπ(1), tAπ(2), . . . , t

Aπ(n))

= σA(tAπ(1), . . . , tAπ(k), s

Aν(k+1), . . . , s

Aν(n))

= σA(sAν(1), . . . , sAν(n))

= σA(sA1 , . . . , sAn)

= sA.

¥

Remark 2.4.23 The implication

Values+A (s) = Values+A (t) ∧ Root(s) = Root(t) ⇒ sA = tA

appearing in Proposition 2.4.22 corresponds to the notion of “typeset dependency” of [5].

In the next couple of statements we connect the tree automaton E+EF and the functions

Values+A(t).

Definition 2.4.24 Let A = (A, Σ) be a tree automaton. We say that a tree automatonB = (B, Σ) is a Values+-automaton of A if there exists a mapping h : B → P (A) to thepower set P (A) of A such that for any tree t ∈ TΣ it holds that h(tB) = Values+

A(t).

Observe that h is uniquely determined on the connected part of B and is thus uniquewhenever B is connected. Thus, in this case we call h the canonical Values+-mappingfrom B to A.

We have the following:

Proposition 2.4.25 Let A be a finite connected tree automaton. There exists a finiteValues+-automaton of A in the connected Moore pseudovariety 〈A,E+

EF〉M .

Proof. Let A = (A, Σ) be a finite connected tree automaton with A = {a1, . . . , ak}. Foreach state a ∈ A define the connected Moore product B[a] = A×α[a] E+

EF, where

α[a](a′, σ) =

{ ↑n if a = a′;↓n otherwise

2.4. APPLICATION 50

for all a′ ∈ A and σ ∈ Σn, n ≥ 0. Then for any Σ-tree t we have tB[a] = (tA, e), wheree = 2 if and only if a ∈ Values+

A(t).

Now the connected direct product∏a∈A

B[a] is isomorphic to a tree automaton C = (C, Σ)

all of whose states are of the form (a, e1, . . . , ek) with a ∈ A and e1, . . . , ek ∈ {0, 1, 2},moreover, for any Σ-tree t, tC = (tA, e1, . . . , ek) for the integers e1, . . . , ek with ei = 2 ifand only if ai ∈ Values+

A(t). Now considering the function h : C → P (A) that is definedby h

((a, e1, . . . , ek)

)= {ai : i ∈ [k], ei = 2}, we get that C is a Values+-automaton of A.

¥When R contains an integer > 1, then any finite monotone tree automaton A = (A, Σ) hasa unique maximal element with respect to the partial order ¹A. Indeed, from finitenesswe get that at least one maximal element exists; and if a, b are both maximal elementsand if the arity of a symbol σ is at least two, then by a, b ¹A σA(a, b, a, . . . , a) we havea = b. However, when R = {0, 1}, there may be several maximal elements. In order tobe able to handle the two cases in a unified manner, we now prove:

Proposition 2.4.26 Assume that A = (A, Σ) is a finite monotone tree automaton. ThenA is a renaming of a monotone tree automaton A′ which has a unique maximal elementamax with respect to ¹A′.Moreover, if A is commutative, maximal dependent, stutter invariant or subdirectly irre-ducible, then so is A′.

Proof. Suppose that A = (A, Σ) is a finite monotone tree automaton. If it has more thanone maximal element, then we can add a new symbol σ to Σ of rank > 0, and define thecorresponding operation σA as a constant function with value a fixed maximal element ofA with respect to ¹A. The congruences of the new automaton A′ are exactly the sameas the congruences of A, so that A is subdirectly irreducible if and only if A′ is. It is alsostraightforward to check that commutativity, maximal dependency and stutter invarianceare also preserved. ¥

Proposition 2.4.27 Suppose A is a subdirectly irreducible finite monotone tree automa-ton with a unique maximal element amax. Then the set A− = A−{amax} also has a uniquemaximal element with respect to ¹A.

Proof. Assume that A has a unique maximal element amax. It is clear that for eachmaximal element a ∈ A−, the relation that collapses a and amax and keeps all other statesseparated is a congruence relation. Moreover, for different maximal elements a, a′ ∈ A−,the intersection of the two congruences is ∆A, showing that A is subdirectly reducible.

2.4. APPLICATION 51

Thus, if A is subdirectly irreducible, then there is a unique maximal element in A− withrespect to ¹A. ¥Suppose now that A = (A, Σ) is a subdirectly irreducible finite monotone tree automatonwhich has a unique maximal element amax. Then let a0 denote the unique maximal elementof A− = A− {amax}.Define A− to be the Σ-tree automaton (A−, Σ) with

σA−(a1, . . . , an) =

{σA(a1, . . . , an) if σA(a1, . . . , an) ∈ A−;a0 otherwise.

Proposition 2.4.28 A− is a quotient of A.

Proof. Map each a ∈ A− to a and amax to a0. ¥

Proposition 2.4.29 Under the above assumptions on the subdirectly irreducible finitemonotone tree automaton A = (A, Σ), if A is commutative, maximal dependent and con-nected then A is contained in the connected Moore pseudovariety 〈A−,E+

EF〉M .

Proof. From Proposition 2.4.25 we know that there exists a tree automaton B = (B, Σ)in 〈A−,E+

EF〉M that is a Values+-automaton of A−. Let h : B → P (A−) be the associatedcanonical Values+-mapping. Consider the connected Moore product C = B×αE+

EF, where

α(b, σ) =

↑n if there exists a Σ-tree t such that

Root(t) = σ, tA = amax and Values+A(t) = h(b);

↓n otherwise.

It is clear that for any Σ-tree t we have tC = (tB, e) for some e ∈ {0, 1, 2}.We claim that e > 0 if and only if tA = amax. We prove this claim by induction on theheight of t. Let t be the tree σ(t1, . . . , tn) (if t is a constant symbol, then n = 0).

Assume that tC = (tB, 0). From the definition of E+EF it has to be the case tCi = (tBi , 0) for

all i ∈ [n]; from the induction hypothesis it follows that tAi 6= amax for any i ∈ [n]. In thiscase we have that h(b) = Values+

A−(t) = Values+A(t), since if amax occurred in Values+

A(t),then for some index i ∈ [n] we would have tAi = amax. Since tC = (tB, 0), we also have thatα(tB, σ) =↓n. From the definition of α we get that there is no tree t′ such that each ofthe conditions Root(t′) = σ, t′A = amax and Values+

A(t′) = h(b) hold. Since the first andthe third condition both hold for t, it has to be the case tA 6= amax.

Now assume that tC = (tB, e) for some e ∈ {1, 2}. We have two cases.

2.4. APPLICATION 52

i) If there exists an index i ∈ [n] such that tCi = (tBi , e′) for some e′ ∈ {1, 2}, then bythe induction hypothesis we have tAi = amax. Since amax is the maximal element ofA, also tA = amax.

ii) If tCi = (tBi , 0) for all i ∈ [n], then it has to be the case α(tB, σ) =↑n. Moreover,by the induction hypothesis we have tAi 6= amax for any i ∈ [n]; from this it followsthat Values+

A(t) = Values+A−(t) (since amax cannot occur in Values+

A(t)). From thedefinition of α we have that there exists a tree t′ with Root(t′) = σ, t′A = amax andValues+

A(t′) = h(tB). But since Root(t) = σ and Values+A = h(tB), from Proposi-

tion 2.4.22 we get that tA = t′A = amax.

Finally, form the connected direct product A− × C. It is clear that whenever (a, (b, e))is a state of this automaton then there is a tree t with tA− = a and h(b) = Values+

A−(t).Mapping each (a, (b, 0)) to a and (a0, (b, 1)) and (a0, (b, 2)) to amax, we obtain a homo-morphism A− × C→ A. ¥As a corollary we get the main result of this subsection:

Theorem 2.4.30 The connected Moore pseudovariety 〈E+EF〉M contains exactly the finite

connected tree automata that are monotone, commutative and maximal dependent:

〈E+EF〉M = Monc ∩Comc ∩MaxDepc.

Proof. Let A = (A, Σ) be a finite, monotone, commutative and maximal dependentconnected tree automaton. We prove by induction on n = |A| that A is contained in〈E+

EF〉M .

When n = 1, A is a trivial tree automaton contained in any pseudovariety of finiteconnected tree automata.

Suppose that n > 0 and we have proved the claim for all i < n. We have two cases: eitherA is subdirectly reducible or not.

i) If A is subdirectly reducible, then A is isomorphic to a connected direct product∏i∈[k]

A/Θi for some finite family (Θi)i∈[k] of nontrivial congruences of A. Since each

A/Θi has less than n states, we get from the induction hypothesis that each A/Θi

is contained in 〈E+EF〉M , thus A is also contained in 〈E+

EF〉M .

ii) If A is subdirectly irreducible, then by Proposition 2.4.26 A is a connected renam-ing of some subdirectly irreducible, finite, monotone, commutative and maximaldependent connected tree automaton A0 having a unique maximal element amax.

2.4. APPLICATION 53

From Proposition 2.4.29 we get that A0 is contained in 〈A−0 ,E+EF〉M . From the in-

duction hypothesis, A−0 is contained in 〈E+EF〉M , thus A0 (hence also A) is contained

in 〈E+EF〉M , proving the statement.

¥

2.4.4 Characterizing 〈E∗EF〉MSince E∗EF (see page 39) is a quotient of E+

EF, it holds that 〈E∗EF〉M ⊆ 〈E+EF〉M . We will

prove that 〈E∗EF〉M is a proper subclass of 〈E+EF〉M characterized by one extra condition:

stutter invariance. Indeed, E∗EF is a monotone, commutative, maximal dependent andstutter invariant connected tree automaton, so that

〈E∗EF〉M ⊆ Monc ∩Comc ∩MaxDepc ∩ Stuc = 〈E+EF〉M ∩ Stuc.

In this subsection we will show that the reverse inclusion also holds. Our argumentrequires somewhat more work than in the case of 〈E+

EF〉M .

Let A = (A, Σ) be a tree automaton. We define the mapping Values∗A : TΣ → P (A)mapping Σ-trees to finite subsets of A as follows: Values∗A(t) = {sA : s is a subtree of t}.The notion of a Values∗-automaton is defined accordingly: a tree automaton B = (B, Σ)is a Values∗-automaton of A if there exists a mapping h : B → P (A) such that for any treet ∈ TΣ it holds that h(tB) = Values∗A(t). This mapping h is uniquely determined on theconnected part of B, thus when B is connected, we call h the canonical Values∗-mappingfrom B to A.

We have a result which is similar to Proposition 2.4.25:

Proposition 2.4.31 Let A be a finite connected tree automaton. Then there exists afinite Values∗-automaton of A in the connected Moore pseudovariety 〈A,E∗EF〉M .

Proof. Let A = (A, Σ) with A = {a1, . . . , ak}. For every a ∈ A we define the connectedMoore product B[a] = A×α[a] E∗EF as follows: for each a′ ∈ A and σ ∈ Σn let

α[a](a′, σ) =

{ ↑n if a′ = a;↓n otherwise.

It is easy to see that for any tree t we have tB[a] = (tA, e), where e = 1 if and only ifa ∈ Values∗A(t).

From this fact we can conclude that the connected direct product∏a∈A

B[a] is isomorphic

to a tree automaton C all of whose states are of the form (a, e1, . . . , ek) with a ∈ A,

2.4. APPLICATION 54

e1, . . . , ek ∈ {0, 1}, moreover, for any tree t we have tC = (tA, e1, . . . , ek) where ei = 1 ifand only if ai ∈ Values∗A(t).

Thus, C is a Values∗-automaton of A with the canonical Values∗-mapping (a, e1, . . . , ek) 7→{ai : i ∈ [k], ei = 1}. ¥We have the following property:

Proposition 2.4.32 Let A be a commutative, maximal dependent and stutter invarianttree automaton. Let σ ∈ Σn be a symbol and a1, . . . , an ∈ A be states such that an ∈ImgA(σ) and a1, . . . , an−1 ¹A an. Then σA(a1, . . . , an) = an.

Proof. Let b1, . . . , bn ∈ A be states with σA(b1, . . . , bn) = an. Note that in this caseai, bi ¹A an holds for all i ∈ [n]. From the definition of stutter invariance and applyingthe commutativity of A and Proposition 2.4.19 we get:

an = σA(b1, . . . , bn)

= σA(b1, . . . , bn−1, an)

= σA(a1, . . . , an−1, an).

¥We will introduce a decomposition method similar to the one in the previous subsection,but with more workaround. We define the following auxiliary automaton:

Definition 2.4.33 Let AAux be the (finite, connected) tree automaton ({0, 1, 2}, Γ),where Γn = {ln, sn, en, on} for all n ∈ R and the interpretation of the function symbols isthe following: for all x1, . . . , xn ∈ {0, 1, 2},

lAAuxn (x1, . . . , xn) = max

i∈[n]xi,

sAAuxn (x1, . . . , xn) =

{1 if xi < 2 for all i ∈ [n];2 otherwise,

eAAuxn (x1, . . . , xn) =

2 if either xi = 2 for some i ∈ [n]or xi = 0 for all i ∈ [n];

1 otherwise,

oAAuxn (x1, . . . , xn) = 2.

The function symbols l, s, e and o are the first letters of the words “less”, “set”, “equal”and “over”, respectively. Informally, the application of the operations corresponding tothese function symbols will have the meaning that the value of the currently evaluated

2.4. APPLICATION 55

tree is less than a specific value, set to this value, equal to this value and over this value,respectively. The difference between “set” and “equal” is that in the latter case we requirethat at least one of the immediate subtrees also has to evaluate to this specific value.

We first note that AAux is in the pseudovariety considered in this subsection:

Proposition 2.4.34 AAux is contained in the connected Moore pseudovariety 〈E∗EF〉M .

Proof. Let A = ({0, 1}, Γ) be the renaming of E∗EF given by the assignment lAn =

eAn =↓E∗EFn and oAn = sAn =↑E∗EF

n for each n ∈ R. Let us define the connected Moore productB = A×α E∗EF, where

α(a, σ) =

{ ↑n if either σ = on or both σ = en and a = 0;↓n otherwise

for all a ∈ {0, 1} and σ ∈ {ln, sn, en, on}, n ∈ R.

Then the following hold for all n ∈ R and x1, . . . , xn ∈ {0, 1} × {0, 1}:

lBn(x1, . . . , xn) =

(0, 0) if xi = (0, 0) for all i ∈ [n];(1, 0) if xi ∈ {(0, 0), (1, 0)} for all i ∈ [n]

and xi = (1, 0) for some i ∈ [n];(0, 1) or (1, 1) otherwise.

sBn(x1, . . . , xn) =

{(1, 0) if xi ∈ {(0, 0), (1, 0)} for all i ∈ [n];(1, 1) otherwise.

eBn(x1, . . . , xn) =

(1, 0) if xi ∈ {(0, 0), (1, 0)} for all i ∈ [n]and xi = (1, 0) for some i ∈ [n];

(0, 1) or (1, 1) otherwise.

oBn(x1, . . . , xn) = (1, 1).

Since the automaton AAux is a homomorphic image of B under the map (0, 0) 7→ 0,(1, 0) 7→ 1 and (0, 1), (1, 1) 7→ 2 our claim is proven. ¥We now use AAux for decomposing finite, monotone, commutative, maximal dependentand stutter invariant connected tree automata.

Lemma 2.4.35 Let A = (A, Σ) be a subdirectly irreducible, finite, monotone, commuta-tive, maximal dependent and stutter invariant connected tree automaton with the uniquemaximal element amax. Then A is contained in the connected Moore pseudovariety〈A−,E∗EF〉M .

2.4. APPLICATION 56

Proof. From Proposition 2.4.27 we get that A− = A−{amax} also has a unique maximalelement a0.

From Proposition 2.4.31 we have that there exists a Values∗-automaton B = (B, Σ) of A−in the pseudovariety 〈A−,E∗EF〉M . Let h : B → P (A−) be the canonical Values∗-mappingfrom B to A−.

Since A− is monotone, for any tree t it holds that tA−

is the unique maximal element ofValues∗A−(t). As a shorthand, when b ∈ B, we let b denote the unique maximal elementof the set h(b). Note that since B is connected, b is defined for each b ∈ B.

Let us define the connected Moore product C = B×α AAux, where

α(b, σ) =

ln if b 6= a0;

sn if b = a0, and there exists a tree t ∈ TΣ with tA = a0 suchthat both Values+

A(t) = h(b)− {a0} and Root(t) = σ hold;

on if b = a0 and no tree t ∈ TΣ exists with both tA = a0

and Root(t) = σ;en otherwise.

Note that the last case applies when b = a0 and there is a tree t ∈ TΣ with tA = a0 andRoot(t) = σ, but Values+

A(t) 6= h(b)− {a0} for any such tree t.

It is clear that for any tree t ∈ TΣ we have tC = (tB, e) for some e ∈ {0, 1, 2}. We claimthat e = 1 if and only if tA = a0, moreover, e = 2 if and only if tA = amax. We prove thisby induction on the height of t = σ(t1, . . . , tn). Let tCi = (tBi , ei) for all i ∈ [n].

Note also that if tA 6= amax, then Values∗A(t) = Values∗A−(t) = h(tB).

Assume tA = a0. It is clear that tAi ¹ a0 for all i ∈ [n]. We have two cases:

i) If tAi ≺ a0 for all i ∈ [n], then by the induction hypothesis ei = 0 for all i. Moreover,in this case Values+

A(t) = Values∗A(t)−{a0} = h(tB)−{a0}, Root(t) = σ and tB = a0,so e = sAAux

n (e1, . . . , en) = sAAuxn (0, . . . , 0) = 1.

ii) If there exists an integer i ∈ [n] such that tAi = a0, then α(tB, σ) is either sn or en

(depending on h(tB)). From the induction hypothesis we have that {e1, . . . , en} ={0, 1} or {e1, . . . , en} = {1}, thus, from the definition of AAux we get that e =sAAux

n (e1, . . . , en) = eAAuxn (e1, . . . , en) = 1 indeed holds.

Now assume tA = amax. We have three cases.

i) If tAi = amax for some i ∈ [n], then by the induction hypothesis ei = 2. Since AAux

is monotone, e = 2 indeed holds in this case.

2.4. APPLICATION 57

ii) If tAi ≺ amax for all i ∈ [n] and there exists an integer i ∈ [n] such that tAi = a0,then (since tAi ≺ amax is equivalent to tAi ¹ a0), by Proposition 2.4.32 we have thata0 /∈ ImgA(σ) (since otherwise we would have tA = a0). From this it follows thate = oAAux

n (e1, . . . , en) = 2.

iii) If tAi ≺ a0 for all i ∈ [n] then we have Values+A(t) = Values∗A(t) − {amax} =

Values∗A−(t) − {a0}. From Proposition 2.4.22 we get that there is no tree t′ withRoot(t′) = σ, t′A = a0 6= amax = tA and Values+

A(t′) = Values+A(t). It follows that

α(tB, σ) = en and by the induction hypothesis we have ei = 0 for all i ∈ [n]. Finallywe have e = eAAux

n (0, . . . , 0) = 2.

The last fact we have to show is that if tA /∈ {a0, amax} then e = 0. Assume thattA = a ≺ a0. Then tAi ≺ a0 for all i ∈ [n]. By the induction hypothesis we have ei = 0for all i ∈ [n]. Now from the definition of α we get e = lAAux

n (0, 0, . . . , 0) = 0 (since fromtA /∈ {a0, amax} we have tB = tA

− 6= a0).

From the above facts it follows that A is a homomorphic image of C under the functionthat maps each element (b, e) of C to b if e = 0, to a0 if e = 1, and to amax if e = 2. SinceC is in 〈A−,E∗EF〉M , the result follows. ¥From the above lemma we get the main result of this subsection as a consequence (whichcan be proved analogously to Theorem 2.4.30):

Theorem 2.4.36 The connected Moore pseudovariety 〈E∗EF〉M contains exactly the finiteconnected tree automata that are monotone, commutative, maximal dependent and stutterinvariant:

〈E∗EF〉M = Monc ∩Comc ∩MaxDepc ∩ Stuc = 〈E+EF〉M ∩ Stuc.

2.4.5 Adding D0

Our aim in this subsection is to provide characterizations of the connected Moorepseudovarieties 〈E+

EF,D0〉M = 〈E+EF〉M × Dc

1 and 〈E∗EF,D0〉M = 〈E∗EF〉M × Dc1. Since

both E+EF and E∗EF are contained in Monc but D0 is not, first we study the pseudovariety

Monc ×Dc1 of finite connected tree automata.

We make the following observation:

Proposition 2.4.37

Mon×D1 ⊆ CompDep ∩CompUnique.

2.4. APPLICATION 58

Proof. We know that monotone automata are both component dependent and compo-nentwise unique. It is clear that the same holds for 1-definite automata. ¥Our aim now is to show that we in fact have equality. In order to prove this, we introduceanother notion: we say that a tree automaton A = (A, Σ) has the disjoint images property,if for any pair of symbols σ1 6= σ2 ∈ Σ, the sets ImgA(σ1) and ImgA(σ2) are disjoint.

Recall the definition of the 1-definite automata of the form AAΣ (see page 30).

Lemma 2.4.38 Let A = (A, Σ) be a finite, component dependent and componentwiseunique connected tree automaton having the disjoint images property. Then there exists acongruence Θ of A such that the following both hold:

1. A/Θ is monotone;

2. A divides the direct product (A/Θ)× AAΣ.

Proof. Assume A = (A, Σ) is such a tree automaton. We claim that the relation ∼Asatisfies the required properties. Since A is component dependent, ∼A is a congruence.Since ∼A is a congruence, we clearly have by Lemma 2.4.2 that B = (B, Σ) = A/ ∼A ismonotone. So it remains to show that A is a divisor of the direct product C = B × AA

Σ.Let a denote the class a/∼A.Let (a, σ) be a state of C with a ∈ A and σ ∈ Σ. Then there exists at most onea′ ∈ A, a′ ∼A a such that a′ ∈ ImgA(σ). Indeed, suppose σA(a1, . . . , an) = a′ ∼A a andσA(b1, . . . , bn) = a′′ ∼A a. Then a′ ∼A a′′, thus there exists ΣA-polynomial contexts pand q with pA(a′) = a′′ and qA(a′′) = a′. If either p or q is x1, then we clearly havea′ = a′′. Suppose both p and q are proper. Then, from the disjoint images property andthat a′, a′′ ∈ ImgA(σ), Root(p) = Root(q) = σ holds, which implies a′ = a′′, since A iscomponentwise unique.

Let C′ be the subautomaton of C consisting of the states of the form (a, a), a ∈ A andof the form (a, σ) with a ∈ ImgA(σ) (it is easy to see that this set indeed determines asubautomaton of C). Then, a homomorphism C′ → A is given by the function whichmaps each state (a, a) to a and each state (a, σ) to the unique state a′ with a = a′ anda′ ∈ ImgA(σ). ¥From this we get the desired result:

Corollary 2.4.39

Mon×D1 = CompDep ∩CompUnique.

2.4. APPLICATION 59

Proof. Let A = (A, Σ) be a finite, component dependent and componentwise unique treeautomaton. Consider the direct product A×AΣ. It is still a finite, component dependentand componentwise unique tree automaton since AΣ also has these properties; moreover,it has the disjoint images property. So by Lemma 2.4.38 we have that A×AΣ is containedin the pseudovariety Mon×D1 of finite tree automata. Since A is a homomorphic imageof this automaton, the same holds for A. ¥Both of the aimed characterizations are consequences of the following theorem:

Theorem 2.4.40 Let V be a pseudovariety of finite tree automata such that D1 ⊆ V ⊆Mon×D1. Then (Mon ∩V)×D1 = V.

Proof. We have that

(Mon ∩V)×D1 ⊆ (Mon×D1) ∩ (V ×D1)

⊆ (Mon×D1) ∩V (since D1 ⊆ V)

⊆ V.

Let A = (A, Σ) ∈ V. From Lemma 2.4.38 we know that A divides some direct productB × AA

Σ, where B is a monotone quotient of A. From this it follows that B ∈ Mon ∩Vand thus A ∈ (Mon ∩V)×D1; so V ⊆ (Mon ∩V)×D1. ¥As consequences we get:

Corollary 2.4.41 The following equalities hold:

i) 〈E+EF,D0〉M = 〈E+

EF〉M ×Dc1 = CompDepc ∩Comc ∩MaxDepc;

ii) 〈E∗EF,D0〉M = 〈E∗EF〉M ×Dc1 = CompDepc ∩Comc ∩MaxDepc ∩ Stuc.

Proof. By Proposition 2.4.18, CompDepc ∩ Comc ∩MaxDepc = CompUniquec ∩CompDepc∩Comc∩MaxDepc. Applying Corollary 2.4.39 this further equals (Monc×Dc

1) ∩ Comc ∩ MaxDepc. Let Vc denote this pseudovariety of finite connected treeautomata. By Theorem 2.4.30 we have 〈E+

EF〉M = Monc ∩ Vc. Since we also haveDc

1 ⊆ Vc ⊆ Monc ×Dc1, thus by Theorem 2.4.40

〈E+EF,D0〉M = 〈E+

EF〉M ×Dc1

= (Monc ∩Vc)×Dc1

= Vc,

proving i). The proof of ii) is analogous. ¥From Theorem 2.3.3 we get the following alternative formulation:

2.4. APPLICATION 60

Corollary 2.4.42 The following hold for any tree language L:

i) L is in CTL(EF+) if and only if its minimal tree automaton AL is contained inCompDepc ∩Comc ∩MaxDepc.

ii) L is in CTL(EF∗) if and only if its minimal tree automaton AL is contained inCompDepc ∩Comc ∩MaxDepc ∩ Stuc.

Since membership in the above varieties is clearly decidable, it follows that it is decid-able for a given finite tree automaton A = (A, Σ) and a set F ⊆ A whether the regularlanguage L(A, F ) is in CTL(EF+), or in CTL(EF∗). In [19] we have shown polynomial-time decision procedures for the membership problems of each of the connected Moorepseudovarieties 〈E+

EF〉M , 〈E∗EF〉M , 〈E+EF,D0〉M and 〈E∗EF,D0〉M , which proves that the de-

finability problem of each of the fragments CTL(EF+) and CTL(EF∗) is decidable inpolynomial time, when the language L is given by its minimal tree automaton. For thefragment CTL(EF+) this was already shown in [5] using different methods.

In [56] (see also [34]), it was proved that in the case of word automata (which correspondsto the case when R = {0, 1}) it holds that a regular language L is definable in the logicCTL(EF+) if and only if it is definable in CTL(EF∗) and its minimal automaton is stutterinvariant. We note that for word languages, the logic CTL(EF∗) corresponds to TL[F],the fragment of linear temporal logic determined by the strict F modality, since in thatcase there is no branching and the path quantifiers E and A coincide. In the same way,CTL(EF∗) corresponds to TL[Fsf ], linear temporal logic equipped with only the non-strict(also called stutter-free) F-modality.

Corollary 2.4.42 extends this result to the case of regular languages over finite trees. Letus inspect the word case in more detail. For word languages the properties of commu-tativity and maximal dependency are trivial. Moreover, component dependency impliescomponentwise uniqueness. So in the word case the above definability theorem can bereformulated as follows: a word language L is definable in CTL(EF+) if and only if L isregular and its minimal automaton AL is component dependent; moreover, L is definablein CTL(EF∗) if and only if AL is component dependent and stutter invariant. This yieldsexactly the same characterization and decision procedure as the one described in [56],where component dependency is defined in terms of forbidden patterns in the labeledgraph of the minimal automaton.

We get yet another interesting fact from Theorem 2.4.30 for the classical case. Since bothmaximal dependency and commutativity are trivial properties, we have that 〈E+

EF〉M =Monc in the word case (and similarly, from Theorem 2.4.36 we get that 〈E∗EF〉M containsexactly the finite connected automata that are both monotone and stutter invariant).

2.5. EHRENFEUCHT-FRAISSE TYPE GAMES 61

2.5 Ehrenfeucht-Fraısse type games

In this section we define the so-called n-round L-game for any class L of tree languagesand number n ≥ 0 of rounds and show its correspondence to the logic FTL(L). The gameis played on two trees, between two players, Spoiler and Duplicator.

Let L be a class of tree languages, n ≥ 0 an integer, Σ a signature and let t0, t1 ∈ TΣ.The n-round L-game on (t0, t1) is played as follows.

1. If Root(t0) 6= Root(t1), Spoiler wins. Otherwise, Step 2 follows.

2. If n = 0, Duplicator wins. Otherwise, Step 3 follows.

3. Spoiler chooses a language L ∈ L over a signature ∆, an index i ∈ {0, 1}, a ∆-relabeling ti ∈ L of ti and a ∆-relabeling tj /∈ L of tj, where j = 1 − i is the otherindex. If he cannot do so, Duplicator wins. Otherwise, Step 4 follows.

4. Duplicator chooses two nodes, x and y of the pair (t0, t1) of trees with (t0, t1)(x) 6=(t0, t1)(y). If he cannot do so, Spoiler wins. Otherwise, an (n − 1)-round L-gameis played on the pair ((t0, t1)|x, (t0, t1)|y) of trees. Whoever wins the subgame, alsowins the game.

Clearly, for any class L of languages, number n ≥ 0 and trees (s, t), one of the playershas a winning strategy for the n-round L-game on (s, t). We say that the player havinga winning strategy wins the game. Let s ∼n

L t denote that Duplicator wins the n-roundL-game on (s, t).

We will show that the relations ≡nL and ∼n

L coincide. Recall that s ≡nL t if and only if the

trees s and t satisfy the same set of FTL(L)-formulas of depth at most n.

Proposition 2.5.1 For any class L of languages, integer n and trees s, t ∈ TΣ, if s ∼nL t

then s ≡nL t.

Proof. We argue by induction on n and contraposition. Let s, t be Σ-trees with s 6≡nL t.

If n = 0, then Root(s) 6= Root(t), thus Spoiler indeed wins the L-game on (s, t) in 0rounds.

Suppose that n > 0 and we have proved the claim for n− 1. Then, s 6≡nL t implies either

s 6≡n−1L t, or s and t can be separated by some complete and deterministic FTL(L)-formula

ϕ = L(δ 7→ ϕδ) of depth n.

If s 6≡n−1L t, we can apply the induction hypothesis and get that Spoiler wins the (n− 1)-

round L-game on (s, t), thus also wins the n-round L-game on these trees.

2.5. EHRENFEUCHT-FRAISSE TYPE GAMES 62

Suppose that s and t can be separated by the complete and deterministic FTL(L)-formulaϕ = L(δ 7→ ϕδ) of depth n, say s |= ϕ and t 6|= ϕ. Then let Spoiler choose the languageL and the relabelings s and t that are the characteristic trees of s and t, respectively,determined by the family (ϕδ)δ∈∆. From the semantics we get that s ∈ L and t /∈ Lindeed hold, thus this is a valid move. Now suppose Duplicator responds by choosing thenodes x and y of (s, t) such that δ = (s, t)(x) 6= (s, t)(y). Since the family (ϕδ)δ∈∆ iscomplete and deterministic, we have that ϕδ separates the trees (s, t)|x and (s, t)|y. Sincethe depth of this formula is at most n− 1, applying the induction hypothesis we get thatSpoiler wins the (n− 1)-round subgame, thus also the whole game. ¥

Proposition 2.5.2 For any class L of languages, integer n and trees s, t ∈ TΣ, if s ≡nL t,

then s ∼nL t.

Proof. We again argue by induction on n and contraposition. Let s, t be trees withs 6∼n

L t.

If n = 0, then Root(s) 6= Root(t), thus s 6≡0L t.

Suppose that n > 0 and we have proved the claim for n − 1. We have to consider twocases: either Spoiler already wins the (n − 1)-round game, or he chooses an L ∈ L andtwo relabelings of the trees in the first step when playing a winning strategy.

If Spoiler already wins the (n−1)-round L-game, then by the induction hypothesis s 6≡n−1L

t holds, which clearly implies s 6≡nL t.

Now without loss of generality, assume Spoiler chooses the tree language L ∈ L over ∆and the relabelings s ∈ L, t /∈ L of s and t, when playing his winning strategy. Then forany pair x, y of nodes of (s, t) with (s, t)(x) 6= (s, t)(y), Spoiler wins the (n − 1)-roundL-game on ((s, t)|x, (s, t)|y). Applying the induction hypothesis, we get that for any suchpair (x, y) there exists an FTL(L)-formula ϕx,y of depth at most n−1 with (s, t)|x |= ϕx,y

and (s, t)|y 6|= ϕx,y.

For each δ ∈ ∆, let us define the formula

ϕδ =∨

(bs,bt)(x)=δ

(bs,bt)(y)6=δ

ϕx,y,

where x and y range over the nodes of (s, t).

First, observe that,

(s, t)(z) = δ ⇒ (s, t)|z |= ϕδ

for any node z of (s, t) and symbol δ ∈ ∆. Thus, the family (ϕδ)δ∈∆ is complete over(s, t).

2.5. EHRENFEUCHT-FRAISSE TYPE GAMES 63

Also,

(s, t)|z |= ϕδ ⇒ (s, t)(z) = δ.

Indeed, suppose (s, t)(z) 6= δ and (s, t)|z |= ϕδ. Then there exists a node x with (s, t)(x) =δ such that (s, t)|z |=

∧(bs,bt)(y)6=δ

ϕx,y. Then (s, t)|z |= ϕx,z, which contradicts the definition

of the formula ϕx,z.

Thus the family (ϕδ)δ∈∆ is complete and deterministic over (s, t), moreover, s and t arethe characteristic trees of s and t, respectively, determined by the family (ϕδ)δ∈∆. Nowsince s ∈ L and t /∈ L, we conclude that the FTL(L)-formula L(δ 7→ ϕδ) of depth nseparates s and t, thus the statement is proven. ¥

Corollary 2.5.3 For any class L of tree languages and integer n ≥ 0, the relations ∼nL

and ≡nL coincide.

Corollary 2.5.4 The following are equivalent for any finite class L of tree languagesand any language L:

i) L is definable in FTL(L);

ii) there exists an integer n ≥ 0 such that Spoiler wins the n-round L-game on (s, t),whenever s ∈ L and t /∈ L.

Proof. Suppose L is a finite class of tree languages, L is a tree language and n ≥ 0 is aninteger such that Spoiler wins the n-round L-game on any pair (s, t) of trees with s ∈ Land t /∈ L.

Then for any such pair (s, t) of trees there exists an FTL(L)-formula ϕs,t such that s |= ϕs,t

and t 6|= ϕs,t. Each of these formulas is of depth at most n.

Since L is finite, by standard arguments from finite model theory, it follows that, up toequivalence, there exist only a finite number of formulas of depth at most n.

Thus, for any tree s ∈ L, the “infinitary conjunction”∧t/∈L

ϕs,t is equivalent to some

FTL(L)-formula ϕs of depth at most n. Also the “infinitary disjunction”∨

s∈L

ϕs is equiv-

alent to some formula ϕ; it is straightforward to see that Lϕ = L indeed holds, provingii) → i). The other direction is a direct consequence of Corollary 2.5.3. ¥

Chapter 3

Aperiodicity

In this chapter we define a hierarchy of aperiodicity notions for finite tree automata byconsidering n-tuples of proper trees in n variables and the semigroup of vector-valuedterm functions induced by them. We say that a finite tree automaton is n-aperiodic forsome integer n > 0 if the semigroup of all such term functions is aperiodic. Moreover,we say that a finite tree automaton is strongly aperiodic if it is n-aperiodic for each n.We show that n-aperiodic finite tree automata form a proper hierarchy, and the class of1-aperiodic finite tree automata is properly contained in the class of context aperiodicfinite tree automata, when the rank type R contains an integer greater than 1. We alsoshow that in this case the class of strongly aperiodic finite tree automata properly containsthe class of all finite definite tree automata. Moreover, we establish that each of theseclasses is a cascade pseudovariety of finite tree automata. We also study the complexity ofthe membership problem of these classes. In particular, we establish a P-time algorithmfor testing strong aperiodicity. We also provide an extension of the above aperiodicitynotions which is motivated by the Krohn-Rhodes decomposition theory [9] and study amodified version of aperiodicity obtained by taking polynomial functions instead of termfunctions. Finally, we relate aperiodicity to logic.

3.1 The notion of n-aperiodicity

For the balance of this section, we fix an arbitrary rank type R, containing at least onepositive integer. Let A = (A, Σ) be a tree automaton. Extending the notion of termfunctions, we let each m-tuple t = (t1, . . . , tm) of trees ti ∈ TΣ(Xn) induce a vector-valuedterm function tA = 〈tA1 , . . . , tAm〉 : An → Am, which is the target tupling of the m functionstAi : An → A, i ∈ [m]. When each tAi is proper, tA is also called proper. It is clear that foreach n ≥ 1, the proper term functions An → An form a semigroup, denoted Sn(A) which

3.1. THE NOTION OF N -APERIODICITY 65

is finite if A is a finite tree automaton. In this semigroup, product is function composition.We let C(A) denote the subsemigroup of S1(A) consisting of the term functions induced bythe proper contexts if this set is not empty. Otherwise we let C(A) be a trivial semigroup.

Proposition 3.1.1 When n ≤ m, Sn(A) divides Sm(A).

Proof. First note that since n ≤ m, we have TΣ(Xn) ⊆ TΣ(Xm). Consider the functionsf = 〈tA1 , . . . , tAm〉 ∈ Sm(A) such that for each i ∈ [n], ti is a proper tree in TΣ(Xm) notcontaining any occurrence of a variable xj with j > n. These functions form a subsemi-group T of Sm(A). Moreover, Sn(A) is a homomorphic image of T , one homomorphismbeing the map that takes any f of the above form to 〈tA1 , . . . , tAn〉, where now each ti isconsidered as a tree in TΣ(Xn) inducing a function An → A. ¥The following fact is clear:

Proposition 3.1.2 C(A) is a subsemigroup of S1(A). When R is either {1} or {0, 1},C(A) = S1(A).

Recall from [9] that a finite semigroup S is called aperiodic if it contains no nontrivialgroup, or equivalently, when there exists an integer k ≥ 1 such that sk = sk+1, for alls ∈ S.

Definition 3.1.3 We call a finite Σ-tree automaton A n-aperiodic for some n ≥ 1 ifthe semigroup Sn(A) is aperiodic. By extension, we call A strongly aperiodic if it isn-aperiodic for each n ≥ 1.

Definition 3.1.4 We call a finite Σ-tree automaton A context aperiodic if C(A) isaperiodic.

The notion of context aperiodicity was introduced by Thomas in [54] under the nameaperiodicity. In the classical case when R = {1} or R = {0, 1}, context aperiodicity and1-aperiodicity coincide with aperiodicity, or counter-freeness, see below.

Example 3.1.5 In case of semigroups, the signature contains a single binary symbol.Since there are no proper contexts, every finite semigroup is context aperiodic. We showthat a finite semigroup S is 1-aperiodic if and only if its exponent is 1 or 2. (Recall thatthe exponent of S is the least positive integer d such that sk = sk+d for all s ∈ S.)

Suppose first that S is a finite semigroup which is 1-aperiodic. For each integer k > 1,consider the proper tree xk

1 = x1 · (x1 · . . . · (x1 · x1) . . .) in the variable x1. Since S is

3.1. THE NOTION OF N -APERIODICITY 66

1-aperiodic, there exists some integer m such that the equation xkm+1

1 = xkm

1 holds in S.This implies that its exponent d is a divisor of km+1− km = km(k− 1). Thus, each primeappearing in the prime decomposition of d must divide k(k − 1). Since this holds for allk > 1, we conclude that d = 1 or d is a power of 2. But when k = 3, then d must divide3m · 2 for some m, so that the exponent is 1 or 2.

When the exponent is 1, S is aperiodic. It is then clear that S is 1-aperiodic. Assumethat the exponent is 2. Then there is an integer n such that sn+2 = sn for all s ∈ S.Consider any tree xk

1, where k ≥ 2. When km ≥ n, we have that skm+1= skm

for alls ∈ S. This means that xkm

1 and xkm+1

1 induce the same term functions. It follows that Sis 1-aperiodic.

Example 3.1.6 Recall that a semigroup S is nilpotent if there exist an element 0 ∈ Sand an integer n > 0 such that Sn = 0. It is clear that any finite nilpotent semigroup isstrongly aperiodic. We show that every finite 2-aperiodic semigroup S is nilpotent. Tothis end, first note that the exponent of S is 1 or 2 by the above argument. But if theexponent is 2, then there exist some s ∈ S and n > 0 such that sn = sn+2 but sn 6= sn+1.Now both sn and sn+1 are fixed points of the proper term function induced by x3

1. Thus,by Proposition 3.1.9 below, S is not 2-aperiodic. We conclude that the exponent of S is1, i.e., S is aperiodic, so that there exists n > 0 such that xn+1 = xn holds in S. Considernow the pair (x2

2, x21) of proper trees. Since S is 2-aperiodic, there exists some k such that

2k ≥ n and x2k

1 = x2k+1

2 holds in S. But since 2k ≥ n, x2k

1 = xn1 and x2k+1

2 = xn2 , so that

xn1 = xn

2 also holds. Now this implies that S has a single idempotent e and e = sn foreach s ∈ S. But then since xyn = xxn = xn and ynx = xn also hold, Se = eS = e. Sinceall long enough products over S have a factorization which contains an idempotent, itfollows that S is nilpotent.

Since any divisor of an aperiodic semigroup is aperiodic, from Propositions 3.1.1 and 3.1.2we have:

Proposition 3.1.7 Every 1-aperiodic finite tree automaton is context aperiodic, andwhen n ≤ m, every m-aperiodic tree automaton is n-aperiodic.

When A is a finite set and S is a semigroup of functions A → A (product in S isfunction composition), then the pair (A, S) is called a transformation semigroup, cf. [9].The (left) action of S on A is defined by sa := s(a), for each a ∈ A and s ∈ S. Atransformation semigroup (A, S) is called counter-free when there exists no s ∈ S whichinduces a nontrivial (cyclic) permutation of a subset of A. It is well-known that S isaperiodic if and only if (A, S) is counter-free. Note that for each n, (An, Sn(A)) is atransformation semigroup as is (A,C(A)).

3.1. THE NOTION OF N -APERIODICITY 67

Proposition 3.1.8 A finite Σ-tree automaton A is n-aperiodic if and only if (An, Sn(A))is counter-free. Moreover, it is context aperiodic if and only if (A,C(A)) is counter-free.

For later use we prove:

Proposition 3.1.9 For any integer n > 0, 2n-aperiodic finite tree automaton A andproper term function f : An → An it holds that f has at most one fixed point.

Proof. Let n > 0 be an integer, A a 2n-aperiodic finite Σ-tree automaton, t1, . . . , tn ∈TΣ(Xn) proper trees and (a1, . . . , an), (b1, . . . , bn) ∈ An two fixed points of f = 〈tA1 , . . . , tAn〉.We have to show that ai = bi for all i ∈ [n].

For any i ∈ [n] let si denote the tree that results from ti by replacing each occurrence ofxj by xn+j, for each j ∈ [n] (so we add n to the index of each variable). Now the properterm function

f ′ = 〈sA1 , . . . , sAn , tA1 , . . . , tAn〉 : A2n → A2n

satisfies both

f ′(a1, . . . , an, b1, . . . , bn) = (b1, . . . , bn, a1, . . . , an)

and

f ′(b1, . . . , bn, a1, . . . , an) = (a1, . . . , an, b1, . . . , bn).

Since A is 2n-aperiodic, (a1, . . . , an, b1, . . . , bn) = (b1, . . . , bn, a1, . . . , an), hence ai = bi forall i ∈ [n]. ¥

Proposition 3.1.10 Suppose A is a finite tree automaton which is not n-aperiodic forthe integer n > 0. Then there exists a proper term function f : An → An having at leasttwo different fixed points.

Proof. If A is not n-aperiodic, then there exist a proper term function f : An → An

and a subset B ⊆ An with k > 1 elements such that the restriction of f to B is a cyclicpermutation of B. But then each element of B is a fixed point of the proper term functionfk. ¥

Corollary 3.1.11 A finite tree automaton A is strongly aperiodic if and only if for eachn > 0, no proper term function An → An has two or more different fixed points.

Remark 3.1.12 We can show that a finite tree automaton A is strongly aperiodic if and only if noproper term function An → An has two or more different fixed points where n = |A|2.

3.2. THE GENERALIZED CASCADE PRODUCT 68

3.2 The generalized cascade product

Let A be a Σ-tree automaton, B a ∆-tree automaton and γ a family (γn)n∈R of functions,where for each n ∈ R, γn maps An × Σ to the set of all proper ∆Xn-trees. Then thegeneralized cascade product A×γ B is defined as the tree automaton on the set A×B ofstates such that for any σ ∈ Σn and (a1, b1), . . . , (an, bn) ∈ A×B,

σA×γB((a1, b1), . . . , (an, bn)) = (σA(a1, . . . , an), tB(b1, . . . , bn))

where t = γn(a1, . . . , an, σ).

Remark 3.2.1 When the range of each γn only contains trees of the form δ(x1, . . . , xn), where δ ∈ ∆n,we may view each γn as a function An×Σn → ∆n and thus A×γ B can be viewed as a cascade product.

Remark 3.2.2 The generalized cascade product can be defined in terms of the cascade product. Wesay that a tree automaton B′ is a derived automaton of a tree automaton B if B and B′ have the sameset of states and each basic operation of B′ is a proper term function of B. Any generalized cascadeproduct A×γ B of the finite tree automata A and B is clearly a cascade product A×αB′ for some derivedautomaton B′ of B and for some α.

Definition 3.2.3 We say that a nonempty class of finite tree automata is a generalizedcascade pseudovariety of finite tree automata if it is closed under taking subautomata,homomorphic images, renamings and the generalized cascade product.

Remark 3.2.4 A cascade pseudovariety of finite tree automata is a generalized cascade pseudovariety ifand only if it is closed under derived automata.

In the rest of this section we show that for each n > 0, the class of all n-aperiodic finitetree automata is a generalized cascade pseudovariety. Hence, the class of all stronglyaperiodic finite tree automata is also a generalized cascade pseudovariety.

We begin with the following lemma.

Lemma 3.2.5 Let n > 0 be an integer and A an n-aperiodic finite tree automaton. Thenany divisor of A is also n-aperiodic.

Proof. It is clear that taking subautomata preserves n-aperiodicity.

Let B = (B, Σ) be a homomorphic image of A under the mapping a 7→ a. Let t be ann-tuple of proper ΣXn-trees. Since A is n-aperiodic, there exists an integer N > 0 such

3.2. THE GENERALIZED CASCADE PRODUCT 69

that (tA)N = (tA)N+1. Hence, for any n-tuple of states a1, . . . , an ∈ B it holds that

(tB)N(a1, . . . , an) = (tA)N(a1, . . . , an)

= (tA)N+1(a1, . . . , an)

= (tB)N+1(a1, . . . , an),

showing that B is indeed n-aperiodic. ¥Before proving that the generalized cascade product also preserves n-aperiodicity, wemake the following observation, that is similar to Lemma 2.2.1:

Lemma 3.2.6 Let A be a Σ-tree automaton, B a ∆-tree automaton and C = A ×γ Ba generalized cascade product of A and B. Then for any integer n ≥ 0, proper treet ∈ TΣ(Xn) and states a1, . . . , an ∈ A there exists a proper tree s ∈ T∆(Xn) such that

tC((a1, b1), . . . , (an, bn)

)=

(tA(a1, . . . , an), sB(b1, . . . , bn)

)

for any (a1, b1), . . . , (an, bn) ∈ C.

Lemma 3.2.7 Let n > 0 be an integer, A an n-aperiodic finite Σ-tree automaton, B ann-aperiodic finite ∆-tree automaton, and C = A×γ B a generalized cascade product of Aand B. Then C is also n-aperiodic.

Proof. We know that there exist integers NA and NB such that fNA = fNA+1 andgNB = gNB+1 for all proper term functions f : An → An and g : Bn → Bn of A andB, respectively. We show that this implies that hNA+NB = hNA+NB+1 for all proper termfunctions h : (A×B)n → (A×B)n of C.

Let t = (t1, . . . , tn) be an n-tuple of proper ΣXn-trees. Let us denote by((a′1, b

′1), . . . , (a

′n, b′n)) the n-tuple (tC)NA((a1, b1), . . . , (an, bn)). Applying Lemma 3.2.6

to the trees (t1, . . . , tn) and the states a′1, . . . , a′n ∈ A we get that there exist proper

trees s1, . . . , sn ∈ T∆(Xn) such that for any (a′1, y1), . . . , (a′n, yn) ∈ C the value of

tC((a′1, y1), . . . , (a′n, yn)) can be written as

((tA1 (a′1, . . . , a

′n), sB1 (y1, . . . , yn)), . . . , (tAn(a′1, . . . , a

′n), sBn(y1, . . . , yn))

).

From the definition of a′1, . . . , a′n we get that tAi (a′1, . . . , a

′n) = a′i for all i ∈ [n], so

tC((a′1, y1), . . . , (a′n, yn)) =

((a′1, s

B1 (y1, . . . , yn)), . . . , (a′n, s

Bn(y1, . . . , yn))

).

Iterating this from (a′1, b′1), . . . , (a

′n, b

′n) it follows that for any k ≥ 0 we can write

(tC)k((a′1, b

′1), . . . , (a

′n, b

′n)

)as

((a′1, (s

B1 )k(b′1, . . . , b

′n)), . . . , (a′n, (s

Bn)k(b′1, . . . , b

′n))

).

3.3. STRICT CONTAINMENTS 70

But we know that (sBi )NB = (sBi )NB+1 holds for all i ∈ [n]. Summing up we get thefollowing equality:

(tC)NA+NB((a1, b1), . . . , (an, bn))

= (tC)NB((a′1, b′1), . . . , (a

′n, b′n))

=((a′1, (s

B1 )NB(b′1, . . . , b

′n)), . . . , (a′n, (s

Bn)NB(b′1, . . . , b

′n))

)

=((a′1, (s

B1 )NB+1(b′1, . . . , b

′n)), . . . , (a′n, (s

Bn)NB+1(b′1, . . . , b

′n))

)

= (tC)NB+1((a′1, b′1), . . . , (a

′n, b

′n))

= (tC)NA+NB+1((a1, b1), . . . , (an, bn)),

so C is indeed n-aperiodic. ¥For each n, let SApern denote the class of all n-aperiodic finite tree automata. Thus,SAper =

⋂n≥1

SApern is the class of all strongly aperiodic finite tree automata. Moreover,

let CAper denote the class of all context aperiodic finite tree automata. From the abovefacts we get the following:

Theorem 3.2.8 For any integer n > 0, SApern is a generalized cascade pseudovarietyof finite tree automata. Hence, SAper is also a generalized cascade pseudovariety.

In a similar way, we have:

Theorem 3.2.9 CAper is a cascade pseudovariety of finite tree automata.

Recall that D denotes the class of all finite definite tree automata.

Corollary 3.2.10

D ⊆ SAper.

Proof. It was shown in [12] that D is the least cascade pseudovariety of finite treeautomata containing D0. It is easy to check that D0 is strongly aperiodic. ¥

3.3 Strict containments

By Propositions 3.1.1, 3.1.2 and Corollary 3.2.10,

CAper ⊇ SAper1 ⊇ SAper2 ⊇ . . . ⊇ SAper ⊇ D (3.1)

3.3. STRICT CONTAINMENTS 71

is a decreasing chain. In this section we prove that when R contains an integer > 1, theneach of the containments in (3.1) is strict. But first we treat the case when R = {1} orR = {0, 1}. (Recall that in order to avoid trivial situations, we assume that the rank typecontains at least one positive integer.)

Proposition 3.3.1 When R = {1} or R = {0, 1}, it holds that

CAper = SAper1 ⊃ SAper2 = SAper = D.

Proof. So let R = {1} or R = {0, 1}. The first equality is clear. We also know thatSAper ⊇ D. If we can show that SAper2 ⊆ D, then it follows that SAper2 = SAper =D. Moreover, SAper1 ⊃ SAper2, since there exist counter-free finite automata whichare not definite. For instance, the tree automaton E+

EF (see page 39) is finite, counter-freeand not definite for any rank type.

To prove that SAper2 ⊆ D, suppose that A is not definite. When R = {1}, it is knownthat A has a proper term function having two or more different fixed points, cf. [9]. Thus,by Proposition 3.1.9, A is not 2-aperiodic. If 0 ∈ R the same reasoning applies, since ifA is not definite, then the automaton A′ obtained from A by removing the constants (sothat the rank type of A′ is {1}) is also not definite. ¥Thus, when R does not contain any integer > 1, then the hierarchy (3.1) collapses. In theremaining part of this section we will show that when R contains an integer > 1, thenthe hierarchy is proper.

Proposition 3.3.2 If R contains an integer n > 1 then SAper1 ⊂ CAper.

Proof. Let Σ contain the symbol σ of rank n > 1. Define the Σ-tree automaton A onthe set A = {0, 1, 2} of states as follows:

σA(x1, . . . , xn) =

0 if x1 = . . . = xn = 1;1 if x1 = . . . = xn = 0;2 otherwise.

Let the interpretation of any other symbol be a constant function. (We may add allconstant functions if Σ is large enough.) This tree automaton is not 1-aperiodic, since theproper term function A → A induced by the tree σ(x1, . . . , x1) maps 0 to 1 and 1 to 0.

However, A is context aperiodic: for any proper term function f : A → A induced by aproper context it holds that f 2 is a constant function, so that f 2 = f 3. ¥

Proposition 3.3.3 Suppose that R contains an integer > 1. Then for each n > 1 thereexists an (n− 1)-aperiodic finite tree automaton which is not n-aperiodic.

3.3. STRICT CONTAINMENTS 72

Proof. Given n, we will first prove the claim assuming that the rank type contains aninteger m ≥ n.

We are going to construct a tree automaton A on the set

{0, 1, . . . , n, 1′, . . . , n′}having at least the operations σAi : Am → A, i ∈ [n]. For each i ∈ [n], we define

σAi (1, . . . , n, . . . , n) = i′

σAi (1′, . . . , n′, . . . , n′) = i.

In all remaining cases, the operations σAi return 0. For each integer k ∈ R, k 6= m, wetake a single operation symbol in Σk and interpret it as the constant function Ak → Awith value 0. This defines the tree automaton A.

For each i ∈ [n], let si = σi(x1, . . . , xn, . . . , xn) ∈ TΣ(Xn). If f = 〈sA1 , . . . , sAn〉, thenf(1, . . . , n) = (1′, . . . , n′) and f(1′, . . . , n′) = (1, . . . , n), showing that A is not n-aperiodic.

To prove that A is (n−1)-aperiodic, consider any proper tree t ∈ TΣ(Xn−1). We show thattA : An−1 → A is constant with value 0. This is clearly true when an operation symboldifferent from one of the σi appears in t. Suppose now that all operations symbols appear-ing in t are in the set {σ1, . . . , σn}. Then t has a subtree of the form s = σi(xj1 , . . . , xjm).Since the first n variables xj1 , . . . , xjn cannot be all distinct, sA is the constant functionAn−1 → A with value 0. It follows now that tA is also this function.

We show how to modify the above construction when each integer in R is less than n. Letm denote the maximal integer in R, so that m > 1. Let k denote the least integer with1 + k(m− 1) ≥ n, so that k ≥ 2. We take symbols σi,1, . . . , σi,k of rank m, for all i ∈ [n].Consider the trees in TΣ(Xn),

si,1 = σi,1(x1, . . . , xm)

si,2 = σi,2(si,1, xm+1, . . . , xm+m−1)...

si,k−1 = σi,k−1(si,k−2, xm+(k−2)(m−1)+1, . . . , xm+(k−1)(m−1))

si,k = σi,k(si,k−1, xm+(k−1)m+1, . . . , xn, . . . , xn)

Let si = si,k, i ∈ [n]. Now define the interpretation of the σi,j so that

sAi (1, . . . , n) = i′

sAi (1′, . . . , n′) = i,

for all i, moreover, for each i and j < k,

sAi,j(1, . . . , n) and sAi,j(1′, . . . , n′)

3.4. DECIDABILITY AND COMPLEXITY 73

are new elements. The set A is the union of the set {0, 1, . . . , n, 1′, . . . , n′} with these newelements. In all other cases, the operations σi,j return 0. As before, for all p 6= m, we takea single operation symbol in Σp whose interpretation is a constant function with value 0.We omit the formal verification of the correctness of this construction. ¥

Proposition 3.3.4 If R contains an integer k > 1, then D ⊂ SAper.

Proof. Let Σ be a signature of rank type R and σ ∈ Σk a function symbol with k > 1.Define the Σ-tree automaton A as follows. Let A = {0, 1, 2} and

σA(a1, . . . , ak) =

{1 if 0 ∈ {a1, . . . , ak} ⊆ {0, 1};2 otherwise,

for all a1, . . . , ak ∈ A. All other symbols in Σ are interpreted as a constant function withvalue 2.

It is clear that for any proper tree t ∈ TΣ(Xn), tA(a1, . . . , an) ∈ {1, 2} holds; moreover, ifa1, . . . , an ∈ {1, 2}, then tA(a1, . . . , an) = 2. It follows that for any proper term functionf : An → An, each component of f 2 is a constant function with value 2.

We show that A is not definite. Consider the following sequences pi, qi of ΣA-polynomial symbols: p0 = σ(0, . . . , 0), pn+1 = σ(0, . . . , 0, pn) and q0 = σ(1, . . . , 1),qn+1 = σ(0, . . . , 0, qn). It is easy to check that pAn = 1 and qAn = 2 holds for any in-teger n ≥ 0, hence—since the polynomial symbols pn and qn agree up to depth n—A isnot definite. ¥

3.4 Decidability and complexity

Since for any finite Σ-tree automaton A and for any n ≥ 1, Sn(A) is finite and effectivelyconstructible, it is clear that there exists an algorithm to decide, given a finite Σ-treeautomaton A and an integer n, whether A is n-aperiodic. Also, context aperiodicity isdecidable. Strong aperiodicity of a finite tree automaton is not immediately decidable,since the definition of strong aperiodicity involves a condition for each n. (However, seeRemark 3.1.12.)

In this section, we show that strong aperiodicity is decidable in polynomial time. On theother hand, it is known that deciding aperiodicity of classical automata (the case whenR = {1}) is PSPACE-complete, cf. [4, 7]. We use this fact to show that for any fixed n,the membership problem of the class SApern is PSPACE-hard.

Let A be a finite Σ-tree automaton and consider the direct product A×A of A with itself.Let B ⊆ A × A a set of state pairs. We denote by [B] the following set containing state

3.4. DECIDABILITY AND COMPLEXITY 74

pairs:

{tA×A((a1, b1), . . . , (an, bn))

: n ≥ 0, t ∈ TΣ(Xn) proper, (ai, bi) ∈ B}.

Note that for any A and B ⊆ A×A, the set [B] is computable in time polynomial in |A|,the size of A defined as n +

∑i∈R sin

i, where n = |A| and si = |Σi|, for all i ∈ R. Wemake the following observation:

Lemma 3.4.1 The following are equivalent for any finite Σ-tree automaton A:

i) There exist an integer n and a proper term function f : An → An of A with at leasttwo different fixed points.

ii) There exist an integer n and a proper term function f : (A×A)n → (A×A)n of thedirect product A×A such that f has a fixed point of the form

((a1, b1), . . . , (an, bn)

)with ai 6= bi for some i ∈ [n].

Proposition 3.4.2 The following are equivalent for any finite Σ-tree automaton A:

i) A is not strongly aperiodic;

ii) there exist an integer n > 0 and proper trees t1, . . . , tn ∈ TΣ(Xn) such that(t1, . . . , tn)A has at least two different fixed points;

iii) there exist a set S ⊆ A× A and states a 6= b ∈ A such that (a, b) ∈ S ⊆ [S];

iv) the mapping P (A × A) → P (A × A) defined by B 7→ [B] ∩ B has a fixed point Swhich contains a pair (a, b) with a 6= b;

v) the greatest fixed point of the mapping B 7→ [B] ∩ B contains some pair (a, b) witha 6= b.

Proof. i) → ii). We have already proved this (Corollary 3.1.11).

ii) → iii). Let n > 0 be an integer, t1, . . . , tn ∈ TΣ(Xn) proper trees and (a1, . . . , an) 6=(b1, . . . , bn) different state tuples such that both (a1, . . . , an) and (b1, . . . , bn) are fixedpoints of (t1, . . . , tn)A. Then

((a1, b1), . . . , (an, bn)

)is a fixed point of (t1, . . . , tn)A×A.

Hence, choosing S = {(ai, bi) : i ∈ [n]} we get that S ⊆ [S], and since (a1, . . . , an) 6=(b1, . . . , bn), there exists a state pair (ai, bi) ∈ S with ai 6= bi.

iii) → iv). This is a simple reformulation.

3.4. DECIDABILITY AND COMPLEXITY 75

iv)→ v). The mapping B 7→ [B]∩B is monotone, so it has a greatest fixed point. Clearly,if some fixed point contains an element (a, b) with a 6= b, then the greatest fixed pointalso contains this element.

v) → i). Suppose S = {(a1, b1), . . . , (an, bn)} is the greatest fixed point. Since S is a fixedpoint, S = [S] ∩ S. Moreover, by assumption, ai 6= bi holds for some i ∈ [n]. It follows(from the definition of [S]) that there exist proper trees t1, . . . , tn ∈ TΣ(Xn) such that((a1, b1), . . . , (an, bn)

)is a fixed point of (t1, . . . , tn)A×A. Now we can apply Lemma 3.4.1

and Corollary 3.1.11 and get the result. ¥

Theorem 3.4.3 It is decidable in polynomial time whether a given finite tree automatonA is strongly aperiodic.

Proof. The condition v) of Proposition 3.4.2 is clearly decidable in polynomial time:we have to compute F n2

(A × A), where F : P (A × A) → P (A × A) is defined byF (B) = [B] ∩ B and n is |A|, and check whether the resulting set contains an orderedpair whose components are different.

Since F is computable by a polynomial time procedure, its iteration for n2 steps runs inpolynomial time. ¥It is clear that for any fixed n, testing whether a tree automaton is in SApern canbe done in exponential time, since there are exponentially many proper term functionsAn → An (in terms of |A|), which can be even enumerated in exponential time; alsochecking whether fk = fk+1 holds for some k ≥ 1 can also be done in exponential time.The following proposition establishes a PSPACE lower bound.

Proposition 3.4.4 For each fixed n, it is PSPACE-hard to decide, given a finite treeautomaton A, whether A is n-aperiodic.

Proof. Consider an ordinary automaton, i.e., a Σ-tree automaton A, where Σ is of ranktype {1}. We construct a ∆-tree automaton B, for some ∆, which is n-aperiodic if andonly if A is aperiodic. We define B = {0} ∪ {(a, j) : a ∈ A, j ∈ [n]} so that B has|A| × n + 1 states. Then let ∆ = ∆n = {(σ, i) : σ ∈ Σ, i ∈ [n]}. The operations (σ, i)A

are defined as follows. Suppose that σA(a) = b, for some a, b ∈ A and σ ∈ Σ. Then welet (σ, i)A((a, 1), . . . , (a, n)) = (b, i). In all remaining cases, the operation returns 0. Foreach ΣXn-tree t, define t = (t1, . . . , tn) ∈ T∆(Xn)n as follows. If t = x1 then ti = xi,for each i. If t = σ(s), then ti = (σ, i)(s), for each i. Now if tA(a) = b, then tB(a) = b,where a = ((a, 1), . . . , (a, n)) and b is defined in the same way. It follows that if A is notaperiodic, then B is not n-aperiodic.

3.5. APERIODICITY AND LOGIC 76

We still have to show that if B is not n-aperiodic then A is not aperiodic either. For thisreason, we define the paths in a tree t ∈ T∆(Xn) as follows. If t = xi then paths(t) ={x1}. If t = (σ, i)(t1, . . . , tn) then paths(t) = {σ(s) : s ∈ ⋃n

j=1 paths(tj)}. Note thatpaths(t) ⊆ TΣ(X1).

Now assume that B is not n-aperiodic, so that there exist some q1, . . . , qk ∈ Bn, k > 1, a

vector t = (t1, . . . , tn) ∈ T∆(Xn)n of proper trees such that tB(qi) = qi+1, for all i ∈ [k− 1]

and tB(qk) = q1. Now each ti contains a subtree of the form (σ, j)(xk1 , . . . , xkn). However,

the variables xk1 , . . . , xkn must be all distinct, since otherwise tBi would be constant withvalue 0. Also, the components of each qi must also be all distinct, moreover, the compo-nents of each qj must give a permutation of the states (a, 1), . . . , (a, n) for some a ∈ A,

since otherwise we would have tBi (qj) = 0. Also, if (σ, j)(s1, . . . , sn) is any subtree of some

component of t, then for any qi there must exist a state a ∈ A such that sB1 (qi), . . . , sBn(qi)

is the sequence (a, 1), . . . , (a, n). It then follows that there is a permutation π such thatfor each qi there is some state ai ∈ A with qi = ((ai, π(1)), . . . , (ai, π(n)). Of course, thestates ai are all distinct. Thus, if we take any tree s ∈ paths(tj), for any j, then we havesA(ai) = ai+1 for all i ∈ [k−1] and sA(ak) = a1. This shows that A is not aperiodic. ¥

3.5 Aperiodicity and logic

In this section we relate the above aperiodicity notions to formal logic. We establish thefollowing facts for tree languages over signatures of rank type R = {0, 2}.

1. If a tree language is in CTL, then its minimal tree automaton is in SAper1.

2. There exists a tree language in CTL whose minimal automaton is not in SAper2.

3. There exists a tree language definable in FO(<) which is not 1-aperiodic.

4. There exists a 1-aperiodic tree language which is not definable in FO(<,Si).

The above results can all be extended to rank types containing 0 and at least one integer> 1.

In the rest of this section we fix R = {0, 2}.

Proposition 3.5.1 If L is a tree language in CTL, then the minimal automaton of Lis in SAper1.

3.5. APERIODICITY AND LOGIC 77

Proof. It was shown in [14, 15] that a tree language is in CTL if and only if itsminimal tree automaton is in the least cascade pseudovariety of finite tree automatacontaining the tree automaton over the two-element set {0, 1} equipped with the binaryor function and the two constants 0, 1. Our claim thus follows from the facts that thistree automaton is 1-aperiodic and that 1-aperiodic finite tree automata form a generalizedcascade pseudovariety of finite tree automata, cf. Theorem 3.2.8. ¥

Proposition 3.5.2 There exists a tree language in CTL(EF∗) whose minimal tree au-tomaton is not in SAper2.

Proof. Recall the tree automaton E∗EF. In this automaton, the identity function is aproper term function (induced by the proper tree ↓2 (x1, x1)) having two fixed points.Thus E∗EF 6∈ SAper2. ¥

Proposition 3.5.3 There exists a (regular) tree language in FO(<) whose minimal treeautomaton is not 1-aperiodic.

Proof. Let us define the signature Σ with Σ2 = {σ, ν1, ν2} and Σ0 = {c}. We constructa regular tree language L ⊆ TΣ in FO(<) whose minimal automaton is not 1-aperiodic.Let L be the following language:

L = {t ∈ TΣ : AllPaths(t) ∩ (σν1σν2)∗c 6= ∅}.

Here, AllPaths(t) is the set of all words which are label sequences of maximal paths in t,i.e.

AllPaths(t) =

{t if t ∈ Σ0;⋃i=1,2

{σ′ · v : v ∈ AllPaths(ti)} if t = σ′(t1, t2).

Now L is definable in FO(<): a tree t ∈ TΣ belongs to L if and only if there exists avertex v such that the following hold:

1. the label of v is c (hence v is a leaf);

2. if y is a successor of x and y < v then x is labeled σ if and only if y is labeled in{ν1, ν2}, and x is labeled in {ν1, ν2} if and only if y is labeled σ;

3. if y is a second successor (“grandchild”) of x and y < v then x is labeled ν1 if andonly if y is labeled ν2, and x is labeled ν2 if and only if y is labeled ν1;

3.6. A GENERALIZATION 78

4. the root is labeled in {σ, c};5. if v is a successor of x then x is labeled ν2.

It is clear that all these conditions are expressible in FO(<). Now consider the followinginfinite sequence of trees ti: t0 = c, and for all i ≥ 0, ti+1 = σ(ν1(ti, ti), ν2(ti, ti)). It is clearthat ti ∈ L if and only if i is even. Thus, the minimal automaton of L is not 1-aperiodic,since for the term function f : A → A induced by the proper tree σ(ν1(x1, x1), ν2(x1, x1))we have f i(cA) = cA if and only if i is even. ¥

Proposition 3.5.4 There exists a regular tree language not contained in FO(<,S1, S2)whose minimal automaton is 1-aperiodic.

Proof. Let Σ0 = {0,1}, Σ2 = {∧,∨}, and let us define the following tree automaton Aon A = {0, 1,⊥} that was introduced in [40]: 0A = 0, 1A = 1 and

∧A(x, y) =

1 if x = y = 1;0 if {x, y} = {0, 1};⊥ otherwise,

∨A (x, y) =

0 if x = y = 0;1 if {x, y} = {0, 1};⊥ otherwise.

Let L = {t ∈ TΣ : tA = 1}. It has been shown in [40] that L is not contained inFO(<,S1, S2). It is easy to check that A is 1-aperiodic. We note that A is not 2-aperiodic, since both 1 and ⊥ are fixed points of the term function A → A induced by∧(x1, x1). ¥

3.6 A generalization

In this section, we provide a generalization of the aperiodicity notions studied above. Thefollowing definition is motivated by the Krohn-Rhodes decomposition theorem [9].

Definition 3.6.1 Suppose that G is a class of finite simple groups closed under division.We say that a finite tree automaton A belongs to the class Aut(G, n) for some positiveinteger n exactly when each simple group dividing Sn(A) is in G. The intersection of allclasses Aut(G, n) is Aut(G). Moreover, we let Autc(G) denote the class of all finite treeautomata A such that every simple group divisor of C(A) is in G.

When G contains only the trivial groups, then the above classes are just SApern, SAperand CAper, respectively. The following generalization of Theorems 3.2.8 and 3.2.9 holds.

3.7. APERIODICITY FOR POLYNOMIALS 79

Theorem 3.6.2 For each n, Aut(G, n) is a generalized cascade pseudovariety of finitetree automata, as is Aut(G). The class Autc(G) is a cascade pseudovariety of finite treeautomata.

We omit the proof which is based on the following facts. For the definition of the wreathproduct of transformation semigroups we refer to [9].

Lemma 3.6.3 Suppose that A and B are Σ-tree automata such that A is a subautoma-ton or a homomorphic image of B. Then for each n, (An, Sn(A)) divides (Bn, Sn(B)).Similarly, (A,C(A)) divides (B, C(B)).

Lemma 3.6.4 Suppose that A is a Σ-tree automaton, B is a ∆-tree automaton and con-sider a generalized cascade product A ×α B. Then for each n, ((A × B)n, Sn(A ×α B))divides a wreath product of (An, Sn(A)) and (Bn, Sn(B)).

3.7 Aperiodicity for polynomials

In this section we study a variant of the aperiodicity notions resulting by considering poly-nomial functions instead of term functions. We will show that in this case the hierarchycollapses at n = 2.

Let A be a Σ-tree automaton of rank type R over the set A. For any n ≥ 0 and m > 0,we let each m-tuple p = (p1, . . . , pm) of ΣAXn-polynomial symbols induce a vector-valued

polynomial function pA = 〈pA1 , . . . , pAm〉 : An → Am, which is the target tupling of the m

functions pAi : An → A, i ∈ [m]. When each pi is proper, pA is also called proper. For

each n ≥ 1, let S(p)n (A) denote the semigroup of proper polynomial functions An → An

and let C(p)(A) denote the semigroup of proper translations of A.

For each n, we let SAper(p)n denote the class of all finite tree automata A such that

S(p)n (A) is an aperiodic semigroup. We define the classes SAper(p) and CAper(p) in the

same way.

The following was proved in [12], Corollary 3.12.

Lemma 3.7.1 The following are equivalent for any finite Σ-tree automaton A:

i) A is definite;

ii) any proper translation of A has at most one fixed point.

3.7. APERIODICITY FOR POLYNOMIALS 80

Theorem 3.7.2 The following are equivalent for any finite Σ-tree automaton A:

i) A is definite;

ii) A ∈ SAper(p);

iii) A ∈ SAper(p)2 ;

iv) Each proper translation of A has at most one fixed point.

Proof. The first and last conditions are equivalent by Lemma 3.7.1, and the first conditionimplies the second by Corollary 3.2.10. It is clear that the second condition implies thethird. Finally, the third implies the fourth by Proposition 3.1.9. ¥

Corollary 3.7.3 It is decidable in polynomial time whether a finite tree automaton isin SAper(p).

Proof. A polynomial time algorithm is implicit in [12]. ¥

Proposition 3.7.4

D = SAper(p) = SAper(p)2 ⊂ SAper

(p)1 ⊂ CAper(p).

Proof. The inclusions are clear. The second inclusion is strict by the proof of Propo-sition 3.3.2. The first is strict since the tree automaton on {0, 1} with the binary or

function as the single operation is in SAper(p)1 \D. ¥

Proposition 3.7.5 Suppose the rank type R contains an integer > 1. Then for each nthere exist finite tree automata A and B such that both A and B are (n − 1)-aperiodic,

neither of them is n-aperiodic, moreover, A is contained in SAper(p)1 and B is not.

Proof. First we deal with the case when R contains an integer k ≥ n.

Consider the tree automaton A constructed in the proof of Proposition 3.3.3. We haveproved that A is (n − 1)-aperiodic and not n-aperiodic. It is easy to see that for everynon-constant term function f : A → A of A(p) there exists at most one state a withf(a) 6= 0, moreover, this state a is different from 0. From this we can conclude that

f 2 = f 3 holds for any such function. Thus, A is contained in SAper(p)1 .

3.7. APERIODICITY FOR POLYNOMIALS 81

Now we construct the tree automaton B by modifying the construction of A as follows.The state set of B is B = {0, . . . , n} ∪ {1′}. For each i ∈ [n], we define σBi as follows:

σBi (1, . . . , n, . . . , n) = σBi (1′, 2, . . . , n, . . . , n) = i if i > 1;

σB1 (1, . . . , n, . . . , n) = 1′ and σB1 (1′, 2, . . . , n, . . . , n) = 1.

In all remaining cases the functions σBi return 0, and all other function symbols areinterpreted as a constant function with value 0.

Now by the same argument as in the proof or Proposition 3.3.3 we get that B is(n − 1)-aperiodic but not n-aperiodic. Also, since for the ΣBX1-polynomial symbol

p = σ1(x1, 2, . . . , n) we have pB(1) = 1′ and pB(1′) = 1, B is not contained in SAper(p)1 .

If R contains only integers less than n, then we can modify B as in the proof of Proposi-tion 3.3.3. ¥

Proposition 3.7.6 Suppose R contains some integer k > 1. Then there exists an au-tomaton A which is strongly aperiodic, and is not contained in SAper

(p)1 .

Proof. We define the following Σ-tree automaton A, where Σi = {σi} for each i ∈ R andA = {0, 1, 2}. For each i ∈ R with i 6= k, let σAi be the constant function with value 2and let us define σAk as follows:

σAk (a1, . . . , ak) =

{1 if {a1, . . . , ak} = {0, 2};2 otherwise.

Now it is easy to see that for any n ≥ 1 and tree t ∈ TΣ(Xn) it holds that tA(a1, . . . , an) ∈{1, 2} for any a1, . . . , an ∈ A. Moreover, if each ai is 1 or 2, then tA(a1, . . . , an) = 2.It follows that for any tuple of trees t = (t1, . . . , tn) ∈ (

TΣ(Xn))n

, (tA)2 is a constantfunction, hence A is strongly aperiodic.

However, since the function induced by σk(0, . . . , 0, x1) maps 1 to 2 and 2 to 1, A is not

contained in SAper(p)1 . ¥

Corollary 3.7.7 As shown in Figure 3.1, the class SAper(p)1 nontrivially intersects

SAper and each member of the hierarchy SApern for n ≥ 2.

3.7. APERIODICITY FOR POLYNOMIALS 82

(p)

CAper

.

.

.

SAper1

SAper(p)

FO(<,S1,S2)

FO(<)

CTL

SAper

1

=SAper(p)

=SAper2

D

SAper2

CAper

SAper1

Figure 3.1: The aperiodicity hierarchies.

Summary

This thesis is concerned with the definability problem of several classes of logics on finitetrees. Two main areas of this topic can be identified here. The first area is the algebraiccharacterization of the logic FTL(L), when L is a class of regular tree languages and allthe quotients ζ−1L for ζ ∈ CTΣ, L ⊆ TΣ, L ∈ L are expressible in FTL(L). The secondarea addresses different notions of aperiodicity in relation to logics on trees.

Chapter 1 is a preliminary one. It contains a brief summary of earlier results relatedto the thesis, basic notions and well-known theorems from the fields of formal languagetheory, tree automata and logic.

Chapter 2 is devoted to the family of the temporal logics FTL(L), and provides an al-gebraic characterization of its definability problem. To each class L of tree languages, abranching time future temporal logic FTL(L) is associated, according to [14, 15]. Theclass FTL(L) of tree languages is defined as the class of FTL(L)-definable tree languages.In [15], the following has been proved:

Suppose L is a class of regular tree languages such that quotients and the next modalitiesare expressible in FTL(L). Then a tree language L is contained in FTL(L) if and onlyif L is regular, and its minimal automaton AL is contained in the least pseudovariety offinite tree automata containing the minimal automata of the members of L and a specificdefinite tree automaton D0, which is closed under the cascade product.

Here, the condition “quotients are expressible in FTL(L)” holds if whenever L ∈ L is atree language over Σ, and ζ ∈ CTΣ is a Σ-context, then the language ζ−1L is containedin FTL(L).

Also, the condition “the next modalities are expressible in FTL(L)” is equivalent tostating that for any FTL(L)-formula ϕ over a signature Σ of rank type R and integeri ∈ [max R] there exists an FTL(L)-formula Xiϕ with t |= Xiϕ for a tree t ∈ TΣ if andonly if t = σ(t1, . . . , tn) for some n ≥ i, σ ∈ Σn and t1, . . . , tn such that ti |= ϕ.

Theorem 2.3.4 and Corollary 2.3.5 strengthen this result. In Section 2.2 we identified arestricted form of the cascade product, called the Moore product, and related it to the

SUMMARY 84

cascade product. Also an even more restrictive variant, the strict Moore product has beenintroduced. Using the Moore product, the following stronger result was proved (publishedin [18]):

Suppose L is a class of regular tree languages such that quotients are expressible inFTL(L). Then a tree language L is contained in FTL(L) if and only if L is regular,and its minimal automaton AL is contained in the least pseudovariety of finite tree au-tomata containing the minimal automata of the members of L and a specific definite treeautomaton D0, which is closed under the Moore product.

This characterization establishes a correspondence between definability in the logicFTL(L) and membership in a pseudovariety of finite tree automata (actually, the cor-respondence is an order isomorphism between the lattice of literal varieties of tree lan-guages closed under the operator FTL and the lattice of connected Moore pseudovarietiesof finite connected tree automata containing D0). However, the characterization is noteffective. The characterization of [15] was applicable to the CTL fragments CTL(EX)and CTL(EF + EX), but not to the fragments CTL(EF∗) and CTL(EF+), the fragmentin which only the non-strict, resp. strict variant of the EF modality (“there exists asubtree”) is allowed, since in these logics, the next modalities are not expressible.

In Section 2.3 we gave decidable characterizations of the fragments CTL(EF∗) andCTL(EF+): Corollary 2.4.42, published in [19], states the following:

A tree language L ⊆ TΣ is definable in the temporal logic CTL(EF+) if and only if itis regular and its minimal tree automaton AL is commutative, maximal dependent andcomponent dependent, i.e. satisfies the equations

σ(x1, . . . , xn) = σ(xπ(1), . . . , xπ(n))

for any σ ∈ Σn and permutation π, the implications

y ¹ xi, z ¹ xj ⇒ σ(x1, . . . , xn−1, y) = σ(x1, . . . , xn−1, z)

for each σ ∈ Σn, where ¹ is the accessibility relation of AL, and the implications

x1 ∼ y1, . . . , xn ∼ yn ⇒ σ(x1, . . . , xn) = σ(y1, . . . , yn)

for any σ ∈ Σn, where x ∼ y holds if and only if x ¹ y and y ¹ x.

A tree language L ⊆ TΣ is definable in CTL(EF∗) if and only if it is definable in CTL(EF+)and its minimal automaton is stutter invariant, i.e. satisfies the equations

σ(x1, . . . , xn−1, xn) = σ(x1, . . . , xn−1, σ(x1, . . . , xn))

for each σ ∈ Σn.

SUMMARY 85

This characterization also shows that the following questions are both decidable in poly-nomial time: given a tree language L by its minimal tree automaton AL, is L definablein CTL(EF+) or in CTL(EF∗)? This was already known for the fragment CTL(EF+),see [5], whereas the characterization of CTL(EF∗) solves a problem mentioned open in [5](which has also been solved independently in [58]).

In Section 2.5, we provided another characterization in terms of two-player games. Wedefined for each class L of (not necessarily regular) tree languages and integer n ≥ 0the n-round L-game that is played on a pair of trees between two competing players,Spoiler and Duplicator. Corollary 2.5.3 relates FTL(L)-definability and the existence ofa winning strategy as follows:

For any finite class L of tree languages, a language L is contained in FTL(L) if and onlyif there exists a number n ≥ 0 such that Spoiler wins the n-round L-game on L, that is,whenever s ∈ L and t /∈ L are two trees, Spoiler has a winning strategy in the n-roundL-game played on (s, t).

Chapter 3 is devoted to several aperiodicity notions. When Σ is a signature and A =(A, Σ) is a finite Σ-tree automaton, any n-tuple (t1, . . . , tn) of proper ΣXn-trees induces amapping (t1, . . . , tn)A : An → An. For any n > 0, these functions form a semigroup Sn(A),with the composition operation as product. We say that the finite tree automaton A isn-aperiodic if the semigroup Sn(A) is aperiodic, i.e. for some K the equation sK = sK+1

holds for any element s of Sn(A). Moreover, A is said to be strongly aperiodic if it isn-aperiodic for each n. Following [54], we say that A is context aperiodic if the semigroupC(A) of term functions induced by proper Σ-contexts is aperiodic. We denote the class ofall n-aperiodic finite tree automata by SApern, the class of all strongly aperiodic finitetree automata by SAper and the class of all context aperiodic finite tree automata byCAper. Each of these classes but CAper forms a generalized cascade pseudovariety,whereas CAper forms a cascade pseudovariety.

The inclusions

CAper ⊇ SAper1 ⊇ SAper2 ⊇ · · · ⊇ SAper ⊇ D

hold for any rank type R. In Proposition 3.3.1 we showed that when R = {0, 1} orR = {1}, that is, in the case of words, the hierarchy collapses:

CAper = SAper1 ⊃ SAper2 = SAper = D.

However, in any non-classical case (when the rank type contains an integer greater than1) the hierarchy is strict:

CAper ⊃ SAper1 ⊃ SAper2 ⊃ · · · ⊃ SAper ⊃ D,

see Propositions 3.3.2, 3.3.3 and 3.3.4.

SUMMARY 86

The complexity of the membership problems was also studied: we showed that when Ris a non-classical rank type, then for each n > 0 it is PSPACE-hard to decide whethera tree automaton is n-aperiodic (Proposition 3.4.4). In contrast, we gave a polynomialtime decision procedure for testing strong aperiodicity (Theorem 3.4.3).

We related the above aperiodicity notions to logic. In Section 3.5 we showed that thefollowing hold for binary trees (when R = {0, 2}):

1. If a tree language is in CTL, then its minimal tree automaton is in SAper1.

2. There exists a tree language in CTL whose minimal automaton is not in SAper2.

3. There exists a tree language definable in FO(<) whose minimal automaton is not1-aperiodic.

4. There exists a regular tree language whose minimal automaton is 1-aperiodic butwhich is not definable in FO(<,Si).

The arguments can be extended to any non-classical rank type.

We also introduced a slight modification of the notion of n-aperiodicity, involving thesemigroup of proper polynomial functions instead of proper term functions. It turned out(Proposition 3.7.4) that in this case the hierarchy also collapses:

D = SAper(p) = SAper(p)2 ⊂ SAper

(p)1 ⊂ CAper(p).

As a last result, we showed that SAper(p)1 is incomparable with SApern, for each n > 1,

as well as with SAper (Corollary 3.7.7).

The results of Chapter 3 were published in [17].

Osszefoglalas

Jelen dolgozat bizonyos, veges fakon ertelmezett logikak definialhatosagi problemajavalfoglalkozik. Ezen a teman belul ket nagyobb erintett terulet kulonul el: az elso az FTL(L)alaku logikak algebrai karakterizacioja, ahol L regularis fanyelvek osztalya es ahol mindenζ−1L alaku hanyados (ζ itt Σ-context, L pedig L-beli Σ-fanyelv) kifejezheto FTL(L)-ben.Ez a tulajdonsag a tovabbiakban a kovetkezokepp szerepel: ,,a hanyadosok kifejezhetokFTL(L)-ben”. A masodik reszben az aperiodicitas kulonbozo valtozatait vizsgaltuk.

Az elso fejezet bevezetes: itt definialtuk a dolgozatban hasznalt jeloleseket aformalis nyelvek, faautomatak es logika teruleteirol, egyszersmind a felhasznalt korabbieredmenyeket is itt ismertettuk.

A masodik fejezetben vezettuk be az FTL elagazo, jovo ideju temporalis logikat, il-letve ennek FTL(L) alaku toredekeit, ahol L fanyelvek egy osztalya. Az FTL(L)logikaban definialhato nyelvek osztalyat a [14, 15] munkakat kovetve FTL(L) jeloli.A fejezetben tovabba algebrai karakterizaciot adtunk az FTL(L) nyelvosztalyra, ha Lregularis fanyelvek egy olyan osztalya, melyre a hanyadosok kifejezhetok FTL(L)-ben.[15]-ben az alabbi karakterizacios tetel kerult igazolasra:

Legyen L regularis nyelvek egy olyan osztalya, melyre a hanyadosok es a rakovetkezesimodalitasok kifejezhetok FTL(L)-ben. Akkor egy L fanyelv pontosan akkor esik az FTL(L)osztalyba, ha regularis es minimalis automataja benne van a veges faautomataknak abbana legszukebb pszeudovarietasaban, mely tartalmazza L elemeinek minimalis automatait,egy bizonyos D0 1-definit faautomatat es amely zart faautomatak kaszkad szorzataira.

Itt ,,a rakovetkezesi modalitasok kifejezhetok FTL(L)-ben” azt jelenti, hogy tetszolegesϕ, az R rangtıpusu Σ abece folotti FTL(L)-formulara es i ∈ [max R] egeszre letezik egyΣ folotti Xiϕ formula FTL(L)-ben, melyre t |= Xiϕ pontosan akkor teljesul egy t ∈ TΣ

fara, ha t-nek letezik az i-edik kozvetlen reszfaja, es az kielegıti a ϕ formulat.

A 2.3.4. tetel es a 2.3.5. kovetkezmeny ezt az eredmenyt erosıtik. Azonosıtottuk faau-tomatak kaszkad szorzatanak egy specialis esetet, amit Moore szorzatnak neveztunk (esmelyet a 2.2-es szakaszban definialtunk). Ezt a szorzatot es egy tovabbi specialis esetet,a szigoru Moore szorzatot osszehasonlıtottuk a kaszkad szorzattal. A Moore szorzatot

OSSZEFOGLALAS 88

felhasznalva az alabbi, [18]-ban publikalt osszefuggest igazoltuk:

Legyen L regularis fanyelvek egy olyan osztalya, melyre a hanyadosok kifejezhetok FTL(L)-ben. Akkor egy L fanyelv pontosan akkor esik FTL(L)-be, ha regularis es minimalisautomataja beletartozik a veges faautomatak azon legszukebb pszeudovarietasaba, melytartalmazza L elemeinek minimalis automatait, a D0 automatat es amely zart faautomatakMoore szorzataira.

Ez a karakterizacio az FTL(L) logikak definialhatosagi kerdese es faautomatak pszeu-dovarietasainak eldontesi kerdese kozott letesıt kapcsolatot. Valojaban ez a kapcsolat egyhaloizomorfizmus, az FTL operatorra zart literalis fanyelv-varietasok es veges, osszefuggofaautomataknak a D0-t tartalmazo es a Moore szorzatra zart pszeudovarietasai altal alko-tott teljes halok kozott. Ugyanakkor, a karakterizacio nem effektıv. A [15]-ben megadottjellemzes alkalmazhato volt annak igazolasara, hogy a CTL logika ket szintaktikustoredeke, CTL(EX) es CTL(EX + EF) definialhatosagi problemaja eldontheto. Azon-ban ha tekintjuk az CTL(EF∗) es CTL(EF+) toredekeket, melyekben egyetlen modalitas,az EF (,,existence in the future”) megengedo ill. szigoru valtozata szerepel, ezekre nemalkalmazhato a [15]-beli jellemzesi tetel, mivel azokban a rakovetkezesi modalitasok nemkifejezhetok. A 2.3-as szakaszban a Moore szorzat segıtsegevel megadott jellemzest alka-lmazva igazoltuk, hogy ennek a ket logikanak is eldontheto a definialhatosagi problemaja.A kapott eredmeny (2.4.42. kovetkezmeny), mely [19]-ban kerult publikalasra, ıgy szol:

Az L ⊆ TΣ fanyelv pontosan akkor definialhato a CTL(EF+) logikaban, ha regularis esminimalis faautomataja kommutatıv, maximalis elemfuggo es komponensfuggo, azaz tel-jesıti a

σ(x1, . . . , xn) = σ(xπ(1), . . . , xπ(n))

azonossagot minden σ ∈ Σn szimbolumra es π permutaciora, valamint az

y ¹ xi, z ¹ xj ⇒ σ(x1, . . . , xn−1, y) = σ(x1, . . . , xn−1, z)

es az

x1 ∼ y1, . . . , xn ∼ yn ⇒ σ(x1, . . . , xn) = σ(y1, . . . , yn)

implikaciokat minden σ ∈ Σn-re. Itt ¹ jeloli a minimalis automata elerhetosegi relaciojat,∼ pedig az a ∼ b ⇔ a ¹ b ∧ b ¹ a ekvivalenciarelaciot.

Tovabba, az L ⊆ TΣ fanyelv pontosan akkor definialhato a CTL(EF∗) logikaban, hadefinialhato a CTL(EF+)-ban es minimalis automataja ,,dadogas-invarians”, vagyis tel-jesul benne a

σ(x1, . . . , xn−1, xn) = σ(x1, . . . , xn−1, σ(x1, . . . , xn))

OSSZEFOGLALAS 89

egyenloseg minden σ ∈ Σn-re.

A fenti karakterizacio szerint mindket kerdes polinom idoben eldontheto; ez korabban is is-mert volt a CTL(EF+) esetere, ld. [5], mıg a CTL(EF∗) jellemzese egy [5]-ben nyitottkentfelvetett problema volt. Ez utobbit [58] eltero modszerrel, fuggetlenul megoldotta.

A 2.5. szakaszban egy ujabb jellemzest adtunk, ketszemelyes jatekok segıtsegevel.Fanyelvek egy (tetszoleges) L osztalyahoz es az n ≥ 0 egeszhez definialtuk az n-fordulos L-jatekot, mely egy ketszemelyes, fak egy (s, t) parjan jatszott jatek. A 2.5.3. kovetkezmenykapcsolja ossze a fenti jatekot az FTL(L)-definialhatosaggal:

Fanyelvek tetszoleges L veges osztalyara es L fanyelvre fennall, hogy az L nyelv pontosanakkor esik bele az FTL(L) osztalyba, ha van egy olyan n ≥ 0 szam, melyre az n-fordulosL-jatekban a kezdo jatekosnak van nyero strategiaja, valahanyszor a jatekot fak olyan (s, t)parjan jatsszak, ahol s ∈ L es t /∈ L.

A harmadik fejezetben az aperiodicitas kulonbozo fogalmait vizsgaltuk. Ha Σ egyrangolt abece es A = (A, Σ) egy veges Σ-faautomata, akkor nemtrivialis ΣXn-fakbarmely (t1, . . . , tn) vektora meghataroz egy An → An transzformaciot. Ezek a transz-formaciok egy felcsoportot alkotnak, melyet Sn(A) jelol (es melyben a szorzas a transz-formaciok kompozıcioja). Az A veges faautomatat n-aperiodikusnak mondjuk, ha azSn(A) felcsoport aperiodikus, vagyis ha benne az xK = xK+1 azonossag fennall valamelyK-ra. Tovabba, az A veges faautomata erosen aperiodikus, ha minden n ≥ 1-re n-aperiodikus. Kovetve [54]-et, A-t kornyezet-aperiodikusnak (context aperiodic) nevezzuk,ha a nemtrivialis kornyezetek altal indukalt lekepezesek felcsoportja aperiodikus. Az n-aperiodikus veges faautomatak osztalyat SApern, az erosen aperiodikusoket SAper, akornyezet-aperiodikusoket pedig CAper jeloli. A legutobbi osztaly veges faautomataknakegy kaszkad szorzatra zart pszeudovarietasa, mıg a tobbi az altalanosıtott kaszkadszorzatara is zart pszeudovarietas.

A

CAper ⊇ SAper1 ⊇ SAper2 ⊇ · · · ⊇ SAper ⊇ D

tartalmazasok minden R rangtıpusra fennallnak. A 3.3.1. allıtasban megmutattuk, hogyha R = {0, 1} vagy R = {1}, azaz mikor faink valojaban szavak, a hierarchia osszeomlik,ekkor

CAper = SAper1 ⊃ SAper2 = SAper = D.

Ugyanakkor ha R tartalmaz egy 1-nel nagyobb egeszet (maskepp fogalmazva, ha R nem-klasszikus), a hierarchia a 3.3.2, 3.3.3 es 3.3.4 allıtasok szerint valodi:

CAper ⊃ SAper1 ⊃ SAper2 ⊃ · · · ⊃ SAper ⊃ D.

OSSZEFOGLALAS 90

Vizsgaltuk tovabba a fenti osztalyok eldontesi problemajanak bonyolultsagat is: meg-mutattuk, hogy ha R nem-klasszikus rangtıpus, akkor barmely rogzıtett n-re PSPACE-nehez kerdes annak eldontese, hogy egy adott faautomata n-aperiodikus vagy sem (3.4.4.allıtas). Ezzel ellentetben, az eros aperiodicitas eldontesere megadtunk egy polinom idejualgoritmust (3.4.3. tetel).

Az aperiodicas fogalmainak es a logikai definialhatosagnak a kapcsolatat is vizsgaltuk: a3.5-os szakasz eredmenyei szerint binaris fakra (R = {0, 2}) a kovetkezok allnak fenn:

1. Ha L definialhato CTL-ben, akkor minimalis faautomataja 1-aperiodikus.

2. Letezik CTL-ben definialhato nyelv, melynek minimalis faautomataja nem 2-aperiodikus.

3. Letezik FO(<)-ben definialhato fanyelv, melynek minimalis automataja nem 1-aperiodikus.

4. Letezik regularis fanyelv, mely nem definialhato FO(<, Si)-ben, de melynekminimalis automataja 1-aperiodikus.

Az eredmenyek barmely nem-klasszikus rangtıpusra kiterjeszthetok.

Bevezettuk tovabba az n-aperiodicitasnak egy kisse modosıtott fogalmat, melynekdefinıciojaban a nemtrivialis polinomvektorok altal indukalt lekepezesek szerepelnek(favektorok helyett). A 3.7.4. allıtas kimondja, hogy az ıgy definialt hierarchia mindenrangtıpusra osszeomlik:

D = SAper(p) = SAper(p)2 ⊂ SAper

(p)1 ⊂ CAper(p).

A fejezet zarasakent megmutattuk, hogy a polinom ertelemben 1-aperiodikus veges faau-tomatak osztalya a tartalmazas relacio szerint osszehasonlıthatatlan barmely SApern

osztallyal csakugy, mint SAper-rel (3.7.7. kovetkezmeny).

A 3. fejezet eredmenyeit [17]-ben publikaltuk.

Bibliography

[1] J. Almeida. On pseudovarieties, varieties of languages, filters of congruences,pseudoidentities and related topics. Algebra Universalis, 27:333–350, 1990.

[2] M. Ben-Ari, Z. Manna and A. Pnueli. The temporal logic of branching time. ActaInformatica, 20:207–226, 1983.

[3] M. Benedikt and L. Segoufin. Regular tree languages definable in FO. In STACS2005, LNCS 2404, pages 327–339, Springer-Verlag, 2005.

[4] L. Bernatsky. Regular expression star-freeness is PSPACE-complete. Acta Cybernet-ica, 13:1–21, 1997.

[5] M. Bojanczyk and I. Walukiewicz. Characterising EF and EX tree logics. In proc.CONCUR 2004, LNCS 3170, pages 131–145, Springer-Verlag, 2004.

[6] J. R. Buchi. Weak second-order arithmetic and finite automata. Z. Math. LogikGrundl. Math., 6:66–92, 1960.

[7] S. Cho and Dung T. Huynh. Finite-automaton aperiodicity is PSPACE-complete.Theoretical Computer Science, 88:99–116, 1991.

[8] J. Cohen, D. Perrin and J.-E. Pin. On the expressive power of temporal logic. J.Comput. System Sci., 46:271–294, 1983.

[9] S. Eilenberg. Automata, Languages, and Machines, vol. A and B, Academic Press,1974 and 1976.

[10] C. C. Elgot. Decision problems of finite automata design and related arithmetics.Transactions of the AMS, 98:21–52, 1961.

[11] E. A. Emerson and J. Y. Halpern.“Sometimes” and “not never” revisited: on branch-ing versus linear time temporal logic. J. Assoc. Comput. Mach. 33:151–178, 1986.

BIBLIOGRAPHY 92

[12] Z. Esik. Definite tree automata and their cascade compositions. Publ. Math., 48:243–262, 1996.

[13] Z. Esik. A variety theorem for trees and theories. Publ. Math., 54:711–762, 1999.

[14] Z. Esik. An algebraic characterization of temporal logics on finite trees. Parts I, II,III. In 1st International Conference on Algebraic Informatics, 2005, pages 53–77,79–99, 101–110, Aristotle Univ. Thessaloniki, Thessaloniki, 2005.

[15] Z. Esik. Characterizing CTL-like logics on finite trees. Theoretical Computer Science,356:136–152, 2006.

[16] Z. Esik and F. Gecseg. Type independent varieties and metric equivalence of treeautomata. Fundamenta Informaticae, 2:205-216, 1986.

[17] Z. Esik and Sz. Ivan. Aperiodicity in tree automata. In 2nd International Conferenceon Algebraic Informatics, 2007, LNCS 4728, Springer, p. 189–207, 2007.

[18] Z. Esik and Sz. Ivan. Products of tree automata with an application to temporallogic. Fundamenta Informaticae 82:61–82, 2008.

[19] Z. Esik and Sz. Ivan. Some varieties of finite tree automata related to restrictedtemporal logic. Fundamenta Informaticae 82:83–103, 2008.

[20] Z. Esik and P. Weil. On logically defined recognizable tree languages. In FST&TCS03, Mumbai, LNCS 2914, pages 195–206, Springer-Verlag, 2003.

[21] Z. Esik and P. Weil. Algebraic recognizability of regular tree languages. Theoret.Comput. Sci., 340:291–321, 2005.

[22] D. Gabbay, A. Pnueli, S. Shelah and J. Stavi. On the temporal analysis of fairness. InProc. 7th ACM Symp. Principles of Programming Langauges, pages 163–173, ACMPress, 1980.

[23] F. Gecseg and B. Imreh. On αi-product of automata. Acta Cybernetica 8(2):135–141,1987.

[24] F. Gecseg and B. Imreh. On isomorphic representations of monotone tree and nonde-terministic tree automata. Words, Semigroups and Transductions 2001, pages 141–154, 2001.

[25] F. Gecseg and M. Steinby. Tree Automata. Akademiai Kiado, 1984.

[26] G. Gratzer. Universal Algebra, Springer, 1979.

BIBLIOGRAPHY 93

[27] T. Hafer and W. Thomas. Computation tree logic CTL∗ and path quantifiers in themonadic theory of the binary tree. In ICALP 1987, Karlsruhe, pages 269–279, LNCS267, Springer-Verlag, 1987.

[28] U. Heuter. Definite tree languages. Bulletin of the EATCS, 35:137–142. 1988.

[29] U. Heuter. First-order properties of trees, star-free expressions, and aperiodicity.RAIRO Inform. Theor. Appl., 25:125–145, 1991.

[30] J. A. Kamp. Tense logic and the theory of linear order. Ph. D. Thesis, UCLA, 1968.

[31] L. Libkin. Elements of finite model theory. Springer, 2004.

[32] R. McNaughton and S. Papert. Counter-Free Automata. MIT Press, 1971.

[33] M. Nivat and A. Podelski. Definite tree languages (cont’d), Bulletin of the EATCS,38:186–190, 1989.

[34] D. Peled and T. Wilke. Stutter-invariant temporal properties are expressible withoutthe next-time operator, Inf. Proc. Lett., 63:243–246, 1997.

[35] D. Perrin and J.-E. Pin. First-order logic and star-free sets. J. Comput. System Sci.,32:393–406, 1986.

[36] D. Perrin and J.-E. Pin. Infinite Words, Pure and Applied Mathematics Vol 141,Elsevier, 2004.

[37] J.-E. Pin. Varieties of Formal Languages. Plenum Publishing Corp., New York, 1986.

[38] J.-E. Pin. The expressive power of existential first-order sentences of Buchis sequentialcalculus. In International Colloquium on Automata, Languages and Programming,LNCS vol. 1099, p. 300–311, 1996.

[39] V. Piirainen. Monotone algebras, R-trivial monoids and a variety of tree languages.Bulletin of the EATCS 84:189-194, 2004.

[40] A. Potthoff. First order logic on finite trees. In TAPSOFT ’95, pages 125–139, LNCS915, Springer-Verlag, 1995.

[41] A. Potthoff. Modulo-counting quantifiers over finite trees. Theoretical Computer Sci-ence, 126:97–112, 1994.

[42] M. O. Rabin. Decidability of second-order theories and automata on infinite trees.Trans. AMS, 141:1–35, 1969.

BIBLIOGRAPHY 94

[43] G. Ricci. Cascades of tree-automata and computations in universal algebras. Math.Systems Theory, 7:201–218, 1973.

[44] S. Salehi. Varieties of Tree Languages. TUCS Dissertations, No. 64, 2006.

[45] K. Schneider. Verification of Reactive Systems. Springer-Verlag, 2004.

[46] M. P. Schutzenberger. On finite monoids having only trivial subgroups. Informationand Control 8:190–194, 1965.

[47] M. Steinby. A theory of tree language varieties. In: Tree Automata and Languages,pages 57–81, North-Holland, Amsterdam, 1992.

[48] M. Steinby. General varieties of tree languages. Theoret. Comput. Sci., 205:1–43,1998.

[49] H. Straubing. Finite Automata, Formal Logic, and Circuit Complexity. Birkhauser,1994.

[50] J. W. Thatcher and J. B. Wright. Generalized finite automata theory with an ap-plication to a decision problem of second-order logic. Mathematical Systems Theory,2:57–82, 1968.

[51] D. Therien and A. Weiss. Graph congruences and wreath products. Journal of Pureand Applied Algebra, 36(2):205 215, 1985.

[52] D. Therien and Th. Wilke. Temporal logic and semidirect products: An effectivecharacterization of the until hierarchy. DIMACS TR-96-28, 1996.

[53] W. Thomas. Classifying regular events in symbolic logic. Journal of Computer andSystem Sciences, 25:360–375, 1982.

[54] W. Thomas. Logical aspects in the study of tree languages. In Ninth Colloquium onTrees in Algebra and Programming, Bordeaux, 1984, pages 31–49, Cambridge Univ.Press, Cambridge, 1984.

[55] J. VanderWerf. Wreath products of algebras: generalizing the Krohn-Rhodes theoremto arbitrary algebras. Semigroup Forum, 52:93–100, 1996.

[56] Th. Wilke. Classifying discrete temporal properties. In STACS 99, Trier, pages 32–46, LNCS 1563, Springer-Verlag, Berlin, 1999.

[57] P. Wolper. Temporal logic can be more expressive. Information and Control, 56:72–99, 1983.

[58] Zh. Wu. A note on the characterization of TL(EF). Information Processing Letters,102:48–54, 2007.

Index

A−, 51Lϕ

in CTL, 18in FTL, 21in first-order logic, 17

LEF∗ , 39LEF+ , 39[n], 7∆A, 12ΣXn-tree, 7Σ-tree, 8A−, 51AL, 13AΣ, 30Aγ, 32AAux, 54Vc, 28E∗EF, 40E+

EF, 40E∗EG, 41E+

EG, 40≡

in FTL, 21ffn, 21A, 33Σ, 33〈K〉M , 25〈K〉c, 25〈K〉s, 25〈K〉, 14∇A, 12≺S∗ , 7¹A, 41

¹S∗ , 7∼A, 41×M , 25×c, 25×s, 25ttn, 21ζ−1(L), 9t |= ϕ

in CTL, 17in FTL, 20in first-order logic, 17

tA, 11(t1, . . . , tn)(v), 9

accessibility relation of A, 41accessible state, 11action, 66agree up to depth k, 28arity, 7

Bool, 29

canonical Values∗-mapping, 53canonical Values+-mapping, 49CAper, 70carrier set, 10cascade product, 23

connected, 24cascade property, 42characteristic tree, 20Com, 28Comc, 28CompDep, 45CompUnique, 46

INDEX 96

congruence, 12nontrivial, 12trivial, 12

connected part, 11constant symbol, 7context, 8counter-free, 66CTL, 17CTΣ, 8

D, 29D, 29Dc, 29definability problem of FTL(L), 36delay automaton, 34depth of a formula, 20derived automaton, 68direct product

connected, 14of tree automata, 10

divisor, 12Dk, 29Dk, 29Dc

k, 29dom(t), 9dom(t), 8

ε, 7elementary operation, 10

factor automaton, 13family of formulas

complete, 21complete over (t1, . . . , tn), 21complete over t, 21deterministic, 21deterministic over (t1, . . . , tn), 21deterministic over t, 21

first-order logic, 16FO(<), 17FO(<,Si), 16FTL, 20

FTL(K), 36FTL(L), 21FTL(L), 21FTL-formula

complete, 22deterministic, 22

generalized cascade product, 68

hg(t), 8homomorphic image, 12homomorphism, 12

Idem, 28Idemc, 28ImgA(σ), 10isomorphic, 12isomorphism, 12

kernel of a homomorphism, 13

L-game, 61LA,A′ , 11literal tree homomorphism, 9

MaxDep, 44membership problem of a pseudovariety, 36Mon, 42Moore product, 24

connected, 24connected strict, 24strict, 24

Moore property, 42

N, 7node, 8

polynomial symbol, 9projection, 11proper tree, 7pseudovariety

connected cascade, 25connected Moore, 25

INDEX 97

connected strict Moore, 25generalized cascade, 68of finite tree automata, 13

quotientlanguage, 9of automata, 12

rank type, 7relabeling, 9renaming, 11

connected, 14Root(t), 9

S∗, 7SAper, 70SApern, 70sentence, 17signature, 7state, 10state set, 10Stu, 28Stuc, 28subautomaton, 10

proper, 10subtree, 9

immediate, 9proper, 9

t(t1, . . . , tn), t(t), 8t(v), 8term function, 11

proper, 11transformation semigroup, 66tree automaton

k-definite, 28n-aperiodic, 65commutative, 26component dependent, 44componentwise unique, 45connected, 11context aperiodic, 65

definite, 28finite, 10idempotent, 26maximal dependent, 43minimal, 13monotone, 42strongly aperiodic, 65stutter invariant, 27subdirectly irreducible, 13trivial, 10

tree language, 9recognized by A, 11

TΣ, 8TΣ(Xn), 7

Values∗-automaton, 53Values+-automaton, 49variable, 7vertex, 8

X, 7Xn, 7