Elementary Multimodal

Jakub Michaliszyn1

1 University Of Wrocław

Abstract We study multimodal logics over universally first-order definable classes of frames. We show that even for bimodal logics, there are universal Horn formulas that define set of frames such that the satisfiability problem is undecidable, even if one or two of the binary relations are transitive.

1998 ACM Subject Classification F.4.1 Mathematical

Keywords and phrases , Transitive frames, Elementary modal logics, Decidability

1 Introduction

Multimodal logic extends propositional logic by unary operators: ♦1,..., ♦m and dual op- erators 1,..., m. The formal semantics is given in terms of Kripke structures. A Kripke structure is a structure consisting of a (possibly infinite) number of worlds that may be connected by binary relations R1,...,Rm, called a frame, together with a valuation of pro- positional variables in each of the worlds. In this semantics, ♦iϕ means the current world is connected by Ri to some world in which ϕ is true; and iϕ, equivalent to ¬♦i¬ϕ, means ϕ is true in all worlds to which the current world is connected by Ri. Multimodal logics are often considered with some addidional constraints on the inter- pretation of operators, e.g. by requiring that the modal operator represents a relation that is reflexive and transitive (S4). In this way, we can define logics with nonuniform modal operat- ors, like Linear (LTL), Computation Tree Logic (CTL) or Halpern–Shoham logic (HS). Variants of multimodal logic vary in the complexity and the decidability of the satisfiab- ility problem. Some multimodal logics are NP-complete (S5), some are PSpace-complete (unimodal logic, LTL), so are ExpTime-complete (CTL) and 2-ExpTime-complete (CTL∗). Finally, the Halpern–Shoham logic is a simple example of a temporal logic that is undecid- able, even if we consider some unimodal fragments [3, 7]. In this paper we consider adding constraints on the interpretation of operators by de- fining the class of frames by a universal first order logic sentence that uses binary relations R1,...,Rn. For example, the sentence ∀xyz.(xR1y ∧ yR1z ⇒ xR1z) ∧ (xR2y ⇒ xR1y) defines the class of all the frames where R1 is a transitive relation containing R2. Multiodal logic over a class of frames definable by a first order logic sentence is called an elementary arXiv:1809.03254v1 [cs.LO] 10 Sep 2018 multimodal logic. Interesting positive results regarding the decidability of various elementary unimodal logic (i.e., a logic whose frames have only one binary relation) [9, 8] give us hope that elementary multimodal logics can be used in verification, and, in particular, in synthesis. In this paper we focus on the synthesis problem, in which, for a given specification, the goal is to construct a system that satisfies the specification. The specification can be provided by any multimodal logic. However, most of the popular multimodal logic cannot

This work has been supported by Polish National Science Center grant UMO-2014/15/D/ST6/00719.

© J. Michaliszyn Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany 2 Elementary Multimodal Logics

express some possibly desired properties of the system, e.g., state that the system has to be deterministic (only one successor from each state), transitive (i.e., can do several steps at one), reflexive (i.e., can stay in a single state for a long time, perhaps because of not getting CPU time to proceed) etc. It makes therefore sense to consider a variant of the synthesis problem where properties like these can be easily stated. Elementary multimodal logics fit perfectly into this scenario. Many modal logics used in automatic verification contain operators that are interpreted as transitive relations. For example, Linear Temporal Logic (LTL) contains transitive oper- ators F and G [2]. In epistemic modal logics, the knowledge operators Ki are interpreted as relations that are not only transitive, but also reflexive and symmetric [4]. Another example is the logic of subintervals [7], which is a fragment of Halpern–Shoham logic with a single modality that can be read as “in some subinterval”. Main results. In [5], it was shown that there is an universal first-order formula such that the global satisfiability problem of unimodal logic over the class of frames that satisfy this formula is undecidable. A slight modification of that formula yields an analogous result for the local satisfiability problem. In [6] it was shown that even a very simple formula with three variables without equality leads to undecidability. On the positive side, in [8], it was shown that universal formulas that imply that the (only) binary relation is transitive lead to decidable unimodal logic, and in [9] a similar result was shown for universal Horn formulas. In this paper, we show that the positive results mentioned above do not extend to ele- mentary multimodal logics. We show that elementary multimodal logics may be undecidable even if we consider only universal Horn formulas and two relations, regardless of whether we assume that any of the relations is transitive.

