The Wadge Hierarchy of Deterministic Tree Languages

We provide a complete description of the Wadge hierarchy for deterministically recognisable sets of infinite trees. In particular we give an elementary procedure to decide if one deterministic tree language is continuously reducible to another. This extends Wagner's results on the hierarchy of omega-regular languages of words to the case of trees.


Introduction
Two measures of complexity of recognisable languages of infinite words or trees have been considered in literature: the index hierarchy, which reflects the combinatorial complexity of the recognising automaton and is closely related to µ-calculus, and the Wadge hierarchy, which is the refinement of the Borel/projective hierarchy that gives the deepest insight into the topological complexity of languages.Klaus Wagner was the first to discover remarkable relations between the two hierarchies for finite-state recognisable (ω-regular) sets of infinite words [14].Subsequently, decision procedures determining an ω-regular language's position in both hierarchies were given [4,7,15].
For tree automata the index problem is only solved when the input is a deterministic automaton [9,13].As for topological complexity of recognisable tree languages, it goes much higher than that of ω-regular languages, which are all ∆ 0 3 .Indeed, co-Büchi automata over trees may recognise Π 1  1 -complete languages [8], and Skurczyński [12] proved that there are even weakly recognisable tree languages in every finite level of the Borel hierarchy.This may suggest that in the tree case the topological and combinatorial complexities diverge.On the other hand, the investigations of the Borel/projective hierarchy of deterministic languages [5,8] reveal some interesting connections with the index hierarchy.
Wagner's results [14,15], giving rise to what is now called the Wagner hierarchy (see [10]), inspire the search for a complete picture of the two hierarchies and the relations between them for recognisable tree languages.In this paper we concentrate on the Wadge hierarchy of deterministic tree languages: we give a full description of the Wadge-equivalence classes forming the hierarchy, together with a procedure calculating the equivalence class 2 F. MURLAK of a given deterministic language.In particular, we show that the hierarchy has the height ω ω•3 + 3, which should be compared with ω ω for regular ω-languages [15], ω ω 2 for deterministic context-free ω-languages [1], (ω CK 1 ) ω for ω-languages recognised by deterministic Turing machines [11], or an unknown ordinal ξ > (ω CK 1 ) ω for ω-languages recognised by nondeterministic Turing machines, and the same ordinal ξ for nondeterministic context-free languages [2].
The key notion of our argument is an adaptation of the Wadge game to tree languages, redefined entirely in terms of automata.Using this tool we construct a collection of canonical automata representing the Wadge degrees of all deterministic tree languages.Then we provide a procedure calculating the canonical form of a given deterministic automaton, which runs within the time of finding the productive states of the automaton (the exact complexity of this problem is unknown, but not worse than exponential).

Automata
We use the symbol ω to denote the set of natural numbers {0, 1, 2, . ..}.For an alphabet Σ, Σ * is the set of finite words over Σ and Σ ω is the set of infinite words over Σ.The concatenation of words u ∈ Σ * and v ∈ Σ * ∪ Σ ω will be denoted by uv, and the empty word by ε.The concatenation is naturally generalised for infinite sequences of finite words A tree is any subset of ω * closed under the prefix relation.An element of a tree is usually called a node.A leaf is any node of a tree which is not a (strict) prefix of some other node.A Σ-labelled tree (or a tree over Σ) is a function t : dom t → Σ such that dom t is a tree.For v ∈ dom t we define t.v as a subtree of t rooted in v, i. e., dom (t.v) = {u : vu ∈ dom t}, t.v(u) = t(vu).
A full n-ary Σ-labeled tree is a function t : {0, 1, . . ., n − 1} * → Σ.The symbol T Σ will denote the set of full binary trees over Σ.From now on, if not stated otherwise, a "tree" will mean a full binary tree over some alphabet.
Out of a variety of acceptance conditions for automata on infinite structures, we choose the parity condition.A nondeterministic parity automaton on words can be presented as a tuple A = Σ, Q, δ, q 0 , rank , where Σ is a finite input alphabet, Q is a finite set of states, δ ⊆ Q × Σ × Q is the transition relation, and q 0 ∈ Q is the initial state.The meaning of the function rank : Q → ω will be explained later.Instead of (q, σ, q 1 ) ∈ δ one usually writes q σ −→ q 1 .A run of an automaton A on a word w ∈ Σ ω is a word ρ w ∈ Q ω such that ρ w (0) = q 0 and if ρ w (n) = q, ρ w (n + 1) = q 1 , and w(n) = σ, then q σ −→ q 1 .A run ρ w is accepting if the highest rank repeating infinitely often in ρ w is even; otherwise ρ w is rejecting.A word is accepted by A if there exists an accepting run on it.The language recognised by A, denoted L(A) is the set of words accepted by A. An automaton is deterministic if its relation of transition is a total function Q × Σ → Q.Note that a deterministic automaton has a unique run (accepting or not) on every word.We call a language deterministic if it is recognised by a deterministic automaton.
We write q σ,0 −→ q 1 if there exists a state q 2 such that q σ −→ q 1 , q 2 .Similarly for q σ,1 −→ q 2 .A run of A on a tree t ∈ T Σ is a tree ρ t ∈ T Q such that ρ t (ε) = q 0 and if ρ t (v) = q, ρ t (v0) = q 1 , ρ t (v1) = q 2 and t(v) = σ, then q σ −→ q 1 , q 2 .A path π of the run ρ t is accepting if the highest rank repeating infinitely often in π is even; otherwise π is rejecting.A run is called accepting if all its paths are accepting.If at least one of them is rejecting, so is the whole run.An automaton is called deterministic if its transition relation is a total function By A q we denote the automaton A with the initial state set to q.A state q is allaccepting if A q accepts all trees, and all-rejecting if A q rejects all trees.A state (a transition) is called productive if it is used in some accepting run.Observe that being productive is more than just not being all-rejecting.A state q is productive if and only if it is not allrejecting and there is a path q 0 σ 0 ,d 0
Without loss of generality we may assume that all states in A are productive save for one all-rejecting state ⊥ and that all transitions are either productive or are of the form q σ −→ ⊥, ⊥.The reader should keep in mind that this assumption has influence on the complexity of our algorithms.Transforming a given automaton into such a form of course needs calculating the productive states, which is equivalent to deciding a language's emptiness.The latter problem is known to be in NP ∩ co-NP and has no polynomial time solutions yet.Therefore, we can only claim that our algorithms are polynomial for the automata that underwent the above preprocessing.We will try to mention it whenever it is particularly important.
The Mostowski-Rabin index of an automaton A is a pair (min rank Q, max rank Q) .
In other words, one index is smaller than another if and only if it uses less ranks.This means that dual indices are not comparable.The Mostowski-Rabin index hierarchy for a certain class of automata consists of ascending sets (levels) of languages recognised by (ι, κ)-automata (see Fig. 1).
The fundamental question about the hierarchy is the strictness, i. e., the existence of languages recognised by a (ι, κ)-automaton, but not by a (ι, κ)-automaton.The strictness of the hierarchy for deterministic automata follows easily from the strictness of the hierarchy for deterministic word automata [15]: if a word language L needs at least the index (ι, κ), so does the language of trees that have a word from L on the leftmost branch.The index hierarchy for nondeterministic automata is also strict [6].In fact, the languages showing the strictness may be chosen deterministic: one example is the family of the languages of trees over the alphabet {ι, ι + 1, . . ., κ} satisfying the parity condition on each path.
The second important question one may ask about the index hierarchy is how to determine the exact position of a given language.This is known as the index problem.
Given a deterministic language, one may ask about its deterministic index, i. e., the exact position in the index hierarchy of deterministic automata (deterministic index hierarchy).This question can be answered effectively.Here we follow the method introduced by Niwiński and Walukiewicz [7].
A path in an automaton is a sequence of states and transitions: A loop is a path starting and ending in the same state, p 0 −→p 1 −→ . . .−→p 0 .A loop is called accepting if max i rank (p i ) is even.Otherwise it is rejecting.A j-loop is a loop with the highest rank on it equal to j.A sequence of loops λ ι , λ ι+1 , . . ., λ κ in an automaton is called an alternating chain if the highest rank appearing on λ i has the same parity as i and it is higher then the highest rank on λ i−1 for i = ι, ι + 1, . . ., κ.A (ι, κ)-flower is an alternating chain λ ι , λ ι+1 , . . ., λ κ such that all loops have a common state q (see Fig. 2). 1iwiński and Walukiewicz use flowers in their solution of the index problem for deterministic word automata.Theorem 2.1 (Niwiński, Walukiewicz [7]).A deterministic automaton on words is equivalent to a deterministic (ι, κ)-automaton iff it does not contain a (ι, κ)-flower.
Proposition 2.2.For a deterministic tree automaton A the language L(A) is recognised by a deterministic (ι, κ)-automaton iff A does not contain a (ι, κ)-flower.
In [5] it is shown how to compute the weak deterministic index of a given deterministic language.An automaton is called weak if the ranks may only decrease during the run, i. e., if p −→ q, then rank(p) ≥ rank(q).The weak deterministic index problem is to compute a weak deterministic automaton with minimal index recognising a given language.The procedure in [5] is again based on the method of difficult patterns used in Theorem 2.1 and Proposition 2.2.We need the simplest pattern exceeding the capability of weak deterministic (ι, κ)-automata.Just like in the case of the deterministic index, it seems natural to look for a generic pattern capturing all the power of (ι, κ).Intuitively, we need to enforce the alternation of ranks provided by (ι, κ).Let a weak (ι, κ)-flower be a sequence of loops λ ι , λ ι+1 . . ., λ κ such that λ j+1 is reachable from λ j , and λ j is accepting iff j is even (see Fig. 3).
For a deterministic language one may also want to calculate its nondeterministic index, i. e., the position in the hierarchy of nondeterministic automata.This may be lower than the deterministic index, due to greater expressive power of nondeterministic automata.Consider for example the language L M consisting of trees whose leftmost paths are in a regular word language M .It can be recognised by a nondeterministic (1, 2)-automaton, but its deterministic index is equal to the deterministic index of M , which can be arbitrarily high.
The problem transpired to be rather difficult and has only just been solved in [9].Decidability of the general index problem for nondeterministic automata is one of the most important open questions in the field.

