Keywords

1 Introduction

In the sixties, Büchi was the first to study acceptance of infinite words by finite automata with the now called Büchi acceptance condition, in order to prove the decidability of the monadic second order theory of one successor over the integers. Since then there has been a lot of work on regular \(\omega \)-languages, accepted by Büchi automata, or by some other variants of automata over infinite words, like Muller or Rabin automata, see [27, 36, 37]. The acceptance of infinite words by other finite machines, like pushdown automata, counter automata, Petri nets, Turing machines, \(\ldots \), with various acceptance conditions, has also been studied, see [3, 8, 35, 36, 38].

The Cantor topology is a very natural topology on the set \(\varSigma ^\omega \) of infinite words over a finite alphabet \(\varSigma \) which is induced by the prefix metric. Then a way to study the complexity of languages of infinite words accepted by finite machines is to study their topological complexity and firstly to locate them with regard to the Borel and the projective hierarchies [8, 24, 36, 37].

Every \(\omega \)-language accepted by a deterministic Büchi automaton is a \(\mathbf {\Pi }^0_2\)-set. On the other hand, it follows from Mac Naughton’s Theorem that every regular \(\omega \)-language is accepted by a deterministic Muller automaton, and thus is a boolean combination of \(\omega \)-languages accepted by deterministic Büchi automata. Therefore every regular \(\omega \)-language is a \(\mathbf {\Delta }^0_3\)-set. Moreover Landweber proved that the Borel complexity of any \(\omega \)-language accepted by a Muller or Büchi automaton can be effectively computed (see [23, 27]). In a similar way, every \(\omega \)-language accepted by a deterministic Muller Turing machine, and thus also by any Muller deterministic finite machine is a \(\mathbf {\Delta }^0_3\)-set, [8, 36].

On the other hand, the Wadge hierarchy is a great refinement of the Borel hierarchy, firstly defined by Wadge via reductions by continuous functions [39]. The trace of the Wadge hierarchy on the \(\omega \)-regular languages is called the Wagner hierarchy. It has been completely described by Klaus Wagner in [40]. Its length is the ordinal \(\omega ^\omega \). Wagner gave an automaton-like characterization of this hierarchy, based on the notions of chain and superchain, together with an algorithm to compute the Wadge (Wagner) degree of any given \(\omega \)-regular language, see also [29, 31,32,33].

The Wadge hierarchy of deterministic context-free \(\omega \)-languages was determined by Duparc in [5, 6]. Its length is the ordinal \(\omega ^{(\omega ^2)}\). We do not know yet whether this hierarchy is decidable or not. But the Wadge hierarchy induced by deterministic partially blind 1-counter automata was described in an effective way in [10], and other partial decidability results were obtained in [11]. Then, it was proved in [13] that the Wadge hierarchy of 1-counter or context-free \(\omega \)-languages and the Wadge hierarchy of effective analytic sets (which form the class of all the \(\omega \)-languages accepted by non-deterministic Turing machines) are equal. Moreover similar results hold about the Wadge hierarchy of infinitary rational relations accepted by 2-tape Büchi automata, [14]. Finally, the Wadge hierarchy of \(\omega \)-languages of deterministic Turing machines was determined by Selivanov in [30].

We consider in this paper acceptance of infinite words by Petri nets. Petri nets are used for the description of distributed systems [9, 20, 28], and form a very important mathematical model in Concurrency Theory that has been developed for general concurrent computation. In the context of Automata Theory, Petri nets may be defined as (partially) blind multicounter automata, as explained in [8, 19, 38]. First, one can distinguish between the places of a given Petri net by dividing them into the bounded ones (the number of tokens in such a place at any time is uniformly bounded) and the unbounded ones. Then each unbounded place may be seen as a partially blind counter, and the tokens in the bounded places determine the state of the partially blind multicounter automaton that is equivalent to the initial Petri net. The transitions of the Petri net may then be seen as the finite control of the partially blind multicounter automaton and the labels of these transitions are then the input symbols. The infinite behavior of Petri nets was first studied by Valk [38] and by Carstensen in the case of deterministic Petri nets [1].

On one side, the topological complexity of \(\omega \)-languages of deterministic Petri nets is completely determined. They are \(\mathbf {\Delta }^0_3\)-sets and their Wadge hierarchy has been determined by Duparc, Finkel and Ressayre in [7]; its length is the ordinal \(\omega ^{\omega ^2}\). On the other side, Finkel and Skrzypczak proved in [18] that there exist \(\mathbf {\Sigma }_3^0\)-complete, hence non \(\mathbf {\Delta }_3^0\), \(\omega \)-languages accepted by non-deterministic one-partially-blind-counter Büchi automata. The existence of a \(\mathbf {\Sigma }_1^1\)-complete, hence non Borel, \(\omega \)-language accepted by a Petri net was independently proved by Finkel and Skrzypczak in [17, 34]. Moreover, Skrzypczak has proved in [34] that one blind counter is sufficient. In this paper, we fill the gap between \(\mathbf {\Sigma }_3^0\) and \(\mathbf {\Sigma }_1^1\) for Petri nets \(\omega \)-languages. Notice that \(\omega \)-languages accepted by (non-blind) one-counter Büchi automata have the same topological complexity as \(\omega \)-languages of Turing machines, [13], but the non-blindness of the counter, i.e. the ability to use the zero-test of the counter, was essential in the proof of this result.

Using a simulation of a given real time 1-counter (with zero-test) Büchi automaton \(\mathcal {A}\) accepting \(\omega \)-words x over the alphabet \(\varSigma \) by a real time 4-blind-counter Büchi automaton \(\mathcal {B}\) reading some special codes h(x) of the words x, we prove here that \(\omega \)-languages of non-deterministic Petri nets and effective analytic sets have the same topological complexity: the Borel and Wadge hierarchies of the class of \(\omega \)-languages of Petri nets are equal to the Borel and Wadge hierarchies of the class of effective analytic sets. In particular, for each non-null recursive ordinal \(\alpha < \omega _1^{\mathrm{CK}} \) there exist some \(\mathbf {\Sigma }^0_\alpha \)-complete and some \(\mathbf {\Pi }^0_\alpha \)-complete \(\omega \)-languages of Petri nets, and the supremum of the set of Borel ranks of \(\omega \)-languages of Petri nets is the ordinal \(\gamma _2^1\), which is strictly greater than the first non-recursive ordinal \(\omega _1^{\mathrm{CK}}\).

Notice that the topological equivalences we get in this paper are different from the language theoretical equivalences studied by Carstensen and Valk.

We also show that it is highly undecidable to determine the topological complexity of a Petri net \(\omega \)-language. Moreover, we infer from the proofs of the above results that the equivalence and the inclusion problems for \(\omega \)-languages of Petri nets are \(\varPi _2^1\)-complete, hence also highly undecidable.

The paper is organized as follows. In Sect. 2 we review the notions of (blind) counter automata and \(\omega \)-languages. In Sect. 3 we recall notions of topology, and the Borel and Wadge hierarchies on a Cantor space. We prove our main results in Sect. 4. We show that the topological complexity of a Petri net \(\omega \)-language is highly undecidable in Sect. 5. The equivalence and the inclusion problems for \(\omega \)-languages of Petri nets are shown to be \(\varPi _2^1\)-complete in Sect. 6. Concluding remarks are given in Sect. 7.

2 Counter Automata

We assume the reader to be familiar with the theory of formal (\(\omega \)-)languages [27, 36]. We recall the usual notations of formal language theory.

If \(\varSigma \) is a finite alphabet, a non-empty finite word over \(\varSigma \) is any sequence \(x=a_1\ldots a_k\), where \(a_i\in \varSigma \) for \(i=1,\ldots ,k\), and k is an integer \(\ge \)1. The length of x is k, denoted by |x|. The empty word is denoted by \(\lambda \); its length is 0. \(\varSigma ^\star \) is the set of finite words (including the empty word) over \(\varSigma \), and we denote \(\varSigma ^+=\varSigma ^\star \setminus \{\lambda \}\). A (finitary) language V over an alphabet \(\varSigma \) is a subset of \(\varSigma ^\star \).

The first infinite ordinal is \(\omega \). An \(\omega \)-word over \(\varSigma \) is an \(\omega \)-sequence \(a_1 \ldots a_n \ldots \), where for all integers \( i\ge 1\),   \(a_i \in \varSigma \). When \(\sigma =a_1 \ldots a_n \ldots \) is an \(\omega \)-word over \(\varSigma \), we write \(\sigma (n)=a_n\), \(\sigma [n]=\sigma (1)\sigma (2)\ldots \sigma (n)\) for all \(n\ge 1\) and \(\sigma [0]=\lambda \).

The usual concatenation product of two finite words u and v is denoted \(u\cdot v\) (and sometimes just uv). This product is extended to the product of a finite word u and an \(\omega \)-word v: the infinite word \(u\cdot v\) is then the \(\omega \)-word such that:

\((u\cdot v)(k)=u(k)\) if \(k\le |u|\) , and \((u\cdot v)(k)=v(k-|u|)\) if \(k>|u|\).

The set of \(\omega \)-words over the alphabet \(\varSigma \) is denoted by \(\varSigma ^\omega \). An \(\omega \)-language V over an alphabet \(\varSigma \) is a subset of \(\varSigma ^\omega \), and its complement (in \(\varSigma ^\omega \))is \(\varSigma ^\omega \setminus V\), denoted \(V^-\).

