? (A)? (B)? Geraud Senizergues LaBRI Universite de Bordeaux I 351, Cours de la Liberation 33405 Talence, France?? Abstract. The bisimulation problem for equational graphs of nite outdegree is shown to be decidable. We reduce this problem to the - bisimulation problem for deterministic rational (vectors of) boolean series on the alphabet of a dpda M. We then exhibit a complete formal system for deducing equivalent pairs of such vectors. Keywords: bisimulation; equational graphs; deterministic pushdown automata; rational languages; nite dimensional vector spaces; matrix semi-groups; complete formal systems. 1 Introduction 1.1 Motivations Processes In the context of concurrency theory, several notions of \behaviour of a process" and \ behavioural equivalence between processes" have been proposed. Among them, the notion of bisimulation equivalence seems to play a prominent role ( see [Mil89]). The question of whether this equivalence is decidable or not for various classes of innite processes has been the subject of many works in the last ten years. The aim of this work is to show decidability of the bisimulation equivalence for the class of all processes dened by pushdown automata with decreasing -transitions ( of course, we assume that -transitions are not visible, which implies that the graphs of the processes considered here, might have innite in-degree). This problem was raised in [Cau95] ( see Problem 6.2 of this reference ) and in [Sti96] ( as the bisimulation-problem for processes \ of type -1"). Innite graphs A wide class of graphs enjoying interesting decidability properties has been dened in [Cou89, Bau91, Bau92] (see [Cou90] for a survey). In particular it is known that the problem \ are?;? 0 isomorphic? 00 is decidable for pairs?;? 0 of equational graphs. It seems quite natural to investigate whether the problem \ are?;? 0 bisimilar? 00 is decidable for pairs?;? 0 of equational graphs. We show here that this problem is decidable for equational graphs of nite out-degree. Formal languages Another classical equivalence relation between processes is the notion of language equivalence. The decidability of language equivalence for deterministic pushdown automata has been recently established in [Sen97a] ( see also in [Sen97c, Sen97b] shorter expositions of this result). It was rst noticed in [BBK87] that, in the case of deterministic processes, language equivalence and bisimulation equivalence are identical. Moreover deterministic pushdown automata can always be normalized ( with preservation of the language) in such a way that -transitions are all decreasing. Hence the main result of this work is a generalisation of the decidability of the equivalence problem for dpda's.?? mailing adress:labri and UFR Math-info, Universite Bordeaux1 351 Cours de la liberation -33405- Talence Cedex. email:ges@labri.u-bordeaux.fr fax: 05-56-84-66-69
Mathematical generality More precisely, the present work extends the notions developped in [Sen97a] so as to obtain a more general result. As a by-product of this extension, we obtain a deduction system which, in the deterministic case, seems simpler than the one presented in [Sen97a] ( see system B 3 in x10). The present work can also be seen as a common generalization of 3 dierent results: the results of [Sti96, Jan97] establishing decidability of the bisimulation equivalence in two non-deterministic sub-classes of the class considered here, and the result of [Sen97a] dealing only with deterministic pda's (or processes). 1.2 Result The main result of this work is the following theorem 10.7: The bisimulation problem for rooted equational 1-graphs of nite out-degree is decidable. 1.3 Tools We re-use here the notions developped in [Sen97a] (1-4) and introduce new ideas (5-7): 1. the deduction systems ( which were in turn inspired by [Cou83a]). 2. the deterministic boolean series ( which were in turn inspired by [HHY79]). 3. the deterministic spaces ( which were elaborated around Meitus notion of linear independence ([Mei89, Mei92])). 4. the analysis of the proof-trees generated by a suitable strategy ( which was somehow similar with the analysis of the parallel computations, interspersed with replacement-moves, done in [Val74, Rom85, Oya87]). 5. the notion of -bisimulation over deterministic row-vectors of boolean series ( which, in some sense, translates the usual notion of bisimulation to the d-space of row-vectors of series). 6. the notion of oracle, which is a choice of bisimulation for every pair of bisimilar vectors; the notion of triangulation of systems of linear equations is now \parametrized" by such an oracle O ( see x5); as well, the strategies are now parametrized by an oracle too. 7. an elimination argument: roughly speaking, this argument shows that, in a proof-tree t, if we take into account not only the branch ending at a node x, but also the whole proof-tree, then the meta-rule R5 f(p; S; S 0 )g jj?? (p + 2; S x; S 0 x 0 ) is not needed to show that im(t) j?? ft(x)g. A nice ( and unexpected) byproduct of this elimination is that the weights can be removed from the equations ( see systems B 2 ; B 3 in x10).
Table of Contents 1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.1 Motivations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 Processes : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 Innite graphs : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 Formal languages : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 Mathematical generality : : : : : : : : : : : : : : : : : : : : : : : 2 1.2 Result : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 1.3 Tools : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2 Preliminaries : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 2.1 Graphs : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 Bisimulations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2.2 Pushdown automata : : : : : : : : : : : : : : : : : : : : : : : : : 6 2.3 Graphs and pushdown automata : : : : : : : : : : : : : : : : : : 7 Equational graphs and pushdown automata : : : : : : : : : : : : 7 Bisimulation for non-deterministic (versus deterministic) graphs 8 2.4 Deterministic context-free grammars : : : : : : : : : : : : : : : : 9 2.5 Free monoids acting on semi-rings : : : : : : : : : : : : : : : : : 10 Semi-ring B < W > : : : : : : : : : : : : : : : : : : : : : : : : : 10 Actions of monoids : : : : : : : : : : : : : : : : : : : : : : : : : : 10 The action of W on B < W > : : : : : : : : : : : : : : : : : : : 11 The action of X on B < V > : : : : : : : : : : : : : : : : : : : 11 3 Series and matrices : : : : : : : : : : : : : : : : : : : : : : : : : : : 12 3.1 Deterministic series and matrices : : : : : : : : : : : : : : : : : : 12 Denitions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 13 Residuals : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 14 W=V : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 16 3.2 Bisimulation of series : : : : : : : : : : : : : : : : : : : : : : : : 23 Series, words and graphs : : : : : : : : : : : : : : : : : : : : : : 24 Extension to matrices : : : : : : : : : : : : : : : : : : : : : : : : 28 Operations on w-bisimulations : : : : : : : : : : : : : : : : : : : 28 Rational matrices, norm : : : : : : : : : : : : : : : : : : : : : : : 29 Operations on row-vectors : : : : : : : : : : : : : : : : : : : : : : 30 3.3 Deterministic spaces : : : : : : : : : : : : : : : : : : : : : : : : : 32 Denitions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 32 The d-space E n : : : : : : : : : : : : : : : : : : : : : : : : : : : 33 Linear independence : : : : : : : : : : : : : : : : : : : : : : : : : 33 Dimension : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 37 3.4 Height, defect and linearity : : : : : : : : : : : : : : : : : : : : : 38 Denitions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38 3.5 Height and norm : : : : : : : : : : : : : : : : : : : : : : : : : : : 40 4 Deduction systems : : : : : : : : : : : : : : : : : : : : : : : : : : : 44 4.1 General formal systems : : : : : : : : : : : : : : : : : : : : : : : 44
4.2 System B 0 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 46 4.3 Congruence closure : : : : : : : : : : : : : : : : : : : : : : : : : 51 4.4 Extension to matrices : : : : : : : : : : : : : : : : : : : : : : : : 52 4.5 Strategies : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 58 5 Triangulations : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 60 5.1 Restricted systems : : : : : : : : : : : : : : : : : : : : : : : : : : 61 5.2 General systems : : : : : : : : : : : : : : : : : : : : : : : : : : : 69 6 Constants : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 71 7 Strategies for B 0 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 72 7.1 Strategies : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 73 7.2 Global strategy : : : : : : : : : : : : : : : : : : : : : : : : : : : : 76 8 Tree analysis : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 78 8.1 Depth and weight : : : : : : : : : : : : : : : : : : : : : : : : : : 78 8.2 Stacking derivations : : : : : : : : : : : : : : : : : : : : : : : : : 79 8.3 Linearity : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 81 8.4 N-stacking sequences : : : : : : : : : : : : : : : : : : : : : : : : 82 9 Termination : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 96 10 Elimination : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 97 10.1 System B 1 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 97 Completeness : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 98 10.2 System B 2 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 106 Elementary rules : : : : : : : : : : : : : : : : : : : : : : : : : : : 106 Completeness : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 107 10.3 System B 3 : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 108 Strategies : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 109 Completeness : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 110 Aknowledgement : : : : : : : : : : : : : : : : : : : : : : : : : : : 112 2 Preliminaries 2.1 Graphs Let X be a nite alphabet. We call graph over X any pair? = (V? ; E? ) where V? is a set and E? is a subset of V? X V?. For every integer n 2 IN, we call an n-graph every n + 2-tuple? = (V? ; E? ; v 1 ; : : :; v n ) where (V? ; E? ) is a graph and (v 1 ; : : :; v n ) is a sequence of distinguished vertices: they are called the sources of?. A 1-graph (V; E; v 1 ) is said to be rooted i v 1 is a root of (V; E). A 2-graph (V; E; v 1 ; v 2 ) is said bi-rooted i v 1 is a root, v 2 is a co-root of (V; E) and there is no edge going out of v 2 ( this last technical condition will be useful for reducing the bisimilarity notion for graphs to an analogous notion on series, see x2.1, x2.3 and x3.2).
The equational graphs are the least solutions ( in a suitable sense) of the systems of (hyperedge) graph-equations ( see in [Cou90] precise denitions). Let us mention that the equational graphs of nite degree are exactly the context-free graphs dened in [MS85]. Bisimulations Denition 2.1 Let? = (V? ; E? ; v 1 ; : : :; v n );? 0 = (V? 0; E? 0; v 0 ; : : :; v0 1 n ) be two n-graphs over an alphabet X. Let R be some binary relation R V? V? 0. R is a simulation from? to? 0 i 1. dom(r) = V?, 2. 8i 2 [1; n]; (v i ; v 0 i ) 2 R, 3. 8v 2 V? ; w 2 V? ; v 0 2 V? 0; x 2 X; such that (v; x; w) 2 E? and vrv 0 ; there exists w 0 2 V? 0 such that (v 0 ; x; w 0 ) 2 E? 0 and wrw 0 : R is a bisimulation from? to? 0 i R is a simulation from? to? 0 and R?1 is a simulation from? 0 to?. This denition corresponds to the standard one ([Par81, Mil89, Cau95]) in the case where n = 0. The n-graphs?;? 0 are said bisimilar, which we denote by?? 0, i there exists a bisimulation R from? to? 0. Let us extend now this denition by means of a relational morphism between free monoids. Denition 2.2 Let X; X 0 be two alphabets. A binary relation X X 0 is called a strong relational morphism from X to X 0 i 1. is a submonoid of X X 0 2. dom() = X ; im() = X 0 3. is generated (as a submonoid) by the subset \ (X X 0 ). One can easily check that s.r. morphisms are preserved by inversion, composition and that any surjective map : X! X 0 induces a s.r. morphism from X to X 0. Let? = (V? ; E? ; v 1 ; : : :; v n ) be an n-graph over the alphabet X,? 0 = (V? 0; E? 0; v 0 1 ; : : :; v0 n) be an n-graph over the alphabet X 0. Let X X 0 be some s.r. morphism, and let R be some binary relation R V? V? 0. Denition 2.3 R is a -simulation from? to? 0 i 1. dom(r) = V?, 2. 8i 2 [1; n]; (v i ; v 0 i ) 2 R, 3. 8v; w 2 V? ; v 0 2 V? 0; x 2 X; such that (v; x; w) 2 E? and vrv 0 ; 9w 0 2 V? 0; x 0 2 (x) such that (v 0 ; x 0 ; w 0 ) 2 E? 0 and wrw 0 :
R is a -bisimulation i R is a -simulation and R?1 is a?1 - simulation. For every v 2 V? ; v 0 2 V? 0, we denote by v v 0 the fact that there exists some -bisimulation R from? to? 0 such that (v; v 0 ) 2 R. In all this work, the composition of binary relations is denoted by and dened by: if R 1 E F and R 2 F G then, Fact 2.4 R 1 R 2 = f(x; z) 2 E Gj9y 2 F; (x; y) 2 R 1 ; (y; z) 2 R 2 g: (1) 1. if R is a -bisimulation, then R?1 is a?1 -bisimulation 2. if R 1 is a 1 -bisimulation and R 2 is a 2 -bisimulation, then R 1 R 2 is a 1 2 -bisimulation 3. if for every i 2 I; R i is a -bisimulation, then S i2i R i is a -bisimulation. 2.2 Pushdown automata A pushdown automaton on the alphabet X is a 7-tuple M = < X; Z; Q; ; q 0 ; z 0 ; F > where Z is the nite stack-alphabet, Q is the nite set of states, q 0 2 Q is the initial state, z 0 is the initial stack-symbol, F is a nite subset of QZ, the set of nal congurations, and, the transition function, is a mapping : QZ (X [ fg)! P f (QZ ). Let q; q 0 2 Q;!;! 0 2 Z ; z 2 Z; f 2 X and a 2 X [ fg ; we note (qz!; af) 7?! M (q 0! 0!; f) if q 0! 0 2 (qz; a). 7?! M is the reexive and transitive closure of 7?! M. For every q!; q 0! 0 2 QZ and f 2 X, we note q! (q 0! 0 ; ). M is said deterministic i, for every z 2 Z; q 2 Q; x 2 X : f?! M q 0! 0 i (q!; f) 7?! M Card((qz; )) 2 f0; 1g (2) Card((qz; )) = 1 ) Card((qz; x)) = 0; (3) Card((qz; )) = 0 ) Card((qz; x)) 1: (4) M is said real-time i, for every q 2 Q; z 2 Z, Card((qz; )) = 0. A conguration q! of M is said -bound i there exists a conguration q 0! 0 such that (q!; ) 7?! M (q 0! 0 ; ); q! is said -free i it is not -bound. A pda M is said normalized i, it fulls conditions (2), (3) (see above) and (5),(6),(7): q 0 z 0 is? free (5) and for every q 2 Q; z 2 Z; x 2 X: q 0! 0 2 (qz; x) )j! 0 j 2; (6) q 0! 0 2 (qz; ) )j! 0 j= 0 (7)
All the pda considered here are assumed to fulll condition (5). A pda M will be said bi-rooted i it fullls (8) and (9): 8q 2 Q;! 2 Z ; f 2 X ; q 0 z 0 The language recognized by M is 9q 2 Q; F = fqg and (8) L(M) = fw 2 X j 9c 2 F; q 0 z 0 f?! M q! ) 9g 2 X g ; q!?! M q: (9) w?! M cg: It is a \folklore" result that, given a deterministic pda M, one can eectively compute another dpda M 0 which is normalized and fullls: L(M) = L(M 0 ): 2.3 Graphs and pushdown automata Equational graphs and pushdown automata We call transition-graph of a pda M, denoted T (M), the 0-graph: T (M) = (V T (M); E T (M)) where V T (M) = fq! j q 2 Q;! 2 Z ; q! is? freeg and E T (A) = f(c; x; c 0 x ) 2 V T (M) V T (M) j c?! M c 0 g: (10) We call computation 1-graph of the pda M, denoted (C(M); vm), the subgraph of T (M) induced by the set of vertices which are accessible from the vertex q 0 z 0, together with the source vm = q 0 z 0. In the case where M is bi-rooted, we call computation 2-graph of the pda M, denoted (C(M); vm; vm), the graph C(M) dened just above, together with the sources vm = q 0 z 0 ; vm = q. Theorem 2.5 Let? = (? 0 ; v 0 ) be a rooted 1-graph over X. The following conditions are equivalent: 1.? is equational and has nite out-degree. 2.? is isomorphic to the computation 1-graph (C(M); vm) of some normalized pushdown automaton M. The formal proof of this theorem is quite technical and is omitted here. Corollary 2.6 Let? = (? 0 ; v 0 ; v) be a bi-rooted 2-graph over X. The following conditions are equivalent: 1.? is equational and has nite out-degree. 2.? is isomorphic to the computation 2-graph (C(M); vm; vm) of some birooted normalized pushdown automaton M.
Bisimulation for non-deterministic (versus deterministic) graphs In this paragraph, we reduce the classical notion of bisimulation for equational graphs to the notion of -bisimulation for deterministic equational graphs, where has been suitably choosen ( see denition 2.3). Lemma 2.7 Let? 1 be some rooted equational 1-graph over a nite alphabet Y 1 and let # be a new letter # =2 Y 1. Then one can construct an equational bi-rooted 2-graph? over the alphabet Y = Y 1 [ f#g such that, 1. V?1 V?, 2. for every v; v 0 2 V?1, (v; v 0 are bisimilar in? 1 ) i (v; v 0 are bisimilar in? ), 3.? 1 has nite out-degree i? has nite out-degree. Sketch of proof: Let us dene? 1 from? by: V? = V?1 [ fvg; E? = E?1 [ f(w; #; v) j w 2 V?1 g;? = (? 1 ; v); where v is a new vertex v =2 V?1. One can easily check that? is equational i? 1 is equational and that, provided? 1 is rooted,? is bi-rooted. Points (1) and (3) of the lemma are clear. One can check that the mapping R 7! R [ f(v; v)g is a bijection from the set of all the bisimulations over? 1 ( i.e. from? 1 to? 1 ) to the set of all the bisimulations over?. Hence point (2) is true. 2 Let us consider nite aphabets X; Y, a length-preserving homomorphism : X! Y and the s.r. morphism =?1 X X. A n-graph? over X will be said -saturated i, for every v 2 V?, for every (x; x 0 ) 2, (9v 1 2 V? ; (v; x; v 1 ) 2 E? ), (9v 0 1 2 V? ; (v; x 0 ; v 0 1 ) 2 E? ): Lemma 2.8 Let? 1 be an equational bi-rooted 2-graph of nite out-degree over an alphabet Y. One can construct a nite alphabet X, a surjective length-preserving homomorphism : X! Y and an equational, bi-rooted 2-graph? over the alphabet X, such that 1.? is deterministic, 2.? is -saturated, 3. V?1 = V?, 4. Id : V?! V?1 is a -bisimulation from? to? 1. Sketch of proof: By lemma 2.6, we can suppose that? 1 is the computation 2-graph (C(M 1 ); vm 1 ; vm 1 ) of some bi-rooted normalized pushdown automaton M 1 =< Y; Z; Q; 1 ; q 0 ; z 0 ; fqg >. Let us consider the following integers: 8q 2 Q; 8z 2 Z; 8y 2 Y; t 1 (qz; y) = Card( 1 (qz; y)); t 1 = maxft 1 (qz; y) j q 2 Q; z 2 Z; y 2 Y g: Let X = Y [1; t 1 ] and let : X! Y be the rst projection. Let : QZ Y IN! QZ such that dom() = S q2q;z2z;y2y fqzg fyg [1; t 1 (qz; y)] and (qz; y;?) : fqzg fyg [1; t 1 (qz; y)]! 1 (qz; y)
is a bijection ( for every q; z; y)). We then dene M =< X; Z; Q; ; q 0 ; z 0 ; fqg > by: for every q 2 Q; z 2 Z; y 2 Y; i 2 [1; t 1 ] (qz; ) = 1 (qz; ) if qz is? bound: (qz; (y; i)) = fq 0! 0 g if (qz; y; i) = q 0! 0 or (1 t 1 (qz; y) < i t 1 and (qz; y; 1) = q 0! 0 ): The 2-graph? = (C(M); vm; vm) fullls the required properties. 2 Let us remark that, by point (4) and by composition of -bisimulations, for every v; v 0 2 V?, v; v 0 are -bisimilar (w.r.t.? ) i v; v 0 are bisimilar (w.r.t.? 1 ). 2.4 Deterministic context-free grammars Let M be some deterministic pushdown automaton ( we suppose here that M is normalized). The variable alphabet VM associated to M is dened as: VM = f[p; z; q] j p; q 2 Q; z 2 Zg: The context-free grammar GM associated to M is then GM =< X; V; P > where V = VM; P is the set of all the pairs of one of the following forms: where p; q; p 0 ; p 00 2 Q; x 2 X; p 0 z 1 z 2 2 (pz; x) where p; q; p 0 2 Q; x 2 X; p 0 z 0 2 (pz; x) ([p; z; q]; x[p 0 ; z 1 ; p 00 ][p 00 ; z 2 ; q]) (11) ([p; z; q]; x[p 0 ; z 0 ; q]) (12) ([p; z; q]; a) (13) where p; q; 2 Q; a 2 X [ fg; q 2 (pz; a). GM is a strict-deterministic grammar. (A general theory of this class of grammars is exposed in [Har78] and used in [HHY79]). We call mode every element of QZ [ fg. For every q 2 Q; z 2 Z, qz is said -bound (respectively -free) i condition (3) (resp. condition (4)) in the above denition of deterministic automata is realized. The mode is said -free. We dene a mapping : V! QZ [ fg by () = and ([p; z; q] ) = pz; for every p; q 2 Q; z 2 Z; 2 V. For every w 2 V we call (w) the mode of the word w. For technical reasons ( which will be made clear in section 7), we suppose that Z contains a special symbol e such that, for every q 2 Q; (qe; ) = fqg and im() P f (Q(Z? feg) ). Equivalently, 8q 2 Q; ([q; e; q]; ) 2 P; (14) and 8(v; w) 2 P; w 2 (V? f[q; e; q]jq 2 Qg) : (15)
2.5 Free monoids acting on semi-rings Semi-ring B < W > Let (B; +; ; 0; 1) where B = f0; 1g denote the semi-ring of \booleans". Let W be some alphabet. By (B < W >; +; ; ;; ) we denote the semi-ring of boolean series over W : the set B < W > is dened as B W ; the sum and product are dened as usual; each word w 2 W can be identied with the element of B W mapping the word w on 1 and every other word w 0 6= w on 0; every boolean series S 2 B < W > can then be written in a unique way as: where, for every w 2 W, S w 2 B. The support of S is the language S = w2w S w w; supp(s) = fw 2 W j S w 6= 0g: In the particular case where the semi-ring of coecients is B ( which is the only case considered in this article) we sometimes identify the series S with its support. The usual ordering on B extends to B < W > by: S S 0 i 8w 2 W ; S w S 0 w: We recall that for every S 2 B < W >, S is the series dened by: S = X 0n S n : (16) Given two alphabets W; W 0, a map : B < W >! B < W 0 > is said -additive i it fullls: for every denumerable family (S i ) i2in of elements of B < W >, X X ( S i ) = (S i ): (17) i2in i2in A map : B < W >! B < W 0 > which is both a semi-ring homomorphism and a -additive map is usually called a substitution. Actions of monoids Given a semi-ring (S; +; ; 0; 1) and a monoid (M; ; 1 M ), a map : S M! S is called a right-action of the monoid M over the semi-ring S i, for every S; T 2 S; m; m 0 2 M: 0m = 0; S1 M = S; (S+T )m = (Sm)+(Tm) and S(mm 0 ) = (Sm)m 0 : (18) In the particular case where S = B < W >, is said to be a -right-action if it fullls the additional property that, for every denumerable family (S i ) i2in of elements of S and m 2 M: X ( S i ) X m = i m): (19) i2in i2in(s
The action of W on B < W > We recall the following classical -rightaction of the monoid W over the semi-ring B < W > : for all S; S 0 2 B < W >; u 2 W S u = S 0, 8w 2 W ; (S 0 w = S uw ); (i.e. S u is the left-quotient of S by u, or the residual of S by u ). For every S 2 B < W > we denote by Q(S) the set of residuals of S: Q(S) = fs u j u 2 W g: We recall that S is said rational i the set Q(S) is nite. We dene the norm of a series S 2 B < W >, denoted ksk by: ksk = Card(Q(S)) 2 IN [ f1g: The action of X on B < V > Let us x now a deterministic (normalized) pda M and consider the associated grammar G. We dene a -right-action of the monoid (X [ feg) over the semi-ring B < V > by: for every p; q 2 Q; A 2 Z; H 2 B < V >; 2 V ; x 2 X [p; A; q] x = H i H = X ([p;a;q];xh)2pm h; (20) [p; A; q] e = i ([p; A; q]; ) 2 PM; (21) [p; A; q] e = ; i (f[p; A; q]g V ) \ PM = ;; (22) x = ;; e = ;: (23) A series S 2 B < V > is said -free i 8w 2 V ; S w = 1 ) (w) is? free: We denote by B < V > the subset of -free series. We dene the map : B < V >! B < V > as the unique -additive map such that, (;) = ;; () = ; and for every p 2 Q; z 2 Z; q 2 Q; 2 V, ([p; z; q] ) = (([p; z; q] e) ) if pz is? bound and, ([p; z; q] ) = [p; z; q] if pz is? free: The above denition is sound because, by hypothesis (7), every [p; z; q] e is either the unit series or the empty series ;. One can notice that for every w 2 V, (w) 2 V [ f;g. We call the -reduction map. We then dene as the unique -right-action of the monoid X over the semi-ring B < V > such that: for every S 2 B < V >; x 2 X, S x = ( (S) x): One can notice that if u 6=, then S u is -free. Let us consider the unique substitution ' : B < V >! B < X > fullling: for every p; q 2 Q; z 2 Z, '([p; z; q]) = fu 2 X j [p; z; q] u = g; (in other words, ' maps every subset L V on the language generated by the grammar G from the set of axioms L).
Lemma 2.9 For every S 2 B < V >; u 2 X, 1. '(S) = '( (S)), 2. '(S u) = '(S) u ( i.e. ' is a morphism of right-actions). Proof: Let p; q 2 Q; z 2 Z; 2 V ; x 2 X. One can check on formulas (20-23) that: { if [p; z; q] is -bound, then { if [p; z; q] is -free, then By induction, it follows that, 8w 2 V, '(([p; z; q] ) e) = '([p; z; q] ) '(([p; z; q] ) x) = '([p; z; q] ) x: '( (w)) = '(w); '(w x) = '(w) x: By -additivity of ', the lemma follows. 2 We denote by the kernel of ' i.e.: for every S; T 2 B < V >, S T, '(S) = '(T ): 3 Series and matrices 3.1 Deterministic series and matrices We introduce here a notion of deterministic series which, in the case of the alphabet V associated to a dpda M, generalizes the classical notion of conguration of M. The main advantage of this notion is that, unlike for congurations, we shall be able to dene nice algebraic operations on these series (this is done in section 3.3). Let us consider a pair (W; ^) where W is an alphabet and ^ is an equivalence relation over W. We call (W; ^) a structured alphabet. The two examples we have in mind are: { the case where W = V, the variable alphabet associated to M and [p; A; q] ^ [p 0 ; A 0 ; q 0 ] i p = p 0 and A = A 0 (see [Har78]) { the case where W = X, the terminal alphabet of M and x ^ y holds for every x; y 2 X (see [Har78]).
Denitions Denition 3.1 Let S 2 B < W >. S is said left-deterministic i either (1) S = ; or (2) S = or (3) 9i 0 2 [1; m]; S i0 6= ; and 8w; w 0 2 W, S w = S w 0 = 1 ) [9A; A 0 2 W; w 1 ; w 0 1 2 W ; A ^ A 0 ; w = Aw 1 and w 0 = A 0 w 0 1]: A left-deterministic series S is said to have the type ; (resp., [A]^) if case (1) (resp. (2), (3)) occurs. Denition 3.2 Let S 2 B < W >. S is said deterministic i, for every u 2 W, S u is left-deterministic. This notion is the straighforward extension to the innite case of the notion of (nite) set of associates dened in [HHY79]. We denote by DB < W > the subset of deterministic boolean series over W. Let us denote by B n;m < W > the set of (n; m)-matrices with entries in the semi-ring B < W >. Denition 3.3 Let m 2 IN; S 2 B 1;m < W >: S = (S 1 ; ; S m ). S is said left-deterministic i either (1) 8i 2 [1; m]; S i = ; or (2) 9i 0 2 [1; m]; S i0 = and 8i 6= i 0 ; S i = ; or (3) 8w; w 0 2 W ; 8i; j 2 [1; m]; (S i ) w = (S j ) w 0 = 1 ) [9A; A 0 2 W; w 1 ; w 0 1 2 V ; A ^ A 0 ; w = A w 1 and w 0 = A 0 w 0 1 ]: A left-deterministic row-vector S is said to have the type ; (resp. (; i 0 ), [A]^) if case (1) (resp. (2), (3)) occurs. The right-action on B < W > is extended componentwise to B n;m < W >: for every S = (s i;j ), u 2 W, the matrix T = S u is dened by t i;j = s i;j u: The ordering on B is also extended componentwise to B n;m < W >. Denition 3.4 Let S 2 B 1;m < W >. S is said deterministic i, for every u 2 W, S u is left-deterministic. We denote by DB 1;m < W > the subset of deterministic row-vectors of dimension m over B < W >. Denition 3.5 Let S 2 B n;m < W >. S is said deterministic i, for every i 2 [1; n], S i;: is a deterministic row-vector. Let us notice rst some easy facts about deterministic matrices. Fact 3.6 Let S 2 DB < W >. For every T 2 B < W >; u 2 W (1) T S ) T 2 DB < W > (2) T = S u ) T 2 DB < W >
Residuals Lemma 3.7 Let S 2 DB < W >; T 2 B < W >; u 2 W. If S u 6= ; then (S T ) u = (S u) T. Proof: Let S 2 DB < W >; T 2 B < W >; u 2 W, such that S u 6= ;. Let u 0 ; u 00 2 W such that u = u 0 u 00 ; u 00 6= and let w 2 supp(s). If w u 0 = then S u 0 = ( because S u 0 is left-deterministic), hence S u = u 00 = ;, which would contradict the hypothesis. It follows that Hence 8u 0 u; 8w 2 supp(s); w u 0 6= : 8w 1 2 supp(s); 8w 2 2 supp(t ); (w 1 w 2 ) u = (w 1 u) w 2 : This proves that (S T ) u = (S u) T. 2 Lemma 3.8 Let S 2 DB < W >; T 2 B < W >; u 2 W and U = ST. Exactly one of the following cases is true: (1) S u 6= ;; in this case U u = (S u) T. (2) S u = ;; 9u 0 ; u 00 ; u = u 0 u 00 ; S u 0 = ; in this case U u = T u 00. (3) S u = ;; 8u 0 u; S u 0 6= ; in this case U u = ; = (S u) T. Proof: Clearly, one of the hypotheses (1-3) must occur. Let us examine each one of these cases. In case (1), by lemma 3.7, U u = (S u) T. In case (2), U u = (U u 0 ) u 00 and by case (1), U u 0 = (S u 0 ) T. It follows that U u = T u 00. In case (3), if S = ;, the conclusion of the lemma is clearly true. Let us suppose now that S 6= ; and let u 0 u be the maximum prex of u such that S u 0 6= ;. Then, there exist some A 2 W; u 00 2 W such that u = u 0 A u 00 and there exist some B 1 ; ; B q 2 W; S 1 ; ; S q 2 B < W >?f;g such that S u 0 P = 1iq B q S q and B 1 ^ ^ B i ^ ^ B q ( because S u 0 is left-deterministic). By maximality of u 0, A does not belong to fb 1 ; ; B q g, hence U X u = (( B q S q ) A) u 00 = ; u 00 = ;: 2 1iq Lemma 3.9 Let S 2 DB 1;m < W >; T 2 B m;1 < W >; u 2 W and U = S T. Exactly one of the following cases is true:
(1) 9j; S j u 62 f;; g; in this case U u = (S u) T. (2) 9j 0 ; 9u 0 ; u 00 ; u = u 0 u 00 ; S j0 u 0 = ; in this case U u = T j0 u 00. (3) 8j; S j u = ;; 8u 0 u; S j u 0 6= ; in this case U u = ; = (S u) T. Proof: Let us note S = (S j ) 1jm; T = (T j ) 1jm. Clearly, one of the hypotheses (1-3) must occur. Let us examine each one of these cases. In case (1), every 3-tuple (S j ; T j ; u) fullls case (1) or (3) of lemma 3.8, hence (S j T j ) u = (S j u) T j. Hence U X u = (S j T j ) X u = (S j u) T j = (S u) T: 1jm 1jm In case (2), Su 0 must be left-deterministic of type (; j 0 ), hence 8j 6= j 0 ; S j u 0 = ;. It follows that U u = T j0 u 00 : In case (3), every 3-tuple (S j ; T j ; u) fullls case (3) of lemma 3.8, hence (S j T j ) u = ; = (S j u) T j. It follows that 2 U u = ; = (S u) T: Lemma 3.10 Let S 2 DB 1;m < W >; T 2 B m;s < W >; u 2 W and U = S T. Exactly one of the following cases is true: (1) 9j; S j u 62 f;; g in this case U u = (S u) T. (2) 9j 0 ; 9u 0 ; u 00 ; u = u 0 u 00 ; S j0 u 0 = ; in this case U u = T j0 u 00. (3) 8j; 8u 0 u; S j u = ;; S j u 0 6= ; in this case U u = ; = (S u) T. Proof: Let us notice that for every k 2 [1; s]: U k = S T;k; (24) and that the hypothesis of the 3 cases considered in lemma 3.9 depend on the vector S and the word u only ( but not on the integer k 2 [1; s]). In case (1), by lemma 3.9,8k 2 [1; s] U k u = (S u) T;k; hence U u = (S u) T: Cases 2,3 can be treated in the same way. 2 Lemma 3.11 For every S 2 B n;m < W >; T 2 B m;s < W >, if S and T are both left-deterministic, then S T is left-deterministic.
Lemma 3.12 For every S 2 DB n;m < W >; T 2 DB m;s < W >; S T 2 DB n;s < W >. Proof: As the notion of deterministic matrix is dened row by row, it is sucient to prove this lemma in the particular case where n = 1. Let us note U = S T. Let u 2 W. Let us show that U u is left-deterministic. Let us consider every one of the 3 cases considered in lemma 3.10. In case (1) or (3), and in case (2), U u = (S u) T; U u = T u 00 : In both cases, by lemma 3.11, U u is left-deterministic. 2 W=V Let (W; ^) be the structured alphabet (V; ^) associated with M and let us consider a bijective numbering of the elements of Q: (q 1 ; q 2 ; : : :; q nq ). Some particular \vectorial" notions turn out to be useful: { we dene a Q-series as a family S = (S q ) q2q such that the row-vector (S q1 ; S q2 ; : : :; S qnq ) is deterministic { we dene a Q-form as a family = ( q ) q2q of deterministic series; more generally a Q--form (where 2 IN? f0g) is a family of deterministic rowvectors: = ( q ) q2q with q 2 DB 1; < V > for every q 2 Q. Given a Q-series S and a Q--form, their Q-product S is the deterministic row-vector dened by S = X q2q S q q : Given the above ordering of the elements of Q, one can identify the Q-series (S q ) q2q with the row-vector (S q1 ; S q2 ; : : :; S qnq ) and the Q--form ( q ) q2q with the n q --matrix: 0 B @ q1. qj. qnq The Q-product appears then to be just the ordinary product of matrices. Let us dene here handful notations for some particular row-vectors or Q- series. Let us use the Kronecker symbol i;j meaning if i = j and ; if i 6= j. For every 1 n; 1 i n, we dene the row-vector n i as: 1 C A n i = ( n i;j) 1jn where 8j; n i;j = i;j :
We call unit row-vector any vector of the form n i. For every 1 n; 1 m, we denote by ; n 2 DB 1;n < V > the row-vector: ; n = (;; : : :; ;); and we denote by ; n m 2 DB m;n < V > the matrix: 0 B @ ; ṇ. ; ṇ. ; n For every! 2 Z ; p; q 2 Q, [p!q] is the deterministic series dened inductively by: [pq] = ; if p 6= q; [pq] = if p = q; [p!q] = X r2q[par] [r! 0 q] if! = A! 0 for some A 2 Z;! 0 2 Z : By [p!] we denote the Q-series: 1 C A [p!] = ([p!q]) q2q : (In particular [q i ] = nq i ). These Q-series represent faithfully the congurations of M in the sense that, for every -free congurations q!; q 0! 0 and word f 2 X, q! By [!] we denote the Q-Q-matrix: f?! M q 0! 0 i [q!] f = [q 0! 0 ]: (25) [!] = ([p!q]) p2q;q2q such that for every p; q; p;q = [p!q]: Here also we identify [!] with the matrix ([p i!q j ]) 1in Q;1jn Q 2 DB nq;n Q < V >. The next lemmas relate the mapping and right-action with the rightaction. Lemma 3.13 Let S 2 DB 1; < V >. 1. there exists v 2 V such that (S) = S v. 2. (S) S. Proof: We treate rst the case where = 1 i.e. S is a series. If for every w 2 supp(s); (w) = ;; then (S) = ;; which is a residual of S, hence point (1) of the lemma is true. Moreover, in this case every w 2 supp(s) contains a letter [p; z; q] which is -bound and such that [p; z; q] e = ;, hence S ; = (S), which establishes point (2) of the lemma. Let us suppose now that there exists some w 0 2 supp(s) such that (w 0 ) = w 0 2 V : Then w 0 = [p 1 ; z 1 ; q 1 ] [p n ; z n ; q n ] w 0, where n 0 and for every
i 2 [1; n], [p i ; z i ; q i ] e =. Let us set v = [p 1 ; z 1 ; q 1 ] [p n ; z n ; q n ]: We consider the set of words: D(v) = fv 0 [p j+1 ; z j+1 ; qj+1]; 0 0 j n? 1; q 0 j+1 2 Q; v 0 = v(j); q 0 j+1 6= q j+1 g; and we set S 0 P = w (S w): It is clear that, as S is w2d(v) deterministic: S = v (S v) + S 0 : (26) Moreover one can check that, for every w 2 D(v), (w) = ; ( because the letters [p j+1 ; z j+1 ; q 0 j+1 ] fulll ([p j+1 ; z j+1 ; q 0 j+1 ]) = ;): Hence (S 0 ) = ;. As S is deterministic, S v must be left-deterministic of the same type as w 0, hence S v is -free. Using now (26) we obtain: (S) = S v + ; = S v: (27) Point (1) is then proved. Applying ' to the two members of equation (26) and using point (1) we obtain that '(S) = '(v (S)) = '(v) '( (S)): But, by the hypothesis on the letters [p i ; z i ; q i ]; '(v) =. It follows that '(S) = '( (S)) i.e. point (2) is true. Let us treate now the general case. Let S = (S 1 ; : : :; S j ; : : :; S ). Let us consider S = j=1 S j. Let us apply the above arguments ( and notations) on S. case 1: 8w 2 supp( S); (w) = ;. In that case (S) = ; = S v (for some v 2 V ) and S (S). case 2: 9w 0 2 supp( S); (w 0 ) = w 0 2 V. For every j 2 [1; ], S j = v (S j v) + w2d(v) w (S j w): (28) where (v) = ; ( w2d(v) w (S j w)) = ; and S j v is -free. It follows that for every j 2 [1; ], (S j ) = S j v hence (S) = S v: (29) We also know that '(v) = ; '( w2d(v) w (S j w)) = ;, which together with (28) shows that: '(S) = '(S v): Hence points (1,2) of the lemma are proved. 2 Remark 3.14 Point (2) of the lemma is also a direct corollary of point (1) of lemma 2.9. The proof given here for point (2) will be re-used in the proof of lemma 4.7. Corollary 3.15 1. 8 2 IN? f0g; 8S 2 DB 1; < V >; (S) 2 DB 1; < V > : 2. 8 2 IN? f0g; 8S 2 DRB 1; < V >; (S) 2 DRB 1; < V > :
Lemma 3.16 Let 2 IN? f0g; S 2 DB 1; < V >; u 2 (X [ feg). One of the three following cases must occur: (1) S u = ; ; (2) S u = j for some j 2 [1; ], (3) 9u 1 ; u 2 2 (X [ feg) ; v 1 2 V ; p; q 2 Q; A 2 Z;! 2 Z ; Q?? form such that u = u 1 u 2 ; S u 1 = S v 1 = [qa] ; S u = ([qa] u 2 ) ; and [qa] u 2 = [p!] with j!j 1: Proof: Let u 2 (X [ feg). Let us prove the lemma by induction on juj. u = : if S 2 ; [ f j j1 j g then clearly the conclusion of case (1) or (2) is realized. Otherwise, S has a decomposition as S = [qa] and the conclusion of case (3) is realized with u 1 = u 2 =,v 1 =, p = q,! = A. u = u 0 a; a 2 X [ feg: Let us consider the u 1 ; u 2 ; v 1 ; p; q; A;!; given by the induction hypothesis on u 0. (S u) a = (([qa] u 2 ) ) a and [qa] u 2 = [p!]; j!j 1: Let [p!] a = [p 0 0 ]. case 1: j 0 j 1. Then S ua = ([qa] u 2 a). Hence conclusion (3) of the lemma is fullled by u 0 1 = u 1 ; u 0 2 = u 2 a; v 0 1 = v 1 ; q 0 = q; A 0 = A;! 0 = 0 ; 0 =. case 2: j 0 j = 0. S ua = r : subcase 1: r 2 f; g [ f j j1 j g. Conclusion (1) or (2) of the lemma is then realized. subcase 2: r = [r 0 B] for some r 0 2 Q; B 2 Z; 2 DRB Q; < V >. Then S ua = [r 0 B] ; S (v 1 [qar]) = r = [r 0 B] : Conclusion (3) of the lemma is then realized by u 0 1 = ua; u 0 2 = ; v 0 1 = v 1 [qar]; q 0 = r 0 ; A 0 = B;! 0 = B; 0 =. 2 Lemma 3.17 Let 2 IN? f0g; S 2 DB 1; < V >; u 2 X +. One of the three following cases must occur: (1) S u = ; ; (2) S u = j for some j 2 [1; ], (3) 9u 1 ; u 2 2 X ; v 1 2 V ; q 2 Q; A 2 Z; Q?? form such that u = u 1 u 2 ; (S) u 1 = S v 1 = [qa] and S u = ([qa] u 2 ) :
Proof: Suppose that u = x 1 x l with l 1. Let u 0 = e n0 x 1 e n1 x l e nl such that S u = S u 0. If the hypothesis of case (1) or (2) is realized, it is clear that the corresponding conclusion is realized. Otherwise: u 0 = u 0 1 u 0 2 ; S u0 1 = S v 1 = [qa] ; S u 0 = ([qa] u 0 2 ) and [qa] u 0 2 = [p 0! 0 ]; j! 0 j 1: Let u 1 = X (u 0 1 ); u 2 = X (u 0 2 ), ( where X : (X [feg)! X is the projection on the subalphabet X). The condition [qa] u 0 2 62 f; Q g [ f Q p jp 2 Qg implies that [qa] is -free, hence that S u 0 1 = (S) u 1 : The condition that S u 0 = S u; juj 1 implies that S u is -free, hence that [qa] u 0 2 is -free, so that: [qa] u 0 2 = [qa] u 2 : Hence point (3) of the lemma is realized. 2 Corollary 3.18 1. 8S 2 DB 1; < V >; u 2 X ; S u 2 DB 1; < V > : 2. 8S 2 DRB 1; < V >; u 2 X ; S u 2 DRB 1; < V > : Proof: Let us consider case (3) of lemma 3.17. Due to the form of the rules generating the right-action ( see section 2.5), [qa] u 2 is of the form [p!] for some p 2 Q;! 2 Z. Hence S u is the Q-product of a Q-series by a Q--form, which is a deterministic row-vector by lemma 3.12. 2 We give now an adaptation of lemma 3.10 to the actions ; in place of. Lemma 3.19 Let S 2 DB 1;m < W >; T 2 B m;s < W >; u 2 (X [ feg) and U = S T.Exactly one of the following cases is true: (1) S u 62 f; m g [ f m j j1 j mg in this case U u = (S u) T. (2) 9j 0 ; 9u 0 ; u 00 ; u = u 0 u 00 ; S u 0 = s j 0 ; in this case U u = T j0 u 00. (3) 8j; 8u 0 u; S u = ; m and S u 0 6= m j ; in this case U u = ; s = (S u) T. Proof: The arguments used in the proofs of lemma 3.7, 3.8, 3.9, 3.10 can be adapted to in place of. The only non-trivial adaptation is that of lines 6-7 of the proof of lemma 3.7: let us suppose that u 2 (X [ feg) is such that 8u 0 u; 8w 2 supp(s); w u 0 6= ; (30)
and let us prove that 8w 1 2 supp(s); 8w 2 2 supp(t ); (w 1 w 2 ) u = (w 1 u) w 2 : (31) We prove by induction on juj that (30) implies (31). juj = 0: by denition of a right-action, 8w 2 W ; w = w. Hence conclusion (31) is true. u = u 0 a, where u 0 2 (X [ feg) ; a 2 X [ feg: Hypothesis (30) is fullled by u 0 too, hence, by induction hypothesis, (w 1 w 2 ) u 0 = (w 1 u 0 ) w 2 : If w 1 u 0 = ;, then, by the above equality (w 1 w 2 ) u 0 = ; too, hence (w 1 w 2 ) u 0 a = ; = (w 1 u 0 a) w 2 ; hence (31) is true. Otherwise, by hypothesis (30) w 1 u 0 62 f;; g, hence there exists p; q 2 Q; A 2 Z such that w 1 u 0 = [p; A; q] w 3 : By denitions (20-21-22) ([p; A; q] w 3 w 2 ) a = ([p; A; q] a) w 3 w 2 ; hence 2 (w 1 w 2 ) u 0 a = (w 1 u 0 a) w 2 : Lemma 3.20 Let S 2 DB 1;m < W >; T 2 B m;s < W >; u 2 X + and U = S T. Exactly one of the following cases is true: (1) S u 62 f; m g [ f m j j1 j mg in this case U u = (S u) T. (2) 9j 0 ; 9u 0 ; u 00 ; u = u 0 u 00 ; (S u 0 ) = s j 0 ; in this case U u = (T j0 u 00 ). (3) 8j; 8u 0 u; S u = ; m and (S u 0 ) 6= m j ; in this case U u = ; s = (S u) T. Proof: Let u = x 1 x l : Let us consider which case ( as dened in the lemma) occurs. case 1: S u = S u with u = e n0 x 1 e n1 x l e nl. By lemma 3.19, Uu = (Su)T; and, as (Su)T is -free and 62 f; m g[f m j j1 j mg, U u = U u; S u = S u; which shows that U u = (S u) T:
case 2: let u 0 = e n0 0 x 1 e n0 1 x i e n0 i, with 0 i l, such that (S u 0 ) = S u 0 : By lemma 3.19, case (2), where u 00 = U u 0 = T j0 ; hence U u 0 = (T j0 ), hence U u = (T j0 ) u 00 = (T j0 u 00 ): case 3: let u = e n0 x 1 e n1 x l e nl such that: U u = U u: The hypothesis of this case implies that, 8j; 8u 0 u; S u 6= m j ; (because, as m j is -free, if S u = m j then (S u) = m j too). Hence, by lemma 3.19 U u = ; m : Hence U u = ; m = (S u) T: 2 The particular letters [p; e; q] for p; q 2 Q play a special role in sections 7 and section 8: we use them as marks in the series ( somehow like the ceilings of [Val74]). We dene below a map e which removes the marks in the series. Let us dene e : DB < V >! B < V > as the unique substitution such that: e ([p; e; q]) = if p = q; e ([p; e; q]) = ; if p 6= q; e ([p; A; q]) = [p; A; q] if A 6= e: We note Ve = f[p; e; q]j p; q; 2 Qg; V e = V? Ve. A deterministic series S 2 DB < V > is said e-free i its type is (;) or () or([pa]), with A 6= e. Lemma 3.21 For every S 2 DB 1; < V > (1) e (S) 2 DB 1; < V > (2) k e (S)k ksk: Sketch of proof: We establish rst that, for every u 2 V e ; 9u 0 2 V such that e (S) u = e (S u 0 ) and S u 0 is e-free: (32) Let us prove (32) by induction on juj. juj=0: If e (S) = ; then (32) is true: it suces to choose some u 0 such that S u 0 = ;. Otherwise, e (S) 6= ; and, using the determinism of S, one can show that there exists a maximal integer n such that: 9(p i ) 1in 2 Q n ; S ([p 1 ; e; p 1 ] [p n ; e; p n ]) 6= ; :
Then u 0 = [p 1 ; e; p 1 ] [p n ; e; p n ] (where u 0 = when n = 0) satises (32). juj=m+1: u = u 1 v 1 where u 1 2 Ve ; ju 1 j = m; v 1 2 V e. By induction hypothesis there exists u 0 1 2 V such that e (S) u 1 = e (S u 0 1) and S u 0 1 is e-free: If S u 0 1 2 f; ; 1; : : :; g, then u 0 = u 0 1v 1 satises (32). Otherwise let ([pa]) be the type of S u 0 1 (p 2 Q; A 6= e). We then have e (S) u 1 = e (S u 0 1) (33) S u 0 1 = [pa] (34) for some Q--form. subcase 1: v 1 = [p; A; q 1 ] (for some q 1 2 Q). Let us consider the vector q1 : by induction hypothesis, there exists some w 0 1 2 V such that e ( q1 ) = e ( q1 w 0 ) and 1 q 1 w 0 1 is e-free: (35) Combining equations (33,34,35) we see that u 0 = u 0 1 [p; A; q 1 ] w 0 1 fullls: e (S) (u 1 v 1 ) = ( e (S) u 1 ) v 1 = e (S u 0 1) [p; A; q 1 ] = e ([pa] ) [p; A; q 1 ] = e ( q1 ) = e ( q1 w 0 1) where S (u 0 1 [p; A; q 1 ] w 0 ) = 1 q 1 w 0 and 1 q 1 w 0 1 fullled by our choice of u 0. subcase 2: v 1 62 f[paq 1 ]jq 1 2 Qg is e-free. Hence (32) is e (S) u 1 v 1 = ([pa] e ()) v 1 = ; : e (S u 0 1v 1 ) = e (([pa] ) v 1 ) = e (; ) = ; : Hence u 0 = u 0 1 v 1 satises (32). Let us prove the lemma now. By (32) every residual e (S)u is left-deterministic of the same type as S u 0. Hence e (S) is deterministic. Moreover formula (32) shows that k e (S)k ksk. 2 3.2 Bisimulation of series Up to the end of this section, we consider the structured alphabet V associated with a dpda M over X. We suppose a s.r. morphism X X is given (see denition 2.2).
Series, words and graphs Let us give rst a slight adaptation of denition 2.1 to the n-graph (DRB 1;n < V >; ; ( n i ) 1in). Denition 3.22 Let R be some binary relation R DRB 1;n < V > DRB 1;n < V >. R is a? -bisimulation i 1. 8(S; S 0 ) 2 R; 8x 2 X, 9x 0 2 (x); (S x; S 0 x 0 ) 2 R and 9x 00 2?1 (x); (S x 00 ; S 0 x) 2 R; 2. 8S; S 0 2 R; 8i 2 [1; n]; ( (S) = n i ), ( (S 0 ) = n i ): We denote by S S 0 the fact that there exists some? -bisimulation R such that (S; S 0 ) 2 R. One can notice that is the greatest? -bisimulation ( with respect to the inclusion ordering) over DRB 1;n < V >. The -bisimulation relations can be conveniently expressed in terms of word-bisimulations. Denition 3.23 Let S; S 0 2 DRB 1;n < V > and R X X. R is a w? - bisimulation with respect to (S; S 0 ) i R and (1) totality: dom(r) = X ; im(r) = X ; (2) extension: 8(u; u 0 ) 2 R; 8x 2 X; 9x 0 2 (x); (u x; u 0 x 0 ) 2 R and 9x 00 2?1 (x); (u x 00 ; u 0 x) 2 R: (3) coherence: 8(u; u 0 ) 2 R; 8i 2 [1; n]; ( (S u) = n i ), ( (S 0 u 0 ) = n i ); (4) prex: 8(u; u 0 ) 2 X X ; 8(x; x 0 ) 2 X X; (ux; u 0 x 0 ) 2 R ) (u; u 0 ) 2 R. (Condition (1) can be equivalently replaced by \(; ) 2 R".) R is said to be a w?-bisimulation of order m with respect to (S; S 0 ) i it fullls conditions (3-4) above and the modied conditions (1'): dom(r) = X m ; im(r) = X m ; (2'): 8(u; u 0 ) 2 R \ (X m?1 X m?1 ); 8x 2 X; 9x 0 2 (x); (u x; u 0 x 0 ) 2 R and 9x 00 2?1 (x); (u x 00 ; u 0 x) 2 R: The w? -bisimulations are also called w? -bisimulations of order 1. The two next lemmas are relating the notions of w? -bisimulation ( on words),? - bisimulation ( on series), and -bisimulation (on the vertices of the computation 2-graph of M). Lemma 3.24 Let S; S 0 2 DRB 1;n < V >. The following properties are equivalent: (i) S S 0 (ii) there exists R X X which is a w? -bisimulation w.r.t. (S; S 0 ) (iii) 8m 2 IN, there exists R m X m X m which is a w? -bisimulation of order m w.r.t. (S; S 0 ).
Proof: (i) ) (iii): Suppose that S is a --bisimulation w.r.t. (S; S 0 ). Let us prove by induction on the integer m, the following property P(m): 9R m ; w?? bisimulation of order m w.r.t. (S; S 0 ) such that 8(u; u 0 ) 2 R m ; (S u; S 0 u 0 ) 2 S: (36) m=0: Let R 0 = f(; )g. R 0 clearly fullls points (1'),(2'),(4) of the above denition. Moreover, as (S; S 0 ) 2 S where S fullls condition (2) of denition 3.22, R 0 fullls point (3) of denition 3.23. m=m'+1: Let R m 0 be some w? -bisimulation of order m 0 w.r.t. (S; S 0 ). Let us dene R m = R m 0 [ f(u x; u 0 x 0 ) j (u; u 0 ) 2 R m 0; (S ux; S 0 u 0 x 0 ) 2 S and (x; x 0 ) 2 g. Property (1) of S and property (1') of R m 0 imply that dom(r m ) = X m ; im(r m ) = X m : (37) Property (1) of S and property (2') of R m 0 imply that 8(u; u 0 ) 2 R m \(X m?1 X m?1 ); 8x 2 X; 9x 0 2 (x); (u x; u 0 x 0 ) 2 R m and 9x 00 2?1 (x); (u x 00 ; u 0 x) 2 R m : (38) Property (2) of S and property (3) of R m 0 imply that 8(u; u 0 ) 2 R m ; 8i 2 [1; n]; ( (S u) = n i ), ( (S 0 u 0 ) = n i ): (39) Property (4) of R m 0 and the denition of R m imply that 8(u; u 0 ) 2 X X ; 8(x; x 0 ) 2 X X; (u x; u 0 x 0 ) 2 R m ) (u; u 0 ) 2 R m : (40) Property (36) for R m 0 and the denition of R m imply that (36) is fullled by R m too. Equations (37,38,39,40) prove that R m is a w--bisimulation of order m w.r.t. (S; S 0 ), hence P(m) is proved. (iii) ) (ii): Let us notice that, as the alphabet X is nite, for every w-bisimulation R of order m w.r.t. (S; S 0 ), CardfR 0 X X j R R 0 and R 0 is a w??bisimulation of order m+1 w.r.t. (S; S 0 )g < 1: Hence, by Koenig's lemma, if (iii) is true, then there exists an innite sequence (R m ) m2in such that for every m 2 IN, R m is a w??bisimulation of order m w.r.t. (S; S 0 ) and R m R m+1. Let us dene then R = [ m0 R m : R is a w?? bisimulation of order 1 w.r.t. (S; S 0 ). (ii) ) (i): Let R be a w?? bisimulation of order 1 w.r.t. (S; S 0 ). Let us dene a relation S by: S = f(s u; S 0 u 0 ) j (u; u 0 ) 2 Rg: The totality property of R implies that (S; S 0 ) 2 S. The extension property of R implies that S fullls condition (1) of denition 3.22 and the coherence property of R implies S fullls condition (2). 2 Lemma 3.24 leads naturally to the following
Denition 3.25 Let 2 IN? f0g; S; S 0 2 DRB 1; < V >. We dene the divergence between S and S 0 as: (It is understood that inf(;) = 1). Div(S; S 0 ) = inffn 2 IN j B n (S; S 0 ) = ;g: Let us suppose that the dpda M =< X; Z; Q; ; q 0 ; z 0 ; fqg > is normalized and bi-rooted. Let : X! Y be a monoid homomorphism such that (X) Y and let =?1 (, the kernel of, is a s.r. morphism which is also an equivalence relation; this additional property will be used in the sequel). Let? be the computation 2-graph of M and let us suppose? is -saturated. Lemma 3.26 For every q; q 0 2 Q;!;! 0 2 Z such that q!; q 0! 0 2 V?, q! q 0! 0, [q!q] [q 0! 0 q]: Proof: Let : V?! DRB < V > the mapping dened by: 8q 2 Q; 8! 2 Z, such that q! 2 V?, (q!) = [q!q]: We rst remark that is a graph-embedding in the sense that is injective and: 8v 1 ; v 2 2 V? ; 8x 2 X; (v 1 ; x; v 2 ) 2 E?, (v 1 ) x = (v 2 ): (41) Let us denote by B(? ) (resp:b(drb < V >)) the set of all binary relations over V? (resp. over DRB < V >). We dene mappings : B(? )! B(DRB < V >) and : B(DRB < V >)! B(? ) by: for every R 2 B(? ); S 2 B(DRB < V >) (R) =?1 R [ f(;; ;)g; (S) = S?1 [ f(v; v) j v 2 V? g: We shall prove that (I) if R is a -bisimulation then (R) is a - -bisimulation, (II) if S is a - -bisimulation then (S) is a -bisimulation. (I): Suppose R is a -bisimulation and S = (R). Let (S; S 0 ) 2 S; x 2 X. Let us check property (1) of denition 3.22. case I.1: S = [q!q]; S 0 = [q 0! 0 q] and [q!q] x 6= ;. By (41), there exist q 1 2 Q;! 1 2 Z such that (q!; x; q 1! 1 ) 2 E?. As R is a -bisimulation, 9q 0 1 2 Q;! 0 1 2 Z ; x 0 2 (x) such that Hence, applying the embedding : (q 0! 0 ; x 0 ; q 0 1! 0 1) 2 E? and (q 1! 1 ; q 0 1! 0 1) 2 R: [q!q] x = [q 1! 1 q]; [q 0! 0 q] x 0 = [q 0 1! 0 1q] and ([q 1! 1 q]; [q 0 1! 0 1q]) 2 S:
Hence (1) is true. case I.2: S = [q!q]; S 0 = [q 0! 0 q] and [q!q] x = ;. By (41) there is no edge (q!; x; v 0 ) in E? (for any v 0 ). As? is -saturated, for every x 0 2 (x), there is no edge (q!; x 0 ; v 0 ) in E? (for any v 0 ). But, as R?1 is a?1 - bisimulation, there is no edge (q 0! 0 ; x 00 ; v 0 ) in E?, for any x 00 2 (x) ( we use here the fact that?1 = ). It follows that 8x 0 2 (x); [q 0! 0 q] x 0 = ;: As (;; ;) 2 S, (1) is true. case I.3: S = S 0 = ;: (1) is trivially true. Let us check property (2) of denition 3.22. Let (S; S 0 ) 2?1 R and suppose that S =. Then?1 (S) = q and (?1 (S);?1 (S 0 )) 2 R. As q is the only vertex of? having out-degree 0,?1 (S 0 ) = q too. Hence (2) is true. (II): Suppose S is a - -bisimulation and R = (S). Let us prove that R is a -bisimulation. Conditions (1) and (2) of denition 2.3 are true just because f(v; v) j v 2 V? g R. Let us consider q; q 1 ; q 0 2 Q;!;! 1 ;! 0 2 Z ; x 2 X such that q!; q 1! 1 ; q 0! 0 2 V? ; (q!; x; q 1! 1 ) 2 E?, (q!; q 0! 0 ) 2 R and let us check condition (3) of denition 2.3. Using (41) we know that [q!q] x = [q 1! 1 q]: (42) As S is a - -bisimulation, we get that 9x 0 2 (x); ([q 1! 1 q]; [q 0! 0 q] x 0 ) 2 S: (43) As q is a co-root of?, there exists u 2 X u such that q 1! 1?! M q which by (41) implies that [q 1! 1 q] u = : (44) As S is a - -bisimulation, from (43) and (44) we deduce that, there exists u 0 2 (u) such that (; [q 0! 0 q] x 0 u 0 ) 2 S: (45) From condition (2) on - -bisimulations and (45) we deduce that = [q 0! 0 q] x 0 u 0, which implies that [q 0! 0 q] x 0 6= ;: (46) It follows that [q 0! 0 q] x 0 = [q 0 1! 0 1q] for some q 0 1 2 Q;! 0 1 2 Z. Assertion (43) and the denition of R then implies that (q 1! 1 ; q 0 1! 0 1) 2 R: (47) Condition (3) is checked, showing that R is a -simulation. By the same arguments, R?1 is a?1 -simulation. 2