<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Advancing Automated Theorem Proving for the Modal Logics D and S5</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jens Otten</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Informatics, University of Oslo</institution>
          ,
          <country country="NO">Norway</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <fpage>81</fpage>
      <lpage>91</lpage>
      <abstract>
        <p>Prefixes encoding the Kripke semantics and an additional prefix unification can be used when performing proof search in some popular non-classical logics. The paper presents two techniques that optimize this approach for the first-order modal logics D and S5. The first one improves backtracking in the modal connection provers MleanCoP and nanoCoP-M, the second one provides an embedding from the modal logics D and S5 into classical first-order logic. Both techniques have been implemented. A practical evaluation on the QMLTP benchmark library shows a significant performance improvement.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Automated theorem proving</kwd>
        <kwd>modal logics</kwd>
        <kwd>prefix unification</kwd>
        <kwd>MleanCoP</kwd>
        <kwd>nanoCoP-M</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
    </sec>
    <sec id="sec-2">
      <title>2. Prefixes and Matrix Characterization</title>
      <p>
        This section introduces the basic concepts of prefixes and the modal matrix characterization of
logical validity for the modal logics D, T, S4 and S5. See [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for an introduction to modal logics.
      </p>
      <sec id="sec-2-1">
        <title>2.1. Modal Syntax and Semantics</title>
        <p>A first-order modal formula F (or G, H ) is composed of atomic formulae, the standard
connectives ¬, ∧, ∨, ⇒, the standard quantifiers ∀ and ∃, and the unary modal operators □ and ♢ .
The Kripke semantics of the standard modal logics is defined by a set of worlds W and a binary
accessibility relation R ⊆ W × W between these worlds. In each single world w ∈ W the
classical semantics applies to the standard connectives and quantifiers. The modal operators
are interpreted with respect to accessible worlds: □F /♢ F is true in a world w iff F is true in
all/some world(s) w′ with (w, w′)∈R, i.e., accessible from w.</p>
        <p>The properties of the accessibility relation R determine the specific modal logic. For example,
the accessibility relation can be serial (modal logic D)1, reflexive (modal logic T), reflexive and
transitive (modal logic S4), or an equivalence relation (modal logic S5). The standard semantics
is considered with rigid term designation, i.e. every term denotes the same object in every world,
and terms are local, i.e. any ground term denotes an existing object in every world.</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Modal Prefixes</title>
        <p>A prefix is used to name a sequence of accessible worlds in which a formula holds and is assigned
to each subformula of a given formula F . For example, the prefix w1 . . . wn of a modal formula</p>
        <sec id="sec-2-2-1">
          <title>F denotes that F is true in world wn that is accessible from a world wn−1, . . . , that is accessible</title>
          <p>from a world w1. 2
Definition 1 (Modal prefix). A prefix (denoted by p) is a string (i.e. a sequence of characters)
over an alphabet ν ∪ Π, in which ν is a set of prefix variables (V1, ...) and Π is a set of prefix
constants (a1, ...). If a formula F with polarity pol ∈ {0, 1} has the prefix p, written F pol : p,
then the prefixes (and polarities) of its subformulae G and H are defined inductively according to
the table below. It is ⊙ ∈ {∧, ∨}, Q ∈ {∀, ∃}; V ∈ ν and a ∈ Π are new prefix characters that
have not been used before. The (modal) prefix of a given (modal) formula F is the empty string
ε, the prefixes of its subformulae are the prefixes of the corresponding formula F 0 : ε. The prefix
pre(x) of a term variable x occurring in a (sub)formula Qx G is the prefix of the subformula G.
1A relation R ⊆ W × W is serial iff for all w1 ∈ W there is some w2 ∈ W with (w1, w2) ∈ R.
2The start world, e.g. w0, is omitted from all prefixes. Therefore, a prefix can also be empty.</p>
          <p>F pol : p
(G ⊙ H )pol : p
(G ⇒ H )pol : p
(¬G)pol : p
(Q x G)pol : p</p>
          <p>Gpol′ : p′
Gpol : p
G1−pol : p
G1−pol : p
Gpol : p</p>
          <p>F pol : p
(□G)1 : p
(♢ G)0 : p
(□G)0 : p
(♢ G)1 : p</p>
          <p>Gpol′ : p′
G1 : pV
G0 : pV
G0 : pa</p>
          <p>G1 : pa
H pol′′ : p′′
H pol : p
H pol : p
Example 1. Consider the Barcan formula</p>
          <p>The prefixes of FB and its subformulae are: FB0 : ε, (∀x □ p(x))1 : ε, (□ p(x))1 : ε, p(x)1 : V1,
(□ ∀y p(y))0 : ε, (∀y p(y))0 : a1, and p(y)0 : a1, in which V1 is a new prefix variable and a1 is a
new prefix constant. It is pre(x) = ε and pre(y) = a1.</p>
          <p>Proof-theoretically, prefix variables and constants represent applications of the rules □-left/♢
right (ν-rules) and □-right/♢ -left (π-rules), respectively, in the modal sequent calculus. A prefix
of a formula F specifies the sequence of modal rules that have to be applied (analytically or
bottom-up) in order to obtain the formula F in the sequent.</p>
          <p>
            In Fitting’s modal tableau calculus [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ], prefixes consists only of constant characters and
prefixes of literals that close a branch need to denote the same world, i.e., they need to be
identical. This is achieved by “guessing the right” sequence of constants by which prefixes are
extended whenever a modal ν-rule of the calculus is applied. This “guessing” approach results
in a large search space and an inefficient proof search due to necessary backtracking in case the
wrong sequence was added.
          </p>
          <p>A more efficient proof search adds a prefix variable whenever a modal ν-rule is applied
and delays choosing an appropriate sequence of constant characters until a branch is closed.
This resembles the approach of using free variables in classical (tableau or sequent) calculi,
i.e. using term variables instead of guessing an appropriate first-order term whenever a
(nonEigenvariable) quantifier rule is applied and using term unification whenever a branch is closed
in order to assign actual terms to these free term variables. Using prefix variables requires a
prefix substitution in order to make prefixes of literals that close a branch identical.
Definition 2 (Prefix substitution). A prefix substitution σP : ν → (ν ∪ Π)∗ maps elements
of ν to strings over ν ∪ Π. In σP (p) prefix variables are replaced according to σP .</p>
          <p>The accessibility condition and the domain condition ensure that the prefix substitution
respects the accessibility relation and the domain variant of the considered modal logic.</p>
          <p>Depending on the accessibility relation, variables may be substituted by exactly one prefix
character (modal logic D), by at most one prefix character (modal logic T) or by an arbitrary
string (modal logic S4). For the modal logic S5 only the last character of each prefix is considered
(or the the empty string if the prefix is empty).</p>
          <p>Definition 3 (Accessibility condition). For the modal logics D and T the accessibility
condition is |σP (V )|=1 and |σP (V )|≤1 for all V ∈ ν, respectively.</p>
          <p>Each first-order modal logic can have different domain conditions. If D(w) is the
(firstorder) domain of a world w, then a modal logic has constant domains if D(w1) = D(w2) for
all w1, w2 ∈ W and it has cumulative (or increasing) domains if D(w1) ⊆ D(w2) for all
w1, w2 ∈ W with (w1, w2) ∈ R. A modal logic has varying domains if there are no restrictions
on the domains of the worlds.</p>
          <p>In case of varying domains, objects may only exists in the world in which they are introduced.
For cumulative domains, Eigenvariables3 have to be introduced before the term variable they
are assigned to. For constant domains, there is no such restriction as every object exists in all
worlds. The domain condition captures these restrictions on prefixes of first-order variables.
Definition 4 (Domain condition). Let σT be a term (or first-order) substitution and σP a
prefix substitution. The domain condition for (a) varying and (b) cumulative domains states that
for all term variables x and all Eigenvariables x¯ occurring in the term σ(x): (a) σP (pre(x¯)) =
σP (pre(x)) and (b) σP (pre(x¯)) σP (pre(x)), respectively.4 For constant domains and S5 with
cumulative domains the domain condition is always true.</p>
          <p>
            Definition 5 (Admissible substitution). A combined substitution σ = (σT , σP ) is
admissible with respect to a specific modal logic iff the accessibility condition holds for σP and the domain
condition holds for σT /σP for that logic. Furthermore, the reduction ordering induced by σ has to
be irreflexive (see [
            <xref ref-type="bibr" rid="ref5">5</xref>
            ] for details).
          </p>
          <p>Example 2. Consider the formula FB from Example 1. The prefix substitution σP (V1) = a1
makes the prefixes of the two atomic formulae p(x) : V1 and p(y) : a1 identical. As |σP (V1)| = 1,
σP fulfills the accessibility condition for D, T, S4 and S5. For the term substitution σT (x) = y it is
σP (pre(y)) = a1 6 ε = σP (pre(x)), hence, σB = (σT , σP ) is only admissible for D, T, S4 and S5
with constant domains and for S5 with cumulative domains.</p>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Modal Matrix Characterization</title>
        <p>
          A modal formula can be translated into a prefixed clausal (disjunctive normal) form, where
prefixes are added to atomic formulae. This is called a prefixed matrix. It is a compact
representation of the proof search space. The clausal modal matrix characterization presented in the
following is derived from Wallen’s original non-clausal characterization of logical validity [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ].
Definition 6 (Prefixed matrix and paths). The (prefixed) matrix M (F ) representing a modal
formula F , is a set of clauses, in which each clause is a set of atomic formulae annotated with
their prefixes (see [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]). A path through a matrix M = {C1, . . . , Cn} is a set containing one atomic
n
formula from each clause, i.e. Si=1{Ai} with Ai ∈ Ci is a path.
        </p>
        <p>
          A path represents the set of all atomic formulae in a “final sequent” in the classical sequent
calculus [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. Two atomic formulae in a path represent an axiom if they have the same predicate
symbol, but different polarities (see Definition 1). They represent an axiom in the first-order
“freevariable” modal calculus, if their arguments and prefixes unify under a combined substitution.
Definition 7 (Complementary connection). A connection {(A1)0 : p1, (A2)1 : p2} is a set
of atomic formulae with the same predicate symbol but different polarities. A connection is
σcomplementary for a substitution σ=(σT , σP ) iff σT (A1) = σT (A2) and σP (p1) = σP (p2).
3Eigenvariables x¯ are exactly those term variables that are quantified in formulae of the form (∀x¯ G)0 or (∃x¯ G)1.
4u ⪯ w holds iff u is an initial substring of w or u = w.
        </p>
        <p>A multiplicity µ : M → IN specifies the number of clause copies used in a proof. M μ denotes
the matrix that includes clause copies according to µ . Clause copies correspond to applications
of the contraction rule in the sequent calculus.</p>
        <p>
          If (and only if) all paths through a matrix of a formula contain a σ-complementary connection
for some admissible substitution σ, the formula is valid. In this case every final sequent of the
corresponding derivation in the (free-variable) sequent calculus would contain an axiom (as
paths represent final sequents and complementary connections represent axioms).
Theorem 1 (Matrix characterization for modal logics). A modal formula F is valid in the
modal logic L iff there is
1. a multiplicity µ ,
2. a combined substitution σ = (σT , σP ) that is admissible with respect to L, and
3. a set S of σ-complementary connections,
such that every path through M μ(F ) contains a connection from S. (See [
          <xref ref-type="bibr" rid="ref5 ref8">8, 5</xref>
          ] for details.)
Example 3. Consider the Barcan formula FB and σB from Example 1 and 2. Its prefixed matrix is
MB=M (FB)={{p(x)1:V1}, {p(y)0:a1}}. The only path through MB is {p(x)1:V1, p(y)0:a1}.
It contains the σB-complementary connection {p(x)1:V1, p(y)0:a1}, which is (only) admissible
for D, T, S4, S5 with constant domains and S5 with cumulative domains. Hence, FB is (only) valid
for the modal logics D, T, S4, S5 with constant domains and S5 with cumulative domains.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Proof Search Optimizations for D and S5</title>
      <p>
        A proof search based on the presented matrix characterization has to calculate an appropriate
combined substitution σ=(σT , σP ). Whereas the term substitution σT is calculated by one of
the known algorithms for term unification, calculating the prefix substitution σP has to be done
by a special prefix unification algorithm [
        <xref ref-type="bibr" rid="ref10 ref8">8, 10</xref>
        ].
      </p>
      <p>The prefix unification problem is a special case of string unification (the monoid problem for
word equations) that takes the prefix property (or T-string property) of the modal prefixes into
account: for all prefixes p1 = u1Xw1 and p2 = u2Xw2 it is u1 = u2 (with X ∈ ν ∪ Π and
u1, u2, w1, w2 ∈ (ν ∪ Π)∗).</p>
      <p>
        In contrast to term unification, which has only a single most general unifier (mgu), the number
of mgus for prefix unification might grow exponentially. More specifically, in the worst case the
number of mgus is 12 (n2!n)2)! ∈ O( 2√2nn ) when unifying the two prefixes V1 . . . Vn and a1 . . . an [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
For general string unification, the number of mgus might not even be finite, e.g., consider the
unification of the two strings V a and aV (with the set of mgus {σP (V ) = ai | i ∈ IN }). For
the modal logics T and S4, prefix unification procedures that calculate minimal sets of mgus
were developed in [
        <xref ref-type="bibr" rid="ref11 ref8">11, 8</xref>
        ]. In case of the modal logics D the accessibility condition requires
|σP (V )| = 1, for the modal logic S5 the prefix is a single character or empty. Hence, for these
modal logics the proof search can be optimized as (1) there is only one mgu and (2) the prefix
unification can be realized by term unification, allowing an embedding into classical logic.
      </p>
      <sec id="sec-3-1">
        <title>3.1. Optimizing Prefix Unfication</title>
        <p>As the number of mgus for prefix unification can grow, in general, exponentially, it is in practice
more efficient to first search for a classical proof, i.e. ignoring all prefixes, and perform the
prefix unification and the check of the domain condition afterwards, as pictured below.
1. classical proof search: calculate (only) S and σT
2. check domain condition: calculate σ′</p>
        <p>P</p>
        <sec id="sec-3-1-1">
          <title>3. prefix unification: calculate σP (based on σP′ )</title>
          <p>
            This approach is used by the modal connection provers MleanCoP [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ] and nanoCoP-M [
            <xref ref-type="bibr" rid="ref4">4</xref>
            ],
and also turned out to be successful for intuitionistic provers [
            <xref ref-type="bibr" rid="ref12 ref4">12, 4</xref>
            ]. But for the modal logics D
and S5, for which there is at most one prefix unifier, this leads to redundant backtracking in the
classical proof search, which is completely separated from the prefix unification process.
          </p>
          <p>To improve efficiency, the domain condition check and the prefix unification is integrated into
the classical proof search, i.e. the prefix substitution σP is calculated directly after a connection
is identified. This results in a (modal) proof search that consists of only one (major) step instead
of three, as pictured below.</p>
          <p>1. modal proof search: calculate S, σT and σP (simultaneously)</p>
          <p>This approach ensures that the calculated set of connections is always σ-complementary and
a failed check of the domain condition or prefix unification is quickly detected. Even though
this also leads to some overhead, in general, this results in a more efficient proof search for the
modal logics D and S5.</p>
          <p>Example 4. Consider the formula ( ∀x ♢ p(x) ) ⇒ ( □ p(b1) ∨ . . . ∨ □ p(bn) ∨ ♢ p(c) )
with the matrix {{p(x)0: a}, {p(b1)1: a1}, . . . {p(bn)1: an}, {p(c)1: V1}}}. So far, MleanCoP
and nanoCoP-M first perform a (purely) classical proof search by identifying the connection
S = {p(x)0: a, p(b1)1: a1} with the term substitution σT (x) = b1. But the prefix unification
of the two prefixes a and a1 fails (the domain condition is always true). Afterwards,
backtracking within the classical proof search is done. This results in the next classical proof with
S = {p(x)0: a, p(b2)1: a2} and σT (x) = b2. Again, the prefix unification of a and a2 fails.
Backtracking within the classical proof continues and results in, altogether, n different classical
proofs for which the subsequent prefix unification fails. Only for the last possible classical proof
with S = {p(x)0: a, p(c)1: V1} and σT (x) = c the prefix unification of a and V1 succeeds with
σP (V1) = a. An improved procedure that calculates the prefix substitution directly after a
connection is identified would immediately identify the modal proof with S = {p(x)0: a, p1(c): V1},
σT (x) = c and σP (V1) = a, avoiding any backtracking within the classical proof search. That
this approach is more efficient becomes clearer for slightly larger formulae with a larger classical
proof (search) and, hence, more choices for backtracking.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Embedding into Classical Logic</title>
        <p>As |σ(V )| = 1 for the modal logic D and |p| ≤ 1 for all prefixes p in S5, the prefixes of atomic
formulae can be included in their arguments and unified by the standard term unification. This
yields an embedding for these modal logics into classical logic.
Definition 8 (Translation into classical logic). The translation T of a prefixed modal
formula into a classical formula is defined according to Table 1. In this table, P (. . .) is an atomic
formula, t1, . . . , tn are (first-order) terms, pol ∈ {0, 1} is a polarity, V is a set of term and
prefix variables, p and c1 . . . cm are prefixes. fpmre is a new function symbol with arity m≥1,
epspre is a unique constant, V ∈ ν is a new prefix variable, and c|sVk|(V ) is a new (skolemized)
prefix constant parametrized with the variables in V . The translation of a modal formula F is
T (F ) := T (F : ǫ, {}).
T (P (t1, . . . , tn)pol : ε, V) = P (t1, . . . , tn, fp1re(epspre))
1
T (P (t1, . . . , tn)pol : c1 . . . cm, V) = P (t1, . . . , tn, fpre(cm))
T (P (t1, . . . , tn)pol : c1 . . . cm, V) = P (t1, . . . , tn, fpmre(c1, . . . , cm))
T ((G ⊙ H)pol : p, V) = (T (Gpol : p, V) ⊙ T (Hpol : p, V))
T ((G ⇒ H)pol : p, V) = (T (G1−pol : p, V) ⇒ T (Hpol : p, V))
T ((¬G)pol : p, V) = (¬ T (G1−pol : p, V))
for D and S5
only for S5
only for D
⊙ ∈ {∧, ∨}
T ((∀ x G)1 : p, V) = (∀ x T (G1 : p, V∪{x}))
T ((∃ x G)0 : p, V) = (∃ x T (G0 : p, V∪{x}))
T ((∀ x G)0 : p, V) = (∀ x T (G0 : p, V))
T ((∃ x G)1 : p, V) = (∃ x T (G1 : p, V))</p>
        <p>T ((□ G)1 : p, V) = (∀ V T (G1 : p V, V∪{V }))
T ((♢ G)0 : p, V) = (∃ V T (G0 : p V, V∪{V }))
T ((□ G)0 : p, V) = T (G0 : p c|sVk|(V), V)</p>
        <p>T ((♢ G)1 : p, V) = T (G1 : p c|sVk|(V), V)</p>
        <p>The prefixes of atomic formulae are now part of the function fpre, which is added as last
argument to each atomic formula. Skolemization is extended to the prefix constants (function
csk) in order to check the irreflexivity of the reduction ordering by the occurs check of the term
unification.5 This embedding works for the modal logics that do not have any domain condition,
i.e., for D and S5 with constant domains (and, hence, also for S5 with cumulative domains).
Theorem 2 (Correctness of translation T ). A modal formula F is valid in the modal logics
D or S5 with constant domains iff its translated formula T (F ) is valid in classical logic.</p>
        <p>This theorem follows from the matrix characterization (Theorem 1) and the restriction of the
accessibility condition for D and S5. The translation T preserves the structure of the formula,
only the modal operators are eliminated and one argument is added to all atomic formulae.
Example 5. Consider again the Barcan formula</p>
        <p>FB = (∀x □ p(x)) ⇒ (□ ∀y p(y)) .</p>
        <p>
          Its translation (for both D and S5) is T (FB ) = (∀x ∀V p(x, fp1re(V ) ⇒ (∀y p(y, fp1re(csk))). As
T (FB ) is classically valid, FB is valid for the modal logics D and S5 with constant domains (and
also for the modal logic S5 with cumulative domains).
5This proof-theoretical view on Skolemization is crucial for its extension to prefixes, see also [
          <xref ref-type="bibr" rid="ref12 ref6 ref8">6, 12, 8</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. The Implementations</title>
      <p>The optimization and embedding of Section 3 have been implemented within three systems for
the first-order modal logics D and S5.</p>
      <p>1. MleanCoP-DS5 is an optimized version of the clausal connection prover MleanCoP,
2. nanoCoP-M-DS5 is an optimized version of the non-clausal prover nanoCoP-M,
3. nano-M2C implements an embedding of modal logic into classical logic.</p>
      <sec id="sec-4-1">
        <title>4.1. The Modal Provers MleanCoP-DS5 and nanoCoP-M-DS5</title>
        <p>
          The optimization described in Section 3.1 was integrated into the provers MleanCoP 1.3 [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]
and nanoCoP-M 2.0 [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. MleanCoP and nanoCoP-M are very compact Prolog implementations
of the clausal and non-clausal modal connection calculus, respectively. They are based on the
modal matrix characterization of logical validity as specified in Theorem 1 in Section 2.3. In
connection calculi the proof search is guided by connections in order to calculate a set S of
σ-complementary connections [
          <xref ref-type="bibr" rid="ref13 ref6">13, 6</xref>
          ].
        </p>
        <p>In the original MleanCoP and nanoCoP-M provers the (rigid) prefix substitution σP is
calculated only after a classical proof (and an appropriate set of connections S) is found. In the
optimized “DS5” versions, the prefix substitution σP is calculated/extended directly after a new
connection is identified. This is done by unifying the prefixes of each new connection and
checking the appropriate domain condition. Since there is only a single most general prefix
unifier for D and S5, no backtracking over alternative prefix substitutions is necessary.</p>
        <p>The optimized provers MleanCoP-DS5 and nanoCoP-M-DS5 support the first-order modal
logics D and S5 with constant, cumulative and varying domains.6</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. The Translation nano-M2C into Classical Logic</title>
        <p>
          The translation T introduced in Definition 8 of Section 3.2 was implemented by the compact
Prolog program nano-M2C. The translation takes a modal formula/problem in QMLTP syntax
as input and translates it into a validity preserving formula in classical first-order logic according
to Table 1. The translated formula is written into a file and can be further processed by any
classical first-order prover, such as leanCoP [
          <xref ref-type="bibr" rid="ref14 ref2">14, 2</xref>
          ], nanoCoP [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] or E [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
        </p>
        <p>
          The translation nano-M2C supports the first-order modal logics D with constant domains
and S5 with constant and cumulative domains.7
Example 6. The Barcan formula (∀x □ p(x)) ⇒ (□ ∀y p(y)) from Example 1 is included in the
QMLTP library [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] as problem SYM001+1.p where it is presented in the following way:
qmf(con,conjecture,
        </p>
        <p>(( ! [X] : (#box : ( f(X) ) ) ) =&gt; (#box : ( ! [X] : ( f(X) ) )) ) ).
It is translated by nano-M2C into the following classical formula (pr/c_sko are new symbols):
fof(con, conjecture,
( ! [X] : ! [V] : f(X, pre(V)) =&gt;
! [X] : f(X, pre(c_sko(1))) ) ).
6MleanCoP-DS5/nanoCoP-M-DS5 are available at http://leancop.de/mleancop/ and http://leancop.de/nanocop-m/.
7nano-M2C is available at http://leancop.de/nano-m2c/.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Experimental Evaluation</title>
      <p>
        The three new implementations MleanCoP-DS5, nanoCoP-M-DS5 and nano-M2Cdescribed in
Section 4 were evaluated on all 580 unimodal problems of the QMLTP library v1.1 [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>All evaluations were conducted on a LIFEBOOK U9311 with a 4-core i7-1185G7 CPU and
16GB of RAM, running Linux 5.13.0. ECLiPSe Prolog version 5.108 was used for all Prolog
provers and the E prover was compiled with GNU gcc version 9.4.0. The time limit for all test
runs was set to 100 seconds.</p>
      <sec id="sec-5-1">
        <title>5.1. MleanCoP-DS5 and nanoCoP-M-DS5</title>
        <p>
          Table 2 shows the results for the modal clausal connection prover MleanCoP 1.3 [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ] and
its optimized version MleanCoP-DS5 1.0, for the modal non-clausal connection prover
nanoCoP-M 2.0 [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] and its optimized version nanoCoP-M-DS5 1.0. The total number of solved
problems and the number of proved (valid) and refuted (invalid) problems is given.
        </p>
        <p>Compared to the non-optimized versions, the optimized “‘DS5” connection provers solve
between 21 and 38 more problems for the modal logic D. For the modal logic S5 the improvement
is less significant, the optimized versions solve between two and seven more problems.
8ECLiPSe Prolog 5.x is available at https://eclipseclp.org/Distribution/Builds/. All newer versions of ECLiPSe Prolog
are missing important features and have a significantly lower performance.
9Surprisingly, the non-strategy-scheduling version of E proves less problems than the classical connection provers.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>This paper presents two techniques for advancing automated theorem proving for the first-order
modal logics D and S5. It introduces an optimization of the prefix unification for two of the
fastest existing modal provers, MleanCoP and nanoCoP-M, and an embedding of the modal
logics D and S5 into classical logic.</p>
      <p>
        Experiences from the development of nanoCoP-M have shown that it is getting increasingly
difficult to improve the performance of modal theorem provers on the QMLTP libray [
        <xref ref-type="bibr" rid="ref10 ref4">10,
4</xref>
        ]. Nevertheless, the two new optimized provers MleanCoP-DS5 and nanoCoP-M-DS5, and
the implementation nano-M2C of the embedding into classical logic solve significantly more
problems than the MleanCoP and nanoCoP-M provers. The improvement is rather small for
S5 with varying domains, but more significant for D with varying and cumulative domains
(MleanCoP-DS5 and nanoCoP-M-DS5) and for D and S5 with constant domains and S5 with
cumulative domains (nano-M2C in combination with the E prover).
      </p>
      <p>
        Ohlbach uses so-called world path to deal with the Kripke semantics of different modal
logics [
        <xref ref-type="bibr" rid="ref18 ref19">18, 19</xref>
        ]. His approach is very similar to Wallen’s matrix characterization on which the
work in this paper is based. Ohlbach has based his work on the resolution calculus and uses a
less refined prefix unification procedure. Up to the author’s knowledge, Ohlbach’s procedure
has never been implemented. The higher-order prover Leo-III uses the relational translation
(modeling the Kripke semantics) of first-order modal logic into typed higher-order logic to deal
with a wide range of modal logics [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].10
      </p>
      <p>Future work includes improvements of the prefix unification algorithm for some other modal
logics, such as T and S4. This includes solving prefix equations in a more parallel way and using
information about failed prefix unifications directly in the classical proof search carried out in
the first step. For a restricted set of modal first-order formulae, the embedding and translation
nano-M2C into classical logic can also be used for the non-constant domains. This set includes,
e.g., formulae for which the proof does not assign Eigenvariables to term variables.</p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgments</title>
      <p>The author would like to thank Stephan Schulz for providing the E prover.
10Leo-III does not support the QMLTP syntax, but previous evaluations show that it solves fewer problems than
MleanCoP and, hence, also fewer problems than nanoCoP-M.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fitting</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Mendelsohn</surname>
          </string-name>
          , First-order
          <source>modal logic</source>
          , Springer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <source>leanCoP 2.0 and ileanCoP 1</source>
          .
          <article-title>2: High performance lean theorem proving in classical and intuitionistic logic</article-title>
          , in: A.
          <string-name>
            <surname>Armando</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Baumgartner</surname>
          </string-name>
          , G. Dowek (Eds.),
          <source>IJCAR</source>
          <year>2008</year>
          , volume
          <volume>5195</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2008</year>
          , pp.
          <fpage>283</fpage>
          -
          <lpage>291</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>MleanCoP: A connection prover for first-order modal logic</article-title>
          , in: S. Demri,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kapur</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.</surname>
          </string-name>
          Weidenbach (Eds.),
          <source>IJCAR</source>
          <year>2014</year>
          , volume
          <volume>8562</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2014</year>
          , pp.
          <fpage>269</fpage>
          -
          <lpage>276</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <source>The nanoCoP 2</source>
          .
          <article-title>0 connection provers for classical, intuitionistic and modal logics</article-title>
          , in: A.
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          Negri (Eds.),
          <source>TABLEAUX</source>
          <year>2021</year>
          , volume
          <volume>12842</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2021</year>
          , pp.
          <fpage>236</fpage>
          -
          <lpage>249</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Wallen</surname>
          </string-name>
          ,
          <source>Automated Deduction in Nonclassical Logics</source>
          , MIT Press, Cambridge,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>W.</given-names>
            <surname>Bibel</surname>
          </string-name>
          ,
          <source>Automated Theorem Proving, Artificial intelligence, F. Vieweg und Sohn</source>
          ,
          <year>1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>Restricting backtracking in connection calculi</article-title>
          ,
          <source>AI Commun</source>
          .
          <volume>23</volume>
          (
          <year>2010</year>
          )
          <fpage>159</fpage>
          -
          <lpage>182</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>Implementing connection calculi for first-order modal logics</article-title>
          , in: K. Korovin,
          <string-name>
            <given-names>S.</given-names>
            <surname>Schulz</surname>
          </string-name>
          , E. Ternovska (Eds.),
          <source>IWIL</source>
          <year>2012</year>
          , volume
          <volume>22</volume>
          of EPiC Series in Computing, EasyChair,
          <year>2012</year>
          , pp.
          <fpage>18</fpage>
          -
          <lpage>32</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Gentzen</surname>
          </string-name>
          ,
          <article-title>Untersuchungen über das Logische Schließen</article-title>
          ,
          <source>Mathematische Zeitschrift</source>
          <volume>39</volume>
          (
          <year>1935</year>
          )
          <fpage>176</fpage>
          -
          <lpage>210</lpage>
          ,
          <fpage>405</fpage>
          -
          <lpage>431</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>Non-clausal connection calculi for non-classical logics</article-title>
          , in: R.
          <string-name>
            <surname>Schmidt</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          Nalon (Eds.),
          <source>TABLEAUX</source>
          <year>2017</year>
          , volume
          <volume>10501</volume>
          <source>of LNAI</source>
          , Springer, Cham,
          <year>2017</year>
          , pp.
          <fpage>209</fpage>
          -
          <lpage>227</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Kreitz</surname>
          </string-name>
          ,
          <article-title>T-string unification: Unifying prefixes in non-classical proof methods</article-title>
          , in: P. Miglioli,
          <string-name>
            <given-names>U.</given-names>
            <surname>Moscato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Mundici</surname>
          </string-name>
          , M. Ornaghi (Eds.),
          <source>TABLEAUX '96</source>
          , volume
          <volume>1071</volume>
          <source>of LNAI</source>
          , Springer,
          <year>1996</year>
          , pp.
          <fpage>244</fpage>
          -
          <lpage>260</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>Clausal connection-based theorem proving in intuitionistic first-order logic</article-title>
          , in: B.
          <string-name>
            <surname>Beckert</surname>
          </string-name>
          (Ed.),
          <source>TABLEAUX</source>
          <year>2005</year>
          , volume
          <volume>3702</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2005</year>
          , pp.
          <fpage>245</fpage>
          -
          <lpage>261</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>W.</given-names>
            <surname>Bibel</surname>
          </string-name>
          , Matings in matrices,
          <source>Commun. ACM</source>
          <volume>26</volume>
          (
          <year>1983</year>
          )
          <fpage>844</fpage>
          -
          <lpage>852</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          , W. Bibel,
          <article-title>leanCoP: lean connection-based theorem proving</article-title>
          ,
          <source>Journal of Symbolic Computation</source>
          <volume>36</volume>
          (
          <year>2003</year>
          )
          <fpage>139</fpage>
          -
          <lpage>161</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>nanoCoP: A non-clausal connection prover</article-title>
          , in: N.
          <string-name>
            <surname>Olivetti</surname>
            ,
            <given-names>A</given-names>
          </string-name>
          . Tiwari (Eds.),
          <source>IJCAR</source>
          <year>2016</year>
          , volume
          <volume>9706</volume>
          <source>of LNAI</source>
          , Springer, Heidelberg,
          <year>2016</year>
          , pp.
          <fpage>302</fpage>
          -
          <lpage>312</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>S.</given-names>
            <surname>Schulz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Cruanes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Vukmirović</surname>
          </string-name>
          , Faster, higher,
          <source>stronger: E 2</source>
          .3, in: P. Fontaine (Ed.),
          <source>CADE 27</source>
          , volume
          <volume>11716</volume>
          <source>of LNCS</source>
          , Springer,
          <year>2019</year>
          , pp.
          <fpage>495</fpage>
          -
          <lpage>507</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>T.</given-names>
            <surname>Raths</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Otten</surname>
          </string-name>
          ,
          <article-title>The QMLTP problem library for first-order modal logics</article-title>
          , in: B.
          <string-name>
            <surname>Gramlich</surname>
          </string-name>
          , et al. (Eds.),
          <source>IJCAR</source>
          <year>2012</year>
          , volume
          <volume>7364</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2012</year>
          , pp.
          <fpage>454</fpage>
          -
          <lpage>461</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>H. J.</given-names>
            <surname>Ohlbach</surname>
          </string-name>
          ,
          <article-title>A resolution calculus for modal logics</article-title>
          , in: E. L.
          <string-name>
            <surname>Lusk</surname>
            ,
            <given-names>R. A</given-names>
          </string-name>
          .
          <string-name>
            <surname>Overbeek</surname>
          </string-name>
          (Eds.),
          <source>9th CADE</source>
          , volume
          <volume>310</volume>
          <source>of LNCS</source>
          , Springer,
          <year>1988</year>
          , pp.
          <fpage>500</fpage>
          -
          <lpage>516</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>H. J.</given-names>
            <surname>Ohlbach</surname>
          </string-name>
          ,
          <article-title>Optimized translation of multi modal logic into predicate logic</article-title>
          , in: A.
          <string-name>
            <surname>Voronkov</surname>
          </string-name>
          (Ed.),
          <source>LPAR'93</source>
          , volume
          <volume>698</volume>
          <source>of LNCS</source>
          , Springer,
          <year>1993</year>
          , pp.
          <fpage>253</fpage>
          -
          <lpage>264</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>A.</given-names>
            <surname>Steen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Benzmüller</surname>
          </string-name>
          ,
          <article-title>The higher-order prover Leo-III</article-title>
          , in: D.
          <string-name>
            <surname>Galmiche</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Schulz</surname>
          </string-name>
          , R. Sebastiani (Eds.),
          <source>ICAR</source>
          <year>2018</year>
          , volume
          <volume>10900</volume>
          <source>of LNAI</source>
          , Springer,
          <year>2018</year>
          , pp.
          <fpage>108</fpage>
          -
          <lpage>116</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>