The prefix relation is denoted \(\sqsubseteq \): a finite word u is a prefix of a finite word v (respectively, an infinite word v), denoted \(u\sqsubseteq v\), if and only if there exists a finite word w (respectively, an infinite word w), such that \(v=u\cdot w\).

Let k be an integer \(\ge 1\). A k-counter machine has k counters, each of which containing a non-negative integer. The machine can test whether the content of a given counter is zero or not, but this is not possible if the counter is a blind (sometimes called partially blind, as in [19]) counter. This means that if a transition of the machine is enabled when the content of a blind counter is zero then the same transition is also enabled when the content of the same counter is a positive integer. And transitions depend on the letter read by the machine, the current state of the finite control, and the tests about the values of the counters. Notice that in the sequel we shall only consider real-time automata, i.e. \(\lambda \)-transitions are not allowed (but the general results of this paper will be easily extended to the case of non-real-time automata).

Formally a real time k-counter machine is a 4-tuple \(\mathcal {M}\) = \((K,\varSigma , \varDelta , q_0)\), where K is a finite set of states, \(\varSigma \) is a finite input alphabet, \(q_0\in K\) is the initial state, and \(\varDelta \subseteq K \times \varSigma \times \{0, 1\}^k \times K \times \{0, 1, -1\}^k\) is the transition relation.

If the machine \(\mathcal {M}\) is in state q and \(c_i \in \mathbf {N}\) is the content of the \(i^{th}\) counter \(\mathcal {C}_i\) then the configuration (or global state) of \(\mathcal {M}\) is the \((k+1)\)-tuple \((q, c_1, \ldots , c_k)\).

For \(a\in \varSigma \), \(q, q' \in K\) and \((c_1, \ldots , c_k) \in \mathbf {N}^k\) such that \(c_j=0\) for \(j\in E \subseteq \{1, \ldots , k\}\) and \(c_j >0\) for \(j\notin E\), if \((q, a, i_1, \ldots , i_k, q', j_1, \ldots , j_k) \in \varDelta \) where \(i_j=0\) for \(j\in E\) and \(i_j=1\) for \(j\notin E\), then we write:

