Definability and decidability of binary predicates for time granularity

11
Definability and decidability of binary predicates for time granularity Massimo Franceschet Universit` a di Chieti-Pescara Dipartimento di Scienze 65100 Pescara, Italy [email protected] Angelo Montanari Universit` a di Udine Dipartimento di Matematica e Informatica 33100 Udine, Italy [email protected] Adriano Peron Universit` a di Napoli ‘Federico II’ Dipartimento di Scienze Fisiche 80100 Napoli , Italy [email protected] Guido Sciavicco Universit` a di Udine Dipartimento di Matematica e Informatica 33100 Udine, Italy [email protected] Abstract In this paper we study the definability and decidability of binary predicates for time granularity with respect to monadic theories over finitely and infinitely layered struc- tures. We focus our attention on the equi-level (resp. equi- column) predicate constraining two time points to belong to the same layer (resp. column) and on the horizontal (resp. vertical) successor predicate relating a time point to its suc- cessor within a given layer (resp. column). We give a num- ber of positive and negative results by reduction to/from a wide spectrum of decidable/undecidable problems. 1 Introduction In this paper we systematically investigate definability and decidability issues for monadic theories of time gran- ularity. The ability of providing and relating temporal rep- resentations at different ‘grain levels’ of the same reality is widely recognized as an important research theme for tem- poral logic and a major requirement for many applications, including formal specifications, artificial intelligence, tem- poral databases, and data mining, e.g. [1, 4, 5, 12, 13]. We focus our attention on the area of formal specifications where the explicit representation of time granularity makes it possible to specify in a concise way reactive systems whose behaviour can be naturally modeled with respect to a (possibly infinite) set of differently-grained temporal do- mains [8, 15]. A logical framework for the addition of time granularity to specification formalisms has been systemati- cally developed in [15] and later extended in [6]. It is based on a many-level view of temporal structures that replaces the flat temporal domain of standard linear and branching temporal logics by a temporal universe consisting of a (pos- sibly infinite) set of differently-grained temporal domains. The theory of n-layered (there are exactly n temporal do- mains) k-refinable (each time point can be refined into k time points of the immediately finer temporal domain, if any) temporal structures for time granularity (n-LSs for short), with matching decidability results, has been investi- gated in [18]. The theory of k-refinable upward unbounded layered structures (UULSs, for short), that is, ω-layered structures consisting of a finest temporal domain together with an infinite number of coarser and coarser domains, and the theory of k-refinable downward unbounded layered structures (DULSs), that is, ω-layered structures consisting of a coarsest domain together with an infinite number of finer and finer domains, have been studied in [16]. The de- cidability of the theories of UULSs and DULSs has been proved by reducing their satisfiability problem to the empti- ness problem for systolic and Rabin tree automata, respec- tively. Such a connection between multi-level temporal log- ics and automata theory suggests a complementary point of view on time granularity: besides an important feature of a specification language, it can be viewed as a formal tool to investigate the definability of meaningful timing properties, such as periodicity, density, and exponential grow/decay, and the expressiveness and decidability of temporal theo- ries and logics [7, 16, 17, 18]. In this respect, the number of layers (single vs. multiple, finite vs. infinite) of the un- derlying temporal structure, as well as the nature of their interconnections, play a major role: certain timing proper- ties can be expressed using a single layer; others using a finite number of layers; others only exploiting an infinite

Transcript of Definability and decidability of binary predicates for time granularity

Definability and decidability of binary predicates for time granularity

Massimo FranceschetUniversita di Chieti-Pescara

Dipartimento di Scienze65100 Pescara, [email protected]

Angelo MontanariUniversita di Udine

Dipartimento di Matematica e Informatica33100 Udine, Italy

[email protected]

Adriano PeronUniversita di Napoli ‘Federico II’Dipartimento di Scienze Fisiche

80100 Napoli , [email protected]

Guido SciaviccoUniversita di Udine

Dipartimento di Matematica e Informatica33100 Udine, Italy

[email protected]

Abstract

In this paper we study the definability and decidabilityof binary predicates for time granularity with respect tomonadic theories over finitely and infinitely layered struc-tures. We focus our attention on the equi-level (resp. equi-column) predicate constraining two time points to belong tothe same layer (resp. column) and on the horizontal (resp.vertical) successor predicate relating a time point to its suc-cessor within a given layer (resp. column). We give a num-ber of positive and negative results by reduction to/from awide spectrum of decidable/undecidable problems.

1 Introduction

In this paper we systematically investigate definabilityand decidability issues for monadic theories of time gran-ularity. The ability of providing and relating temporal rep-resentations at different ‘grain levels’ of the same reality iswidely recognized as an important research theme for tem-poral logic and a major requirement for many applications,including formal specifications, artificial intelligence, tem-poral databases, and data mining, e.g. [1, 4, 5, 12, 13].We focus our attention on the area of formal specificationswhere the explicit representation of time granularity makesit possible to specify in a concise way reactive systemswhose behaviour can be naturally modeled with respect toa (possibly infinite) set of differently-grained temporal do-mains [8, 15]. A logical framework for the addition oftimegranularity to specification formalisms has been systemati-cally developed in [15] and later extended in [6]. It is based

on a many-level view of temporal structures that replacesthe flat temporal domain of standard linear and branchingtemporal logics by a temporal universe consisting of a (pos-sibly infinite) set of differently-grained temporal domains.The theory ofn-layered (there are exactlyn temporal do-mains)k-refinable (each time point can be refined intoktime points of the immediately finer temporal domain, ifany) temporal structures for time granularity (n-LSs forshort), with matching decidability results, has been investi-gated in [18]. The theory ofk-refinable upward unboundedlayered structures(UULSs, for short), that is,ω-layeredstructures consisting of a finest temporal domain togetherwith an infinite number of coarser and coarser domains,and the theory ofk-refinable downward unbounded layeredstructures(DULSs), that is,ω-layered structures consistingof a coarsest domain together with an infinite number offiner and finer domains, have been studied in [16]. The de-cidability of the theories of UULSs and DULSs has beenproved by reducing their satisfiability problem to the empti-ness problem for systolic and Rabin tree automata, respec-tively. Such a connection between multi-level temporal log-ics and automata theory suggests a complementary point ofview on time granularity: besides an important feature of aspecification language, it can be viewed as a formal tool toinvestigate the definability of meaningful timing properties,such as periodicity, density, and exponential grow/decay,and the expressiveness and decidability of temporal theo-ries and logics [7, 16, 17, 18]. In this respect, the numberof layers (single vs. multiple, finite vs. infinite) of the un-derlying temporal structure, as well as the nature of theirinterconnections, play a major role: certain timing proper-ties can be expressed using a single layer; others using afinite number of layers; others only exploiting an infinite

r03

. . .

³³

r r02 12©©©©

HHHH

r r r r01 11 21 31¡¡

¡¡

@@

@@

r r r r r r r r¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

00 10 20 30 40 50 60 70

rPP 13

r r22 32©©©©

HHHH

r r r r41 51 61 71

. . .

. . .

. . .

¡¡

¡¡

@@

@@

r r r r r r r r¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

80 90 100 110 120 130 140 150

Figure 1. A 2-refinable upward unbounded layered structure.

number of layers.

