Abstract. Explicit modal logic was introduced by S. Artemov. Whereas the traditional modal logic uses atoms 2F with a possible semantics “F is provable”, the explicit modal logic deals with atoms of form t : F , where t is a proof polynomial denoting a specific proof of a formula F . Artemov found the explicit modal logic LP in this new format and built an algorithm that recovers explicit proof polynomials corresponding to modalities in every derivation in K. G¨ odel’s modal provability calculus S4. In this paper we study the complexity of LP as well as the complexity of explicit counterparts of the modal logics K, D, T , K4, D4 found by V. Brezhnev. The main result: the satisfiability problem for each of these explicit modal logics belongs to the class Σ2p of the polynomial hierarchy. Similar problem for the original modal logics is known to be PSPACE-complete. Therefore, explicit modal logics have much better upper complexity bounds than the original modal logics.

1

Introduction and Main Definitions

The idea to describe provability by means of modal logic was formulated by K. G¨odel in [6]. He axiomatized the general properties of provability in the modal language and obtained the modal logic coinciding with S4. However the problem of finding the exact provability semantics for S4 remained open. The explicit logic of proofs LP formulated in terms of the predicate “t is a proof of A” was introduced by S. Artemov in [2]. It incorporates proofs into propositional language by means of proof polynomials constructed with the help of elementary computable operations corresponding to modus ponens, proofchecking and non-deterministical choice. LP is supplied with the appropriate arithmetical semantics and is proved to be complete with respect to this semantics (cf. [2]). LP is proved to be an explicit counterpart of logic of informal provability S4. Namely, LP is sufficient to realize the whole S4 by assigning explicit proof polynomials to the occurrences of 2 in S4-derivation (cf. [2]). So Logic of Proofs LP provides S4 with the intended provability reading. Explicit analogues of modal logics weaker than S4 (in particular of K, D, T , K4, D4) were introduced by V. Brezhnev in [5]. He suggested axiomatization for them and proved that they suffice to realize the corresponding modal logics (in the same way as LP realizes S4). ⋆

The author is partially supported by the grant DAAH04–96–1–0341, by DAPRA under program LPE, project 34145.

Decidability of LP was proved by A. Mkrtychev in [7]. In this paper we adapt this algorithm to the explicit logics introduced in [5] and evaluate its complexity. It turned out that the derivability problem for all of these logics belongs to the class Π2p in the polynomial hierarchy while all the corresponding modal logics are known to be PSPACE-complete. In this section we will formulate the language of explicit modal logics (or the language of LP) and give axiomatics for them. In Section 2 we will describe the semantics for the explicit logics and prove their completeness with respect to it. This semantics for LP was suggested by Mkrtychev in [7]. We adapt it for all the other explicit logics. Finally, in Section 3 we describe the decision algorithm and evaluate its complexity. Let us describe the modal logics we deal with. First, we give the full list of modal axioms: A0 Axioms of classical propositional logic in the monomodal language AN 2(F → G) → (2F → 2G) normality AD 2⊥ → ⊥ seriality AT 2F → F reflexivity A4 2F → 22F transitivity The minimal logic K contains axioms A0 and AN and the rules of inference F . All the other logics are extensions of K modus ponens and necessitation 2F with the additional axioms: D = K + AD, T = K + AT, K4 = K + A4, D4 = D + A4 and S4 = T + A4. Now we turn to the description of the explicit modal logics (cf. [2], [5]). They are formulated in the language of LP that contains proof variables xi , proof constants ai and operations on proofs (binary ·, + and monadic !); sentence letters Si , boolean connectives, boolean constant ⊥, and the binary proof operator (polynomial):(formula). Proofs are represented by polynomials generated from proof variables and constants by means of operations on proofs. Formulae are constructed from the sentence letters and boolean constants in the usual way with the additional rule: if F is a formula and t is a polynomial then t : F is a formula. Let SVar stand for the set of all sentence letters, Pn for the set of polynomials and Fm for the set of formulae. Now we are going to define the following explicit logics: LP(K), LP(D), LP(T ), LP(K4), LP(D4), LP(S4).

(1)

In what follows by explicit logic we mean any of these six logics. As before, first we give the list of explicit axioms (cf. [2], [5]) A0 Axioms of classical propositional logic in the language of LP A1 t : (F → G) → (s : F → (t · s) : G) A2 ti : F → (t1 + t2 ) : F , i = 1, 2 A3 t : ⊥ → ⊥ A4 t : F → ! t : (t : F ) A5 t : F → F