\(a: (q, c_1, \ldots , c_k)\mapsto _{\mathcal {M}} (q', c_1+j_1, \ldots , c_k+j_k)\).

Thus the transition relation must obviously satisfy: if \((q, a, i_1, \ldots , i_k, q', j_1, \ldots , j_k) \in \varDelta \) and \(i_m=0\) for some \(m\in \{1, \ldots , k\}\) then \(j_m=0\) or \(j_m=1\) (but \(j_m\) may not be equal to \(-1\)).

Moreover if the counters of \(\mathcal {M}\) are blind, then, if \((q, a, i_1, \ldots , i_k, q', j_1, \ldots , j_k) \in \varDelta \) holds, and \(i_m=0\) for some \(m\in \{1, \ldots , k\}\) then \((q, a, i_1, \ldots , i_k, q', j_1, \ldots , j_k) \in \varDelta \) also holds if \(i_m=1\) and the other integers are unchanged.

An \(\omega \)-sequence of configurations \(r=(q_i, c_1^{i}, \ldots c_k^{i})_{i \ge 1}\) is called a run of \(\mathcal {M}\) on an \(\omega \)-word \(\sigma =a_1a_2 \ldots a_n \ldots \) over \(\varSigma \) iff:

  1. (1)

    \((q_1, c_1^{1}, \ldots c_k^{1})=(q_0, 0, \ldots , 0)\)

  2. (2)

    for each \(i\ge 1\),

\(a_i: (q_i, c_1^{i}, \ldots c_k^{i})\mapsto _{\mathcal {M}} (q_{i+1}, c_1^{i+1}, \ldots c_k^{i+1})\).

For every such run r, \(\mathrm {In}(r)\) is the set of all states entered infinitely often during r.

Definition 1

A Büchi k-counter automaton is a 5-tuple \(\mathcal {M}\) = \((K,\varSigma ,\varDelta , q_0, F)\), where \( \mathcal {M}'\) = \((K,\varSigma ,\varDelta , q_0)\) is a k-counter machine and \(F \subseteq K\) is the set of accepting states. The \(\omega \)-language  accepted by \(\mathcal {M}\) is:

\(L(\mathcal {M})\) = \(\{ \sigma \in \varSigma ^\omega \mid \text{ there } \text{ exists } \text{ a } \text{ run } \text{ r } \text{ of } \mathcal {M} \text{ on } \sigma \text{ such } \text{ that } \mathrm {In}(r) \cap F \ne \emptyset \}\).

Definition 2

A Muller k-counter automaton is a 5-tuple \(\mathcal {M}\) = \((K,\varSigma ,\,\varDelta , q_0, \mathcal {F})\), where \( \mathcal {M}'\) = \((K,\varSigma ,\,\varDelta , q_0)\) is a k-counter machine and \(\mathcal {F}\) \( \subseteq 2^K\) is the set of accepting sets of states. The \(\omega \)-language  accepted by \(\mathcal {M}\) is: \(L(\mathcal {M})\) = \( \{ \sigma \in \varSigma ^\omega \mid \text{ there } \text{ exists } \text{ a } \text{ run } \text{ r } \text{ of } \mathcal {M}\) \( \text{ on } \sigma \text{ such } \text{ that } \) \( ~ \mathrm {In}(r) \in \mathcal {F} \}\).

It is well known that an \(\omega \)-language is accepted by a non-deterministic (real time) Büchi k-counter automaton iff it is accepted by a non-deterministic (real time) Muller k-counter automaton [8]. Notice that it cannot be shown without using the non determinism of automata and this result is no longer true in the deterministic case.

The class of \(\omega \)-languages accepted by real time k-counter Büchi automata (respectively, real time k-blind-counter Büchi automata) is denoted r-\(\mathbf{CL}(k)_\omega \). (respectively, r-\(\mathbf{BCL}(k)_\omega \)). (Notice that in previous papers, as in [13], the class r-\(\mathbf{CL}(k)_\omega \) was denoted r-\(\mathbf{BCL}(k)_\omega \) so we have slightly changed the notation in order to distinguish the different classes).

The class \(\mathbf{CL}(1)_\omega \) is a strict subclass of the class \(\mathbf{CFL}_\omega \) of context free \(\omega \)-languages accepted by pushdown Büchi automata.

If we omit the counter of a real-time Büchi 1-counter automaton, then we simply get the notion of Büchi automaton. The class of \(\omega \)-languages accepted by Büchi automata is the class of regular \(\omega \)-languages.

3 Hierarchies in a Cantor Space

3.1 Borel Hierarchy and Analytic Sets

We assume the reader to be familiar with basic notions of topology which may be found in [24, 25, 27, 36]. There is a natural metric on the set \(\varSigma ^\omega \) of infinite words over a finite alphabet \(\varSigma \) containing at least two letters which is called the prefix metric and is defined as follows. For \(u, v \in \varSigma ^\omega \) and \(u\ne v\) let \(\delta (u, v)=2^{-l_{\mathrm {pref}(u,v)}}\) where \(l_{\mathrm {pref}(u,v)}\) is the first integer n such that the \((n+1)^{st}\) letter of u is different from the \((n+1)^{st}\) letter of v. This metric induces on \(\varSigma ^\omega \) the usual Cantor topology in which the open subsets of \(\varSigma ^\omega \) are of the form \(W\cdot \varSigma ^\omega \), for \(W\subseteq \varSigma ^\star \). A set \(L\subseteq \varSigma ^\omega \) is a closed set iff its complement \(\varSigma ^\omega - L\) is an open set.

Define now the Borel Hierarchy of subsets of \(\varSigma ^\omega \):

Definition 3

For a non-null countable ordinal \(\alpha \), the classes \(\mathbf {\Sigma }^0_\alpha \) and \(\mathbf {\Pi }^0_\alpha \) of the Borel Hierarchy on the topological space \(\varSigma ^\omega \) are defined as follows: \(\mathbf {\Sigma }^0_1\) is the class of open subsets of \(\varSigma ^\omega \), \(\mathbf {\Pi }^0_1\) is the class of closed subsets of \(\varSigma ^\omega \), and for any countable ordinal \(\alpha \ge 2\):

\(\mathbf {\Sigma }^0_\alpha \) is the class of countable unions of subsets of \(\varSigma ^\omega \) in \(\bigcup _{\gamma <\alpha }\mathbf {\Pi }^0_\gamma \).

\(\mathbf {\Pi }^0_\alpha \) is the class of countable intersections of subsets of \(\varSigma ^\omega \) in \(\bigcup _{\gamma <\alpha }\mathbf {\Sigma }^0_\gamma \).

The class of Borel sets is \(\mathbf{\Delta }^{1}_{1}\! :=\!\bigcup _{\xi<\omega _1}\ \mathbf{\Sigma }^{0}_{\xi }\! =\! \bigcup _{\xi <\omega _1}\ \mathbf{\Pi }^{0}_{\xi }\), where \(\omega _1\) is the first uncountable ordinal. There are also some subsets of \(\varSigma ^\omega \) which are not Borel. In particular the class of Borel subsets of \(\varSigma ^\omega \) is strictly included into the class \(\mathbf {\Sigma }^1_1\) of analytic sets which are obtained by projection of Borel sets.

Definition 4

A subset A of \(\varSigma ^\omega \) is in the class \(\mathbf {\Sigma }^1_1\) of analytic sets iff there exists another finite set Y and a Borel subset B of \((\varSigma \times Y)^\omega \) such that \( x \in A \leftrightarrow \exists y \in Y^\omega \) such that \((x, y) \in B\), where (xy) is the infinite word over the alphabet \(\varSigma \times Y\) such that \((x, y)(i)=(x(i),y(i))\) for each integer \(i\ge 1\).

We now define completeness with regard to reduction by continuous functions. For a countable ordinal \(\alpha \ge 1\), a set \(F\subseteq \varSigma ^\omega \) is said to be a \(\mathbf {\Sigma }^0_\alpha \) (respectively, \(\mathbf {\Pi }^0_\alpha \), \(\mathbf {\Sigma }^1_1\))-complete set iff for any set \(E\subseteq Y^\omega \) (with Y a finite alphabet): \(E\in \mathbf {\Sigma }^0_\alpha \) (respectively, \(E\in \mathbf {\Pi }^0_\alpha \), \(E\in \mathbf {\Sigma }^1_1\)) iff there exists a continuous function \(f: Y^\omega \rightarrow \varSigma ^\omega \) such that \(E = f^{-1}(F)\).

Let us now recall the definition of the arithmetical hierarchy of \(\omega \)-languages, see for example [25, 36]. Let \(\varSigma \) be a finite alphabet. An \(\omega \)-language  \(L\subseteq \varSigma ^\omega \) belongs to the class \(\varSigma _n\) iff there exists a recursive relation \(R_L\subseteq (\mathbb {N})^{n-1}\times \varSigma ^\star \) such that   \(L = \{\sigma \in \varSigma ^\omega \mid \exists a_1\ldots Q_na_n \quad (a_1,\ldots , a_{n-1}, \sigma [a_n+1])\in R_L \}\),

where \(Q_i\) is one of the quantifiers \(\forall \) or \(\exists \) (not necessarily in an alternating order). An \(\omega \)-language  \(L\subseteq \varSigma ^\omega \) belongs to the class \(\varPi _n\) if and only if its complement \(\varSigma ^\omega - L\) belongs to the class \(\varSigma _n\). The inclusion relations that hold between the classes \(\varSigma _n\) and \(\varPi _n\) are the same as for the corresponding classes of the Borel hierarchy and the classes \(\varSigma _n\) and \(\varPi _n\) are strictly included in the respective classes \(\mathbf {\Sigma }_n^0\) and \(\mathbf {\Pi }_n^0\) of the Borel hierarchy.

As in the case of the Borel hierarchy, projections of arithmetical sets (of the second \(\varPi \)-class) lead beyond the arithmetical hierarchy, to the analytical hierarchy of \(\omega \)-languages. The first class of the analytical hierarchy of \(\omega \)-languages is the (lightface) class \(\varSigma ^1_1\) of effective analytic sets. An \(\omega \)-language  \(L\subseteq \varSigma ^\omega \) belongs to the class \(\varSigma _1^1\) if and only if there exists a recursive relation \(R_L\subseteq (\mathbb {N})\times \{0, 1\}^\star \times \varSigma ^\star \) such that:   \(L = \{\sigma \in \varSigma ^\omega \mid \exists \tau (\tau \in \{0, 1\}^\omega \wedge \forall n \exists m ( (n, \tau [m], \sigma [m]) \in R_L )) \}\). Thus an \(\omega \)-language  \(L\subseteq \varSigma ^\omega \) is in the class \(\varSigma _1^1\) iff it is the projection of an \(\omega \)-language  over the alphabet \(\{0, 1\} \times \varSigma \) which is in the class \(\varPi _2\).

Kechris, Marker and Sami proved in [22] that the supremum of the set of Borel ranks of (lightface) \(\varPi _1^1\), so also of (lightface) \(\varSigma _1^1\), sets is the ordinal \(\gamma _2^1\). This ordinal is precisely defined in [22]. It holds that \( \omega _1^{\mathrm {CK}} < \gamma _2^1\), where \(\omega _1^{\mathrm {CK}}\) is the first non-recursive ordinal, called the Church-Kleene ordinal.

Notice that it seems still unknown whether every non null ordinal \(\gamma < \gamma _2^1\) is the Borel rank of a (lightface) \(\varPi _1^1\) (or \(\varSigma _1^1\)) set. On the other hand it is known that for every ordinal \(\gamma < \omega _1^{\mathrm {CK}}\) there exist some \(\mathbf {\Sigma }^0_\gamma \)-complete and \(\mathbf {\Pi }^0_\gamma \)-complete sets in the class \(\varDelta _1^1\).

Recall that a Büchi Turing machine is just a Turing machine working on infinite inputs with a Büchi-like acceptance condition, and that the class of \(\omega \)-languages accepted by Büchi Turing machines is the class \( \varSigma ^1_1\) [3, 36].

3.2 Wadge Hierarchy

We now introduce the Wadge hierarchy, which is a great refinement of the Borel hierarchy defined via reductions by continuous functions, [4, 39].

Definition 5

(Wadge [39]). Let X, Y be two finite alphabets. For \(L\subseteq X^\omega \) and \(L'\subseteq Y^\omega \), L is said to be Wadge reducible to \(L'\) (\(L\le _W L')\) iff there exists a continuous function \(f: X^\omega \rightarrow Y^\omega \), such that \(L=f^{-1}(L')\). L and \(L'\) are Wadge equivalent iff \(L\le _W L'\) and \(L'\le _W L\). This will be denoted by \(L\equiv _W L'\). And we shall say that \(L<_W L'\) iff \(L\le _W L'\) but not \(L'\le _W L\).

A set \(L\subseteq X^\omega \) is said to be self dual iff \(L\equiv _W L^-\), and otherwise it is said to be non self dual.

The relation \(\le _W \) is reflexive and transitive, and \(\equiv _W \) is an equivalence relation. The equivalence classes of \(\equiv _W \) are called Wadge degrees. The Wadge hierarchy WH is the class of Borel subsets of a set \(X^\omega \), where X is a finite set, equipped with \(\le _W \) and with \(\equiv _W \).

For \(L\subseteq X^\omega \) and \(L'\subseteq Y^\omega \), if \(L\le _W L'\) and \(L=f^{-1}(L')\) where f is a continuous function from \( X^\omega \) into \(Y^\omega \), then f is called a continuous reduction of L to \(L'\). Intuitively it means that L is less complicated than \(L'\) because to check whether \(x\in L\) it suffices to check whether \(f(x)\in L'\) where f is a continuous function. Hence the Wadge degree of an \(\omega \)-language  is a measure of its topological complexity.

Notice that in the above definition, we consider that a subset \(L\subseteq X^\omega \) is given together with the alphabet X.

We can now define the Wadge class of a set L:

Definition 6

Let L be a subset of \(X^\omega \). The Wadge class of L is :                    \([L]= \{ L' \mid L'\subseteq Y^\omega \text{ for } \text{ a } \text{ finite } \text{ alphabet } Y \text{ and } L'\le _W L \}.\)

Recall that each Borel class \(\mathbf {\Sigma ^0_\alpha }\) and \(\mathbf {\Pi ^0_\alpha }\) is a Wadge class. A set \(L\subseteq X^\omega \) is a \(\mathbf {\Sigma ^0_\alpha }\) (respectively \(\mathbf {\Pi ^0_\alpha }\))-complete set iff for any set \(L'\subseteq Y^\omega \), \(L'\) is in \(\mathbf {\Sigma ^0_\alpha }\) (respectively \(\mathbf {\Pi ^0_\alpha }\)) iff \(L'\le _W L . \)

There is a close relationship between Wadge reducibility and games which we now introduce.

Definition 7

Let \(L\subseteq X^\omega \) and \(L'\subseteq Y^\omega \). The Wadge game \(W(L, L')\) is a game with perfect information between two players, player 1 who is in charge of L and player 2 who is in charge of \(L'\). Player 1 first writes a letter \(a_1\in X\), then player 2 writes a letter \(b_1\in Y\), then player 1 writes a letter \(a_2\in X\), and so on. The two players alternatively write letters \(a_n\) of X for player 1 and \(b_n\) of Y for player 2. After \(\omega \) steps, the player 1 has written an \(\omega \)-word \(a\in X^\omega \) and the player 2 has written an \(\omega \)-word \(b\in Y^\omega \). The player 2 is allowed to skip, even infinitely often, provided he really writes an \(\omega \)-word in \(\omega \) steps. The player 2 wins the play iff [\(a\in L \leftrightarrow b\in L'\)], i.e. iff :

[(\(a\in L ~\mathrm{and} ~ b\in L'\))  or   (\(a\notin L ~\mathrm{and}~ b\notin L'~\mathrm{and} ~ b~\mathrm{is~infinite} \))].

Recall that a strategy for player 1 is a function \(\sigma :(Y\cup \{s\})^\star \rightarrow X\). And a strategy for player 2 is a function \(f:X^+\rightarrow Y\cup \{ s\}\). The strategy \(\sigma \) is a winning strategy for player 1 iff he always wins a play when he uses the strategy \(\sigma \), i.e. when the \(n^{th}\) letter he writes is given by \(a_n=\sigma (b_1\cdots b_{n-1})\), where \(b_i\) is the letter written by player 2 at step i and \(b_i=s\) if player 2 skips at step i.A winning strategy for player 2 is defined in a similar manner.

Martin’s Theorem states that every Gale-Stewart game G(X) (see [21]), with X a Borel set, is determined and this implies the following:

Theorem 8

(Wadge). Let \(L\subseteq X^\omega \) and \(L'\subseteq Y^\omega \) be two Borel sets, where X and Y are finite alphabets. Then the Wadge game \(W(L, L')\) is determined: one of the two players has a winning strategy. And \(L\le _W L'\) iff the player 2 has a winning strategy in the game \(W(L, L')\).

Theorem 9

(Wadge). Up to the complement and \(\equiv _W\), the class of Borel subsets of \(X^\omega \), for a finite alphabet X having at least two letters, is a well ordered hierarchy. There is an ordinal |WH|, called the length of the hierarchy, and a map \(d_W^0\) from WH onto \(|WH|-\{0\}\), such that for all \(L, L' \subseteq X^\omega \):

\(d_W^0 L< d_W^0 L' \leftrightarrow L<_W L' \) and

\(d_W^0 L = d_W^0 L' \leftrightarrow [ L\equiv _W L' \) or \(L\equiv _W L'^-]\).

The Wadge hierarchy of Borel sets of finite rank has length \(^1\varepsilon _0\) where \(^1\varepsilon _0\) is the limit of the ordinals \(\alpha _n\) defined by \(\alpha _1=\omega _1\) and \(\alpha _{n+1}=\omega _1^{\alpha _n}\) for n a non negative integer, \(\omega _1\) being the first non countable ordinal. Then \(^1\varepsilon _0\) is the first fixed point of the ordinal exponentiation of base \(\omega _1\). The length of the Wadge hierarchy of Borel sets in \(\mathbf {\Delta ^0_\omega }= \mathbf {\Sigma ^0_\omega }\cap \mathbf {\Pi ^0_\omega }\) is the \(\omega _1^{th}\) fixed point of the ordinal exponentiation of base \(\omega _1\), which is a much larger ordinal. The length of the whole Wadge hierarchy of Borel sets is a huge ordinal, with regard to the \(\omega _1^{th}\) fixed point of the ordinal exponentiation of base \(\omega _1\). It is described in [4, 39] by the use of the Veblen functions.

4 Wadge Degrees of \(\omega \)-Languages of Petri Nets

We are firstly going to prove the following result.

Theorem 10

The Wadge hierarchy of the class r-\(\mathbf{BCL}(4)_\omega \) is equal to the Wadge hierarchy of the class r-\(\mathbf{CL}(1)_\omega \).

In order to prove this result, we first define a coding of \(\omega \)-words over a finite alphabet \(\varSigma \) by \(\omega \)-words over the alphabet \(\varSigma \cup \{A, B, 0\}\) where A, B and 0 are new letters not in \(\varSigma \).

We shall code an \(\omega \)-word \(x\in \varSigma ^{\omega }\) by the \(\omega \)-word h(x) defined by

$$\begin{aligned} h(x)=A0x(1)B0^{2}x(2)A\cdots B0^{2n}x(2n)A0^{2n+1}x(2n+1)B \cdots \end{aligned}$$

This coding defines a mapping \(h: \varSigma ^{\omega } \rightarrow (\varSigma \cup \{A, B, 0\})^\omega \).

The function h is continuous because for all \(\omega \)-words \(x, y \in \varSigma ^{\omega }\) and each positive integer n, it holds that \(\delta (x, y)< 2^{-n} \rightarrow \delta ( h(x), h(y) ) < 2^{-n}\).

We now state the following lemma.

Lemma 11

Let \(\mathcal {A}\) be a real time 1-counter Büchi automaton accepting \(\omega \)-words over the alphabet \(\varSigma \). Then one can construct a real time 4-blind-counter Büchi automaton \(\mathcal {B}\) reading words over the alphabet \(\varGamma =\varSigma \cup \{A, B, 0\}\), such that \( L(\mathcal {A})\) = \(h^{-1} (L(\mathcal {B}))\), i.e.    \(\forall x \in \varSigma ^{\omega } ~~~~ h(x) \in L(\mathcal {B}) \longleftrightarrow x\in L(\mathcal {A}).\)

Proof. Let \(\mathcal {A}\) \(=(K,\varSigma , \varDelta , q_0, F)\) be a real time 1-counter Büchi automaton accepting \(\omega \)-words over the alphabet \(\varSigma \). We are going to explain informally the behaviour of the 4-blind-counter Büchi automaton \(\mathcal {B}\) when reading an \(\omega \)-word of the form h(x), even if we are going to see that \(\mathcal {B}\) may also accept some infinite words which do not belong to the range of h. Recall that h(x) is of the form

$$\begin{aligned} h(x)=A0x(1)B0^{2}x(2)A \cdots B0^{2n}x(2n)A0^{2n+1}x(2n+1)B \cdots \end{aligned}$$

Notice that in particular every \(\omega \)-word in \(h(\varSigma ^\omega )\) is of the form:

$$\begin{aligned} y = A0^{n_1}x(1)B0^{n_2}x(2)A \cdots B0^{n_{2n}}x(2n)A0^{n_{2n+1}}x(2n+1)B \cdots \end{aligned}$$

where for all \(i\ge 1\), \(n_i >0\) is a positive integer, and \(x(i)\in \varSigma \).

Moreover it is easy to see that the set of \(\omega \)-words \(y \in \varGamma ^\omega \) which can be written in the above form is a regular \(\omega \)-language \(\mathcal {R}\subseteq \varGamma ^\omega \), and thus we can assume, using a classical product construction (see for instance [27]), that the automaton \(\mathcal {B}\) will only accept some \(\omega \)-words of this form.

Now the reading by the automaton \(\mathcal {B}\) of an \(\omega \)-word of the above form

$$\begin{aligned} y = A0^{n_1}x(1)B0^{n_2}x(2)A \cdots B0^{n_{2n}}x(2n)A0^{n_{2n+1}}x(2n+1)B \cdots \end{aligned}$$

will give a decomposition of the \(\omega \)-word y of the following form:

\(y=Au_1v_1x(1)Bu_2v_2x(2)Au_3v_3x(3)B \cdots \) \(~~~~~~~~~~~~~~~~~~~~~~ \cdots Bu_{2n}v_{2n}x(2n)Au_{2n+1}v_{2n+1}x(2n+1)B \cdots \)

where, for all integers \(i\ge 1\), \( u_i, v_i \in 0^\star \), \(x(i) \in \varSigma \), \(|u_1|=0\).

The automaton \(\mathcal {B}\) will use its four blind counters, which we denote \(\mathcal {C}_1, \mathcal {C}_2, \mathcal {C}_3, \mathcal {C}_4,\) in the following way. Recall that the automaton \(\mathcal {B}\) being non-deterministic, we do not describe the unique run of \(\mathcal {B}\) on y, but the general case of a possible run.

At the beginning of the run, the value of each of the four counters is equal to zero. Then the counter \(\mathcal {C}_1\) is increased of \(|u_1|\) when reading \(u_1\), i.e. the counter \(\mathcal {C}_1\) is actually not increased since \(|u_1|=0\) and the finite control is here used to check this. Then the counter \(\mathcal {C}_2\) is increased of 1 for each letter 0 of \(v_1\) which is read until the automaton reads the letter x(1) and then the letter B. Notice that at this time the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are still equal to zero. Then the behaviour of the automaton \(\mathcal {B}\) when reading the next segment \(0^{n_2}x(2)A\) is as follows. The counters \(\mathcal {C}_1\) is firstly decreased of 1 for each letter 0 read, when reading \(k_2\) letters 0, where \(k_2\ge 0\) (notice that here \(k_2=0\) because the value of the counter \(\mathcal {C}_1\) being equal to zero, it cannot decrease under 0). Then the counter \(\mathcal {C}_2\) is decreased of 1 for each letter 0 read, and next the automaton has to read one more letter 0, leaving unchanged the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\), before reading the letter x(2). The end of the decreasing mode of \(\mathcal {C}_1\) coincide with the beginning of the decreasing mode of \(\mathcal {C}_2\), and this change may occur in a non-deterministic way (because the automaton \(\mathcal {B}\) cannot check whether the value of \(\mathcal {C}_1\) is equal to zero). Now we describe the behaviour of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) when reading the segment \(0^{n_2}x(2)A\). Using its finite control, the automaton \(\mathcal {B}\) has checked that \(|u_1|=0\), and then if there is a transition of the automaton \(\mathcal {A}\) such that \(x(1) : ( q_{0}, |u_1|) \mapsto _{\mathcal {A}} (q_1, |u_1| +N_1 )\) then the counter \(\mathcal {C}_3\) is increased of 1 for each letter 0 read, during the reading of the \(k_2+N_1\) first letters 0 of \(0^{n_2}\), where \(k_2\) is described above as the number of which the counter \(\mathcal {C}_1\) has been decreased. This determines \(u_2\) by \(|u_2|=k_2+N_1\) and then the counter \(\mathcal {C}_4\) is increased by 1 for each letter 0 read until \(\mathcal {B}\) reads x(2), and this determines \(v_2\). Notice that the automaton \(\mathcal {B}\) keeps in its finite control the memory of the state \(q_1\) of the automaton \(\mathcal {A}\), and that, after having read the segment \(0^{n_2}=u_2v_2\), the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are respectively \(|\mathcal {C}_3|=|u_2|=k_2+N_1\) and \(|\mathcal {C}_4|=|v_2|=n_2-(|u_2|)\).

Now the run will continue. Notice that generally when reading a segment \(B0^{n_{2n}}x(2n)A\) the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) will successively decrease when reading the first \((n_{2n}-1)\) letters 0 and then will remain unchanged when reading the last letter 0, and the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) will successively increase, when reading the \((n_{2n})\) letters 0. Again the end of the decreasing mode of \(\mathcal {C}_1\) coincide with the beginning of the decreasing mode of \(\mathcal {C}_2\), and this change may occur in a non-deterministic way. But the automaton has kept in its finite control whether \(|u_{2n-1}|=0\) or not and also a state \(q_{2n-2}\) of the automaton \(\mathcal {A}\). Now, if there is a transition of the automaton \(\mathcal {A}\) such that \(x(2n-1) : ( q_{2n-2}, |u_{2n-1}|) \mapsto _{\mathcal {A}} (q_{2n-1}, |u_{2n-1}| +N_{2n-1} )\) for some integer \(N_{2n-1} \in \{-1; 0, 1\}\), and the counter \(\mathcal {C}_1\) is decreased of 1 for each letter 0 read, when reading \(k_{2n}\) first letters 0 of \(0^{n_{2n}}\), then the counter \(\mathcal {C}_3\) is increased of 1 for each letter 0 read, during the reading of the \(k_{2n}+N_{2n-1}\) first letters 0 of \(0^{n_{2n}}\), and next the counter \(\mathcal {C}_4\) is increased by 1 for each letter 0 read until \(\mathcal {B}\) reads x(2n), and this determines \(v_{2n}\). Then after having read the segment \(0^{n_ {2n}}=u_{2n}v_{2n}\), the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) have respectively increased of \(|u_{2n}|=k_{2n}+N_{2n-1}\) and \(|v_{2n}|=n_{2n}-|u_{2n}|\). Notice that one cannot ensure that, after the reading of \(0^{n_ {2n}}=u_{2n}v_{2n}\), the exact values of these counters are \(|\mathcal {C}_3|=|u_{2n}|=k_{2n}+N_{2n-1}\) and \(|\mathcal {C}_4|=|v_{2n}| =n_ {2n} - |u_{2n}|\). Actually this is due to the fact that one cannot ensure that the values of \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are equal to zero at the beginning of the reading of the segment \(B0^{n_{2n}}x(2n)A\) although we will see this is true and important in the particular case of a word of the form \(y=h(x)\).

The run will continue in a similar manner during the reading of the next segment \(A0^{n_{2n+1}}x(2n+1)B\), but here the role of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) on one side, and of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) on the other side, will be interchanged. More precisely the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) will successively decrease when reading the first \((n_{2n+1}-1)\) letters 0 and then will remain unchanged when reading the last letter 0, and the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) will successively increase, when reading the \((n_{2n+1})\) letters 0. The end of the decreasing mode of \(\mathcal {C}_3\) coincide with the beginning of the decreasing mode of \(\mathcal {C}_4\), and this change may occur in a non-deterministic way. But the automaton has kept in its finite control whether \(|u_{2n}|=0\) or not and also a state \(q_{2n-1}\) of the automaton \(\mathcal {A}\). Now, if there is a transition of the automaton \(\mathcal {A}\) such that \(x(2n) : ( q_{2n-1}, |u_{2n}|) \mapsto _{\mathcal {A}} (q_{2n}, |u_{2n}| +N_{2n} )\) for some integer \(N_{2n} \in \{-1; 0, 1\}\), and the counter \(\mathcal {C}_3\) is decreased of 1 for each letter 0 read, when reading \(k_{2n+1}\) first letters 0 of \(0^{n_{2n+1}}\), then the counter \(\mathcal {C}_1\) is increased of 1 for each letter 0 read, during the reading of the \(k_{2n+1}+N_{2n}\) first letters 0 of \(0^{n_{2n+1}}\), and next the counter \(\mathcal {C}_2\) is increased by 1 for each letter 0 read until \(\mathcal {B}\) reads \(x(2n+1)\), and this determines \(v_{2n+1}\). Then after having read the segment \(0^{n_ {2n+1}}=u_{2n+1}v_{2n+1}\), the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) have respectively increased of \(|u_{2n+1}|=k_{2n+1}+N_{2n}\) and \(|v_{2n+1}|=n_{2n+1}-|u_{2n+1}|\). Notice that again one cannot ensure that, after the reading of \(0^{n_ {2n+1}}=u_{2n+1}v_{2n+1}\), the exact values of these counters are \(|\mathcal {C}_1|=|u_{2n+1}|=k_{2n+1}+N_{2n}\) and \(|\mathcal {C}_2|=|v_{2n+1}| =n_ {2n+1} - |u_{2n+1}|\). This is due to the fact that one cannot ensure that the values of \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are equal to zero at the beginning of the reading of the segment \(A0^{n_{2n+1}}x(2n+1)B\) although we will see this is true and important in the particular case of a word of the form \(y=h(x)\).

