• Aucun résultat trouvé

The overlap of CT L and LT L

Theorems 4.3 and 5.1 provide necessary conditions for definability in various logics. It would be very nice if any of these conditions turned out to be sufficient.

We will discuss this question in more detail in the conclusion. But we can say right away that the aperiodicity conditions forCT LandF O[≺] given in Theorem4.3are notsufficient: Theorem5.4, concerning the languageLof true boolean expression forests, provides a counterexample in both cases, since one can check that VL is aperiodic.

Still, one might hope to rescue a weaker sufficiency result from the aperiodicity condition forCT L.Our counterexample was a language of the formE’L,whereL is a word language. Is it possible that for all such languages aperiodicity ofVEL implies thatEL is definable inCT L?

If a language of the formE’Lis inCT L,thenLmust be aperiodic, and conse-quently definable inLT L.We are thus addressing what, in other guises, is referred to as the ‘common fragment’ of LT L and CT L(Maidl [11], Boja´nczyk [5]). For which regular languagesL isE’Ldefinable inCT L?

We give a partial solution to this problem by characterizing the monoids M such thatE’Lis inCT Lfor everyL⊆A recognized byM.To do so, we will first exhibit a language of the formE’Lthat is not definableCT Lbut for whichVELis nonetheless aperiodic. This shows both the extent to which the methods already exhibited for proving nondefinability can fail, and how a more careful analysis of the wreath product can provide the sought-after result.

6.1. Another language not in CT L

LetA={a, b}.For the remainder of this subsection, let L⊆HA consist of all nonempty forests in which every maximal path has two consecutive occurrences ofb.

Theorem 6.1. L is not definable inCT L.

Proof. We compute the syntactic forest algebra (HL, VL) ofL.Ifs∈Landp∈VA, thenps∈Lif and only if every maximal path inp,except possibly the one leading to the hole, contains two consecutive occurrences ofb.Thus all elements ofLare equivalent under the syntactic congruence, soL forms a single congruence class.

We will provisionally denote this class by 0: we’ll explain this choice of notation later.

Supposes /∈ L, but that every root node of s is labeled b.Let p∈ VA. Then ps∈Lif and only if the following conditions hold:

Every maximal path in p, except the path of ancestors of the hole, contains two consecutiveb’s.

The parent of the hole is labeledb, or the path of ancestors of the hole contains two consecutiveb’s.

Figure 8.The syntactic forest algebra ofL.Addition is idempo-tent and commutative, withα+ 0=α.

Figure 9. The subalgebraK.

Thus for all such s, ps∈L depends only onp,so all such forests are congruent.

We denote this congruence class byα.

Supposes= 0,but is not of either of the kinds described above. Thenps∈L if and only if every maximal path in p,including the path to the hole, contains two consecutiveb’s. So all of these are congruent, and we denote their congruence class by ∞. This notation is justified by the fact that if s belongs to this class, then so doess+s for any forests.

Finally, the empty forest is not equivalent to any of these: Let s L. Then 0 +s L, but this is not true if 0 is replaced by a member of the classes αor

∞.And 0 of course does not belong to the classL. We denote this class 0. Easily, {0,0, α,∞} is idempotent and commutative under addition, andα+ 0=α.

Figure 8 is a state transition diagram of this syntactic forest algebra, showing the transitions induced by the letters.

Observe that if we remove the state 0, we obtain a forest algebra in which 0 is the additive identity. We will work with this smaller algebra, which we callK, and hereinafter denote its identity as 0 rather than 0.See Figure9

By Theorem3.5,Lis definable inCT Lif and only if (HL, VL) divides an iterated wreath product of copies of the forest algebraU2 (see Fig. 4). If this were true, then the subalgebra K would also divide such a wreath product. We will show that, in fact, this cannot occur.

The proof is by induction of the number of factors in the wreath product.

Obviously K ≺ U2, because the horizontal monoid of right-hand side has two elements, and the left-hand side three. For the inductive step, we will show that ifX is any forest algebra such thatK ≺ U2◦X,thenK ≺X.

If K ≺ U2◦X, then there exist a homomorphism Φ from a submonoid H of the horizontal monoid ofU2◦X,and vertical elements ˆa,ˆbof the wreath product satisfying the conditions in Theorem2.1. Let us denote the horizontal monoid of X byH(X),and its vertical monoid byV(X).We write