There are two explicit versions of the modal necessitation rule for an explicit logic L ONec n ; ! a : (!n−1 a : . . . (! a : (a : A)) . . .) ′ ONec , a:A where a is a proof constant, A is an axiom of L. All the explicit logics contain axioms A0, A1, A2 and the rule modus ponens. To obtain the axiom system for them one has to add ONec for LP(K); A3 and ONec for LP(D); A5 and ONec for LP(T ); A4 and ONec ′ for LP(K4); A4, A3 and ONec ′ for LP(D4); A4, A5 and ONec ′ for LP(S4). It may be easily observed that all explicit axioms except for A2 can be obtained by replacing 2 in a corresponding modal axiom for a certain proof polynomial. So we use names of modal axioms referring to their explicit analogues. For example, we call LP(K4), LP(D4) and LP(S4) transitive explicit logics since they contain the explicit axiom A4 corresponding to the modal axiom of transitivity A4. By an explicit realization r of a modal formula F we mean an assignment of proof polynomials to all occurrences of modality in F , the image of F under such a realization is denoted by F r . Now we formulate the main result about the connection between modal logics and their explicit analogues. Theorem 1 (Artemov). S4 ⊢ F iff LP ⊢ F r for some realization r (cf. [2]). Theorem 2 (Brezhnev). Let L be one of modal logics K, D, T , K4, D4. Then L ⊢ F iff LP(L) ⊢ F r for some realization r (cf. [5]).

2

Semantics for Explicit Logics and Completeness Theorem

In this section we describe semantics for the logics (1). This semantics for the logic LP(S4) = LP was introduced by Mkrtychev in [7]. He also proved completeness of LP with respect to this semantics. In this section his results are generalized to all explicit logics. Definition 1. A function ∗ : Pn → 2Fm that assigns to every proof polynomial a set of LP-formulae is called a proof-theorem assignment if it satisfies the following two conditions: 1. if (F → G) ∈ ∗(t) and F ∈ ∗(s) then G ∈ ∗(t · s); 2. ∗(t) ∪ ∗(s) ⊆ ∗(t + s). A proof-theorem assignment is called transitive if it satisfies in addition a transitivity condition: if F ∈ ∗(t) then (t : F ) ∈ ∗(! t). A proof-theorem assignment is serial if ⊥ ∈ / ∗(t) for every proof polynomial t. Remark 1. We do not require the sets ∗(t) to be finite.

Definition 2. A model M is a triple (v, ∗, |=), where v is a truth-assignment, i. e. a mapping v : SVar → {True, False }, ∗ is a proof-theorem assignment and |= is a truth relation. The latter is defined in the following way. 1. For sentence letters |= S ⇔ 2. |= F → G ⇔ 6|= F or |= G; 3. |= t : F ⇔ F ∈ ∗(t).

v(S) = True

and

6|= ⊥;

Remark 2. In what follows we omit the cases concerning boolean connectives other than implication. These missing cases can be easily restored using expressions for the connectives in terms of implication and ⊥. Definition 3. A model M = (v, ∗, |=) is called reflexive if F ∈ ∗(t) implies M |= F for any polynomial t and any formula F . Evidently, there is a precise correspondence between conditions imposed on a proof-theorem assignment and the explicit axioms A1, A2. Transitive assignment satisfies axiom A4 which corresponds to the transitivity modal axiom. Similarly, axiom A3 corresponding to seriality modal axiom is true for any serial assignment. Finally, in a reflexive model axiom A5 expressing weak reflexivity also holds. Let us call any set of formulae introduced by the necessitation rule a Constant Specification (CS) for the logic L. Namely, for the logics LP(K), LP(D), LP(T ) CS is any set of formulae of the form !n a:(!n−1 a:. . .:(! a:(a:A)) . . .), where a is a proof constant, A is an axiom of the corresponding logic. For LP(K4), LP(D4), LP(S4) formulae should be of the form a : A, where a is a proof constant, A is an axiom of the corresponding logic. For any explicit logic L let CSL denote a maximal constant specification, namely CSL = {!n a : . . . : (! a : (a : A)) | a is a proof constant, A is an axiom of L} if L ∈ {LP(K), LP(D), LP(T )}, or CSL = {a : A | a is an axiom constant, A is an axiom of L} if L ∈ {LP(K4), LP(D4), LP(S4)}. Remark 3. The specification CSL depends on the axiomatization chosen for propositional logic in A0. Definition 4. Let CS be a constant specification. A model M is called a CS-model if M |= CS. Definition 5. Let L be one of the logics (1). L-model is any CSL -model satisfying additional conditions given in Table 1. The following theorem states the completeness of explicit modal logics with respect to the semantics described above.