Topology
We start with a short recollection of elementary notions of descriptive set theory.For further information see [3].
Let 2 ω be the set of infinite binary sequences with a metric given by the formula and T Σ be the set of infinite binary trees over Σ with a metric Both 2 ω and T Σ , with the topologies induced by the above metrics, are Polish spaces (complete metric spaces with countable dense subsets).In fact, both of them are homeomorphic to the Cantor discontinuum.The class of Borel sets of a topological space X is the closure of the class of open sets of X by complementation and countable sums.Within this class one builds so called Borel hierarchy.The initial (finite) levels of the Borel hierarchy are defined as follows: -countable unions of sets from Π 0 k (X).For example, Π 0 1 (X) are closed sets, Σ 0 2 (X) are F σ sets, and Π 0 2 (X) are G δ sets.By convention, Π 0 0 (X) = {X} and Σ 0 0 (X) = {∅}.Even more general classes of sets from the projective hierarchy.We will not go beyond its lowest level: • Σ 1 1 (X) -analytical subsets of X, i. e., projections of Borel subsets of X 2 with product topology, • Π 1 1 (X) -complements of sets from Σ 1 1 (X).Whenever the space X is determined by the context, we omit it in the notation above and write simply Σ 0 1 , Π 0 1 , and so on.Let ϕ : X → Y be a continuous map of topological spaces.One says that ϕ is a reduction Note that if B is in a certain class of the above hierarchies, so is A. For any class C a set B is C-hard, if for any set A ∈ C there exists a reduction of A to B. The topological hierarchy is strict for Polish spaces, so if a set is C-hard, it cannot be in any lower class.If a C-hard set B is also an element of C, then it is C-complete.
In 2002 Niwiński and Walukiewicz discovered a surprising dichotomy in the topological complexity of deterministic tree languages: a deterministic tree language has either a very low Borel rank or it is not Borel at all (see Fig. 4).We say that an automaton A admits a split if there are two loops p σ,0 −→ p 0 −→ . . .−→ p and p σ,1 −→ p 1 −→ . . .−→ p such that the highest ranks occurring on them are of different parity and the higher one is odd.Theorem 3.1 (Niwiński, Walukiewicz [8]).For a deterministic automaton A, L(A) is on the level Π 0 3 of the Borel hierarchy iff A does not admit split; otherwise An important tool used in the proof of the Gap Theorem is the technique of difficult patterns.In the topological setting the general recipe goes like this: for a given class identify a pattern that can be "unravelled" to a language complete for this class; if an automaton does not contain the pattern, then L(A) should be in the dual class.In the proof of the Gap Theorem, the split pattern is "unravelled" into the language of trees having only finitely many 1's on each path.This language is Π 1 1 -complete (via a reduction of the set of wellfounded trees).
In [5] a similar characterisation was obtained for the remaining classes from the above hierarchy.Before we formulate these result, let us introduce one of the most important technical notions of this study.A state p is replicated by a loop q 1 σ,d 0 We will say that a flower is replicated by a loop λ if it contains a state replicated by λ.The phenomenon of replication is the main difference between trees and words.We will use it constantly to construct hard languages that have no counterparts among word languages.Some of them occur in the proposition below.Theorem 3.2 (Murlak [5]).Let A be a deterministic automaton.

The Main Result
The notion of continuous reduction defined in Sect. 3 yields a preordering on sets.Let X and Y be topological spaces, and let A ⊆ X, B ⊆ Y .We write A ≤ W B (to be read "A is Wadge reducible to B"), if there exists a continuous reduction of A to B, i. e., a continuous function ϕ : X → Y such that A = ϕ −1 (B).We say that A is Wadge equivalent to B, in symbols The Wadge ordering is the ordering induced by ≤ W on the ≡ W -classes of subsets of Polish spaces.The Wadge ordering restricted to Borel sets is called the Wadge hierarchy.
In this study we only work with the spaces T Σ and Σ ω .Since we only consider finite Σ, these spaces are homeomorphic with the Cantor discontinuum {0, 1} ω as long as |Σ| ≥ 2. In particular, all the languages we consider are Wadge equivalent to subsets of {0, 1} ω .Note however that the homeomorphism need not preserve recognisability.In fact, no homeomorphism from T Σ to {0, 1} ω does: the Borel hierarchy for regular tree languages is infinite, but for words it collapses on ∆ 0 3 .In other words, there are regular tree languages (even weak, or F. MURLAK deterministic), which are not Wadge equivalent to regular word languages.Conversely, each regular word language L is Wadge equivalent to a deterministic tree language L ′ consisting of trees which have a word from L on the leftmost branch.As a consequence, the height of the Wadge ordering of regular word languages gives us a lower bound for the case of deterministic tree languages, and this is essentially everything we can conclude from the word case.
The starting point of this study is the Wadge reducibility problem.
Problem: Wadge reducibility Input: Deterministic tree automata A and B Question: An analogous problem for word automata can be solved fairly easy by constructing a tree automaton recognising Duplicator's winning strategies (to be defined in the next section).This method however does not carry over to trees.One might still try to solve the Wadge reducibility problem directly by comparing carefully the structure of two given automata, but we have chosen a different approach.We will provide a family of canonical deterministic tree automata for each deterministic tree automaton there exists exactly one i ∈ I such that L(A) ≡ W L(A i ), and this i can be computed effectively for a given A. The decidability of the Wadge reducibility problem follows easily from the existence of such a family: given two deterministic automata A and B, we compute i and j such that L(A) ≡ W L(A i ) and L(B) ≡ W L(A j ), and check if L(A i ) ≤ W L(A j ).
More precisely, we prove the following theorem.
Theorem 4.1.There exists a family of deterministic tree automata ) for 0 < α < β ≤ ω ω•3 + 2, whenever the respective automata are defined, we have where → means < W , and L(C α ) and L(D α ) are incomparable, (2) for each deterministic tree automaton A there exists exactly one automaton A ′ ∈ C ′ such that L(A ′ ) ≡ W L(A) and it is computable, i.e., there exists an algorithm computing for a given A a pair (Ξ, α) The family C ′ satisfies the conditions postulated for the family of canonical automata A: for ordinals presented as arithmetical expressions over ω in Cantor normal form the ordinal order is decidable, so we can take {C} × I ∪ {D, E} × J as the indexing set of A.
Observe that the pair (Ξ, α) computed for a given A can be seen as a name of the ≡ W -class of L(A).Hence, the set {C} × I ∪ {D, E} × J together with the order defined in the statement of theorem provides a complete effective description of the Wadge hierarchy restricted to deterministic tree languages.One thing that follows is that the height of the hierarchy is ω ω•3 + 3.
The remaining part of the paper is in fact a single long proof.We start by reformulating the classical criterion of reducibility via Wadge games in terms of automata (Sect.5).This will be the main tool of the whole argument.Then we define four ways of composing automata: sequential composition ⊕, replication →, parallel composition ∧, and alternative ∨ (Sect.6).Using the first three operations we construct the canonical automata, all but top three ones (Sect.7).Next, to rehearse our proof method, we reformulate and prove Wagner's results in terms of canonical automata (Sect.8).Finally, after some preparatory remarks (Sect.9), we prove the first part of Theorem 4.1, modulo three missing canonical automata.
Next, we need to show that our family our family contains all deterministic tree automata up to Wadge equivalence of the recognised languages.Once again we turn to the methodology of patterns used in Sect. 2 and Sect.3. We introduce a fundamental notion of admittance, which formalises what it means to contain an automaton as a pattern (Sect.11).Then we generalise → to (ι, κ)-replication (ι,κ) −→ in order to define the remaining three canonical automata, and rephrase the results on the Borel hierarchy and the Wagner hierarchy in terms of admittance of canonical automata (Sect.12).Basing on these results, we show that the family of canonical automata is closed by the composition operations (Sect.13), and prove the Completeness Theorem asserting that (up to Wadge equivalence) each deterministic automaton may be obtained as an iterated composition of C 1 and D 1 (Sect.14).As a consequence, each deterministic automaton is equivalent to a canonical one.From the proof of the Completeness Theorem we extract an algorithm calculating the equivalent canonical automata, which concludes the proof of Theorem 4.1.

Games and Automata
A classical criterion for reducibility is based on the notion of Wadge games.Let us introduce a tree version of Wadge games (see [10] for word version).By the nth level of a tree we understand the set of nodes {0, 1} n−1 .The 1st level consists of the root, the 2nd level consists of all the children of the root, etc.For any pair of tree languages L ⊆ T Σ 1 , M ⊆ T Σ 2 the game G W (L, M ) is played by Spoiler and Duplicator.Each player builds a tree, t S ∈ T Σ 1 and t D ∈ T Σ 2 respectively.In every round, first Spoiler adds some levels to t S and then Duplicator can either add some levels to t D or skip a round (not forever).The result of the play is a pair of full binary trees.Duplicator wins the play if t S ∈ L ⇐⇒ t D ∈ M .We say that Spoiler is in charge of L, and Duplicator is in charge of M .
Just like for the classical Wadge games, a winning strategy for Duplicator can be easily transformed into a continuous reduction, and vice versa.Proof.A strategy for Duplicator defines a reduction in an obvious way.Conversely, suppose there exist a reduction t → ϕ(t).It follows that there exist a sequence n k (without loss of generality, strictly increasing) such that the level k of ϕ(t) depends only on the levels 1, 2, . . ., n k of t.Then the strategy for Duplicator is the following: if the number of the round is n k , play the kth level of t D according to ϕ; otherwise skip.