In this paper, we address definability and decidabilityproblems for the theories ofn-layered andω-layered struc-tures, focusing on a set of predicates that allow one to ex-press meaningful properties of time granularity [15]. Theyare the equi-level (resp. equi-column) predicate constrain-ing two time points to belong to the same layer (resp. col-umn) and the horizontal (resp. vertical) successor predicaterelating a time point to its successor within a given layer(resp. column). As a matter of fact, definability and de-cidability problems of the equi-level and vertical successorpredicates with respect to monadic theories of binary andk-ary trees have been already studied in the literature. Moreprecisely, the decidability of the extension of the first-ordertheory of two successors, devoid of free set variables, overinfinite binary trees with the equi-level predicate was firstproved by Elgot and Rabin in [3]. Thomas extended this re-sult by showing that the monadic chain logic extended withthe equi-level predicate over infinitek-ary trees is decid-able [22], while Lauchli and Savoiz proved the undecidabil-ity of (weak) monadic second-order theory ofk successorsover infinitek-ary trees extended with either the equi-levelor the vertical successor predicate [14]. Our paper gener-alizes such results in two directions: on the one hand, weinterpret the given theories over more general structures;on the other hand, we take into consideration a larger setof predicates, including the equi-column and the horizontalsuccessor predicates (these predicates are intimately relatedto the vertical successor and equi-level predicates, respec-tively, but they are not in general inter-definable).

The outcomes of our work can be summarized as fol-lows. We first show that all the considered predicates are notdefinable in the monadicsecond-ordertheories of DULSsand UULSs, and that their addition to such theories imme-diately leads to undecidability. As for the theory ofn-LSs,we point out the different status of the horizontal (equi-leveland horizontal successor) and vertical (equi-column andvertical successor) predicates: while horizontal predicatesare easily definable, vertical ones are undefinable and theiraddition yields undecidability. Then, we study the effectsof adding the above predicates to suitablefragmentsof thegiven monadic second-order theories of time granularity,

such as their first-order, path, and chain fragments, possiblyadmitting free set variables. We systematically explore allthe possibilities, and give a number of positive and negativeresults. From a technical point of view, (un)definability and(un)decidability results are obtained by reduction from/to awide spectrum of undecidable/decidable problems. We arestill missing the complete picture, because some decidabil-ity problems are open. However, the achieved results suf-fice to formulate some general statements. We prove thatall predicates can be added to monadic first-order, path, andchain fragments, devoid of free set variables, overn-LSsand UULSs preserving decidability. In the case of DULSs,we prove the same result for the equi-level and horizontalsuccessor predicates, while we do not know yet whetherthe same holds for the equi-column and vertical succes-sor predicates. Moreover, we prove that the addition ofthe equi-column or vertical successor predicates to monadicfirst-order fragments overω-layered structures, with free setvariables, makes the resulting theory undecidable. The ef-fect of such additions ton-layered structures is not knownyet. As for the equi-level predicate, we only know thatadding it to the monadic path fragment over DULSs, withfree set variables, leads to undecidability. Finally, as far asthe monadic second-order theory over UULSs is concerned,we establish an interesting connection between its extensionwith the equi-level (resp. equi-column) predicate and sys-tolic ω-languages overY -trees (resp. trellis) [10].

The paper is organized as follows. In Section 2 we pro-vide background knowledge about monadic theories of timegranularity. In Section 3 we study the definability and de-cidability of the given set of binary predicates with respectto such theories. (The details of the proofs as well as someadditional results can be found in [9].)

2 Monadic logics and layered structures

In this section we introduce classical monadic logics andinterpret them over layered structures for time granularity.

Definition 2.1 (Monadic second-order logic)

Let τ = c1, . . . , cr, u1, . . . , us, b1, . . . , bt be a finitealphabet of symbols, wherec1, . . . , cr (resp. u1, . . . , us,

r00

r r01 11©©©©

HHHH

r r r r02 12 22 32¡¡

¡¡

@@

@@

r r r r r r r r¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

¢ ¢ ¢ ¢ ¢ ¢ ¢ ¢A A A A A A A A. . . . . . . . . . . . . . . . . . . . . . . .

r 10

r r21 31©©©©

HHHH

r r r r42 52 62 72

. . .

. . .

¡¡

¡¡

@@

@@

r r r r r r r r¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

¢ ¢ ¢ ¢ ¢ ¢ ¢ ¢A A A A A A A A. . . . . . . . . . . . . . . . . . . . . . . .

Figure 2. A 2-refinable downward unbounded layered structure.

b1, . . . , bt) are constant symbols (resp. unary relationalsymbols, binary relational symbols) and letP be an alpha-bet of unary relational symbols. The second-order languagewith equalityMSO[τ ∪ P] is built up as follows:atomicformulasare of the formsx = y, x = ci, with 1 ≤ i ≤ r,ui(x), with 1 ≤ i ≤ s, bi(x, y), with 1 ≤ i ≤ t, x ∈ X,andP (x), wherex, y are individual variables,X is a setvariable, andP ∈ P; formulasare built up from atomicformulas by means of the Boolean connectives¬ and ∧,and the quantifier∃ ranging over both individual and setvariables.

In the following, we will writeMSOP [τ ] for MSO[τ ∪P] and we will writeMSO[τ ] whenP is meant to be theempty set. We interpret the above language over the follow-ing layered structures.

n-layered structures. Let n, k ≥ 1. For everyi ≥ 0, letT i = {ji | j ≥ 0} and letUn =

⋃0≤i<n T i. A k-refinable

n-layered structure(n-LS) is a triplet〈Un, (↓i)k−1i=0 , <〉, that

intuitively represents an infinite sequence of completek-ary trees of heightn − 1, each one rooted at a point ofT 0. The sets{T i}0≤i<n are the layers of the trees,↓i,with i = 0, . . . , k − 1, is a projection function such that↓i (an−1) = ⊥ and↓i (ab) = cd if and only if b < n − 1,d = b + 1, andc = a · k + i, and< is the total ordering ofUn given by thepreorder(root-left-right) visit of the nodes(for elements belonging to the same tree) and by the totallinear ordering of trees (for elements belonging to differenttrees). Apathover ann-LS is a subset of the domain whoseelements can be written as a sequencex0, x1, . . . xm, withm ≤ n − 1, such that, for everyi = 1, . . . m, there exists0 ≤ j < k such thatxi =↓j (xi−1). A chain is any sub-set of a path. AP-labeledk-refinablen-layered structureis a tuple〈Un, (↓i)k−1

i=0 , <, (P )P∈P〉, where,↓i and< aredefined as above and, for everyP ∈ P, P ⊆ Un is the setof points inUn labeled with symbolP . MSO[<, (↓i)k−1

i=0 ](resp. MSOP [<, (↓i)k−1

i=0 ]) is interpreted overk-refinablen-LSs 〈Un, (↓i)k−1

i=0 , <〉 (resp. P-labeledk-refinablen-LSs 〈Un, (↓i)k−1

i=0 , <, (P )P∈P〉) in the obvious way. Thedecidability of the theoryMSOP [<, (↓i)k−1

i=0 ] over n-LSshas been proved in [18] by reducing it to the monadic

second-order theory of one successor, which is known tobe (nonelementarily) decidable [21].

Theorem 2.2 MSOP [<, (↓i)k−1i=0 ] over n-LSs is (nonele-

mentarily) decidable.

Upward unbounded layered structures. Let U =⋃i≥0 T i. A k-refinableupward unbounded layered struc-

ture(UULS) is a triplet〈U , (↓i)k−1i=0 , <〉, that intuitively rep-