Table 1. Additional conditions on L-models Explicit logic LP(K) LP(D) LP(T ) LP(K4) LP(D4) LP(S4)

Proof-theorem assignment

Model

serial reflexive transitive serial transitive transitive

reflexive

Theorem 3 (completeness). Let L be an explicit logic. Then L⊢F

⇔

F is true in all L-models.

The proof of Theorem 3 is standard, so we just give the main ideas in brief. Definition 6. Let L be one of the logics (1). The set F ⊂ Fm is called L-consistent if L 6⊢ ¬(A1 ∧ . . . ∧ An ) for any finite subset {A1 , . . . , An } ⊆ F. F is called maximal L-consistent if in addition either F ∈ F or ¬F ∈ F holds for any LP-formula F . The following lemma is standard. Lemma 1. 1. Let F be an L-consistent set. Then there exists a maximal L-consistent set F ′ such that F ⊆ F ′ . 2. Any maximal L-consistent set contains L and is closed under the inference rules of L. Lemma 2. Suppose F is a maximal L-consistent set. Then there exists an L-model M such that M |= F. Proof. In order to construct the desired model let us define the proof-theorem assignment ∗(t) = {F ∈ Fm | t : F ∈ F} for any polynomial t. It can be easily observed that ∗ is a proof-theorem assignment. Moreover, ∗ is serial for L ∈ {LP(D), LP(D4)} and transitive for L ∈ {LP(K4), LP(D4), LP(S4)}. For every sentence letter S let us put v(S) = True iff S ∈ F. Let us consider the model M = (v, ∗, |=). By induction on complexity of the formula F it can be easily shown that M |= F iff F ∈ F. At the same time, (t : F → F ) ∈ L ⊂ F for the reflexive logics LP(T ), LP(S4), that provides reflexivity of the model M for them. So M is an L-model. ⊓ ⊔ Proof (of Theorem 3). If L ⊢ F then obviously M |= F for any L-model M. Suppose L 6⊢ F . In such a case the set {¬F } is L-consistent and we can extend it to some maximal L-consistent set F. By Lemma 2 there exists an L-model M such that M |= F, in particular M |= ¬F . ⊓ ⊔

While dealing with reflexive logics LP(T ) and LP(S4) one have to prove reflexivity of a given model. The following notion allows avoiding this difficulty. Definition 7. A pre-model P is a triple (v, ∗, |=p ), where v is a truth-assignment, ∗ is a proof-theorem assignment and the definition of a truth relation |=p is similar to |= (see Definition 2) except for the case |=p t : F

⇔

F ∈ ∗(t) and |=p F.

Definition 8. A model M = (v, ∗, |=) and a pre-model P = (v ′ , ∗′ , |=p ) are called equivalent if the truth relations |= and |=p coincide. The following lemma describes correlation between the notions of a model and a pre-model. Lemma 3. For any reflexive model M = (v, ∗, |=) there exists a pre-model P = (v ′ , ∗′ , |=p ) equivalent to it. Conversely, for any pre-model P = (v ′ , ∗′ , |=p ) there exists a reflexive model M = (v, ∗, |=) equivalent to it. Moreover, if initial model (pre-model) is transitive then the resulting pre-model (model) is also transitive. Proof. Suppose M = (v, ∗, |=) is a reflexive model. Then the pre-model P = (v, ∗, |=p ) is equivalent to M, i. e. P |=p F ⇔ M |= F . Reason by induction on the complexity of F . The case of sentence letters and boolean connectives is trivial. Let F = t : G. If P |=p t : G then G ∈ ∗(t) and M |= t : G. Conversely, if M |= t : G then G ∈ ∗(t). The model M is reflexive, so M |= G. By the induction hypothesis P |=p G. Thus, we obtain P |=p t : G. Conversely, being given a pre-model P = (v ′ , ∗′ , |=p ) we define F ∈ ∗(t) iff F ∈ ∗′ (t) and P |=p F for every polynomial t and every formula F . It is easy to see that ∗ is a proof-theorem assignment. Now we can define the model M = (v ′ , ∗, |=) and prove that it is equivalent to the initial pre-model P. As before we consider only formulae of the form t : G. M |= t :