2 Preliminaries

Formulae of a multimodal logic are interpreted in Kripke structures, which are triples of the form hM,R1,...,Rn, πi, where M is a set of worlds, R1,...,Rn are binary relations on M, hM,R1,...,Rni is called a frame, and π is a labelling, a function that assigns to each world a set of propositional variables which are true at this world. We say that a structure hM, R, πi is based on the frame hM,Ri. For a given class of frames K, we say that a structure is K-based if it is based on some frame from K. We will use calligraphic letters M, N to denote frames and Fraktur letters M, N to denote structures. Whenever we consider a structure M, we assume that its frame is M and its universe is M (and the same holds for other letters). The semantics of a multimodal logic is defined recursively. A modal formula ϕ is (locally) satisfied in a world w of a model M = hM,R1, dots, Rn, πi, denoted as M, w |= ϕ if ϕ = p, where p is a variable, and ϕ ∈ π(w), ϕ = ¬ϕ0 and M, w 6|= ϕ0, ϕ = ϕ1 ∧ ϕ2 and M, w |= ϕ1 and M, w |= ϕ2, 0 0 ϕ = ♦iϕ and there is a world v ∈ M such that (w, v) ∈ Ri and M, v |= ϕ , Boolean connectives ∨, ⇒, ⇔ and constants >, ⊥ are introduced in the standard way. We abbreviate ¬♦i¬ϕ by iϕ. By |ϕ| we denote the length of ϕ. A formula ϕ is globally satisfied in M, denoted as M |= ϕ, if for all worlds w of M, we have M, w |= ϕ. For a given class of frames K, we say that a formula ϕ is locally (resp. globally) K- satisfiable if there exists a K-based structure M, and a world w ∈ W such that M, w |= ϕ (resp. M |= ϕ). We study four versions of the satisfiability problem. Jakub Michaliszyn 3

For a given formula ϕ, a Kripke structure M, and a world w ∈ M we define the type of ϕ w (with respect to ϕ) in M as tpM(w) = {ψ : M, w |= ψ and ψ is a subformula of ϕ}. We ϕ write tpM(w) if the formula is clear from the context. Note that |tpM(w)| ≤ |ϕ|. The class of (equality-free) universal first order sentences is defined as a subclass of first– order sentences such that each sentence is of the form ∀~x Ψ(~x), where Ψ(~x) is quantifier–free formula over the language {R1,...,Rn}, where each Ri is a binary relation symbol. The local (resp. global) satisfiability problem K-SAT (resp. K-GSAT) as follows. Is a given modal formula locally (resp. globally) K-satisfiable? The finite local (global) satisfiability problem, K-FINSAT (K-GFINSAT), is defined in the same way, but we are only interested in finite models (the class K may still contain infinite structures).

3 Decidability of elementary multimodal logics

Let UFO(n; m) be the set of all the universal first order formulas Φ with binary relations R1,...,Rn+m such that in all the models of Φ the relations Rn+1,...,Rn+m are transitive. Let UHF (n; m) be a subset of UFO(n; m) that consists of the Horn formulas. We show the following.

I Theorem 1. For any n, m such that n + m > 1, there is a UHF (n; m) formula Φ such that the finite satisfiability, the finite global satisfiability, the satisfiability and the global satisfiability of multimodal logic over Φ are undecidable.

Proof. We define Φ as the conjunction of the following formulas:

1. ∀x, y, z, u, s, t.xR1y ∧ xR1u ∧ uR1z ∧ mid2 (u) ⇒ yR2z 2. ∀x, y, z, u, s, t.xR2y ∧ xR2u ∧ uR1z ∧ mid1 (u) ⇒ yR1z 3. only if n < 2: ∀x, y, z.xR2y ∧ yR2z ⇒ xR2z 4. only if n = 0: ∀x, y, z.xR1y ∧ yR1z ⇒ xR1z where midi(u) states that there is a path of length 2 via R2 starting from u: uRis ∧ sRit. The crucial property of the formula Φ is that the structure presented in Figure 1, as well as similar, larger “grid-like” structures, is a model of Φ. It is worth to notice that the potential transitivity of R1 and R2 plays a minor role in this structure – the longest R1 and R2 paths are of length 2: Ux,y, Sx,y, Tx,y, and there are no other such paths of length 2. Let K be the set of frames defined by Φ. To show that the problems K-GSAT and K- GFINSAT are undecidable, one can encode the domino problem [1] in a standard manner (c.f. [9]). To obtain the result for SAT and FINSAT, we define Φ0 as the conjunction of Φ and the following conjunct:

5. ∀x, y, z, v.xR1y ∧ xR2y ∧ zR1v ⇒ xR1v Observe that the intended model of Φ, exemplified in Figure 1 is also a model of Φ0 (as every world has only R1-successors or only R2-successors), so the proof for GSAT and GFINSAT also works for Φ0.

Now, to obtain a proof for the local satisfiability problem, we use the modal formula φD 0 from the proof for the global satisfiability problem to define the formula φD as follows:

♦1> ∧ ♦2> ∧ 1φD

It requires that the initial world has both a R1-successor and a R2-successor, which means 0 that by Φ it has to be R1 or R2-connected to every world of the model that has a predecessor. 4 Elementary Multimodal Logics

P0,0 P1,0 P2,0 P0,0

T0,2 S0,2 T1,2 S1,2 T2,2 S2,2

U0,2 U1,2 U2,2

P0,2 P1,2 P2,2 P0,2

T0,1 S0,1 T1,1 S1,1 T2,1 S2,1

U0,1 U1,1 U2,1

P0,1 P1,1 P2,1 P0,1

T0,0 S0,0 T1,0 S1,0 T2,0 S2,0

U0,0 U1,0 U2,0

P0,0 P1,0 P2,0 P0,0

Figure 1 A model of Φ. Jakub Michaliszyn 5

To conclude the result it is enough to see that the words without predecessors, except from the initial one, can be removed from the model without influencing the satisfaction of the formula. J

4 Discussion and conclusions

We showed that elementary multimodal logics may be undecidable, even if we only consider universal Horn formulas, two modalities and possibly require some relations to be transitive. It is worth to notice that our first order formulas include some non-trivial interaction between the relations R1 and R2 – an interesting question is whether the problem becomes decidable if we forbid such relations, i.e., require that each conjunct uses only one relation.

References 1 R. Berger. The undecidability of the domino problem. Mem. Amer. Math. Soc., 66:72pp, 1966. 2 Patrick Blackburn, Maarten de Rijke, and Yde Venema. Modal Logic, volume 53 of Cam- bridge Tracts in Theoretical Comp. Sc. Cambridge University Press, Cambridge, 2001. 3 Davide Bresolin, Dario Della Monica, Valentin Goranko, Angelo Montanari, and Guido Sciavicco. The dark side of interval temporal logic: Sharpening the undecidability border. In TIME, pages 131–138. IEEE, 2011. 4 R. Fagin, J.Y. Halpern, Y. Moses, and M.Y. Vardi. Reasoning About Knowledge. MIT Press, 1995. 5 Edith Hemaspaandra and Henning Schnoor. A universally defined undecidable unimodal logic. In MFCS, volume 6907 of LNCS, pages 364–375. Springer, 2011. 6 Emanuel Kieroński, Jakub Michaliszyn, and Jan Otop. Modal logics definable by universal three-variable formulas. In FSTTCS, volume 13 of LIPIcs, pages 264–275, 2011. 7 Jerzy Marcinkowski and Jakub Michaliszyn. The ultimate undecidability result for the Halpern-Shoham logic. In LICS, pages 377–386. IEEE Computer Society, 2011. 8 Jakub Michaliszyn and Jan Otop. Elementary modal logics over transitive structures. In Simona Ronchi Della Rocca, editor, CSL, volume 23 of LIPIcs, pages 563–577. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2013. 9 Jakub Michaliszyn, Jan Otop, and Emanuel Kieroński. On the decidability of elementary modal logics. ACM Trans. Comput. Log., 17(1):2:1–2:47, 2015.