Page 1

Fundamenta Informaticae XX (2009) 1–371

IOS Press

Algorithmic correspondence and completeness in modal logic.

III. Extensions of the algorithm SQEMA with substitutions

Willem Conradie

Department of Mathematics,

University of Johannesburg

Johannesburg, South Africa

wconradie@uj.ac.za

Valentin Goranko

Department of Informatics and Mathematical Modelling

Technical University of Denmark

vfgo@imm.dtu.dk

Dimiter Vakarelov

Faculty of Mathematics and Computer Science,

Sofia University

Sofia, Bulgaria

dvak@fmi.uni-sofia.bg

Abstract. In earlier papers we have introduced an algorithm, SQEMA, for computing first-order

equivalents and proving canonicity of modal formulae. However, SQEMA is not complete with

respect to the so called complex Sahlqvist formulae. In this paper we, first, introduce the class

of complex inductive formulae, which extends both the class of complex Sahlqvist formulae and

the class of polyadic inductive formulae, and second, extend SQEMA to SQEMAsubby allowing

suitable substitutions in the process of transformation. We prove the correctness of SQEMAsubwith

respect to local equivalence of the input and output formulae and d-persistence of formulae on which

the algorithm succeeds, and show that SQEMAsubis complete with respect to the class of complex

inductive formulae.

Keywords: SQEMA, correspondence, d-persistence, complex Sahlqvist formulae.

Page 2

2W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

Introduction

This paper is in the field of algorithmic correspondence and completeness theory in modal logic. The first

general result in this field was the celebrated Sahlqvist’s theorem [22]. It introduces a large class of modal

formulae (subsequently called Sahlqvist formulae) which are first-order definable and canonical. More-

over, the proof of Sahlqvist’s definability theorem, also obtained independently by van Benthem [34],

provides an effective procedure, viz. the method of minimal valuations, for computing the first-order

equivalents of the formulae in that class. For a long time the class of Sahlqvist formulae was considered

as the optimal syntactically defined class with these two properties. In [9] the class of Sahlqvist formulae

was extended to cover polyadic modal languages, but without extending the original Sahlqvist class on

monadic languages. Recently, several new effective extensions or analogs of the Sahlqvist class have

been obtained:

• the class of inductive formulae [15, 17, 5] for arbitrary polyadic modal languages,

• the class of inductive hybrid formulae, [16] (see also [25], [4]),

• the class of complex Sahlqvist formulae [26] (for the ordinary modal language).

• classes of formulae having equivalents in the first-order logic with least fix points [8, 13, 17, 20,

31, 32, 35, 36].

Because of the undecidability of the class of first-order definable modal formulae [3], the hierarchy

of effective extensions of the Sahlqvist class concerning first-order definability is infinite and all further

syntactic extensions are bound to be increasingly more complicated. In [6, 7] another approach has been

proposed: instead of syntactic extensions of the Sahlqvist class, an algorithm, SQEMA (Second-Order

Quantifier Elimination for Modal formulae using Ackermann’s lemma), was developed to compute first-

order equivalents of modal formulae with unary modalities, further extended in [7] to polyadic and hybrid

modal languages. It has been proved in [6, 7] that SQEMA is correct with respect to local equivalence

of the input and output formulae, and that the formulae for which it succeeds are locally d-persistent

(respectively, locally di-persistent for the case of languages with nominals and converse modalities), and

hence canonical in the respective senses.

With respect to first-order correspondence, our approach was preceded and influenced by two earlier

developed algorithms for the elimination of second-order quantifiers over predicate variables, viz. SCAN

[12, 11] and DLS [10, 21, 23, 19]. Each of them, applied to the negation of the standard translation of

a modal formula into monadic second-order logic, attempts to eliminate all occurring existentially quan-

tified predicate variables and thus to compute a first-order correspondent. To that aim, SCAN employs

a modification of the resolution method, while DLS is based on a result by Ackermann [1] (see also

the references above, as well as [6, 7]), allowing explicit elimination, up to logical equivalence, of an

existentially quantified second-order predicate variable.

Let us note that both SCAN and DLS use Skolemization of the input and, after the quantifier elimina-

tion procedure, a procedure attempting reverse Skolemization (de-Skolemization, or un-Skolemization)

is applied. That procedure is not always successful, which may lead to (sometimes unnecessary) failure

of the main algorithm. To avoid the necessity for de-Skolemization, SQEMA does not use the stan-

dard translation into the first-order logic but works directly on modal formulae and includes only a very

Page 3

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions3

restricted form of Skolemization, viz. only Skolem constants, introduced as nominals (an algorithm

working directly with modal formulae was also considered in [24]). Thus, SQEMA attempts to eventu-

ally transform modal formulae into pure formulae in an appropriate hybrid modal language, from which

the local first-order equivalent is extracted. In order to eliminate the propositional variables, SQEMA

uses a modal version of Ackermann’s lemma, formulated in terms of propositional modal logic, while

the original lemma formulated by Ackermann and used in DLS is in terms of second-order logic. Further

information about SCAN, DLS, and SQEMA can be found in the recent book on second-order quantifier

elimination [13].

An implementation of a variant of SQEMA for monadic languages extended with nominals and

universal modality has been realized by Dimiter Georgiev (see [14]) as a master project, and works

online at http://fmi.uni-sofia.bg/fmi/logic/sqema.

The starting point of the present paper is the fact that none of the versions of SQEMA mentioned

above is complete for the class of so called complex Sahlqvist formulae [26, 27]. This is an interesting

phenomenon, because all complex Sahlqvist formulae can be effectively translated to Sahlqvist formulae