G⇔

G ∈ ∗(t)

⇔

G ∈ ∗′ (t) and P |=p G

⇔

P |=p t : G.

Reflexivity of M immediately follows from reflexivity of P. The only thing we have to show is that ∗ is transitive in case of transitive ∗′ . Suppose F ∈ ∗(t). It means that F ∈ ∗′ (t) and P |=p F . Then (t : F ) ∈ ∗′ (! t) since ∗′ is transitive and obviously P |=p t : F . So (t : F ) ∈ ∗(! t). ⊓ ⊔ Notion of a CS-pre-model is defined similarly to that of a CS-model (see Definition 4). Definition 9. A pre-model P is called – an LP(T )-pre-model if it is a CSLP(T ) -pre-model; – an LP(S4)-pre-model if it is a CSLP(S4) -pre-model with a transitive prooftheorem assignment. By Theorem 3 and Lemma 3 we have Theorem 4. Let L ∈ {LP(T ), LP(S4)}, then L⊢F

⇔

F is true in all L-pre-models.

3

The Decision Algorithm

In this section we describe the decision algorithm for non-derivability problem in explicit modal logics (this problem is dual to derivability problem) and evaluate its complexity. The decision procedure is based on Theorem 3 (or on Theorem 4 for reflexive logics LP(T ), LP(S4)). Given a formula F in order to establish that L 6⊢ F one can construct an L-model M such that M 6|= F if L is one of the logics LP(K), LP(D), LP(K4), LP(D4) (or an L-pre-model P such that P 6|=p F for L ∈ {LP(T ), LP(S4)}). The algorithm consists of two parts. 1. The saturation algorithm produces a set of requirements which should be imposed on a counter-model for the formula F . 2. The completion algorithm constructs a counter-model satisfying these requirements if such a model exists. Along with formulae we also consider expressions of the form A ∈ ∗(t). We call these expressions ∗-requirements. Formulae and ∗-requirements are called metaformulae. A sequent is a pair Γ ⇒ ∆, where Γ and ∆ are finite sets of metaformulae. Definition 10. A sequent Γ ⇒ ∆ is true in a model (pre-model) if at least one metaformula from Γ is false or at least one metaformula from ∆ is true in it. Definition 11. A sequent Γ ⇒ ∆ is saturated if 1. 2. 3. 4.

(A → B) ∈ Γ implies A ∈ ∆ or B ∈ Γ (A → B) ∈ ∆ implies A ∈ Γ and B ∈ ∆ (t : A) ∈ Γ implies (A ∈ ∗(t)) ∈ Γ (t : A) ∈ ∆ implies (A ∈ ∗(t)) ∈ ∆

A sequent Γ ⇒ ∆ is reflexively saturated if in the previous list we replace the conditions 3 and 4 by their reflexive analogues. 3′ . (t : A) ∈ Γ implies A ∈ Γ and (A ∈ ∗(t)) ∈ Γ 4′ . (t : A) ∈ ∆ implies A ∈ ∆ or (A ∈ ∗(t)) ∈ ∆ 3.1

The Saturation Algorithm

In this subsection we describe saturation algorithm and evaluate its complexity. We describe the algorithm in details for the case of LP(S4) = LP and then point out the amendments that should be done to adapt the algorithm for other logics. Algorithm starts being given a sequent Γ ⇒ ∆. Every formula in it can be discharged (unavailable) or undischarged (available for processing). Initially all formulae are undischarged. Non-deterministically choose some undischarged formula G from Γ ∪ ∆ and non-deterministically try to perform one of the following instructions. 1. If G ≡ (A → B) ∈ Γ then put A into ∆ or B into Γ