F. MURLAK
We would like to point out that Wadge games are much less interactive than classical games.The move made by one player has no influence on the possible moves of the other.Of course, if one wants to win, one has to react to the opponent's actions, but the responses need not be immediate.As long as the player keeps putting some new letters, he may postpone the real reaction until he knows more about the opponent's plans.Because of that, we will often speak about strategies for some language without considering the opponent and even without saying if the player in charge of the language is Spoiler or Duplicator.
Since we only want to work with deterministically recognisable languages, let us redefine the games in terms of automata.Let A, B be deterministic tree automata.The automata game G(A, B) starts with one token put in the initial state of each automaton.In every round players perform a finite number of the actions described below.Fire a transition: for a token placed in a state q choose a transition q σ −→ q 1 , q 2 , take the old token away from q and put new tokens in q 1 and q 2 .Remove: remove a token placed in a state different from ⊥.
Spoiler plays on A and must perform one of these actions at least for all the tokens produced in the previous round.Duplicator plays on B and is allowed to postpone performing an action for a token, but not forever.Let us first consider plays in which the players never remove tokens.The paths visited by the tokens of each player define a run of the respective automaton.We say that Duplicator wins a play if both runs are accepting or both are rejecting.Now, removing a token from a state p is interpreted as plugging in an accepting subrun in the corresponding node of the constructed run.So, Duplicator wins if the runs obtained by plugging in an accepting subrun for every removed token are both accepting or both rejecting.
Observe that removing tokens in fact does not give any extra power to the players: instead of actually removing a token, a player may easily pick an accepting subrun, and in future keep realising it level by level in the constructed run.The only reason for adding this feature in the game is that it simplifies the strategies.In a typical strategy, while some tokens have a significant role to play, most are just moved along a trivially accepting path.It is convenient to remove them right off and keep concentrated on the real actors of the play.
We will write A ≤ B if Duplicator has a winning strategy in G(A, B).Like for languages, define Lemma 5.2.For all deterministic tree automata A and B, Proof.First consider a modified Wadge game G ′ W (L, M ), where players are allowed to build their trees in an arbitrary way provided that the nodes played always form one connected tree, and in every round Spoiler must provide both children for all the nodes that were leaves in the previous round.It is very easy to see that Duplicator has a winning strategy in G ′ W (L, M ) iff he has a winning strategy in G W (L, M ).
Suppose that Duplicator has a winning strategy in G(A, B).We will show that Duplicator has a winning strategy in G ′ W (L(A), L(B)), and hence L(A) ≤ W L(B). What Duplicator should do is to simulate a play of G(A, B) in which an imaginary Spoiler keeps constructing the run of A on the tree t S constructed by the real Spoiler in G ′ W (L(A), L(B)), and Duplicator replies according to his winning strategy that exists by hypothesis.In Duplicator should simply construct a tree such that B's run on it is exactly Duplicator's tree from G(A, B).
Let us move to the converse implication.Now, Duplicator should simulate a play in the game G ′ W (L(A), L(B)) in which Spoiler keeps constructing a tree such that A's run on it is exactly the tree constructed by the real Spoiler in G(A, B), and Duplicator replies according to his winning strategy.In G(A, B) Duplicator should keep constructing the run of B on t D constructed in the simulated play.
As a corollary we have that all automata recognising a given language have the same "game power".
Corollary 5.3.For deterministic tree automata A and B, if Classically, in automata theory we are interested in the language recognised by an automaton.One language may be recognised by many automata and we usually pick the automaton that fits best our purposes.Here, the approach is entirely different.We are not interested in the language itself, but in its Wadge equivalence class.This, as it turns out, is reflected in the general structure of the automaton.Hence, our main point of interest will be that structure.
We will frequently modify an automaton in a way that does change the recognised language, but not its ≡ W -class.One typical thing we need to do with an automaton, is to treat it as an automaton over an extended alphabet in such a way, that the new recognised language is Wadge equivalent to the original one.This has to be done with some care, since the automaton is required to have transitions by each letter from every state.Suppose we want to extend the input alphabet by a fresh letter τ .Let us construct an automaton A τ .First, if A has the all-rejecting state ⊥, add a transition ⊥ An automaton for us is not as much a recognising device, as a device to carry out strategies.Therefore even two automata with substantially different structure may be equivalent, as long as they enable us to use the same set of strategies.A typical thing we will be doing, is to replace a part of an automaton with a different part that gives the same strategical possibilities.Recall that by A q we denote the automaton A with the initial state changed to q.For q ∈ Q A let A q:=B denote the automaton obtained from a copy of A and −→ q B 0 .Note that A q:=Aq is equivalent to A. Let us see that this strategy is winning.Suppose first that Spoiler's run is rejecting.Then there is a rejecting path, say π.If on π the computation stays in C, in Duplicator's run π is also rejecting.Suppose π enters A. Let v be the first node of π in which the computation is in A. The subrun of Spoiler's run rooted in v is a rejecting run of A. Since Duplicator was applying a winning strategy form G(A, B), the subrun of Duplicator's run rooted in v is also rejecting.In either case, Duplicator's run is rejecting.Now assume that Spoiler's run is accepting, and let us see that so is Duplicator's.All paths staying in C are accepting, because they are identical to the paths in Spoiler's run.For every v in which the computation enters B, the subrun rooted in v is accepting thanks to the winning strategy form G(A, B) used to construct it.

Operations
It this section we introduce four operations that will be used to construct canonical automata representing Wadge degrees of deterministic tree languages.
The first operation yields an automaton that lets a player choose between A and B. For two deterministic tree automata A and B over Σ, the alternative A ∨ B (see Fig. 5) is an automaton with the input alphabet Σ ∪ {a, b} consisting of disjoint copies of A and B over the extended alphabet Σ ∪ {a, b}, A a,b and B a,b , and a fresh initial state q 0 with transitions . By Lemma 5.5, ≡ is a congruence with respect to ∨.Furthermore, ∨ is associative and commutative up to ≡.Multiple alternatives are performed from left to right: The parallel composition A ∧ B is defined analogously, only now we extend the alphabet only by a and add transitions Note that, while in A∨B the computation must choose between A and B, here it continues in both.Again, ≡ is a congruence with respect to ∧.The language L(A∧B) is Wadge equivalent to L(A)×L(B) and ∧ is associative and commutative up to ≡.Multiple parallel compositions are performed from left to right, and for n > 0 the symbol (A) To obtain the replication A → B, extend the alphabet again by {a, b}, set rank(q 0 ) = 1, and add and transitions Like for two previous operations, ≡ is a congruence with respect to →.
The last operation we define produces out of A and B an automaton that behaves as A, but in at most one point (on the leftmost path) may switch to B. A state p is leftmost if no path connecting the initial state with p uses a right transition.In other words, leftmost states are those which can only occur in the leftmost path of a run.Note that an automaton may have no leftmost states.Furthermore, a leftmost state cannot be reachable from a non-leftmost state.In particular, if an automaton has any leftmost states at all, the initial state has to be leftmost.For deterministic tree automata A and B over Σ, the sequential composition A ⊕ B (see Fig. 6) is an automaton with the input alphabet  Observe that if A has a leftmost state, then a state in A ⊕ B is leftmost iff it is a leftmost state of A or a leftmost state of B. It follows that the ≡-class of a multiple sequential composition does not depend on the way we put parentheses.An analog of ⊕ for word automata defines an operation on ≡-classes, but for tree automata this is no longer true.We will also see later that ⊕ is not commutative even up to ≡.
The priority of the operations is ⊕, ∧, ∨, →.For instance ).Nevertheless, we usually use parentheses to make the expressions easier to read.
Finally, let us define the basic building blocks, to which we will apply the operations defined above.The canonical (ι, κ)-flower F (ι,κ) (see Fig. 7) is an automaton with the input alphabet {a ι , a ι+1 . . ., a κ }, the states q ι , q ι+1 , . . ., q κ where the initial state is q ι and rank(q i ) = i, and transitions In the definitions above we often use an all-accepting state ⊤.This is in fact a way of saying that a transition is of no importance when it comes to possible strategies: a token moved to ⊤ has no use later in the play.Therefore, we may assume that players remove their tokens instead of putting them to ⊤.In particular, when a transition is of the form p σ −→ q, ⊤, it is convenient to treat it as a "left only" transition in which no new token is created, only the old token is moved from p to q.Consequently, when analysing games on automata, we will ignore the transitions to ⊤.