ˆ

a= (c, f),ˆb= (d, g),

wheref, g:{0,∞} →V(X),andc, d∈ {1, c0, c}.We choose elements (aq, xq) {0,∞} ×H(X) forq∈ {0, α,∞} such thatΦ(aq, xq) =q for eachq.

We first consider the case wherea0=aα=a=∞.Observe that the set H={x∈H(X) : (∞, x)domΦ}

is a subsemigroup ofH(X),and the mapΨ :H→ {0, α,∞}defined by Ψ(x) =Φ(∞, x)

is a homomorphism. By our assumption thataq =for allq, we also have that Ψ is onto. We define

¯

a=f(∞) +x0,¯b=g(∞) +x0∈V(X).

Ifx∈H,then we have

(∞,a¯·x) = (c· ∞+∞, f(∞)·x+x0)

= (c, f)·(∞, x) + (∞, x0)

= ˆ(∞, x) + (∞, x0)

domΦ,

since ˆ(domΦ)domΦ,and domΦis closed under addition. Thus ¯(domΨ) domΨ,and likewise ¯(domΨ)domΨ.We also have, for anyx∈H,

Ψa·x) =Φ(∞,¯a·x)

=Φ(c· ∞+∞, f()·x+x0)

=Φ(ˆa(∞, x) + (∞, x0))

=Φ(ˆa·(∞, x)) +Φ(∞, x0)

=aΦ(∞, x) + 0

=aΦ(∞, x)

=aΨ(x).

SimilarlyΨb·x) =bΨ(x).ThusK ≺X.

We thus suppose that theaq cannot all be chosen equal to ∞.Ifa0=∞,then we find

Φ(∞, xα+x0) =Φ(aα, xα) +Φ(∞, x0) =α+ 0 =α,

and likewise Φ(∞, x +x0) = ∞. Thus all three elements have preimages in {∞} ×H(X), and we are back in the previous case. So we can suppose that no element of the form (∞, x) can be mapped by Φto 0. Ifc=c,we find

Φ(∞, f(0)·x0) =Φ(ˆa(0, x0)) =0 = 0,

which means that we could have chosen a0 = ∞. As we have shown this is im-possible, we must havec∈ {1, c0}.The same argument with ˆbin place of ˆashows d∈ {1, c0}.

Ifaα=∞, then

Φ(d· ∞, g(∞)·xα) =Φ(ˆb(∞, xα)) =b·α= 0, sod· ∞cannot be∞,and thusd=c0.This gives

Φ(0, g(a)·x) =Φ(c0·a, g(a)·x)

=Φ(ˆb(a, x))

=b· ∞

=α,

so we could have chosen our preimage ofαwithaα= 0.This gives Φ(0, f(0)·xα) =Φ(c·0, f(0)·xα)

=Φ(ˆa(0, xα))

=a·α

=

so we also could have chosen our preimage of with a = 0. So we may now suppose (0, x0),(0, xα),(0, x) are mapped byΦto 0, α, respectively. We now set ¯a=f(0),¯b=g(0),and

H={x∈H(X) : (0, x)domΦ}.

As before, we have H closed under addition, and the map Ψ : x Φ(0, x) a homomorphism fromHonto{0, α,∞}.If (0, x)domΦ,then we have

(0,¯a·x) = (c·0, f(0)·x) = ˆa(0, x)∈domΦ,

so that ¯a(domΨ)domΨ,and similarly for ¯b.Finally, we have forx∈H, Ψ(¯a·x) =Φ(0,¯a·x)

=Φ(c·0, f(0)·x)

=Φ(ˆa(0, x))

=aΦ(0, x)

=(x),

and similarlyΨb·x) =bΨ(x).SoK ≺X in this case as well.

The complement of L is the language ET, where T ⊆ {a, b} consists of all forests in which some maximal path does not contain two consecutiveb’s. It fol-lows from Theorem6.1that this language, as well, is not definable inCT L.This provides a negative answer to the question raised earlier whether every forest lan-guage of the form EK for some K ⊆ {a, b} whose associated seminearring is aperiodic, is definable inCT L. To complete the analysis, we need to make sure that(HL, VL) is indeed aperiodic.

Proposition 6.2. (HL, VL)is aperiodic.