2. If G ≡ (A → B) ∈ ∆ then put A into Γ and B into ∆ 3. If G ≡ (t : A) ∈ Γ then put A and (A ∈ ∗(t)) into Γ 4. If G ≡ (t : A) ∈ ∆ then put A or (A ∈ ∗(t)) into ∆ After a step is performed discharge G (make it unavailable). Discharge G even if it is a sentence letter or ⊥ and none of the clauses above could be applied. Terminate if all formulae from Γ ∪ ∆ are discharged. Produce the obtained sequent as a result. Lemma 4. The saturation algorithm satisfies the following properties. 1. It terminates. 2. It produces a reflexively saturated sequent. 3. For every pre-model the initial sequent is false in it whenever the resulting one is false. 4. For every pre-model if the initial sequent is false in it then one of the possible computations produces a sequent, which is also false in it. Proof. 1. Let us define the depth of a formula by induction d(Si ) = d(⊥) = 1, d(A → B) = d(A) + d(B) + 1, d(t : A) = d(A) + 1. Obviously, each step of the algorithm decreases the sum of the depths of all available formulae in the sequent. Therefore, the algorithm terminates. 2. Each step of the algorithm performs saturation for the chosen formula. Since all formulae in the resulting sequent are discharged this sequent is reflexively saturated. 3. It is easy to see from the definition of the saturation algorithm that if we reverse the algorithm step by step the falseness of the sequent preserves. So from the assumption that the resulting sequent is false we derive that the initial one is necessarily false. 4. Suppose the initial sequent is false in a given pre-model. All metaformulae are true or false in it. We start the algorithm. At every step we can put the metaformula to Γ if it is true and to ∆ if it is false. ⊓ ⊔ Corollary 1. Given a formula F put Γ := ∅, ∆ := {F }. Perform the saturation algorithm for the sequent Γ ⇒ ∆. If the saturation algorithm produces a sequent which is false in some LP(S4)-pre-model then F ∈ / LP(S4). Otherwise, if every possible computation leads to an LP(S4)-valid sequent, i.e. a sequent true in all LP(S4)-pre-models, then F ∈ LP(S4). Lemma 5. The saturation algorithm is an NP-algorithm ( Σ1p in the polynomial hierarchy), i. e. it is a non-deterministic algorithm that works polynomial time. Proof. The length of all branches of the computational tree is limited by the number of subformulae of the initial sequent. The number of variants of processing on every step of the algorithm is twice as large because some formulae can be processed in two different ways. We only need to find the branch of the computational tree that will produce a sequent that is not LP(S4)-valid. So the computational tree is a NP-tree. ⊓ ⊔

Now let us mention a useful property of the saturation algorithm. Lemma 6. If performing instructions of the saturation algorithm one would erase the discharged formula then Lemma 4 and Lemma 5 remain true. In what follows, we will use this second variant of the saturation algorithm. Remark 4. Now we describe how to adapt the saturation algorithm for non-reflexive logics LP(K), LP(D), LP(K4) and LP(D4). Since we need to construct a model (not a reflexive pre-model as before) we do not need a reflexively saturated sequent and the instructions for processing t : A should be read as follows: 3′ . If G ≡ (t : A) ∈ Γ then put (A ∈ ∗(t)) into Γ 4′ . If G ≡ (t : A) ∈ ∆ then put (A ∈ ∗(t)) into ∆ This saturation algorithm has the same properties except for one. It produces a saturated sequent (not a reflexively saturated one). 3.2

The Completion Algorithm

As before, first we discuss the completion algorithm for LP(S4) and then adapt it for other explicit logics. The completion algorithm deals with the sequent Γ ⇒ ∆ containing atomic formulae and ∗-requirements. It terminates with success if there exists an LP(S4)-pre-model in which Γ ⇒ ∆ is false. Otherwise, it terminates with failure. Let us clarify when such a pre-model exists and how it should be constructed. Of course, if Γ ∩ ∆ 6= ∅ or ⊥ ∈ Γ then the counter-model in question cannot exist. Indeed, ⊥ is always false and no formula can be true and false simultaneously. Suppose all of the assumptions above are wrong. Then we can define a truthassignment v as follows v(Si ) = True

⇔

Si ∈ Γ.

(2)

Then sentence letters from Γ are true and the letters from ∆ are false. Thus, in order to construct a counter-model it is sufficient to satisfy the ∗-requirements including transitivity of it. Besides, the counter-model in question should be a CSLP(S4) -pre-model which can also be expressed in terms of ∗-requirements. ∗ Let CSLP(S4) denotes the set ∗ CSLP(S4) = {A ∈ ∗(a) | a is a proof constant, A is an axiom of LP(S4)}.

Therefore, in order to construct the counter-model for Γ ⇒ ∆ it is sufficient to produce a transitive proof-theorem assignment ∗ such that all ∗-requirements ∗ from Γ and CSLP(S4) are true and all ∗-requirements from ∆ are false for ∗. Definition 12. Let Φ be an arbitrary set of ∗-requirements. A proof-theorem assignment ∗ is based on Φ if all requirements from Φ are true for ∗.