for which all current versions of SQEMA succeed. The translation of complex Sahlqvist formulae into

Sahlqvist formulae was constructed in [26] by means of quite complex reversible Boolean substitutions

(preserving local first-order equivalents and d-persistence), effectively computed from the input complex

formula. In the present paper we have extended SQEMA with a mechanism for applying such substi-

tutions, which enables the new extension, denoted by SQEMAsub, to succeed on all complex inductive

formulae – a natural polyadic extension of the class of complex Sahlqvist formulae. We prove that all

formulae for which SQEMAsubsucceeds are first-order definable and canonical, thus implying that this

is the currently largest effective extension of the Sahlqvist class of first-order definable and canonical

modal formulae.

The paper is organized as follows. Section 1 contains an informal introduction to polyadic modal

logic, modal algebras over Kripke frames and the Ackermann lemma formulated in terms of modal al-

gebras. It also provides an example of the latter lemma’s application which illustrates the intuition upon

which SQEMA is based. The section also contains the formal definition of SQEMA and the formulation

of its basic meta-properties which will be used later on in the paper. In Section 2 we introduce the notion

of reversible substitution and define two large classes of polyadic modal formulae: the class of complex

recursive formulae which extends the class of regular formulae introduced in [17], and the class of com-

plex polyadic inductive formulae, extending the class of polyadic inductive formulae [15, 17]. We also

give an example of an inductive complex modal formula for which SQEMA does not succeed. Section

3 is devoted to the study of a special class of so called complex substitutions, on which SQEMAsubis

based. Section 4 is devoted to an effective translation Θ of the class of complex inductive formulae

into the class of inductive formulae by means of special type of reversible Boolean substitutions. This

implies a generalization of the Sahlqvist Theorem both on its definability and canonicity part to the class

of inductive complex modal formulae. Section 5 is preparatory for the definition of SQEMAsub. Here

we introduce the notion of complex normal form and a special translation Σ which is the main tool in

SQEMAsub. Section 6 is devoted to the definition of SQEMAsub. We first discuss SQEMAsubinfor-

mally, motivating its internal structure, which contains as a subprogram the former algorithm SQEMA

and a new block SUB performing some transformations based on reversible Boolean substitutions. We

illustrate the algorithm with some examples for which it succeeds but for which SQEMA does not suc-

ceed. We prove correctness and canonicity of SQEMAsuband its completeness with respect to the class

of complex inductive formulae. We conclude in section 7 where we also mention some open problems

Page 4

4W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

and future research agenda.

1. Background on polyadic modalities and the algorithm SQEMA

The version of the algorithm SQEMA introduced in [7] is designed to work on polyadic modal formulae.

Since the aim of the present paper is to introduce an extension of this algorithm, we invite the reader to

consult [7] as well as [2, 15, 17] for all formal definitions and motivating examples concerning polyadic

modal languages and inductive modal formulae. In this section we give an informal introduction to

polyadic modal logic, fix some notation, and provide some intuitions underlying the algorithm SQEMA

and the main results of the paper.

1.1.Polyadic modal logics

Standard polymodal propositional modal languages contain only unary modalities. With each class Σ

of relational structures containing only binary relations we may associate such a language, L(Σ), with

the modalities interpreted in Σ using the corresponding relations in the structures. One way to extend

this parallelism to arbitrary relational structures is to use modal operators with arbitrary arity, called

polyadic. Extending some notations from dynamic logic, we present standard polyadic modalities in

the form [α](A1,...,An) (generalizing the box modality [α]A) and ?α?(A1,...,An) (generalizing the

diamond modality ?α?A ). Here α is called a modal term of arity n (notation ρ(α) = n, where ρ is an

arity function) and in the semantics of [α](A1,...,An) and ?α?(A1,...,An) this term is associated to

a certain n+1-ary relation Rα(w,w1,...,wn). Using the standard notation for the satisfiability relation

in modal logic (see for instance [2]) we express the semantics of polyadic modalities as follows:

(M,w) ? ?α?(A1,...,An) iff there exist w1,...,wnsuch that Rα(w,w1,...,wn) and

(M,wi) ? Ai, for each 1 ≤ i ≤ n,

(M,w) ? [α](A1,...,An) if, for all w1,...,wnsuch that Rα(w,w1,...,wn), it is the case that

(M,wi) ? Ai, for some 1 ≤ i ≤ n.

Obviously, if n = 1 then this semantics coincides with the standard Kripke semantics for the unary

modalities. The above semantics shows that the modality [α](A1,...,An) is dual to the modality

?α?(A1,...,An) and the following equivalences are valid which obviously generalize the corresponding

equivalences for the unary case:

[α](A1,...,An) ↔ ¬?α?(¬A1,...,¬An) and

?α?(A1,...,An) ↔ ¬[α](¬A1,...,¬An),

Note that the case n = 0 is also included and in this case the two modal operators ?α? and [α] have

no arguments and are treated as constants and the corresponding relation Rαis an unary relation, i.e., a

subset of the universe of the model M. The semantics of these constants is the following:

(M,w) ? ?α? iff w ∈ Rα,

(M,w) ? [α] iff w ?∈ Rα.

Let us denote by ιnthe modal term which in any model has the following interpretation as n+1-ary

identity: Rιn(w,w1,...,wn) iff w = w1= ... = wn. Then the modality ?ιn?(A1...,An) is semanti-

cally equivalent with the conjunction A1∧ ... ∧ An, and the modality [ιn](A1...,An) is semantically

equivalents with the disjunction A1∨ ... ∨ An. This fact allows one to treat classical conjunctions and

