<!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>
      <journal-title-group>
        <journal-title>DL</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Separating Counting from Non-Counting in Fragments of Two-Variable First-Order Logic (Extended Abstract)</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Louwe Kuijer</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tony Tan</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Frank Wolter</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michael Zakharyaschev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Birkbeck, University of London</institution>
          ,
          <addr-line>Malet Street, London WC1E 7HX</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Liverpool</institution>
          ,
          <addr-line>Ashton Street, Liverpool L69 3BX</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>37</volume>
      <fpage>18</fpage>
      <lpage>21</lpage>
      <abstract>
        <p>We consider the problem of deciding whether two disjoint classes of models defined in a fragment of first-order logic (FO) with counting can be separated in the same fragment but without counting. This problem turns out to be hard. We show that separation for the two-variable fragment FO2 extended with counting quantifiers by means of plain FO2 is undecidable, and the same is true of the pair ℒℐ/ℒℐ of description logics. On the other hand, we establish 2ExpTime-completeness of the separation problem for the pairs ℒ/ℒ and ℒℐ/ℒℐ.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Separation</kwd>
        <kwd>two-variable first-order logic</kwd>
        <kwd>counting quantifiers</kwd>
        <kwd>bisimulation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Our concern in this paper is the following separation problems for a pair of languages  and :