Canonical Automata
For convenience, in this section we put together the definitions of all canonical automata (save for three which will be defined much later) together with some very simple properties.More explanations and intuitions come along with the proofs in the next three sections.
For each α < ω ω•3 we define the canonical automaton C α .The automata D α and E α will only be defined for 0 < α < ω and α = ω ω•2 α 2 + ω ω α 1 + n with 0 < α 1 < ω ω , α 2 < ω ω , n < ω.All the defined automata have at least one leftmost state, so the operation ⊕ is always non-trivial. Let , and For ω ≤ α < ω ω we only define For every α from the considered range we have a unique presentation and for l 0 > 0 set ) and E ω ω+k = F (0,k+1) ∨ F (1,k+2) .For every α from the considered range we have a unique presentation α = ω ω α 1 + α 0 with α 0 , α 1 < ω ω and α 1 > 0. Let α 1 = ω l k n k + ω l k−1 n k−1 + . . .+ ω l 0 n 0 , with ω > l k > l k−1 > . . .> l 0 and 0 < n i < ω.For α 0 = 0 and l 0 = 1 let and for α 0 > ω let for ω > α 0 > 0 and α 1 = 0 let and in the remaining case (α 0 > ω or α 1 > 0) let Let C denote the family of the canonical automata, i. e., In the next three sections we will investigate the order induced on C by the Wadge ordering of the recognised languages.Now, let us discuss briefly the anatomy and taxonomy of the canonical automata.Simple automata are those canonical automata that cannot be decomposed with respect to ⊕, i. e., the automata on the levels ω k , ω ω+k , and ω ω•2+k for k < ω.Complex automata are those obtained from simple ones by means of ⊕.If for some automata A 1 , A 2 , . . ., A n we have A = A 1 ⊕ A 2 ⊕ . . .⊕ A n , we call A i components of A. If A i are simple, they are called simple components of A, A 1 is the head component, and A n is the tail component.Non-branching canonical automata are those constructed from flowers without the use of →, i. e., C ω ω α+n , D ω ω α+n , E ω ω α+n for α < ω ω and n < ω.The remaining automata are called branching.The term head loop refers to any minimal-length loop around the initial state.If the head component of a canonical automaton is branching, then the automaton has only one head loop.Similarly, if the head component is According to the definition of the automata game, in a branching transition a token is split in two.However in branching canonical automata, the role to be played by two new tokens is very different.Therefore, we prefer to see the process of splitting a token as producing a new token that moves along the right branch of the transition, while the original one moves left.Thus each token moves along the leftmost path from the node it was born in, bubbling out new tokens to the right.Let us prove the following simple yet useful property of those paths.Proof.Observe that in a canonical automaton the only loop using right transitions is the loop around ⊤.In other words, each path of the constructed computation that does not reach ⊤ goes right only a bounded number of times (depending on the automaton).Now, consider a rejecting run constructed during a play.It must contain a rejecting path π.The token created during the last right transition on π visits a suffix of π, which of course is a rejecting path.
Recall that we have defined the operation ⊕ in such a way, that the second automaton can only be reached via a leftmost path.This means that the only token that can actually move from one simple automaton to another is the initial token.Since passing between the simple automata forming a canonical automaton is usually the key strategic decision, we call the initial token critical, and the path it moves along, the critical path.
Since we can remove the tokens from ⊤ with no impact on the outcome of the game, we can assume that in transitions of the form p σ −→ q, ⊤ or p σ −→ ⊤, q no new tokens are produced, only the old token moves from p to q.The following fact relies on this convention.Proposition 7.2.If a player in charge of a canonical automaton produces infinitely may tokens, the resulting run is rejecting.
Proof.We will proceed by structural induction.The claim holds trivially for non-branching automata.Suppose now that A = C 1 → A ′ .If the constructed run is to be accepting, the player can only loop a finite number of times in the head loop of A, thus producing only a finite number of new tokens.By the induction hypothesis for A ′ , those tokens can only have finitely many descendants.Hence, in the whole play there can be only finitely many tokens.Now, take A = A ′ ⊕ A ′′ .Suppose there were infinitely many tokens in some play on A. Observe that all the tokens in A ′′ are descendants of A ′′ 's critical token.Hence, if there were infinitely many tokens in A ′′ , by the induction hypothesis for A ′′ the whole run is rejecting.Suppose there were infinitely many tokens in A ′ .Consider a play in which the critical token instead of moving to A ′′ stays in the last accepting loop of A ′ (it exists by the definition of canonical automata).In such a play a run of A ′ is build.Since there are infinitely many tokens used, the run is rejecting by the induction hypothesis for A ′ .Consequently, the run of A constructed in the original play must have been rejecting as well.