disjunctions as polyadic modalities which considerably simplifies the theory of polyadic modal logic (see

[15, 17]).

Page 5

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions5

As in dynamic logic, modal terms can be composed subject to some obvious arity constraints. We

shall illustrate this construction with an example. Let α be a modal term of arity 2 (ρ(α) = 2), let β,γ

be modal terms of arbitrary arity, say ρ(β) = 2 and ρ(γ) = 3 and let Rα,Rβ,Rγbe the corresponding

relations in some model. Then we may define a new relation S by the following natural definition:

S(x,x1,x2,x3,x4,x5)iffthereexisty1,y2suchthatRα(x,y1,y2), Rβ(y1,x1,x2)andRγ(y2,x3,x4,x5).

With this construction in mind, it is natural to consider the relation S corresponding to the composed

modal term α(β,γ), called the composition of α,β and γ in this order. The following equivalence is true

for this composition:

[α(β,γ)](A1,A2,A3,A4,A5) ↔ [α]([β](A1,A2),[γ](A3,A4,A5).

The above considerations show that we may have different modal languages depending on the set τ

of modal terms with their predefined arity, called a modal similarity type. A modal similarity type τ

and a set Θ of propositional variables together uniquely determine (by a simultaneous induction) the set

of all (composed) terms MTτand the set of all formulae. This language is denoted by Lτ(Θ). If the

particular set of proposition letters Θ over which the language is built is not important, we will omit it

and simply write Lτ. We will always assume that modal languages contain the identity modal terms ιn.

Similarity types are important in the formal definition of the semantics of a given modal language.

Namely, given a type τ, we consider the class of τ-frames. These are relational structures of the form

F = (W,{Rα})α∈τ, with Rαa (ρ(α) + 1)-ary relation for each α ∈ τ.

As in dynamic logic with inverse operations α−1on modal terms (also called converse operations),

we may consider a generalization of this operation in polyadic modal logic. For the binary case we have

the following condition between Rαand Rα−1: Rα−1(x,y) iff R−1

For the polyadic case, if ρ(α) = n, then we have n inverses α−i, i = 1,...,n, with the following

semantics: Rα−i(x,y1,...,yi,...,yn) iff R−i

defined as Rα(yi,y1...,x,...,yn)), i.e., the first and (i + 1)st arguments are interchanged.

The following equivalence is always true for the inverse modalities, which generalize the unary

case in the obvious way. Let M be any model in which Rαand Rα−i are interpreted. Then M ?

B ∨ [α](A1,...,Ai,...,An) iff M ? [α−i](A1,...,B,...,An) ∨ Ai, i = 1,...,n.

The extension of the language Lτ with inverse operations is denoted by Lτ(r)and is called com-

pletely reversive extension of Lτ([7]).

We will consider also hybrid modal languages containing nominals, – special variables, true in

exactly one point. The hybrid extensions of Lτand Lτ(r)will be denoted by Ln

formulae which do not contain any propositional variables but only (possibly) nominals are called pure

formulae. Hybrid languages are often extended with the universal modality corresponding to a special

term U such that in the semantics RU= W × W, i.e., the largest relation in the frame F. A formula A

in a hybrid language is called a pure formula if it does not contain propositional variables.

A well known natural translation of a formula A (in any of the above mentioned modal languages)

into a first-order formula ST(A,x) with only one free variable x can be defined, and we invite the reader

to consult [2] or [7] for its definition. Let us note that the standard translation of a pure formula is a

first-order condition, a fact which will be used in the final stage of algorithm SQEMA and its extension

SQEMAsubfor obtaining the desired local first-order equivalent of the input formula.

Lastly some terminology relating to the various notions of equivalence for formulae. Two Ln

formulas ϕ and ψ are semantically equivalent (denoted ϕ ≡ ψ) if they are true at exactly the same

states in all τ-models; locally frame equivalent if they are valid at exactly the same states in all τ-

α(x,y)(=defRα(y,x)).

α(x,y1...,yi,...,yn) where R−i

α(x,y1...,yi,...,yn) is

τand Ln

τ(r)([7]). Hybrid

τ(r)-

Page 6

6W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

frames; locally equivalent if they are valid at exactly the same states in all τ-general frames.

1.2. Modal algebras

For a given similarity type τ, let F = (W,{Rα}α∈τ) be a τ-frame. For any (n + 1)-place rela-

tion Rαon W, not necessarily corresponding to a given modal τ-term, we define two n-ary opera-