The run then continues in the same way if it is possible and in particular if there is no blocking due to the fact that one of the counters of the automaton \(\mathcal {B}\) would have a negative value.

Now an \(\omega \)-word \(y\in \mathcal {R}\subseteq \varGamma ^\omega \) of the above form will be accepted by the automaton \(\mathcal {B}\) if there is such an infinite run for which a final state \(q_f\in F\) of the automaton \(\mathcal {A}\) has been stored infinitely often in the finite control of \(\mathcal {B}\) in the way which has just been described above.

We now consider the particular case of an \(\omega \)-word of the form \(y=h(x)\), for some \(x\in \varSigma ^\omega \). Let then

$$\begin{aligned} y=h(x)=A0x(1)B0^{2}x(2)A0^{3}x(3)B \cdots B0^{2n}x(2n)A0^{2n+1}x(2n+1)B \cdots \end{aligned}$$

We are going to show that, if y is accepted by the automaton \(\mathcal {B}\), then \(x\in L(\mathcal {A})\). Let us consider a run of the automaton \(\mathcal {B}\) on y as described above and which is an accepting run. We first show by induction on \(n\ge 1\), that after having read an initial segment of the form \(A0x(1)B0^{2}x(2)A\cdots A0^{2n-1}x(2n-1)B\),