Lemma 7. For any set Φ there exists a minimal transitive proof-theorem assignment ∗ based on it, i. e. ∗ is based on Φ and for every transitive proof-theorem assignment ∗′ based on Φ we have ∗(t) ⊆ ∗′ (t) for all polynomials t. Proof. In order to construct such an assignment we should only close Φ under the following rules. G ∈ ∗(t) R1 t : G ∈ ∗(! t) (A → G) ∈ ∗(t) A ∈ ∗(s) R2 G ∈ ∗(t · s) G ∈ ∗(ti ) , i = 1, 2 ⊓ ⊔ R3 G ∈ ∗(t1 + t2 ) Let Γ ′ and ∆′ denote sets of ∗-requirements from Γ and ∆ respectively. Lemma 8. Let Γ ⇒ ∆ be a sequent containing only atomic formulae and ∗-requirements. It is refutable, i.e. there is an LP(S4)-pre-model that refutes it, iff the following conditions are satisfied. 1. Γ ∩ ∆ = ∅ 2. ⊥ ∈ /Γ 3. All ∗-requirements from ∆′ are false for the minimal transitive proof-theorem ∗ assignment ∗m based on Γ ′ ∪ CSLP(S4) Proof. We consider the minimal transitive proof-theorem assignment ∗m based ∗ on Γ ′ ∪ CSLP(S4) . If this assignment refutes all ∗-requirements from ∆′ then the pre-model P = (v, ∗m , |=p ) (see (2)) refutes Γ ⇒ ∆. Otherwise, if ∗m satisfies one of the ∗-requirement from ∆′ then it is true for any other transitive assignment ∗ based on Γ ′ ∪ CSLP(S4) . So the desired counter-model does not exist. In order to deal with axiom schemes we add to the language of LP formula variables T1 , . . . , Tn , . . . and polynomial variables r1 , . . . , rn , . . . . It makes possible writing one formula in the extended language instead of an infinite set of formulae in the language of LP. Suppose we need to find an intersection of the schemes A and B, i. e. the set of LP-formulae whose structure satisfies the scheme A together with the scheme B. An obvious way of solving this problem is to find the most general unifier (mgu) of A and B. This unification means that we substitute polynomial variables by some polynomials in the extended language and formula variables by some formulae in the extended language. In what follows, by a formula we mean a formula in the extended language. Now let us describe the completion algorithm. Suppose that Γ ′ = {A1 ∈ ∗(ti1 ), . . . , An ∈ ∗(tin )}, ∆′ = {B1 ∈ ∗(sj1 ), . . . , Bm ∈ ∗(sjm )}. Some of tik and sjl can coincide. Preliminary operations. Terminate with failure if Γ ∩ ∆ 6= ∅ or ⊥ ∈ Γ .

Otherwise, non-deterministically choose one of sjl , l = 1, 2, . . . , m, and perform the following actions with it. Initialization. Non-deterministically choose several non-intersecting occurrences of tik , k = 1, 2, . . . , n, as subpolynomials of sjl . Let us call the chosen occurrences pseudo-elementary polynomials. Polynomial sjl is considered to be built from pseudo-elementary polynomials, proof variables and constants. To every chosen occurrence of tik non-deterministically assign one of the formulae A such that (A ∈ ∗(tik )) ∈ Γ ′ . Non-deterministically assign to every occurrence of axiom constants (except those in pseudo-elementary polynomials) one of axiom schemes written as one formula in the extended language. Choose different formula and polynomial variables for different occurrences of axiom constants. Assign to every occurrence of + (except those in pseudo-elementary polynomials) one of two symbols ‘l’ or ‘r’. Assign null to the occurrences of proof variables that are not assigned yet. So assigning null to a subpolynomial actually means that nothing is assigned to this subpolynomial. Initialization is complete. Assigning. Assign formulae to subpolynomials of sjl according to the following rules. Suppose formulae C1 and C2 are assigned to occurrences of subpolynomials q1 and q2 respectively. One of C1 and C2 or both of them may be null. 1. Assign the formula C1 to q1 + q2 if ‘l’ was assigned to this occurrence of +. Otherwise, assign C2 . 2. Assign the formula q1 : C1 to ! q1 if C1 is not null. Otherwise, assign null. 3. Assign null to q1 · q2 if C1 is neither a formula variable nor a formula of the form D → E, or if C2 is null. Otherwise, if the main connective in C1 is implication then unify D and C2 . If the formulae are unifiable find their mgu σ and assign Eσ to q1 · q2 . If unification is impossible assign null. Finally, if C1 is a formula variable T then assign some new formula variable T ′ to q1 · q2 . Checking. Finally, some formula is assigned to the polynomial sjl . Unify it with the formula Bl . Terminate with failure if these formulae are unifiable. Otherwise, if unification is impossible or null is assigned to sjl perform another initialization and proceed as before. If none of the initializational variants terminates with failure then choose another polynomial sjl and perform initializations for it. Terminate with success if processing none of the polynomials sjl , l = 1, . . . , m, terminates with failure. Lemma 9. Suppose a sequent Γ ⇒ ∆ consists of atomic formulae and ∗-requirements. The completion algorithm terminates with success on this sequent iff the sequent Γ ⇒ ∆ is not LP(S4)-valid. Now let us evaluate the complexity of the completion algorithm. In the process of its execution we need to perform multiple unifications. The length of the unified formulae may increase exponentially. Example 1. Suppose Γ ′ contains the following ∗-requirements. (T1 → (T2 → . . . → (TM → T1 ∧ T1 ∧ . . . ∧ T1 ) . . .)) ∈ ∗(c1 ), | {z } M