tions over subsets A1,...,Anof W as follows: ?α?(A1,...,An) =def {x ∈ W : (∃y1...yn ∈

W)(Rα(x,y1,...,yn) and yi∈ Aifor all 1 ≤ i ≤ n} and [α](A1...,An) =def¬?α?(¬A1,...¬An).

Let B(F) be the Boolean algebra of all subsets of W augmented with the operations ?α?, α ∈ τ. We

will use the standard notion for the logical operations of negation ¬, conjunction ∧, and disjunction ∨,

to denote the corresponding Boolean operations of complement, meet and join, and 0 = ∅,1 = W will

be respectively the zero and the unit of the algebra.

The algebra obtained in this way will be called modal algebra over F. Modal algebras may have

richer signatures than the signature of the corresponding modal language. Namely, even if the modal

language does not contain inverses, we allow the application of the operations [α−i] and ?α−i? to subsets

of W, having in mind the natural assumption that Rα−i = R−i

Modal algebras can be used to simplify some semantical definitions, when one regards modal τ-

formulae as polynomials over a modal algebra B(F) with propositional variables and nominals ranging

over subsets and singleton subsets of W, respectively, and modal operations [α] and ?α? interpreted as

the operations corresponding to the relation Rα. In this way modal formulae will denote subsets of W.

Now validity of a formula A in F is equivalent to the fact that the equation A = 1 is identically true in

B(F), i.e., A = 1 for all possible values of the variables and nominals occurring in A. Local validity at

a point x ∈ W is equivalent to the fact that x ∈ A is true identically.

Let us note that the above treatment of modal formulae as algebraic expressions in modal algebras

has some additional features, which will beused subsequently in the algorithm SQEMA and its extension

SQEMAsub. Namely, some modal expressions over modal algebras code, in some sense, local and global

first-order conditions of the frame F. Let us explain this with some examples.

x ∈ {y} means x = y.

Let Rαbe a binary relation in W. Then:

x ∈ ?α?{y} means Rα(x,y)

x ∈ ?α−1?{x} means Rα(x,x) - local reflexivity of Rαat x.

x ∈ [α][α]?α−1?{x} means (∀y,z)(Rα(x,y) ∧ Rα(y,z) → Rα(x,z)) - the local transitivity of Rα

at x.

We will also use the following algebraic facts:

A → B = 1 iff A ⊆ B,

A ⊆ B iff ¬A ∨ B = 1,

x ∈ A iff {x} ⊆ A iff ¬{x} ∨ A = 1,

x ?∈ A iff {x} ∈ ¬A iff ¬{x} ∨ ¬A = 1,

A ∨ [α](B1,...,Bi,...,Bn) = 1 iff [α−i](B1,...,A,...,Bn) ∨ Bi= 1,

x ∈ [α](B1,...,Bi,...,Bn) iff [α−i](B1...,¬{x},...,Bn) ∨ Bi= 1.

(α−i)−i= α.

α.

Page 7

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions7

1.3.Ackermann’s lemma and SQEMA, informally

The main transformation rule of the algorithm SQEMA ([6, 7]) is the so called Ackermann-Rule, the

details of which will be recalled in the next section. The Ackermann-Rule is based on the Ackermann

lemma introduced by Ackermann in [1] for elimination of second-order quantifiers. We owe to A. Szałas

[23] the idea to apply the Ackermann lemma (in its original formulation) in modal definability theory. In

[6, 7] we used a modal version of the Ackermann lemma, whereas here we will give an algebraic version

of this lemma. Similar algebraic treatment of Ackermann’s lemma and its generalizations can be found

also in [28] – [32]. The algebraic reformulation of this lemma, in standard mathematical language, can

be seen as the statement of a kind of necessary and sufficient condition for a special system of equations

in modal algebras to have a solution. This makes the lemma more readily understandable and illustrates

the intuition behind SQEMA. Notwithstanding the extreme simplicity of its proof, this lemma is most

fruitfully applicable.

Lemma 1.1. Modal Ackermann lemma: an algebraic form. Let B(F) be a modal algebra over a

given τ-frame F = (W,R). Let A and B(q) be modal formulae over B(W) such that A does not contain

the variable p and B(q) be a formula having only positive occurrences of the variable q. Consider the

following system of equations with respect to p:

?????

Then (∗) has a solution for p in B(F) iff B(A) = 1.

Proof:

(⇒) Suppose that (∗) has a solution for p. Then A ∨ p = 1, which is equivalent to ¬p ⊆ A. Since B(q)

has only positive occurrences of q, it is upward monotone with respect to q. Hence B(¬p) ⊆ B(A) and,

since B(¬p) = 1, B(A) = 1.

(⇐) If B(A) = 1, then p = ¬A is a solution of (∗).

Now we will show how to apply Lemma 1.1 to obtain local first-order equivalents of modal formulae.

As an example, consider the formula [α]p → [α][α]p. Let F = (W,{Rα}α∈τ) be a τ-frame and x ∈ W.

The local condition at x for this formula is (see the previous section) (∀p ⊆ W)(x ∈ ([α]p → [α][α]p)).

We will perform the following sequence of equivalent transformations of this condition and at the

end we will obtain the desired first-order local equivalent.

(1) (∀p ⊆ W)(x ∈ ([α]p → [α][α]p)) iff

(2) ¬¬(∀p ⊆ W)(x ∈ [α]p → x ∈ [α][α]p) iff

(3) ¬(∃p ⊆ W)(x ∈ [α]p and x ?∈ [α][α]p) iff

(4) ¬(∃p ⊆ W)(¬{x} ∨ [α]p = 1 and x ∈ ¬[α][α]p) iff

(5) ¬(∃p ⊆ W)([α−1]¬{x} ∨ p = 1 and ¬{x} ∨ ¬[α][α]p = 1) iff

(6) ¬(∃p ⊆ W)([α−1]¬{x} ∨ p = 1 and ¬{x} ∨ ¬[α][α]¬¬p = 1) iff (by Lemma 1.1, with

B(q) = ¬{x} ∨ ¬[α][α]¬q))

(7) ¬(¬{x} ∨ ¬[α][α]¬[α−1]¬{x} = 1) iff

(8) ¬(x ?∈ [α][α]?α−1?{x}) iff

(9) x ∈ [α][α]?α−1?{x} iff

(∗)

A ∨ p

B(¬p)

=

=

1

1.

? ?

Page 8

8W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

(10) (∀y,z)(Rα(x,y) ∧ Rα(y,z) → Rα(x,z)) — the local transitivity of Rαat x.

Note that from (2) to (6) we produce only transformations after the negation sign (the first negation

step) which is needed in order to turn the universal sentence (1) into an existential form and then to