resents a completek-ary infinite tree generated from theleaves (cf. Figure 1). The sets{T i}i≥0 are the layers ofthe tree,↓i, with i = 0, . . . , k − 1, is a projection func-tion such that↓i (a0) = ⊥ and↓i (ab) = cd if and onlyif b > 0, b = d + 1, andc = a · k + i, and< is the to-tal ordering ofU given by theinorder (left-root-right) visitof the treelike structure. Apathover an UULS is a subsetof the domain whose elements can be written as a possi-bly infinite sequencex0, x1, . . . such that, for everyi ≥ 1,there exists0 ≤ j < k such thatxi−1 =↓j (xi). A chainis any subset of a path. Notice that every pair of infinitepaths over an UULS may differ on a finite prefix only. AP-labeledk-refinable UULS is obtained by augmenting anUULS with a setP ⊆ U , for any P ∈ P (the elementsof the structure labeled byP ). MSO[<, (↓i)k−1

i=0 ] (resp.MSOP [<, (↓i)k−1

i=0 ]) is interpreted overk-refinable UULSs〈U , (↓i)k−1

i=0 , <〉 (resp. P-labeledk-refinable UULSs〈U ,(↓i)k−1

i=0 , <, (P )P∈P〉). The decidability of the second-order theory of UULSs has been proved in [16] by a reduc-tion to a decidable proper extension of the monadic second-order theory of one successor [19].

Theorem 2.3 MSOP [<, (↓i)k−1i=0 ] over UULSs is (nonele-

mentarily) decidable.

Downward unbounded layered structures. Let U =⋃i≥0 T i. A k-refinable downward unbounded layered

structure (DULS) is a triplet 〈U , (↓i)k−1i=0 , <〉, that intu-

itively represents an infinite sequence of completek-aryinfinite trees, each one rooted at a point ofT 0 (cf. Fig-ure 2). The sets{T i}i≥0 are the layers of the trees,↓i,with i = 0, . . . , k − 1, is a projection function such that

MFO[<, (↓i)k−1i=0 ]

MPLP [<, (↓i)k−1i=0 ]

MPL[<, (↓i)k−1i=0 ] MFOP [<, (↓i)

k−1i=0 ]

MCL[<, (↓i)k−1i=0 ]

MCLP [<, (↓i)k−1i=0 ]MSO[<, (↓i)

k−1i=0 ]

MSOP [<, (↓i)k−1i=0 ]

»»»»»:XXXXXy

»»»»»:XXXXXy

»»»»»:

XXXXXyXXXXXy

»»»»»:»»»»9

XXXXXyXXXXXy

Figure 3. A hierarchy of monadic theoriesover layered structures.

↓i (ab) = cd if and only if d = b + 1 andc = a · k + i, and< is the total ordering ofU given by thepreorder(root-left-right) visit of the nodes (for elements belonging to the sametree) and by the total linear ordering of trees (for elementsbelonging to different trees). Apathover a DULS is a sub-set of the domain whose elements can be written as a possi-bly infinite sequencex0, x1, . . . such that, for everyi ≥ 1,there exists0 ≤ j < k such thatxi =↓j (xi−1). A chainis any subset of a path. AP-labeledk-refinable DULSis obtained by augmenting a DULS with a setP ⊆ U ,for any P ∈ P (the elements of the structure labeled byP ). MSO[<, (↓i)k−1

i=0 ] (resp. MSOP [<, (↓i)k−1i=0 ]) is inter-

preted overk-refinable DULSs〈U , (↓i)k−1i=0 , <〉 (resp. P-

labeledk-refinable DULSs〈U , (↓i)k−1i=0 , <, (P )P∈P〉). The

decidability of the second-order theory of DULSs has beenproved in [16] by reducing it to the monadic second-ordertheory ofk successors, which is known to be (nonelemen-tarily) decidable [21].

Theorem 2.4 MSOP [<, (↓i)k−1i=0 ] over DULSs is (nonele-

mentarily) decidable.

We denote byM(ϕ) the set of models of the formulaϕ. We say that a theoryT is embeddableinto a theoryT ′, denoted byT → T ′, if there is aneffectivetransla-tion σ of T formulas intoT ′ formulas such that, for ev-ery T -formula ϕ, M(ϕ) = M(σ(ϕ)). T is equivalentto T ′, written T À T ′, if both T → T ′ andT ′ → T .It is immediate to see that ifT → T ′ and T ′ is decid-able (resp.T is undecidable), thenT is decidable (resp.T ′ is undecidable) as well. Furthermore, letα be a unaryor binary relational symbol. We say thatα is definableinMSO[τ ] if MSO[τ ∪ {α}] → MSO[τ ]. If the addition ofα to a decidable theoryMSO[τ ] makes the resulting theoryMSO[τ ∪ {α}] undecidable, we can conclude thatα is notdefinable inMSO[τ ]. All the above definitions and prop-erties transfer to any fragment ofMSO[τ ]. In the follow-ing, we will take into consideration the first-order fragmentMFO[τ ] of MSO[τ ] as well as its path (resp. chain) frag-mentMPL[τ ] (resp.MCL[τ ]), which is obtained by inter-preting second-order variables over paths (resp. chains), to-gether with theirP-variantsMFOP [τ ] andMPLP [τ ] (resp.

MCLP [τ ]). Figure 3 summarizes the relationships betweenthe expressive power of such theories (an arrow fromT toT ′ stands forT → T ′). From Theorem 2.2 (resp. The-orem 2.3, 2.4), it follows that all the theories in Figure 3,when interpreted overn-LSs (resp. over UULSs, DULSs),are decidable.

3 Definability and decidability of binarypredicates for time granularity

In this section we study the definability and decidabilityof meaningful binary predicates for time granularity overlayered structures. More precisely, we investigate the pos-sibility of defining such predicates within the given theories,and, whenever this is not possible, the possibility of addingthem preserving decidability. Let〈U , (↓i)k−1

i=0 , <〉 be a lay-ered structure and letnr andms be two elements ofU . Wefocus on the following set of predicates:

1. equi-level predicateT , such thatT (nr,ms) iff r = s;

2. i-th equi-level predicateT i, such thatT i(nr,ms) iffr = s = i;

3. equi-column predicateD, such thatD(nr, ms) iff n =m;

4. i-th equi-column predicateDi, such thatDi(nr,ms)iff n = m = i;

5. horizontal successor+1, such that+1(nr,ms) iff r =s andm = n + 1;

6. i-th horizontal successor+i1, such that+i1(nr,ms)iff r = s = i andm = n + 1;

7. vertical successor⊕1, such that⊕1(nr,ms) iff n =m ands = r + 1;

8. i-th vertical successor⊕i1, such that⊕i1(nr,ms) iffn = m = i ands = r + 1.

T i, Di, +i1, and⊕i1, andT , D, +1, and⊕1 are respec-tively calledlocal andglobal predicates. Global predicatesare depicted in Figure 4. In [15], among the many pos-sible relations between time points belonging to the tem-poral universe, the above local predicates are identified astheprimitivesfor time granularity, that is, relations that anyspecification language for time granularity should be ableto express. Global predicates are a natural generalization oflocal ones. In particular, theequi-levelpredicate allows oneto check whether or not two elements belong to the samelayer, while theequi-columnpredicate allows one to ver-ify whether two elements are at the same distance from theorigin of the layer they belong to.

qT

+1