Without Branching
In this section we briefly reformulate Wagner's results on regular word languages [15] in terms of canonical automata.For the sake of completeness, we reprove them in our present framework.
The scenario is just like for tree languages: define a collection of canonical automata, prove that they form a strict hierarchy with respect to the Wadge reducibility, check some closure properties, and provide an algorithm calculating the equivalent canonical automaton for a given deterministic automaton, thus proving that the hierarchy is complete for regular languages.
Since the non-branching canonical automata have only left transitions, they only check a regular word property on the leftmost path.It is easy to see that for each word language K, the language of trees whose leftmost branch is in K is Wadge equivalent to K. Based on this observation, we will treat the non-branching canonical automata as automata on words.
For (2) the remaining reduction is obtained by assigning to a sequence n 1 n 2 n 3 . . . the tree with the word a n 1 a n 1 a n 2 a n 2 a n 3 a n 3 . . . on the leftmost branch, and a a ι elsewhere.
Let us now suppose that β = ω k for some k < ω.Then α = ω k−1 n k−1 + . . .+ n 0 .By definition, Êα , has index at most (0, k).Hence, by Lemma 8.1, Êα ≤ F (0,k) = Ĉβ .If we increase the ranks in each F (0,l) in Êα by 2, we obtain an automaton with index at most (1, k + 1) recognising the same language.Hence, we also have Êα ≤ F (1,k+1) = Dα .Now, consider the general case.We have a unique pair of presentations α = ω k m k + . . .+ m 0 and β = ω k n k + . . .+ n 0 with n k > 0. Let i be the largest number satisfying Consider the game G( Êα 0 ⊕ Êγ , Êβ 0 ⊕ Ĉγ ).The strategy for Duplicator is as follows.First move the token to the last F (0,i) in Ĉβ 0 .Then follow the strategy given by the inequality Êα 0 ≤ F (0,i) , as long as Spoiler stays in Êα 0 .If he stays there forever, Duplicator wins.If Spoiler moves to Êγ , Duplicator should do the same and keep copying Spoiler's move from that moment on.This also guarantees winning.The proof for Dβ is entirely analogous.
In order to prove that the inequalities are strict it is enough to show that Ĉα ≤ Dα and Dα ≤ Ĉα .We only prove that Ĉα ≤ Dα ; the proof for Dα ≤ Ĉα is entirely analogous.Let us proceed by induction.The assertion holds for α = 1: the whole space is not reducible to the empty set.Let us take α > 1.By the definition, Ĉα = F (0,k) ⊕ Êγ , Dα = F (1,k+1) ⊕ Êγ , where α = ω k + γ.Consider the game G(F (0,k) ⊕ Êγ , F (1,k+1) ⊕ Êγ ).We have to find a winning strategy for Spoiler.If Duplicator never leaves F (1,k+1) Spoiler can stay in F (0,k) and win using the strategy given by the Lemma 8.1 (3).Otherwise, after Duplicator enters Êγ , he must make choice between Ĉγ and Dγ .Spoiler should loop in any loop of F (0,k) waiting for Duplicator's choice.When Duplicator chooses one of Ĉγ , Dγ , Spoiler should choose the other one and use the strategy given by the induction hypothesis.
The third step is proving closure by natural operations.For word automata only the operations ⊕ and ∨ make sense.The operation ∨ is defined just like for trees.To define ⊕, simply assume that all states are leftmost.It is easy to see that ≡ is a congruence with respect to ⊕ and ∧.Both operations are associative up to ≡.
For the converse inequality consider G(A 1 ∨ A 2 , A 1 ).In the first move, Spoiler moves his initial token either to A 1 or to A 2 .If Spoiler chooses A 1 , Duplicator may simply mimic Spoiler's actions in his copy of A 1 .If Spoiler chooses A 2 , Duplicator wins by applying the strategy from G(A 2 , A 1 ), guaranteed by the inequality In the remaining case A 1 and A 2 are incomparable.But then A 1 = Ĉα , A 2 = Dα for some α < ω ω (or symmetrically).It is very easy to see that Ĉα ∨ Dα ≡ Êα .
Let us now consider A 1 ⊕ A 2 .Since ⊕ is associative up to ≡ and only depends on the ≡-classes of the input automata, it is enough to prove the claim for simple A 1 ; in order to obtain a canonical automaton for (A Using the property above, we easily reduce the general situation to one of the following cases: Ĉω k ⊕ Ĉηω k+1 , Ĉω k ⊕ Dηω k , or Ĉω k ⊕ Êηω k .In the third case, the automaton is already canonical.Let us calculate the result in the first two cases. In the first case we have Ĉω k ⊕ Ĉηω k+1 ≡ Ĉηω k+1 .Consider the game G( Ĉω k ⊕ Ĉηω k+1 , Ĉηω k+1 ).Let Ĉω l be the head component of Ĉηω k+1 .It holds that l > k.In order to win the game, while Spoiler stays inside Ĉω k , Duplicator should stay in Ĉω l and use the strategy from G( Ĉω k , Ĉω l ).When Spoiler enters Ĉηω k+1 , Duplicator may simply copy his actions.The converse inequality is trivial.For A 1 = Dω k , simply dualise the claims and the proofs.
and the equivalent canonical automaton can be obtained by previous cases.
Let us now see that the hierarchy is complete for word languages.Proof.We will proceed by induction on the height of the DAG of strongly connected components of A. Without loss of generality we may assume that all states of A are reachable from the initial state.In such case, the DAG of SCCs is connected and has exactly one root component, the one containing the initial state of the automaton.
Suppose that the automaton is just one strongly connected component.Let (ι, κ) be the highest index for which A contains a (ι, κ)-flower.It is well defined, because if A contains a (0, k)-flower and a (1, k + 1)-flower, it must also contain a (0, k + 1)-flower.By Theorem 2.2, A is equivalent to a (ι, κ)-automaton and so, by Lemma 8.1, A ≤ F (ι,κ) .On the other hand it is easy to see, that in G(F (ι,κ) , A), Duplicator may easily use the (ι, κ)-flower in A to mimic Spoiler's actions in F (ι,κ) .Hence, A ≡ F (ι,κ) .Now, suppose that the DAG of SCCs of A has at least two nodes.Let X be the root SCC.Like before, let (ι, κ) be the maximal index such that X contains a (ι, κ)-flower.Let q 1 , . . ., q m be all the states reached by the transitions exiting X (the "initial" states of the SCCs that are children of X).Recall that A q is the automaton A with the initial state set to q.Let B i be the canonical non-branching automaton equivalent to A q i .It is easy to see

The Use of Replication
Branching automata are defined by iterating →.The significance of → lies in the fact that closing the family of non-branching automata by this operation gives, up to Wadge equivalence, almost all deterministic tree languages (only C ω ω•3 , C ω ω•3 +1 , and C ω ω•3 +2 will be defined by means of a stronger replication).In particular, we will show that the operation ∧ is not needed.In other words, → is everything that deterministic tree automata have, which word automata have not.Let us see then what the use of the operation → is.
There are two kinds of simple branching automata.The first one is obtained by iterating → on C 3 , and generalises C n .Intuitively, C n = C 1 ⊕ (n − 1)E 1 lets a player in an automata game change his mind n − 1 times in the following sense.First, the player moves his (only) token along the head loop.The head loop is accepting, so if he keeps looping there forever, the resulting run will be accepting.But after some time he may decide that producing an accepting run is not a good idea.In such a case he can move to the rejecting loop in the first copy of E 1 .Later he may want to change his mind again, and again, until he reaches the last copy of E 1 .Now, when the player is in charge of C ω = C 1 → C 3 he can choose a number n < ω, and looping in the head loop of C ω produce n tokens in the head loop of his copy of C 3 .We will see that with those tokens it is possible to simulate any strategy designed for C n+2 .In other words, C ω offers the choice between C n for arbitrarily high n ≥ 3. The automaton C ω 2 = C 1 → (C 1 ⊕ (C 1 → C 3 )) lets you choose the number of times you will be allowed to choose some C n , and so on.
The second kind of simple branching automata, obtained by iterating → on C ω ω+1 , does the same with C ω ω+n instead of C n .For instance, C ω ω•2 = C 1 → C ω ω+1 lets the player choose any C ω ω+n = Ĉω n (see page 18), and in consequence L(C ω ω•2 ) is hard for the class of regular languages of words.
Let us now see the proofs.The first lemma justifies the name replication.
Lemma 9.1.For all automata A, B and all 0 < k < ω, (1) Proof.To see that (1) holds, consider G((A → B) ∧ (B) k , A → B).Spoiler's initial moves produce a token x in the head loop of A → B, and tokens x 1 , . . ., x k , each in a different copy of B. Duplicator should loop his starting token y around the head loop of A → B exactly k times producing for each x i a doppelgänger y i and move them all to the initial state of B (see Fig. 9).From now on y mimics x, and y i mimics x i for i = 1, . . ., k.

F. MURLAK
For the proof of (2) it is enough to check that (C and the claim follows. Next we need to calculate the value of (C 3 ) n and (C ω ω+1 ) n .Apart from canonical (ι, κ)flowers F (ι,κ) , we consider the following automata containing weak (ι, κ)-flowers (see page 5): We will refer to these automata as weak (ι, κ)-flowers too.In fact, W F (0,n) ≡ C n+1 , W F (1,n+1) ≡ D n+1 , but we find the notation convenient.
Since A has the index (ι, κ), the automaton itself provides a reduction of By definition of (ι, κ), there exists a sequence of pairs such that for all i it holds that ι 1 ≤ x i ≤ κ 1 , ι 2 ≤ y i ≤ κ 2 , and x i and y i are even iff i is even.The reduction is given by the function The proof for weak flowers is entirely analogous.
Lemma 9.3.For all 0 < k, l < ω and all m < ω Observe that Duplicator's critical token will move along a copy of W F (0,2k+2l) formed by the leftmost states of consecutive copies of C ω m (see Fig. 10).Spoiler's initial token splits in the first move in two tokens which continue moving along W F (0,2k) and W F (0,2l) .For the purpose of this proof, call them both critical.
The strategy for Duplicator is based on the fact that W F (0,2k) ∧ W F (0,2l) ≡ W F (0,2k+2l) (Lemma 9.2).Duplicator can loop his critical token inside an accepting loop as long as both Spoiler's critical tokens loop inside accepting loops.When Spoiler changes his mind and moves one of them to a rejecting loop, Duplicator should move to a rejecting loop too, and keep looping there until both Spoiler's tokens are again in accepting loops.This can only repeat k + l times, so Duplicator is able to realise this strategy.
This way, whenever Spoiler produces a new token x using one of the critical tokens, Duplicator can produce its doppelgänger y.The role of the doppelgänger is to mimic the F. MURLAK original.The mimicking is in fact passed from generation to generation: if the original token bubbles a new token x ′ , y should bubble a new doppelgänger y ′ which is to mimic x ′ , and so on.
In order to see that the strategy is winning it is enough to observe two facts: Duplicator's critical token stays in a rejecting loop forever iff one of Spoiler's critical tokens does, and the sequence of ranks seen by any of Spoiler's non-critical tokens is equal to the one seen by its doppelgänger.Hence, The converse inequality is proved in a similar way and for the second equivalence the same proof works.
The remaining two inequalities are analogous.

Automata in Order
Let us start examining the order on canonical automata with the following simple observation.
Lemma 10.1.For all 0 < α < ω ω Proof.We give a proof for the first inequality; the second one is proved analogously.Consider the following strategy for Duplicator in G(C α , C ω ω ).In every move, if any of Spoiler's tokens is inside a rejecting loop, Duplicator should move his critical token around a 1-loop, otherwise he should loop around the 0-loop.Let us see that the strategy is winning.By Proposition 7.2 if Spoiler's run is to be accepting, he must produce only finitely many tokens.All of those tokens must finally get to some 0-loop, and stay there forever.This means that after some number of moves, all Spoiler's tokens are in 0-loops which they will never leave later.But from this moment on Duplicator's critical token will keep looping around the 0-loop, so Duplicator's run will also be accepting.
By Proposition 7.1, if Spoiler's run is to be rejecting, there must be a token that from some moment on stays forever in a 1-loop.Then Duplicator's token will also get trapped in the rejecting loop in C ω ω , and Duplicator's run will be rejecting too.
Let us now see that we can restrict the way the players use non-critical tokens.For a simple automaton A and a canonical automaton B = B 1 ⊕ . . .⊕ B n with B i simple, we say that B dominates A if one of the following conditions holds Lemma 10.2.Let A 1 , A 2 , . . ., A n be simple and let B be a canonical automaton dominating all A i .For every deterministic automaton C, if Spoiler has a winning strategy in G(A 1 ⊕ . . .⊕ A n ⊕ B, C), then he also has a strategy in which he removes all non-critical tokens before entering B. Similarly for Duplicator in G(C, A 1 ⊕ . . .⊕ A n ⊕ B).
Proof.Let B = B 1 ⊕ . . .⊕ B n with B i simple.Suppose that at some moment the strategy tells Spoiler to enter B (if this never happens, the claim is obvious).If there are no noncritical tokens left in A 1 , A 2 , . . ., A n , then we are done.However if there are, we have to take extra care of them.Suppose Spoiler has produced non-critical tokens x 1 , . . ., x r , and x i is in A m i .Since x i is not on a critical path of A m i , by the definitions of canonical automata, it will stay within a copy of C α i over the alphabet extended to the alphabet of B. Suppose Spoiler should replace the token x i with x ′ i and let x ′ i take over the duties of x i .To produce x ′ i , Spoiler should loop once in the head loop of i to a copy of C α i and let it perform exactly the actions x i would take.If i to the copy of F (0,2) contained in C β , and let it apply the strategy guaranteed by Lemma 10.1.To see that the strategy is applicable, it is enough to note that it does not require any waiting, and that F (0,2) contains a copy of F (0,1) .
Suppose now that B 1 is non-branching.Then, α i < ω ω for all i.In this case Spoiler cannot produce a token to take over x i 's duties.Instead, he has to modify the actions of the critical token.He should move the critical token according to his original strategy moving from flower to flower, only when one of his non-critical tokens would be in a rejecting loop, he should choose a 1-loop in his current flower (instead of the loop suggested by the old strategy).Just like in the proof of Lemma 10.1, if in a play according to the original strategy one of the non-critical tokens stays forever in a rejecting loop, then in the game according to the new strategy the critical token finally also gets trapped in a 1-loop.Otherwise, there are only finitely many non-critical tokens, and all of them finally stabilise in an accepting loop.From that moment on, the critical token will see exactly the same ranks as it would see if Spoiler was playing with the original strategy.Hence, the modified strategy is also winning.
If the original strategy brings Spoiler to a branching automaton, he should produce counterparts of his non-critical tokens just like above.
Corollary 10.3.For every canonical automaton of the form A⊕ B and every deterministic tree automaton C, if a Spoiler has a winning strategy in G(A ⊕ B, C), than he has also a winning strategy which removes all non-critical tokens before entering B. Similarly for Duplicator in G(C, A ⊕ B).

Proof. As an auxiliary claim let us see that if A⊕B is canonical and A
Indeed, the following is a winning strategy for Duplicator in G(A⊕B, A ′ ⊕B).While Spoiler keeps inside A, apply the strategy from G(A, A ′ ).If Spoiler enters B, by Corollary 10.3 we F. MURLAK may assume he removes all non-critical tokens.Hence, Duplicator may remove non-critical tokens, move the critical token to B and copy Spoiler's actions.
Let us now see that C α ≤ C β for α < β < ω ω•3 ; the other inequalities may be proved in an analogous way.We will proceed by induction on (α, β) with lexicographic order.If β < ω, the result follows by the word languages case.Suppose that ω ≤ β < ω ω .Let α = ω k m k + . . .+ m 0 and β = ω k n k + . . .+ n 0 , n k > 0. First, assume that m k = 0. Obviously C ω k ≤ C β , simply because C β contains a copy of C ω k .If k = 1 the claim follows directly from Corollary 9.4.For k > 1, using the induction hypothesis and Corollary 9.4, we get Observe that the argument works also for α 0 or β 0 equal to 0.
The case For a complete description of the ordering on the canonical automata (see Fig. 11) we need the strictness of the inequalities from the previous lemma.
Theorem 10.5.Let 0 < α ≤ β < ω ω•3 .Whenever the respective automata are defined, it holds that We will only give a proof of the first inequality; the others can be argued similarly.We will proceed by induction on α.If α < ω, the claim follows by the word languages case.
Suppose ω ≤ α < ω ω .Then α = ω k + α ′ with k ≥ 1, α ′ < ω k+1 .Let α ′ ≥ 1 (the remaining case is similar).We shall describe a winning strategy for Spoiler in G = G(C ω k +α ′ +1 , C ω k +α ′ ).Spoiler should first follow the winning strategy for G(C α ′ +1 , C α ′ ), which exists by the induction hypothesis.Suppose that Duplicator enters the head loop of C ω k .We may assume that he removes all his non-critical tokens (Corollary 10.3).Spoiler should remove all his non-critical tokens, move his critical token to any accepting loop in C α ′ +1 .Let us check that such a loop is always reachable for the critical token. Let ).It follows that in any play on C 2n+1 or D 2n , if one has a winning strategy, one also has a winning strategy never entering the rejecting loop of the tail component.Hence, the accepting loop in the tail component is always reachable (or has been reached already).
Thus, Spoiler can move his critical token to an accepting loop in the tail component of C α ′ +1 and loop there until Duplicator leaves the head loop.If Duplicator stays forever in the head loop of C ω k , he loses.Suppose that Duplicator leaves the head loop of C ω k after producing r tokens.The rest of the game is equivalent to Figure 11: The Wadge ordering of the canonical automata.
, where A j is the part of C ω k accessible for the Duplicator's jth token.
If k = 1, then A j ≤ W F (0,2) for each j.Hence A ≤ W F (0,2r) and by Corollary 9.4 Spoiler has a winning strategy in and so, by Lemma 5.5, , we may use the induction hypothesis to get a winning strategy for Spoiler in G ′ .In either case Spoiler has a winning strategy in G as well.Now, assume Again, we describe a strategy for Spoiler in G = G(C ω ω α 1 +α 0 +1 , C ω ω α 1 +α 0 ) only for α 0 ≥ 1, leaving the remaining case to the reader.First follow the winning strategy from G(C α 0 +1 , C α 0 ).If Duplicator does not leave the C α 0 component, he will lose.After leaving C α 0 , Duplicator has to choose D ω ω α 1 or C ω ω α 1 .Suppose he chooses D ω ω α 1 .Again, by Corollary 10.3 we may assume that he removes all non-critical tokens.Now, Spoiler has to remove all non-critical tokens and move the critical token to the initial state of E ω ω α 1 and use the winning strategy from

Patterns in Automata
Compare the notion of (ι, κ)-flower defined in Sect. 2 and the canonical flower F (ι,κ) .It is fairly clear that if A contains a (ι, κ)-flower, Duplicator can win in G(F (ι,κ) , A) by copying Spoiler's actions.In that case it seems plausible to look at A as if it "contained" a copy of F (ι,κ) .In this section we provide a notion which captures this intuition.

Two paths p
An automaton B can be embedded into an automaton A, if there exists a function where Π A is the set of paths in A, satisfying the following conditions: for all p, σ the paths e δ (p, σ, 0) and e δ (p, σ, 1) are branching, (3) for every loop λ in B, the corresponding loop in A (obtained by concatenating the paths assigned to the edges of λ) is accepting iff λ is accepting.
For each tree automaton A, let A ′ be the automaton obtained from A by unravelling the DAG of strongly connected components into a tree (for the purpose of this definition, we allow multiple copies of ⊥).An automaton A admits an automaton B, in symbols B ⊑ A, if the automaton B ′ can be embedded into A. Note that if B can be embedded into A, then A ⊑ B. Proof.Since L(B ′ ) = L(B), without loss of generality we may assume that B = B ′ .We have to provide a winning strategy for Duplicator in G(B, A).Without loss of generality, we may assume that Spoiler never removes his tokens.Let e Q and e δ be the embedding functions.We will show that Duplicator can keep a collection of doppelgängers, one for each Spoiler's token, such that if some Spoiler's token x is in the state p, its doppelgänger y is in the state e Q (p).
Let us first assume that e Q (q B 0 ) = q A 0 .Then the invariant above holds when the play starts.As long as Spoiler does not enter ⊥, the invariant can be maintained by means of the function e δ as follows.Suppose that Spoiler fires a transition q σ −→ q ′ , q ′′ for some token x obtaining new tokens x ′ and x ′′ .Let Recall that we assume that for every transition, either both target states are ⊥ or none.Since q ′ = ⊥ and q ′′ = ⊥ then, by the condition (3) of the definition of admittance, p ′ m = ⊥ and p ′′ n = ⊥ and consequently all the states p i , r i , p ′ j , r ′ j , p ′′ k , r ′′ k are not equal to ⊥.Hence, Duplicator can proceed as follows.Starting with the token y (the doppelgänger of x), fire the transitions forming the common prefix of both paths, each time removing the token sent to r i .Thus he reaches the state p l−1 with a descendant of the token y.Then he should fire the next transition producing two tokens y ′ and y ′′ , and for each of them fire the remaining sequence of transitions (again removing the tokens in the states r ′ j and r ′′ k ).Thus he ends up with two tokens in the states p ′ m = e Q (q ′ ) and p ′′ n = e Q (q ′′ ).Hence, the token in e Q (q ′ ) may be the doppelgänger of x ′ , and the token in e Q (q ′′ ) may be the doppelgänger of x ′′ .
Let us see that if Spoiler never enters ⊥, Duplicator wins.Observe that the function e δ induces a function e from the set of infinite paths in B to the set of infinite paths in A. Owing to the condition (3), e(π) is accepting iff π is accepting.The strategy used by Duplicator guarantees that for each path π in Spoiler's run, Duplicator's run contains the path e(π).The paths in Duplicator's run that are not images of paths from Spoiler's run were all declared accepting by removing the corresponding tokens.Hence, Duplicator's run is accepting iff Spoiler's run is accepting.Now, if Spoiler enters ⊥, Duplicator proceeds as before, only if some r i , r ′ j , or r ′′ k is equal to ⊥, instead of removing the token from there (he is not allowed to do that), he lets the token and all its descendants loop there forever.In the end, again each path in Spoiler's run has a counterpart in Duplicator's run.The images of the rejecting paths (which exist in Spoiler's run), will be rejecting too.Hence, Duplicator also wins in this case.
Finally we have to consider the situation when e Q (q B 0 ) = q A 0 .In this case, Duplicator should first move his initial token to the state e Q (q B 0 ), removing the other tokens produced on the way whenever possible, and then proceed as before.
Another property that makes admittance similar to containment is transitivity.Lemma 11.2.For all deterministic tree automata A, B, and C, Proof.Again, we may assume that A ′ = A. Furthermore, since the states from one SCC have to be mapped to states from one SCC, then A can be embedded directly into B ′ .Hence, we may also assume that B = B ′ .Let e X,Y Q , e X,Y δ be functions embedding the automaton X into Y .The embedding of A into C is simply a composition of two given embeddings: Embedding for automata on words is defined analogously, only the function e δ is defined on Q × Σ instead of Q × Σ × {0, 1}, and the condition (2) is dropped.Admittance is defined identically.The two lemmas above carry over with analogous proofs.

Hard Automata
In previous sections we have described an extended hierarchy of canonical automata.As we have already mentioned there are still three canonical automata left to define.In their definition we will make the first use of a stronger variant of the operation →.
Note also that A → B and A

−→ B).
Let us now define the three missing automata.Let −→ F (0,1) .The last automaton, C ω ω•3 +2 consists of the states q 0 , q 1 , ⊤ with rank(q i ) = i and transitions q 0 a −→ q 0 , q 1 , q 0 b −→ ⊤, ⊤ , Using canonical automata we can formulate results from Sect. 3 in a uniform way.In the proof we will need the following technical lemma.
Lemma 12.1.Let A be a deterministic tree automaton.For every productive state p in A there exists a state q, a path π p from p to q, and pair of branching paths π 0 q , π 1 q from q to q forming accepting loops.
Proof.Take an accepting run starting in p.For each node v of the run let S v be the set of states of the automaton that appear below v. Note, that if v ′ is a descendant of v, S v ′ ⊆ S v .Since all S v 's are non-empty, there exists a node u such that for all descendants u ′ of u, S u ′ = S u .Pick a state q ∈ S u .There exists a node w under u, labeled with q.Both w0 and w1 are labeled with S u , so there exist a nodes w 0 under w0 and w 1 under w1 that are also labeled with q.To conclude, let π p be the path in A induced by the path from ε to w, and let π i q be the path induced by the path between w and w i for i = 0, 1.1 Theorem 12.2.Let A be a deterministic automaton.
It is enough to check that for an automaton it is the same to contain the patterns from Theorem 3.2 (page 7) and to admit the respective automata.It is straightforward to check that it indeed is so.The only difficulty is embedding the transitions to all-accepting states, but this is solved by Lemma 12.1.Let us just see the case of C ω ω•3 +2 .If A admits C ω ω•3 +2 , then the image of the two loops in C ω ω•3 +2 that contain the initial state is a split.
Suppose that A contains a split consisting of an i-loop p σ,0 such that i is even, j is odd, and i < j.Without loss of generality we may assume that m, n ≥ 1.Let p ′ and let t p , t p ′ 1 , t q ′ be the states guaranteed by Lemma 12.1 for p, p ′ 1 , and q ′ respectively.Let B be the automaton obtained from C ω ω•3 +2 by unravelling the DAG of SCCs.The only way it differs from C ω ω•3 +2 is that instead of one state ⊤ it contains 5 all-accepting states ⊤ 1 , . . ., ⊤ 5 , one for each transition from the root SCC: The function e δ is defined as follows: , where * denotes any letter and by π 1 π 2 we mean the concatenation of two paths.Checking that this is an embedding is straightforward.

F. MURLAK
For the proof of the next theorem, settling the position of the last canonical automaton, C ω ω•3 , we will need the following property of replication.
Lemma 12.3 (Replication Lemma).A state occurs in infinitely many incomparable nodes of an accepting run iff it is productive and is replicated by an accepting loop.
Proof.If a state p is replicated by an accepting loop, then by productivity one may easily construct an accepting run with infinitely many incomparable occurrences of p.Let us concentrate on the converse implication.
Let p occur in an infinite number of incomparable nodes v 0 , v 1 , . . . of an accepting run ρ.Let π i be a path of ρ going through the node v i .Since 2 ω is compact, we may assume, passing to a subsequence, that the sequence π i converges to a path π.Since v i are incomparable, v i is not on π.Let the word α i be the sequence of states labelling the path from the last common node of π and π i to v i .Cutting the loops off if needed, we may assume that |α i | ≤ |Q| for all i ∈ ω.Consequently, there exist a word α repeating infinitely often in the sequence α 0 , α 1 , . ...Moreover, the path π is accepting, so the starting state of α must lay on an accepting productive loop.This loop replicates p.
3 language (Theorem 12.2).Let us see that it is hard in that class.
Take a deterministic automaton A recognising a ∆ 0 3 -language.By Theorem 12.2 (5), A does not admit C ω ω•3 +1 = C 1 (0,0) −→ F (0,1) .Let us divide the states of A into two categories: a state is blue if it is replicated (see page 7) by an accepting loop, otherwise it is red.Note that every state reachable from a blue state is blue.
Let A ′ be the automaton A with the ranks of red states set to 0, and let A ′′ be A with the ranks of the blue states set to 0. Let us see that A ≤ A ′ ∧ A ′′ .The strategy for Duplicator in G(A, A ′ ∧ A ′′ ) is to copy Spoiler's actions in A, both in A ′ and A ′′ .To show that this strategy is winning it is enough to show that for each t a run of A on t is accepting iff the runs of A ′ and A ′′ on t are accepting.Take a path π of the run of A. Let π ′ and π ′′ be the corresponding paths of the computations of A ′ and A ′′ .If π only visits red states, then the ranks on π and π ′′ are identical, and π ′ contains only 0's.Otherwise, π enters a blue state at some point, and then stays in blue states forever.In such case, the blue suffixes of π and π ′ have the same ranks, and the blue suffix of π ′′ contains only 0's.Thus, π is accepting iff π ′ and π ′′ are accepting and the claim follows.
Since A does not admit C 1 (0,0) −→ F (0,1) , it follows that all (0, 1)-flowers in A are red.Consequently, A ′ does not admit F (0,1) , and so Now consider A ′′ .Once you enter a blue state, you can never move to a red state.Consequently, since in A ′′ all blue states have rank 0, we may actually replace them all with one all-accepting state ⊤ without changing the recognised language.Recall that, by convention, instead of putting tokens into ⊤ we simply remove them.Hence, when for some token in p a transition of the form p σ −→ ⊤, q or p σ −→ q, ⊤ is fired, we imagine that the token is moved to q without producing any new tokens.By the Replication Lemma (Lemma 12.3) the occurrences of red states in an accepting run may be covered by a finite number of infinite paths.Hence, by our convention, only finitely many tokens may be produced in a play if the constructed run is to be accepting.

Let us now show that Duplicator has a winning strategy in
where (ι, κ) is the index of A. Whenever Spoiler produces a new token (including the starting token), Duplicator should loop once around the head 1-loop producing a doppelgänger in F (ι,κ) , and keep looping around the head 0-loop.The new token is to visit states with exactly the same ranks as the token produced by Spoiler.Let us see that this strategy works.Suppose Spoiler's run was accepting.Then, there were only finitely many red tokens produced, and hence the head 1-loop was visited only finitely often.Furthermore, each Spoiler's token visited an accepting path.But then, so did its doppelgänger, and Duplicator's run was also accepting.Now suppose Spoiler's run was rejecting.If infinitely many red tokens were produced, the head 1-loop was visited infinitely often, and Duplicator's run was also rejecting.If there were finitely many tokens produced, then one of the tokens must have gone along a rejecting path, but so did its doppelgänger and Duplicator's run was also rejecting.Hence ).First, loop once around the 1-loop and produce a new token in F (0,2) and use it to mimic Spoiler's actions in F (1,2) .Then, for each new token x Spoiler produces in his 1-loop and sends to F (ι,κ) , Duplicator should produce tokens , so Duplicator has a winning strategy in G(F (ι,κ) , (F (0,2) ) ⌊ κ+1 2 ⌋ ).Adapting this strategy, Duplicator can simulate the actions of Spoiler's token x in F (ι,κ) with the tokens y 1 , . . ., y ⌊ κ+1 2 ⌋ in F (0,2) .If Spoiler loops the 1-loop without producing a new token, or loops around the 0-loop, Duplicator should copy his actions.Clearly, this strategy is winning for Duplicator.
Finally, let us see that A ≤ C ω ω•3 for each A ∈ C. Take n < ω.Observe that in C ω ω•2+n no state is replicated by an accepting loop.Hence, From Theorems 12.2 and 12.4 we obtain the following picture of the top of the hierarchy: Note that it already follows that the height of the Wadge hierarchy of deterministic tree languages is at least (ω ω ) 3 + 3.In the remaining of the paper we will show that each deterministic automaton is Wadge equivalent to one of the canonical automata from C ′ , thus providing a matching upper bound.