prepare the equations for an application of the modal Ackermann lemma (in step (6)). In (8) we apply

the second negation step and obtain the needed local condition in a “coded” modal form, which in (10)

is “decoded” in its first-order format.

The formal versions of SQEMA performs all these steps following strictly defined syntactic formal

transformation rules over some systems of “equations” which are analogs of the algebraic equations of

the above informal example.

1.4.The algorithm SQEMA

This subsection recalls the high-level description of the algorithm SQEMA and its transformation rules,

and also some of its meta-properties.

1.4.1.Description of SQEMA.

Here we present briefly the basic algorithm SQEMA for reader’s convenience; for more detail see [6, 7].

First, some terminology — an expression of the form ϕ ∨ ψ with ϕ,ψ ∈ Ln

equation. A finite set of SQEMA-equations is called a SQEMA-system. For a system Sys, we let

Form(Sys) be the conjunction of all equations in Sys. Given a formula ϕ ∈ Lτ as input, SQEMA

processes it in three phases, with the goal to reduce ϕ first to a suitably equivalent pure, and then first-

order formula.

Phase 1 (preprocessing) — The negation of ϕ is converted into negation normal form, and 3 and ∧

are distributed over ∨ as much as possible, by applying the equivalences 3(ψ ∨ γ) ≡ 3ψ ∨ 3γ and

δ ∧ (ψ ∨ γ) ≡ (δ ∧ ψ) ∨ (δ ∧ γ). For each disjunct of the resulting formula?ϕ?

of evaluation in a model, and not allowed to occur in the input formula ϕ. These are the initial systems

in the execution.

Phase 2 (elimination) — The algorithm now proceeds separately on each initial system, Sysi, by

applying to it the transformation rules listed below in section 1.4.2 (table 1). The aim is to eliminate from

the system all occurring propositional variables. If this is possible for each system, we proceed to phase

3, else the algorithm report failure and terminates. The rules in table 1 are to be read as rewrite rules,

i.e., they replace equations in systems with new equations or, in the case of the Ackermann-rule, systems

with new systems. Note that each actual elimination of a variable is achieved through an application of

the Ackermann-rule while the other rules are used to solve the system for the variable to be eliminated,

i.e., to bring the system into the right form for the application of this rule.

Phase 3 (translation) — This phase is reached only if all systems have been reduced to pure systems,

i.e., systems Sysiwith Form(Sysi) a pure formula. Let Sys1,...,Sysnbe these systems. Recall-

ing that ϕ was the input to the algorithm, we will write pure(ϕ) for the formula (Form(Sys1) ∨ ··· ∨

Form(Sysn)). The algorithm now computes and returns, as local frame correspondent for the input

formula ϕ, the formula ∀y∃x0ST(¬pure(ϕ),x0) where y is the tuple of all occurring variables corre-

sponding to nominals, but with yi(corresponding to the designated current state nominal i) left free,

since a local correspondent is being computed.

τ(r)is called a SQEMA-

ia system Sysiis

formed consisting of the single equation ¬i ∨ ϕ?

i, where i is a reserved nominal used to denote the state

Page 9

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions9

1.4.2.The transformation rules of SQEMA

Table 1 lists the transformation rules used by SQEMA. We have added the ∨-rule in order to simplify

the Ackermann rule from [7] by enabling all equations of the type A∨p to be put together into one. Note

that, for monadic modalities, the 2 and 3-rules simplify as follows:

(Monadic 2-rule)

A ∨ [α]B

[α−1]A ∨ B

(Monadic inverse 2-rule)

A ∨ [α−1]B

[α]A ∨ B

(Monadic 3-rule)

¬j ∨ ?α?A

¬j ∨ ?α?k, ¬k ∨ A

where α is any unary modal term, and k is a fresh nominal not occurring in the premise. The algo-

rithm can be strengthened further by adding more transformation rules facilitating some propositional

reasoning, as is done in [6, 7].

1.4.3. Some meta-properties of SQEMA

A. Correctness

A formula on which SQEMA succeeds will be called a SQEMA-formula.

Theorem 1.1. (Correctness of SQEMA, [7])

Every SQEMA-formula is locally frame-correspondent to the first-order formula returned.

B. Canonicity

For a definition of descriptive frames see e.g., [7].

A formula ϕ is locally d-persistent, if, for every pointed descriptive frame (F,w) for the respective

language, it is the case that (F?,w) ? ϕ whenever (F,w) ? ϕ; ϕ is d-persistent if F?? ϕ whenever

F ? ϕ. Clearly, local d-persistence implies d-persistence.

Theorem 1.2. (D-persistence,[7])

1. Every SQEMA-formula in Lτis locally persistent with respect to the class of all descriptive τ-

frames.

2. Every SQEMA-formula in Lr(τ)is locally persistent with respect to the class of all reversive

descriptive τ-frames.

Corollary 1.1. (Canonicity of SQEMA, [7])

All formulae on which SQEMA succeeds are canonical.

C. Completeness