/-separation: given two mutually exclusive -formulas  and  , decide whether there exists an
-formula  —a separator for  and  —such that  |=  and  |= ¬ ;
Craig /-separation: decide whether the given -formulas  and  have an -separator  that
only contains common non-logical symbols (predicates and functions) of  and  .
To illustrate,  could be an ontology  and  a concept  that is not satisfiable with respect to , both
given in an expressive language . Then a separator ontology ′ in a weaker, easier to comprehend
language  potentially explains unsatisfiability as it inherits that  |= ′ and  is not satisfiable under
′. Also, in the context of concept learning,  and  could represent positive and negative examples
for a target concept . Then any separator in an appropriately chosen language  could represent the
concept one aims to learn [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Separation generalises definability (aka membership), which asks whether a given -formula (say, a
datalog query) is equivalent to some -formula (say, a first-order query), and is regarded as one of
the main approaches to understanding the expressive power of  relative to . For instance, studying
separability of regular languages by smaller language classes (e.g., a star-free language) has brought
major insights into the respective formal languages, with some fundamental open problems in the area
cast as separation questions [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Craig /-separation generalises classical Craig interpolation in  [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] because a Craig
/separator for  and  is a Craig interpolant for  → ¬ in .
      </p>
      <p>Our aim in this paper is to investigate the decidability and complexity of the separation problem
for certain fragments  of C2—that is, the two-variable first-order logic FO2 extended with counting
quantifiers—and the same fragments  but without counting.</p>
      <p>Example 1. Consider the following C2-formulas:
 () = ∃=1 (, ),</p>
      <p>() = ∃=1 (︀ (, ) ∧ ())︀ ∧ ∃=1 (︀ (, ) ∧ ¬())︀ .</p>
      <p>Then  |= ¬ and the FO2-formula  () = ∀ (︀ (, ) → ())︀ ∨ ∀ (︀ (, ) → ¬())︀ is a
separator for  () and  (). For  ′() = ∃=2 (, ), we also have  |= ¬ ′, but  () and  ′()
are not separable in FO2. On the other hand, there is no Craig FO2-separator for  () and  () as it
would have to be defined using  only, and so separate  () and  ′() as well.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Logics</title>
      <p>The logics we consider here can all be regarded as fragments of first-order logic, FO, and are defined as
follows. Let  be a signature containing unary and binary relation symbols and possibly constants. Fix
a set var comprising two individual variables. Then
FO2( ), the two-variable fragment of FO( ), is defined as the set of formulas that are built from atoms
(), (, ), and  =  with unary  ∈  , binary  ∈  , and ,  ∈ var, using the Boolean
connectives ∧ and ¬ and quantifier ∃ with  ∈ var (other Booleans and ∀ are regarded as
standard abbreviations);
C2( ), the two-variable fragment of FO2( ) with counting, extends FO2( ) with the counting quantifiers
∃&lt;, for  ∈ N and  ∈ var (other counting quantifiers ∃=, ∃≤ , ∃≥  can be introduced as
abbreviations).</p>
      <p>In this paper, we are only interested in formulas  () with one free variable  ∈ var. The signature of
 is the set sig ( ) of relation and constant symbols occurring in  .</p>
      <p>FO( ) and its fragments are interpreted in  -structures A = (dom(A), (A)∈ , (A)∈ ) with a
domain dom(A) ̸= ∅, relations A on dom(A) of the same arity as  ∈  , and elements A ∈ dom(A).
A pointed structure is a pair A,  with  ∈ dom(A).</p>
      <p>
        We also consider a few fragments of C2 that correspond to some standard description logics (DLs).
In the context of DLs, unary relation symbols are called concept names, binary ones role names, and
constants individual names [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. A role is a role name  or its inverse − . The universal role is denoted by
. A nominal takes the form {} with an individual name .
      </p>
      <p>An ℒℐ( )-concept is defined by the grammar</p>
      <p>::= ⊤ |  | {} | ¬ |  ⊓ ′ | ≥  . | ∃.,
where  ∈  is a concept,  ∈  an individual,  a role name in  or its inverse, and  &gt; 0. We consider
several fragments of ℒℐ. The weakest, ℒ, is obtained by dropping the universal role
(indicated by omitting ·  from the name), inverse roles (indicated by omitting ℐ), nominals (indicated by
omitting ), and only admitting qualified number restrictions of the form ∃. = (≥ 1 .) (indicated
by dropping ). The languages between ℒ and ℒℐ are now defined in the obvious way.</p>
      <p>The semantics of DLs can be defined via the standard translation · ♯ into C2 with constants. For any
ℒℐ-concept , we denote by ♯ the C2-formula with constants and free variable  ∈ var
defined inductively by taking
⊤♯ = ( = ), ♯ = (),</p>
      <p>{}♯ = ( = ), (¬)♯ = ¬♯, ( ⊓ )♯ = ♯ ∧ ♯,
(∃.)♯ = ⊤ ∧ ∃¯ ¯, (≥  .)♯ = ∃≥  ¯ (︀ (, ¯) ∧ ¯♯︀) ,</p>
      <p>♯ ♯
where ¯= , ¯=  and {, } = var.</p>
      <p>
        The complexities of the satisfiability problems for the logics in question are as follows [
        <xref ref-type="bibr" rid="ref4 ref5">4, 5</xref>
        ]:
• FO2, C2, and ℒℐ are all NExpTime-complete;
• ℒ, ℒ, ℒℐ, and ℒℐ are all ExpTime-complete.
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Deciding Separation</title>
      <p>Our main results are summarised in the next theorem:
Theorem 1. The separation and Craig separation problems are
• undecidable for the pairs C2/FO2 and ℒℐ/ℒℐ,
• 2ExpTime-complete for the pairs ℒℐ/ℒℐ and ℒ/ℒ.</p>
      <p>
        The proof of Theorem 1 is based on the following straightforward model-theoretic characterisation
of separation in terms of bisimulations; see [
        <xref ref-type="bibr" rid="ref6 ref7 ref8">6, 7, 8</xref>
        ] and references therein:
Lemma 2. Let  () and  () be any C2( )-formulas,  ⊆  , and let  be any of the languages
introduced in Section 2. Then the following conditions are equivalent:
•  () and  () do not have an ()-separator;
• there are pointed  -structures A,  and B,  such that
      </p>
      <p>A |=  (),</p>
      <p>B |=  (),</p>
      <p>A,  ∼ () B, .</p>
      <p>For Craig separation, we additionally require that  ⊆ sig ( ) ∩ sig ( ).</p>
      <p>
        Here, A,  ∼ () B,  means that there is an ()-bisimulation  between A and B such that
(, ) ∈  , which implies that A |= () if B |= (), for all ()-formulas () [
        <xref ref-type="bibr" rid="ref5 ref6 ref9">6, 9, 5</xref>
        ]. The
proof of the characterisation in Lemma 2 is standard and similar to the characterisations of Craig
interpolant nonexistence in [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. The undecidability proofs are by reduction of the halting problem
for 2-register machines where the numbers in the registers are represented by the number of
()bisimilar nodes. The decidability proofs are based on novel adaptations of the mosaic technique
for constructing ()-bisimilar models [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. Preliminary detailed proofs are available at https:
//www.csc.liv.ac.uk/~frank/publ/publ.html.
      </p>
    </sec>
    <sec id="sec-4">
      <title>4. Related Work</title>
      <p>
        With the exception of separating modal  -calculus formulas by plain modal formulas [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], separability
has so far been mainly investigated for formal languages [
        <xref ref-type="bibr" rid="ref11 ref12">11, 12, 13</xref>
        ]. In contrast, definability has been
investigated for many logics. For example, the problem of deciding whether a TBox given in a DL 
can be equivalently expressed in another DL ′ is considered in [14], the problem of deciding whether
a guarded fragment (GF) formula or guarded negation fragment (GNF) formula is equivalent to an
existential (or positive existential) GF formula or, respectively, GNF formula is considered in [15, 16],
and there are many results on deciding whether fixpoints can be dropped from a second-order extension
of a fragment of FO. Interestingly, the complexity of separation and definability of modal  -calculus
formulas by plain modal formulas are both ExpTime-complete [
        <xref ref-type="bibr" rid="ref10">17, 10</xref>
        ]. Variants of definability explored
in description logic are approximation [18] and conservative rewritability [19].
      </p>
      <p>
        Craig separators are a generalisation of Craig interpolants where  = . If the logic  has the
Craig interpolation property (CIP), then the Craig separator existence problem for  and  reduces to
checking whether  |=  and is thus not harder than entailment. Only recently the problem of deciding
the existence of Craig interpolants has been considered for logics without the CIP [20, 21]. In fact, the
bisimulation-based method employed here makes heavy use of techniques introduced for checking
Craig interpolant existence [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ].
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion</title>
      <p>We have started investigating the separation problem for fragments of FO with counting by formulas
in the same fragments but without counting. Many problems remain to be addressed; we mention a few
of them below:
1. Our decidability proofs are non-constructive, and it would be of interest to develop algorithms
that construct separators whenever they exist and determine bounds on their size.
2. With the exception of ℒ, the logics with counting we considered do not have the finite
model property. It would be of interest to investigate whether our results also hold on finite
structures. In that case, the bisimulation criterion does not hold as formulated (because its proof
uses compactness) and one has to employ a diferent criterion that holds on finite structures (say,
bounded bisimulations).
3. Our logics have the universal role. We conjecture that without the universal role
ℒ/ℒand ℒℐ/ℒℐ-separation becomes coNExpTime-complete.
4. Is definability less complex than separation for the pairs of languages considered here. For
example, is C2/FO2-definability decidable?
[13] T. Place, Separating regular languages with two quantifier alternations, Log. Methods Comput.</p>
      <p>Sci. 14 (2018). URL: https://doi.org/10.23638/LMCS-14(4:16)2018. doi:10.23638/LMCS-14(4:16)
2018.
[14] C. Lutz, R. Piro, F. Wolter, Description Logic TBoxes: Model-Theoretic Characterizations and</p>
      <p>Rewritability, in: IJCAI, 2011, pp. 983–988.
[15] M. Benedikt, B. ten Cate, M. Vanden Boom, Efective interpolation and preservation in guarded
logics, ACM Trans. Comput. Log. 17 (2016) 8. URL: https://doi.org/10.1145/2814570. doi:10.1145/
2814570.
[16] V. Bárány, M. Benedikt, B. ten Cate, Some model theory of guarded negation, J. Symb. Log. 83
(2018) 1307–1344.
[17] M. Otto, Eliminating recursion in the  -calculus, in: C. Meinel, S. Tison (Eds.), STACS 99, 16th
Annual Symposium on Theoretical Aspects of Computer Science, Trier, Germany, March 4-6, 1999,
Proceedings, volume 1563 of Lecture Notes in Computer Science, Springer, 1999, pp. 531–540. URL:
https://doi.org/10.1007/3-540-49116-3_50. doi:10.1007/3-540-49116-3\_50.
[18] A. Bötcher, C. Lutz, F. Wolter, Ontology approximation in Horn description logics, in: Proceedings
of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao,
China, August 10-16, 2019, 2019, pp. 1574–1580. URL: https://doi.org/10.24963/ijcai.2019/218.
doi:10.24963/IJCAI.2019/218.
[19] B. Konev, C. Lutz, F. Wolter, M. Zakharyaschev, Conservative rewritability of description
logic TBoxes, in: Proceedings of the Twenty-Fifth International Joint Conference on
Artificial Intelligence, IJCAI 2016, New York, NY, USA, 9-15 July 2016, 2016, pp. 1153–1159. URL:
http://www.ijcai.org/Abstract/16/167.
[20] A. Kurucz, F. Wolter, M. Zakharyaschev, Definitions and (uniform) interpolants in first-order
modal logic, in: Proceedings of the 20th International Conference on Principles of Knowledge
Representation and Reasoning, KR 2023, Rhodes, Greece, September 2-8, 2023, 2023, pp. 417–428.</p>
      <p>URL: https://doi.org/10.24963/kr.2023/41. doi:10.24963/KR.2023/41.
[21] A. Kurucz, F. Wolter, M. Zakharyaschev, A non-uniform view of Craig interpolation in modal logics
with linear frames, CoRR abs/2312.05929 (2023). URL: https://doi.org/10.48550/arXiv.2312.05929.
doi:10.48550/ARXIV.2312.05929. arXiv:2312.05929.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Jung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lutz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Pulcini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <article-title>Logical separability of labeled data examples under ontologies</article-title>
          ,
          <source>Artif. Intell</source>
          .
          <volume>313</volume>
          (
          <year>2022</year>
          )
          <article-title>103785</article-title>
          . URL: https://doi.org/10.1016/j.artint.
          <year>2022</year>
          .
          <volume>103785</volume>
          . doi:
          <volume>10</volume>
          . 1016/J.ARTINT.
          <year>2022</year>
          .
          <volume>103785</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>T.</given-names>
            <surname>Place</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zeitoun</surname>
          </string-name>
          ,
          <article-title>Separating regular languages with first-order logic</article-title>
          ,
          <source>Log. Methods Comput. Sci</source>
          .
          <volume>12</volume>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>W.</given-names>
            <surname>Craig</surname>
          </string-name>
          ,
          <article-title>Three uses of the Herbrand-Gentzen theorem in relating model theory and proof theory</article-title>
          ,
          <source>J. Symb. Log</source>
          .
          <volume>22</volume>
          (
          <year>1957</year>
          )
          <fpage>269</fpage>
          -
          <lpage>285</lpage>
          . doi:
          <volume>10</volume>
          .2307/2963594.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>F.</given-names>
            <surname>Baader</surname>
          </string-name>
          , I. Horrocks,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lutz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Sattler</surname>
          </string-name>
          , An Introduction to Description Logic, Cambridge University Press,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>I.</given-names>
            <surname>Pratt-Hartmann</surname>
          </string-name>
          ,
          <source>Fragments of First-Order Logic, Oxford Logic Guides</source>
          , Oxford University Press, United Kingdom,
          <year>2023</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>V.</given-names>
            <surname>Goranko</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Otto</surname>
          </string-name>
          ,
          <article-title>Model theory of modal logic</article-title>
          , in: Handbook of Modal Logic, Elsevier,
          <year>2007</year>
          , pp.
          <fpage>249</fpage>
          -
          <lpage>329</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Jung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <article-title>Living without Beth and Craig: Definitions and interpolants in the guarded and two-variable fragments</article-title>
          ,
          <source>in: Proceedings of the 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS</source>
          <year>2021</year>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>14</lpage>
          . URL: https://doi.org/10.1109/LICS52264.
          <year>2021</year>
          .
          <volume>9470585</volume>
          . doi:
          <volume>10</volume>
          .1109/LICS52264.
          <year>2021</year>
          .
          <volume>9470585</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>A.</given-names>
            <surname>Artale</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Jung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mazzullo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ozaki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wolter</surname>
          </string-name>
          ,
          <article-title>Living without Beth and Craig: Definitions and interpolants in description and modal logics with nominals and role inclusions</article-title>
          ,
          <source>ACM Trans. Comput. Log</source>
          .
          <volume>24</volume>
          (
          <year>2023</year>
          )
          <volume>34</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>34</lpage>
          :
          <fpage>51</fpage>
          . URL: https://doi.org/10.1145/3597301. doi:
          <volume>10</volume>
          .1145/3597301.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>E.</given-names>
            <surname>Grädel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Otto</surname>
          </string-name>
          ,
          <article-title>The freedoms of (guarded) bisimulation</article-title>
          ,
          <source>in: Johan van Benthem on Logic and Information Dynamics</source>
          , Springer International Publishing,
          <year>2014</year>
          , pp.
          <fpage>3</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>J. C.</given-names>
            <surname>Jung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kolodziejski</surname>
          </string-name>
          ,
          <article-title>Modal separability of fixpoint formulae</article-title>
          ,
          <source>in: Proceedings of the 37th International Workshop on Description Logics, CEUR Workshop Proceedings, CEUR-WS.org</source>
          ,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Place</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zeitoun</surname>
          </string-name>
          ,
          <article-title>The tale of the quantifier alternation hierarchy of first-order logic over words</article-title>
          ,
          <source>ACM SIGLOG News</source>
          <volume>2</volume>
          (
          <year>2015</year>
          )
          <fpage>4</fpage>
          -
          <lpage>17</lpage>
          . URL: https://doi.org/10.1145/2815493.2815495. doi:
          <volume>10</volume>
          .1145/ 2815493.2815495.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bojanczyk</surname>
          </string-name>
          ,
          <article-title>It is undecidable if two regular tree languages can be separated by a deterministic tree-walking automaton</article-title>
          ,
          <source>Fundam. Informaticae</source>
          <volume>154</volume>
          (
          <year>2017</year>
          )
          <fpage>37</fpage>
          -
          <lpage>46</lpage>
          . URL: https://doi.org/10.3233/ FI-2017-1551. doi:
          <volume>10</volume>
          .3233/FI-2017-1551.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>