the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are equal to zero, and the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) satisfy \(|\mathcal {C}_1| + |\mathcal {C}_2|=2n-1\). And similarly after having read an initial segment of the form \(A0x(1)B0^{2}x(2)A \cdots B0^{2n}x(2n)A\) the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are equal to zero, and the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) satisfy \(|\mathcal {C}_3| + |\mathcal {C}_4|=2n\).

For \(n=1\), we have seen that after having read the initial segment A0x(1)B, the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) will be respectively 0 and \(|v_1|\) and here \(|v_1|=1\) and thus \(|\mathcal {C}_1| + |\mathcal {C}_2|=1\). On the other hand the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) have not yet increased so that the value of each of these counters is equal to zero. During the reading of the segment \(0^{2}\) of \(0^{2}x(2)A\) the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) successively decrease. But here \(\mathcal {C}_1\) cannot decrease (with the above notations, it holds that \(k_2=0\)) so \(\mathcal {C}_2\) must decrease of 1 because after the decreasing mode the automaton \(\mathcal {B}\) must read a last letter 0 without decreasing the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) and then the letter \(x(2)\in \varSigma \). Thus after having read \(0^{2}x(2)A\) the values of \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are equal to zero. Moreover the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) had their values equal to zero at the beginning of the reading of \(0^{2}x(2)A\) and they successively increase during the reading of \(0^{2}\) and they remain unchanged during the reading of x(2)A so that their values satisfy \(|\mathcal {C}_3| + |\mathcal {C}_4|=2\) after the reading of \(0^{2}x(2)A\).

Assume now that for some integer \(n>1\) the claim is proved for all integers \(k<n\) and let us prove it for the integer n. By induction hypothesis we know that at the beginning of the reading of the segment \(A0^{2n-1}x(2n-1)B\) of y, the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are equal to zero, and the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) satisfy \(|\mathcal {C}_3| + |\mathcal {C}_4|=2n-2\). When reading the \((2n-2)\) first letters 0 of \(A0^{2n-1}x(2n-1)B\) the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) successively decrease and they must decrease completely because after there must remain only one letter 0 to be read by \(\mathcal {B}\) before the letter \(x(2n-1)\). Therefore after the reading of \(A0^{2n-1}x(2n-1)B\) the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are equal to zero. And since the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) are equal to zero before the reading of \(0^{2n-1}x(2n-1)B\) and these counters successively increase during the reading of \(0^{2n-1}\), their values satisfy \(|\mathcal {C}_1| + |\mathcal {C}_2|=2n-1\) after the reading of \(A0^{2n-1}x(2n-1)B\). We can reason in a very similar manner for the reading of the next segment \(B0^{2n}x(2n)A\), the role of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) on one side, and of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) on the other side, being simply interchanged. This ends the proof of the claim by induction on n.

It is now easy to see by induction that for each integer \(n\ge 2\), it holds that \(k_n=|u_{n-1}|\). Then, since with the above notations we have \(|u_{n+1}|=k_{n+1} + N_{n}=|u_{n}| + N_n\), and there is a transition of the automaton \(\mathcal {A}\) such that \(x(n) : ( q_{n-1}, |u_{n}|) \mapsto _{\mathcal {A}} (q_{n}, |u_{n}| +N_{n})\) for \(N_{n} \in \{-1; 0, 1\}\), it holds that \(x(n) : ( q_{n-1}, |u_{n}|) \mapsto _{\mathcal {A}} (q_{n}, |u_{n+1}| )\). Therefore the sequence \((q_i, |u_{i}|)_{i\ge 0}\) is an accepting run of the automaton \(\mathcal {A}\) on the \(\omega \)-word x and \(x\in L(\mathcal {A})\). Notice that the state \(q_0\) of the sequence \((q_i)_{i\ge 0}\) is also the initial state of \(\mathcal {A}\).