Proof. We will show that no multicontextpcan induce a nontrivial cycle in the horizontal elements ofHL. Obviously, 0 cannot be an element of any such cycle.

We have a number of cases to consider, depending on the form ofp.

Ifp has a hole at every leaf node, then0 = 0. This means that 0 cannot be a member of any cycle induced byp.We need to rule out the possibility that p interchanges α and ∞. If p has a root node labeled a, then we can not have p·h=αfor anyh∈HL. If all root nodes are labeledb,then we can never have p·h=∞.

So the only possibility for a cycle is one wherephas some leaf nodes that are not holes. Ifphas a root node labeleda,then as above, we can not havep·h=α.

Thus p would have to interchange 0 and ∞. Similarly, if p has all root nodes labeledb,thenpwould have to interchange 0andα.We can show that neither of these is possible as a consequence of the following fact, which can be proved by an easy induction on the number of nodes ofp: For every multicontextp,ifp·α= 0

orp· ∞= 0,then0= 0.

6.2. Monoids associated with the common fragment ofLT L andCT L The ideal result in this vein would be an algorithm that takes as input an automaton recognizing a word languageL⊂A and outputs whether or notEL is inCT L.This problem is open, and, as we discuss later in the conclusion, it may prove to be very difficult.

In general, the structure of the syntactic monoid ofLis not sufficient to answer this question. This is shown by Theorem6.1: IfLis given by the regular expression (a+b)bb(a+b)–that is, if L consists of strings over {a, b} that contain two consecutive occurrences of b, then EL is in CT L. But this is not true for the complement ofL, which has the same syntactic monoid.

Here we give necessary and sufficient conditions on a finite monoid M so that for allL⊆Arecognized byM,EL∈CT L.We first recall some basic facts about the ideal structure of finite semigroups: Two elements s, t of a finite monoid M areJ-equivalent if M sM =M tM. Equivalence classes of this relation are called J-classes. If a J-class contains an idempotent the class is said to be regular.

Generally speaking, the product of two elements in aJ-classJ need not belong to theJ-class, and ifst /∈J, we must haveM stM∩J =∅—in other words, we can never get back toJonce the product of two elements takes us outside ofJ.TheRees

Figure 10. The nontrivial J-classes in M((ab)+) (left) and M((a+b)bb(a+b)) (right).

Matrix Theorem,restricted to finite aperiodic monoids, states that for each regular J-classJ there is a pair of finite setsX, Y and a mapP :Y ×X → {0,1},such thatJ is isomorphic toX×Y with multiplication given by

(x, y)·(x, y) = (x, y), if P(y, x) = 1,

with the product undefined ifP(y, x) = 0.This latter case is the situation where the product of the elements ofJ corresponding to (x, y) and (x, y) is not inJ.

The functionP has an additional property: For eachy∈Y there is at least one x∈X such that P(y, x) = 1, and similarly for eachx∈ X there is at least one y ∈Y such thatP(y, x) = 1.Observe that P(y, x) = 1 if and only if (x, y) is an idempotent. We can thus depict a regularJ-class in a finite aperiodic monoid by what has come to be called an egg-box diagram: This is a rectangular grid with rows indexed byX,columns byY,and with an asterisk in each cell corresponding to an idempotent.

The syntactic monoids of (ab)+ and (a+b)bb(a+b) have very similar struc-tures. Both contain six elements: 1, 0, and a regular J-class with a 2×2 Rees matrix representation. In the case of (ab)+ thisJ-class contains two idempotents (the syntactic congruence classes ofabandba) and two non-idempotents (the syn-tactic congruence classes ofaandb). In the case of (a+b)bb(a+b) the class of ais also idempotent. Egg-box diagrams of theseJ-classes are shown in Figure10.

The class DA consists of finite aperiodic monoids M in which every regular J-class is closed under multiplication (equivalently, every element of every regular J-class is idempotent).DAforms a pseudovariety of finite monoids. This variety, which arises in an surprisingly large number of contexts, was first identified by Sch¨utzenberger [16], who proved the following property of the languages recognized by monoids inDA.

Theorem 6.3. Let L⊆A. IfM(L)DAthen Lis a finite union of languages of the form

A0a1A1. . . anAn,

where fori= 1, . . . , n, ai∈A, and fori= 0, . . . , n, Ai⊆A.