(((((((((⊕1

´´

³³³³³(((((((((((

D

q q©©©©HHHH

q q q q¡¡

¡¡

@@

@@

q q q q q q q q¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

. . . . . . . . . . . . . . . . . . . . . . . .

qq q©©©©

HHHH

q q q q...

...

...

...

¡¡

¡¡

@@

@@

q q q q q q q q¢¢

¢¢

¢¢

¢¢

AA

AA

AA

AA

. . . . . . . . . . . . . . . . . . . . . . . . ...

Figure 4. The global predicates for time granularity.

Some of the above predicates are functional in nature,and we will sometimes use a functional notation for them.For instance, we will write+1(x) = y for +1(x, y) (thesame for⊕1). Moreover, we will writeT i(x) as a shorthandfor T i(x, x), which states thatx belongs to thei-th layer(the same forDi(x, x)).It is worth pointing out that the predicates+i1 andT i areinter-definable inMFO[<, (↓i)k−1

i=0 ] over layered structuresas follows:

+i1(x, y) = x < y ∧ T i(x, y) ∧ ∀z((T i(x, z)∧x < z) → y ≤ z);

T i(x, y) = ∃w(+i1(x,w)) ∧ ∃w(+i1(y, w)).

Similarly,+1 andT are inter-definable inMSO[<, (↓i)k−1i=0 ]

(as a matter of fact,+1 is first-order definable in terms ofT , while T is second-order definable in terms of+1) asfollows:

+1(x, y) = x < y ∧ T (x, y) ∧ ∀z((T (x, z)∧x < z) → y ≤ z);

T (x, y) = ∀X(x ∈ X ∧ ∀z(z ∈ X →∃w(+1(z, w) ∧ w ∈ X)) → y ∈ X)∨∀X(y ∈ X ∧ ∀z(z ∈ X →∃w(+1(z, w) ∧ w ∈ X)) → x ∈ X).

It immediately follows that+i1 (resp.+1) is definable inMFO[<, (↓i)k−1

i=0 ] (resp. MSO[<, (↓i)k−1i=0 ]) if and only

if T i (resp. T ) is definable inMFO[<, (↓i)k−1i=0 ] (resp.

MSO[<, (↓i)k−1i=0 ]). In a similar way, it can be shown the

inter-definability of the pairs of predicates(⊕i1, Di) (resp.(⊕1, D)) in MFO[<, (↓i)k−1

i=0 ] (resp.MSO[<, (↓i)k−1i=0 ]).

In the following, we first focus on upward unboundedlayered structures, then we move ton-layered structures,and finally we consider downward unbounded ones. Westudy upward unbounded layered structures before finitely-layered ones because some results forn-layered structurescan be directly obtained from those for upward unboundedones.

Definability and decidability over UULSs.In this section, we investigate definability and decidabil-

ity issues for monadic theories of UULSs. Thei-th equi-levelT i can be defined as follows:

T 0(x, y) = ¬∃z1(↓0 (x) = z1) ∧ ¬∃z2(↓0 (y)= z2);

T i+1(x, y) = ∃z1∃z2(T i(z1, z2)∧ ↓0 (x) = z1 ∧↓0 (y) = z2).

As already shown, the horizontal successor+i can be de-fined in terms ofT i. As for Di, the predicateD0 can beexpressed as follows:

D0(x, y) = ∃X(x ∈ X ∧ y ∈ X ∧ 00 ∈ X ∧∀z((T 0(z) ∧ z 6= 00) → z 6∈ X)∧∀z(z ∈ X → ∃w(↓0 (w) = z ∧w ∈ X))) ∧ ∀z((z ∈ X ∧ z 6= 00) →∃w(↓0 (z) = w ∧ w ∈ X)))).

where00 is the first-order definable origin of layer zero.Let ankn+ . . . a0k

0 be thek-ary representation ofi, for anyi > 0. Di can be defined as follows:

Di(x, y) = ∃z(D0(z)∧ ↓a0,...,an (z) = x)∧∃z(D0(z)∧ ↓a0,...,an (z) = y).

Once more, the vertical successor⊕i can be defined interms ofDi. Notice that second-order quantification comesinto play in the definition ofD0 only; furthermore, the se-mantics ofD0 does not change if we interpret the second-order variableX as a path. Hence, thei-th equi-columnDi and thei-th vertical successor⊕i1 can be encoded inMPL[<, (↓i)k−1

i=0 ], while the i-th equi-levelT i and thei-th horizontal successor+i1 can be encoded inMFO[<,(↓i)k−1

i=0 ].Consider now the global predicates. We start by show-

ing that the addition of the vertical predicates⊕1 or D toMFOP [<, (↓i)k−1

i=0 ] makes it undecidable. The proof re-duces a suitable undecidable version of the tiling problemto the satisfiability problem forMFOP [<, (↓i)k−1

i=0 ,⊕1]-formulas.

Theorem 3.1 BothMFOP [<, (↓i)k−1i=0 , D] andMFOP [<,

(↓i)k−1i=0 ,⊕1] overk-ary UULSs are undecidable.

Proof. We give the proof for binary UULSs; the general-ization tok-ary UULSs is straightforward. We show thatMFOP [<, ↓0, ↓1,⊕1] over binary UULSs is undecidableby embedding theoctant tiling probleminto it [11]. Since

MFOP [<, ↓0, ↓1,⊕1] → MFOP [<, ↓0, ↓1, D], it followsthatMFOP [<, ↓0, ↓1, D] is undecidable as well.

The octant tiling problem is the problem of establish-ing whether, given a finite set of tile typesT , T can tileO =

⋃i≥0{(i, j) | 0 ≤ j ≤ i}. For every tile type

t ∈ T , let right(t), left(t), up(t), anddown(t) be thecolors of the corresponding sides oft. The octant tilingproblem consists in finding a functionf : O → T suchthat right(f(n,m)) = left(f(n + 1,m)) and, when-ever m < n, up(f(n,m)) = down(f(n,m + 1)). Wereduce the octant tiling problem to the satisfiability prob-lem for MFOP [<, ↓0, ↓1,⊕1] over binary UULSs. LetT = {T1, . . . , Tk} be the set of tile types. We constructa monadic chain formulaϕT such thatT tilesO if and onlyif ϕT is satisfiable over binary UULSs.

The first step is forcing the octant grid over a binaryUULS 〈U , ↓0, ↓1, <〉. The octant grid domain is the setG =

⋃i≥0{(2(i−j) − 1)j | 0 ≤ j ≤ i} ⊂ U . We have that

x ∈ G if and only if x is reachable through a rightmost pathrooted at some point in{0i | i ≥ 0}. The horizontal gridsuccessors0 is such that, for everynr ∈ G, s0(nr) = nr+1,while the vertical grid successors1 is such that, for everynr ∈ G, r > 0, s1(nr) = (2n + 1)r−1. For everynr ∈ G,with r > 0, it holds thats0(s1(nr)) = s1(s0(nr)). We candefine inMFOP [<, ↓0, ↓1,⊕1] a monadic predicategridsuch thatgrid(x) if and only if x belongs to the octant griddomainG. Let Plp, Qgrid ∈ P. For all x, we have thatgrid(x) if and only if

x ∈ Qgrid ∧ 00 ∈ Plp ∧ ∀y((y ∈ Plp →∃z(↓0 (z) = y ∧ z ∈ Plp ∧ ↓1 (z) 6∈ Plp))∧(y 6∈ Plp ∧ ¬T 0(y) →↓0 (y) 6∈ Plp ∧↓1 (y) 6∈ Plp)) ∧ ∀y((y ∈ Plp → y ∈ Qgrid)∧(y ∈ Qgrid ∧ y ∈ Plp ∧ ¬T 0(y) →↓0 (y) ∈ Qgrid ∧ ↓1 (y) ∈ Qgrid)∧(y ∈ Qgrid ∧ y 6∈ Plp ∧ ¬T 0(y) →↓0 (y) 6∈ Qgrid ∧ ↓1 (y) ∈ Qgrid)∧(y 6∈ Qgrid ∧ ¬T 0(y) →↓0 (y) 6∈ Qgrid ∧↓1 (y) 6∈ Qgrid))

Moreover, the horizontal successors0 is⊕1, and the ver-tical successors1 is↓1. We now have to write the tiling con-straints on the grid. To this end, we make use of monadicpredicates in{P1, . . . Pk} ⊂ P corresponding to the tiletypes in{T1, . . . Tk}.

1. Exactly one tile is placed at each node (φ1(x)):

i=k∨

i=1

x ∈ Pi

1≤i<j≤k

¬(x ∈ Pi ∧ x ∈ Pj)

2. Colors match going right (φ2(x)):∨

right(Ti)=left(Tj)

x ∈ Pi ∧ ⊕1(x) ∈ Pj

3. Colors match going up (φ3(x)):

¬T 0(x) →∨

up(Ti)=down(Tj)

x ∈ Pi ∧ ↓1 (x) ∈ Pj

We define

ϕT = ∀x(grid(x) → φ1(x) ∧ φ2(x) ∧ φ3(x)).

It is not difficult to see thatT tilesO if and only if ϕT issatisfiable over binary UULSs. ut

We do not know whether the addition of+1 or T toMFOP [<, (↓i)k−1

i=0 ] produces the same effect. The de-cidability problems for bothMFOP [<, (↓i)k−1

i=0 ,+1] andMFOP [<, (↓i)k−1

i=0 , T ] over UULSs are indeed open. Thefollowing theorem shows that bothMSO[<, (↓i)k−1

i=0 , +1]andMSO[<, (↓i)k−1

i=0 , T ] are undecidable. The proof restson the undecidability of the monadic second-order theoryof UULSs extended with a binary predicateadj such thatadj(x, y) holds if and only ify is theadoptiveson ofx,that is,y is the horizontal successor of the right son ofx.

Theorem 3.2 Both MSO[<, (↓i)k−1i=0 , +1] and MSO[<,

(↓i)k−1i=0 , T ] overk-ary UULSs are undecidable.

Since, from Theorem 3.1 it immediately follows thatMSO[<, (↓i)k−1

i=0 ] extended with either⊕1 or D is unde-cidable, putting together Theorems 3.1 and 3.2 we obtainthe following corollary.

Corollary 3.3 Global predicates cannot be defined inMSO[<, (↓i)k−1

i=0 ] over k-ary UULSs and the extension ofMSO[<, (↓i)k−1

i=0 ] with any global predicate is undecidable.

To complete the picture, we consider the decidabilityproblem for the extensions ofMSO[<, (↓i)k−1

i=0 ] fragmentswith global predicates. Surprisingly, it turns out that the ad-dition of global predicates to the chain fragmentMCL[<,(↓i)k−1

i=0 ] preserves decidability (global predicates are obvi-ouslynotdefinable in such a fragment). More precisely, weprove that bothMCL[<, (↓i)k−1

i=0 , T, +1,⊕1] andMCL[<,(↓i)k−1

i=0 , D, +1,⊕1] can be reduced to the decidable theoryMSO[<] over natural numbers by exploiting two differentencodings. As a matter of fact, we do not know whether thesame holds forMCL[<, (↓i)k−1

i=0 , T, D, +1,⊕1] or not.

Theorem 3.4 MCL[<, (↓i)k−1i=0 , T, +1,⊕1] over k-ary

UULSs is decidable.

Proof. The proof is given fork = 2, and it can be easilyextended to the general case of an arbitraryk. As a prelim-inary result, we prove thatMCL[<, ↓0, ↓1, T, +1,⊕1] →MCL[↓0, ↓1, T,⊕1]. First of all, the horizontal successor+1 is first-order definable in terms ofT and<. Next, we

Theory T +1 D ⊕1MFO Decidable Decidable Decidable DecidableMPL Decidable Decidable Decidable DecidableMCL Decidable Decidable Decidable DecidableMFOP ? ? Undecidable UndecidableMPLP ? ? Undecidable UndecidableMCLP ? ? Undecidable UndecidableMSO = MSOP Undecidable Undecidable Undecidable Undecidable

Table 1. Decidability results for UULSs.

prove that< can be removed. We have thatx < y can bedefined as follows:

x < y = x 6= y ∧ (x ∈ t↓0(y) ∨ y ∈ t↓1(x) ∨∃z(x ∈ t↓0(z) ∧ y ∈ t↓1(z))),

wherey ∈ t↓i(x) stands for ‘y belongs to the tree rooted atthe i-th son ofx’(y ≤P ↓i (x) for short). In its turn, theformulax <P y can be defined as follows:

x <P y = x 6= y ∧ ∃X(dcPath(X) ∧ x ∈ X ∧y ∈ X ∧ ∃z(

∨i∈{0,1} ↓i (z) = x∧

z 6∈ X)),

wheredcPath(X) is theMCL[↓0, ↓1, T,⊕1] formula thatconstrains the chainX to be a downward closed path:

dcPath(X) = ∀x((x ∈ X ∧ x 6∈ T 0) →(↓0 (x) ∈ X ∨ ↓1 (x) ∈ X)).

Finally, it is not difficult to show thatMCL[↓0, ↓1, T,⊕1] isequivalent to a version of chain logic in which only second-order variables occur and atomic formulas are of the formsX1 ⊆ X2 (chainX1 is included in chainX2), Sing(X)(chainX is a singleton),proji(X1, X2) (chainX1 = {x1},chain X2 = {x2} and ↓i (x) = y), equiL(X1, X2)(chainX1 = {x1}, chainX2 = {x2}, andT (x, y)), andvsucc(X1, X2) (chainX1 = {x1}, chainX2 = {x2}, and⊕1(x, y)).

It is possible to prove that every formula of the result-ing chain logic can be encoded into an equi-satisfiable for-mula of the decidable theoryMSO[<], over natural num-bers by induction on the formulas of the chain logic. Theidea, which is partly borrowed from [22], is the following.

Any second-order variableX interpreted as a chain isencoded by a pair of set variablesChX andLvX over thenatural numbers.ChX is interpreted as a set of natural num-bers encoding the leftmost upward unbounded path (startingfrom the first layer) containing the chainX, i.e., i ∈ ChX

if and only if the element of thei-th layer of the mentionedpath is a right-hand side son.LvX is interpreted as a setof natural numbers describing the elements of the path ac-tually belonging to the chain, i.e.,i ∈ LvX if and only if

the element of thei-th layer of the path belongs to the chainX. To guarantee that a chainX corresponds to a uniquepairChX andLvX , we have to use the following conditionunique(ChX , LvX) = ∀y(y ∈ ChX → min(LvX) ≤ y),where min(X) is the minimum of the setX of naturalnumbers with respect to the usual ordering relation<. Asfor atomic formulas,X1 ⊆ X2 is encoded asChX1 ⊆ChX2 ∧ LvX1 ⊆ LvX2 , Sing(X) in encoded as ‘LvX is asingleton’, that is,∃Y (Y ⊆ LvX ∧ LvX 6= Y ∧ ¬∃Z(Z ⊆LvX ∧ Z 6= LvX ∧ Z 6= Y )), proj0(X1, X2) is encodedasChX1 = ChX2 , ‘LvX1 is a singleton{x1}’, ‘ LvX2 isa singleton{x2}’, and x1 = x2 + 1, proj1(X1, X2) isencoded as ‘LvX1 is a singleton{x1}’, ‘ LvX2 is a single-ton {x2}’, x1 = x2 + 1, and ChX1 = ChX2 ∪ {x2}.Moreover, the atomic formulaequiL(X1, X2) is encodedas ‘LvX1 is a singleton{x1}’, ‘ LvX2 is a singleton{x2}’,andx1 = x2, and, finally,vsucc(X1, X2) is encoded as‘LvX1 is a singleton{x1}’, ‘ LvX2 is a singleton{x2}’,x1 = x2 + 1, andChX2 = {n + 1 | n ∈ ChX1}. The in-ductive cases∧ and¬ are trivial. Finally, the second-orderexistentially quantified chain formula∃Xφ(X) is trans-lated into the formula∃ChX∃LvX(unique(ChX , LvX) ∧φτ (ChX , LvX)), whereφτ is the translation ofφ. utTheorem 3.5 MCL[<, (↓i)k−1

i=0 , D,+1,⊕1] over k-aryUULSs is decidable.

Proof. The proof is given fork = 2, and it can be easilyextended to the general case of an arbitraryk. Moreover,since⊕1 is first-order definable in terms ofD, we have thatMCL[<, ↓0, ↓1, D,+1,⊕1] → MCL[<, ↓0, ↓1, D] thus al-lowing us to focus on the decidability of the latter.

We prove the decidability ofMCL[<, ↓0, ↓1, D] by en-coding any formulaφ of MCL[<, ↓0, ↓1, D] into an equi-satisfiable formula ofMSO[<] over natural numbers.

We start by showing the encoding of individual variablesand set variables (interpreted as chains). Any individualvariablex is mapped into a pair of individual variablessx

(shift) andhx (length), and a set variableChx which sat-isfy the constraintPointx = lx ≤ sx ∧ ∀z(z ∈ Chx →0 < z ≤ lx) ∧ (lx > 0 → 1 ∈ Chx). Such a triplet can

SLω(Trellis) ⊆ MSO[<, 2×] = MSO[<, ↓0, ↓1, D]

( ⊆ ⊆

SLω(Y-Trees) ( MSO[<, adj] = MSO[<, ↓0, ↓1, T ]

( ( (

SLω(B-Trees) = MSO[<, flip] = MSO[<, ↓0, ↓1]

Figure 5. Systolic ω-languages and monadic second-order theories.

be viewed as the specification of a point in a UULS as fol-lows: it identifies the point of layersx − lx which can bereached from the point of layersx belonging to the leftmostbranch of the tree by following the path of lengthlx codi-fied inChx (i ∈ Chx if and only if thei-th step of the pathleads from a pointz to the point↓1 (z), and thusi 6∈ Chx

if and only if thei-th step of the path leads from a pointzto the point↓0 (z)). Notice that the points belonging to theleftmost branch of the tree are characterized bylx = 0 andthusChx = ∅.

Any set variableX is mapped into an individual variablesX and three set variablesChX , UpX , andDownX whichsatisfy the constraintChainX = ∀z(z ∈ ChX → 0 < z ≤sX)∧ ∀z(z ∈ DownX → z ≤ sX)∧ ∀z(z ∈ UpX → z >sX) ∧ (sX > 0 → 1 ∈ ChX). Such a tuple determines achain in a UULS as follows:sX andChX identify the fullpath lying on the leftmost branch of the structure until layersX and then following the path specified byChX from thelayer sX to layer 0; UpX (resp. DownX ) identifies thesubset of layers greater than (resp. less than or equal to)sX

to which the elements of the chain belong.On the basis of the given correspondence of variables, we

inductively define the translationτ of MSO[<, ↓0, ↓1, D]formulas intoMSO[<] formulas as follows:

τ(x = y) is Chx = Chy ∧ lx = ly ∧ sx = sy;τ(x < y) is sx < sy ∨ (sx = sy∧

∃k(k ∈ Chy ∧ k 6∈ Chx∧∀k′(k′ < k →(k′ ∈ Chy ↔ k′ ∈ Chx)))∨(ly < lx ∧ ly + 1 6∈ Chx∧∀k(k ∈ Chy → k ∈ Chx∧(k ≤ ly ∧ k ∈ Chx) → k ∈ Chy)));

τ(↓0 (x) = y) is sx ≥ lx + 1 ∧ Chx = Chy∧lx + 1 = ly ∧ sx = sy;

τ(↓1 (x) = y) is sx ≥ lx + 1 ∧ Chx ∪ {lx + 1} =Chy ∧ lx + 1 = ly ∧ sx = sy;

τ(D(x, y)) is Chx = Chy ∧ lx = ly;τ(x ∈ Y ) is (sy < sx ∧ lx = 0 ∧ sx ∈ UpY )∨

(sy = sx ∧ lx ∈ DownY ∧∀z(0 < z ≤ lx →(z ∈ Chx ↔ z ∈ ChY )));

τ(φ ∧ ψ) is τ(φ) ∧ τ(ψ);τ(¬φ) is ¬τ(φ);τ(∃xφ) is ∃Chx, lx, sx(Pointx ∧ τ(φ));

τ(∃Xφ) is ∃ChX , sX , DownX , UpX

(ChainX ∧ τ(φ)).

The equi-satisfiability ofφ andτ(φ) can be easily provedby induction on the structure ofφ. ut

The decidability results for UULSs are summarized inTable 1 (a question mark stands for an open problem).Such results allow us to connect monadic second-order the-ories over binary UULSs (Figure 5, right column) to bothmonadic second-order theories overN+ (Figure 5, middlecolumn) and systolicω-languages over binary trees, Y-trees,and trellis [19, 20] (Figure 5, left column)1. They establisha connection betweenMSO[<, 2×] (resp.MSO[<, adj])overN+ andMSO[<, ↓0, ↓1, D] (resp.MSO[<, ↓0, ↓1, T ])over binary UULSs. Moreover, we have thatMSO[<,↓0, ↓1, T ] is a proper extension ofMSO[<, ↓0, ↓1], and thatit can be embedded intoMSO[<, ↓0, ↓1, D]. One advantageof such a connection is a different and more intuitive char-acterization of Y-treeω-automata: every Y-tree automa-tonA can be associated with anMSO[<, ↓0, ↓1, T ]-formulaϕA interpreted over binary UULSs such that the models ofϕA are, modulo an isomorphism, all and only theω-wordsaccepted byA. The opposite embedding does not hold,since Y-tree automata are not closed under complementa-tion. Similarly, trellisω-automata, whose expressive poweris greater than that ofY -tree automata, can be embeddedinto MSO[<, ↓0, ↓1, D]-formulas. In this case, the oppositeembedding is an open problem interestingly related to theclosure under complementation of the well-known compu-tational complexity class NP [20].

Definability and decidability over n-LSs. In this sectionwe explore definability and decidability of local and globalpredicates with respect to the monadic theories ofn-LSs.We start with thei-th equi-level predicateT i which can beinductively defined as follows:

T 0(x, y) = ¬∃z1(↓ (z1) = x) ∧ ¬∃z2(↓ (z2)= y);

T i+1(x, y) = ∃z1∃z2(T i(z1, z2)∧↓ (z1) = x∧ ↓ (z2) = y),

where↓ (x) = y is a shorthand for∨k−1

j=0 ↓j (x) = y.The equi-level predicateT (x, y) can be defined as∨n−1

i=0 (T i(x, y)). Horizontal successors+i1 and+1 are de-

1A survey on systolic computations can be found in [10].

Theory T +1 D ⊕1MFO Decidable Decidable Decidable DecidableMPL Decidable Decidable Decidable DecidableMCL Decidable Decidable Decidable DecidableMFOP Decidable Decidable ? ?MPLP Decidable Decidable ? ?MCLP Decidable Decidable ? ?MSO = MSOP Decidable Decidable Undecidable Undecidable

Table 2. Decidability results for n-LSs.

finable in terms ofT i andT , respectively. Consider now theequi-column predicateDi. Let+ij(x, y) be a shorthand for(+i1)j(x) = y. Givenw ∈ {0, . . . , k−1}∗, we inductivelydefine↓w (x) as follows: if |w| = 0, then↓w (x) = x, oth-erwise, forw = av, we define↓w (x) =↓a (↓v (x)). Let00 be the first-order definable origin of layer zero.D0(x, y)can be defined as follows:

D0(x, y) =n−1∨

i=0

(↓0i (00) = x) ∧n−1∨

i=0

(↓0i (00) = y).

Then, fori > 0, we defineDi(x, y) as follows:

Di(x, y) =∨n−1

j=0 ∃z(T j(z) ∧ D0(z)∧+ji(z, x)) ∧ ∨n−1

j=0 ∃z(T j(z)∧D0(z) ∧ +ji(z, y)).

The vertical successor predicate⊕i1 can be defined in termsof Di. Since all the above definitions do not exploit second-order quantification, we can conclude that all local predi-cates and the global predicatesT and+1 are definable inMFO[<, (↓i)k−1

i=0 ] overn-LSs.We now turn to the global predicates equi-columnD and

vertical successor⊕1. We show thatD is not definable inMSO[<, ↓0, ↓1] over binary 2-layered structures, and, evenworse, the addition ofD to MSO[<, ↓0, ↓1] yields unde-cidability. SinceD and⊕1 are inter-definable, we have that⊕1 is not definable inMSO[<, ↓0, ↓1] over binary 2-layeredstructures as well, and that its addition yields undecidability.Moreover, it is easy to show thatMSO[<, ↓0, ↓1] over bi-nary 2-layered structures is embedable inMSO[<, (↓i)k−1

i=0 ]over k-ary n-layered structures, and thus all the above re-sults generalize toMSO[<, (↓i)k−1

i=0 ] over k-ary n-layeredstructures. We begin with the following auxiliary lemma.Let us define the predicateD overN as the reflexive andsymmetric closure of the following set:

{(3k,3k + 2

2) | k even} ∪ {(3k,

3k + 12

) | k odd}.

The following lemma proves thatMSO[<] over naturalnumbers cannot be extended with such a predicate preserv-ing decidability.

Lemma 3.6 MSO[<,D] over〈N, <〉 is undecidable.

To prove our thesis, it suffices to show now thatMSO[<,D] overN can be embedded intoMSO[<, ↓0, ↓1, D] overbinary2-LSs.

Theorem 3.7 The predicateD (resp.⊕1) is not definablein MSO[<, (↓i)k−1

i=0 ] overk-ary n-LSs and the extension ofMSO[<, (↓i)k−1

i=0 ] with D (resp.⊕1) is undecidable.

Finally, it is possible to show that the extensions of thechain, path, and first-order fragments ofMSO[<, (↓i)k−1

i=0 ]with the undefinable predicateD are decidable. The de-cidability of MCL[<, (↓)k−1

i=0 , D] is a consequence of The-orem 3.5, sincen-LSs can be easily embedded into UULSs.The decidability of bothMPL[<, (↓)k−1

i=0 , D] andMFO[<,(↓)k−1

i=0 , D] immediately follows. Since⊕1 is first-order de-finable in terms ofD, it follows that the extensions of thechain, path, and first-order fragments ofMSO[<, (↓i)k−1

i=0 ]with ⊕1 are decidable as well. The decidability results forn-layered structures are summarized in Table 2.

Definability and decidability over DULSs. We concludethe paper by exploring definability and decidability issuesfor monadic theories of DULSs. The local predicatesT i

and+i1 can be expressed as in the case ofn-LSs, whilethe definition of the local predicateDi given in the case ofn-LSs does not work anymore since we have to cope withan infinite number of layers. We first defineD0(x, y) as fol-lows:

D0(x, y) = ∃X(x ∈ X ∧ y ∈ X ∧ 00 ∈ X ∧∀z(T 0(z) ∧ z 6= 00 → z 6∈ X)∧∀z((z ∈ X → (↓0 (z) ∈ X ∧∧k−1

i=1 ↓i (z) 6∈ X)) ∧ (z 6∈ X →∧k−1i=0 ↓i (z) 6∈ X))),

where00 is the first-order definable origin of layer zero. Fori > 0, let ankn + . . . + a0k

0 be thek-ary representation ofi. We defineDi(x, y) as follows:

Theory T +1 D ⊕1MFO Decidable Decidable ? ?MPL Decidable Decidable ? ?MCL Decidable Decidable ? ?MFOP ? ? Undecidable UndecidableMPLP Undecidable ? Undecidable UndecidableMCLP Undecidable ? Undecidable UndecidableMSO = MSOP Undecidable Undecidable Undecidable Undecidable

Table 3. Decidability results for DULSs.

Di(x, y) = (∨blogk(i)c

j=0 ∃z(D0(z) ∧ T j(z)∧+ji(z) = x) ∨ ∃z(D0(z)∧↓a0,...,an

(z) = x))∧(∨blogk(i)c

j=0 ∃z(D0(z) ∧ T j(z)∧+ji(z) = y) ∨ ∃z(D0(z)∧↓a0,...,an (z) = y)).

As already shown,⊕i1 can be defined in terms ofDi.Moreover, as in the case of UULSs, second-order quantifi-cation is needed to defineD0 only, and the semantics ofD0

does not change if we interpret the second-order variableXas a path. Hence, both thei-th equi-columnDi and thei-thvertical successor⊕i1 can be encoded inMPL[<, (↓i)k−1

i=0 ],while thei-th equi-levelT i and thei-th horizontal successor+i1 can be encoded inMFO[<, (↓i)k−1

i=0 ].

Let us consider now the global predicates. As in the caseof UULSs, the addition of the vertical predicates⊕1 or Dto MFOP [<, (↓i)k−1

i=0 ] leads to undecidability. The prooftakes advantage of a reduction of theN × N tiling problemto the satisfiability problem forMFOP [<, ↓0, ↓1,⊕1].

Theorem 3.8 BothMFOP [<, (↓i)k−1i=0 , D] andMFOP [<,

(↓i)k−1i=0 ,⊕1] overk-ary DULSs are undecidable.

Proof. We show that both theories are undecidable overbinary infinite trees. Since binary infinite trees are embed-able intok-ary DULSs, we have the thesis. We show thatMFOP [<, ↓0, ↓1,⊕1] over binary infinite trees is undecid-able by embedding theN × N tiling problem into it [2].Since MFOP [<, ↓0, ↓1,⊕1] → MFOP [<, ↓0, ↓1, D], itfollows that MFOP [<, ↓0, ↓1, D] is undecidable as well.TheN × N tiling problem is the problem of establishingwhether, given a finite set of tile typesT , T can tileN×N.For every tile typet ∈ T , let right(t), left(t), up(t),and down(t) be the colors of the corresponding sides oft. TheN × N tiling problem consists in finding a func-tion f : N × N → T such thatright(f(n,m)) =left(f(n+1,m)) andup(f(n,m)) = down(f(n,m+1)).We reduce theN×N tiling problem to the satisfiability prob-lem forMFOP [<, ↓0, ↓1,⊕1] over binary infinite trees. Let

T = {T1, . . . , Tk} be the set of tile types. We construct amonadic chain formulaϕT such thatT tilesN × N if andonly if ϕT is satisfiable over binary infinite trees.

The first step consists in forcing the grid over a binaryinfinite tree〈{0, 1}∗, <〉. The grid is given by the domain{0∗1∗}, the horizontal successors0 is such thats0(x) = x1,and the vertical successors1(x) is such thats1(x) = 0x.For everyx ∈ {0∗1∗}, it holds thats0(s1(x)) = s1(s0(x)).We can define inMFOP [<, ↓0, ↓1,⊕1] a monadic predicategrid such thatgrid(x) if and only if x belongs to the griddomain{0∗1∗}. Notice that{0∗1∗} =

⋃i≥0{0i1∗}, and

thusgrid(x) if and only if x is reachable through a right-most path rooted at some point in{0∗}. LetPlp, Qgrid ∈ P.For everyx, we have thatgrid(x) if and only if

x ∈ Qgrid ∧ ε ∈ Plp ∧∀y((y ∈ Plp →↓0 (y) ∈ Plp ∧ ↓1 (y) 6∈ Plp)∧(y 6∈ Plp →↓0 (y) 6∈ Plp ∧ ↓1 (y) 6∈ Plp))∧∀y((y ∈ Plp → y ∈ Qgrid)∧(y ∈ Qgrid ∧ y ∈ Plp →↓0 (y) ∈ Qgrid ∧ ↓1 (y) ∈ Qgrid)∧(y ∈ Qgrid ∧ y 6∈ Plp →↓0 (y) 6∈ Qgrid ∧ ↓1 (y) ∈ Qgrid)∧(y 6∈ Qgrid →↓0 (y) 6∈ Qgrid ∧ ↓1 (y) 6∈ Qgrid))

Once we have shaped the grid, we can encode the hor-izontal and vertical successors as↓1 and⊕1, respectively,and we can write the tiling constraints on the grid. To thisend, we make use of monadic predicates in{P1, . . . Pk} ⊂P corresponding to the tile types in{T1, . . . Tk}.

1. Exactly one tile is placed at each node (φ1(x)):

i=k∨

i=1

x ∈ Pi

1≤i<j≤k

¬(x ∈ Pi ∧ x ∈ Pj).

2. Colors match going right (φ2(x)):

right(Ti)=left(Tj)

x ∈ Pi ∧ ↓1 (x) ∈ Pj

3. Colors match going up (φ3(x)):

up(Ti)=down(Tj)

x ∈ Pi ∧ ⊕1(x) ∈ Pj .

We define

ϕT = ∀x(grid(x) → φ1(x) ∧ φ2(x) ∧ φ3(x)).

It is not difficult to see thatT tilesN× N if and only if ϕTis satisfiable over binary infinite trees. ut

As a matter of fact, the proof of Theorem 3.8 does not ex-ploit the whole DULS, but only its first tree. It follows thatthe same result holds for binary infinite trees. As for theequi-level predicateT , its addition toMPLP [<, (↓i)k−1

i=0 ]does not preserve decidability. The proof exploits an em-bedding of theN× N tiling problem.

Theorem 3.9 MPLP [<, (↓i)k−1i=0 , T ] over k-ary DULSs is

undecidable.

Unlike the proof of Theorem 3.8, the proof of Theo-rem 3.9 involves the whole DULS. We do not know whetherthe addition of the horizontal successor+1 to MPLP [<,(↓i)k−1

i=0 ] has the same effect. However, sinceT and+1 areinter-definable in the monadic second-order theory, it fol-lows thatMSO[<, (↓i)k−1

i=0 ,+1] is undecidable. Summingup, we have the following corollary.

Corollary 3.10 Global predicates cannot be defined inMSO[<, (↓i)k−1

i=0 ] over k-ary DULSs and the extension ofMSO[<, (↓i)k−1

i=0 ] with any global predicate is undecidable.

The only positive result is the following one, whoseproof is similar to that of Theorem 3.4.

Theorem 3.11 MCL[<, (↓i)k−1i=0 , T, +1] over k-ary

DULSs is decidable.

The decidability results for DULSs are summarized inTable 3.

References

[1] C. Bettini, S. Jajodia, and X. Wang.Time Granulari-ties in Databases, Data Mining, and Temporal Reasoning.Springer, 2000.

[2] E. Borger, E. Gradel, and Y. Gurevich.The Classical Deci-sion Problem. Springer Verlag, Berlin, 1997.

[3] C.C. Elgot and M.O. Rabin. Decidability and undecidabil-ity of second (first) order theory of generalized successor.Journal of Symbolic Logic, 31:169–181, 1966.

[4] C. Dyreson and R. Snodgrass. Temporal granularity. In R. T.Snodgrass, editor,The TSQL2 Temporal Query Language,pages 347–385. Kluwer Academic Press, 1995.

[5] J. Fiadeiro and T. Maibaum. Sometimes “tomorrow” is“sometimes” - action refinement in a temporal logic of ob-jects. InProc. 1st International Conference on TemporalLogic - ICTL’94, LNAI 827, pages 48–66. Springer, 1994.

[6] M. Franceschet.Dividing and conquering the layered land.PhD thesis, Department of Mathematics and Computer Sci-ence, University of Udine, Italy, 2001.

[7] M. Franceschet and A. Montanari. Branching within time:an expressively complete and elementarily decidable tem-poral logic for time granularity.Research on Language andComputation, 1(2), 2002.

[8] M. Franceschet, A. Montanari, and M. de Rijke. Modelchecking for combined logics. InProceedings of the 3rdInternational Conference on Temporal Logic (ICTL), pages65–73, 2000.

[9] M. Franceschet, A. Montanari, A. Peron, and G. Sciavicco.Definability and decidability of binary predicates for timegranularity. Technical Report RR02/02, Dipartimento diMatematica ed Informatica, Universita di Udine, 2002.

[10] J. Gruska. Synthesis, structure and power of systolic compu-tations.Theoretical Computer Science, 71(1):47–77, 1990.

[11] D. Harel. Effective transformations on infinite trees, withapplications to high undecidability, dominoes, and fairness.Journal of the ACM, 33(1):224–248, 1986.

[12] P. Ladkin. Time representation: a taxonomy of interval rela-tions. InProc. of American Association of Artificial Intelli-gence - AAAI’86, pages 360–366, 1986.

[13] L. Lamport. On interprocess communication. Technical Re-port 8, SRC, Palo Alto, CA, 1985.

[14] H. Lauchli and C. Savoiz. Monadic second-order definablerelations on the binary tree.Journal of Symbolic Logic,52:219–226, 1987.

[15] A. Montanari.Metric and Layered Temporal Logic for TimeGranularity. ILLC Dissertation Series 1996-02, ILLC, Uni-versity of Amsterdam, 1996.

[16] A. Montanari, A. Peron, and A. Policriti. Decidable theoriesof ω-layered metric temporal structures.Logic Journal ofthe IGPL, 7(1):79–102, 1999.

[17] A. Montanari, A. Peron, and A. Policriti. Extending Kamp’stheorem to model time granularity.Journal of Logic andComputation, 12(4):641–678, 2002.

[18] A. Montanari and A. Policriti. Decidability results for metricand layered temporal logics.Notre Dame Journal of FormalLogic, 37(2):260–282, 1996.

[19] A. Monti and A. Peron. Systolic treeω-languages: The oper-ational and the logical view.Theoretical Computer Science,23:1–17, 2000.

[20] A. Monti and A. Peron. Logical definability of y-tree andtrellis systolicω-languages.Acta Cybernetica, 15:75–100,2001.

[21] W. Thomas. Automata on infinite objects. In J. vanLeeuwen, editor,Handbook of Theoretical Computer Sci-ence, Vol. B, pages 133–191. Elsevier Science Publishers,1990.

[22] W. Thomas. Infinite trees and automaton definable relationsoverω-words. InProc. of the 7th Annual Symposium on The-oretical Aspects of Computer Science (STACS), pages 263–277. Springer, 1990.