{'fraction_non_alphanumeric': 0.04248113854595336, 'fraction_numerical': 0.0038580246913580245, 'mean_word_length': 4.081463733391418, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Closing a Gap in the Complexity of Refinement Modal Logic

Refinement Modal Logic (RML), which was recently introduced by Bozzelli et al., is an extension of classical modal logic which allows one to reason about a changing model. In this paper we study computational complexity questions related to this logic, settling a number of open problems. Specifically, we study the complexity of satisfiability for the existential fragment of RML, a problem posed by Bozzelli, van Ditmarsch and Pinchinat. Our main result is a tight PSPACE upper bound for this problem, which we achieve by introducing a new tableau system. As a direct consequence, we obtain a tight characterization of the complexity of RML satisfiability for any fixed number of alternations of refinement quantifiers. Additionally, through a simple reduction we establish that the model checking problem for RML is PSPACE-complete, even for formulas with a single quantifier.


Introduction
In this paper we deal with the computational complexity of the satisfiability and model checking problems for the recently proposed Refinement Modal Logic [2], an extension of the standard modal logic K which also adds "refinement" quantification. Specifically, we first settle the complexity of satisfiability for the existential fragment of this logic, resolving an open problem posed by Bozzelli, van Ditmarsch and Pinchinat [3]. We then use this result to give tight characterizations for the complexity of this problem for any fixed number of quantifier alternations, closing the complexity gaps of [3]. In addition, we use a simple argument to show that, unlike the standard modal logic K, model checking for RML is PSPACE-hard even for formulas with a single quantifier.
Modal logics with propositional quantifiers have been a subject of research since Fine's seminal work [8]. The motivation behind the study of these logics is their ability to model situations where new information is revealed leading to a change in the model. In this context several bisimulation quantified logics have been introduced recently [15,11,13,10]. Roughly speaking, they allow one to speak about models which are bisimilar to the current model, except for a single (quantified-upon) propositional variable. Thus, this models the arrival of one kind of new information, namely new propositional information.
The motivation behind Refinement Modal Logic on the other hand is to model the arrival of a different kind of new information. We would like to have the ability to speak about models which retain the propositional valuations of the current model, but possibly differ from it in their structure. In other words, we would like to be able to reason about new information which affects the transitions, rather than the propositional valuations, of the current model.
A novel attempt to deal with this problem was offered by Balbiani et al. [1] who defined Arbitrary Public Announcement Logic (APAL). Roughly speaking, their logic allows one to reason about models which are restrictions of the current model. Unfortunately, this logic is undecidable [9]. A slightly more general (and arguably more natural) approach was then undertaken by Bozzelli et al. [6,7,2] with the introduction of Refinement Modal Logic (RML).
In RML one adds to the standard modal logic the quantifiers ∃ r and ∀ r . Informally, ∃ r φ means "there exists a refinement of the current model where φ holds". This is more general than speaking about restrictions, because a model M is a refinement of another model M ′ if and only if M is a restriction of a bisimilar copy of M ′ [2]. Another way to define refinement is as a partial bisimulation: M is a bisimulation of M ′ if there exists a relation between their states satisfying the atom, forth and back requirements. For a refinement, only the atom and back relations need be satisfied. Informally, propositional valuations are retained and all transitions of the refined model must map back to transitions of the original model. As illustrated in [2,3] RML has already found many applications, for example, in describing game strategies, program logic or spatial reasoning.
The main purpose of this paper is to investigate the complexity of the satisfiability problem for (single-agent) RML, continuing the work of Bozzelli et al. [3]. An upper bound of 2EXP was claimed for this problem in [7], but the tableau-based procedure given there was found to be sound but not complete [2]. For the general case of RML the problem was later settled in [3], which showed that the satisfiability problem is complete for the class AEXP poly , which is the class of problems decidable by alternating exponential-time Turing machines with a polynomial number of alternations. For any fixed quantifier-alternation depth k, the same paper established that the problem is hard for the k-th level of the exponential-time hierarchy and belongs in the (k + 1)-th level.
Thus, this left a gap in the complexity of the problem for a fixed number of alternations. This gap is mostly of theoretical interest for k > 0, since (as far as is currently known) there is no immediate practical difference in the complexity of problems in the k-th and (k + 1)-th level of the exponential-time hierarchy: they all likely require doubly-exponential time. This is not true though for the case of RML ∃r , which is the fragment of RML using only existential quantifiers. The algorithm of [2] establishes membership of this problem in NEXP (that is, the first level of the exponential-time hierarchy), but the only hardness result known is that following from the PSPACE-hardness of ordinary modal logic.
In this paper we settle this problem by giving a PSPACE algorithm for RML ∃r satisfiability. In practical terms, this means that satisfiability for this fragment is exponentially easier than for fragments allowing universal quantification (unless PSPACE=NEXP). Somewhat surprisingly, it also means that RML ∃r satisfiability is no harder than satisfiability for the standard modal logic K, despite the large expressive power given by adding existential refinement quantifiers. We also show how our technique can be extended to close the complexity gaps of [2] for any fixed number of quantifier alternations, thus completely settling the complexity of this problem. Our main ingredient is to introduce a new tableau system for RML ∃r . We believe this construction, which is arguably simpler than the constraint systems used in [3], may be of independent interest.
Our results above seem to suggest that adding existential refinement quantifiers to K does not cost much in terms of computational complexity. Unfortunately, we complement this view with a negative result by showing that the model checking problem is PSPACE-hard for RML even for formulas with a single quantifier, resolving an open problem from [2]. The reduction we propose is surprisingly simple but it establishes that in this case the power afforded by a refinement quantifier causes an exponential blow-up in the problem's complexity.
The rest of this paper is structured as follows: in section 2 we give some preliminary definitions; in section 3 we present the tableau system for RML ∃r ; in section 4 we give a PSPACE algorithm for RML ∃r using the tableau method and describe how this idea can close the complexity gap for any fixed number of quantifier alternations; finally in section 5 we present the complexity results for the model checking problem.

Preliminaries
We use standard terminology for modal logic and the definitions of RML given in [2,3]. We assume an infinite supply of atomic propositional variables. A Kripke structure is a triple M = (W, R, V ), where W is the set of states (or worlds), R ⊆ W × W is a transition relation and V is a function which assigns to each state in W a set of propositional variables. To ease notation, when (s, t) ∈ R we sometimes write sRt. For two Kripke models M = (W, R, V ) and We call R a refinement mapping from M to M ′ . If the inverse of R is also a refinement mapping from M ′ to M then M and M ′ are bisimilar and R is a bisimulation. If R is a refinement mapping from M to M ′ and for s ∈ W , s ′ ∈ W ′ we have (s, s ′ ) ∈ R we say that (M ′ , s ′ ) is a refinement of (M, s).
The syntax of RML formulas (defined in [2]) is as follows: For most of the paper, unless otherwise noted, we will concentrate on the existential fragment of RML, denoted RML ∃r , in which the ∀ r quantifier is not allowed. Observe that negations are only allowed to appear immediately before propositional variables, making the distinction between the existential and universal fragments meaningful. A formula that is p or ¬p for some propositional variable p is called a literal ; we usually denote literals by l. We use d ✸ to denote the nesting depth of modalitites ✸, ✷ and d ∃ to denote the nesting depth of ∃ r .
The semantics of the propositional and modal parts are as usual, and we write M, s |= φ if a formula φ holds in a state s of a model M. For a formula φ = ∃ r ψ we have M, s |= φ exactly if there exists a model M ′ and a state s ′ in that model such that M ′ , s ′ |= ψ and (M ′ , s ′ ) is a refinement of (M, s). The semantics of ∀ r are analogously defined; more details can be found in [2].

Tableaux
In this section we introduce a tableau system that can be used to decide the satisfiability of RML ∃r formulas. In contrast to the constraint systems introduced in [3], we try to give a set of rules that is as simple and as similar as possible to the standard tableau procedures commonly used in ordinary modal logic [5].
Recall that, informally, the idea of a tableau is to maintain a set of prefix and formula pairs. The prefixes, which are created by the tableau, represent states of an attempted model of the initial formula. Usually, the prefixes are strings of integers and the accessibility relation of the model we are building can be read off the strings.
The main new idea in the tableau system we give here is that prefixes now become pairs of strings. In the course of trying to satisfy the formula we are implicitly constructing many models, because formulas of the form ∃ r ψ need to hold in a new model. At the same time, the new models we construct must obey the refinement conditions. Therefore, to keep things tidy, the tableau now produces formulas with two prefixes: the first prefix specifies a model, with the requirement that the refinement relationship of models should be readable from the prefixes, while the second, as before, encodes a state.
Let us now be a little more precise. We use elements of N * to encode prefixes, which we denote by greek letters, such as µ, ν, λ, σ. We use µ.ν to denote concatenation. For such a string µ, |µ| is its length; elements of N have length 1. The tableau contains elements of the form (µ, σ) ψ, where ψ is a formula, µ is a prefix that encodes the model and σ a prefix that encodes the state. We initialize the tableau with (1, 1) φ, where φ is the formula whose satisfiability we want to decide. We now start applying some derivation rules, which may need to create new states (in the case of ✸) or new models (in the case of ∃ r ). If i ∈ N we use the convention that (µ, σ.i) represents a state that is a successor of that represented by (µ, σ). Similarly, we use the convention that (µ.i, σ) represents a state that is a refinement (in fact a restriction) of (µ, σ).
Given this groundwork, the tableau rules follow quite naturally and are in fact very similar to those for the standard modal logic K. Recall that the ∨ rule involves a non-deterministic choice and we will refer to a branch of the tableau as the set of elements produced after applying the rules to (1, 1) φ, for some set of non-deterministic choices.
The full set of rules is given in Table 1. Note that, perhaps the only somewhat unusual part is the ✷ rule which can be applied to (µ, σ) ✷ψ when (µ.ν, σ.i) has appeared (as opposed to (µ, σ.i)). This is a clean way of maintaining the refinement relation: if (µ.ν, σ) represents a state that is a refinement of that represented by (µ, σ) and (µ.ν, σ.i) exists, then (µ, σ.i) must also implicitly exist, even if it does not yet appear in the tableau.
where σ.i has not appeared where µ.m has not appeared where (µ.ν, σ.i) has already appeared A branch is complete if all rules have been applied as much as possible. A complete branch is rejecting if there are some (µ, σ) p and (µ, σ) ¬p both in the branch; otherwise it is accepting. The correctness of the tableau system is summarized in the following lemmata.
Lemma 1. If φ is satisfiable then there exists a complete accepting tableau branch starting from (1, 1)φ.
Proof. We will proceed by induction on the number of rules applied. During the course of the proof we maintain a collection of models. Specifically, suppose that after k ∈ N applications of the rules we have a tableau branch b. For every µ such that (µ, σ) ψ ∈ b we keep a model M µ = (W µ , R µ , V µ ). For each (µ, σ) such that (µ.ν, σ) ψ ∈ b for some ν ∈ N * we have a state s µ,σ ∈ W µ . The following conditions are also satisfied: The tableau is initialized with (1, 1)φ, and suppose that φ is satisfiable, so there exists a model M and a state s in that model such that M, s |= φ. We set M 1 = M and s 1,1 = s and all the conditions above are satisfied.
Suppose that after k applications we have a collection of models that satisfy the conditions given above. We will show that we can handle applying any of the tableau rules, while still maintaining the conditions. This establishes that after any number of applications the tableau will be clash-free, since by the first condition, any formula contained in the tableau must be true in the corresponding state. We now take cases, depending on the rule applied. The two propositional rules are simple. The L rule is also simple since it can only be applied to literals, whose values are preserved by refinement. The ✷ rule also causes no problem: suppose we apply it to (µ, σ) ✷ψ to produce (µ, σ.i) ψ. Then by the conditions we have that M µ , s µ,σ |= ✷ψ and, since some (µ.ν, σ.i) ψ ′ already appears in the tableau, there is a state s µ,σ.i ∈ W µ and s µ,σ R µ s µ,σ.i . Therefore, M µ , s µ,σ.i |= ψ and the remaining conditions are not affected.
For the ✸ rule, suppose we apply it to (µ, σ) ✸ψ to get (µ, σ.i) ψ, such that σ.i has not appeared before in the branch. We know that M µ , s µ,σ |= ✸ψ, therefore there exists a state in W µ , call it s µ,σ.i , such that M µ , s µ,σ.i |= ψ, so the first condition remains satisfied. By the definition of refinement, if µ = m 1 .m 2 . . . m l , then there must be some state in W µ ′ , which we call s µ ′ ,σ.i , such that s µ ′ ,σ.i ρ µ ′ ,µ s µ,σ.i . Thus, we can continue with this procedure until the second and third conditions are satisfied for all prefixes.
For the ∃ r rule, suppose we apply it to (µ, σ) ∃ r ψ to get (µ.m, σ) ψ, such that µ.m has not appeared before in the branch. We know that M µ , s µ,σ |= ∃ r ψ, therefore there exists a model, call it M µ.m and a state s µ.m,σ such that (M µ.m,σ , s µ.m,σ ) is a refinement of (M µ , s µ,σ ) and M µ.m , s µ.m,σ |= ψ. Thus, again, the two conditions are satisfied.
Observe that for the models we have defined, M µ.m is a refinement of M µ , because every transition of the former model can also be found in the latter and also, by definition, corresponding states agree on their propositional variables.
Finally, if (µ, σ) ∃ r ψ ∈ b and the ∃ r rule has been applied, then there exists a model M µ.m and a state s µ.m,σ such that, by inductive hypothesis M µ.m , s µ.m,σ |= ψ. Since, as observed M µ.m is a refinement of M µ , we have M µ , s µ,σ |= ∃ r ψ.
Let us also give a lemma that will prove useful in the analysis of the algorithm of the following section. We will give an upper bound to the maximum length of a prefix produced in any tableau branch.

A Satisfiability Algorithm
In this section we describe an algorithm that decides satisfiability for the existential fragment of RML. Our algorithm will make heavy use of the tableau system defined in the previous section and will run in non-deterministic polynomial space. Since it is known that NPSPACE=PSPACE [14,12] and that the satisfiability problem is PSPACE-hard even for standard modal logic this algorithm gives a precise complexity characterization for the satisfiability problem for RML ∃r The main idea of the algorithm is similar to the tableau procedure that decides satisfiability for modal logic. We apply the tableau rules as defined in the previous section and construct parts of a branch. Notice that we have bounded the length of prefixes of the tableau formulas by the modal and existential depths of the formula, so ideally we would want to perform DFS on these prefixes. However, we need to be careful as there are two kinds of prefixes and rules L and ✸ when applied on a formula (µ, σ) ψ may affect the prefixes of µ.
The algorithm consists of the following: we keep a global counter variable (which we call i and initialize to 1), to keep track of the different tableau prefixes we construct. We call the procedure RMLexSAT, which is described in Figure 1, with parameters {(1, 1, φ)}, 1, 1 and ∅. If the procedure returns, we declare the formula φ satisfiable. If at any point the procedure encounters a clash and rejects, the algorithm declares the formula unsatisfiable. Theorem 1. The satisfiability problem for RML ∃r is in PSPACE.
The elements in P are at most d ∃ (φ) · |φ|: the number of subformulas of φ is at most |φ| and there are at most |µ| ≤ d ∃ (φ) prefixes of µ. Thus, the branching of the recursion is at most |P | and the global variable i is bounded by the total number of recursive calls which in turn is at most (d ✸ (φ)·d ∃ (φ)) d ∃ (φ)·|φ| . Therefore i can be stored using at most d ∃ (φ)·|φ|·log(d ✸ (φ)·d ∃ (φ)) bits and this is enough to argue that our algorithm uses space polynomial with respect to the size of its input.
It is not hard to see that if there is an accepting tableau branch for φ, then the algorithm can make appropriate non-deterministic choices to keep P a set of triples corresponding to a subset of the branch and thus never run into a clash and accept. On the other hand, if there are appropriate non-deterministic choices for the algorithm to accept φ, let B be the set of all the triples ever produced during the run of the algorithm and let b = {(µ, σ) ψ|(µ, σ, ψ) ∈ B}. Notice that for every formula in b and rule that can be applied on the formula, at some point the algorithm must have applied the rule on the formula, thus b is a complete branch. It is also an accepting branch: if there is a clash, this means there are (1, σ) p and (1, σ) ¬p ∈ b, thus at some point the algorithm produces (1, σ, p) and at some other point (1, σ, ¬p). Even if these points were during different recursive calls, notice that these triplets would transfer to the first recursive call with σ as part of the input, which is a common ancestor in the recursion tree, due to the global variable i which changes with every call.
Complexity for fixed number of alternations. Let us now sketch why the above procedure can be used to close the gaps in the complexity results of [3]. Intuitively, the idea is that since we can now solve satisfiability for RML ∃r in polynomial space (and hence deterministic exponential time) we save one alternation for all the more complex cases.
The algorithm given in [3] is recursive. Given a formula φ, it (non-deterministically) guesses a model for φ of at most exponential size. Then it checks whether the model actually satisfies φ. The algorithm proceeds to check if subformulas of φ hold in this model. When ∀ r ψ is encountered, the algorithm queries an oracle for the truth of ∃ r ¬ψ in the current model and if the answer is yes, it rejects. The resulting complexity comes from the fact that the alternation depth of ∃ r ¬ψ as defined in [3] is one less than the one of ∀ r ψ.
The observation now is that we can save the last query access for ∃ r ψ if ψ ∈ RML ∃r . First notice that we can use our algorithm to construct all complete accepting branches of the tableau in exponential time. We further argue that for any model for ψ, one of these branches corresponds to a refinement of that model: notice that the proof of lemma 1 works for any model for φ and the model constructed in the proof of lemma 2 is a refinement of the original model for φ through the obvious refinement relation. The rest follows from the fact that refinement is a transitive relation.

Model Checking
In this section we deal with the complexity of the model checking problem for RML, which was posed as an open question in [2]. The main (simple) observation we need is that, if we ignore propositional variables the problem contains the satisfiability problem for K. Since the satisfiability problem for K is PSPACE-hard even for the fragment that contains no variables [4], we get the same complexity for model checking for RML and RML ∃r . Proof. Suppose that we have a formula ψ in the standard modal logic K and that ψ contains no variables. We will construct M, s and φ such that M, s |= φ if and only if ψ is satisfiable. Let M be the model that consists of a single state s and a transition from that state to itself. It is not hard to see that any (variable-less) model is a refinement of M by mapping all states to s. We let φ be ∃ r ψ. Now M, s |= φ if and only if there exists some model such that ψ holds in one of its states.
For the sake of completeness, we will now aso demonstrate that model checking for RML ∃r is in PSPACE. To do this we use a variation of the tableau rules for RML ∃r -satisfiability that we introduced above. Given a model M, state u and formula φ, we run the tableau procedure as was described in section 3 with the following restrictions: We say that 1 is mapped to u and whenever a prefix (µ, ν.n) is introduced, ν is mapped to v and ν.n is new, ν.n is mapped to some state accessible from v. Whenever a prefixed formula (µ, ν) l is introduced to the branch, where l a literal and ν is mapped to v, it must be the case that M, v |= l. If at some point it is impossible to satisfy any of these restrictions, the branch is rejecting. Finally, we have the additional rule: (1, σ) ✷ψ (1, σ.i a ) ψ ✷1 where σ.i a is new and mapped to a, where σ maps to v, vRa and there is no σ.j that maps to a.
The proof that the tableau procedure is correct and can be carried on using polynomial space is similar to the corresponding proofs in the previous sections. In particular, from an accepting branch it is not hard to see that we can construct a chain of refinements of (M, u) in a similar way as in lemma 1 and using the extra conditions, such that M = M 1 and every σ is mapped to s 1,σ Then by induction on the formula we can show that M, u |= φ. On the other hand, if M, u |= φ, then it is straightforward to follow the proof of lemma 2 to demonstrate that there is an accepting branch. Polynomial space follows from the fact that the number of states in the model is less than the size of the model, which is part of the input, thus it does not significantly affect the efficiency of the procedure. Therefore, we conclude: Theorem 3. The model checking problem for RML ∃r is PSPACE-complete.