D. Gabelaia, R. Kontchakov, A. Kurucz, F. Wolter and M. Zakharyaschev
Volume 23, 2005
Links to Full Text:
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity
Journal of Artiï¬cial Intelligence Research 23 (2005) 167-243 Submitted 07/04; published 02/05 Combining Spatial and Temporal Logics: Expressiveness vs. Complexity David Gabelaia gabelaia@dcs.kcl.ac.uk Roman Kontchakov romanvk@dcs.kcl.ac.uk Agi Kurucz kuag@dcs.kcl.ac.uk Department of Computer Science, Kingâs College LondonStrand, London WC2R 2LS, U.K. Frank Wolter frank@csc.liv.ac.uk Department of Computer Science, University of LiverpoolLiverpool L69 7ZF, U.K. Michael Zakharyaschev mz@dcs.kcl.ac.uk Department of Computer Science, Kingâs College London Strand, London WC2R 2LS, U.K. Abstract In this paper, we construct and investigate a hierarchy of spatio-temporal formalisms that result from various combinations of propositional spatial and temporal logics such asthe propositional temporal logic PT L, the spatial logics RCC-8, BRCC-8, S4u and theirfragments. The obtained results give a clear picture of the trade-oï¬ between expressivenessand âcomputational realisabilityâ within the hierarchy. We demonstrate how diï¬erent com-bining principles as well as spatial and temporal primitives can produce NP-, PSPACE-,EXPSPACE-, 2EXPSPACE-complete, and even undecidable spatio-temporal logics out ofcomponents that are at most NP- or PSPACE-complete. 1. Introduction Qualitative representation and reasoning has been quite successful in dealing with bothtime and space. There exists a wide spectrum of temporal logics (see, e.g., Allen, 1983;Clarke & Emerson, 1981; Manna & Pnueli, 1992; Gabbay, Hodkinson, & Reynolds, 1994;van Benthem, 1995). There is a variety of spatial formalisms (e.g., Clarke, 1981; Egenhofer& Franzosa, 1991; Randell, Cui, & Cohn, 1992; Asher & Vieu, 1995; Lemon & Pratt,1998). In both cases determining the computational complexity of the respective reasoningproblems has been one of the most important research issues. For example, Renz and Nebel(1999) analysed the complexity of RCC-8, a fragment of the region connection calculus RCCwith eight jointly exhaustive and pairwise disjoint base relations between spatial regionsintroduced by Egenhofer and Franzosa (1991) and Randell and his colleagues (1992); Nebeland B¨ urckert (1995) investigated the complexity of Allenâs interval algebra; numerous results on the computational complexity of the point-based propositional linear temporal logic PT Lover various ï¬ows of time were obtained by Sistla and Clarke (1985) and Reynolds (2003,2004). In many cases these investigations resulted in the development and implementationof eï¬ective reasoning algorithms (see, e.g., Wolper, 1985; Smith & Park, 1992; Egenhofer& Sharma, 1993; Schwendimann, 1998; Fisher, Dixon, & Peim, 2001; Renz & Nebel, 2001;Hustadt & Konev, 2003). c 2005 AI Access Foundation. All rights reserved.
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev . space X X X X X . F E 0 1 2 3 time Figure 1: Topological temporal model. The next apparent and natural step is to combine these two kinds of reasoning. Of course, there have been attempts to construct spatio-temporal hybrids. For example, theintended interpretation of Clarkeâs (1981, 1985) region-based calculus was spatio-temporal.Region connection calculus RCC (Randell et al., 1992) contained a function space(X, t)for representing the space occupied by object X at moment of time t. Muller (1998a)developed a ï¬rst-order theory for reasoning about motion of spatial entities. However, allof these formalisms turn out to be âtoo expressiveâ from the computational point of view:they are undecidable. Moreover, as far as we know, no serious attempts to investigate andimplement partial (say, incomplete) algorithms capable of spatio-temporal reasoning withthese logics have been made. The problem of constructing spatio-temporal logics with better algorithmic proper- ties and analysing their computational complexity was ï¬rst attacked by Wolter and Za-kharyaschev (2000b); see also the âpopularâ and extended version (Wolter & Zakharyaschev,2002) of that conference paper, as well as (Bennett & Cohn, 1999; Bennett, Cohn, Wolter,& Zakharyschev, 2002; Gerevini & Nebel, 2002). The main idea underlying all these papers is to consider various combinations of âwell- behavedâ spatial and temporal logics. The intended spatio-temporal structures can be regarded then as the Cartesian products of the intended time-line and topological (or someother) spaces that are used to model the spatial dimension. Figure 1 shows such a product(of the ï¬ow of time F = N, < and the two-dimensional Euclidean space T) with a movingspatial object X. The moving object can be viewed either as a 3D spatio-temporal entity(in this particular case) or as the collection of the âsnapshotsâ or slices of this entity at eachmoment of time; for a discussion see, e.g., (Muller, 1998b) and references therein. In thispaper, we use the snapshot terminology and understand by a moving spatial object (or,more precisely, interpret such an object as) any set of pairs X, t where, for each point t 168
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity of the ï¬ow of time, X is a subset of the topological spaceâthe state of the spatial object atmoment t. The expressive power (and consequently the computational complexity) of the combined spatio-temporal formalisms obviously depends on three parameters: 1. the expressivity of the spatial component, 2. the expressivity of the temporal component, and 3. the interaction between the two components allowed in the combined logic. Regardless of the chosen component languages, the minimal requirement for a spatio-temporal combination to be useful is its ability to express changes in time of the truth-values of purely spatial propositions. (PC) Typical examples of logics meeting this spatial propositionsâ truth change principle are thecombinations of RCC-8 and Allenâs interval calculus (Bennett et al., 2002; Gerevini & Nebel,2002) and those combinations of RCC-8 and PT L introduced by Wolter and Zakharyaschev(2000b) that allow applications of temporal operators to Boolean combinations of RCC-8 re-lations. Languages satisfying (PC) can capture, for instance, some aspects of the continuityof change principle (see, e.g., Cohn, 1997) such as (A) if two images on the computer screen are disconnected now, then they either remain disconnected or become externally connected in one quantum of the computerâs time. Another example is the following statement about the geography of Europe: (B) Kaliningrad is disconnected from the EU until the moment when Poland becomes a tangential proper part of the EU, after which Kaliningrad and the EU will beexternally connected forever. However, languages meeting (PC) do not necessarily satisfy our second fundamental spatial object change principle according to which we should be able to express changes or evolutions of spatial objects in time. (OC) In logical terms, (PC) refers to the change of truth-values of propositions, while (OC) tothe change of extensions of predicates; see Fig. 2 where X at moment t denotes the state of X at moment t + 1. Here are some examples motivating (OC): (C) Continuity of change: âthe cycloneâs current position overlaps its position in an hour.â (D) Two physical objects cannot occupy the same space: âif tomorrow object X is at the place where object Y is today, then Y will have to move by tomorrow.â (E) Geographic regions change: âthe space occupied by Europe never changes.â (F) Geographic regions change: âin two years the EU will be extended with Romania and Bulgaria.â (G) Fairness conditions on regions: âit will be raining over every part of England ever and ever again.â 169
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev . X space X X X X T T T . F E t t + 1 t + 2 time Figure 2: Temporal operators on regions. (H) Mutual exclusion: âif Earth consists of water and land, and the space occupied by water expands, then the space occupied by land shrinks.â It should be clear that to represent these statements we have to refer to the evolution ofspatial objects in time (say, to compare objects X and X)âit is not enough to only take into account the change of the truth-values of propositions speaking about spatial objects. The main aim of this paper is to investigate the trade-oï¬ between the expressive power and the computational behaviour of spatio-temporal hybrids satisfying the (PC) and (OC)principles and interpreted in various spatio-temporal structures. Our purpose is to showwhat computational obstacles one can expect if the application domain requires this or thatkind of interactions between temporal and spatial operators. The spatio-temporal logics we consider below are combinations of fragments of PT L interpreted over diï¬erent ï¬ows of time with fragments of the propositional spatial logic S4u(equipped with the interior and closure operators, the universal and existential quantiï¬ersover points in space as well as the Booleans) interpreted in topological spaces. This choiceis motivated by the following reasons: ⢠The component logics are well understood and established in temporal and spatial knowledge representation; all of them are supported by reasonably eï¬ective reasoningprocedures. ⢠By deï¬nition, implicit or explicit temporal quantiï¬cation is necessary to capture (OC), and fragments of PT L are the weakest languages with such quantiï¬cation we know of. 170
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Allenâs interval calculus, for example, does not provide means for any quantiï¬cationover intervals. It is certainly suitable for spatio-temporal hybrids satisfying (PC) (seeBennett et al., 2002; Gerevini & Nebel, 2002) but there is no natural conservativeway of combining it with spatial formalisms to meet (OC). On the other hand, it isembedded in PT L (Blackburn, 1992). A natural alternative to PT L would be theextension of Allenâs calculus by means of quantiï¬cation over intervals introduced byHalpern and Shoham (1986), but unfortunately this temporal logic turns out to behighly undecidable. ⢠Although the logic S4u was originally introduced in the realm of modal logic (see below for details), the work of Bennett (1994), Nutt (1999), Renz (2002) and Wolterand Zakharyaschev (2000a) showed that it can be regarded as a unifying languagethat contains many spatial formalisms like RCC-8, BRCC-8 or the 9-intersections ofEgenhofer and Herring (1991) as fragments. Apart from the choice of component languages and the level of their interaction, the ex- pressive power and the computational complexity of spatio-temporal logics strongly dependon the restrictions we may want to impose on the intended spatio-temporal structures andthe interpretations of spatial objects. ⢠We can choose among diï¬erent ï¬ows of time (say, discrete or dense, inï¬nite or ï¬nite) ⢠and among diï¬erent topological spaces (say, arbitrary, Euclidean or Aleksandrov). ⢠At each time point we can interpret spatial objects as arbitrary subsets of the topo- logical space, as regular closed (or open) ones, as polygons, etc. ⢠To represent the assumption that everything eventually comes to an end, we only do not know when, one can restrict the class of intended models by imposing theï¬nite change assumption which states that no spatial object can change its spatialconï¬guration inï¬nitely often, or the more âliberalâ ï¬nite state assumption accordingto which every spatial object can have only ï¬nitely many possible states (although itmay change its states inï¬nitely often). The paper is organised as follows. In Section 2 we introduce in full detail the component spatial and temporal logics to be combined later on. In particular, besides the standardspatial logics like RCC-8 or the 9-intersections of Egenhofer and Herring (1991), we considertheir generalisations in the framework of S4u and investigate the computational complex-ity. For example, we show that the maximal fragment of S4u dealing with regular closedspatial objects turns out to be PSPACE-complete, while a natural generalisation of the9-intersections is still in NP. In Section 3 we introduce a hierarchy of spatio-temporal logicsoutlined above, provide them with a topological-temporal semantics, and analyse their com-putational properties. First we show that spatio-temporal logics satisfying only the (PC)principle are not more complex than their components. Then we consider âmaximalâ com-binations of S4u with (fragments of) PT L meeting both (PC) and (OC) and see that thisstraightforward approach does not work: the resulting logics turn out to be undecidable.Finally, we systematically investigate the trade-oï¬ between expressivity and complexity ofspatio-temporal formalisms and construct a hierarchy of decidable logics satisfying (PC) 171
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev and (OC) whose complexity ranges from PSPACE to 2EXPSPACE. These and other res-ults, possible implementations as well as open problems are discussed in Section 4. For thereaderâs convenience most important (un)decidability and complexity results obtained inthis paper are summarised in Table 1 on page 193. All technical deï¬nitions and detailedproofs can be found in the appendices. 2. Propositional Logics of Space and Time We begin by introducing and discussing the spatial and the temporal formalisms we aregoing to combine later on in this paper. 2.1 Logics of Space We will be dealing with a number of logics suitable for qualitative spatial representationand reasoning: the well-known RCC-8, BRCC-8 and S4u, as well as certain fragments of thelast one. The intended interpretations for all of these logics are topological spaces. A topological space is a pair T = U, I in which U is a nonempty set, the universe of the space, and I is the interior operator on U satisfying the standard Kuratowski axioms:for all X, Y â U , I(X â© Y ) = IX â© IY, IX â IIX, IX â X and IU = U. The operator dual to I is called the closure operator and denoted by C: for every X â U ,we have CX = U â I(U â X). Thus, IX is the interior of a set X, while CX is its closure.X is called open if X = IX and closed if X = CX. The complement of an open set isclosed and vice versa. The boundary of a set X â U is deï¬ned as CX â IX. Note that Xand U â X have the same boundary. 2.1.1 S4u Our most expressive spatial formalism is S4uâi.e., the propositional modal logic S4 ex-tended with the universal modalities. The âpedigreeâ of this logic is quite unusual. S4 wasintroduced independently by Orlov (1928), Lewis (in Lewis & Langford, 1932), and G¨ odel (1933) without any intention to reason about space. Orlov and G¨ odel understood it as a logic of âprovabilityâ (in order to provide a classical interpretation for the intuitionisticlogic of Brouwer and Heyting) and Lewis as a logic of necessity and possibility, that is, asa modal logic. Besides the Boolean connectives and propositional variables, the language ofS4 contains two modal operators: I (it is necessary or provable) and C, the dual of I (it ispossible or consistent). In other words, the formulas of S4 can be deï¬ned as follows: Ï ::= p | Ï | Ï1 Ï2 | IÏ, (1) where the p are variables. Set CÏ = IÏ . We denote the modal operators by I and C(rather than the conventional 2 and 3) because we understand, following an observationmade by several logicians in the late thirties and early forties (Stone, 1937; Tarski, 1938;Tsao Chen, 1938; McKinsey, 1941), S4 as a logic of topological spaces: if we interpret thepropositional variables as subsets of a topological space, the Booleans as the standard set-theoretic operations, and I and C as, respectively, the interior and the closure operators 172
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity on the space, then an S4-formula is modally consistent if and only if it is satisï¬able in atopological spaceâi.e., its value is not empty under some interpretation.1 More precisely, a topological model is a pair of the form M = T, U , where T = U, I is a topological space and U, a valuation, is a map associating with every variable p a setU(p) â U . Then the valuation U is inductively extended to arbitrary S4-formulas by taking: U(Ï ) = U â U(Ï ), U(Ï1 Ï2) = U(Ï1) â© U(Ï2), U(IÏ ) = IU(Ï ). Expressions Ï of the form (1) are interpreted as subsets of topological spaces; that is why wewill call them spatial terms. In particular, propositional variables of S4 will be understoodas spatial variables. The language of S4u extends S4 with the universal and the existential quantiï¬ers 2 â and 3 â , respectively (known in modal logic as the universal modalities ). Given a spatial term Ï , we write 3 â Ï to say that the part of space (represented by) Ï is not empty (there is at least one point in Ï ); 2 â Ï means that Ï occupies the whole space (all points belong to Ï ). By taking Boolean combinations of such expressions we arrive at what will be called spatialformulas. A BNF deï¬nition looks as follows:2 Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2, where the Ï are spatial terms. Set 3 â Ï = ¬2 â Ï . Spatial formulas can be either true or false in topological models. The truth-relation M |= Ïâa spatial formula Ï is true in a topologicalmodel Mâis deï¬ned in the standard way: ⢠M |= 2âÏ iï¬ U(Ï ) = U , ⢠M |= Â¬Ï iï¬ M |= Ï, ⢠M |= Ï1 â§ Ï2 iï¬ M |= Ï1 and M |= Ï2. Say that a spatial formula Ï is satisï¬able if there is a topological model M such that M |= Ï. The seemingly simple âquery languageâ S4u can express rather complex relations between sets in topological spaces. For example, the formula 2â(q p) â§ 2 â (p Cq) â§ 3 â p ⧠¬3 â Iq says that a set q is dense in a nonempty set p, but has no interior (here Ï1 Ï2 is an abbreviation for Ï1 Ï2). The following âfolkloreâ complexity result has been proved in diï¬erent settings (see, e.g., Nutt, 1999; Areces, Blackburn, & Marx, 2000): Theorem 2.1. (i) S4u enjoys the exponential ï¬nite model property; i.e., every satisï¬ablespatial formula Ï is satisï¬able in a topological space whose size is at most exponential inthe size of Ï. (ii) Satisï¬ability of spatial formulas in topological models is PSPACE-complete. 1. Moreover, according to McKinsey (1941) and McKinsey and Tarski (1944), any n-dimensional Euclidean space, for n ⥠1, is enough to satisfy all consistent S4-formulas. 2. Formally, the language of S4u as deï¬ned above is weaker than the standard one, say, that of Goranko and Passy (1992). However, one can easily show that they have precisely the same expressive power:see, e.g., (Hughes & Cresswell, 1996) or (Aiello & van Benthem, 2002b). 173
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev One way of proving this theorem is ï¬rst to observe that every satisï¬able spatial formula is satisï¬ed in an Aleksandrov model, i.e., a model based on an Aleksandrov topologicalspaceâalias a standard Kripke frame for S4 (see, e.g., McKinsey & Tarski, 1944; Goranko& Passy, 1992). We remind the reader that a topological space is called an Aleksandrov space (Alexan- droï¬, 1937) if arbitrary (not only ï¬nite) intersections of open sets are open. A Kripke frame(or simply a frame) for S4 is a pair the form G = V, R , where V is a nonempty set andR a transitive and reï¬exive relation (i.e., a quasi-order ) on V . Every such frame G inducesthe interior operator IG on V : for every X â V , IGX = x â X | ây â V (xRy â y â X). In other words, the open sets of the topological space TG = V, IG are the upward closed(or R-closed ) subsets of V . The minimal neighbourhood of a point x in TG (that is theminimal open set to contain x) consists of all those points that are R-accessible from x. Itis well-known (see, e.g., Bourbaki, 1966) that TG is an Aleksandrov space and, conversely,every Aleksandrov space is induced by a quasi-order. Now, to complete the proof, it suï¬ces to recall that S4 is PSPACE-hard (Ladner, 1977) and use, say, the standard tableau technique to establish the exponential ï¬nite modelproperty and construct a PSPACE satisï¬ability checking algorithm for spatial formulas. Although being of the same computational complexity as S4, the logic S4u is more expressive. A standard example is that spatial formulas can distinguish between arbitraryand connected3 topological spaces. Consider, for instance, the formula 2â(Cp p) â§ 2 â (p Ip) â§ 3 â p ⧠¬2 â p (2) saying that p is both closed and open, nonempty and does not coincide with the whole space.It can be satisï¬ed only in a model whose underlying topological space is not connected, whileall satisï¬able S4-formulas are satisï¬ed in connected (e.g., Euclidean) spaces. Another example illustrating the expressive power of S4u is the formula 3âp â§ 2â(p Cp) â§ 2 â (p Cp) (3) deï¬ning a nonempty set p such that both p and p have empty interiors. In fact, the secondand the third conjuncts say that p and p consist of boundary points only. 2.1.2 RCC-8 as a Fragment of S4u In qualitative spatial representation and reasoning, it is quite often assumed that spatialterms can only be interpreted by regular closed (or open) sets of topological spaces (see,e.g., Davis, 1990; Asher & Vieu, 1995; Gotts, 1996). One of the reasons for imposing thisrestriction is to exclude from consideration such âpathologicalâ sets as p in (3). Recall that aset X is regular closed if X = CIX, which clearly does not hold for any set p satisfying (3).Another reason is to ensure that the space occupied by a physical body is homogeneousin the sense that it does not contain parts of âdiï¬erent dimensionality.â For example, the 3. We remind the reader that a topological space is connected if its universe cannot be represented as the union of two disjoint nonempty open sets. 174
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity . X IX CIX . Figure 3: Regular closure. subset X of the Euclidean plane in Fig. 3 consists of three parts: a 2D ellipse with a hole, a2D circle, and a 1D curve connecting them. This curve disappears if we form the set CIX,which is regular closed because CICIX = CIX, for every X and every topological space. In this paper, we will consider several fragments of S4u dealing with regular closed sets. From now on we will call such sets regions. Perhaps, the best known language devisedfor speaking about regions is RCC-8 which was introduced in the area of GeographicalInformation Systems (see Egenhofer & Franzosa, 1991; Smith & Park, 1992) and as adecidable subset of Region Connection Calculus RCC (Randell et al., 1992). The syntax ofRCC-8 contains eight binary predicates, ⢠DC(X, Y ) â regions X and Y are disconnected, ⢠EC(X, Y ) â X and Y are externally connected, ⢠EQ(X, Y ) â X and Y are equal, ⢠PO(X, Y ) â X and Y partially overlap, ⢠TPP(X, Y ) â X is a tangential proper part of Y , ⢠NTPP(X, Y ) â X is a nontangential proper part of Y , ⢠the inverses of the last twoâTPPi(X, Y ) and NTPPi(X, Y ), which can be combined using the Boolean connectives. For example, given a spatial databasedescribing the geography of Europe, we can query whether the United Kingdom and theRepublic of Ireland share a common border. The answer can be found by checking whetherthe RCC-8 formula EC(UK, RoI) follows from the database. The arguments of the RCC-8 predicates are called region variables; they are interpreted by regular closed setsâi.e., regionsâof topological spaces. The satisï¬ability problem forRCC-8 formulas under such interpretations is NP-complete (Renz & Nebel, 1999). The expressive power of RCC-8 is rather limited. It only operates with âsimpleâ re- gions and does not distinguish between connected and disconnected ones, regions with andwithout holes, etc. (Egenhofer & Herring, 1991). Nor can RCC-8 represent complex rela-tions between more than two regions. Consider, for example, three countries (say, Russia,Lithuania and Poland) such that not only each one of them is adjacent to the others, butthere is a point where all the three meet. To express this fact we may need a ternarypredicate like EC3(Russia, Lithuania, Poland). (4) 175
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev To analyse possible ways of extending the expressive power of RCC-8, it will be conveni- ent to view it as a fragment of S4u (that RCC-8 can be embedded into S4u was ï¬rst shownby Bennett, 1994). Observe ï¬rst that, for every spatial variable p, the spatial term CIp (5) is interpreted as a regular closed set in every topological model. So, with every regionvariable X of RCC-8 we can associate the spatial term X = CIpX , where pX is a spatialvariable, and then translate the RCC-8 predicates into spatial formulas by taking: EC(X, Y ) = 3 â ( X Y ) ⧠¬3 â (I X I Y ), DC(X, Y ) = ¬3 â ( X Y ), EQ(X, Y ) = 2 â ( X Y ) â§ 2 â ( Y X ), PO(X, Y ) = 3 â (I X I Y ) ⧠¬2 â ( X Y ) ⧠¬2 â ( Y X ), TPP(X, Y ) = 2 â ( X Y ) ⧠¬2 â ( Y X ) ⧠¬2 â ( X I Y ), NTPP(X, Y ) = 2 â ( X I Y ) ⧠¬2 â ( Y X ) (TPPi and NTPPi are the mirror images of TPP and NTPP, respectively). The ï¬rst of theseformulas, for instance, says that two regions are externally connected iï¬ the intersection ofthe regions is not empty, whereas the intersection of their interiors is. It should be clearthat an RCC-8 formula is satisï¬able in a topological space if and only if its translation intoS4u deï¬ned above is satisï¬able in a topological model. This translation also shows that in RCC-8 any two regions can be related in terms of truth/falsity of atomic spatial formulas of the form 2â( 1 2), 2â(I 1 I 2), 2â( 1 2) and 2â( 1 I 2), where 1 and 2 are spatial terms of the form (5). For example, the ï¬rst of these formulassays that the intersection of two regions is empty, whereas the last one states that one regionis contained in the interior of another one. In other words, RCC-8 can be regarded as partof the following fragment of S4u: ::= CIp, Ï ::= 1 2 | I 1 I 2 | 1 2 | 1 I 2, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2. Here we distinguish between two types of spatial terms. Those of the form will be called atomic region termsâthey represent the (regular closed) regions we want to compare.Spatial terms of the form Ï are used to relate regions to each other (note that their extensionsare not necessarily regular closed). Actually, the fragment introduced above is a bit more expressive than RCC-8: for ex- ample, it contains (appropriately modiï¬ed) formula (2) which can be satisï¬ed only in dis-connected topological spaces, while all satisï¬able RCC-8 formulas are satisï¬able in anyEuclidean space (Renz, 1998). However, it will be convenient for us not to distinguishbetween these two spatial logics. First, it will turn out that the same technical results re-garding their computational complexity hold for them even when combined with temporal 176
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity logics. And second, the more intuitive and concise language of RCC-8 is more suitable forillustrations. For instance, we do not distinguish between the region variable X and theregion term X and use DC( 1, 2) as an abbreviation for ¬3 â ( 1 2). The deï¬nition above suggests two ways of increasing the expressive power of RCC-8 (while keeping all regions regular closed): (i) by allowing more complex region terms , and (ii) by allowing more ways of relating them (i.e., more complex terms Ï ). 2.1.3 BRCC-8 as a Fragment of S4u The language BRCC-8 of Wolter and Zakharyaschev (2000a) (see also Balbiani, Tinchev, &Vakarelov, 2004) extends RCC-8 in direction (i). It uses the same eight binary predicatesas RCC-8 and allows not only atomic regions but also their intersections, unions and com-plements. For instance, in BRCC-8 we can express the fact that a region (say, the SwissAlps) is the intersection of two other regions (Switzerland and the Alps in this case): EQ(SwissAlps, Switzerland Alps). (6) We can embed BRCC-8 to S4u by using almost the same translation as in the case of RCC-8.The only diï¬erence is that now, since Boolean combinations of regular closed sets are notnecessarily regular closed, we should preï¬x compound spatial terms with CI. This way wecan obtain, for example, the spatial term CI (Switzerland Alps) representing the Swiss Alps. In the same manner we can treat other set-theoretic operations,which leads us to the following deï¬nition of Boolean region terms: ::= CIp | CI | CI( 1 2). In other words, Boolean region terms denote precisely the members of the well-knownBoolean algebra of regular closed sets. (The union is expressible via intersection and complement in the usual way.) To simplify notation, given a spatial term Ï , we write Ïto denote the result of preï¬xing CI to every subterm of Ï ; in particular, p = CIp, Ï = CI Ï and Ï1 Ï2 = CI( Ï1 Ï2 ). Note that Ï is (equivalent to) a Boolean region term, for every spatial term Ï . Now the Swiss Alps from the example above can be represented as Switzerland Alps . It is of interest to note that Boolean region terms do not increase the complexity of reasoning in arbitrary topological models: the satisï¬ability problem for BRCC-8 formulas isstill NP-complete (however, it becomes PSPACE-complete if all intended models are basedon connected spaces). On the other hand, BRCC-8 allows some restricted comparisons ofmore than two regions as, e.g., in (6). Nevertheless, as we shall see below, ternary relationslike (4) are still unavailable in BRCC-8: they require diï¬erent ways of comparing regions;cf. (ii). 177
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev 2.1.4 RC Egenhofer and Herring (1991) proposed to relate any two regions in terms of the 9-inter-sectionsâ3Ã3-matrix specifying emptiness/nonemptiness of all (nine) possible intersectionsof the interiors, boundaries and exteriors of the regions. Recall that, for a region X, thesethree disjoint parts of the space U, I can be represented as IX, X â© (U â IX) and U â X, respectively. By generalising this approach to any ï¬nite number of regions, we obtain thefollowing fragment RC of S4u: ::= Boolean region terms, Ï ::= | I | Ï | Ï1 Ï2, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2. In other words, in RC we can deï¬ne relations between regions in terms of emptiness/non-emptiness of sets formed by using arbitrary set-theoretic operations on regions and theirinteriors. However, nested applications of the topological operators are not allowed (anexample where such applications are required can be found in the next section). Clearly, both RCC-8 and BRCC-8 are fragments of RC. Moreover, unlike BRCC-8, the language of RC allows us to consider more complex relations between regions. For instance,the ternary relation required in (4) can now be deï¬ned as follows: EC3(X, Y, Z) = 3 â ( X Y Z ) ⧠¬3 â (I X I Y ) ⧠¬3 â (I Y I Z) ⧠¬3 â (I Z I X ). Another, more abstract, example is the formula 3â 1 · · · i â§ I i+1 · · · I j j+1 · · · k I k+1 · · · I n which says that regions 1, . . . , i meet somewhere inside the region occupied jointly by all i+1, . . . , j , but outside the regions j+1, . . . , k and not inside k+1, . . . , n. Although RC is more expressive than both RCC-8 and BRCC-8, reasoning in this lan- guage is still of the same computational complexity: Theorem 2.2. The satisï¬ability problem for RC-formulas in arbitrary topological modelsis NP-complete. This result will be proved in Appendix A. Lemma A.1 shows that every satisï¬able RC- formula can be satisï¬ed in a model based on the Aleksandrov space that is induced by adisjoint union of n-broomsâi.e., quasi-orders of the form depicted in Fig. 4. Topologicalspaces of this kind have a rather primitive structure satisfying the following property: (rc) only the roots of n-brooms can be boundary points, and the minimal neighbourhood of every boundary pointâi.e., the n-broom containing this pointâmust contain atleast one internal point and at least one external point. 178
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity     depth 0 r  ¨ B r t  0 ¨ r ¨ t r ¨ r t r  ¨ ¨ depth 1 Figure 4: n-broom (for n = 4). For example, spatial formula (3) cannot be satisï¬ed in a model with this property, and soit is not in RC. By Lemma A.2, the size of such a satisfying model is polynomial (in fact, quadratical) in the length of the input RC-formula, and so we have a nondeterministic polynomial timealgorithm. Actually, the proof is a straightforward generalisation of the complexity prooffor BRCC-8 given by Wolter and Zakharyaschev (2000a): the only diï¬erence is that in thecase of BRCC-8 it is suï¬cient to consider only 2-brooms (which were called forks). Thismeans, in particular, that ternary relation (4)âwhich is satisï¬able only in a model with ann-broom, for n ⥠3âis indeed not expressible in BRCC-8. Remark 2.3. In topological terms, n-brooms are examples of so-called door spaces whereevery subset is either open or closed. However, the modal theory of n-brooms deï¬nes awider and more interesting topological class known as submaximal spaces in which everydense subset is open. Submaximal spaces have been around since the early 1960s and havegenerated interesting and challenging problems in topology. For a survey and a systematicstudy of these spaces see (Arhangelâskii & Collins, 1995) and references therein. 2.1.5 RCmax One could go even further in direction (ii) and impose no restrictions whatsoever on theways of relating Boolean region terms. This leads us to the maximal fragment RCmax ofS4u in which spatial terms are interpreted by regular closed sets. Its syntax is deï¬ned asfollows: ::= Boolean region terms, Ï ::= | Ï | Ï1 Ï2 | IÏ, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2, To understand the diï¬erence between RC and RCmax, consider the RCmax-formula 3â q1 I q1 â§ 2â q1 I q1 C I q1 q2 I q2 . (7) It says that the boundary of q1 is not empty and that every neighbourhood of every point in this boundary contains an internal point of q1 that belongs to the boundary of q2 (compare with property (rc) above). The simplest Aleksandrov model satisfying this formula is of depth 2; it is shown in Fig. 5. The price we have to pay for this expressivity is that the complexity of RCmax is the same as that of full S4u: 179
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev q1 qÂ2 q1 q  2 q1 q  2 depth 0 t  0 0 t t q  1 q2 depth 1 t  t t q  1 q2 depth 2 Figure 5: Model satisfying formula (7). Theorem 2.4. The satisï¬ability problem for RCmax-formulas is PSPACE-complete. The upper bound follows from Theorem 2.1 and the lower bound is proved in Ap- pendix A, where we construct a sequence of RCmax-formulas such that each of them issatisï¬able in an Aleksandrov space of cardinality at least exponential in the length of theformula. The ï¬rst formula of the sequence is similar to (7) above. It is of interest to note, however, that RCmax is still not expressive enough to deï¬ne such âpathologicalâ sets as p in (3) which is clearly not regular closed. To conclude this section, we summarise the inclusions between the spatial languages introduced above: RCC-8 BRCC-8 RC RCmax S4u. For more discussions of spatial logics of this kind we refer the reader to the paper (Pratt-Hartmann, 2002). 2.2 Temporal Logics As was said in the introduction, the temporal components of our spatio-temporal hybridsare (fragments of) the propositional temporal logic PT L interpreted in various ï¬ows of timewhich are modelled by strict linear orders F = W, < , where W is a nonempty set of timepoints and < is a (connected, transitive and irreï¬exive) precedence relation on W . The language PT L is based on the following alphabet: ⢠propositional variables p0, p1, . . . , ⢠the Booleans ¬ and â§, and ⢠the binary temporal operators U (âuntilâ) and S (âsinceâ). The set of PT L-formulas is deï¬ned in the standard way: Ï ::= p | Â¬Ï | Ï1 â§ Ï2 | Ï1 U Ï2 | Ï1 S Ï2. PT L-models are pairs of the form M = F, V such that F = W, < is a ï¬ow of timeand V, a valuation, is a map associating with each variable p a set V(p) â W of timepoints (where p is supposed to be true). The truth-relation (M, w) |= Ï, for an arbitraryPT L-formula Ï and w â W , is deï¬ned inductively as follows, where (u, v) denotes the openinterval w â W | u < w < v: 180
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity ⢠(M, w) |= p iï¬ w â V(p), ⢠(M, w) |= Â¬Ï iï¬ (M, w) |= Ï, ⢠(M, w) |= Ï1 â§ Ï2 iï¬ (M, w) |= Ï1 and (M, w) |= Ï2, ⢠(M, w) |= Ï1 U Ï2 iï¬ there is v > w such that (M, v) |= Ï2 and (M, u) |= Ï1 for all u â (w, v), ⢠(M, w) |= Ï1 S Ï2 iï¬ there is v < w such that (M, v) |= Ï2 and (M, u) |= Ï1 for all u â (v, w). A PT L-formula Ï is satisï¬ed in M if (M, w) |= Ï for some w â W . We took the operators U and S as primitive simply because all other important temporal operators can be deï¬ned via them. For example, 3F (âsometime in the futureâ) and 2F(âalways in the futureâ) are expressible via U as 3F Ï = U Ï, 2F Ï = ¬3F ¬Ï, ( is the logical constant âtrueâ) which means that ⢠(M, w) |= 3F Ï iï¬ there is v > w such that (M, v) |= Ï, ⢠(M, w) |= 2F Ï iï¬ (M, v) |= Ï for all v > w. As our intended ï¬ows of time are strict linear orders, the ânext-timeâ operator is also deï¬nable via U by taking Ï = ⥠U Ï (⥠is the logical constant âfalseâ) which perfectly reï¬ects our intuition: if F is discrete then ⢠(M, w) |= Ï iï¬ (M, w + 1) |= Ï, where w + 1 is the immediate successor of w in F. The reader should not have problems indeï¬ning the âpastâ versions of 3F , 2F and . The following results are due to Sistla and Clarke (1985) and Reynolds (2003, 2004): Theorem 2.5. The satisï¬ability problem for PT L-formulas is PSPACE-complete for eachof the following classes of ï¬ows of time: all strict linear orders, all ï¬nite strict linear orders, N, < , Z, < , Q, < , R, < . Note, however, that reasoning becomes somewhat simpler if we take 3F , 2F and their past counterparts (but no , U and S) as the only temporal primitives. Denote by PT L2 the corresponding fragment of PT L. Then, according to the results of Ono and Nakamura(1980), Sistla and Clarke (1985), and Wolter (1996), we have: Theorem 2.6. The satisï¬ability problem for PT L2-formulas is NP-complete for each ofthe classes of ï¬ows of time mentioned in Theorem 2.5. 181
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev 3. Combinations of Spatial and Temporal Logics In this section we introduce and discuss various ways of combining logics of space and time.First we construct spatio-temporal logics satisfying only the (PC) principle (see the intro-duction) and show that they inherit good computational properties of their components.Being encouraged by these results, we then consider âmaximalâ combinations of S4u with(fragments of) PT L meeting both (PC) and (OC) and see that such a straightforward ap-proach does not work: we end up with undecidable logics. This leads us to a systematicinvestigation of the trade-oï¬ between expressivity and computational complexity of spatio-temporal formalisms. The result is a hierarchy of decidable logics satisfying (PC) and (OC)whose complexity ranges from PSPACE to 2EXPSPACE. 3.1 Spatio-Temporal Logics with (PC) We begin our investigation of combinations of the spatial and temporal logics introducedabove by considering the language PT L[S4u] in which the temporal operators can be appliedto spatial formulas but not to spatial terms (this way of âtemporalisingâ a logic was ï¬rstintroduced by Finger and Gabbay, 1992). A precise syntactic deï¬nition of PT L[S4u]-termsÏ and PT L[S4u]-formulas Ï is as follows: Ï ::= p | Ï | Ï1 Ï2 | IÏ, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2 | Ï1 U Ï2 | Ï1 S Ï2. Note that the deï¬nition of PT L[S4u]-terms coincides with the deï¬nition of spatial termsin S4u which reï¬ects the fact that PT L[S4u] cannot capture the change of spatial objectsin time. We have imposed no restrictions upon the temporal operators in formulasâso thecombined language still has the full expressive power of PT L. (Clearly, S4u is a fragmentof PT L[S4u].) In a similar way we can introduce spatio-temporal logics based on all other spatial languages we are dealing with: RCC-8, BRCC-8, RC and RCmax. For example, the tem-poralisation PT L[BRCC-8] of BRCC-8 (denoted by ST 0 in the hierarchy of Wolter andZakharyaschev 2002) allows applications of the temporal operators to RCC-8 predicates butnot to Boolean region terms. These languages can be regarded as fragments of PT L[S4u]in precisely the same way as their spatial components were treated as fragments of S4u. We illustrate the expressive power of PT L[RCC-8] by formalising sentences (A) and (B) from the introduction: DC(Image1, Image2) â DC(Image1, Image2) ⨠EC(Image1, Image2), (A) DC(Kaliningrad, EU) U TPP(Poland, EU) â§ (B) 2F TPP(Poland, EU) â EC(Kaliningrad, EU) . Sentences (C)â(H) cannot be expressed in this language (or even in PT L[S4u]): they requirecomparisons of states of spatial objects at diï¬erent time instants. The intended semantics of PT L[S4u] (and all other spatio-temporal logics considered in this paper) is rather straightforward. A topological temporal model (a tt-model, for short)is a triple of the form M = F, T, U , where F = W, < is a ï¬ow of time, T = U, I a 182
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity topological space, and U, a valuation, is a map associating with every spatial variable pand every time point w â W a set U(p, w) â U âthe âspaceâ occupied by p at momentw; see Fig. 1. The valuation U is inductively extended to arbitrary PT L[S4u]-terms (i.e.,spatial terms) in precisely the same way as for S4u, we only have to add a time point as aparameter: U(Ï , w) = U â U(Ï, w), U(Ï1 Ï2, w) = U(Ï1, w) â© U(Ï2, w), U(IÏ, w) = IU(Ï, w). The truth-values of PT L[S4u]-formulas are deï¬ned in the same way as for PT L: ⢠(M, w) |= 2âÏ iï¬ U(Ï, w) = U , ⢠(M, w) |= Â¬Ï iï¬ (M, w) |= Ï, ⢠(M, w) |= Ï1 â§ Ï2 iï¬ (M, w) |= Ï1 and (M, w) |= Ï2, ⢠(M, w) |= Ï1 U Ï2 iï¬ there is v > w such that (M, v) |= Ï2 and (M, u) |= Ï1 for all u â (w, v), ⢠(M, w) |= Ï1 S Ï2 iï¬ there is v < w such that (M, v) |= Ï2 and (M, u) |= Ï1 for all u â (v, w). And as in the pure temporal case, the operators 2F , 3F , as well as their past counterparts can be deï¬ned in terms of U and S. A PT L[S4u]-formula Ï is said to be satisï¬able if there exists a tt-model M such that (M, w) |= Ï for some time point w. The following optimal complexity result will be obtained in Appendix B.1: Theorem 3.1. The satisï¬ability problem for PT L[S4u]-formulas in tt-models based onarbitrary ï¬ows of time, (arbitrary) ï¬nite ï¬ows of time, N, < , Z, < , Q, < , or R, < , isPSPACE-complete. The proof of this theorem is based on the fact that the interaction between spatial and temporal components of PT L[S4u] is very restricted. In fact, for every PT L[S4u]-formula Ïone can construct a PT L-formula Ïâ by replacing every occurrence of a (spatial) subformula2âÏ in Ï with a fresh propositional variable pÏ. Then, given a PT L-model N = F, V forÏâ and a moment of time w, we take the set Φw = 2 â Ï | (N, w) |= pÏ âª Â¬2 â Ï | (N, w) |= ¬pÏ of spatial formulas. It is not hard to see that if Φw is satisï¬able for every w in F, then thereis a tt-model satisfying Ï and based on the ï¬ow F. Now, to check whether Ï is satisï¬able,it suï¬ces to use a suitable nondeterministic algorithm (see, e.g., Sistla & Clarke, 1985;Reynolds, 2003, 2004) which guesses a PT L-model for Ïâ and then, for each time point w,to check satisï¬ability of Φw. This can be done using polynomial space in the length of Ï. Theorem 3.1 (together with Theorem 2.5) shows that all spatio-temporal logics of the form PT L[L], for L â RCC-8, BRCC-8, RC, RCmax, are also PSPACE-complete over thestandard ï¬ows of time. 183
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Now let us consider temporalisations of spatial logics with the (NP-complete) frag- ment PT L2 of PT L. By Theorems 2.4 and 3.1, both PT L2[S4u] and PT L2[RCmax] arePSPACE-complete. However, for simpler (NP-complete) spatial components we obtain abetter result: Theorem 3.2. The satisï¬ability problem for PT L2[RC]-formulas in tt-models based oneach of the classes of ï¬ows of time mentioned in Theorem 3.1 is NP-complete. The proof is essentially the same as that of Theorem 3.1, but now nondeterministic polynomial-time algorithms for the component logics are available. It follows from The-orem 3.2 that PT L2[RCC-8] and PT L2[BRCC-8] are NP-complete as well. 3.2 âMaximalâ Combinations with (PC) and (OC) As we saw in the previous section, the computational complexity of spatio-temporal logicswithout (OC) is the maximum of the complexity of their components, which reï¬ects thevery limited interaction between spatial and temporal operators in languages without anymeans of expressing (OC). A âmaximalistâ approach to constructing spatio-temporal logics capable of capturing both (PC) and (OC) is to allow unrestricted applications of the Booleans, the topologicaland the temporal operators to form spatio-temporal terms. Denote by PT L à S4u the spatio-temporal language given by the following deï¬nition: Ï ::= p | Ï | Ï1 Ï2 | IÏ | Ï1 U Ï2 | Ï1 S Ï2, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2 | Ï1 U Ï2 | Ï1 S Ï2. Expressions of the form Ï will be called spatio-temporal terms. Unlike the previous section,these terms can be time-dependent. The deï¬nition of expressions of the form Ï is thesame as for PT L[S4u]; they will be called PT L à S4u-formulas. All of the languages fromSection 3.1, including PT L[S4u], are clearly fragments of PT L à S4u. As before, we can introduce the temporal operators 2F , 3F , as well as their past counterparts applicable to formulas. Moreover, these operators can now be used to formspatio-temporal terms: for example, 3F Ï = U Ï, 2F Ï = ¬3F Ï and Ï = ⥠U Ï, where ⥠denotes the empty set and the whole space. Spatio-temporal formulas are supposed to represent propositions speaking about moving spatial objects represented by spatio-temporal terms. The truth-values of propositions inspatio-temporal structures can vary in time, but do not depend on points of spacesâtheyare deï¬ned in precisely the same way as in the case of PT L[S4u]. But how to understandtemporalised terms? The meaning of Ï should be clear: at moment w, it denotes the space occupied by Ï at the next moment w + 1 (see Fig. 2). For example, we can write 3â I Cyclone I Cyclone (C) 184
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity to say that regions Cyclone and Cyclone overlap (thereby formalising sentence (C) from the introduction). The formula EQ( EU, EU Romania Bulgaria) (F) says that in two years the EU (as it is today) will be extended with Romania and Bulgaria.Note that EQ(EU, EU Romania Bulgaria) has a diï¬erent meaning because the EU may expand or shrink in a year. It is also not hard to formalise sentences (D), (E) and (H)from the introduction: EQ( X, Y ) â ¬EQ(Y, Y ), (D) 2F EQ( Europe, Europe), (E) EQ(Earth, W L) â§ EC(W, L) â§ P(W, W ) â P( L, L), (H) where P(X, Y )ââX is a part of Y ââdenotes the disjunction of EQ(X, Y ), TPP(X, Y ) andNTPP(X, Y ). The intended interpretation of terms of the form 3F Ï , 2F Ï (and their past counterparts) is a bit more sophisticated. It reï¬ects the standard temporal meanings of propositionsâ3F x â Ï â and â2F x â Ï ,â for all points x in the topological space: ⢠at moment w, term 3F Ï is interpreted as the union of all spatial extensions of Ï at moments v > w; ⢠at moment w, term 2F Ï is interpreted as the intersection of all spatial extensions of Ï at moments v > w. For example, consider Fig. 2 with moving spatial object X depicted on it at three consecutivemoments of time (it does not change after t + 2). Then 3F X at t is the union of X and X at t and 2F X at t is the intersection of X and X at t (i.e., X). As another example, take the spatial object Rain. Then ⢠3F Rain at moment w occupies the space where it will be raining at some time points v > w (which may be diï¬erent for diï¬erent places). 2F Rain at w occupies the spacewhere it will always be raining after w. ⢠2F 3F Rain at w is the space where it will be raining ever and ever again after w, while 3F 2F Rain comprises all places where it will always be raining starting fromsome future moments of time. This interpretation shows how to formalise sentence (G) from the introduction: P(England, 2F 3F Rain). (G) Now, what can be the meaning of Rain U Snow? Similarly to the readings of 2F Ï and 3F Ï above, we adopt the following deï¬nition: ⢠at moment w, the spatial extension of Ï1UÏ2 consists of those points x of the topological space for which there is v > w such that x belongs to Ï2 at moment v and x is in Ï1at all u whenever w < u < v. 185
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev The past counterpart of U âi.e., the operator âsinceâ Sâcan be used to say that the part ofRussia that has been remaining Russian since 1917 is not connected to the part of Germany(K¨ onigsberg) that became Russian after the Second World War (Kaliningrad): DC(Russia S Russian Empire, Russia S Germany). The models M = F, T, U for PT L à S4u are precisely the same topological temporal models we introduced for PT L[S4u]. However, now we need additional clauses deï¬ningextensions of spatio-temporal terms: ⢠U(Ï1 U Ï2, w) = U(Ï2, v) â© U(Ï1, u) , v>w uâ(w,v) ⢠U(Ï1 S Ï2, w) = U(Ï2, v) â© U(Ï1, u) . v<w uâ(v,w) Then we also have: U(3F Ï, w) = U(Ï, v) and U(2F Ï, w) = U(Ï, v), v>w v>w and, for discrete F, U( Ï, w) = U(Ï, w + 1). The truth-values of PT L à S4u-formulas are computed in precisely the same way as in thecase of PT L[S4u]. A PT L à S4u-formula Ï is called satisï¬able if there exists a tt-modelM such that (M, w) |= Ï for some time point w. At ï¬rst sight it may appear that the computational properties of the constructed lo- gic should not be too badâafter all, its spatial and temporal components are PSPACE-complete. It turns out, however, that this is not the case: Theorem 3.3. The satisï¬ability problem for PT L à S4u-formulas in tt-models based onthe ï¬ows of time N, < or Z, < is undecidable. Without going into details of the proof of this theorem, one might immediately con- jecture that it is the use of the inï¬nitary operators U , 2F and 3F in the construction ofspatio-temporal terms that makes the logic âover-expressive.â Moreover, the whole idea oftopological temporal models based on inï¬nite ï¬ows of time may look counterintuitive inthe context of spatio-temporal representation and reasoning (unlike, say, models used torepresent the behaviour of reactive computer systems). There are diï¬erent approaches to avoid inï¬nity in tt-models. The most radical one is to allow only ï¬nite ï¬ows of time. A more cautious approach is to impose the following ï¬nitechange assumption on models (based on inï¬nite ï¬ows of time): FCA No term can change its spatial extension inï¬nitely often. This means that under FCA we consider only those valuations U in tt-models F, T, Uthat satisfy the following condition: for every spatio-temporal term Ï , there are pairwisedisjoint intervals I1, . . . , In of F = W, < such that W = I1 ⪠· · · ⪠In and the state of Ïremains constant on each Ij, i.e., U(Ï, u) = U(Ï, v) for any u, v â Ij. It turns out, however, 186
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity that in the case of discrete ï¬ows of time FCA does not give us anything new as comparedto arbitrary ï¬nite ï¬ows of time. More precisely, one can easily show that the satisï¬abilityproblem for PT L à S4u-formulas in tt-models satisfying FCA and based on N, < or Z, < is polynomially reducible to satisï¬ability in tt-models based on ï¬nite ï¬ows of time, and the other way round. Note also that for the ï¬ows of time mentioned above, FCA canbe captured by the formulas 3F 2F EQ(Ï, F Ï ) (and its past counterpart for Z, < ), forevery spatio-temporal term Ï . A more âliberalâ way of reducing inï¬nite unions and intersections to ï¬nite ones is to adopt the ï¬nite state assumption: FSA Every term may have only ï¬nitely many possible states (although it may change its states inï¬nitely often). Say that a tt-model F, T, U satisï¬es FSA if, for every spatio-temporal term Ï , there areï¬nitely many sets A1, . . . , Am in the space T such that U(Ï, w) | w â W = A1, . . . , Am.Such models can be used, for instance, to capture periodic ï¬uctuations due to season orclimate changes, say, a daily tide. Similarly to FCA ï¬nitising the ï¬ow of time, FSAvirtually makes the underlying topological space ï¬nite. The following proposition will beproved in Appendix B: Proposition 3.4. A PT L à S4u-formula is satisï¬able in a tt-model with FSA and baseda ï¬ow of time F iï¬ it is satisï¬able in a tt-model based on F and a ï¬nite (Aleksandrov )topological space. Unfortunately, none of these approaches works for PT L à S4uâwe still have: Theorem 3.5. (i) The satisï¬ability problem for PT L à S4u-formulas in tt-models basedon (arbitrary) ï¬nite ï¬ows of time is undecidable. (ii) The satisï¬ability problem for PT L à S4u-formulas in tt-models based on the ï¬ows of time N, < or Z, < and satisfying FSA is undecidable. The next-time operator does not look so âharmfulâ as the inï¬nitary U , 2F , 3F , and still can capture some aspects of (OC) (see formulas (C), (D), (F) and (G) above). So letus consider the fragment PT L ⦠S4u of PT L à S4u with spatio-temporal terms of the form: Ï ::= p | Ï | Ï1 Ï2 | IÏ | Ï. In other words, PT L ⦠S4u does not allow applications of temporal operators diï¬erent from to form spatio-temporal terms (but they are still available as formula constructors). This means that we can compare the states of a spatial object X over a bounded set of timepoints only: for any time point t and any natural numbers n, m ⥠0, we can compare at tthe state of X at t + n with its state at t + m. This fragment is deï¬nitely less expressive than full PT L à S4u. For instance, according to Lemma B.1, PT L ⦠S4u-formulas do not distinguish between arbitrary tt-models andthose based on Aleksandrov topological spacesâwe will call them Aleksandrov tt-models.On the other hand, the set of PT L à S4u-formulas satisï¬able in Aleksandrov models isa proper subset of those satisï¬able in arbitrary tt-models. Consider, for example, the PT L à S4u-formula 2â(2F Ip I2F p). 187
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev One can readily see that it is true in every Aleksandrov tt-model, but its negation can besatisï¬ed in a topological model. For it suï¬ces to take the ï¬ow F = N, < and the topologyT = R, I with the standard interior operator I on the real line, select a sequence Xn ofopen sets such that X nâN n is not open, e.g., Xn = (â1/n, 1/n), and put U(p, n) = Xn. However, even this seemingly weak interaction between topological and temporal oper- ators turns out to be dangerous: Theorem 3.6. The satisï¬ability problem for PT L ⦠S4u-formulas in tt-models based onthe ï¬ows of time N, < or Z, < is undecidable. It is undecidable as well for tt-modelssatisfying FSA or based on (arbitrary) ï¬nite ï¬ows of time. Theorem 2.6 might suggest considering the fragment PT L2 à S4u with 2F and its past counterpart 2P as the only temporal primitives applicable both to formulas and terms: Ï ::= p | Ï | Ï1 Ï2 | IÏ | 2F Ï | 2P Ï, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2 | 2F Ï | 2P Ï. Yet again the result is ânegative:â Theorem 3.7. The satisï¬ability problem for PT L2 à S4u-formulas in tt-models (with orwithout FSA) based on the ï¬ows of time N, < or Z, < is undecidable. It is undecidableas well for tt-models based on (arbitrary) ï¬nite ï¬ows of time. These undecidability results (the strongest ones, Theorems 3.6 and 3.7, to be more precise) will be proved in Appendix B.2 by a reduction of Postâs correspondence problemwhich is known to be undecidable (Post, 1946). As we will see from the proofs, thesetheorems actually hold for the âfuture fragmentsâ of the corresponding languages. 3.3 Decidable Spatio-Temporal Logics with (PC) and (OC) An important lesson we learn from (the proofs of) the ânegativeâ results of Section 3.2 is thatfull S4u is too expressive for computationally well-behaved combinations with fragments ofPT L. On the other hand, as was said in Section 2.1.2, qualitative spatial representation andreasoning often requires extensions of spatial variables to be regular closed (i.e., regions).This restriction is very important for constructing decidable spatio-temporal logics with(PC) and (OC). First, the undecidability proofs from Appendix B.2 do not go throughin this case. And second, as will be shown below, decidable combinations of PT L andsome of the fragments of S4u introduced in Section 2.1 do exist. In fact, we will constructa hierarchy of decidable spatio-temporal logics of diï¬erent computational complexity byimposing various restrictions on regions themselves, the ways they can be compared, andthe interactions between spatial and temporal constructors. We begin by considering the simplest combination of PT L and RCC-8 capturing (PC) and (OC). This logic called PT Lâ¦RCC-8 (it was introduced under the name ST â by Wolter 1 and Zakharyaschev, 2002) operates with spatio-temporal region terms of the form ::= CIp | CI . To relate these terms, we are allowed to use the eight binary predicates of RCC-8; then arbit-rary temporal operators and Boolean connectives can be applied to produce PT L ⦠RCC-8 188
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity formulas. Typical examples of such formulas are (A), (B), (D) and (E) above. Note that(C) can be regarded as a PT L ⦠RCC-8 formula as well (two regions overlap iï¬ they areneither disconnected nor externally connected). On the other hand, (F), (H) and (G) arenot PT Lâ¦RCC-8 formulas because the ï¬rst two use the operation on region terms and (G) uses temporal operators 2F and 3F on region terms. As before, PT L ⦠RCC-8 formulas are interpreted in topological temporal models (or tt-models). However, only discrete ï¬ows of time do make sense for this language. Althoughthe interaction between topological and temporal operators is similar to that in PT L ⦠S4u(clearly, PT Lâ¦RCC-8 is a fragment of PT Lâ¦S4u), we have the following rather unexpectedand encouraging result: Theorem 3.8. The satisï¬ability problem for PT L ⦠RCC-8 formulas in tt-models based on N, < , Z, < or (arbitrary) ï¬nite ï¬ows of time is PSPACE-complete. This theorem will be proved in Appendix C.5. The idea of the proof is similar to that of Theorem 3.1: we consider the spatial and the temporal parts of a given formula separately.However, to take into account the interaction between these parts, we use the so-calledâcompletion propertyâ of RCC-8 (cf. Balbiani & Condotta, 2002) with respect to a certainclass C of models: given a satisï¬able set Φ of RCC-8 formulas and a model in C satisfyinga subset of Φ, one can extend this âpartialâ model to a model in C satisfying the whole Φ. What happens if we extend the expressive power of the spatial component by allowing Boolean operators on spatio-temporal region terms, i.e., jump from RCC-8 to BRCC-8?Deï¬ne spatio-temporal Boolean region terms by taking ::= CIp | CI | CI( 1 2) | CI . Denote by PT L ⦠BRCC-8 the language obtained from PT L ⦠RCC-8 by allowing spatio-temporal Boolean region terms as arguments of the RCC-8 predicates (this language wascalled ST 1 by Wolter and Zakharyaschev, 2002). Formulas (A)â(F) and (H) belong toPT L ⦠BRCC-8, but (G) uses the 2F and 3F operators on regions and so is not in PT L â¦BRCC-8. Now, another surprise is that the replacement of RCC-8 with BRCC-8 in our temporal context results in an exponential jump of the computational complexity (remember thatboth RCC-8 and BRCC-8 are NP-complete): Theorem 3.9. The satisï¬ability problem for PT L ⦠BRCC-8 formulas in tt-models basedon the ï¬ows of time N, < or Z, < is EXPSPACE-complete. It is EXPSPACE-completeas well for models satisfying FSA or based on (arbitrary) ï¬nite ï¬ows of time. The EXPSPACE upper bound (see Appendix C.3) is proved by a polynomial embed- ding of PT L ⦠BRCC-8 into the one-variable fragment QT L1 of ï¬rst-order temporal logic,which is known to be EXPSPACE-complete (Hodkinson, Kontchakov, Kurucz, Wolter, &Zakharyaschev, 2003). To construct this embedding, we ï¬rst show that PT L ⦠BRCC-8 iscomplete with respect to Aleksandrov tt-models. In fact, we prove that every satisï¬ableformula of the more expressive logic PT L ⦠S4u introduced in Section 3.2 can be satisï¬edin an Aleksandrov tt-model (see Lemma B.1 and the discussion above). Lemma C.1 thenshows that to satisfy a PT L ⦠BRCC-8 formula, it suï¬ces to take an Aleksandrov tt-model 189
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev based on a partial order of depth 1. By Lemma C.2, the width of the partial order can bebounded by 2 (just as in the case of BRCC-8), and therefore unions of forks (or 2-brooms)are enough to satisfy PT L ⦠BRCC-8 formulas. These Aleksandrov tt-models based onunions of forks can be encoded by means of unary predicates of QT L1. The EXPSPACE lower bound is proved in Appendix C.1 by encoding the corridor tiling problem. It can also be established by a direct polynomial embedding of QT L1 intoPT Lâ¦BRCC-8. To illustrate the idea, consider the QT L1-formula âx (P (x)⨠P (x)) sayingthat, for every point of the space, either it is in P now or will be there tomorrow. The samestatement can be expressed in PT L ⦠BRCC-8 by the formula EQ(P P, E) â§ DC(E, E), where the last conjunct makes E empty. Now let us make one more step in space and extend BRCC-8 to RC, thus obtaining the spatio-temporal language PT L ⦠RC with the following syntax: ::= CIp | CI | CI( 1 2) | CI , Ï ::= | I | Ï | Ï1 Ï2, Ï ::= 2âÏ | Â¬Ï | Ï1 â§ Ï2 | Ï1 U Ï2 | Ï2 S Ï2. The reader should not be surprised now (although the authors were) that the extra ex-pressivity results in one more exponential gap: Theorem 3.10. The satisï¬ability problem for PT L ⦠RC-formulas in tt-models based onthe ï¬ows of time N, < or Z, < is 2EXPSPACE-complete. It is 2EXPSPACE-completeas well for models satisfying FSA or based on (arbitrary) ï¬nite ï¬ows of time. The lower bound is established in Appendix C.1 and the upper bound in Appendix C.2.Perhaps, it is proper time now to have a closer look at the emerging landscape. What exactly causes these exponential âjumpsâ ? Can we locate more precise borders in the ladderPSPACEâEXPSPACEâ2EXPSPACE? By analysing the proof of Theorem 3.8 (see Appendix C.5), we note that not so much can be added to RCC-8. In fact, the maximal spatio-temporal logic (denoted by PT Lâ¦RC2)for which this proof goes through is based on spatio-temporal terms of the form ::= CIp | CI , θ ::= | I | | I , Ï ::= θ1 θ2. On the other hand, even the addition of predicates of the form EQ(X, Y Z) is enough to make the logic EXPSPACE-hard (see Remark C.3). Thus, PT L ⦠RCC-8 (or ratherits extension PT L ⦠RC2) is located pretty close to the border between PSPACE andEXPSPACE spatio-temporal logics. The following fragment RCâ of RC indicates where the border between EXPSPACE and 2EXPSPACE may lie: ::= Boolean region terms, δ ::= | Ï, Ï ::= I | δ | Ï1 Ï2, Ï ::= δ1 · · · δm | δ Ï | Ï. 190
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Intuitively, the δ and the Ï are spatial terms interpreted by regular closed and regular open4sets, respectively (the interior of a region is regular open, the complement of a regular closedset is regular open (and vice versa), regular closed sets are closed under unions and regularopen ones are closed under intersections). Thus, δ can be regarded as a generalisation ofregion terms and Ï as a generalisation of the interiors of regions. In other words, RCâ isthe fragment of RC in which only the following ways of relating regions are available: ⢠there is a point where some regions meet; ⢠a region intersects the interior of another one; ⢠the interior of a region is not empty. It is readily checked that BRCC-8 is a fragment of RCâ. Moreover, it is a proper fragmentbecause (4) belongs to the latter but not to the former. The formula 2â ( NorthKorea SouthKorea ) DmZone (8) (saying that the demilitarised zone between the North Korea and the South Korea consistsof the border between them along with some adjacent territories) shows that RCâ is aproper subset of RC: BRCC-8 RCâ RC. Although RCâ extends BRCC-8, it gives rise to the spatio-temporal logic of the same computational complexity: Theorem 3.11. The satisï¬ability problem for PT L ⦠RCâ-formulas in tt-models based onthe ï¬ows of time N, < or Z, < is EXPSPACE-complete. It is EXPSPACE-complete aswell for models satisfying FSA or based on (arbitrary) ï¬nite ï¬ows of time. The lower bound follows immediately from Theorem 3.9 and the proof of the upper bound is similar to that of Theorem 3.9 (see Appendix C.3). Again, due to the restrictionon possible ways of relating regions, we can polynomially bound the width n of n-broomsthat are required to satisfy PT Lâ¦RCâ-formulas (cf. Lemma C.2). In fact, we need formulassimilar to (8) in order to increase complexity to 2EXPSPACE. The constructed hierarchy of decidable spatio-temporal logics still leaves at least one important question: do there exist decidable spatio-temporal logics that allow applicationsof the temporal operators U , 2F , 3F to region terms and what is their complexity? Considerthe languages PT L à L, for L â BRCC-8, RCâ, RC, which diï¬er from PT L ⦠L only inthe deï¬nition of spatio-temporal region terms: ::= CIp | CI | CI( 1 2) | CI( 1 U 2) | CI( 1 S 2). The following two theorems provide a positive (though partial) answer to this question: Theorem 3.12. The satisï¬ability problem for PT L à BRCC-8 and PT L à RCâ-formulasin tt-models based on N, < or Z, < and satisfying FSA, or based on (arbitrary) ï¬niteï¬ows of time is EXPSPACE-complete. 4. Remember that a set X is regular open if ICX = X. 191
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Theorem 3.13. The satisï¬ability problem for PT L à RC-formulas in tt-models basedon N, < or Z, < and satisfying FSA, or based on (arbitrary) ï¬nite ï¬ows of time is2EXPSPACE-complete. The upper bounds mentioned in these two theorems are proved in Appendices C.3 and C.2, respectively. The lower bounds follow from the results for PT Lâ¦BRCC-8 (Theorem 3.9)and PT L ⦠RCâ (Theorem 3.10). To appreciate the following theorem, the reader should recall that both PT L2 and RCâ are NP-complete: Theorem 3.14. The satisï¬ability problem for PT L2ÃBRCC-8 and PT L2ÃRCâ-formulasin tt-models based on N, < or Z, < and satisfying FSA, or based on (arbitrary) ï¬niteï¬ows of time is EXPSPACE-complete. Actually it is a consequence of the EXPSPACE-hardness of QT L1 with the sole temporal operator 2F (see Hodkinson et al., 2003). Unfortunately, very little is known about the complexity of our spatio-temporal lan- guages interpreted in tt-models based on dense or arbitrary ï¬ows of time. In fact, the onlyresult we know of can be proved using the recent work (Hodkinson, 2004; Hodkinson et al.,2003): Theorem 3.15. The satisï¬ability problem for PT L à BRCC-8 and PT L à RCâ-formulasin tt-models satisfying FSA and based on Q, < , R, < or arbitrary ï¬ows of time belongsto 2EXPTIME and is EXPSPACE-hard. 4. Conclusion We have provided an in-depth analysis of the computational complexity of various spatio-temporal logics interpreted in Cartesian products of ï¬ows of time and topological spaces.Some of these results are collected in Table 1. The design of the languages was driven by theidea to cover the most basic features of spatio-temporal hybrids combining standard logicsof time and mereotopology, with the aim being to see how complex reasoning with thesehybrids could be. We did not try to ï¬ne-tune the languages for real-world applications. Onthe contrary, we tried to keep them as âpureâ and representative as possible and determinecomputational challenges which any multi-dimensional approach to reasoning about spaceand time would face. With this research objective in mind, we discuss now some conclusionsthat can be drawn from Table 1. The conclusion to be drawn from the undecidability results is easy: do not try to implement a sound, complete and terminating algorithm which is supposed to decide thesatisï¬ability problem for PT L à S4u, PT L ⦠S4u or PT L2 à S4uâyou will never succeed.If decision procedures are required, then alternative languages have to be devised. The interpretation of the complexity results for decidable logics is not so transparent: it is well-known that such results do not provide us with immediate conclusions regardingthe behaviour of implemented systems. For example, sometimes algorithms running inexponential time in the worst-case perform better on practical problems than worst-caseoptimal algorithms that run in polynomial time. Indeed, the complexity results should beanalysed together with their proofsâif signiï¬cant conclusions are required (cf. Nebel, 1996). 192
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity ï¬ow spatial component L guage of time lan RCC-8 BRCC-8 RC RCmax S4u L n/a NP NP PSPACE PSPACE (Thm. 2.2) (Thm. 2.4) (Thm. 2.1) ][L N, Z,Q, R, 2L ï¬nite NP PSPACE T or P (Thm. 3.2) (Thm. 3.1) arbitrary ] N, Z,Q, R, [LL ï¬nite PSPACE T or P (Thm. 3.1) arbitrary PSPACE L N, Z ⦠(Thm. 3.8) EXPSPACE 2EXPSPACE undecidable L ï¬nite ? T ⤠EXPSPACE (Thm. 3.9) (Thm. 3.10) (Thm. 3.6) P or ⥠PSPACE N, Z+FSA N, Z ? undecidable ï¬nite L ⤠EXPSPACE ⤠2EXPSPACE (Thm. 3.7) or EXPSPACE ? à ⥠NP (Thm. 3.14) ⥠EXPSPACE 2 N, Z+FSA LT arbitrary P or ⤠2EXPTIME ⤠2EXPTIME ? ? ? Q, R ⥠NP ⥠EXPSPACE with FSA N, Z ? undecidable (Thm. 3.3) ï¬nite L ⤠EXPSPACE EXPSPACE 2EXPSPACE à or ? undecidable ⥠PSPACE L (Thm. 3.12) (Thm. 3.13) (Thm. 3.5) N, Z+FSA T arbitrary P ⤠or ⤠2EXPTIME 2EXPTIME ⥠EXPSPACE ? ? ? Q, R ⥠PSPACE (Thm. 3.15) with FSA Table 1: Complexity of the satisï¬ability problem for spatial and spatio-temporal logics. 193
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Only the proofs show where the sources of the complexity are and whether they could berelevant for practical problems and the implementation of algorithms. In this respect our proofs are actually rather informative. The decidability proof for PT L[S4u] immediately provides us with a modular algorithm combining any known pro-cedures for the components. The EXPSPACE-completeness results for PT L à BRCC-8(with FSA) and PT L ⦠BRCC-8 show an extremely close link between the spatio-temporallanguages and the one-variable fragment of ï¬rst-order temporal logic. The algorithmic problems investigated in the context of ï¬rst-order temporal logic are, therefore, of the samecharacter as those we deal with in the spatio-temporal context. Thus, the experience ofworking with algorithms for (fragments of) ï¬rst-order temporal logics (Hodkinson, Wolter,& Zakharyaschev, 2000; Degtyarev, Fisher, & Konev, 2003; Kontchakov, Lutz, Wolter, &Zakharyaschev, 2004) about which we have a pretty good knowledge by now almost directlytranslates to insights into possible algorithms for spatio-temporal logics. The PSPACE-completeness result for PT L ⦠RCC-8 is obtained by means of a reduction (modulo RCC-8reasoning) to PT L. So we can conclude from the proof that it will be suï¬cient to havegood solvers for RCC-8 and PT L to obtain a reasonable prover for PT L ⦠RCC-8. Theinteraction between the two components turned out to be rather weak. In conclusion, the complexity proofs clearly show the algorithmic problems to be solved when dealing with the spatio-temporal logics presented in this paper. In particular, devisingalgorithms for these logics should be conceived as part of the more general enterprise ofdeveloping algorithms for propositional and the one-variable fragment of ï¬rst-order temporallogic. Here are some comments on and explanations of the most important results in Table 1: 1. The undecidability result for PT L à S4u, PT L ⦠S4u and PT L2 à S4u solves a major open problem of Wolter and Zakharyaschev (2002). It shows that, while S4u is asuitable candidate for eï¬cient pure spatial reasoning (Bennett, 1996; Renz & Nebel,1998; Aiello & van Benthem, 2002a), its temporal extensions satisfying both (PC)and (OC) are not suitable for practical spatio-temporal representation and reasoning. 2. Logics like PT L à BRCC-8 may turn out to be undecidable when interpreted in arbitrary topological temporal models. One of the main origins of their expressivepower is a possibility to form inï¬nite intersections and unions of regions. However, wecan âtameâ the computational behaviour of these logics by imposing natural restrictionson the classes of admissible models such as FSA. 3. The PSPACE upper bound for PT L ⦠RCC-8 and the EXPSPACE lower bound for PT L ⦠BRCC-8 solve two other major open problems of Wolter and Zakharyaschev(2002). It is of interest to note that the spatial fragments of PT L ⦠RCC-8 and PT L ⦠BRCC-8 have the same computational complexity: both are NP-completeover arbitrary topological spaces. Thus the additional Boolean connectives on spatialregions interacting with the next-time operator can make the logic substantially more complex. 4. The 2EXPSPACE-completeness result for PT L à RC with FSA and PT L ⦠RC is an- other example when a seemingly tiny increase of expressiveness results in a signiï¬cantjump of complexity. 194
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity 5. PSPACE-completeness of PT L ⦠RCC-8 is a particularly âgood news,â since it shows that this combination of PT L and RCC-8 has the same computational complexityas PT L itself, for which surprisingly fast systems have been implemented (Schwendi-mann, 1998; Hustadt & Konev, 2003). This gives us hope that âpracticalâ algorithmsfor PT Lâ¦RCC-8 can be implemented. Indeed, the proof shows that it may be possibleto encode the satisï¬ability problem for PT Lâ¦RCC-8 into the satisï¬ability problem forPT L and then use PT L provers. We note that this complexity result has been con-jectured by Demri and DâSouza (2002) and that our proof uses some ideas of Balbianiand Condotta (2002). 6. On the other hand, the EXPSPACE lower bounds for PT L à BRCC-8 with FSA and PT Lâ¦BRCC-8 do not necessarily mean that reasoning with these logics is hopeless. Infact, we show that both of them can be regarded as fragments of the one-variable ï¬rst-order temporal logic, for which tableau- and resolution-based decision procedures havebeen developed and implemented (Degtyarev et al., 2003; Kontchakov et al., 2004). Of course, there are many directions of further research in spatio-temporal knowledge rep-resentation and reasoning. Here we mention only some of them that are closely related tothe logics we have considered above. ⢠In this paper, we conï¬ned ourselves to considering linear ï¬ows of time. It may be of interest, however, to investigate the computational properties of spatio-temporallogics based on the branching time paradigm (see, e.g., Clarke & Emerson, 1981;Emerson & Halpern, 1985) in order to model uncertainty about the future. Recentresults by Hodkinson, Wolter and Zakharyaschev (2001, 2002) give hope that suchlogics can be decidable. ⢠We conï¬ned ourselves to considering only mereotopological formalisms for the spatial dimension. It would be also of interest to consider spatial logics of directions (Ligozat,1998), shape (Galton & Meathrel, 1999), size (Zimmermann, 1995), position (Clem-entini, Di Felice, & Hern´ andez, 1997), or even their hybrids (Gerevini & Renz, 2002). We note that some results in this direction have been recently obtained by Balbianiand Condotta (2002) and Demri and DâSouza (2002). ⢠Another interesting and important perspective in both spatial and spatio-temporal representation and reasoning is to move from arbitrary topological spaces to thoseinduced by metric spaces and introduce explicit and/or implicit numerical parameters.First encouraging steps in this direction have been made in the work (Kutz, Sturm,Suzuki, Wolter, & Zakharyaschev, 2003). We conclude the paper with a number of open problems: 1. What is the precise computational complexity of PT L à BRCC-8 with FSA over dense ï¬ows of time and arbitrary strict linear orders? 2. Are logics of the form PT L à L and PT L2 à L, for L â RC, BRCC-8, RCC-8, decidable without FSA? 195
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev 3. Are combinations of PT L and PT L2 with RCmax (satisfying both (PC) and (OC)) decidable? 4. Is PT L à S4u undecidable over dense ï¬ows of time and arbitrary strict linear orders? 5. Is PT L à RCC-8 with FSA decidable in PSPACE? Acknowledgments The work on this paper was partially supported by U.K. EPSRC grants no. GR/R45369/01,GR/R42474/01, GR/S61966/01 and GR/S63182/01. The work of the third author was alsopartially supported by Hungarian Foundation for Scientiï¬c Research grants T30314 and035192. Special thanks are due to the referees of the ï¬rst version of this paper whose remarks, criticism and constructive suggestions have led to many days of intensive and excitingresearch, new results and, hopefully, a better paper. Appendix A. Complexity of Spatial Logics In this appendix we prove Theorems 2.2 and 2.4. In these proofs we use the fact that S4u(as well as its fragments) is complete with respect to (ï¬nite) Aleksandrov topological spaces(McKinsey & Tarski, 1944; Goranko & Passy, 1992). Recall from p. 174 that an Aleksandrov(topological ) model is a pair of the form M = G, V , where G = V, R is a quasi-orderand V is a map from the set of spatial variables into 2V . It will be more convenient for usto unify notation for spatial formulas and spatial terms and write (M, x) |= Ï instead ofx â V(Ï ), for Ï a spatial term and x a point in V . In particular, by the deï¬nition of theinterior and closure operators in Aleksandrov spaces, (M, x) |= IÏ iï¬ ây â V xRy â (M, y) |= Ï , (M, x) |= CÏ iï¬ ây â V xRy â§ (M, y) |= Ï . By the length (Ï) of a formula Ï we understand the number of subformulas and sub- terms occurring in Ï. Proof of Theorem 2.2. The proof follows from Lemmas A.1 and A.2 below which showtogether that every satisï¬able RC-formula can be satisï¬ed in an Aleksandrov model of sizepolynomial (in fact, quadratical) in the length of the input formula (in other words, RC hasthe polynomial ï¬nite model property). Thus, we have a nondeterministic polynomial timealgorithm for the satisï¬ability problem. K In fact, Lemma A.1 shows that RC is complete with respect to a subclass of Aleksandrov spaces, namely, ï¬nite disjoint unions of ï¬nite brooms. Recall from p. 179 that a broom isa partial order b of the form r ⪠V0, R , where R is the reï¬exive closure of r à V0(see Fig. 4). We call r the root of b and points in V0 the leaves of b; they are also referredto as points of depth 1 and 0, respectively. A broom b is said to be a κ-broom, κ ⤠Ï, if|V0| ⤠κ. In particular, we call a broom ï¬nite if it is an n-broom, for some n < Ï. 196
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Lemma A.1. Every satisï¬able RC-formula is satisï¬ed in an Aleksandrov model based ona ï¬nite disjoint union of ï¬nite brooms. Proof. As is well-known, if an RC-formula Ï is satisï¬able then it can be satisï¬ed in a ï¬niteAleksandrov model M = G, V , G = V, R . Deï¬ne a new relation R on V by taking Rto be the reï¬exive closure of R â© (V1 à V0), where V0 = x â V | ¬ây (xRy ⧠¬ yRx) and V1 = V â V0. (Without loss of generality we may assume that V1 = â and no y â V0 has more than oneproper R-predecessor.) Let G = V, R and M = G , V . Clearly, G is a partial order as required. We prove that, for every RC-formula Ï, M |= Ï iï¬ M |= Ï. (9) First we show that, for every Boolean region term and every x â V , (M , x) |= iï¬ (M, x) |= . (10) By deï¬nition, (M , x) |= p iï¬ (M, x) |= p, for every spatial variable p. It is readily seen thatfor every y â V0 and every spatial term Ï , we have (M , y) |= Ï iï¬ (M, y) |= Ï . Now, if is a Boolean region term then = CIÏ for some spatial term Ï , and we clearly have: (M, x) |= CIÏ iï¬ ây â V xRy and âz â V (yRz â (M, z) |= Ï ) iï¬ ây â V0 xR y and (M, y) |= Ï iï¬ ây â V0 xR y and (M , y) |= Ï iï¬ ây â V0 xR y and (M , y) |= IÏ iï¬ (M , x) |= CIÏ. Next, we extend (10) to spatial terms of the form I where is a Boolean region term. If (M, x) |= I then (M, y) |= whenever xRy, and so, by R â R, we have (M , x) |= I . Conversely, suppose (M , x) |= I . Take any y with xRy and any z â V0 with yRz. Weclaim that (M, z) |= . Indeed, if x â V1 then this follows by IH from xR z. If x â V0 then zRx. Since (M , x) |= , by IH and = CIÏ , we obtain (M, z) |= . Now (M, y) |= follows by yRz and = CIÏ . Thus, (M, x) |= I . Finally, we can easily extend (10) to arbitrary spatial terms and formulas of RC because both are constructed from spatial terms of the form and I , with a Boolean region term, using operators that do not depend on the structure of the underlying partial order. Thuswe have (9). K Lemma A.2. Every satisï¬able RC-formula Ï is satisï¬ed in an Aleksandrov model basedon a disjoint union of at most (Ï) many 2 (Ï)-brooms. Proof. Remember that every RC-formula Ï is (equivalent to) a Boolean combination ofspatial formulas from some set Î£Ï = 3 â Ï1, . . . , 3 â Ïm.5 For each 3 â Ï â ΣÏ, the spatial term 5. In the following proof we consider 3 â as primary and 2 â Ï as an abbreviation for ¬3 â Ï . 197
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Ï is also a Boolean (or rather set-theoretic) combination of some 1, . . . , k , I , . . . , I 1 m, where the i and the are Boolean region terms. i It follows from Lemma A.1 that Ï is satisï¬ed in an Aleksandrov model M = G, V , where G = V, R is a ï¬nite disjoint union of ï¬nite brooms. For every 3 â Ï â Î£Ï with M |= 3 â Ï , ï¬x a point xÏ â V such that (M, xÏ ) |= Ï . We may assume that the xÏ are pairwise distinct and that the roots of all brooms are the points of the form xÏ for 3 â Ï â ΣÏ. Therefore, G is a disjoint union of ⤠(Ï) many ï¬nite brooms bÏ , for 3 â Ï â ΣÏ. Let us construct a new model M as follows. For each broom bÏ , 3 â Ï â ΣÏ, and each â ÎÏ , we pick ⢠a leaf yÏ, of bÏ (if any) such that (M, yÏ, ) |= , ⢠a leaf yÏ, of bÏ (if any) such that (M, yÏ, ) |= and remove the other leaves of bÏ . Denote by bÏ the resulting broom. Clearly, it is a 2 (Ï)-broom. Let G = V , R be the disjoint union of all bÏ , for 3 â Ï â ΣÏ, and M = G , V . It is easy to see that G is as required. Now, to show that Ï is satisï¬ed in M , it suï¬ces to prove that, for all 3 â Ï â ΣÏ, M |= 3 â Ï iï¬ M |= 3 â Ï. (11) By deï¬nition of M , for all leaves y of G and all spatial terms Ï , (M , y) |= Ï iï¬ (M, y) |= Ï. Next, for every root xÏ of bÏ , every 3 â Ï â Î£Ï and every â ÎÏ , we have (M, xÏ ) |= iï¬ there is a leaf y such that xÏ Ry and (M, y) |= (simply because = CIδ, for some δ). It follows from the construction of M that (M, xÏ ) |= iï¬ (M , xÏ ) |= , for every â ÎÏ . It also follows that (M, xÏ ) |= I implies (M , xÏ ) |= I . Conversely, if (M , xÏ ) |= I , but(M, xÏ ) |= I then there is a leaf y such that xÏ Ry and (M, y) |= which is a contradiction. Since intersection and complement do not depend on the structure of the underlying frame,we have (M , xÏ ) |= Ï iï¬ (M, xÏ ) |= Ï , for every root xÏ of bÏ , which proves (11). K Proof of Theorem 2.4. The PSPACE upper bound follows from Theorem 2.1. The proofof PSPACE-hardness is by reduction of the validity problem for quantiï¬ed Boolean formulaswhich is known to be PSPACE-complete (Stockmeyer, 1987). We will slightly modify theproof of Ladner (1977) (that shows the PSPACE-hardness of S4), in order to take intoaccount that the variables in RCmax-formulas are always preï¬xed by CI. We may assume that quantiï¬ed Boolean formulas are of the form Ï = Q1p1 . . . Qnpn Ï , where Qi â â, â and Ï is a Boolean formula with variables p1, . . . , pn. As is well known,all possible truth assignments to p1, . . . , pn can be arranged as the leaves of a full binarytree of depth n. The left subtree of the root contains all truth assignments with p1 trueand the right subtree those with p1 false; then we branch on p2, then p3, and so on. Wecan determine whether Ï is valid by pruning this full binary tree: whenever Qi is â, thenwe keep both subtrees at the ith level, and whenever Qi is â then only one of them. If this 198
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Ï Ï Ï Ï q3,rp1,p2,p3 q3,rp1,p2 q3,rp2,p3 q3,rp2 λd s 3  λ3 λd s 3  λ3 d  d  d 2 r  d  q2, p1, p2 q2, p2 λd λ2 r d E  r E r T T λ λ 1 r q1, p1 1 r q E r E r 1 r  ¨ B r ¨ r ¨ r ¨ r ¨ rr r ¨ ¨ r E ¨ rq0 λ0 Figure 6: An Aleksandrov model that may satisfy Ïâ, for Ï = âp1âp2âp3 Ï . way we can end up with a tree such that all its leaves evaluate Ï to true, then Ï is valid,otherwise not. We will âgenerateâ the leaves of this binary tree in Aleksandrov models with the help of an RCmax-formula. More precisely, we will construct an RCmax-formula Ïâ such that ⢠its length is polynomial in the length of Ï, and ⢠Ïâ is satisï¬ed in an Aleksandrov model iï¬ Ï is valid. Take fresh spatial variables q0, . . . , qn, and put, for i = 0, . . . , n,  q0 q1 if i = 0;    λi = qiâ1 qi qi+1 , if 0 < i < n;    qnâ1 qn , if i = n. Now consider the variables p1 . . . , pn of Ï as spatial variables, and let Ï be the result ofreplacing every occurrence of pi with pi in Ï . Put Ïâ = 3 â λ0 â§ 2â λiâ1 (Ï â Ï +) â§ 2â λ Ï +) â§ 2â λ i i iâ1 (Ï â i i n Ï , Qi=â Qi=â where, for i = 1, . . . , n, Ï â = C λ = C λ i i pi and Ï + i i I pi . Clearly, Ïâ is an RCmax-formula and its length is polynomial in the length of Ï. Suppose ï¬rst that Ï is valid. Then Fig. 6 shows the structure of a possible Aleksandrov model satisfying Ïâ. The converse direction is similar to that of Ladnerâs proof (1977). Suppose that Ïâ is satisï¬ed in an Aleksandrov model M. Then, for each ânecessaryâ sequence of truth values for p1 , . . . , pn , there is a point in M âreï¬ectingâ this sequence (we do not use the âstructureâ of the spatial terms λi here). Since, by the last conjunct of Ïâ, Ï holds in M at all thesepoints, we obtain that the quantiï¬ed Boolean formula Ï must be valid. K 199
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Appendix B. Spatio-Temporal Logics Based on S4u In this appendix we prove Theorems 3.1, 3.2, 3.6 and 3.7 as well as Proposition 3.4. ThenTheorems 3.3 and 3.5 are immediate corollaries of Theorem 3.6. But ï¬rst, some generalresults are established to be used later on. We remind the reader that by an Aleksandrov tt-model we mean a tt-model based on an Aleksandrov (topological) space. Every such model can be regarded as a triple of the formK = F, G, V , where F = W, < is a ï¬ow of time, G = V, R a quasi-order, and V is a mapassociating with every spatial variable p and every time point w â W a set V(p, w) â V .As in Appendix A, instead of x â V(Ï, w) we write (K, w, x ) |= Ï to unify notation forspatio-temporal formulas and terms. Given a spatio-temporal formula Ï, we denote by sub Ï the set of all its subformulas and by term Ï the set of all spatio-temporal terms occurring in Ï. Lemma B.1. (i) If a PT L à S4u-formula Ï is satisï¬ed in a tt-model with FSA and basedon a ï¬ow of time F, then Ï is satisï¬ed in an Aleksandrov tt-model with FSA and basedon F. (ii) If a PT L ⦠S4u-formula Ï is satisï¬ed in a tt-model based on a ï¬ow of time F, then Ï is satisï¬ed in an Aleksandrov tt-model based on F as well. Moreover, in both cases we can choose an Aleksandrov tt-model K = F, G, V satisfying Ï (with F = W, < and G = V, R ) in such a way that for all w â W , x â V and spatio-temporal terms Ï , the set Aw,x,Ï = y â V | xRy and (K, w, y ) |= Ï contains an R-maximal point 6 (provided of course that Aw,x,Ï = â ). Proof. The proof uses the StoneâJ´ onssonâTarski representation of topological Boolean algebras (in particular, topological spaces) in the form of general frames (see, e.g., Goldblatt,1976 or Chagrov & Zakharyaschev, 1997). (i) Suppose that Ï is satisï¬ed in a tt-model M = F, T, U with FSA and based on a topological space T = U, I . Denote by V the set of all ultraï¬lters over U . For any twoultraï¬lters x1, x2 â V , put x1Rx2 iï¬ âA â U (IA â x1 â A â x2). It is easy to see that Ris a quasi-order on V . Deï¬ne an Aleksandrov tt-model K = F, G, V by taking G = V, Rand V(p, w) = x â V | U(p, w) â x. We show by induction on the construction of aspatio-temporal term Ï that, for all w â W and x â V , (K, w, x ) |= Ï iï¬ U(Ï, w) â x. (12) The basis of induction and the case of the Booleans are trivial. The case of Ï = IÏ isstandard (consult Goldblatt, 1976 or Chagrov & Zakharyaschev, 1997). Case Ï = Ï1 U Ï2. Assume that (K, w, x ) |= Ï1 U Ï2. Then there is v > w such that (K, v, x ) |= Ï2 and (K, u, x ) |= Ï1 for all u in the interval (w, v). By IH, U(Ï2, v) â x andU(Ï1, u) â x for all u â (w, v). Since U(Ï1 U Ï2, w) â U(Ï2, v) â© U(Ï1, u), uâ(w,v) 6. A point z is said to be R-maximal in A â V if, for every z â A, we have z Rz whenever zRz . 200
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity we shall have U(Ï1 U Ï2, w) â x if we show that U(Ï2, v) â© U(Ï1, u) â x. (13) uâ(w,v) In view of FSA, we can ï¬nd time points u1, . . . , ul â (w, v) such that U(Ï1, u1) ⩠· · · â© U(Ï1, ul) = U(Ï1, u), uâ(w,v) which yields (13) because ultraï¬lters are closed under ï¬nite intersections. Conversely, let U(Ï1 U Ï2, w) â x. By FSA, there are time points v1, . . . vl such that U(Ï1 U Ï2, w) = U(Ï2, vi) â© U(Ï1, u) . 1â¤iâ¤l uâ(w,vi) And since x is an ultraï¬lter, U(Ï2, vi) â© U(Ï1, u) â x, uâ(w,vi) for some i, 1 ⤠i ⤠l. Therefore, by IH, (K, vi, x ) |= Ï2 and (K, u, x ) |= Ï1 for allu â (w, vi). Hence (K, w, x ) |= Ï1 U Ï2. Case Ï = Ï1 S Ï2 is considered analogously.Now, we show that, for all w â W and spatio-temporal terms Ï , (K, w) |= 2 â Ï iï¬ U(Ï, w) = U. Suppose that (K, w) |= 2 â Ï . Then (K, w, y ) |= Ï for all y â V , and so, by IH, U(Ï, w) â y for all y â V . But then U(Ï, w) = U . Conversely, if U(Ï, w) = U then U(Ï, w) â y for ally â V , from which, by IH, (K, w) |= 2 â Ï . It follows immediately that Ï is satisï¬ed in K. It should be also clear that K satisï¬es FSA. This proves (i). The existence of R-maximal points in sets of the form Aw,x,Ï (wherew â W , x â V and Ï is a spatio-temporal term) follows from a result of Fine (1974); seealso (Chagrov & Zakharyaschev, 1997, Theorem 10.36). (ii) The construction is the same as in (i). First we show by induction that, for every spatio-temporal term Ï of PT L ⦠S4u, (K, w, x ) |= Ï iï¬ U(Ï, w) â x. This time, however,instead of U and S we need the inductive step for . Case Ï = Ï . We have (K, w, x ) |= Ï iï¬ there exists an immediate successor w of w such that (K, w , x ) |= Ï iï¬, by IH, there is an immediate successor w of w such thatU(Ï , w ) â x. It remains to recall that U( Ï , w) = U(Ï , w ) whenever w is the immediatesuccessor of w and U( Ï , w) = â whenever w has no immediate successor. The remaining part of the proof is the same as in (i). K Proof of Proposition 3.4. The implication (â) follows immediately from the deï¬nition. (â) Suppose that a PT LÃS4u-formula Ï is satisï¬ed in a tt-model with FSA and a ï¬ow of time F = W, < . Then, by Lemma B.1 (i), Ï is satisï¬able in an Aleksandrov tt-modelM = F, G, V with FSA and based on a quasi-order G = V, R . In view of FSA, for 201
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev every Ï â term Ï, there are ï¬nitely many sets A1, . . . , Ak â V such that V(Ï, w) | w âW = A1, . . . , Ak. Therefore, there are ï¬nitely many time points w1, . . . , wm â W suchthat, for every w â W , there is wi, 1 ⤠i ⤠m, with V(Ï, w) = V(Ï, wi) for all Ï â term Ï.Now we use the Lemmon ï¬ltration (see, e.g., Chagrov & Zakharyaschev, 1997) to constructa tt-model based on a ï¬nite Aleksandrov topological space. First, deï¬ne an equivalencerelation â¼ on V by taking x â¼ y if (M, wi, x ) |= Ï iï¬ (M, wi, y ) |= Ï, for all i, 1 ⤠i ⤠m, and Ï â term Ï. Denote by [x] the equivalence class of x â V . The set V /â¼ of pairwise distinct equivalenceclasses is clearly ï¬nite. Deï¬ne a binary relation S on V /â¼ by taking [x]S[y] if (M, wi, y ) |= IÏ whenever (M, wi, x ) |= IÏ, for all i, 1 ⤠i ⤠m, and Ï â term Ï. Clearly, S is well-deï¬ned, reï¬exive and transitive, and so G = V /â¼, S is a ï¬nite quasi-order. Let V (p, w) = [x] | x â V(p, w), for every spatial variable p and every w â W . Consider the tt-model M = F, G , V . First we show that for all Ï â term Ï, x â V and w â W , (M, w, x ) |= Ï iï¬ (M , w, [x] ) |= Ï. The basis of induction follows from the deï¬nition of V , the cases of intersection and com-plement are trivial, and those of temporal operators follow by IH. Suppose that (M, w, x ) |= IÏ and [x]S[y]. Then there is a moment wi such that (M, w, z ) |= Ï iï¬ (M, wi, z ) |= Ï , for all Ï â term Ï and z â V . By the deï¬nition of S,we have (M, wi, y ) |= Ï , and so (M, w, y ) |= Ï . Finally, by IH, (M , w, [y] ) |= Ï , andsince y was arbitrary, we obtain (M , w, [x] ) |= IÏ . Conversely, let (M , w, [x] ) |= IÏ and xRy. Then [x]S[y], and so (M , w, [y] ) |= Ï , from which, by IH, (M, w, y ) |= Ï . Thus, (M, w, x ) |= IÏ . Finally, by a straightforward induction on the structure of Ï, one can show that (M, w) |= Ï iï¬ (M , w) |= Ï, for all Ï â sub Ï and w â W . It follows that Ï is satisï¬ed in M . K B.1 Temporalisations of S4u Lemma B.2. Let Î be a ï¬nite set of S4u-formulas. Then there is a ï¬nite quasi-order Gsuch that every satisï¬able subset Φ â Î is satisï¬ed in some Aleksandrov model based on G. Proof. For every satisï¬able Φ â Î, ï¬x a model based on a ï¬nite quasi-order GΦ = VΦ, RΦand satisfying Φ. Let n = max|VΦ| : Φ â Î, Φ is satisï¬able and let G be the disjointunion of n full n-ary (transitive) trees of depth n whose nodes are clusters of cardinalityn. It is not diï¬cult to see that every GΦ is a p-morphic image of G. Therefore, everysatisï¬able Φ â Î is satisï¬ed in an Aleksandrov model based on G. K Proof of Theorem 3.1. PSPACE-hardness follows from Theorem 2.1 or 2.5. We showthe matching upper bound. Let Ï be a PT L[S4u]-formula. Since Ï is a PT L ⦠S4u-formula, by Lemma B.1 (ii), it is satisï¬able in a tt-model iï¬ it is satisï¬able in an Aleksandrov tt-model based on the same 202
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity ï¬ow of time. With every (spatial) subformula 2 â Ï of Ï we associate a fresh propositional variable pÏ and denote by Ïâ the PT L-formula that results from Ï by replacing all itssubformulas of the form 2 â Ï with pÏ . We claim that Ï is satisï¬able in an Aleksandrov tt-model over a ï¬ow of time F = W, < iï¬ â¢ there exists a temporal model N = F, U satisfying Ïâ and, ⢠for every w â W , the set Φw = 2âÏ | (N, w) |= p ⪠¬2â
Ï Ï | (N, w) |= ¬pÏ of spatial formulas is satisï¬able. The implication (â) is obvious. Conversely, suppose that we have a temporal model Nsatisfying the conditions above. Let Î = Φ wâW w . By Lemma B.2, there is a ï¬nite quasi-order G such that, for every w â W , we have G, Vw |= Φw for some valuationVw. It should be clear that Ï is satisï¬ed in the Aleksandrov tt-model F, G, V , whereV(p, w) = Vw(p), for every spatial variable p and every w â W . Now, to devise a decision procedure for PT L[S4u] which uses polynomial space in the length of the input formula, one can take the corresponding nondeterministic PSPACEalgorithm for PT L (Sistla & Clarke, 1985; Reynolds, 2004, 2003) and modify it as follows.The algorithm constructs a âpureâ temporal model N = F, U for Ïâ and every time itproduces a state for a time instant w â W , it additionally checks whether the set Φw ofspatial formulas is satisï¬able. By Theorem 2.1, this extra test can also be performed by aPSPACE algorithm, which does not increase the complexity of the âcombinedâ algorithm. K Proof of Theorem 3.2. The proof is essentially the same as that of Theorem 3.1, but nownondeterministic polynomial-time algorithms for the component logics are available. K B.2 Undecidability of PT L ⦠S4u and PT L2 à S4u Note that although our spatio-temporal languages contain no propositional variables, westill can simulate them: for a spatial variable p, formula 2 â p can be regarded as a proposition. Thus, in what follows by a propositional variable p we mean the formula 2 â p, for a spatial variable p (note the diï¬erent typefaces used to denote propositional and spatial variables). Proof of Theorem 3.6. The proof is by reduction of the undecidable Postâs (1946) cor-respondence problem or PCP, for short. It is formulated as follows. Given a ï¬nite alphabetA and a ï¬nite set P of pairs v1, u1 , . . . , vk, uk of nonempty ï¬nite words vi = bi1, . . . , bil , ui = ci (i = 1, . . . , k) i 1, . . . , ciri over A, an instance of PCP, decide whether there exist an N ⥠1 and a sequence i1, . . . , iNof indices such that vi â · · · â v = u â · · · â u , (14) 1 iN i1 iN where â is the concatenation operation. We will construct (using only future-time temporaloperators) a PT L ⦠S4u-formula ÏA,P such that (i) the length of ÏA,P is a polynomial function in the size of both A and P ; (ii) if ÏA,P is satisï¬able in a tt-model based on N, < then there exist an N ⥠1 and a sequence i1, . . . , iN of indices such that (14) holds; 203
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev (iii) if there exist an N ⥠1 and a sequence i1, . . . , iN of indices such that (14) holds then ÏA,P is satisï¬able in a tt-model with FSA and based on N, < ; (iv) ÏA,P is satisï¬able in a tt-model based on N, < iï¬ ÏA,P is satisï¬able in a tt-model based on a ï¬nite ï¬ow of time. The case of Z, < follows immediately. By Lemma B.1 (ii), it suï¬ces to consider onlyAleksandrov tt-models for ÏA,P . We build ÏA,P using spatial variables lefta and righta (a â A), left, right and stripe, as well as propositional variables pairi, for every pair vi, ui , 1 ⤠i ⤠k, and range. The variable range is required to ârelativiseâ temporal operators 2F and 3F in order to ensure that we can construct a model based on a ï¬nite ï¬ow of time. The variable stripe isused to introduce a new âstrict closureâ operator in Aleksandrov spaces by taking, for everyspatio-temporal term Ï , SÏ = stripe C(stripe CÏ ) stripe C(stripe CÏ ) . Denote by Sn a sequence of n operators S. Other abbreviations we need are Ï1 â¡ Ï2 whichstands for (Ï1 Ï2) (Ï2 Ï1) and 2+Ï which replaces Ï â§ 2 F F Ï. The formula ÏA,P is deï¬ned as the conjunction ÏA,P = Ïrange â§ Ïstripe â§ Ïpair â§ Ïeq â§ Ïleft â§ Ïright, where Ïrange = range â§ 3F ¬range â§ 2F (¬range â 2F ¬range), Ïpair = 2+ 3 pair ⧠¬(pair â§ pair F F range â i i j ) , 1â¤iâ¤k 1â¤i<jâ¤k Ïstripe = 2+ 3 F F range â 2 â (stripe â¡ stripe) , Ïeq = 3F range â§ 2â(lefta â¡ righta) , aâA Ïleft is the conjunction of (15)â(21), for all i with 1 ⤠i ⤠k, 2+¬3â left 2â left â¡ left F a leftb â§ 2+ F a , (15) a=b aâA a,bâA 2+ pair â 2â(left F i a lefta) , (16) aâA 2âleft â§ 2+2â(left Sleft), (17) F 2+ pair â 2â(left Sli left) , (18) F i 2+ pair â 2â((Sjleft Sj+1left) left ) , (19) F i biliâj j<li pair â 3â i Ï left, (20) i 2F pair â 2â i ((left Sleft) SÏ left) , (21) i 204
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity       = left r = left y    Â Ârt n bi4 4 li t . = left Sleft . . . .  . 4 . . . . . . . v . . . . l i4 . i4 y    Â Âr n bi4 3+1 1 y   Â Ârt Âr n bi3 3 li . . . .  . 3 . . . . . . v . . . l i3 . i3 y   Â Âr Âr n bi3 2+1 1 y  Â Ârt Âr Âr n bi2 2 li . . .  . 2 . . . . . v . . l i2 . i2 y  Â Âr Âr Âr n bi2 1+1 1 y Â Ârt Âr Âr Âr n bi1 1 li . .  . 1 . . . . v . l i1 . i1 y Â Âr Âr Âr Âr 1 bi1 1 pairi pair pair pair 1 i2 i3 i4 0 1 2 3 4 . . . range Figure 7: Model satisfying Ïleft, for N = 4. where Ï left = left S left S(left · · · Sleft ) . . . i bi bi bi bi 1 2 3 li (remember that li is the length of the word vi). The conjunct Ïright is deï¬ned by replacingin Ïleft all occurrences of left with right, lefta with righta (for a â A), li with ri and Ï left i with Ï right, which is deï¬ned similarly. (Note that pair i i occurs in both Ïleft and Ïright.) Let us prove that ÏA,P is as required. Suppose that (M, 0) |= ÏA,P , for an Aleksandrov tt-model M = N, < , G, V with G = V, R . Since (M, 0) |= Ïeq, we can ï¬nd an N , 1 ⤠N < Ï, such that (M, N ) |= range â§ 2â(lefta â¡ righta). (22) aâA In view of Ïrange, we have (M, j) |= range for all j, 0 ⤠j ⤠N . Let i1, . . . , iN be thesequence of indices such that, for 1 ⤠j ⤠N , we have (M, j â 1) |= pairi (Ïpair ensures j that there is a unique sequence of this sort). We claim that (14) holds for this sequence. Since Ïstripe holds in M at 0, we have, for every y â V , (M, 0, y ) |= stripe iï¬ (M, j, y ) |= stripe for all j, 0 ⤠j ⤠N . Denote by Rs the transitive binary relationon V deï¬ned by taking xRsy if there is z â V such that xRzRy and (M, 0, x ) |= stripeholds iï¬ (M, 0, z ) |= stripe. Then we clearly have that, for every j, 0 ⤠j ⤠N , and everyx â V , (M, j, x ) |= SÏ iï¬ there is y â V such that xRsy and (M, j, y ) |= Ï. Call a sequence y1, . . . , yl of (not necessarily distinct) points from V an Rs-path in V(left, j) of length l if y1, . . . , yl â V(left, j) and y1Rsy2Rs . . . Rsyl. For every sequence 205
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev z1, . . . , zl of points from V(left, j) we deï¬ne leftwordj(z1, . . . , zl) = a1, . . . , al , where the ai are the (uniquely determined by (15)) symbols from A with (M, j, zi ) |= lefta . i We will show now that, for every j, 1 ⤠j ⤠N , the following holds: (a) there exists an Rs-path y1, . . . , yn in V(left, j) of length n + · · · + l such j j = li1 ij that leftword â j (y1, . . . , yn ) = v . . .â v ; j i1 ij (b) every Rs-path in V(left, j) is of length ⤠nj; (c) for every Rs-path y1, . . . , yn in V(left, j), we have j leftword â j (y1, . . . , yn ) = v . . .â v . j i1 ij Indeed, for j = 1, we have (a) by (M, 0) |= pairi and (20), (b) by (17) and (18), and 1 (c) by (19). Now assume inductively that (a)â(c) hold for some j, 1 ⤠j < N . Let y1, . . . , yn be a maximal R â V(left, j + 1). j s-path in V(left, j). First, by (16), y1, . . . , ynj Second, since (M, j, yn ) |= left Sleft and (M, j) |= pair , (21) now implies that j ij+1 there exist yn such that y is an R j +1, . . . , ynj +li 1, . . . , yn s-path in V(left, j + 1), j+1 j +lij+1 as required in (a). For (b) and (c), observe ï¬rst that for every Rs-path y1, . . . , yl inV(left, j + 1), y1, . . . , ylâl is an R i s-path in V(left, j), by (18). So l ⤠nj+1 must j+1 hold. If l = nj+1 then leftword â j (y1, . . . , ylâl ) = v . . . â v by the induction hypo- i i i j+1 1 j thesis, and so leftword â j+1(y1, . . . , ylâl ) = v . . . â v by (16). On the other hand, i i i j+1 1 j leftwordj+1(ylâl by (19), and so we have leftword i +1, . . . , yl) = vi j+1(y1, . . . , yl) = j+1 j+1 vi â . . .â v â v , as required. 1 ij ij+1 We can repeat the argument above for the âright sideâ as well. For every sequence z1, . . . , zl of points from V(right, j), deï¬ne rightwordj(z1, . . . , zl) = a1, . . . , al , where the ai are the uniquely determined elements of A such that (M, j, zi ) |= righta . i We then have, for every 1 ⤠j ⤠N : (a ) there is an Rs-path y1, . . . , ym in V(right, j) of length m + · · · + r such that j j = ri1 ij rightword â j (y1, . . . , ym ) = u . . .â u ; j i1 ij (b ) every Rs-path in V(right, j) is of length ⤠mj; (c ) for every Rs-path y1, . . . , ym in V(right, j), we have j rightword â j (y1, . . . , ym ) = u . . .â u . j i1 ij 206
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Now, by (15) and (22), we have V(left, N ) = V(right, N ). By (a), there exists an Rs- path y1, . . . , yl in V(left, N ) such that l = nN and leftword â N (y1, . . . , yl) = vi . . .â v . 1 iN By (b ), we have nN ⤠mN . Similarly, using (a ) and (b), we obtain mN ⤠nN , from whichnN = mN . Hence, by (c ), rightword â N (y1, . . . , yl) = ui . . .â u . Since, by (22), 1 iN leftwordN (y1, . . . , yl) = rightwordN (y1, . . . , yl), we ï¬nally obtain vi â . . .â v = u â . . .â u , as required. 1 iN i1 iN Conversely, suppose there is an N ⥠1 and a sequence i1, . . . , iN for which (14) holds. We will show that ÏA,P is satisï¬able in an Aleksandrov tt-model M = N, < , N, ⤠, V with FSA. Let nj = li + · · · + l and m + · · · + r for every j, 1 ⤠j ⤠N . By our 1 ij j = ri1 ij assumption, nN = mN and we have vi â . . .â v = a = u â . . .â u . 1 iN 1, . . . , anN i1 iN Deï¬ne a valuation V by taking ⢠V(range, j) is true iï¬ 0 ⤠j ⤠N , ⢠V(stripe, j) = 2m | m < Ï, 0 ⤠j ⤠N , ⢠V(pairi, j â 1) is true iï¬ i = ij and 1 ⤠j ⤠N, ⢠V(lefta, j) = k | 1 ⤠k ⤠nj, ak = a for a â A and 1 ⤠j ⤠N , ⢠V(righta, j) = k | 1 ⤠k ⤠mj, ak = a for a â A and 1 ⤠j ⤠N, ⢠V(left, j) = V(lefta, j) and V(right, j) = V(righta, j). aâA aâA One can easily check that under this valuation we have (M, 0) |= ÏA,P and M satisï¬esFSA. It is also readily seen that ÏA,P is satisï¬able in a tt-model based on N, < iï¬ it issatisï¬able in a tt-model based on a ï¬nite ï¬ow of time. K Proof of Theorem 3.7. We show this by modifying formulas from the proof of The-orem 3.6. First, we replace Ïstripe with 2+2â(stripe 2 2â(stripe 2 F F stripe) â§ 2+ F F stripe). Then, Ïleft is the conjunction of (15 )â(21 ), for all i with 1 ⤠i ⤠k, 2+¬3â left 2â left â¡ left F a leftb â§ 2+ F a , (15 ) a=b aâA a,bâA 2+ pair â 2â(left F i a 2F lefta) , (16 ) aâA 2âleft â§ 2+2â(left Sleft), (17 ) F 2+ pair â 2â(left 3 F i F Sli left) , (18 ) 2+ pair â 2â (left 2 ) , (19 ) F i F left) 2F ((Sjleft Sj+1left) leftbiliâj j<li pair â 2 i F 3 â Ï left, (20 ) i 2F pair â 2â i ((left Sleft) 2F SÏleft) , (21 ) i 207
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev where the Ï left are deï¬ned exactly as in the proof of Theorem 3.6. Formula Ï i right is modiï¬ed in a similar way. K Remark B.3. In fact, the set of PCP instances without solutions is not recursively enumer-able and therefore, the proofs above show that the sets of PT L ⦠S4u and PT L2 à S4u-formulas which are true in all models based on N, < , Z, < or ï¬nite ï¬ows of time are notrecursively enumerable either. Therefore, these logics are not recursively axiomatisable. Appendix C. Spatio-Temporal Logics Based on RC In this appendix we establish lower and upper complexity bounds for a wide range ofdecidable spatio-temporal combinations and, in particular, prove Theorems 3.8â3.15. Webegin with a straightforward generalisation of Lemma A.1 to the spatio-temporal case: Lemma C.1. (i) If a PT L à RC-formula Ï is satisï¬able in a tt-model with FSA and basedon a ï¬ow of time F then Ï is satisï¬able in an Aleksandrov tt-model based on F and a ï¬nitedisjoint union of ï¬nite brooms. (ii) If a PT L ⦠RC-formula Ï is satisï¬able in a tt-model based on a ï¬ow of time F then Ï is satisï¬able in an Aleksandrov tt-model based on F and a (possibly inï¬nite) disjoint unionof Ï-brooms. Proof. (i) By Lemma B.1 (i), Ï is satisï¬able in an Aleksandrov tt-model based on F and aï¬nite quasi-order G. The rest of the proof is similar to that of Lemma A.1. Further detailsare left to the reader. (ii) By Lemma B.1 (ii), Ï is satisï¬able in an Aleksandrov tt-model based on F and a quasi-order G = V, R . The rest of the proof again is similar to that of Lemma A.1. Weonly note that although G can be inï¬nite, still for every x â V there is a y â V0 such thatxRy. This is guaranteed by the condition that the set Aw,x, has a maximal point. K Observe that Aleksandrov spaces are essentially inï¬nite in case (ii) of Lemma C.1 and a generalisation of Lemma A.2 does not go through. First, we can easily enforce a topologicalspace to be inï¬nite using the PT L ⦠RCC-8 formula 2+NTTP(p, p). F Moreover, the formula 3â( p I p ) â§ 2+2â( p p ) â§ 2+2â p I p I p p p F F is satisï¬ed in an Aleksandrov tt-model based on a single Ï-broom, but cannot be satisï¬edin an Aleksandrov tt-model based on a union of n-brooms for any ï¬nite n. On the other hand, Aleksandrov tt-models based on disjoint unions of n-brooms, where n is bounded by the width of the formula, are enough for spatio-temporal logics based onRCâ. Recall that spatial terms Ï of PT L à RCâ (and PT L ⦠RCâ) are deï¬ned as follows δ ::= | Ï, Ï ::= I | δ | Ï1 Ï2, Ï ::= δ1 · · · δm | δ Ï | Ï, 208
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity where the are spatio-temporal Boolean region terms of PT L à BRCC-8 (and PT L ⦠BRCC-8, respectively). It is not hard to see that, for every tt-model M = F, T, V withF = W, < , T = U, I and every w â W , we have V(δ, w) = CIV(δ, w) and V(Ï, w) = ICV(Ï, w), (23) i.e., the δ are always interpreted by regular closed sets, whereas the Ï by regular open ones. We deï¬ne the width w(Ï) of a PT L à RCâ-formula Ï as the maximal number m of conjuncts in its subformulas of the form 2 â (δ1 · · · δm), if such subformulas exist, and put w(Ï) = 1 otherwise. Lemma C.2. (i) If a PT L à RCâ-formula Ï is satisï¬able in a tt-model with FSA andbased on a ï¬ow of time F then Ï is satisï¬able in an Aleksandrov tt-model based on F and aï¬nite disjoint union of w(Ï)-brooms. (ii) If a PT L ⦠RCâ-formula Ï is satisï¬able in a tt-model based on a ï¬ow of time F then Ï is satisï¬able in an Aleksandrov tt-model based on F and a (possibly inï¬nite) disjointunion of w(Ï)-brooms. Proof. By Lemma C.1, we may assume that Ï is satisï¬ed in an Aleksandrov tt-model M = F, G, V , where F = W, < and G = V, R is a disjoint union of brooms (in (i), the union and the brooms are ï¬nite). Without loss of generality we may assume that Ï is composed(using temporal operators and the Booleans) from formulas of the set Î£Ï = 3 â Ï1, . . . , 3 â Ïn,7 where every Ïi has one of the following forms δ1 · · · δm, δ Ï or Ï, (24) and the δi, δ and Ï are as deï¬ned above. For every 3 â Ï â Î£Ï and every w â W with (M, w) |= 3 â Ï , we ï¬x a point xÏ,w â V such that (M, w, xÏ,w ) |= Ï . We may assume that the xÏ,w are pairwise distinct and that theroots of all the brooms are the points of the form xÏ,w for some w â W and 3 â Ï â ΣÏ. Therefore, G is a disjoint union of brooms bÏ,w, for 3 â Ï â Î£Ï and w â W . Let us construct a model M = F, G , V as follows. Given a broom bÏ,w, we delete some of its leaves depending on the form of Ï . Three cases are possible: Case Ï = δ1 · · · δm: take m leaves y1, . . . , ym of bÏ,w such that (M, w, yi ) |= δi and xÏ,wRyi for i = 1, . . . , m and remove all leaves diï¬erent from y1, . . . , ym. Case Ï = δ Ï: take a leaf y of bÏ,w such that (M, w, y ) |= δ and xÏ,wRy and remove all other leaves. Note that, by (23), we have (M, w, y ) |= Ï, and therefore (M, w, y ) |= Ï . Case Ï = Ï: take a leaf y of bÏ,w such that xÏ,wRy and remove all other leaves. By (23), we have (M, w, y ) |= Ï . Denote by bÏ,w the resulting broom. Clearly, it is a w(Ï)-broom. Let G = V , R be the disjoint union of all bÏ,w, for 3 â Ï â Î£Ï and w â W . It should be clear that G is as required. Finally, we deï¬ne V by taking for every spatial variable p, every w â W andevery x â V , x â V (p, w) iï¬ there is y â V of depth 0 such that xR y and y â V(p, w). 7. We treat 3 â as primitive and 2 â as an abbreviation. 209
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev To show that Ï is satisï¬ed in M , we ï¬rst prove that, for all w â W and all 3 â Ï â ΣÏ, (M , w) |= 3 â Ï iï¬ (M, w) |= 3 â Ï. It is readily proved by induction that we have (M , w, x ) |= Ï iï¬ (M, w, x ) |= Ï , for allpoints x â V of depth 0, all w â W and all spatio-temporal terms Ï . Then, by the construction, we also have that, for all formulas 3 â Ï â Î£Ï and all w â W , (M, w) |= 3 â Ï implies (M , w) |= 3 â Ï . So it remains to show that (M, w) |= ¬3 â Ï implies (M , w) |= ¬3 â Ï for all 3 â Ï â Î£Ï and all w â W . Suppose that we have (M , w, x ) |= Ï and (M, w) |= ¬3 â Ï . Consider three possible cases for Ï : Case Ï = δ1 · · · δm. Then, for every i, 1 ⤠i ⤠m, there is yi â V of depth 0 such that xR yi and (M , w, yi ) |= δi. But then (M, w, yi ) |= δi and, by (23), (M, w, x ) |= δi.Therefore, (M, w, x ) |= Ï , contrary to (M, w) |= ¬3 â Ï . Case Ï = δ Ï. Then there is y â V of depth 0 such that xR y, (M , w, y ) |= δ and, by (23), (M , w, y ) |= Ï. Thus (M , w, y ) |= Ï . But then (M, w, y ) |= Ï , contrary to(M, w) |= ¬3 â Ï . Case Ï = Ï. Then there is y â V of depth 0 with xR y and, by (23), (M , w, y ) |= Ï . But then (M, w, y ) |= Ï , contrary to (M, w) |= ¬3 â Ï . Now, by a straightforward induction we can easily show that, for all w â W and all formulas Ï built from Î£Ï using the temporal operators and the Booleans, (M , w) |= Ï iï¬ (M, w) |= Ï. It follows that Ï is satisï¬ed in M . K C.1 Lower Complexity Bounds (I) Proof of Theorem 3.10, lower bound. The proof is by reduction of an arbitrary prob-lem in 2EXPSPACE to the satisï¬ability problem of PT L ⦠RC. Let A be a (single-tape,deterministic) Turing machine such that A halts on every input (accepting or rejecting it), and A uses ⤠22f(n) cells of the tape on any input of length n, for some polynomial f . Givenany such Turing machine A and an input x for it, we will construct a PT L ⦠RC-formulaÏA,x (using only future-time temporal operators) such that (i) the length of ÏA,x is polynomial in the size of A and x; (ii) if ÏA,x is satisï¬able in a tt-model based on N, < then A accepts x; and (iii) if A accepts x then ÏA,x is satisï¬able in a tt-model with FSA and based on N, < . The case of Z, < as a ï¬ow of time (with or without FSA) follows immediately. The caseof ï¬nite ï¬ows of time can be proved by relativising the temporal operators of ÏA,x (say,by a propositional variable range as in the proof of Theorem 3.6 in Appendix B.2 and inthe proof of the lower bound of Theorem 3.9 below): we can obtain a formula Ï such A,x that Ï is satisï¬able in an Aleksandrov tt-model based on A,x N, < iï¬ it is satisï¬able in an Aleksandrov tt-model based on the same quasi-order but on a ï¬nite ï¬ow of time. So thisway all the lower bound results of this theorem follow. 210
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Given a Turing machine A, polynomial f , and input x = x1, . . . , xn as above, let d = f (n), exp(1, d) = d · 2d and exp(2, d) = exp(1, d) · 2exp(1,d). Then we have 22f(n) ⤠exp(2, d). (25) Our plan is as follows. First, we will show that âyardsticksâ of length exp(2, d) (similar tothose used by Stockmeyer, 1974 or Halpern and Vardi, 1989) can be encoded by PT L ⦠RC-formulas of length polynomial in d. These yardsticks will be used to deï¬ne a temporaloperator exp(2,d). Then, using this operator, we will encode the computation of A on input x. By Lemma C.1 (ii), if a PT L ⦠RC-formula ÏA,x is satisï¬ed in a tt-model based on a ï¬ow of time N, < , then it is satisï¬ed in an Aleksandrov tt-model M = N, < , G, U , where G = V, R is a disjoint union of Ï-brooms. Take such a model M and suppose that thePT L ⦠RC-formula8 2+2â aux â¡ aux (26) F is true in M at moment 0. Since region aux does not change over time, we can divide allpoints in V into three disjoint sets: external, boundary and internal points with respect to aux âi.e., those satisfying ep(aux) = aux , bp(aux) = aux I aux and I aux , respectively. Note that every boundary point has a non-boundary R-successor, so boundarypoints can only be of depth 1. In what follows we simply speak about external and boundarypoints not mentioning âwith respect to aux .â We deï¬ne the â exp(2,d) operatorâ by a PT L ⦠RC-formula of length polynomial in d as follows: (a) First, we âencodeâ yardsticks of length d. We will use diï¬erent formulas for yardsticks on external points and for yardsticks on boundary points. (b) Then, with the help of d-yardsticks, we âencodeâ yardsticks of length exp(1, d). We will again use diï¬erent formulas for external and boundary points. (c) Next, with the help of exp(1, d)-yardsticks on both boundary and external points, we âencodeâ yardsticks of length exp(2, d) on boundary points. (d) Finally, with the help of exp(2, d)-yardsticks on boundary points, we deï¬ne a polyno- mial-length â exp(2,d) operatorâ applicable to propositional variables. Step (a). Suppose that (26) and the following formula hold in M at 0: 2+2â bp(aux) δ 2â ep(aux) δext F 0,d â§ 2+ F 0,d (27) where dâ1 δ j 0,d = delim0 â¡ ddelim0 delim0 delim0 , j=1 8. Recall that Ï1 â¡ Ï2 stands for (Ï1 Ï2) (Ï2 Ï1). We assume that and bind stronger than â¡. 211
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev and δext results from δ 0,d 0,d by replacing each occurrence of delim0 with ext delim0. Take a boundary point z. Suppose that v â N is such that (M, v, x ) |= delim0 . By δ0,d, for every time moment w ⥠v, (M, w, z ) |= delim0 iï¬ w â¡ v (mod d), that is, on z, delim0 holds once in every d time instants, starting from v. By the secondconjunct of (27), external points of aux behave similarly with respect to ext delim0 . Step (b). To encode yardsticks of length exp(1, d), recall ï¬rst that every number a < 2d can be represented in binary by a sequence a0 . . . adâ1 of bits. We will âmarkâ the bits ofbinary numbers by a region term bit1 as follows. Given a boundary point z and a timemoment v such that (M, v, z ) |= delim0 , we say that an interval [w, w + d â 1], for somew = v + j · d, j â N, encodes a number a < 2d on z, if for every i < d, (M, w + i, z ) |= bit1 iï¬ ai = 1. Recall that the binary representation b0 . . . bdâ1 is the successor of a0 . . . adâ1 modulo 2d ifthe following holds: for all i, 0 ⤠i < d, we have ai = bi iï¬ aj = 0, for some j, i < j < d.We will use the d-intervals starting from v to encode < 2d numbers in such a way thatconsecutive intervals encode consecutive (modulo 2d) numbers, starting from 0. So, suppose that (26), (27) and the following formula hold in M at 0: 2+2â bp(aux) γ 2â ep(aux) γext F 1,d δ1,d â§ 2+ F 1,d δext 1,d , (28) where γ1,d = lwr1 â¡ delim0 bit1 lwr1 zr1 â¡ bit1 delim0 zr1 delim1 â¡ delim0 zr1 , δ1,d = lwr1 â¡ bit1 â¡ dbit1 , and both γext and δext result from γ 1,d 1,d 1,d and δ1,d, respectively, by attaching preï¬x ext to all of their spatial variables (save aux). Take a boundary point z. Suppose that v â N is such that (M, v, z ) |= delim1 . Then, by the last conjunct of γ1,d, we have (M, v, z ) |= delim0 . Since, by (a), delim0holds once in every d time instants on z, delim0 âmarksâ the starting moment of each d-interval. Then, by the ï¬rst conjunct of γ1,d, for every i, 0 ⤠i < d, we have9 (M, v + i, z ) |= lwr1 iï¬ (M, v + j, z ) |= bit1 , for all j, i < j < d. Therefore, δ1,d says that consecutive < 2d numbers (starting with 0) are encoded by consec-utive d-intervals (starting from v). Similarly to the ï¬rst conjunct of γ1,d, its second conjunctensures that, for every i, 0 ⤠i < d, (M, v + i, z ) |= zr1 iï¬ (M, v + j, z ) |= bit1 , for all j, i ⤠j < d. 9. Since we cannot apply the U operator to form spatio-temporal terms, auxiliary regions are used instead: ¦ § ¦ §  ¦ § ¦ §¡ ¦ § ¦ § ¦ § lwr1 â¡ delim0 bit1 lwr1 ensures that lwr1 behaves as bit1 U delim0 . This equality term can indeed be regarded as a ï¬xed point characterisation of the U operator. Note also that ¦ § ¦ § we do not need to require (as we should do for the ï¬xed point characterisation) lwr1 3F delim0 to be true because the eventuality is already enforced by δ0,d. 212
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity So, by the last conjunct of γ1,d, delim1 holds on z once in every exp(1, d) = d · 2d timeinstants, starting from v. By the second conjunct of (28), external points behave similarlywith respect to ext delim1 . Step (c). Now we construct yardsticks of length exp(2, d), using the exp(1, d)-yardsticks constructed in (b). Suppose that (26)â(28) and the following formulas hold in M at 0: 2+2â bp(aux) ext delim 2â ext delim F 1 â§ 2+ F 1 (ep(aux) bp(aux)) , (29) 2+2â ep(aux) η F 1,d(bit2) , (30) 2+2â bp(aux) γ F 2,d δ2,d , (31) where γ2,d is deï¬ned similarly to γ1,d and η1,d(bit2) = jm1 bit2 â¡ ext delim1 bit2 ext delim1 jm1 bit2 , δ2,d = bit2 â¡ I bit2 lwr2 â¡ bit2 â¡ J1,d bit2 , J1,d bit2 = I (aux ext delim1) jm1 bit2 . Take a boundary point z. Suppose v is a time moment such that (M, v, z ) |= delim2 .Then, by the last conjunct of γ2,d, (M, v, z ) |= delim1 . We know from (b) that delim1holds on z once in every exp(1, d) time instants starting from v. So, by δ2,d and the ï¬rstconjunct of γ2,d we intend to express that consecutive < 2exp(1,d) numbers (starting with0) are encoded by consecutive exp(1, d)-intervals starting from v. If we could do this then,by the last conjunct of γ2,d, delim2 would hold on z once in every exp(2, d) time instantsstarting from v. The only problem (and the only diï¬erence from step (b)) is that to âmarkâthe bits of < 2exp(1,d) binary numbers by a term bit2 , we need to show that the (polynomiallength) term J1,d bit2 actually deï¬nes â exp(1,d) bit2 â in the sense that, for every w ⥠v, (M, w, z ) |= J1,d bit2 iï¬ (M, w + exp(1, d), z ) |= bit2 . (32) Suppose ï¬rst that (M, w, z ) |= J1,d bit2. Then, by (29), there is an external R-successor ywof z (of depth 0) such that (M, w, yw ) |= ext delim1 , and so (M, w, yw ) |= jm1 bit2 .On the other hand, it is not hard to see that if (M, w, z ) |= J1,d bit2, then there isan external R-successor yw of z (of depth 0) such that (M, w, yw ) |= ext delim1 but(M, w, yw ) |= jm1 bit2 . In both cases, it is readily checked that if (M, w, y ) |= ext delim1 , for some external point y, then, by (30), (M, w, y ) |= jm1 bit2 iï¬ (M, w + exp(1, d), y ) |= bit2 . Now (32) follows by the ï¬rst conjunct of δ2,d. Step (d). We are now in a position to deï¬ne a polynomial-length â exp(2,d) operatorâ J2,d applicable to propositional variables. Recall that a propositional variable p stands for spatialformula 2 â p, where p is a spatial variable associated with p. Now, for every propositional 213
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev variable p we intend to apply the new operator to, we introduce a fresh spatial variablejm2 p. Suppose that (26)â(31) and the following formulas hold in M at 0: 2+3â bp(aux) delim F 2 , (33) 2+ 2â p â ¬2â p â§ 2+2â η F F 2,d(p), (34) where η2,d(p) is obtained by replacing bit2, jm1 bit2 and ext delim1 in η1,d(bit2) with p,jm2 p and delim2, respectively. Let J2,d p = 2 â (bp(aux) delim2 ) jm2 p . We claim that, for every time moment w and every propositional variable p, (M, w) |= J2,d p iï¬ (M, w + exp(2, d)) |= p. (35) Suppose ï¬rst that (M, w) |= J2,d p. Then, by (33), there is a boundary point z suchthat (M, w, z ) |= delim2 , and therefore (M, w, z ) |= jm2 p . On the other hand, if (M, w) |= J2,d p, then there is a boundary point z with (M, w, z ) |= delim2 but(M, w, z ) |= jm2 p . In both cases, it is readily checked that if (M, w, z ) |= delim2 ,for some boundary point z, then, by the second conjunct of (34), (M, w, z ) |= jm2 p iï¬ (M, w + exp(2, d), z ) |= p . Now (35) follows by the ï¬rst conjunct of (34). Finally, we are in a position to deï¬ne the PT L ⦠RC-formula ÏA,x that encodes the computation of Turing machine A on input x. Let A be the tape alphabet (with the blanksymbol b â A) and S the set of states (with two halt states syes and sno in S) of A. We usethe symbol £ / â A to mark the left end of the tape. We know that the space used by A on input x = x1, . . . , xn is ⤠22f(n), which is ⤠exp(2, d) by (25). So we can represent eachconï¬guration of the computation of A on x as a ï¬nite word £, a1, . . . , aiâ1, s, ai , ai+1, . . . , am, b, . . . , b of length exp(2, d), where a1, . . . , am â A and s, ai â S à A represents the current stateand the active cell. The transition function δ of A takes triples of the form ai, s, aj , ak(for ai â A ⪠£, aj, ak â A, s â S â syes, sno) to similar triples. For instance, δ(ai, s, aj , ak) = ai, aj, s , ak means that, when being in state s and reading symbol aj, the new state should be s andthe head should move one cell to the right. We also assume that, for all ai â A ⪠£ andaj, ak â A, we have δ(ai, syes, aj , ak) = ai, aj, ak and δ(ai, sno, aj , ak) = ai, aj, akmeaning that the head is removed after A is being halted. Now, for every α â A ⪠£ ⪠(S à A), we introduce a fresh propositional variable pα. Let ÏA,x be the conjunction of (26)â(31), (33) and an instance of (34), for each pα, as well 214
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity 9 6 9 6 exp(1, d) many lj exp(1,d) exp(1, d) many lj exp(1,d) § 0 l exp(2,d)â1 l      ¤ 0 r § ¤exp(2,d)â1 ¦ Â¥      r . . . I ¦ Â¥ r  ¨ B I ¦ § r  ¨ B ¦ § r ¨ d s T  r ¨ ep(aux) d s T  r d  ¨ I aux ep(aux) rd  ¨ I aux r ¨ r ¨ d r rd d r rd  ¨  ¨ r E r E 0 exp(2,d)â1 8 bp(aux) 7 8 bp(aux) 7 exp(2, d) many (exp(1, d) + 1)-brooms Figure 8: Structure of yardsticks. as the following formulas: 2+ ¬p ⨠¬p F α β , (36) α,βâAâªÂ£âªSÃA α=β p â§ â§ â§ â§ U £ (p s (p (· · · â§ (p p p 0,x1 x2 xn b £) · · · ))), (37) 2+ af head â p F s,a , (38) s,a âSÃA 2+ af head â p â J â§ p â J â§ p â J F α 2,d pα β 2,d pβ γ 2,d pγ , (39) δ(α,β,γ)= α ,β ,γ 2+ ¬ af head ⨠af head ⨠af head â p â J F a 2,d pa , (40) aâAâªÂ£ 3F p ⧠¬3 s p yes,a F sno,a . (41) aâA aâA Suppose ï¬rst that ÏA,x holds in M at time moment 0. By (36)â(40) and (35), the consecutiveconï¬gurations of the computation of A on input x are properly âencodedâ along the timeaxis. (For instance, p£ holds once in every exp(2, d) time moments.) Finally, (41) says thatA accepts input x. Conversely, suppose that A accepts input x. We will deï¬ne an Aleksandrov tt-model M = N, < , G, U with FSA that satisï¬es ÏA,x. Let the partial order G = V, R be a disjoint union of exp(2, d) many (exp(1, d) + 1)-brooms (see Fig. 8): V = ri | i < exp(2, d) ⪠lj | i < exp(2, d), j ⤠exp(1, d), i zRy iï¬ z = y or z = ri, y = lj, for some i, j. i Suppose that the number of steps in the computation of A on x is m. Then M will havea preï¬x of length N = m · exp(2, d) after which the ï¬nal conï¬guration (without a haltingstate) repeats to inï¬nity. For w â N, let exp(1,d) U(w, aux) = l | i < exp(2, d). i 215
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Then it is easy to see that the boundary points are the ri, and the external points are thelj, for i < exp(1, d). Now put, for every w â i N, exp(1,d) U(w, delim2) = l | i â¡ w (mod exp(2, d)), i exp(1,d) U(w, delim1) = l | i â¡ w (mod exp(1, d)), i exp(1,d) U(w, delim0) = l | i â¡ w (mod d), i U(w, ext delim1) = lv | i v â¡ w (mod exp(1, d)), i < exp(2, d), U(w, ext delim0) = lv | i v â¡ w (mod d), i < exp(2, d). The valuations for the other variables should be clear. We then have exp(1,d) (M, w, z ) |= delim2 iï¬ z = ri or z = l for some i â¡ w (mod exp(2, d)), i exp(1,d) (M, w, z ) |= delim1 iï¬ z = ri or z = l for some i â¡ w (mod exp(1, d)), i (M, w, z ) |= ext delim1 iï¬ z = ri or z = lvi for some v â¡ w (mod exp(2, d)) and i < exp(2, d), and so on, as required. It is not hard to see that M satisï¬es FSA and (M, 0) |= ÏA,x. K Proof of Theorem 3.9, lower bound. The proof is by reduction of the 2n-corridor tilingproblem which is known to be EXPSPACE-complete (Chlebus, 1986; van Emde Boas, 1997).The problem can be formulated as follows: given an instance T = T, t0, t1, n , where T isa ï¬nite set of tile types, t0, t1 â T and n > 0, decide whether there is an m â N such thatT tiles the m à 2n-grid (or corridor) in such a way that t0 is placed onto 0, 0 , t1 onto m â 1, 0 , and the top and bottom sides of the corridor are of some ï¬xed colour, say, white. Suppose T = T, t0, t1, n is given. Our aim is to construct (using only future-time temporal operators) a PT L ⦠BRCC-8 formula ÏT such that (i) the length of ÏT is a polynomial function of |T | and n; (ii) if ÏT is satisï¬able in a tt-model based on N, < then there is m â N such that T tiles the m à 2n-corridor; (iii) if there is m â N such that T tiles the m à 2n-corridor, then ÏT is satisï¬able in a tt-model with FSA and based on N, < ; (iv) ÏT is satisï¬able in a tt-model based on N, < iï¬ it is satisï¬able in a tt-model based on a ï¬nite ï¬ow of time. The case of Z, < follows immediately. Recall that, by Lemma C.2 (ii), if ÏT is satisï¬ed in a tt-model then it is satisï¬ed in an Aleksandrov tt-model M = N, < , G, V , where G = V, R is a disjoint union of Ï- brooms. To explain the meaning of ÏT âs subformulas, we assume that such a model M isgiven. Throughout the proof we use only a restricted subset of RCC-8 predicates: for spatio-temporal terms Ï1 and Ï2 constructed from spatial variables using only the complement, theintersection and the next-time operator , we need EQ(Ï1, Ï2) as well as two abbreviations P(Ï1, Ï2) = EQ(Ï1, Ï2) ⨠TPP(Ï1, Ï2) ⨠NTPP(Ï1, Ï2) and E Ï1 = ¬DC(Ï1, Ï1) standing for âÏ1 216
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity 0 m · 2n (m + 1) · 2n count range E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ... â â â â â â â â â â â â â â â â â Ï0 Ï1 Ï2 Ï3 Ï0 Ï1 Ï2 Ï3 Ï0 Ï1 Ï2 Ï3 Ï0 Ï1 Ï2 Ï3 Ï0 Figure 9: Counting formulas for m = 3 and n = 2. is a part of Ï2â and âÏ1 is nonempty,â respectively. Clearly, this language forms a subset ofPT L ⦠BRCC-8 (in fact, as we show in Remark C.3 below, the proof goes through for aneven more restricted subset of the langauge). Our ï¬rst step in the construction of ÏT (which will contain, among many others, spatial variables t for all t â T ) is to write down formulas forcing a sequence y0, y1, . . . , ym·2nâ1of distinct points (of depth 0) from V , for some m â N, such that, for each i < m · 2n,(M, i, yi ) |= t for a unique tile type t â T . If i = k · 2n + j, for some k < m, j < 2n,then we will use yi (at time i) to encode the pair k, j of the m à 2n-grid. Thus, the upneighbour k, j + 1 of k, j will be coded by the point yi+1 at time i + 1, while its rightneighbour k + 1, j by yi+2n at moment i + 2n (see Fig. 10). Let q0, . . . , qnâ1 be pairwise distinct propositional variables and d Ï nâ1 j = qd0 ⧠· · · â§ q , 0 nâ1 where dnâ1 . . . d0 is the binary representation of j < 2n, q0 = ¬q = q i i and q1 i i, for each i. Suppose that the formula count â§ Ï0 â§ count U (Ï0 â§ 2+¬count) â§ 2+ count â Ï (42) F F is true in M at 0, where count is a fresh propositional variable and Ï is the followingâcountingâ formula (the length of which is polynomial in n) Ï = q ⧠¬ â ¬ â§ â§ â i qk qi qk (qi qi) â§ Ï2nâ1 â Ï0 . k<n i<k i<k k<i<n Then there is an m â N such that count is true before moment (m + 1) · 2n and false startingfrom (m + 1) · 2n. The sequence Ï0, Ï1, . . . , Ï2nâ1 is repeated m+1 times along the time-line,i.e., while count is true. Let range = 3F (count â§ Ï0). Clearly, range is true before moment m · 2n and then always false (see Fig. 9). Let equ, p0, . . . , pnâ1 and e0, . . . , enâ1 be fresh distinct spatial variables, and d Ï nâ1 j = pd0 · · · p , 0 nâ1 where dnâ1 . . . d0 is the binary representation of j < 2n, p0 = p = p i i and p1 i i, for each i. Suppose that (42) and 2+EQ equ, e 2+ q â EQ(e 2+EQ p F i â§ F i i, pi) â§ F i, pi (43) i<n i<n i<n 217
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev are true in M at 0. Then, by the ï¬rst two conjuncts of (43), for all i â N and y â V ofdepth 0, there is j < 2n such that (M, i, y ) |= equ iï¬ (M, i) |= Ïj and (M, i, y ) |= Ïj. Bythe last conjunct of (43), we then have (M, i, y ) |= equ iï¬ âj < 2n (M, i) |= Ïj and (M, k, y ) |= Ïj, for all k â N . (â) We can generate the required sequence of points yi using the formulas: range â§ 2+(range â E tile), (44) F 2+EQ tile, equ t no t in future , (45) F tâT tâT 2+P no t in future, t no t in future , (46) F tâT where tile and the no t in future (for all t â T ) are fresh spatial variables. Indeed, supposethe conjunction of (42)â(46) holds at time 0 in M. Then, by the ï¬rst conjunct of (44) and(42), (M, 0) |= range â§ Ï0 and, by the second conjunct of (44), (M, 0, y0 ) |= tile for somey0 â V . We may assume that y0 is of depth 0. Then, by (45), we have (a0) (M, 0, y0 ) |= equ, and, by (â), (M, k, y0 ) |= Ï0 for all k â N; (b0) for all t â T , (M, 0, y0 ) |= no t in future and, by (46), (M, k, y0 ) |= t for all k > 0. Next, by (42), we have (M, 1) |= range â§ Ï1 and, by (44), there is y1 â V (again, of depth0) such that (M, 1, y1 ) |= tile. In particular, we have: (a1) (M, 1, y1 ) |= equ, and, by (â), (M, k, y1 ) |= Ï1 for all k â N; (b1) for all t â T , (M, 1, y1 ) |= no t in future and, by (46), (M, k, y1 ) |= t for all k > 1. By (b0), (M, 1, y0 ) |= t, for all t â T , and thus y1 = y0. Now we consider y1 at moment 1and use the same argument to ï¬nd a point y2 â V (which is diï¬erent from y1 by (b1)), andso forth; see Fig. 10. This gives us points y0, y1, . . . , ym·2nâ1 (of depth 0) from V we need. Our next aim is to write down formulas that could serve as pointers to the up and right neighbours of a given pair in the corridor (at this moment we do not bother about its topborder). Consider the formulas 2+EQ up, tile , (47) F 2+EQ right, equ no equ U tile , (48) F 2+EQ no equ U tile, tile equ no equ U tile , (49) F where up, right and no equ U tile are fresh spatial variables. We claim that, for all i, j < m · 2n, ⢠(M, i, yj ) |= up iï¬ j = i + 1; ⢠(M, i, yj ) |= right iï¬ j = i + 2n. 218
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity  = t for all tâT q£¢ q ¡= no equ U tile range V equ equ up Ï q q q q q q q q£ equ 3 â y11 ¢ q q q ¡ r  right tile equ equ up Ï q q q q q q q£ equ 2 â y10 ¢ q q q ¡ r   right tile T equ equ up Ï q q q q q q£ equ 1 â y9 ¢ q q q ¡ r    right right tile equ equ up equ T Ï q q q q q£ equ 0 â y8 ¢ q q q ¡ r     right tile equ up equ Ï q q q q£ equ 3 â y7 ¢ q q q ¡ r      right tile equ up equ Ï q q q£ equ 2 â y6 ¢ q q q ¡ r       up right tile T equ up equ Ï q q£ equ sT ) 1 â y5 ¢ q q q ¡ r        right tile equ up equ equ Ï q£ equ 0 â y4 ¢ q q q ¡ r         right tile up equ equ Ï q£ equ 3 â y3 ¢ q q ¡ r          tile up equ equ Ï q£ equ 2 â y2 ¢ q ¡ r           up tile up equ equ T Ï q£ equ  1 â y1 ¢ ¡ r            E right tile equ equ equ Ï r equ             0 â y0 tile 0 1 2 3 4 5 6 7 8 9 10 11 12 ... â â â â â â â â â â â â â 3 à 22 corridor Ï0 Ï1 Ï2 Ï3 Ï0 Ï1 Ï2 Ï3 Ï0 Ï1 Ï2 Ï3 Ï0 Figure 10: Satisfying ÏT , n = 2, in a tt-model based on space with 3 · 22 points. The former is obvious. Let us prove the latter. To show that (M, i, yj ) |= right, forj = i + 2n, we ï¬rst observe that (M, j, yj ) |= equ and (M, i, yj ) |= equ by (â). It followsfrom (M, j, yj ) |= tile by (49) that (M, j â 1, yj ) |= no equ U tile. Then, applying(49) (from right to left) suï¬ciently many times, we obtain (M, i, yj ) |= no equ U tile,(M, i â 1, yj ) |= no equ U tile, and so (M, i, yj ) |= right. Conversely, suppose that (M, i, yj ) |= right for some yj. Then (M, i, yj ) |= equ and, by (â) (note that i + 2n < (m + 1) · 2n, and so count is still true at i + 2n), (M, i + 2n, yj ) |= equ. (ââ) We have (M, i, yj ) |= no equ U tile. Then applying (49) (from left to right) suï¬cientlymany times we arrive at (M, i + 2n â 1, yj ) |= no equ U tile which together with (ââ)gives (M, i + 2n, yj ) |= tile. But then j = i + 2n. It should be noted that at every time point the extension of no equ U tile coincides with the extension of the term equ U tile on elements of the sequence y0, . . . , ym·2n, and that (49)is indeed the ï¬xed point characterisation of this U operator. Finally, the formulas below ensure that every point of the m à 2n-corridor is covered by at most one tile, 0, 0 is covered by t0, m â 1, 0 by t1, the top and bottom sides are white 219
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev and that the colours on adjacent edges of adjacent tiles match: 2+¬E (t t ), (50) F t,t âT t=t P(tile, t0) â§ 2+ Ï F 0 â§ range ⧠¬3F Ï0 â§ range â P tile, t1 , (51) 2+ Ï P tile, t , (52) F 2nâ1 â tâT up(t)=white 2+ Ï P tile, t , (53) F 0 â tâT down(t)=white 2+ Â¬Ï F 2nâ1 â§ E t â P up, no t in future , (54) t,t âT up(t)=down(t ) 2+ E t â P right, no t in future . (55) F t,t âT right(t)=left(t ) Let ÏT be the conjunction of (42)â(55). Suppose that ÏT holds at 0 in M. Then there is m â N such that (M, m · 2n â 1) |= range and, for every i ⥠m · 2n, (M, i) |= ¬range.Then we deï¬ne a map Ï : m à 2n â T by taking Ï (k, j) = t iï¬ (M, i, yi ) |= t and i = k · 2n + j. We leave it to the reader to check that Ï is a tiling of m à 2n, as required. For the other direction, suppose that there is a tiling Ï of the m à 2n-corridor by T , for some m > 0. Then ÏT is satisï¬ed in the Aleksandrov tt-model M = N, < , V, R , V , where V = y0, . . . , ym·2nâ1, R is the minimal reï¬exive relation on V , V(t, i) = yi â V | Ï (k, j) = t and i = k · 2n + j, and the other variables of ÏT are interpreted as shown in Fig. 10. Clearly, M satisï¬esFSA. Moreover, ÏT is satisï¬able in tt-models over ï¬nite ï¬ows of time iï¬ it is satisï¬able intt-models over N, < . Details are left to the reader. K Remark C.3. It may be of interest to note that the language used in the proof above israther limited. In fact, it is enough to extend the PSPACE-complete logic PT L ⦠RCC-8with predicates of the form EQ( 1, 2 3) (where the i are atomic spatio-temporal region terms) to make it EXPSPACE-hard. To show this, we transform the PT Lâ¦BRCC-8 formulaÏT constructed above in the following way. First, we take a fresh spatial variable u (denotingâthe universeâ) and add to ÏT the conjunct 2+EQ(u, u). Next, for every spatio-temporal F Boolean region term of ÏT , we introduce a spatial variable neg (âthe complement of with respect to uâ), add to ÏT conjuncts 2+EQ(u, neg ) â§ 2+DC( , neg ), and replace F F every occurrence of in the resulting formula with neg . Finally, for every spatio-temporal term of the form 1 2, we introduce a fresh spatial variable 1 and 2, add the conjuncts 2+P( P( P( F 1 and 2, 1) â§ 2+ F 1 and 2, 2) â§ 2+ F 1, neg 2 1 and 2) 220
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity and replace occurrences of 1 2 with 1 and 2. One can readily see that (i) the length of the resulting formula ÏT is linear in the length of ÏT and (ii) ÏT is satisï¬able in a tt-modelbased on N, < (with FSA) iï¬ ÏT is satisï¬able in a tt-model based on N, < (with FSA). C.2 Upper Complexity Bounds (I): Quasimodels for PT L à RC In this appendix we deï¬ne quasimodels for PT L à RC in the spirit of the paper (Hodkinsonet al., 2000) in order to establish the upper complexity bounds of Theorems 3.10 and 3.13.We remind the reader that spatio-temporal terms of PT L à RC are of the form: Ï ::= | I | Ï | Ï1 Ï2, ::= CIp | CI | CI( 1 2) | CI( 1 U 2) | CI( 1 S 2), and that PT L ⦠RC forms a sublanguage of PT L à RCâit diï¬ers from the latter only inthe deï¬nition of spatio-temporal region terms: ::= CIp | CI | CI( 1 2) | CI . Let Ï be a PT L à RC-formula. Recall from p. 200 that by sub Ï we denote the set of all subformulas of Ï and by term Ï the set of all its spatio-temporal terms including thoseof the form Ï and . A type t for Ï is a subset of term Ï such that ⢠for every Ï1 Ï2 â term Ï, Ï1 Ï2 â t iï¬ Ï1 â t and Ï2 â t; ⢠for every Ï â term Ï, Ï â t iï¬ Ï / â t. Clearly, the number (Ï) of diï¬erent types for Ï is bounded by 2|term Ï|. A broom type b for Ï is a pair T, ⤠, t , where T, ⤠is a broom (with T 0 being its leaves) and t a labelling function associating with each x â T a type t(x) for Ï such thatthe following conditions hold: (bt0) t(x) = t(y), for each pair of distinct points x, y â T 0; (bt1) for every x â T 0, ⢠for every CI( 1 2) â term Ï, CI( 1 2) â t(x) iï¬ 1 â t(x) and 2 â t(x), ⢠and for every CI â term Ï, CI â t(x) iï¬ / â t(x); (bt2) for every I â term Ï, I â t(x) iï¬ â t(y) for every y â T , x ⤠y; (bt3) for every â term Ï, â t(x) iï¬ ây â T 0 with x ⤠y and â t(y). Broom types b1 = T1, â¤1 , t1 and b2 = T2, â¤2 , t2 for Ï are said to be isomorphic if ⢠for every x1 â T 0, there is x such that t 1 2 â T 0 2 1(x1) = t2(x2) and ⢠for every x2 â T 0, there is x such that t 2 1 â T 0 1 1(x1) = t2(x2). Clearly, given two isomorphic broom types b1 and b2, we also have t1(r1) = t2(r2), wherer1 and r2 are the roots of b1 and b2, respectively. A quasistate for Ï is a pair s, m , where s is a Boolean-saturated subset of sub Ï and m a disjoint union T, ⤠, t of broom types b1, . . . , bn for Ï such that the following conditions hold: 221
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev (qs0) bi and bj are not isomorphic, for i = j; (qs1) for every 2 â Ï â sub Ï, 2âÏ â s iï¬ Ï â t(x) for every x â T . Clearly, the number (Ï) of quasistates for Ï is bounded by 22 (Ï) · 2|sub Ï|. Fix a ï¬ow of time F = W, < . A basic structure for Ï is a pair F, q , where q is a function associating with each w â W a quasistate q(w) = sw, mw for Ï such that, foreach w â W , ⢠for every Ï1 U Ï2 â sub Ï, Ï1 U Ï2 â sw iï¬ there is v > w such that Ï2 â sv and Ï1 â su for all u â (w, v); ⢠for every Ï1 S Ï2 â sub Ï, Ï1 S Ï2 â sw iï¬ there is v < w such that Ï2 â sv and Ï1 â su for all u â (v, w). Let F, q be a basic structure for Ï, where q(w) = sw, mw and mw = Tw, â¤w , tw for w â W . Denote by T 0 w the set of all leaves in Tw, â¤w and by T 1 w the set of all roots of brooms in it. A 1-run through F, q is a function r giving for each w â W a point r(w) â T 1 w ; a coherent and saturated 0-run through F, q is a function r giving for each w â W a point r(w) â T 0 w such that the following conditions hold: ⢠for every CI( 1 U 2) â term Ï, CI( 1 U 2) â tw(r(w)) iï¬ there is v > w such that 2 â tv (r(v)) and 1 â tu(r(u)) for all u â (w, v); ⢠for every CI( 1 S 2) â term Ï, CI( 1 S 2) â tw(r(w)) iï¬ there is v < w such that 2 â tv (r(v)) and 1 â tu(r(u)) for all u â (v, w). Say that a quadruple Q = F, q, R, is a quasimodel for Ï based on F if F, q is a basic structure for Ï, R = R0 ⪠R1, with R1 being a set of 1-runs and R0 a set of coherent andsaturated 0-runs through F, q , and the reï¬exive closure of a subset of R1 à R0 such that (qm2) âw0 â W Ï â sw ; 0 (qm3) for every w â W and every x â Tw, there is r â R with r(w) = x; (qm4) for all r, r â R, if r r then r(w) â¤w r (w) for all w â W ; (qm5) for all r â R, w â W and x â T 0 w , if r(w) â¤w x then there is r â R0 such that r (w) = x and r r . A quasimodel Q is said to be ï¬nitary if the set R of runs is ï¬nite. Lemma C.4. A PT L à RC-formula Ï is satisï¬able in an Aleksandrov tt-model based ona ï¬ow of time F and a (ï¬nite) disjoint union of (ï¬nite) brooms iï¬ there is a (ï¬nitary)quasimodel for Ï based on F. Proof. (â) Let Ï be a PT L à RC-formula and Q = F, q, R, a quasimodel for Ï, where F = W, < and q(w) = sw, Tw, â¤w , tw for w â W . We construct an Aleksandrov tt-model M = F, G, V by taking G = R, and, for each spatial variable p and w â W , V(p, w) = r | CIp â tw(r(w)). 222
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Clearly, if Q is ï¬nitary then G is ï¬nite. Thus, it remains to prove that Ï is satisï¬ed in M. First, we show by induction on the construction of a region term â term Ï that, for every w â W and every r â R, (M, w, r ) |= iï¬ â tw(r(w)). (56) The basis of induction: = CIp. Let (M, w, r ) |= . Then there is r â R such that r r and (M, w, r ) |= Ip. By (qm4), r(w) â¤w r (w). Take any y â T 0 w , r (w) â¤w y. By (qm5), there is a run r â R0 such that r r and r (w) = y. Then (M, w, r ) |= p and, by the deï¬nition of V, CIp â tw(r (w)) and, by (bt3), â tw(r(w)). Conversely, if â tw(r(w)) then, by (bt3), there is y â T 0 w with r(w) â¤w y and â tw(y). By (qm5), there is r â R0, r r , such that r (w) = y. Then CIp â tw(r (w)) and, by the deï¬nition of V, (M, w, r ) |= p. Therefore, (M, w, r ) |= . The induction steps for = CI 1, CI( 1 2), CI( 1 U 2) and CI( 1 S 2) are similar, but instead of the deï¬nition of V, we use (bt1) for the cases of the Booleans and coherenceand saturatedness of r for the cases of temporal operators. Next, we extend (56) to arbitrary spatio-temporal terms Ï â term Ï.Case Ï = I . Suppose that (M, w, r ) |= I . Take any y â Tw, r(w) â¤w y. If y â T 0 w then, by (qm5), there is r â R0 such that r r and r (w) = y. If y / â T 0 w then clearly y = r(w) and take r = r. We have (M, w, r ) |= , which, by IH, implies â tw(r (w)). Therefore, â tw(y) for every y â¥w r(w) and, by (bt2), I â tw(r(w)). Conversely, if I â tw(r(w)) then, by (bt2), â tw(y), for every y â¥w r(w). Take any run r â R such that r r . By (qm4), r(w) â¤w r (w), and so â tw(r (w)), from which, by IH, (M, w, r ) |= . Hence, (M, w, r ) |= I . Cases Ï = Ï1 Ï2 and Ï1 follow from IH by the deï¬nition of type. Finally, we show by induction on the construction of Ï â sub Ï that, for every w â W , (M, w) |= Ï iï¬ Ï â sw. (57) Case Ï = 2 â Ï . Suppose (M, w) |= 2 â Ï . Take any x â Tw. By (qm3), there is r â R such that r(w) = x. Then (M, w, r ) |= Ï and, by IH, Ï â tw(r(w)). Therefore, by (qs1),2âÏ â sw. Conversely, let 2âÏ â sw. Take any run r â R. By (qs1), we have Ï â tw(r(w)),from which, by IH, (M, w, r ) |= Ï . Hence, (M, w) |= 2 â Ï . Cases Ï = Ï1 â§ Ï2 and ¬Ï1 follow from IH by the Boolean-saturatedness of the sw.It follows from (57) and (qm2) that Ï is satisï¬able in M. (â) Let Ï be a PT L à RC-formula and suppose that Ï is satisï¬ed in an Aleksandrov tt-model M = F, G, V , where F = W, < and G = â, ⤠is a disjoint union of brooms. Denote by â0 and â1 the leaves and the roots of brooms in G, respectively. With every pair w, x â W à â we associate the type t(w, x) = Ï â term Ï | (M, w, x ) |= Ï . Fix a w â W and deï¬ne a binary relation on â as follows. For x, x â â0, let x â¼w x iï¬t(w, x) = t(w, x ) and, for z, z â â1, let z â¼w z iï¬ the brooms generated by z and z areisomorphic, i.e., âx â â0 (z ⤠x â âx â â0 (z ⤠x â§ x â¼w x )) â§ âx â â0 (z ⤠x â âx â â0 (z ⤠x â§ x â¼w x )). 223
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Clearly, â¼w is an equivalence relation on â. Denote by [x]w the â¼w-equivalence class of xand deï¬ne a map fw by taking, for each x â â, [x]w, x â â1, fw(x) = [z]w, [x]w , x â â0 and z â â1 such that z ⤠x. Since G is a disjoint union of brooms, fw is well-deï¬ned. Now put Tw = fw(x) | x â â, u â¤w v iï¬ âx, y â â such that x ⤠y, u = fw(x) and v = fw(y), tw(fw(x)) = t(w, x), for x â â. By deï¬nition of fw, Tw, â¤w is a union of brooms and tw is well-deï¬ned. Consider thestructure sw, mw , where mw = Tw, â¤w , tw and sw = Ï â sub Ï | (M, w) |= Ï. It is readily seen that for each of the brooms of mw we have (bt0) and that mw satisï¬es(qs0). Moreover, as fw is a p-morphism from â, ⤠onto Tw, â¤w , we also have (bt1)â(bt3) and (qs1). So, by taking q(w) = sw, mw for each w â W we obtain a basic structure F, q for Ï satisfying (qm2). It remains to deï¬ne appropriate runs through F, q . For k = 0, 1, let Rk be the set of all maps r : w â fw(x) for x â âk. Clearly, R1 and R0 are sets of 1- and coherent andsaturated 0-runs, respectively. Put R = R0 ⪠R1 and for r, r â R, r r iï¬ r(w) â¤w r (w) for all w â W . Then (qm4) holds by deï¬nition. Let v â W and y â Tv. Then thereis x â â such that fv(x) = y. Clearly, R contains the run r : w â fw(x), which proves(qm3). Finally, let r â R, v â W and y â T 0 v be such that r(v) â¤v y. There are some z, x â â such that fw(z) = r(w), for every w â W , and fv(x) = y. We clearly have z ⤠xand x â â0. Then take the run r : w â fw(x). By deï¬nition, r r , which proves (qm5). Thus, Q = F, q, R, is a quasimodel for Ï. Note that if G is ï¬nite then R is ï¬nite as well and therefore, Q is ï¬nitary. K We are now in a position to establish the upper complexity bounds of the satisï¬ability problem for PT L à RC- and PT L ⦠RC-formulas in tt-models based on N, < , Z, < orarbitrary ï¬nite ï¬ows of time. Proof of Theorem 3.10, upper bound. We consider the cases of N, < and Z, < . The case of arbitrary ï¬nite ï¬ows of time and that of tt-models with FSA and based on N, < and Z, < will follow from Theorem 3.13. One can readily check that as for the propositional temporal logic PT L, we have the following polynomial reductions for PT L ⦠RC: ⢠satisï¬ability in tt-models based on Z, < can be polynomially reduced to satisï¬ability in tt-models based on N, < ; ⢠satisï¬ability in tt-models based on N, < can be polynomially reduced to satisï¬ability of formulas without past-time temporal operators. 224
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity So, in what follows we consider the simplest case of the satisï¬ability problem, that is forPT L ⦠RC-formulas without past-time temporal operators in tt-models based on N, < . We present a nondeterministic 2EXPSPACE satisï¬ability checking algorithm which is similar to that of Sistla and Clarke (1985). First, one can prove (with the help of Lem-mas C.1 (ii) and C.4) an analogue of (Hodkinson et al., 2000, Theorem 24) which statesthat a PT L ⦠RC-formula Ï is satisï¬able in tt-model based on N, < iï¬ there are l1, l2 â Nsuch that 2 l1 ⤠(Ï), 0 < l2 ⤠|term Ï| · 2 (Ï) · (Ï) + (Ï) and a âballoonâ-like quasimodel Q = N, < , q, R, for Ï with q(l1 + n) = q(l1 + l2 + n) for every n â N. Although Theorem 24 of (Hodkinson et al., 2000) was proved for themonodic fragment of ï¬rst-order temporal logic, the basic idea of extracting a âballoonâ-likequasimodel from an arbitrary one works for PT L ⦠RC as well. The only diï¬erence is thatquasistates now are more complex: they can be regarded as sets of sets of types for Ï (notjust sets of types) and thus, both l1 and l2 are triple exponential in the length (Ï) of Ï.Then a quasimodel Q can be guessed in 2EXPSPACE by an algorithm which is very similarto that in the proof of (Hodkinson et al., 2003, Theorem 4.1). K Proof of Theorem 3.13, upper bound. The proof is similar to that of Theorem 3.10.Again, one can show that all the cases are polynomially reducible to the case of satisï¬abilityof PT L à RC-formulas without past-time temporal operators in tt-models with FSA andbased on N, < . To take the FSA into account, we can prove (using Lemmas C.1 (i)and C.4) analogues of Theorems 29 and 35 of (Hodkinson et al., 2000) which state that aPT L à RC-formula Ï is satisï¬able in a tt-model with FSA and based on N, < iï¬ thereis a ï¬nitary âballoonâ-like quasimodel for Ï based on N, < . The condition of ï¬niteness forthe set of runs can also be ensured by an algorithm similar to that of Theorem 3.10. K C.3 Upper Complexity Bounds (II): Embedding into First-Order Temporal Logic In this appendix we introduce the ï¬rst-order temporal language QT L and use some knowncomplexity results for fragments of QT L to obtain upper complexity bounds for spatio-temporal logics based on RCâ (and therefore, on BRCC-8). The alphabet of QT L consists of individual variables x1, x2, . . . , predicate symbols P1, P2, . . . , each of which is of some ï¬xed arity, the Booleans, the universal âx and ex-istential âx quantiï¬ers for each variable x, and the temporal operators U , S (with theirderivatives , 3F , 2F , etc.). Note that our language contains neither constant symbols nor equality (we simply do not need them to obtain our complexity results). QT L is interpreted in ï¬rst-order temporal models of the form M = F, D, I , where F = W, < is a ï¬ow of time, D a nonempty set, the domain of M, and I a function associating with every moment of time w â W a ï¬rst-order structure I(w) I(w) I(w) = D, P , P , . . . , 0 1 I(w) the state of M at moment w, where each P is a relation on D of the same arity as P i i. An assignment in D is a function a from the set of individual variables to D. Given suchan assignment and a QT L-formula Ï, we deï¬ne the truth-relation (M, w) |=a Ï by taking 225
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev u = CIp e = CIp 9 6 x1 x2 xnâ1 xn u b e b e b ub depth 0 . . . Pj1[db]¬Pj2[db] . . .¬Pjnâ1[db]Pjn[db] r  ¨ B =â r d s  ¨ r ¨ d  r ¨ r ¨ 8 7 depth 1 b d r u  ¨ x0b db Figure 11: Representing n-broom b with region CIpj by a point in a ï¬rst-order model. ⢠I(w) (M, w) |=a Pi(x1, . . . , xm) iï¬ a(x1), . . . , a(xm) â P , i ⢠(M, w) |=a âx Ï iï¬ (M, w) |=a Ï, for every assignment a in D which diï¬er from a only on x, plus the standard clauses for the Booleans and temporal operators. We say that a QT L-formula Ï is satisï¬ed in M if (M, w) |=a Ï for some w â W and some assignment a in D.If all free variables of Ï are among x1, . . . , xm, then instead of (M, w) |=a Ï we often write(M, w) |= Ï[d1, . . . , dm], where di = a(xi) for all i, 1 ⤠i ⤠m. Denote by QT L1 the one-variable fragment of QT L, i.e., the set of all QT L-formulas which contain at most one individual variable, say, x. Without loss of generality we mayassume that all predicate symbols of QT L1 are at most unary. Now we deï¬ne an embedding of spatio-temporal languages based on RCâ into QT L1. Recall that, by Lemma C.2 (i), if a PT L à RCâ-formula Ï of width n is satisï¬ed in att-model with FSA then Ï is also satisï¬able in an Aleksandrov tt-model based on the sameï¬ow of time and a ï¬nite disjoint union of n-brooms. Similarly, if a PT L ⦠RCâ-formula Ïof width n is satisï¬able then Ï is also satisï¬able in an Aleksandrov tt-model based on thesame ï¬ow of time and possibly inï¬nite disjoint union of n-brooms. To cover both cases, let Ï be a PT L à RCâ-formula of width n. We show how to construct a QT L1-formula Ïâ n of length linear in (Ï) such that every Aleksandrov tt-modelbased on a (ï¬nite) union of n-brooms satisfying Ï gives rise to a ï¬rst-order temporal model(with ï¬nite domain, respectively) satisfying Ïâ n and vice versa. Thus, we polynomiallyreduce the satisï¬ability problem for spatio-temporal languages to that for QT L1. Suppose that Ï is satisï¬ed in an Aleksandrov tt-model M = F, G, V , where F = W, < and G is a (ï¬nite or inï¬nite) disjoint union of n-brooms. With every n-broom b of G weassociate an element db of the ï¬rst-order domain D. Then, for every spatial variable pj in Ï,we ï¬x n diï¬erent unary predicate symbols Pj1(x), . . . , Pjn(x) with the following meaning:Pji(x) is true on db â D at moment w â W iï¬ the i-th leaf of b (xi in Fig. 11) belongs to b region CIp at w. Deï¬ne n distinct translations ·â in , 1 ⤠i ⤠n, encoding the truth valuesof spatio-temporal region terms of Ï on leaves of G by taking, for a spatial variable pj andterms 1 and 2, (CIpj)â in = Pji(x), (CI 1)â in = ¬( 1)â in, (CI( 1 2))â in = ( 1)â in â§ ( 2)â in , (CI( 1 U 2))â in = ( 1)â in U ( 2)â in, (CI( 1 S 2))â in = ( 1)â in S ( 2)â in. 226
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Next we extend these n translations to arbitrary spatio-temporal terms of Ï. First weintroduce a translation ·â 0n to encode the truth value of arbitrary spatio-temporal terms inthe roots of the n-brooms of G: for a region term , let n ( )â 0n = ( )â kn . k=1 The formula above shows, in particular, that ·â 0n is redundant for region terms since theirtruth values in the roots can be âcomputedâ as deï¬ned by ·â 0n . For a spatio-temporal termof the form I , where is a region term, we take n (I )â 0n = ( )â kn and (I )â in = ( )â in for all i, 1 ⤠i ⤠n, k=1 and then, for spatio-temporal terms Ï1 and Ï2,10 (Ï1)â in = ¬(Ï1)â in and (Ï1 Ï2)â in = (Ï1)â in â§ (Ï2)â in for all i, 0 ⤠i ⤠n. Finally, we deï¬ne the translation ·â n of subformulas of Ï: for a spatio-temporal term Ï , n (2 â Ï )â n = âx (Ï )â 0n â§ âx (Ï )â kn k=1 and, for spatio-temporal formulas Ï1 and Ï2, (¬Ï1)â n = ¬Ïâ n, (Ï â§ Ïâ n, 1 1 â§ Ï2)â n = Ïâ n 1 2 (Ï1 U Ï2)â n = Ïâ n U Ïâ n, (Ï S Ïâ n, 1 2 1 S Ï2)â n = Ïâ n 1 2 Clearly, the length of Ïâ n is linear in both n and (Ï). Lemma C.5. A PT L à RCâ-formula Ï of width n is satisï¬able in an Aleksandrov tt-modelbased on a (ï¬nite) disjoint union of n-brooms iï¬ Ïâ n is satisï¬able in a ï¬rst-order temporalmodel (with a ï¬nite domain) based on the same ï¬ow of time. Proof. (â) Suppose that Ï is satisï¬ed in an Aleksandrov tt-model M = F, G, V , whereF = W, < , G = V, R is a disjoint union of n-brooms b = Wb, Rb , Wb = x0, x1, . . . , xn b b b and Rb is the reï¬exive closure of x0, x1 , . . . , x0, xn (see Fig. 11). b b b b Construct a ï¬rst-order temporal model N = F, D, I by taking D to be the set of all db for n-brooms b in G and, for every w â W , I(w) I(w) I(w) I(w) I(w) = D, P , . . . , P , P , . . . , P , . . . , 11 1n 21 2n where for each spatial variable pj in Ï and each i, 1 ⤠i ⤠n, I(w) P = d ji b â D | (M, w, xib ) |= pj . 10. For brevity, in this deï¬nition we follow the syntax of PT L à RC rather than PT L à RCâ. 227
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Note that D is ï¬nite whenever G is ï¬nite. Now, by induction on the construction of a spatio-temporal region term of Ï, it can easily be shown that for every w â W , every n-broom b in G and every i, 1 ⤠i ⤠n, (N, w) |= ( )â in [db] iï¬ (M, w, xib ) |= . (58) Next, (58) can be extended to arbitrary spatio-temporal terms Ï of Ï and i, 0 ⤠i ⤠n: (N, w) |= (Ï )â in [db] iï¬ (M, w, xib ) |= Ï. (59) The cases for i, 1 ⤠i ⤠n, trivially follow from (58) and the fact that leaves have nosuccessors but themselves. Consider now i = 0. The case Ï = holds simply because region terms are interpreted by regular closed sets: (M, w, x0b ) |= iï¬ (M, w, xkb ) |= , for some k, 1 ⤠k ⤠n, (60) If Ï = I then, on one hand, (M, w, x0b ) |= I iï¬ (M, w, xkb ) |= , for all k, 0 ⤠k ⤠n, and on the other, by the deï¬nition of ·â 0n , (N, w) |= (I )â 0n [db] iï¬ (N, w) |= ( )â kn [db], for all k, 1 ⤠k ⤠n, which together with (60) and IH yields (59). The cases of the Booleans are trivial. Finally, we show that for every Ï â sub Ï, we have (N, w) |= Ïâ n iï¬ (M, w) |= Ï. Case Ï = 2 â Ï : (N, w) |= (2 â Ï )â n iï¬ âdb â D âk â 0, 1, . . . , n (N, w) |= (Ï )â kn[db] iï¬ âb in G âk â 0, 1, . . . , n (M, w, xkb ) |= Ï iï¬ (M, w) |= 2 â Ï. The remaining cases are trivial. It follows that Ïâ n is satisï¬ed in N. (â) Assume that Ïâ is satisï¬ed in a ï¬rst-order temporal model N = F, D, I , where F = W, < and, for every w â W , I(w) I(w) I(w) I(w) I(w) = D, P , . . . , P , P , . . . , P , . . . . 11 1n 21 2n With every point d â D we associate an n-broom bd = Wb , R so that the sets W , d bd bd for d â D, are pairwise disjoint and each contains n + 1 distinct elements x0 , . . . , xn . bd bd Construct an Aleksandrov tt-model M = F, G, V by taking ⢠G to be the disjoint union of n-brooms bd | d â D, ⢠V(pj, w) = xi | (N, w) |= (CIp b j )â in [d], 0 ⤠i ⤠n and d â D . d 228
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Clearly, if D is ï¬nite then G is ï¬nite as well. By a straightforward induction one can show that for all w â W , d â D, spatio-temporal region terms , spatio-temporal terms Ï , subformulas Ï of Ï, and all i, 0 ⤠i ⤠n, (N, w) |= ( )â in [d] iï¬ (M, w, xib ) |= (i > 0), d (N, w) |= (Ï )â in [d] iï¬ (M, w, xib ) |= Ï, d (N, w) |= Ïâ n iï¬ (M, w) |= Ï. For example, (N, w) |= (I )â 0n [d] iï¬ (N, w) |= ( )â kn [d], for all k, 0 ⤠k ⤠n iï¬ (M, w, xkb ) |= , for all k, 0 ⤠k ⤠n d iï¬ (M, w, x0b ) |= I . d It follows that Ï is satisï¬ed in M. K Now we obtain the upper complexity bounds for combinations of PT L and RCâ: Proof of Theorem 3.11, upper bound. Follows from Lemmas C.2 (ii) and C.5 togetherwith the results on the complexity of the one-variable fragment of QT L (Halpern & Vardi,1989; Sistla & German, 1987; Hodkinson et al., 2000, 2003). K Proof of Theorem 3.12, upper bound. Similar to the proof above. K Proof of Theorem 3.15, upper bound. The proof follows from Lemmas C.2 (i) and C.5together with the upper complexity bound of the guarded monodic (and so the one-variable)fragment of QT L (Hodkinson, 2004). K C.4 Lower Complexity Bounds (II): Embedding First-Order Temporal Logic We are now in a position to prove Theorem 3.14 and establish the lower complexity boundsfor spatio-temporal logics based on BRCC-8 (and so for those based on RCâ as well). Denoteby QT L12 the one-variable fragment of QT L with sole temporal operator 2F . We deï¬ne apolynomial embedding of QT L12 into PT L2 à BRCC-8. Note that a similar embedding ofthe full one-variable fragment QT L1 into PT L à BRCC-8 can be regarded as an alternativeway to prove the lower complexity bound of Theorem 3.12. A QT L12-formula is said to be a basic Q-formula if it is of the form âx Ï(x), where Ï(x) is quantiï¬er-free and contains no propositional variables. A QT L12-sentence Ï is in Q-normal form if it is built from basic Q-formulas using the Booleans and temporal operator2F . In other words, sentences in Q-normal form do not contain nested quantiï¬ers and useonly unary predicate symbols. The following observation should not come as a surprise (see,e.g., Hughes & Cresswell, 1996): Lemma C.6. For every QT L12-sentence Ï one can eï¬ectively construct a QT L12-sentenceÏ in Q-normal form such that Ï is satisï¬able in a ï¬rst-order temporal model with a ï¬ow oftime F (and having ï¬nite domain) iï¬ Ï is satisï¬able in a ï¬rst-order temporal model basedon F (and having ï¬nite domain). Moreover, the length of Ï is linear in the length of Ï. 229
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Proof. Without loss of generality we may assume that Ï contains no occurrences of â. Totransform Ï into its Q-normal form, we ï¬rst introduce a fresh unary predicate symbol Pi(x)for every propositional variable pi in Ï and replace each occurrence of pi with âx Pi(x).Denote the resulting formula by Ï0. For every subformula Ï of Ï0 deï¬ne a formula Ï bytaking inductively (P (x)) = P (x), (âx Ï) = PâxÏ(x), (¬Ï) = Â¬Ï , (Ï1 â§ Ï2) = Ï â§ Ï , (2 1 2 F Ï) = 2F Ï , where PâxÏ(x) is a fresh unary predicate symbol. Let Ï = ¬âx Â¬Ï â§ 2+ âx P 0 F âxÏ (x) ⨠âx ¬PâxÏ (x) â§ âx PâxÏ(x) â âx Ï . âxÏâsubÏ0 One can readily show by induction that Ï is satisï¬able in a ï¬rst-order temporal model basedon F (and having ï¬nite domain) iï¬ Ï is satisï¬able in a ï¬rst-order temporal model based onF (and having ï¬nite domain). Moreover, Ï is in Q-normal form. K Now, given a QT L12-formula Ï in Q-normal form, denote by Ïâ the result of replacing all occurrences of basic Q-formulas âx Ï(x) in Ï with EQ(Ïâ, ), where is a region term representing the whole space (for instance, CIu CIu for a fresh spatial variable u), and the translation Ïâ of quantiï¬er-free formulas Ï(x) is deï¬ned by taking: (P (x))â = CIp, (¬Ï)â = CI Ïâ , (Ï1 â§ Ï2)â = CI(Ïâ1 Ïâ2), (2F Ï)â = CI2F Ïâ, where P (x) is a unary predicate symbol and p a spatial variable standing for P (x). Clearly,Ïâ belongs to PT L2 à BRCC-8. Lemma C.7. A QT L12-sentence Ï in Q-normal form is satisï¬able in a ï¬rst-order temporalmodel based on a ï¬ow of time F and having ï¬nite domain iï¬ Ïâ is satisï¬able in a tt-modelbased on F and satisfying FSA. Proof. (â) Suppose that Ï is in Q-normal form and M = F, D, I is a ï¬rst-order temporal I(w) model, where F = W, < and, for all w â W , I(w) = D, P , . . . , . Let (M, w 0 0) |= Ï for some w0 â W . Construct an Aleksandrov tt-model M = F, G, V by taking G = D, R , I(w) where R = d, d | d â D and V(pi, w) = w, d | d â P . Note that the topological i space TG = D, IG induced by G is discrete, i.e., for all X â D, IGX = CGX = X. It follows by induction that for every quantiï¬er-free QT L12-formula Ï, every w â W andevery d â D we have (M, w) |= Ï[d] iï¬ (M , w, d ) |= Ïâ. Therefore, for every basic Q-formula âx Ï(x) and every w â W , (M, w) |= âx Ï(x) iï¬(M , w) |= EQ(Ïâ, ). It follows by induction that (M , w0) |= Ïâ. 230
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity (â) Suppose that Ïâ is satisï¬ed in a tt-model based on F = W, < . By Lemma C.1 (i), Ïâ is satisï¬ed in an Aleksandrov tt-model M = F, G, V , where G = V, R is a disjointunion of brooms. Denote by V0 â V the set of leaves of G and deï¬ne a ï¬rst-order temporalmodel M = F, V0, I by taking, for each w â W , I(w) I(w) I(w) = V0, P , . . . and P = V(p 0 i i, w) â© V0. Clearly, for every X â V , we have IGX â© V0 = CGX â© V0 = X â© V0, where TG = V, IG isthe topological space induced by G. So we obtain by induction that for every quantiï¬er-freeQT L12-formula Ï, all w â W and all d â V0 (M , w) |= Ï[d] iï¬ (M, w, d ) |= Ïâ. A regular closed set X â V in TG coincides with V iï¬ it contains V0. So, for all basicQ-formulas âx Ï(x) and all w â W , (M , w) |= âx Ï(x) iï¬ (M, w) |= EQ(Ïâ, ). It follows by induction that Ï is satisï¬ed in M . K Proof of Theorem 3.14, lower bound. By Lemmas C.6 and C.7 the satisï¬ability prob-lem for QT L12-formulas in ï¬rst-order temporal models with ï¬nite domains and based on N, < , Z, < or arbitrary ï¬nite ï¬ows of time is polynomially reducible to satisï¬abil- ity of PT L2 à BRCC-8 formulas in tt-models with FSA. Since the former is known tobe EXPSPACE-hard (Hodkinson et al., 2003) for N, < and Z, < , the latter is also EXPSPACE-hard in these cases. It should be noted that the result of Hodkinson andhis colleagues (2003) can readily be extended to the case of arbitrary ï¬nite ï¬ows of time(by reduction of a ï¬nite version of the corridor tiling problem). This gives us the lowercomplexity bound for PT L2 à BRCC-8 in the case of ï¬nite ï¬ows of time. K C.5 PSPACE-complete Spatio-Temporal Logic In this appendix we prove Theorem 3.8. In fact, we show that the satisï¬ability problem forPT L ⦠RC2âan extension of PT L ⦠RCC-8âis decidable in PSPACE, where RC2 is thesublanguage of S4u with spatial terms Ï restricted to the following: ::= CIp, Ï ::= | I , δ ::= I | , Ï ::= Ï1 Ï2 | δ1 δ2 | Ï Î´. As before, we denote by Ï spatial terms representing regular closed sets (regions) and byδ those representing regular open sets (the interiors of regions). Clearly, this deï¬nition isequivalent to the deï¬nition on p. 190 (where we did not make an explicit distinction betweenÏ and δ). It is easy to see that RC2 contains RCC-8, but is less expressive than BRCC-8.Spatio-temporal terms Ï of PT L ⦠RC2 are constructed from region terms of the form ::= CIp | CI in the same way as spatial terms of RC2. Finally, PT L ⦠RC2-formulas are composed fromatomic formulas of the form 2 â Ï using the Booleans and the temporal operators. 231
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev We will reduce the satisï¬ability problem for PT Lâ¦RC2 to that for PT L. This reduction will be done in a number steps. Let F = W, < be a ï¬ow of time (as in the formulation of Theorem 3.8) and Ï a PT L ⦠RC2-formula. We begin by removing the next-time operator from the subterms of Ï.To this end, let Ï0 = Ï and for each variable p from the set â¦1 = p | CI CIp â term Ï0, we introduce a fresh spatial variable p , and then put Ï1 = Ï1 â§ 2+2+ â 2â(CI CIp â¡ CIp ) , P F pââ¦1 where Ï1 is the result of replacing each occurrence of CI CIp in Ï0 with CIp and2â( 1 â¡ 2) stands for 2â( 1 2) â§ 2 â ( 1 2). Next, for each p from â¦2 = p | CI CIp â term Ï1, we introduce a fresh spatial variable p , and set Ï2 = Ï2 â§ 2+2+ â 2â(CI CIp â¡ CIp ) , P F pââ¦1âªâ¦2 where Ï2 is the result of replacing each occurrence of CI CIp in Ï1 with CIp . By repeatingthis process suï¬ciently many times we can obtain a formula Ï = ÏÏ â§ 2+2+ â 2â(CI CIp â¡ CIp ) , (61) P F pââ¦Ï where â¦Ï is a suitable set of spatial variables, and ÏÏ contains no in region terms, that is, ÏÏ is a PT L[RC2]-formula. (Note that â¦Ï is such that if a spatial variable p occurs inÏÏ then either CI CIp / â term Ï or p â â¦Ï.) It should be clear that the length of Ï is linear in the length of Ï, and Ï is satisï¬able in a tt-model based on F iï¬ Ï is satisï¬able ina tt-model based on F. Thus, it suï¬ces to reduce the satisï¬ability problem for PT L ⦠RC2-formulas of the form (61) to the satisï¬ability problem for PT L-formulas. Let us now recall the function·â from Appendix B.1 which maps PT L[S4u]-formulas (in particular, PT L[RC2]-formulas)to PT L-formulas. Namely, for every atomic RC2-formula 2 â Ï , let (2 â Ï )â = pÏ , where pÏ is a fresh propositional variable. Then, given the PT L[RC2]-formula ÏÏ, deï¬ne ÏâÏ to be theresult of replacing every occurrence of 2 â Ï in it with (2 â Ï )â. As is shown in the proof of Theorem 3.1, ÏÏ is satisï¬able in a tt-model over F = W, < iï¬ (s1) there exists a temporal model N = F, U satisfying ÏâÏ and, (s2) for every w â W , the set Φw = 2 â Ï | (N, w) |= pÏ , Ï â term ÏÏ âª Â¬2 â Ï | (N, w) |= ¬pÏ , Ï â term ÏÏ (62) of RC2-formulas is satisï¬able. 232
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity To preserve satisï¬ability of not only ÏÏ but the whole Ï, we have to ensure somehow that (s3) the points satisfying Φw do have predecessors and successors satisfying Φwâ1 and Φw+1, respectively. In the remainder of the appendix we ï¬rst describe an encoding of the satisï¬ability problem for sets of RC2-formulas of the form (62) in Boolean logic, which will be used aspart of our ï¬nal reduction. Then we prove a completion property of RC2 (cf. Balbiani &Condotta, 2002) in the class of exhaustive models that contain âsuï¬ciently manyâ points ofevery type. Roughly, the completion property says that, given a set Φ of the form (62) andan exhaustive model satisfying some subset of Φ, one can extend the valuation of the modelto satisfy the whole Φ. This property will make it possible to solve problem (s3) above. It isworth noting that a similar construction works for stronger languages such as BRCC-8, butthen, to enjoy the completion property, sets (62) may need exponentially many formulas (inthe number of spatial variables) and, therefore, the reduction to PT L will be exponentialas well. For RC2 it suï¬ces to consider sets (62) with a quadratic number of formulas, whichresults in a quadratic reduction. C.5.1 Properties of RC2-formulas For any ï¬nite set ⦠= p1, . . . , pn of spatial variables, let AtFm⦠= 2âÏ | Ï is an RC2-term with variables from ⦠. Clearly, every RC2-formula with spatial variables from ⦠is a Boolean combination of spatialformulas from AtFmâ¦. It should be also clear that |AtFmâ¦| ⤠16 · |â¦|2. As the width of RC2-formulas is ⤠2 (see p. 209 for the deï¬nition), by Lemmas A.1 and C.2 (ii), an RC2-formula is satisï¬able iï¬ it is satisï¬able in an Aleksandrov topological modelbased on a disjoint union of 2-brooms, alias forks. In what follows we will regard every suchmodel M as a disjoint union of fork models m = f, v , where f = W, R , W = x0, x1, x2,R is the reï¬exive closure of x0, x1 , x0, x2 and v a valuation of the spatial variables.Given â¦0 â â¦, we say that fork models m1 = f, v1 and m2 = f, v2 are â¦0-equivalent andwrite m1 â¼â¦ m 0 2, if v1(CIp) = v2(CIp) for every p â â¦0. Given some Φ â AtFm⦠and Ï â AtFmâ¦, we say that Ï is an f-consequence of Φ and write Φ |=f Ï if m |= Φ implies m |= Ï for every fork model m based on f. Φ is said to beclosed (under f-consequences) if, for every Ï â AtFmâ¦, we have Ï â Φ whenever Φ |=f Ï.Let Φc = ¬2 â Ï | 2 â Ï â AtFm⦠â Φ . Then Φ ⪠Φc is satisï¬able iï¬ Î¦ is closed and satisï¬able. This means, in particular, that to check whether the set Φw in (62) is satisï¬able, it is enoughto consider only the closure of 2 â Ï | (N, w) |= pÏ , Ï â term Ï. Now we characterise |=f in terms of the Boolean consequence relation |=. As we know from Appendix C.3, spatial formulas can be embedded into the one-variable fragment ofï¬rst-order logic. More precisely, it can easily be shown that ï¬rst-order translations of formulas from AtFm⦠are (equivalent to) formulas of the form (which are actually Kromformulas; see, e.g., B¨ orger, Gr¨ adel, & Gurevich, 1997): â 1 â 1 â 2 â 2 (2 â (Ï 2 2 2 2 1 Ï2))â 2 = âx Ï â¨ Ï â§ âx Ï â¨ Ï , (63) 1 2 1 2 â 1 â 1 â 2 â 2 (2 â (Ï 2 2 2 2 1 δ2))â 2 = âx Ï â¨ Î´ â§ âx Ï â¨ Î´ , (64) 1 2 1 2 233
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev â 1 â 1 â 1 â 2 â 2 â 1 â 2 â 2 (2 â (δ 2 2 2 2 2 2 2 2 1 δ2))â 2 = âx δ ⨠δ â§ âx δ ⨠δ â§ âx δ ⨠δ â§ âx δ ⨠δ , (65) 1 2 1 2 1 2 1 2 where Pji(x), if Ï = CIpj, Pji(x), if δ = ICIpj, Ïâ i2 = and δâ i2 = for i = 1, 2. ¬Pji(x), if Ï = ICIpj ¬Pji(x), if δ = CIpj, It follows from the proof of Lemma C.5 that an RC2-formula Ï is satisï¬ed in an Aleksandrovmodel M based on a disjoint union of forks iï¬ its ï¬rst-order translation Ïâ 2 is satisï¬ed ina ï¬rst-order model where every fork f = W, R of M, W = x0, x1, x2 , x0Rx1 and x0Rx2,is encoded by a domain element df with Pji(x) being true on df iï¬ (M, xi) |= CIpj, fori = 1, 2 (see Fig. 11). Since in the deï¬nition of closed sets we only consider Aleksandrovmodels based on a single fork f, the domains of respective ï¬rst-order models contain a singleelement df. This means that (63)â(65) can be encoded by the Boolean formulas (2 â (Ï1 Ï2))â¡ = Ïâ¡1 ⨠Ïâ¡1 â§ Ïâ¡2 ⨠Ïâ¡2 , 1 2 1 2 (2 â (Ï1 δ2))â¡ = Ïâ¡1 ⨠δâ¡1 â§ Ïâ¡2 ⨠δâ¡2 , 1 2 1 2 (2 â (δ1 δ2))â¡ = δâ¡1 ⨠δâ¡1 ⧠δâ¡1 ⨠δâ¡2 ⧠δâ¡2 ⨠δâ¡1 ⧠δâ¡2 ⨠δâ¡2 , 1 2 1 2 1 2 1 2 where qji, if Ï = CIpj, qji, if δ = ICIpj, Ïâ¡i = and δâ¡i = for i = 1, 2. ¬qji, if Ï = ICIpj ¬qji, if δ = CIpj, Thus, with every Φ â AtFm⦠we can associate the conjunction Φ⡠of the ·â¡-translations offormulas in Φ such that the following holds: Claim C.8. For every Ï â AtFmâ¦, Φ |=f Ï iï¬ Î¦â¡ |= Ïâ¡. To construct the closure of Φ â AtFm⦠and to check whether Φ is satisï¬able, we can use the following resolution-like inference rules: 2â(Ï1 ) 2â(I Ï2) 2â(I δ1) 2â( δ1) (ÏÏ) (Ïδ) (Ïδ) 2 1 2 â (Ï1 Ï2) 2â( δ1) 2â(I δ1)  2 θ = , θ = I ; â 2â 2â(δ1 θ) 2â(θ δ2)   (â¥) (δδ) for θ = , θ = ; ⥠2â(δ1 δ2)  θ = I , θ = I ; together with the equivalences: 2â = 2âI , 2â = 2âI , 2â( Ï1) = 2 â (I Ï1), 2â( Ï1) = 2 â (I Ï1), where = CIp for some p â â¦, Ï1 and Ï2 are of the form or I , and δ1 and δ2 of the form I or . It is readily checked that the above rules are sound, and so if ⥠is derivable from Φ,then Φ is not satisï¬able. On the other hand, if Φ is not satisï¬able then Φ⡠can be regarded 234
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity as an unsatisï¬able set of binary and unary propositional clauses and, using the standardresolution procedure, one can construct a derivation of the empty clause from Φâ¡âwhich,in turn, can be mimicked by applications of the above rules (and equivalences) to derive⥠from Φ. Moreover, since the propositional resolution is subsumption complete (see, e.g.,Slagle, Chang, & Lee, 1969), we can also derive all consequences of Φ, thereby obtaining itsclosure. Now we encode the above rules and equivalences as Boolean formulas with variables pÏ , for 2 â Ï â AtFmâ¦. For instance, (â¥) and (ÏÏ) are encoded by 2 â â â â§ 2â â ⥠and 2â(Ï1 ) â§ 2 â (I Ï2) â 2 â (Ï1 Ï2) , respectively. Denote by Î⦠the conjunction of all such formulas for spatial variables fromâ¦. Then we have the following: Claim C.9. For every Φ â AtFmâ¦, Φ is closed and satisï¬able iï¬ the Boolean formula Î⦠⧠p ⧠¬ Ï pÏ (66) 2âÏâΦ 2âÏâAtFmâ¦âΦ is satisï¬able. Finally, to ensure (s3), we need the following completion property of RC2: Lemma C.10. Let Φ be a closed subset of AtFmâ¦, â¦0 â ⦠and Φ0 = Φ â© AtFm⦠. Then 0 (i) Φ0 is closed and (ii) for every fork model m0, if m0 |= Φ0 then there is a fork model msuch that m0 â¼â¦ m and m |= Φ. 0 Proof. Claim (i) is clear. To show (ii), we deï¬ne the characteristic formula Ï of m0 on â¦0by taking: ¬qji, if (m0, xi) |= CIpj, Ï = lâji and lâji = q p ji, if (m0, xi) |= CIpj. j ââ¦0, i=1,2 If m0 |= Φ0 then it follows immediately from the deï¬nitions that Î¦â¡ â§ Ï is satisï¬able. Our 0 aim is to show that Î¦â¡ â§ Ï is also satisï¬able, which would mean that there is a fork modelm as required. Suppose otherwise. Then Φ⡠|= ¬Ï. We can regard Φ⡠as a set of unary andbinary clauses and Â¬Ï as a clause with 2 · |â¦0| literals lji, the negations of the lâ . According ji to the subsumption theorem (Slagle et al., 1969), by applying the standard resolution ruleto Φâ¡, we can derive a clause lj ⨠l which subsumes Â¬Ï (i.e., its both literals occur in 1i1 j2i2 ¬Ï). Since Φ is closed, we have lj ⨠l among the clauses of Φ⡠and as the l are the 1i1 j2i2 jkik ·â¡ik -translations of spatial terms for spatial variables from â¦0, we conclude that lj ⨠l 1i1 j2i2 is indeed among the clauses of Φ⡠, contrary to Î¦â¡ â§ Ï being satisï¬able. 0 0 K C.5.2 The Polynomial Translation of PT L ⦠RC2 into PT L Now we are in a position to deï¬ne a polynomial (at most quadratic) translation ·⢠ofPT L ⦠RC2 into PT L. Starting with a given formula Ï, we construct the PT L ⦠RC2-formula Ï of the form (61): Ï = ÏÏ â§ 2+2+ â 2â(CI CIp â¡ CIp ) , P F pââ¦Ï 235
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev where ÏÏ is a PT L[RC2]-formula. Let â¦Ï = p | p â â¦Ï and let ⦠denote the smallestset of spatial variables containing â¦Ï ⪠â¦Ï and all spatial variables occurring in ÏÏ. Given2âÏ â AtFm⦠, denote by 2âÏ the formula from AtFm obtained from 2 â Ï by replacing Ï â¦Ï every occurrence of p â â¦Ï with p â â¦Ï. Consider the PT L-formula Ï⢠= Ïâ â§ 2+2+ 2+ â Ï Î ( 2 â Ï â 2 â Ï )â . P F ⦠⧠2+P F 2âÏâAtFmâ¦Ï Lemma C.11. For every PT L ⦠RC2-formula Ï, Ï is satisï¬able in a tt-model based onF = W, < iï¬ Ï⢠is satisï¬able in a temporal model based on F. Proof. (â) Let (M, w0) |= Ï. Construct a temporal model N = F, V by taking, for2âÏ â AtFmâ¦, V(pÏ ) = w â W | (M, w) |= 2 â Ï . It is easy to see that (N, w0) |= Ïâ¢. (â) Let (N, w0) |= Ï⢠for some w0 â W . For every w â W , set Φw = 2 â Ï â AtFm⦠| (N, w) |= p Ï . Let Îw, for w â W , be a set of all non-â¦-equivalent fork models m with m |= Φw. ByClaim C.9, the Φw are closed and satisï¬able, so the sets Îw are nonempty. We use theelements of the Îw as building blocks for exhaustive states in the tt-model we are going toconstruct in order to satisfy Ï. First we show that each element of Îw has a successor in Îw+1 and a predecessor in Îwâ1 (provided that w has a successor and predecessor, respectively). More precisely, wesay that a pair of fork models m = f, v and m = f, v is suitable and write m â m if v(CIp ) = v (CIp), for every p â â¦Ï. (succ) Let m â Îw, m = f, v , and let w â W have a successor w + 1. By the third conjunct of Ïâ¢, we have Φw â© AtFm⦠= 2âÏ â AtFm | (N, w) |= p Ï â¦Ï Ï = 2âÏ â AtFm⦠| (N, w + 1) |= p . Ï Ï Therefore, Φw+1 â© AtFm⦠= 2âÏ â AtFm | (N, w) |= p . Ï â¦Ï Ï Now, by m â Îw, we have m |= Φw â© AtFm⦠. So if we deï¬ne a fork model m = f, v by Ï taking v (p) = v(p ), for all p â â¦Ï (and arbitrary otherwise), then m |= Φw+1 â© AtFmâ¦Ïfollows. Since Φw+1 is closed, by Lemma C.10, we can ï¬nd a fork model m = f, v such that m â¼â¦ m and m |= Φ Ï w+1. It follows that m â m and m is â¦-equivalent to some fork model in Îw+1 (i.e., we may assume that m â Îw+1). (pred ) Similarly, for every m â Îm, m = f, v , and every w â W with a predecessor w â 1, there is m = f, v such that m â Îwâ1 and m â m. It should be clear that for every fork model m â Îw and every w â W , we can deï¬ne a function rm,w that gives for each u â W a fork model rm,w(u) â Îu such that rm,w(w) = m 236
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity and rm,w(u) â rm,w(u + 1), whenever u + 1 is a successor of u. Let â be the set of all suchfunctions rm,w, for w â W and m â Îw. We are now ready to deï¬ne an Aleksandrov tt-model M = F, G, V satisfying Ï. Let G = W, R be a disjoint union of |â|-many forks fr = Wr, Rr , Wr = x0
r , x1 r , x2 r , x0 r Rr x1 r and x0 â r Rr x2 r , for each r â â, and let V(p, w) = xir W | (r(w), xir) |= CIp, for all p â ⦠and w â W . We show by induction on the construction of Ï â sub ÏÏ that, for every w â W , (M, w) |= Ï iï¬ (N, w) |= Ïâ. Case Ï = 2 â Ï . Suppose that (M, w) |= 2 â Ï but (N, w) |= pÏ . Then 2 â Ï / â Φw and, since Φw is closed (by Claim C.9 and Î⦠being true at w), we have Φw |=f 2 â Ï . It follows that there is a fork model m â Îw with m |= ¬2 â Ï , and so there is r â â such that r(w) = m, contrary to (M, w) |= 2 â Ï . Conversely, if (N, w) |= pÏ then, by construction, (M, w) |= 2 â Ï . The cases of the Booleans and temporal operators are trivial.As the second conjunct of Ï is satisï¬ed by construction, we obtain (M, w0) |= Ï. K References Aiello, M., & van Benthem, J. (2002a). Logical patterns in space. In Barker-Plummer, D., Beaver, D. I., van Benthem, J., & Scotto di Luzio, P. (Eds.), Words, Proofs andDiagrams, pp. 5â25. CSLI Publications, Stanford. Aiello, M., & van Benthem, J. (2002b). A modal walk through space. Journal of Applied Non-Classical Logics, 12 (3â4), 319â364. Alexandroï¬, P. (1937). Diskrete R¨ aume. Matematicheskii Sbornik, 2 (44), 501â518. Allen, J. (1983). Maintaining knowledge about temporal intervals. Communications of the ACM, 26, 832â843. Areces, C., Blackburn, P., & Marx, M. (2000). The computational complexity of hybrid temporal logics. Logic Journal of the IGPL, 8, 653â679. Arhangelâskii, A., & Collins, P. (1995). On submaximal spaces. Topology and its Applica- tions, 64, 219â241. Asher, N., & Vieu, L. (1995). Toward a geometry of common sense: A semantics and a complete axiomatization of mereotopology. In Mellish, C. (Ed.), Proceedings of the14th International Joint Conference on Artiï¬cial Intelligence (IJCAI-95), pp. 846â852. Morgan Kaufmann. Balbiani, P., & Condotta, J.-F. (2002). Computational complexity of propositional linear temporal logics based on qualitative spatial or temporal reasoning. In Armando, A.(Ed.), Proceedings of Frontiers of Combining Systems (FroCoS 2002), Vol. 2309 ofLecture Notes in Computer Science, pp. 162â176. Springer. Balbiani, P., Tinchev, T., & Vakarelov, D. (2004). Modal logics for region-based theories of space. Manuscript. Bennett, B. (1994). Spatial reasoning with propositional logic. In Proceedings of the 4th International Conference on Knowledge Representation and Reasoning, pp. 51â62.Morgan Kaufmann. 237
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Bennett, B. (1996). Modal logics for qualitative spatial reasoning. Logic Journal of the IGPL, 4, 23â45. Bennett, B., & Cohn, A. (1999). Multi-dimensional multi-modal logics as a framework for spatio-temporal reasoning. In Proceedings of the âHot topics in Spatio-temporalreasoningâ workshop, IJCAI-99, Stockholm. Bennett, B., Cohn, A., Wolter, F., & Zakharyschev, M. (2002). Multi-dimensional modal logic as a framework for spatio-temporal reasoning. Applied Intelligence, 17, 239â251. Blackburn, P. (1992). Fine grained theories of time. In Aurnague, M., Borillo, A., Borillo, M., & Bras, M. (Eds.), Proceedings of the 4th European Workshop on Semantics ofTime, Space, and Movement and Spatio-Temporal Reasoning, pp. 299â320, ChË ateau de Bonas, France. Groupe âLangue, Raisonnement, Calculâ, Toulouse. B¨ orger, E., Gr¨ adel, E., & Gurevich, Y. (1997). The Classical Decision Problem. Perspectives in Mathematical Logic. Springer. Bourbaki, N. (1966). General topology, Part 1. Hermann, Paris and Addison-Wesley. Chagrov, A., & Zakharyaschev, M. (1997). Modal Logic, Vol. 35 of Oxford Logic Guides. Clarendon Press, Oxford. Chlebus, B. (1986). Domino-tiling games. Journal of Computer and System Sciences, 32, 374â392. Clarke, B. (1981). A calculus of individuals based on âconnectionâ. Notre Dame Journal of Formal Logic, 23, 204â218. Clarke, B. (1985). Individuals and points. Notre Dame Journal of Formal Logic, 26, 61â75. Clarke, E., & Emerson, E. (1981). Design and synthesis of synchronisation skeletons using branching time temporal logic. In Kozen, D. (Ed.), Logic of Programs, Vol. 131 ofLecture Notes in Computer Science, pp. 52â71. Springer. Clementini, E., Di Felice, P., & Hern´ andez, D. (1997). Qualitative representation of posi- tional information. Artiï¬cial Intelligence, 95, 317â356. Cohn, A. (1997). Qualitative spatial representation and reasoning techniques. In Brewka, G., Habel, C., & Nebel, B. (Eds.), KI-97: Advances in Artiï¬cial Intelligence, Vol. 1303of Lecture Notes in Computer Science, pp. 1â30. Springer. Davis, E. (1990). Representations of Commonsense Knowledge. Morgan Kaufmann. Degtyarev, A., Fisher, M., & Konev, B. (2003). Monodic temporal resolution. In Baader, F. (Ed.), Proceedings of the 19th International Conference on Automated Deduc-tion (CADE-19), Vol. 2741 of Lecture Notes in Artiï¬cial Intelligence, pp. 397â411.Springer. Demri, S., & DâSouza, D. (2002). An automata-theoretic approach to constraint LTL. In Agrawal, M., & Seth, A. (Eds.), Proceedings of the 22nd Conference on Foundationsof Software Technology and Theoretical Computer Science (FST TCS 2002), Vol. 2556of Lecture Notes in Computer Science, pp. 121â132. Springer. Egenhofer, M., & Franzosa, R. (1991). Point-set topological spatial relations. International Journal of Geographical Information Systems, 5, 161â174. 238
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Egenhofer, M., & Herring, J. (1991). Categorizing topological relationships between regions, lines and points in geographic databases. Tech. rep., University of Maine. Egenhofer, M., & Sharma, J. (1993). Assessing the consistency of complete and incomplete topological information. Geographical Systems, 1, 47â68. Emerson, E., & Halpern, J. (1985). Decision procedures and expressiveness in the temporal logic of branching time. Journal of Computer and System Sciences, 30, 1â24. Fine, K. (1974). Logics containing K4, part I. Journal of Symbolic Logic, 39, 229â237. Finger, M., & Gabbay, D. (1992). Adding a temporal dimension to a logic system. Journal of Logic, Language and Information, 2, 203â233. Fisher, M., Dixon, C., & Peim, M. (2001). Clausal temporal resolution. ACM Transactions on Computational Logic (TOCL), 2, 12â56. Gabbay, D., Hodkinson, I., & Reynolds, M. (1994). Temporal Logic: Mathematical Found- ations and Computational Aspects, Volume 1. Oxford University Press. Galton, A., & Meathrel, R. (1999). Qualitative outline theory. In Dean, T. (Ed.), Proceedings of the 16th International Joint Conference on Artiï¬cial Intelligence (IJCAI-99), pp.1061â1066. Morgan Kaufmann. Gerevini, A., & Nebel, B. (2002). Qualitative spatio-temporal reasoning with RCC-8 and Al- lenâs interval calculus: Computational complexity. In Proceedings of the 15th EuropeanConference on Artiï¬cial Intelligence (ECAIâ02), pp. 312â316. IOS Press. Gerevini, A., & Renz, J. (2002). Combining topological and size constraints for spatial reasoning. Artiï¬cial Intelligence, 137, 1â42. G¨ odel, K. (1933). Eine Interpretation des intuitionistischen Aussagenkalk¨ uls. Ergebnisse eines mathematischen Kolloquiums, 4, 39â40. Goldblatt, R. (1976). Metamathematics of modal logic, Part I. Reports on Mathematical Logic, 6, 41â78. Goranko, V., & Passy, S. (1992). Using the universal modality: gains and questions. Journal of Logic and Computation, 2, 5â30. Gotts, N. (1996). An axiomatic approach to topology for spatial information systems. Tech. rep. 96.25, School of Computer Studies, University of Leeds. Halpern, J., & Shoham, Y. (1986). A propositional modal logic of time intervals. In Proceed- ings of the 1st Annual IEEE Symposium on Logic in Computer Science (LICSâ86),pp. 279â292. IEEE Computer Society. Halpern, J., & Vardi, M. (1989). The complexity of reasoning about knowledge and time I: lower bounds. Journal of Computer and System Sciences, 38, 195â237. Hodkinson, I. (2004). Complexity of monodic packed fragment over linear and real time. To appear in Annals of Pure and Applied Logic, available at http://www.doc.ic.ac.uk// imh/papers/cxmonlin.pdf. Hodkinson, I., Kontchakov, R., Kurucz, A., Wolter, F., & Zakharyaschev, M. (2003). On the computational complexity of decidable fragments of ï¬rst-order linear temporal 239
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev logics. In Reynolds, M., & Sattar, A. (Eds.), Proceedings of TIME-ICTL 2003, pp.91â98. IEEE Computer Society. Hodkinson, I., Wolter, F., & Zakharyaschev, M. (2000). Decidable fragments of ï¬rst-order temporal logics. Annals of Pure and Applied Logic, 106, 85â134. Hodkinson, I., Wolter, F., & Zakharyaschev, M. (2001). Monodic fragments of ï¬rst-order temporal logics: 2000â2001 A.D. In Nieuwenhuis, R., & Voronkov, A. (Eds.), Logicfor Programming, Artiï¬cial Intelligence and Reasoning, Vol. 2250 of Lecture Notes inArtiï¬cial Intelligence, pp. 1â23. Springer. Hodkinson, I., Wolter, F., & Zakharyaschev, M. (2002). Decidable and undecidable frag- ments of ï¬rst-order branching temporal logics. In Proceedings of the 17th AnnualIEEE Symposium on Logic in Computer Science (LICS 2002), pp. 393â402. IEEEComputer Society. Hughes, G., & Cresswell, M. (1996). A New Introduction to Modal Logic. Methuen, London. Hustadt, U., & Konev, B. (2003). TRP++ 2.0: A temporal resolution prover. In Baader, F. (Ed.), Proceedings of the 19th International Conference on Automated Deduction(CADE-19), Vol. 2741 of Lecture Notes in Computer Science, pp. 274â278. Springer. Kontchakov, R., Lutz, C., Wolter, F., & Zakharyaschev, M. (2004). Temporalising tableaux. Studia Logica, 76, 91â134. Kutz, O., Sturm, H., Suzuki, N.-Y., Wolter, F., & Zakharyaschev, M. (2003). Logics of metric spaces. ACM Transactions on Computational Logic, 4, 260â294. Ladner, R. (1977). The computational complexity of provability in systems of modal logic. SIAM Journal on Computing, 6, 467â480. Lemon, O., & Pratt, I. (1998). On the incompleteness of modal logics of space: advan- cing complete modal logics of place. In Kracht, M., de Rijke, M., Wansing, H., &Zakharyaschev, M. (Eds.), Advances in Modal Logic, Volume 1, pp. 115â132. CSLIPublications, Stanford. Lewis, C., & Langford, C. (1932). Symbolic Logic. Appleton-Century-Crofts, New York. Ligozat, G. (1998). Reasoning about cardinal directions. Journal of Visual Languages and Computing, 9, 23â44. Manna, Z., & Pnueli, A. (1992). The Temporal Logic of Reactive and Concurrent Systems. Springer. McKinsey, J. (1941). A solution of the decision problem for the Lewis systems S2 and S4, with an application to topology. Journal of Symbolic Logic, 6, 117â134. McKinsey, J., & Tarski, A. (1944). The algebra of topology. Annals of Mathematics, 45, 141â191. Muller, P. (1998a). A qualitative theory of motion based on spatio-temporal primitives. In Cohn, A., Schubert, L., & Shapiro, S. (Eds.), Proceedings of the 6th InternationalConference on Principles of Knowledge Representation and Reasoning (KRâ98), pp.131â142. Morgan Kaufmann. 240
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity Muller, P. (1998b). Space-time as a primitive for space and motion. In Guarino, N. (Ed.), Proceedings of the International Conference on Formal Ontology in Information Sys-tems (FOISâ98), Vol. 46 of Frontiers in Artiï¬cial Intelligence and Applications, pp.63â76. IOS Press. Nebel, B., & B¨ urckert, H. (1995). Reasoning about relations: A maximal tractable subclass of Allenâs interval algebra. Journal of the ACM, 42, 43â66. Nebel, B. (1996). Artiï¬cial intelligence: A computational perspective. In Brewka, G. (Ed.), Principles of Knowledge Representation, pp. 237â266. CSLI Publications. Nutt, W. (1999). On the translation of qualitative spatial reasoning problems into modal logics. In Burgard, W., Christaller, T., & Cremers, A. (Eds.), Advances in Artiï¬-cial Intelligence. Proceedings of the 23rd Annual German Conference on Artiï¬cialIntelligence (KIâ99), Vol. 1701 of Lecture Notes in Computer Science, pp. 113â124.Springer. Ono, H., & Nakamura, A. (1980). On the size of refutation Kripke models for some linear modal and tense logics. Studia Logica, 39, 325â333. Orlov, I. (1928). The calculus of compatibility of propositions. Mathematics of the USSR, Sbornik, 35, 263â286. (In Russian). Post, E. (1946). A variant of a recursively unsolvable problem. Bulletin of the AMS, 52, 264â268. Pratt-Hartmann, I. (2002). A topological constraint language with component counting. Journal of Applied Non-Classical Logics, 12, 441â467. Randell, D., Cui, Z., & Cohn, A. (1992). A spatial logic based on regions and connection. In Nebel, B., Rich, C., & Swartout, W. (Eds.), Proceedings of the 3rd InternationalConference on Principles of Knowledge Representation and Reasoning (KRâ92), pp.165â176. Morgan Kaufmann. Renz, J. (1998). A canonical model of the region connection calculus. In Cohn, A., Schubert, L., & Shapiro, S. (Eds.), Proceedings of the 6th International Conference on Prin-ciples of Knowledge Representation and Reasoning (KRâ98), pp. 330â341. MorganKaufmann. Renz, J., & Nebel, B. (1998). Spatial reasoning with topological information. In Freksa, C., Habel, C., & Wender, K. (Eds.), Spatial CognitionâAn Interdisciplinary Approachto Representation and Processing of Spatial Knowledge, Vol. 1404 of Lecture Notes inComputer Science, pp. 351â372. Springer. Renz, J., & Nebel, B. (1999). On the complexity of qualitative spatial reasoning. Artiï¬cial Intelligence, 108, 69â123. Renz, J. (2002). A canonical model of the region connection calculus. Journal of Applied Non-Classical Logics, 12, 469â494. Renz, J., & Nebel, B. (2001). Eï¬cient methods for qualitative spatial reasoning. Journal of Artiï¬cial Intelligence Research, 15, 289â318. Reynolds, M. (2003). The complexity of the temporal logic with âuntilâ over general linear time. Journal of Computer and System Science, 66, 393â426. 241
Gabelaia, Kontchakov, Kurucz, Wolter, & Zakharyaschev Reynolds, M. (2004). The complexity of the temporal logic over the reals. Submitted, available at http://www.csse.uwa.edu.au/ mark/research/Online/CORT.htm. Schwendimann, S. (1998). A new one-pass tableau calculus for PLTL. In de Swart, H. (Ed.), Proceedings of the International Conference on Automated Reasoning with AnalyticTableaux and Related Methods (TABLEAUX-98), Vol. 1397 of Lecture Notes in Arti-ï¬cial Intelligence, pp. 277â291. Springer. Sistla, A., & Clarke, E. (1985). The complexity of propositional linear temporal logics. Journal of the Association for Computing Machinery, 32, 733â749. Sistla, A., & German, S. (1987). Reasoning with many processes. In Proceedings of the Second IEEE Symposium on Logic in Computer Science (LICSâ87), pp. 138â153. IEEEComputer Society. Slagle, J., Chang, C.-L., & Lee, R. (1969). Completeness theorems for semantic resolution in consequence-ï¬nding. In Proceedings of the 1st International Joint Conference onArtiï¬cial Intelligence (IJCAIâ69), pp. 281â286. William Kaufmann. Smith, T., & Park, K. (1992). An algebraic approach to spatial reasoning. International Journal of Geographical Information Systems, 6, 177â192. Stockmeyer, L. (1974). The Complexity of Decision Problems in Automata Theory and Logic. Ph.D. thesis, MIT. Stockmeyer, L. (1987). Classifying the computational complexity of problems. Journal of Symbolic Logic, 52, 1â43. Stone, M. (1937). Application of the theory of Boolean rings to general topology. Transac- tions of the AMS, 41, 321â364. Tarski, A. (1938). Der Aussagenkalk¨ ul und die Topologie. Fundamenta Mathematicae, 31, 103â134. Tsao Chen, T. (1938). Algebraic postulates and a geometric interpretation of the Lewis calculus of strict implication. Bulletin of the AMS, 44, 737â744. van Benthem, J. (1995). Temporal logic. In Gabbay, D., Hogger, C., & Robinson, J. (Eds.), Handbook of Logic in Artiï¬cial Intelligence and Logic Programming, Vol. 4, pp. 241â350. Oxford Scientiï¬c Publishers. van Emde Boas, P. (1997). The convenience of tilings. In Sorbi, A. (Ed.), Complexity, Logic and Recursion Theory, Vol. 187 of Lecture Notes in Pure and Applied Mathematics,pp. 331â363. Marcel Dekker Inc. Wolper, P. (1985). The tableau method for temporal logic: An overview. Logique et Analyse, 28, 119â152. Wolter, F. (1996). Properties of tense logics. Mathematical Logic Quarterly, 42, 481â500. Wolter, F., & Zakharyaschev, M. (2000a). Spatial reasoning in RCC-8 with Boolean region terms. In Horn, W. (Ed.), Proceedings of the 14th European Conference on Artiï¬cialIntelligence (ECAI 2000), pp. 244â248. IOS Press. Wolter, F., & Zakharyaschev, M. (2000b). Spatio-temporal representation and reasoning based on RCC-8. In Cohn, A., Giunchiglia, F., & Seltman, B. (Eds.), Proceedings of 242
Combining Spatial and Temporal Logics: Expressiveness vs. Complexity the 7th Conference on Principles of Knowledge Representation and Reasoning (KR2000), pp. 3â14. Morgan Kaufmann. Wolter, F., & Zakharyaschev, M. (2002). Qualitative spatio-temporal representation and reasoning: a computational perspective. In Lakemeyer, G., & Nebel, B. (Eds.), Ex-ploring Artiï¬cial Intelligence in the New Millenium, pp. 175â216. Morgan Kaufmann. Zimmermann, K. (1995). Measuring without measures: the delta-calculus. In Frank, A., & Kuhn, W. (Eds.), Proceedings of the 2nd International Conference on Spatial Inform-ation Theory (COSIT), Vol. 988 of Lecture Notes in Computer Science, pp. 59â67.Springer. 243
Document Outline 1 Introduction 2 Propositional Logics of Space and Time 2.1 Logics of Space 2.1.1 S4u 2.1.2 RCC-8 as a Fragment of S4u 2.1.3 BRCC-8 as a Fragment of S4u 2.1.4 RC 2.1.5 RCmax 2.2 Temporal Logics 3 Combinations of Spatial and Temporal Logics 3.1 Spatio-Temporal Logics with (PC) 3.2 `Maximal' Combinations with (PC) and (OC) 3.3 Decidable Spatio-Temporal Logics with (PC) and (OC) 4 Conclusion A Complexity of Spatial Logics B Spatio-Temporal Logics Based on S4u B.1 Temporalisations of S4u B.2 Undecidability of PTLoS4u and PTLxS4u C Spatio-Temporal Logics Based on RC C.1 Lower Complexity Bounds (I) C.2 Upper Complexity Bounds (I): Quasimodels for PTLxRC C.3 Upper Complexity Bounds (II): Embedding into First-Order Temporal Logic C.4 Lower Complexity Bounds (II): Embedding First-Order Temporal Logic C.5 PSPACE-complete Spatio-Temporal Logic C.5.1 Properties of RC2-formulas C.5.2 The Polynomial Translation of PTLoRC2 into PTL References