Closure Properties
Our aim is to show that each deterministic tree language is Wadge equivalent to the language recognised by one of the canonical automata.If this is to be true, the family of canonical automata should be closed (up to Wadge equivalence) by the operations introduced in Sect.6.In this section we will see that it is so indeed.The closure properties carry substantial part of the technical difficulty of the main theorem, whose proof is thus made rather concise.
For the remaining automata, we will show that what really matters is the maximal simple branching automaton contained in C 1 → B. There are two main cases: either ⊕A.Since the proofs are entirely analogous, we will only consider the first case.We only need to argue that A , then it is equivalent to the maximal one it admits (see Theorems 12.2 and 12.4).Let us assume B admits none of the three automata above.Let us also assume that ι < κ.
4. If A i contain no non-trivial flowers, ι = 0, and A ι contains a D 2 , then B ≡ (F (ι,κ) ⊕ A) ∧ F (1,2) .The inequality B ≤ (F (ι,κ) ⊕ A) ∧ F (1,2) is proved just like in the first case.Let us see that the converse holds.Consider the game G((F (ι,κ) ⊕ A) ∧ F (1,2) , B) and the following strategy for Duplicator.Copy Spoiler's actions in F (ι,κ) ⊕ A, but whenever Spoiler enters the 1-loop in (1, 2), loop once around 0-loop, move the extra token to the head loop of D 2 , and keep looping around until Spoiler leaves his 1-loop.Then remove your extra token, and so on.It is easy to see that the strategy is winning for Duplicator.