Conversely, it is easy to see that if \(x\in L(\mathcal {A})\) then there exists an accepting run of the automaton \(\mathcal {B}\) on the \(\omega \)-word h(x) and \(h(x)\in L(\mathcal {B})\). \(\square \)

The above Lemma 11 shows that, given a real time 1-counter (with zero-test) Büchi automaton \(\mathcal {A}\) accepting \(\omega \)-words over the alphabet \(\varSigma \), one can construct a real time 4-blind-counter Büchi automaton \(\mathcal {B}\) which can simulate the 1-counter automaton \(\mathcal {A}\) on the code h(x) of the word x. On the other hand, we cannot describe precisely the \(\omega \)-words which are accepted by \(\mathcal {B}\) but are not in the set \(h(\varSigma ^\omega )\). However we can see that all these words have a special shape, as stated by the following lemma.

Lemma 12

Let \(\mathcal {A}\) be a real time 1-counter Büchi automaton accepting \(\omega \)-words over the alphabet \(\varSigma \), and let \(\mathcal {B}\) be the real time 4-blind-counter Büchi automaton reading words over the alphabet \(\varGamma =\varSigma \cup \{A, B, 0\}\) which is constructed in the proof of Lemma 11. Let \(y \in L(\mathcal {B})\setminus h(\varSigma ^\omega )\) being of the following form

\(y = A0^{n_1}x(1)B0^{n_2}x(2)A0^{n_3}x(3)B \cdots B0^{n_{2n}}x(2n)A0^{n_{2n+1}}x(2n+1)B \cdots \)

and let \(i_0\) be the smallest integer i such that \(n_i \ne i\). Then it holds that either \(i_0=1\) or \(n_{i_0} < i_0\).

Proof. Assume first that \(y \in L(\mathcal {B})\setminus h(\varSigma ^\omega )\) is of the following form

$$\begin{aligned} ~~~~~~~~~~ y = A0^{n_1}x(1)B0^{n_2}x(2)A \cdots B0^{n_{2n}}x(2n)A0^{n_{2n+1}}x(2n+1)B \cdots \end{aligned}$$

and that the smallest integer i such that \(n_i \ne i\) is an even integer \(i_0>1\). Consider an infinite accepting run of \(\mathcal {B}\) on y. It follows from the proof of the above Lemma 11 that after the reading of the initial segment

$$\begin{aligned} A0^{n_1}x(1)B0^{n_2}x(2)A \cdots A0^{{i_0-1}}x(i_0-1)B \end{aligned}$$

the values of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) are equal to zero, and the values of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) satisfy \(|\mathcal {C}_1| + |\mathcal {C}_2|=i_0-1\). Thus since the two counters must successively decrease during the next \(n_ {i_0}-1\) letters 0, it holds that \(n_ {i_0}-1 \le i_0-1\) because otherwise either \(\mathcal {C}_1\) or \(\mathcal {C}_2\) would block. Therefore \(n_{i_0} < i_0\) since \(n_{i_0} \ne i_0\) by definition of \(i_0\). The reasoning is very similar in the case of an odd integer \(i_0\), the role of the counters \(\mathcal {C}_1\) and \(\mathcal {C}_2\) on one side, and of the counters \(\mathcal {C}_3\) and \(\mathcal {C}_4\) on the other side, being simply interchanged. \(\square \)

Let \(\mathcal {L} \subseteq \varGamma ^\omega \) be the \(\omega \)-language containing the \(\omega \)-words over \(\varGamma \) which belong to one of the following \(\omega \)-languages.

  • \(\mathcal {L}_1\) is the set of \(\omega \)-words over the alphabet \(\varSigma \cup \{A, B, 0\}\) which have not any initial segment in \(A\cdot 0\cdot \varSigma \cdot B\).

  • \(\mathcal {L}_2\) is the set of \(\omega \)-words over the alphabet \(\varSigma \cup \{A, B, 0\}\) which contain a segment of the form \(B\cdot 0^n \cdot a \cdot A\cdot 0^m\cdot b\) or of the form \(A \cdot 0^n \cdot a \cdot B \cdot 0^m\cdot b\) for some letters \(a, b \in \varSigma \) and some positive integers \(m \le n\).

Lemma 13

The \(\omega \)-language \(\mathcal {L}\) is accepted by a (non-deterministic) real-time 1-blind counter Büchi automaton.

Proof. First, it is easy to see that \(\mathcal {L}_1\) is in fact a regular \(\omega \)-language, and thus it is also accepted by a real-time 1-blind counter Büchi automaton (even without active counter). On the other hand it is also easy to construct a real time 1-blind counter Büchi automaton accepting the \(\omega \)-language \(\mathcal {L}_2\). The class of \(\omega \)-languages accepted by non-deterministic real time 1-blind counter Büchi automata being closed under finite union in an effective way, one can construct a real time 1-blind counter Büchi automaton accepting \(\mathcal {L}\). \(\square \)

Lemma 14

Let \(\mathcal {A}\) be a real time 1-counter Büchi automaton accepting \(\omega \)-words over the alphabet \(\varSigma \). Then one can construct a real time 4-blind counter Büchi automaton \(\mathcal {P}_{\mathcal {A}}\) such that    \(L(\mathcal {P}_{\mathcal {A}}) = h( L(\mathcal {A}) ) \cup \mathcal {L}.\)

Proof. Let \(\mathcal {A}\) be a real time 1-counter Büchi automaton accepting \(\omega \)-words over \(\varSigma \). We have seen in the proof of Lemma 11 that one can construct a real time 4-blind counter Büchi automaton \(\mathcal {B}\) reading words over the alphabet \(\varGamma =\varSigma \cup \{A, B, 0\}\), such that \( L(\mathcal {A})\) = \(h^{-1} (L(\mathcal {B}))\), i.e. \(\forall x \in \varSigma ^{\omega } ~~~~ h(x) \in L(\mathcal {B}) \) \(\longleftrightarrow x\in L(\mathcal {A})\). Moreover By Lemma 12 it holds that \(L(\mathcal {B})\setminus h(\varSigma ^\omega ) \subseteq \mathcal {L}\). and thus   \(h( L(\mathcal {A}) ) \cup \mathcal {L} = L(\mathcal {B}) \cup \mathcal {L}\). But By Lemma 13 the \(\omega \)-language \(\mathcal {L}\) is accepted by a (non-deterministic) real-time 1-blind counter Büchi automaton, hence also by a real-time 4-blind counter Büchi automaton. The class of \(\omega \)-languages accepted by (non-deterministic) real-time 4-blind counter Büchi automata is closed under finite union in an effective way, and thus one can construct a real time 4-blind counter Büchi automaton \(\mathcal {P}_{\mathcal {A}}\) such that \(L(\mathcal {P}_{\mathcal {A}}) = h( L(\mathcal {A}) ) \cup \mathcal {L}. \) \(\square \)

We are now going to prove that if \(L(\mathcal {A})\) \(\subseteq \varSigma ^\omega \) is accepted by a real time 1-counter automaton \(\mathcal {A}\) with a Büchi acceptance condition then \(L(\mathcal {P}_{\mathcal {A}}) = h( L(\mathcal {A}) )\) \( \cup \mathcal {L}\) will have the same Wadge degree as the \(\omega \)-language \(L(\mathcal {A})\), except for some very simple cases.