(As we have stated this theorem, the converse is false, but in fact Sch¨utzenberger gave a precise characterization of languages recognized byDA, which entails an additional unambiguity condition on the concatenation product and union. We will not require this).

Here is our principal result concerning languages of the formEL definable in CT L.

Theorem 6.4. Let M be a finite monoid, and A a finite alphabet with at least two letters. The following are equivalent:

For every L⊆A recognized byM, EL is inCT L.

M DA.

Proof. First suppose thatM DA,and letLbe recognized byM.ThenM(L) M.Since DAis closed under division,M(L)DA, and thus by Theorem6.3,L is a union of products of the formA0a1A1. . . anAn,where fori= 1, . . . , n, ai∈A, and fori= 0, . . . , n, Ai⊆A.Easily for anyL1, L2⊆A,E(L1∪L2) =EL1∪EL2. Thus it suffices to show thatEL∈CT LwhenL has the formA0a1A1. . . anAn. We can prove this by induction on the lengthnof the product. First, ifA ⊆A, thenE(A) is defined by the formula

For the converse, assume that M /∈ DA. We will show that there are word languagesLrecognized byM such thatELis not in CT L.

If M contains a group, then it recognizes a word language L such thatM(L) contains a group. There is thus a wordv and a sequence of words (u0, . . . , uk−1) such thatv cycles these words in M(L): That is,vui is equivalent tou(i+1) modk under the syntactic congruence of L, but the ui are not all congruent to one another. In particular, u0 and u1 are not congruent, so there exist words x, y such that xu0y L and xu1y /∈L, or vice-versa. Now consider the sequence of words (u0y, u1y, . . . , uk−1y) as forests, and compare them modulo the syntactic congruence ofEL. We then have that u0y and u1y are not equivalent. However, we do havevuiy equivalent tovu(i+1) modky.Thusv induces a nontrivial cycle in the syntactic forest algebra ofEL.This algebra is thus not aperiodic, so it cannot be definable inCT L.

We may therefore assume thatM is aperiodic. ThusM has regularJ-class J that contains a non-idempotent element. Consider a Rees matrix representation

ofJ,and let (x, y) be a non-idempotent element. There must bex =xandy=y consequence of Proposition4.4. (That Proposition concerns the languageE(ab)+, but the same proof applies toEL.) If (x, y) is idempotent,P(y, x) = 1,sow∈L if and only if w contains no factor of the formbb.But now Theorem 6.1 implies

thatELis not definable inCT L.

7. Conclusion

Much of this paper has been devoted to showing how standard notions from the algebraic theory of regular word languages–sequences of identities, preservation of aperiodicity under wreath products and quotients, ideal structure of semigroups–

can be brought to bear on questions of logical definability of properties of trees, both producing new insights and simplifying existing arguments. However, there is one very significant gap: We have only been able to demonstrate algebraic nec-essary conditions for definability in various logics, by deriving properties of the wreath product. What is missing is a mechanism for obtaining wreath product de-compositions of forest algebras, which will be required in order to use this theory to obtain sufficient conditions. Such a decomposition is demonstrated in [7], but only in the rather simple case of a characterization of the logicEF.

Let us examine our results in this light.

Seminearring closure and aperiodicity.As we saw, aperiodicity of the seminearring closure of a forest algebra is a necessary, but not a sufficient condiition for mem-bership inCT L.Still, this notion might be relevant for the problem of obtaining an effective characterization of CT L. Let us begin with a seminearring (H, V) in which H is idempotent and commutative, andV is aperiodic. By the Krohn–

Rhodes Theorem, (H, V)considered as a transformation monoid divides an iter-ated wreath product of copies ofU2,again considered as transformation monoids–

that is, ignoring the additive structure. The problem of characterizing membership in CT Lis essentially that of finding when such a transformation monoid division preserves the additive structure, and is thus a forest algebra division.

We should expect that, considered as a transformation monoid, (H, V) might admit a shorter decomposition as a wreath product of copies ofU2than it has as a forest algebra. It would be interesting to see examples of languages inCT Lwhose syntactic forest algebras have this property. (If we knew for some reason that such a length discrepancy never arises, then we would have a proof of decidability of membership inCT L,albeit with a very inefficient algorithm).