( T2 ∧ T2 ∧ . . . ∧ T2 ) ∈ ∗(c2 ), | {z } M ... ( TM ∧ TM ∧ . . . ∧ TM ) ∈ ∗(cM ). {z } | M

Then we should assign (T2 → . . . → (TM → T2 ∧ T2 ∧ . . . ∧ T2 ∧ . . . ∧ T2 ∧ T2 ∧ . . . ∧ T2 ) . . .) | | {z } {z } M M {z } | M

to c1 · c2 . All the initial requirements have the length O(M ) while this one is O(M 2 ). Evidently, each step increases the length by M times. So the length of formula assigned to c1 · c2 · . . . · cM is O(M M ). In order to reduce complexity of the completion algorithm we can store formulae as direct acyclic graphs (dags). Then one can use the Robinson graph algorithm (for details cf. [4]) for unification of formulae that is polynomial of the sum of sizes of the dags. Using this algorithm for unification in the completion algorithm we obtain the following result. Lemma 10. The problem of realizing whether a given sequent containing only atomic formulae and ∗-requirements is refutable is a co-NP problem (Π1p in the polynomial hierarchy). Proof. It follows from complexity evaluation of completion algorithm since this algorithm solves the problem in question. ⊓ ⊔ Remark 5. For serial logics LP(D), LP(D4) we need to check another trivial condition before we start constructing ∗m : (⊥ ∈ ∗(t)) ∈ / Γ for all polynomials t. In case this condition is not satisfied terminate with failure. For non-transitive logics LP(K), LP(D), LP(T ) the set CSL∗ is defined as follows: CSL∗ = {(!n−1 a : . . . : a : A) ∈ ∗(!n a) | a is a proof constant, A is an axiom of L}. So instead of assigning axioms to occurrences of axiom constants during initialization we should non-deterministically assign formulae !n−1 a : . . . : a : A to occurrences of polynomials !n a. Also we should not use the rule R1 for these logics. Let us describe the decision algorithm for LP. Given a formula F 1. Start the saturation algorithm on the sequent ⇒ F . It produces as a result the sequent Γ ⇒ ∆. 2. Start the completion algorithm on the sequent Γ ⇒ ∆. 3. Terminate with success if the completion algorithm terminates with success. Terminate with failure otherwise. We summarize Corollary 1 and Lemma 9 in a theorem

Theorem 5. Suppose L is an explicit logic. Given a formula F the decision algorithm terminates with success iff F 6∈ L. By Lemma 5 and Lemma 10 we have Theorem 6. The problem of L-satisfiability is Σ2p . Consequently, the problem of derivability in L is Π2p . Remark 6. Since all the logics under consideration are conservative extensions of the classical propositional logic the problem of L-satisfiability is NP-hard (Σ1p -hard). Corollary 2. The problem of L-satisfiability belongs to Σ2p ∩ Σ1p -hard.

References 1. Artemov, S.: Operational Modal Logic. Technical Report MSI 95–29. Cornell University (1995)