We first notice that \(h(\varSigma ^{\omega })\) is a closed subset of \(\varGamma ^\omega \). Indeed it is the image of the compact set \(\varSigma ^\omega \) by the continuous function h, and thus it is a compact hence also closed subset of \(\varGamma ^\omega = (\varSigma \cup \{A, B, 0\})^\omega \). Thus its complement \(h(\varSigma ^{\omega })^-=(\varSigma \cup \{A, B, 0\})^\omega - h(\varSigma ^{\omega })\) is an open subset of \(\varGamma ^\omega \). Moreover the set \(\mathcal {L}\) is an open subset of \(\varGamma ^\omega \), as it can be easily seen from its definition and one can easily define, from the definition of the \(\omega \)-language \(\mathcal {L}\), a finitary language \(V \subseteq \varGamma ^\star \) such that \(\mathcal {L}=V\cdot \varGamma ^\omega \). We shall also denote \(\mathcal {L}'=h(\varSigma ^{\omega })^-\setminus \mathcal {L}\) so that \(\varGamma ^\omega \) is the disjoint union \(\varGamma ^\omega = h(\varSigma ^{\omega }) \cup \mathcal {L} \cup \mathcal {L}'\). Notice that \(\mathcal {L}'\) is the difference of the two open sets \(h(\varSigma ^{\omega })^-\) and \(\mathcal {L}\).

We now wish to return to the proof of the above Theorem 10 stating that the Wadge hierarchy of the class r-\(\mathbf{BCL}(4)_\omega \) is equal to the Wadge hierarchy of the class r-\(\mathbf{CL}(1)_\omega \).

To prove this result we firstly consider non self dual Borel sets. We recall the definition of Wadge degrees introduced by Duparc in [4] and which is a slight modification of the previous one.

Definition 15

  1. (a)

    \(d_w(\emptyset )=d_w(\emptyset ^-)=1\)

  2. (b)

    \(d_w(L)=sup \{d_w(L')+1 ~\mid ~~L' \mathrm{~non~ self ~dual~ and~} L'<_W L \} \) (for either L self dual or not, \(L>_W \emptyset ).\)

Wadge and Duparc used the operation of sum of sets of infinite words which has as counterpart the ordinal addition over Wadge degrees.

Definition 16

(Wadge, see [4, 39]). Assume that \(X\subseteq Y\) are two finite alphabets, \(Y-X\) containing at least two elements, and that \(\{X_+, X_-\}\) is a partition of \(Y-X\) in two non empty sets. Let \(L \subseteq X^{\omega }\) and \(L' \subseteq Y^{\omega }\), then \(L' + L =_{df} L\cup \{ u\cdot a\cdot \beta ~\mid ~ u\in X^\star , ~(a\in X_+ ~and ~\beta \in L' )~ or ~(a\in X_- ~and ~\beta \in L'^- )\}\)

This operation is closely related to the ordinal sum as it is stated in the following:

Theorem 17

(Wadge, see [4, 39]). Let \(X\subseteq Y\), \(Y-X\) containing at least two elements, \(L \subseteq X^{\omega }\) and \(L' \subseteq Y^{\omega }\) be non self dual Borel sets. Then \((L+L')\) is a non self dual Borel set and \(d_w( L'+L )= d_w( L' ) + d_w( L )\).

A player in charge of a set \(L'+L\) in a Wadge game is like a player in charge of the set L but who can, at any step of the play, erase his previous play and choose to be this time in charge of \(L'\) or of \(L'^-\). Notice that he can do this only one time during a play.

The following lemma was proved in [13]. Notice that below the emptyset is considered as an \(\omega \)-language over an alphabet \(\varDelta \) such that \(\varDelta - \varSigma \) contains at least two elements.

Lemma 18

Let \(L \subseteq \varSigma ^\omega \) be a non self dual Borel set such that \(d_w( L )\ge \omega \). Then it holds that \(L \equiv _W \emptyset + L\).

We can now prove the following lemma.

Lemma 19

Let \(L \subseteq \varSigma ^\omega \) be a non self dual Borel set accepted by a real time 1-counter Büchi automaton \(\mathcal {A}\). Then there is an \(\omega \)-language \(L'\) accepted by a real time 4-blind counter Büchi automaton such that \(L \equiv _W L'\).

Proof. Recall first that there are regular \(\omega \)-languages of every finite Wadge degree, [29, 36]. These regular \(\omega \)-languages are Boolean combinations of open sets, and they obviously belong to the class r-\(\mathbf{BCL}(4)_\omega \) since every regular \(\omega \)-language belongs to this class.

So we have only to consider the case of non self dual Borel sets of Wadge degrees greater than or equal to \(\omega \).

Let then \(L=L(\mathcal {A}) \subseteq \varSigma ^\omega \) be a non self dual Borel set, accepted by a real time 1-counter Büchi automaton \(\mathcal {A}\), such that \(d_w( L )\ge \omega \). By Lemma 14, \(L(\mathcal {P}_{\mathcal {A}}) = h( L(\mathcal {A}) )\) \(\,\cup \,\mathcal {L}\) is accepted by a a real time 4-blind counter Büchi automaton \(\mathcal {P}_{\mathcal {A}}\), where the mapping \(h: \varSigma ^\omega \rightarrow (\varSigma \cup \{A, B, 0\})^\omega \) is defined, for \(x\in \varSigma ^\omega \), by:

\(h(x)= A0x(1)B0^{2}x(2)A0^{3}x(3)B \cdots B0^{2n}x(2n)A0^{2n+1}x(2n+1)B \cdots \)

We set \(L'=L(\mathcal {P}_{\mathcal {A}})\) and we now prove that \(L' \equiv _W L\).

Firstly, it is easy to see that the function h is a continuous reduction of L to \(L'\) and thus \(L \le _W L'\).

To prove that \(L' \le _W L \), it suffices to prove that \(L' \le _W \emptyset +(\emptyset + L)\) because Lemma 18 states that \( \emptyset + L \equiv _W L\), and thus also \(\emptyset + (\emptyset + L) \equiv _W L\). Consider the Wadge game \(W( L', \emptyset + (\emptyset + L) )\). Player 2 has a winning strategy in this game which we now describe.

As long as Player 1 remains in the closed set \(h(\varSigma ^{\omega })\) (this means that the word written by Player 1 is a prefix of some infinite word in \(h(\varSigma ^{\omega })\)) Player 2 essentially copies the play of player 1 except that Player 2 skips when player 1 writes a letter not in \(\varSigma \). He continues forever with this strategy if the word written by player 1 is always a prefix of some \(\omega \)-word of \(h(\varSigma ^\omega )\). Then after \(\omega \) steps Player 1 has written an \(\omega \)-word h(x) for some \(x \in \varSigma ^\omega \), and Player 2 has written x. So in that case \(h(x) \in L'\) iff \(x \in L(\mathcal {A})\) iff \(x \in \emptyset + (\emptyset + L)\).

But if at some step of the play, Player 1 “goes out of” the closed set \(h(\varSigma ^\omega )\) because the word he has now written is not a prefix of any \(\omega \)-word of \(h(\varSigma ^\omega )\), then Player 1 “enters” in the open set \(h(\varSigma ^\omega )^- = \mathcal {L}\cup \mathcal {L}'\) and will stay in this set. Two cases may now appear.

First Case. When Player 1 “enters” in the open set \(h(\varSigma ^\omega )^- = \mathcal {L}\cup \mathcal {L}'\), he actually enters in the open set \( \mathcal {L}=V\cdot \varGamma ^\omega \) (this means that Player 1 has written an initial segment in V). Then the final word written by Player 1 will surely be inside \(L'\). Player 2 can now write a letter of \(\varDelta -\varSigma \) in such a way that he is now like a player in charge of the wholeset and he can now writes an \(\omega \)-word u so that his final \(\omega \)-word will be inside \(\emptyset + L \), and also inside \(\emptyset + (\emptyset + L)\). Thus Player 2 wins this play too.

Second Case. When Player 1 “enters” in the open set \(h(\varSigma ^\omega )^- = \mathcal {L}\cup \mathcal {L}'\), he does not enter in the open set \( \mathcal {L}=V\cdot \varGamma ^\omega \). Then Player 2, being first like a player in charge of the set \((\emptyset + L)\), can write a letter of \(\varDelta -\varSigma \) in such a way that he is now like a player in charge of the emptyset and he can now continue, writing an \(\omega \)-word u. If Player 1 never enters in the open set \(\mathcal {L}=V\cdot \varGamma ^\omega \) then the final word written by Player 1 will be in \(\mathcal {L}'\) and thus surely outside \(L'\), and the final word written by Player 2 will be outside the emptyset. So in that case Player 2 wins this play too. If at some step of the play Player 1 enters in the open set \(\mathcal {L}=V\cdot \varGamma ^\omega \) then his final \(\omega \)-word will be surely in \(L'\). In that case Player 1, in charge of the set \(\emptyset + (\emptyset + L)\), can again write an extra letter and choose to be in charge of the wholeset and he can now write an \(\omega \)-word v so that his final \(\omega \)-word will be inside \(\emptyset + (\emptyset + L)\). Thus Player 2 wins this play too.

Finally we have proved that \(L \le _W L' \le _W L \) thus it holds that \(L' \equiv _W L\). This ends the proof. \(\square \)

End of Proof of Theorem 10

Let \(L \subseteq \varSigma ^\omega \) be a Borel set accepted by a real time 1-counter Büchi automaton \(\mathcal {A}\). If the Wadge degree of L is finite, it is well known that it is Wadge equivalent to a regular \(\omega \)-language, hence also to an \(\omega \)-language in the class r-\(\mathbf{BCL}(4)_\omega \). If L is non self dual and its Wadge degree is greater than or equal to \(\omega \), then we know from Lemma 19 that there is an \(\omega \)-language \(L'\) accepted by a real time 4-blind counter Büchi automaton such that \(L \equiv _W L'\).

It remains to consider the case of self dual Borel sets. The alphabet \(\varSigma \) being finite, a self dual Borel set L is always Wadge equivalent to a Borel set in the form \(\varSigma _1\cdot L_1 \cup \varSigma _2\cdot L_2\), where \((\varSigma _1, \varSigma _2)\) form a partition of \(\varSigma \), and \(L_1, L_2\subseteq \varSigma ^\omega \) are non self dual Borel sets such that \(L_1 \equiv _W L_2^-\). Moreover \(L_1\) and \(L_2\) can be taken in the form \(L_{(u_1)}=u_1\cdot \varSigma ^\omega \cap L\) and \(L_{(u_2)}=u_2\cdot \varSigma ^\omega \cap L\) for some \(u_1, u_2 \in \varSigma ^\star \), see [5]. So if \(L \subseteq \varSigma ^\omega \) is a self dual Borel set accepted by a real time 1-counter Büchi automaton then \(L \equiv _W \varSigma _1\cdot L_1 \cup \varSigma _2\cdot L_2\), where \((\varSigma _1, \varSigma _2)\) form a partition of \(\varSigma \), and \(L_1, L_2\subseteq \varSigma ^\omega \) are non self dual Borel sets accepted by real time 1-counter Büchi automata. We have already proved that there is an \(\omega \)-language \(L'_1\) in the class r-\(\mathbf{BCL}(4)_\omega \) such that \(L'_1 \equiv _W L_1\) and an \(\omega \)-language \(L'_2\) in the class r-\(\mathbf{BCL}(4)_\omega \) such that \(L_2'^-\equiv _W L_2\). Thus \(L \equiv _W \varSigma _1\cdot L_1 \cup \varSigma _2\cdot L_2 \equiv _W \varSigma _1\cdot L_1' \cup \varSigma _2\cdot L'_2\) and \(\varSigma _1\cdot L'_1 \cup \varSigma _2\cdot L'_2\) is an \(\omega \)-language in the class r-\(\mathbf{BCL}(4)_\omega \).

The reverse direction is immediate: if \(L \subseteq \varSigma ^\omega \) is a Borel set accepted by a 4-blind counter Büchi automaton \(\mathcal {A}\), then it is also accepted by a Büchi Turing machine and thus by [13, Theorem 25] there exists a real time 1-counter Büchi automaton \(\mathcal {B}\) such that \(L(\mathcal {A}) \equiv _W L(\mathcal {B})\). \(\square \)

Recall that, for each non-null countable ordinal \(\alpha \), the \(\mathbf {\Sigma }^0_\alpha \)-complete sets (respectively, the \(\mathbf {\Pi }^0_\alpha \)-complete sets) form a single Wadge degree. Thus we can infer the following result from the above Theorem 10 and from the results of [13, 22].

Corollary 20

For each non-null recursive ordinal \(\alpha < \omega _1^{\mathrm{CK}} \) there exist some \(\mathbf {\Sigma }^0_\alpha \)-complete and some \(\mathbf {\Pi }^0_\alpha \)-complete \(\omega \)-languages in the class r-\(\mathbf{BCL}(4)_\omega \). And the supremum of the set of Borel ranks of \(\omega \)-languages in the class r-\(\mathbf{BCL}(4)_\omega \) is the ordinal \(\gamma _2^1\), which is precisely defined in [22].

We have only considered Borel sets in the above Theorem 10. However we know that there also exist some non-Borel \(\omega \)-languages accepted by real time 1-counter Büchi automata, and even some \(\mathbf {\Sigma }_1^1\)-complete ones, [12].

By Lemma 4.7 of [16] the conclusion of the above Lemma 18 is also true if L is assumed to be an analytic but non-Borel set.

Lemma 21

([16]). Let \(L \subseteq \varSigma ^\omega \) be an analytic but non-Borel set. Then \(L \equiv _W \emptyset + L\).

Next the proof of the above Lemma 19 can be adapted to the case of an analytic but non-Borel set, and we can state the following result.

Theorem 22

Let \(L \subseteq \varSigma ^\omega \) be an analytic but non-Borel set accepted by a real time 1-counter Büchi automaton \(\mathcal {A}\). Then there is an \(\omega \)-language \(L'\) accepted by a real time 4-blind counter Büchi automaton such that \(L \equiv _W L'\).

Proof. It is very similar to the proof of the above Lemma 19, using Lemma 21 instead of the above Lemma 18. \(\square \)

This implies in particular the existence of a \(\mathbf {\Sigma }_1^1\)-complete, hence non Borel, \(\omega \)-language accepted by a real-time 4-blind-counter Büchi automaton. But Michał Skrzypczak has recently proved that one blind counter is sufficient.

Theorem 23

(Skrzypczak [34]). There exists a \(\mathbf {\Sigma }_1^1\)-complete \(\omega \)-language accepted by a 1-blind-counter automaton.

5 High Undecidability of Topological Properties

We prove that it is highly undecidable to determine the topological complexity of a Petri net \(\omega \)-language. As usual, since there is a finite description of a real time 1-counter Büchi automaton or of a 4-blind-counter Büchi automaton, we can define a Gödel numbering of all 1-counter Büchi automata or of all 4-blind-counter Büchi automata and then speak about the 1-counter Büchi automaton (or 4-blind-counter Büchi automaton) of index z. Recall first the following result, proved in [15], where we denote \(\mathcal {A}_z\) the real time 1-counter Büchi automaton of index z reading words over a fixed finite alphabet \(\varSigma \) having at least two letters. We refer the reader to a textbook like [26] for more background about the analytical hierarchy of subsets of the set \(\mathbb {N}\) of natural numbers.

Theorem 24

Let \(\alpha \) be a countable ordinal. Then

  1. 1.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {A}_z) \text{ is } \text{ in } \text{ the } \text{ Borel } \text{ class } \mathbf {\Sigma }^0_\alpha \}\) is \(\varPi _2^1\)-hard.

  2. 2.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {A}_z) \text{ is } \text{ in } \text{ the } \text{ Borel } \text{ class } \mathbf {\Pi }^0_\alpha \}\) is \(\varPi _2^1\)-hard.

  3. 3.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {A}_z) \text{ is } \text{ a } \text{ Borel } \text{ set } \}\) is \(\varPi _2^1\)-hard.