Generalized distributivity.What is the exact relation between the generalized dis-tributive idenitities and definability in P DL? The dream theorem here would state that if a finite forest algebra is horizontally idempotent and commutative and satisfiessn =tn for somen,then it divides a wreath product of distributive, horizontally idempotent and commutative forest algebras.

This seems like too much to hope for, and it is probably more prudent to search for a counterexample. But the identities give us a new way to think about the problem. If generalized distributivity is not sufficient, then what do we need to add to these identities to permit the decomposition?

The overlap of CT L and LT L. The work of Boja`nczyk [5], building on earlier results of Maidl [11], provides an effective characterization of the languagesL⊆A such thatELis definable inCT Lusing only positive applications of the operator EφUψ: that is, this operator is never used within the scope of a negation. L is definable in this way if and only if it has depth 3/2 in the concatenation hierarchy;

that is,L is a union of languages of the form A0a1A1. . . anAn,

where for i = 1, . . . , n, ai A, and for i = 0, . . . , n, Ai A. One can decide effectively whether a given regular languageL is of depth 3/2.

We have already seen that every language in DA has this form, and we have argued above that for every such languageL,ELis definable in CT L.However, there are languages of depth 3/2 that are outside DA. Boja´nczyk provides an example of a language L that does not have depth 3/2, but for which EL is inCT L.

The question of definability ofELinCT Lis thus very complex. We conjecture that every L for which EL belongs to CT L has depth no more than 2 in the concatenation hierarchy; these are boolean combinations of languages of depth 3/2.

(Boja`nczyk’s example has depth 2). Even if this turns out to be true, it is far from settling the general question: We have already seen that there are languages L of depth 2 for whichELis not inCT L. Moreover, in contrast to depth 3/2, the problem of effectively determining if a given regular language has depth 2 has been open for many years.

References

[1] M. Benedikt and L. Segoufin, Regular tree languages definable in fo and in fomod.ACM Trans. Comput. Logic11(2009) 1–4.

[2] M. Bojanczyk, Algebra for trees, in AutoMathA Handbook, edited by J.-E. Pin (2012).

Preprint.

[3] M. Bojanczyk and I. Walukiewicz, Forest algebras, in Logic and Automata: History and Perspectives, edited by E. Graedel, J. Flum and T. Wilke. Amsterdam University Press (2008).

[4] M. Boja´nczyk,Decidable Properties of Tree Languages. Ph.D. thesis, University of Warsaw (2004).

[5] M. Bojanczyk, The common fragment of actl and ltl. InFoSSaCS, vol. 4962 ofLect. Notes Comput Sci., edited by R.M. Amadio (2008) 172–185.

[6] M. Bojanczyk, L. Segoufin and H. Straubing, Piecewise testable tree languages. To appear inLogical Methods Comput. Sci.(2012).

[7] M. Bojanczyk, H. Straubing and I. Walukiewicz, Wreath products of forest algebras, with applications to tree logics. To appear inLogical Methods Comput. Sci.(2012).

[8] S. Eilenberg, Automata, Languages, and Machines, vol. B.Pure and Applied Mathematics.

New York, Academic Press (1976).

[9] E. Allen Emerson, Temporal and modal logic, inHandbook Of Theoretical Computer Science.

Elsevier (1995) 995–1072.

[10] L. Libkin, Elements Of Finite Model Theory. Texts in Theoretical Computer Science.

Springer (2004).

[11] M. Maidl, The common fragment of ctl and ltl. InFOCS. IEEE Computer Society (2000) 643–652.

[12] F. Moller and A. M. Rabinovich, On the expressive power of ctl. InLICS. IEEE Computer Society (1999) 360–368.

[13] J.E. Pin,Varieties of formal languages. North Oxford Academic (1986).

[14] J.-E. Pin, Syntactic semigroups, vol. 1 inHandbook of Formal Languages. Springer (1997).

[15] A. Potthoff, First-order logic on finite trees.Lect. Notes Comput. Sci.915(1995) 125–139.

[16] M. Sch¨utzenberger, Sur le produit de concatenation non ambigu. Semigroup Forum 13 (1976) 47–75.Doi: 10.1007/BF02194921.

[17] S. Shamir, O. Kupferman and E. Shamir, Branching-depth hierarchies.Electr. Notes Theor.

Comput. Sci.39(2000) 65–78.

Communicated by H. Straubing.

Received July 31, 2012. Accepted June 19, 2013.

Documents relatifs