If
A i contain no non-trivial flowers and either ι = 0 or A ι contains no D 2 , then B ≡ F (ι,κ) ⊕ A. To prove it, we have to describe the strategy for Duplicator in G(B, F (ι,κ) ⊕ A).During the whole play keep numbering the new tokens produced by Spoiler according to their birth time.(As usual, the left token is considered a parent, the right token is born, transitions of the form p −→ ⊤, q or p −→ q, ⊤ do not produce new tokens.)The strategy is as follows.While there are no new tokens in rejecting loops in A ι , . . ., A κ , keep copying Spoiler's moves in his F (ι,κ) .When the first new token, say x i 1 , enters a 1-loop, start looping around the 1-loop of your F (ι,κ) (the loop exists since ι < κ), and keep doing it until x i 1 leaves the 1-loop.If it does not happen, Spoiler will lose.When it does happen, stop looping around 1-loop.Investigate all the ranks used by Spoiler in (ι, κ)-flower while you were simulating x i 1 , choose the highest one, say k, and loop once a k-loop.Afterwords, if there are no tokens in rejecting loops in A i , copy Spoiler's moves.Otherwise, choose the token with the smallest number, say x i 2 , start looping around the loop with the highest rank 1 in your (ι, κ)-flower, and so on.
Let us see that if Spoiler does not enter A, he loses the game.If the run constructed by Spoiler is to be rejecting, either the highest rank used infinitely often in F (ι,κ) is odd, or some token stays forever in a rejecting loop in one of A ι , . . ., A κ .In any case Duplicator's strategy guarantees a rejecting run for him as well.Let us suppose that Spoiler's run is accepting.If only finitely many new tokens entered rejecting loops in A ι , . . ., A κ , then there was a round such that from this round on Duplicator was simply mimicking Spoiler's actions in F (ι,κ) and so Duplicator's run is also accepting.Suppose that infinitely many new tokens visited rejecting loops in A ι , . . ., A κ .We have assumed that either ι = 0 or A ι contains no D 2 .In either case the ranks greater then 0 must have been used infinitely many times in F (ι,κ) .Consequently, the highest rank used in F (ι,κ) is greater then 1, and Duplicator's run is accepting despite infinitely many 1's used in F (ι,κ) .
Suppose now that Spoiler leaves F (ι,κ) .Following the argument used in the proof of the closure by ⊕, we may suppose that the simple automaton containing the head loop of A is at Suppose that Spoiler's run is accepting.After changing the ranks of red states from 3 to 1 it is still accepting, so Duplicator's token in F (1,2) visited an accepting path.By the Replication Lemma (Lemma 9.1, page 21), the occurrences of red states in Spoiler's run may be covered by a finite number of paths.Furthermore, each of these paths is accepting, so it may only contain a finite number of red states.Hence, there may be only finitely many red states in Spoiler's run and the path visited by Duplicator's token in F (0,1) is also accepting.
Suppose now, that Spoiler's run is rejecting.If red states occurred only finitely often, Spoiler's run is still rejecting after changing their ranks to 1, so Duplicator's token in F (1,2) visited a rejecting path.If there were infinitely many red states in Spoiler's run, Duplicator's token in F (0,1) visited a rejecting path.
3. X contains some transitions but no accepting loops.Let q i σ i −→ q ′ i , q ′′ i , i = 1, . . ., n be all the transitions such that q i ∈ X and q ′ i , q ′′ i / ∈ X.Let p j σ i ,d −→ p ′ j j = 1, . . ., m be all the remaining transitions such that p j ∈ X and p ′ j / ∈ X.We will call the automata (A) q ′ i , (A) q ′′ i and (A) p ′ j the child automata of X.By the induction hypothesis we may assume that they are in canonical forms.Let B = ((A) q ′ 1 ∧ (A) q ′′ 1 ) ∨ . . .∨ ((A) 4. X contains no transitions.Recall that this means exactly that at most one branch of every transition stays in X.First replace subtrees rooted in the target states of transitions whose all branches leave X with one canonical automaton B just like above.Let (ι, κ) denote the highest index of a flower contained in X.It is well defined, because a strongly connected component admitting F (0,j) and F (1,j+1) must also admit F (0,j+1) .We may assume that X uses only ranks ι, . . ., κ, and that each j-loop is indeed a j-loop in a (j, κ)-flower (Lemma 14.1).For each j = ι, . . ., κ, let B j be the alternative of all the child automata replicated by a j-loop in X.By induction hypothesis, we may assume that B ι , . . ., B κ and B are canonical automata.Let A ′ = B (ι,κ) −→ B ι , . . ., B κ .We will show that A ≡ A ′ .If ι = κ, the assertion is clear.Suppose that ι < κ.Obviously, A ′ ≥ A. Let us see that A ′ ≤ A. Let A ′′ denote the result of the following simplifications performed on A ′ .• If some B i contains a (0, 1)-flower and some B j contains a (1, 2)-flower, replace B κ with a (1, 3)-flower.• If some B i contains a (0, 1)-flower and no B j contains a (1, 2)-flower, replace B κ with a (0, 1)-flower.• If some B i contains a (1, 2)-flower and no B j contains a (0, 1)-flower, replace B κ with a (1, 2)-flower.• If B ι , . . ., B κ admit no F (ι,κ) with ι < κ, remove B κ .
• Remove all B ι+1 , . . ., B κ−1 .Examination of the five cases considered in the proof of Proposition 13.6 reveals that A ′ and A ′′ have identical canonical forms.Consequently, A ′ ≡ A ′′ , and it is enough to show that A ′′ ≤ A. Consider all (ι, κ)-flowers in X. Choose any one whose ι-loop replicates D 2 , if there is one, or take any (ι, κ)-flower otherwise.Then, extend the κ-loop to a loop using all the transitions in X. Denote this flower, together with the subtrees replicated by ι-loop or κ-loop, by F .One can prove easily that A ′′ ≤ F ⊕ B, and obviously F ⊕ B ≤ A. complexity of the algorithm assume that the productive states of A are given.Checking if A admits any of the automata mentioned in the algorithm can be easily done in polynomial time.The operations on the automata returned by the recursive calls of the procedure (lines 25, 26, 29, 33, and 35) are polynomial in the size of those automata, and by the initial remark also in the size of the automaton.By Lemma 14.1 the lifting operation is also polynomial.Therefore, when implemented dynamically, this procedure takes polynomial time for each SCC.Processing the entire automaton increases this polynomial by a linear factor.
Instead of a canonical automaton, the algorithm above can return its "name", i. e., a letter C, D, or E, and an ordinal α ≤ ω ω•3 + 2 presented as a polynomial in ω ω , with the coefficients presented as polynomials in ω.Since for such presentation it is decidable in linear time if α ≤ β, as an immediate consequence of Corollary 14.3 and Theorem 10.5 we get an algorithm for Wadge reducibility.Corollary 14.4.For deterministic tree automata A, B it is decidable if L(A) ≤ W L(B) (within the time of finding the productive states of the automata).

Figure 4 :
Figure 4: The Borel hierarchy for deterministic tree languages.

Lemma 5 . 1 .
Duplicator has a winning strategy in GW (L, M ) iff L ≤ W M .

τ
−→ ⊥, ⊥.Then add an all-accepting state ⊤ with transitions ⊤ σ −→ ⊤, ⊤ for each σ ∈ Σ ∪ {τ } (if A already has the state ⊤, just add a transition ⊤ τ −→ ⊤, ⊤).Then for each p / ∈ {⊥, ⊤}, add a transition p τ −→ ⊤, ⊤.Lemma 5.4.For every deterministic tree automaton A over Σ and a letter τ ∈ Σ, A ≡ A τ .Proof.It is obvious that A ≤ A τ : since A τ contains all transitions of A, a trivial winning strategy for Duplicator in G(A, A τ ) is to copy Spoiler's actions.Let us see that new transitions do not give any real power.Consider G(A τ , A).While Spoiler uses old transitions, Duplicator may again copy his actions.The only difficulty lies in responding to a move that uses a new transition.Suppose Spoiler does use a new transition.If Spoiler fires a transition p τ −→ ⊤, ⊤ for a token x in a state p = ⊥, Duplicator simply removes the corresponding token in p, and ignores the further behaviour of x and all his descendants.The only other possibility is that Spoiler fires ⊥ τ −→ ⊥, ⊥.Then for the corresponding token Duplicator should fire ⊥ σ −→ ⊥, ⊥ for some σ ∈ Σ.The described strategy is clearly winning for Duplicator.

Figure 5 :
Figure 5: The alternative A ∨ B, the parallel composition A ∧ B, and the replication A → B (transitions to ⊥ and ⊤ are omitted).

Lemma 5 . 5 (
Substitution Lemma).Let A, B, C be deterministic automata with pairwise disjoint sets of states, and let p be a state of C. If A ≤ B, then C p:=A ≤ C p:=B .Proof.Consider the game G(C p:=A , C p:=B ) and the following strategy for Duplicator.In C Duplicator copies Spoiler's actions.If some Spoiler's token x enters the automaton A, Duplicator should put its counterpart y in the initial state of B, and then y and its descendants should use Duplicator's winning strategy from G(A, B) against x and its descendants.

Figure 6 :
Figure 6: The sequential composition A ⊕ B.

Proposition 7 . 1 .
If a run constructed by a player in charge of a canonical automaton is rejecting, one of the tokens has visited a rejecting path.
enough to give a strategy for Duplicator in G( Ĉω k ⊕ B, Ĉω k ), since the other inequality is obvious.To win, Duplicator should first copy Spoiler's actions, as long as Spoiler stays in Ĉω k .When Spoiler moves to B, Duplicator should simply switch to the strategy from G(B, Ĉω k ).

Figure 8 :
Figure 8: An initial segment of the Wagner hierarchy

Theorem 8 . 4 .
For each word automaton A one can find in polynomial time a canonical non-branching automaton B such that L(A) ≡ W L(B).
Now we are ready to get back to the order on C. Lemma 10.4.If 0 < α ≤ β < ω ω•3 then C α ≤ C β and whenever D α and E β are defined,

F. MURLAK Lemma 11 . 1 .
For all deterministic tree automata A and B A ⊑ B =⇒ A ≤ B .
→ Π C is the function induced by e B,C δ in the natural way.It is easy to see that e A,C Q and e A,C δ satisfy the conditions from the definition of admittance.

( 1 , 1 )
−→ B are equal up to the names of letters and states.In particular L(A → B) ≡ W L(A(1,1)

Figure 12 :
Figure 12: The (1, 4)-replication A (1,4) since the converse inequality is obvious.Let us start with B = C ω k .Denote the head loop of C ω k by λ 0 .It is enough to show a winning strategy in G(A → B, C − ω k ⊕ A).Since no path from the head loop of A → B to λ 0 goes through an accepting loop, Duplicator may keep his critical token in the head loop of C − ω k as long as at least one of Spoiler's tokens can reach λ 0 .Hence, for every token produced by Spoiler in λ 0 , Duplicator can produce a doppelgänger.When none of Spoiler's tokens can reach λ 0 any more, Duplicator moves his critical token to A and mimics Spoiler.Let us now suppose thatC ω k−1 < B < C ω k , k ≥ 2 (for k = 1 the proof is very similar).The strategy for Duplicator in G(A → B, C − ω k ⊕ A) is as follows.Let m be such that B ≤ C ω k−1 m .For every token x i produced by Spoiler using the head loop of A → B, Duplicator produces m tokens y 1 i , . . ., y m i using the head loop of C − ω k .Then the tokens y 1 i , . . ., y m i play against x i simulating Duplicator's winning strategy from G(B, (C 1 ⊕ C ω k−1 ) m ).When Spoiler moves his critical token to A, Duplicator does the same and keeps mimicking Spoiler in A. Thus we managed to simplify A → B to C − α ⊕ A where α = ω k or α = ω ω•2+k .An equivalent canonical automaton is provided by Lemma 13.3.Now we are ready to deal with (ι, κ)-replication.Since C ω ω•3 = C 1 (0,1) −→ C ω ω+1 , the class C is not closed by (ι,κ) −→.However, adding the three top canonical automata is enough to get the closure property.Proposition 13.6.For A, A ι , . . ., A κ ∈ C, ι, κ < ω, one can find in polynomial time an automaton in C ′ equivalent to A (ι,κ) −→ A ι , . . ., A κ .Proof.Let B = A (ι,κ) −→ A ι , . . ., A κ .If B admits any of the automata C ω ω•3 , C ω ω•3 +1 , C ω ω•3 +2 (ι,κ)−→ A ι , . . ., A κ−1 , C 1 ) ∧ F (0,1) ) is easy.The strategy for Duplicator in G(B, (A (ι,κ) −→ A ι , . . ., A κ−1 , C 1 ) ∧ F (0,1)) is to copy Spoiler's actions in A (ι,κ)