For the definition of polyadic inductive formula we refer to the paper [17] (see also [15, 16, 7]. Later

on in the paper these formulae will be discussed as special case of complex inductive formulae.

Page 10

10W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

Table 1.

SQEMA Transformation Rules

Rules for connectives

C ∨ (A ∧ B)

C ∨ A,C ∨ B

(∧-rule)

A ∨ C,B ∨ C

(A ∧ B) ∨ C

(∨-rule)

C ∨ (A ∨ B)

(C ∨ A) ∨ B

(left-shift ∨-rule)

(C ∨ A) ∨ B

C ∨ (A ∨ B)

(right-shift ∨-rule)

A ∨ [γ](B1,...,Bn)

[γ−i](B1,...,Bi−1,A,Bi+1,...,Bn) ∨ Bi

(2-rule)

A ∨ [γ−i](B1,...,Bn)

[γ](B1,...,Bi−1,A,Bi+1,...,Bn) ∨ Bi

(inverse 2-rule)

¬j ∨ ?γ?(A1,...,An)

¬j ∨ ?γ?(k1,...,kn), ¬k1∨ A1,...,¬kn∨ An

(3-rule∗)

∗where the kiare new nomi-

nals not occurring in the sys-

tem.

Polarity switching rule

Substitute ¬p for every occurrence of p in the system.

Ackermann-rule

The system

?????????????????

A ∨ p

B1(p)

···

Bm(p)

C1

···

Ck

is replaced by

??????????????????

B1(A/¬p)

...

Bm(A/¬p)

C1

···

Ck

where:

1. p does not occur in A,C1,...,Ck;

2. Form(B1) ∧ ··· ∧ Form(Bm) is negative in p.

3. Bi(A/¬p) means that ¬p in Biis replaced by A.

Page 11

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions11

Theorem 1.3. (Completeness of SQEMA w.r.t. inductive formulae, [7])

SQEMA succeeds on all conjunctions of polyadic inductive formulae.

Examples of how SQEMA works on different formulae, including polyadic inductive formulae, can

be found in [7]. Later we will present an example of inductive complex modal formula (to be defined in

the next section) on which SQEMA fails.

2.Inductive complex modal formulae and reversible substitutions

In this section we introduce two large classes of modal formulae: the recursive complex modal formu-

lae (RCM-formulae) and their subclass of inductive complex modal formulae (ICM-formulae).

The class of the ICM-formulae was introduced in [27] under the name ‘complex polyadic Sahlqvist

formulae’. It simultaneously extends both the class of inductive formulae and the class of complex

Sahlqvist formulae [26]. The adjective ‘complex’ comes from the fact that these formulae are built

over some special Boolean formulae, called ‘complex variables’ in [26]. All ICM-formulae are first-

order definable and canonical, but the current version of SQEMA does not succeed on all of them (see

examples 2.2 and 2.3, below). One of our main objectives in this paper is to extend SQEMA with

an additional module which performs special substitutions which enables it to succeeds on all ICM-

formulae.

2.1.Substitutions

We adopt the standard definition of (uniform) substitution ([2]) as a mapping in the set of formulae

acting on them homomorphically. This means that a substitution S can be defined if we first specify it

on propositional variables and then extend it by induction for arbitrary formulae as follows: S(¬A) =

¬S(A), S(A ◦ B) = S(A) ◦ S(B) where ◦ is any binary Boolean connective, and S[α](A1,...,An) =

[α](S(A1),...,S(An))

We will usually denote substitutions by S,T. Sometimes we will be interested in substitutions acting

on a fixed set of propositional variables. In such a case we assume that they act on all other variables

identically. The following observation is immediate.

Fact 2.1. Local frame validity is preserved by uniform substitutions and by modus ponens.

If A,B(p) ∈ Ln

uniform substitution of A for all occurrences of p.

r(τ)we will write B(A/p), or simply B(A), for the formula obtained from B(p) by

Definition 2.1. Let p = ?p1,...,pn? and q = ?q1,...,qm? be two disjoint lists of different proposi-

tional variables, and S a substitution which maps the variables in p to formulae built over q, and acts

identically on variables not in p. We say that S is a reversible substitution if there is a substitution T

that maps the variables in q to formulae built over p, acts on variables not in q identically, and is such

that T(S(pi)) ≡ pi, for i = 1,...,n (and, consequently, T(S(A)) ≡ A for any formula A containing

only propositional variables in p). We then say that p is the domain of S, q is a co-domain of S, and T

reverses S.

Page 12

12W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

Note that if a substitution T reverses a substitution S, then T need not be reversible itself, because of its

action on variables not in the range of S. The following lemma follows immediately from fact 2.1 and

the definition of a reversible substitution.

Lemma 2.1. Let S be a reversible substitution with a domain p and a co-domain q. Then A is locally

equivalent to S(A) for every formula A.

Clearly, the requirement for S to be a reversible substitution is essential, e.g., consider S such that

S(p) = q ∨ ¬q and take A = p.

A simple example of reversible substitutions, as employed by SQEMA, is polarity change: S(p) :=

¬p. Non-trivial examples of reversible Boolean substitutions can be found in [26, 29]; more such exam-

ples are provided further in the paper.

2.2. Substitutions producing inductive formulae: an informal discussion

Since the definitions of recursive and inductive complex modal formulae are complicated, we will begin

with some concrete motivating examples. For simplicity we will start with an example in the basic

mono-modal language with the usual box and diamond modalities ? and 3. Consider the formula

A = 3?(p1∨ p2) ∧ 3?(p1∨ ¬p2) ∧ 3?(¬p1∨ p2) → ?3(p1∧ p2).

It is not a Sahlqvist formula, nor even an inductive one, and the standard Sahlqvist-van Benthem substi-

tution method does not work on it. However, note that p1∧ p2≡ (p1∨ p2) ∧ (p1∨ ¬p2) ∧ (¬p1∨ p2),

hence A can be obtained, up to local equivalence, from the formula

A?= 3?q1∧ 3?q2∧ 3?q3→ ?3(q1∧ q2∧ q3).

by applying the substitution:

T(q1)

T(q2)

T(q3)

=

=

=

p1∨ p2,

p1∨ ¬p2,

¬p1∨ p2.

The formula A?is a Sahlqvist formula and it locally corresponds to the following Church-Rosser-like

first-order property of a binary relation R:

xRy1∧ xRy2∧ xRy3∧ xRy4→ (∃z)(y1Rz ∧ y2Rz ∧ y3Rz ∧ y4Rz).

Thus, A is a local consequence from A?. Conversely, A?can be obtained, up to local equivalence, from

A by means of the following substitution:

(CR4)

S(p1)

S(p2)

=

=

q1∧ q2,

(q1∧ ¬q2) ∨ (q1∧ q3).

After simple Boolean transformations one can obtain the formula

A??= 3?q1∧ 3?(¬q1∨ q2) ∧ 3?(¬q1∨ ¬q2∨ q3) → ?3(q1∧ q2∧ q3).

Page 13

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions13

Using the valid implications q2→ ¬q1∨ q2and q3→ ¬q1∨ ¬q2∨ q3, and the monotonicity of ? and

3, one can then easily obtain A?as a local consequence from A??.

Thus, the two formulae A and A?are locally equivalent. In particular, the formula A locally cor-

responds to the first-order formula (CR4), too1. Furthermore, note that the substitution T reverses the

substitution S: T(S(pi)) ≡ pi, for every variable piin the domain of S.

In order to see the general pattern of transformation between A and A?, let us denote D1= p1∨ p2,

D2= p1∨ ¬p2and D3= ¬p1∨ p2. Then A can be presented in the following way:

A = 3?D1∧ 3?D2∧ 3?D3→ ?3(D1∧ D2∧ D3).

Notationally, A and A?look quite similar, the only difference being that the elementary disjunctions

D1, D2and D3in A replace the variables q1,q2and q3in A?. In [26] such elementary disjunctions

are called complex variables, because they code in some way ordinary variables, and the respective

extension of the Sahlqvist class defined in [26] — complex Sahlqvist formulae. It is not, however, true

in general that complex formulae can be obtained from Sahlqvist formulae simply by replacing their

different variables by different elementary disjunctions as in the above example, because non-first-order

definable modal formulae can be obtained in such a way, too. Consider, for instance, the Sahlqvist

formula 3?q1→ 3?(q1∧ q2) ∨ 3?(q1∧ q3) and replace q1,q2,q3by D1,D2,D3, respectively. After

some Boolean simplifications we obtain the formula 3?(p1∨ p2) → 3?p1∨ 3?p2, which is not

first-order definable [33].

The next example of complex formula is in a polyadic language, where α,β, and γ are modal terms

of suitable arities:

B = [α](¬[β](¬p1∨ p2),¬[β](p1∨ ¬p2),¬[β](p1∨ p2),?γ?((¬p1∨ p2),(p1↔ p2),(p1∧ p2))).

Modulo semantic equivalences the formula B can be rewritten, using the elementary disjunctions D1,

D2, D3, as:

B = [α](¬[β]D3,¬[β]D2,¬[β]D1,?γ?(D3,D3∧ D2,D3∧ D2∧ D1)).

That formula can be obtained by an obvious substitution from

B?= [α](¬[β]q1,¬[β]q2,¬[β]q3,?γ?(q1,q1∧ q2,q1∧ q2∧ q3)).

Here B is a complex formula and B?is an inductive formula with headed boxes [β]q1, [β]q2and [β]q3

and a negated headless box (positive part) ?γ?(q2,q2∧ q3,q2∧ q3∧ q1). Note that B and B?are again

related by means of a pair of reversible substitutions S?and T?, where:

T?(q1) = D3, T?(q2) = D2, T?(q3) = D1.

S?(p1) = ¬q1∨ (q2∧ q3), S?(p2) = q1∧ (¬q2∨ q3).

From the example above one can see that the complex variables D1,D2,D3appear in B only as the

heads of the headed boxes and in the positive part ?γ? in special ‘complex blocks’ based on a given order

1This was first established by using the algorithm SCAN, thanks to a suggestion of Andreas Herzig, before complex formulae

were introduced.

Page 14

14W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions

of the complex variables. This special structure of the complex formulae is needed to guarantee their

translation into inductive formulae by means of the substitutions T,S, respectively T?,S?.

The question of how to find such suitable substitutions arises. For instance, the definitions of T and

T?are obvious, but how to find S and S?? We will show later that substitutions like S and S?can be

effectively computed from the form of the given complex formula as a solution of a special system of

Boolean equations corresponding to that formula. In order to give some preliminary intuition we present

that system of equations for the case of the second example. Looking at the formula B?we see that the

substitution S?should satisfy the following equations:

S?(D3) ≡ q1, S?(D3∧ D2) ≡ q1∧ q2, S?(D3∧ D2∧ D1) ≡ q1∧ q2∧ q3.

In this system S?is an unknown substitution, which has to be extracted from the given equations. Using

the fact that S?should be a substitution, the system can be transformed equivalently to the following one

which has to be solved with respect to S?(p1),S?(p2):

???????

equation, and do the same with the second and third equations) this system can be transformed into the