Using the previous constructions we can now easily show the following result, where \(\mathcal {P}_z\) is the real time 4-blind-counter Büchi automaton of index z.

Theorem 25

Let \(\alpha \ge 2\) be a countable ordinal. Then

  1. 1.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {P}_z) \text{ is } \text{ in } \text{ the } \text{ Borel } \text{ class } \mathbf {\Sigma }^0_\alpha \}\) is \(\varPi _2^1\)-hard.

  2. 2.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {P}_z) \text{ is } \text{ in } \text{ the } \text{ Borel } \text{ class } \mathbf {\Pi }^0_\alpha \}\) is \(\varPi _2^1\)-hard.

  3. 3.

    \( \{ z \in \mathbb {N} \mid L(\mathcal {P}_z) \text{ is } \text{ a } \text{ Borel } \text{ set }\}\) is \(\varPi _2^1\)-hard.

Proof. It follows from the fact that one can easily get an injective recursive function \(g: \mathbb {N} \rightarrow \mathbb {N}\) such that \(L(\mathcal {P}_{\mathcal {A}_z}) = h( L(\mathcal {A}_z) ) \cup \mathcal {L} = L(\mathcal {P}_{g(z)}) \) and from the following equivalences which hold for each countable ordinal \(\alpha \ge 2\):

  1. 1.

    \(L(\mathcal {A}_z)\) is in the Borel class \(\mathbf {\Sigma }^0_\alpha \) (resp., \(\mathbf {\Pi }^0_\alpha \)) \(\Longleftrightarrow \) \( L(\mathcal {P}_{g(z)})\) is in the Borel class \(\mathbf {\Sigma }^0_\alpha \) (resp., \(\mathbf {\Pi }^0_\alpha \)).

  2. 2.

    \(L(\mathcal {A}_z)\) is a Borel set \(\Longleftrightarrow \) \( L(\mathcal {P}_{g(z)})\) is a Borel set. \(\square \)

6 High Undecidability of the Equivalence and the Inclusion Problems

We now add a result obtained from our previous constructions and which is important for verification purposes.

Theorem 26

The equivalence and the inclusion problems for \(\omega \)-languages of Petri nets, or even for \(\omega \)-languages in the class r-\(\mathbf{BCL}(4)_\omega \), are \(\varPi _2^1\)-complete.

  1. 1.

    \(\{ (z,z')\in \mathbb {N} \mid L(\mathcal {P}_z) = L(\mathcal {P}_{z'}) \}\) is \(\varPi _2^1\)-complete

  2. 2.

    \(\{ (z,z')\in \mathbb {N} \mid L(\mathcal {P}_z) \subseteq L(\mathcal {P}_{z'}) \}\) is \(\varPi _2^1\)-complete

Proof. Firstly, it is easy to see that each of these decision problems is in the class \(\varPi _2^1\), since the equivalence and the inclusion problems for \(\omega \)-languages of Turing machines are already in the class \(\varPi _2^1\), see [2, 15]. The completeness part follows from the fact that the equivalence and the inclusion problems for \(\omega \)-languages accepted by real time 1-counter Büchi automata are \(\varPi _2^1\)-complete [15], and from the fact that there exists an injective recursive function \(g: \mathbb {N} \rightarrow \mathbb {N}\) such that \(\mathcal {P}_{\mathcal {A}_z}=\mathcal {P}_{g(z)}\), and then from the following equivalences:

  1. 1.

    \(L(\mathcal {A}_z) = L(\mathcal {A}_{z'}) \Longleftrightarrow L(\mathcal {P}_{g(z)}) = L(\mathcal {P}_{g(z')})\)

  2. 2.

    \(L(\mathcal {A}_z) \subseteq L(\mathcal {A}_{z'}) \Longleftrightarrow L(\mathcal {P}_{g(z)}) \subseteq L(\mathcal {P}_{g(z')})\). \(\square \)

7 Concluding Remarks

We have proved that the Wadge hierarchy of Petri nets \(\omega \)-languages, and even of \(\omega \)-languages in the class r-\(\mathbf{BCL}(4)_\omega \), is equal to the Wadge hierarchy of effective analytic sets, and that it is highly undecidable to determine the topological complexity of a Petri net \(\omega \)-language. In some sense our results show that, in contrast with the finite behavior, the infinite behavior of Petri nets is closer to the infinite behavior of Turing machines than to that of finite automata.

It remains open for further study to determine the Borel and Wadge hierarchies of \(\omega \)-languages accepted by automata with less than four blind counters.