following equivalent one:

???????

on the right in the second and third equations and simplifying, one can obtain S?(p1) ≡ ¬q1∨(q2∧q3);

then, by taking the conjunctions on the left and on the right in the first and third equations, one can obtain

S?(p2) ≡ q1∧ (¬q2∨ q3) — just what was expected.

The system for the substitution T?is the following one:

q1≡ (¬S?(p1) ∨ S?(p2))

q1∧ q2≡ (¬S?(p1) ∨ S?(p2)) ∧ (S?(p1) ∨ ¬S?(p2))

q1∧ q2∧ q3≡ (¬S?(p1) ∨ S?(p2)) ∧ (S?(p1) ∨ ¬S?(p2)) ∧ (S?(p1) ∨ S?(p2))

By easy Boolean manipulations (negate both part of the first equation and add disjunctively to the second

(1)

q1≡ ¬S?(p1) ∨ S?(p2)

¬q1∨ q2≡ S?(p1) ∨ ¬S?(p2)

¬q1∨ ¬q2∨ q3≡ S?(p1) ∨ S?(p2)

,

(2)

Now, (2) can be easily solved with respect to S?(p1) and S?(p2): by taking conjunctions on the left and

T?(q1) ≡ D1, T?(q1∧ q2) ≡ D1∧ D2, T?(q1∧ q2∧ q3) ≡ D1∧ D2∧ D3.

An obvious solution of this system with respect to T?(q1),T?(q2),T?(q3) is: T?(q1) = D1, T?(q2) = D2

and T?(q3) = D3.

To conclude this informal discussion, let us mention that the polyadic version of SQEMA from [7]

does not succeed on the formula B, but it succeeds on its equivalent inductive formula B?(because

SQEMA succeeds on all inductive formulae). So, the intuitive idea for the extension of SQEMA is to

supply it with a sub-procedure based on substitutions like S and S?, whence the name of this extension:

“SQEMA with substitutions”, hereafter denoted SQEMAsub.

2.3.Formal definitions of the classes of RCM- and ICM-formulae

Let p be a propositional variable. Denote p0=def¬p and p1=defp. Let p = ?p1,...,pn? be a list of

different variables. Formulae of the form D = pi1

1∨...∨pin

n(in this order of the variables) will be called

Page 15

W. Conradie, V. Goranko, D. Vakarelov/SQEMA with substitutions15

elementary disjunctions. If p = ?p1? then we have only two (degenerate) elementary disjunctions, p1

and ¬p1. There are of course exactly 2nnon-equivalent elementary disjunctions of p = ?p1,...,pn?.

Sometimes we will consider a fixed order of all elementary disjunctions: D1,...,D2n. If we consider

{0,1}-strings (i1,...,in) as binary codes of the integers then there are two natural orderings of the

sequence of Di’s: the increasing order – starting from (0,...,0) = 0 and ending with (1,...,1) =

2n− 1, and the decreasing order which is just the opposite of the increasing order.

Let p = ?p1,...,pn? and let the elementary disjunctions built from p have the same order of the

variables. Let D(p) = ?D1,...,D2n−1? be a fixed sequence of different elementary disjunctions (the

lastoneD2n ismissing), andletD∗(p) = ?D1,D1∧D2,...,D1∧···∧D2n−1?. Thepair?D(p),D∗(p)?

will be called a propositional complex (of dimension n). The disjunctions in D(p) will be called

complex variables (of dimension n), and the elements from D∗(p) will be called complex blocks (of

dimension n). We say that the a complex ?D(p),D∗(p)? is disjoint from a complex ?D(q),D∗(q)? if

the strings p and q do not share variables.

As we have seen in section 2.2, elementary disjunctions Dican be used to “code” in some sense

ordinary variables. This suggests that one could see the elementary disjunctions Dias a new kind of

“complex” variable.

Let Σ be a set of pairwise disjoint propositional complexes. Let A(p1,...,pk) be a formula and

B1,...,Bkbe a list of complex blocks from Σ. Then A(B1,...,Bk) is called a complex atom in

Σ. If pioccurs in A(p1,...,pk) only positively (negatively) then Bioccurs in A(B1,...,Bk) positively

(negatively). If A(p1,...,pk) is a positive (negative) formula then A(B1,...,Bk) is a positive (negative)

complex atom in Σ. A complex essentially box-formula in Σ is any formula of the type

B = [β](D,N1,...,Nm) = [β](D,− →

N),

where β is a modal term of arity m+1,− →

D is a complex variable from Σ.2A formula of this type is called a headed complex box, where D is

the head of B and− →

N is the negative part of B.

Note that in ¬B = ¬[β](D,N1,...,Nm) the head D has a negative occurrence and all complex

blocks in N1,...,Nmhave positive occurrences. Also note that β can be a composed modal term. If, for

instance, α and β are unary terms, then the formula [α]p ∨ [β]q can be represented as [γ](p,q), where γ

is the following composition γ = ι2(α,β).

Recall that a constant formula is a formula not containing propositional variables.

N = N1,...,Nmis a string of negative complex atoms in Σ and

Definition 2.2. A recursive complex modal formula (RCM-formula for short) in Σ is any constant

formula or a formula A = [α](¬B1,...,¬Bm,C1,...,Cn) where B1,...,Bnare complex essentially

box formulae in Σ, C1,...,Cnare positive complex atoms in Σ, and where both m and n may be zero.

The formulae Bi, 1 ≤ i ≤ m, are called the headed boxes of A, while the formulae Cj, 1 ≤ j ≤ n, are

called the positive components of A. Note that all heads in A have only negative occurrences and all

complex blocks (other than heads) in A have only positive occurrences.

InthecasethatallpropositionalcomplexesofAareoftheformP = ??p?,?p??(i.e., ofdimensionone

and with the decreasing order of the elementary disjunctions), A is called a recursive modal formula,

or RM-formula for short. Thus, RM-formulae have no (non-degenerate) complex variables.

2Here D need not be only in the first argument place, but we put it first for simplicity of notation.