Skip to main content
Log in

Resolution-based rewriting for Horn-\(\mathcal {SHIQ}\) ontologies

  • Regular Paper
  • Published:
Knowledge and Information Systems Aims and scope Submit manuscript

Abstract

An important approach to query answering over description logic (DL) ontologies is via rewriting the input ontology and query into languages such as (disjunctive) datalog, for which scalable data saturation systems exist. This approach has been studied for DLs of different expressivities such as DL-Lite, \(\mathcal {ELHI}\) and Horn-\(\mathcal {SHIQ}\). When it comes to expressive languages resolution is an important technique that can be applied to obtain the rewritings. This is mainly because it allows for the design of general-purpose algorithms that can be easily lifted to support languages of high expressivity. In the current work we present an efficient resolution-based rewriting algorithm tailor-made for the expressive DL language Horn-\(\mathcal {SHIQ}\). Our algorithm avoids performing many unnecessary inferences, which is one of the main problems of resolution-based algorithms. This is achieved by careful analysis of the complex axioms structure supported in Horn-\(\mathcal {SHIQ}\). Moreover, we have implemented the proposed algorithm and obtained very encouraging results when conducting extensive experimental evaluation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Notes

  1. http://www.image.ece.ntua.gr/~achort/rapid/.

  2. http://www.cs.ox.ac.uk/isg/ontologies/lib/LUBM/univ-bench.owl/.

  3. https://bioportal.bioontology.org/ontologies/SWEET.

  4. http://www.cs.man.ac.uk/~stevensr/ontology.

  5. http://www.loa.istc.cnr.it/old/DOLCE.html.

  6. http://www.cs.ox.ac.uk/isg/tools/UOBMGenerator/.

  7. https://bioportal.bioontology.org/ontologies/PROPREO.

References

  1. Artale A, Calvanese D, Kontchakov R, Zakharyaschev M (2009) The DL-Lite family and relations. J Artif Intell Res 36:1–69

    Article  MathSciNet  Google Scholar 

  2. Baader F, McGuinness DL, Nardi D, Patel-Schneider PF (2002) The description logic handbook: theory, implementation and applications. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  3. Bachmair L, Ganzinger H (1998) Strict basic superposition. In: Proceedings of automated deduction, Springer, pp 160–174

  4. Bachmair L, Ganzinger H (2001) Resolution theorem proving. Handbook of automated reasoning. Elsevier, USA, pp 19–99

    Book  Google Scholar 

  5. Bachmair L, Ganzinger H, Lynch C, Snyder W (1995) Basic paramodulation. Inf Comput 121(2):172–192

    Article  MathSciNet  Google Scholar 

  6. Bienvenu M (2012) On the complexity of consistent query answering in the presence of simple ontologies. In: Proceedings of the twenty-sixth conference on artificial intelligence

  7. Bienvenu M, Lutz C, Wolter F (2013) First-order rewritability of atomic queries in horn description logics. In: Proceedings of the twenty-third international joint conference on artificial intelligence

  8. Bishop B, Kiryakov A, Ognyanoff D, Peikov I, Tashev Z, Velkov R (2011) Owlim: a family of scalable semantic repositories. Semant Web 2(1):33–42

    Article  Google Scholar 

  9. Calvanese D, De Giacomo G, Lembo D, Lenzerini M, Rosati R (2006) Data complexity of query answering in description logics. In: Proceedings of the tenth international conference on principles of knowledge representation and reasoning, pp 260–270

  10. Calvanese D, De Giacomo G, Lembo D, Lenzerini M, Rosati R (2007) Tractable reasoning and efficient query answering in description logics: the DL-lite family. J Autom Reason 39(3):385–429

    Article  MathSciNet  Google Scholar 

  11. Chaussecourte P, Glimm B, Horrocks I, Motik B, Pierre L (2013) The energy management adviser at EDF. In: Proceedings of the twelth international semantic web conference

  12. Chortaras A, Trivela D, Stamou G (2011) Optimized query rewriting in OWL 2 QL. In: Proceedings of the of twenty-third international conference on automated deduction, pp 192–206

  13. Cuenca Grau B, Stoilos G (2011) What to ask to an incomplete semantic web reasoner?. In: Proceedings of the twenty-second international joint conference on artificial intelligence, AAAI Press, pp 2226–2231

  14. Eiter T, Ortiz M, Simkus M, Tran T-K, Xiao G (2012) Query rewriting for Horn-\(\cal{SHIQ}\) plus rules. In: Proceedings of the twenty-sixth conference on artificial intelligence

  15. Fermüller CG, Leitsch A, Hustadt U, Tammet T (2001) Resolution decision procedures, handbook of automated reasoning. Elsevier Science Publishers BV, Amsterdam, pp 1791–1849

    Book  Google Scholar 

  16. Fitting M (1996) First-order logic and automated reasoning. Graduate texts in computer science, 2nd edn. Springer, Berlin

    Google Scholar 

  17. Glimm B, Kazakov Y, Liebig T, Tran T-K, Vialard V (2014) Abstraction refinement for ontology materialization. In: International semantic web conference, Springer, pp 180–195

  18. Gottlob G, Schwentick T (2012) Rewriting ontological queries into small nonrecursive datalog programs. In: Proceedings of the thirteenth international conference on principles of knowledge representation and reasoning

  19. Green C (1969) Theorem proving by resolution as a basis for question-answering systems. Mach Intell 4:183–205

    MATH  Google Scholar 

  20. Hustadt U, Motik B, Sattler U (2007) Reasoning in description logics by a reduction to disjunctive datalog. J Autom Reason 39(3):351–384

    Article  MathSciNet  Google Scholar 

  21. Hustadt U, Schmidt RA (2000) Issues of decidability for description logics in the framework of resolution. In: Proceedings automated deduction in classical and non-classical logics, Springer, pp 191–205

  22. Kazakov Y (2009) Consequence-driven reasoning for horn \({\cal{SHIQ}}\) ontologies. In: Proceedings of the twenty-first international joint conference on artificial intelligence, pp 2040–2045

  23. Kikot S, Kontchakov R, Zakharyaschev M (2011) On (in) tractability of OBDA with OWL 2 QL. In: Proceedings of the twenty-fourth international workshop on description logics

  24. Kiryakov A, Bishoa B, Ognyanoff D, Peikov I, Tashev Z, Velkov R (2010) The features of bigowlim that enabled the bbc world cup website. In: Proceedings workshop on semantic data management

  25. Kontchakov R, Lutz C, Toman D, Wolter F, Zakharyaschev M (2011) The combined approach to ontology-based data access. In: Twenty-second international joint conference on artificial intelligence, vol 11, pp 2656–2661

  26. Lembo D, Lenzerini M, Rosati R, Ruzzi M, Savo DF (2011) Query rewriting for inconsistent dl-lite ontologies. In: Proceedings of the fifth international conference on web reasoning and rule systems, pp 155–169

    Chapter  Google Scholar 

  27. Lloyd JW (1984) Foundations of logic programming. Springer, New York

    Book  Google Scholar 

  28. Lutz C, Toman D, Wolter F (2009) Conjunctive query answering in the description logic el using a relational database system. In: Twenty-first international joint conference on artificial intelligence, vol 9, pp 2070–2075

  29. Rodriguez-Muro RK, Zakharyaschev M (2013) Query rewriting and optimisation with database dependencies in ontop. In: Proceedings of the twenty-sixth international workshop on description logics, pp 917–929

  30. Mora J, Rosati R, Corcho Ó (2014) kyrie2: query rewriting under extensional constraints in \(\cal{ELHIO}\). In: Proceedings of the thirteenth international semantic web conference, pp 568–583

  31. Motik B (2005) Description logics and disjunctive datalog—more than just a fleeting resemblance?. In: Proceedings of the 4th workshop on methods for modalities, vol 194, pp 246–265

  32. Motik B, Grau BC, Horrocks I, Wu Z, Fokoue A, Lutz C et al (2009) Owl 2 web ontology language profiles. W3C Recomm 27:61

    Google Scholar 

  33. Motik B, Horrocks I, Kim SM (2012) Delta-reasoner: a semantic web reasoner for an intelligent mobile platform. In: Proceedings of the twenty-first international conference on world wide web, pp 63–72

  34. Orsi G, Pieris A (2011) Optimizing query answering under ontological constraints. J Very Large Data Base Endow 4(11):1004–1015

    Google Scholar 

  35. Ortiz M, Calvanese D, Eiter T (2008) Data complexity of query answering in expressive description logics via tableaux. J Autom Reason 41(1):61–98

    Article  MathSciNet  Google Scholar 

  36. Pérez-Urbina H, Motik B, Horrocks I (2010) Tractable query answering and rewriting under description logic constraints. J Appl Log 8(2):186–209

    Article  MathSciNet  Google Scholar 

  37. Ricca F (2003) The dlv java wrapper. In: Joint conference on declarative programming, pp 263–274

  38. Rodriguez-Muro M, Calvanese D (2012) High performance query answering over DL-Lite ontologies. In: Proceedings of the thirteenth international conference on principles of knowledge representation and reasoning

  39. Rosati R, Almatelli A (2010) Improving query answering over DL-Lite ontologies. In: Proceedings of the twelfth international conference on principles of knowledge representation and reasoning

  40. Simancik F, Kazakov Y, Horrocks I (2011) Consequence-based reasoning beyond horn ontologies. In: Proceedings of the twenty-second international joint conference on artificial intelligence, pp 1093–1098

  41. Trivela D, Stoilos G, Chortaras A, Stamou G (2015) Optimising resolution-based rewriting algorithms for owl ontologies. J Web Seman 33:30–49

    Article  Google Scholar 

  42. Urbani J, Kotoulas S, Maassen J, Van Harmelen F, Bal H (2012) Webpie: a web-scale parallel inference engine using mapreduce. Web Semant Sci Serv Agents World Wide Web 10:59–75

    Article  Google Scholar 

  43. Venetis T, Stoilos G, Stamou G (2014) Query extensions and incremental query rewriting for OWL 2 QL ontologies. J Data Semant 3:1–23

    Article  Google Scholar 

  44. Wandelt S, Möller R (2012) Towards abox modularization of semi-expressive description logics. Appl Ontol 7(2):133–167

    Article  Google Scholar 

  45. Wu Z, Eadon G, Das S, Chong EI, Kolovski V, Annamalai M, Srinivasan J (2008) Implementing an inference engine for rdfs/owl constructs and user-defined rules in oracle. In: IEEE twenty-forth international conference on data engineering, IEEE, pp 1239–1248

  46. Xu J, Shironoshita P, Visser U, John N, Kabuka M (2015) Module extraction for efficient object queries over ontologies with large aboxes. Artif Intell Appl 2(1):8

    Google Scholar 

Download references

Acknowledgements

Large part of this work was done when Despoina Trivela and Giorgos Stoilos were members of the National Technical University of Athens.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Despoina Trivela.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Inferences performed by \(\Gamma _{\text {H} {\mathcal {S}}}\)

Table 10 presents the types of inferences performed by \(\Gamma _{\text {H} {\mathcal {S}}}\) on Horn-\(\mathcal {SHIQ}\) clauses. In the following, we examine the inferences that performed by \(\Gamma _{\text {H} {\mathcal {S}}}\) that use ground clauses of types 7.1, 7.2, 8. Note that clauses of types 7.1, 7.2 can participate in the side premise position of a resolution inference. A side premise of type 7.2 must have an empty body, and hence it is of the form A(a); this is because by the definition of the resolution inference the head atoms of the side premises must be strictly eligible for superposition. Moreover, a clause of type 8 can participate in the side premise position of a superposition inference and must be of the form \(g(a)\approx b\leftarrow A(a)\), or \(a\approx b\); this is because by definition of the positive superposition the head atom of the side premise must be strictly eligible for superposition. We examine the inferences that can be performed with ground side premises with respect to the different types of the main premise:

Table 10 Inferences by \(\Gamma _{\text {H} {\mathcal {S}}}\) on Horn-\(\mathcal {SHIQ}\) clauses with equality; inverse roles are omitted
  • type 1: a function symbol in the head of type 1 can only result from a previous unification step and hence, by the definition of basic superposition, superposition with a clause \(f(a)\approx b\leftarrow A(a)\) is not performed. Moreover, superposition with a clause \(a\approx b\) implies that the main premise of type 1 is a ground unit clause. Resolution with main premise of the form \(Q(\vec {s})\leftarrow \bigwedge _i D_i(\vec {s_i})\), where \(\vec {s}_{(i)}\) does not contain functions, and side premise of type 7.1, 7.2 results in a clause of type 1 that is either ground, or it contains constants and can only resolve with a ground clause. For example, consider that a query \({\mathcal {Q}}\) of the form \(Q(\vec {s})\leftarrow R(x,y)\wedge A(x)\wedge P(x,z)\) resolves with R(ab) to obtain \({\mathcal {Q}}'\), \(Q(\vec {s})\sigma \leftarrow (A(a)\wedge P(a,z))\sigma \), where \(\sigma \) is an mgu for R(xy), R(ab). Obviously, \({\mathcal {Q}}'\) contains constants as well as variables and can only resolve with some ground clause.

  • types 2.1, 2.2, 2.3: clauses of the form \(R(x,f(x))\leftarrow B(x), R(f(x),x)\leftarrow B(x), A(f(x))\leftarrow B(x)\) where f(x) has not been introduced by unification, and hence are included in \({\mathcal {T}}\), participate in a superposition inference with type 8, of the form \(f(a)\approx b\leftarrow C(a)\) to obtain a ground clause of type 7.1, or 7.2.

  • types 3.1, 3.2: they resolve with 7.1 to obtain a ground clause of type 7.1.

  • type 3.3: a clause of the form \(A(x)\leftarrow B(x)\) resolves with 7.2 to obtain a ground 7.2 clause.

  • type 4.1, 4.2: the role atom is always selected and it resolves with some clause 7.1 to obtain a ground of type 7.2.

  • type 5: a clause of the form \(y\approx z\leftarrow A(x)\wedge R(x,y)\wedge R(x,z)\wedge B(y)\wedge B(z)\) resolves with type 7.1 of the form \(R(a,b)\leftarrow C(a)\wedge D(b)\) to produce a clause of type 6.3 \(a\approx z\leftarrow \mathbf{A }(a)\wedge R(a,z)\wedge \mathbf{B }(b)\wedge B(z)\) that contains constants and can only resolve with a type 7.1.

  • types 6.1 or 6.2: clauses of the form \(f(x)\approx g(x)\leftarrow A(x)\), or \(f(g(x))\approx x\leftarrow A(x)\) do not participate in the main premise position of a superposition inference since the functional terms f(x), g(x) or f(g(x)) have been introduced within a unification step. Moreover, they cannot participate in a resolution inference since the head is maximal and hence none of the body atoms is selected.

  • type 6.3: a clause of the form \(f(x)\approx x\leftarrow A(x)\wedge R(x,z)\wedge B(z)\), or \(b\approx z\leftarrow A(a)\wedge R(a,x)\wedge B(z)\) resolves with 7.1, \(R(a,b)\leftarrow A(a)\wedge B(b)\) to obtain a type 8 of the form \(f(a)\approx b\leftarrow A(a)\wedge B(b)\), or \(a\approx b\leftarrow A(a)\wedge B(b)\).

  • types 7.1, 7.2: a clause of the form \(B(a)\leftarrow A(a)\wedge C(b)\) resolves with 7.2 of the form A(a) to obtain a type 7.2. A clause of the form \(R(a,b)\leftarrow A(a)\wedge D(b)\) does not participate in the main premise position (R(ab) is strictly maximal).

  • type 8: a clause of the form \(a\approx b\leftarrow A(a)\wedge B(b)\) resolves with a type 7.2 clause A(a) to obtain a type 8, \(a \approx b\leftarrow B(b)\). A clause of the form \(f(a)\approx b\leftarrow \mathbf{A }(a)\) cannot participate in the main premise position of a resolution inference since the head atom is maximal.

Proofs for the optimised calculus \(\Gamma _{\text {RH} {\mathcal {S}}}\)

Lemma B.1

Let \({\mathcal {T}}\) be a Horn-\(\mathcal {SHIQ}\) TBox. Consider a superposition inference \({\mathcal {C}}_1, \Upsilon \vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {C}}\). Every clause \({\mathcal {C}}'\) with a function-free body that is derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with \({\mathcal {C}}\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\)

Proof

By the definition of \(\Gamma _{\text {H} {\mathcal {S}}}\) clause \({\mathcal {C}}_1\) is of type 2.1, 2.2 or 2.3 included in \({\mathcal {T}}\), and clause \(\Upsilon \) is of type 6.1, 6.2 with a function-free body. Moreover, \({\mathcal {C}}\) is of type 2.1 or 2.2 of the form \(R(x,f(x))\leftarrow A(x)\wedge [B(f(x))]\), or of type 2.3 of the form \(A(f(x))\leftarrow B(x)\), or of type 3.3 of the form \(A(x)\leftarrow \wedge B(x)\wedge [C(f(x))]\). In case \({\mathcal {K}}\) is of type 6.1, then \({\mathcal {C}}\) has a function-free body and \({\mathcal {C}}'\) coincides with \({\mathcal {C}}\). We show the claim via induction. Assume that at some point every \({\mathcal {C}}'\) with a function-free body derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with some clause \({\mathcal {C}}\) obtained by a superposition inference \({\mathcal {C}}_1, \Upsilon \vdash {\mathcal {C}}\), is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) (IH1). We assume that at some point a new clause \({\mathcal {C}}'\) can be derived by a derivation that starts with a superposition inference by \(\Gamma _{\text {H} {\mathcal {S}}}\), \({\mathcal {C}}_1, \Upsilon \vdash {\mathcal {C}}\). According to Table 10 clauses of types 6.1, 6.2 can only derive from a type 6.3 clause, and a clause of type 6.3 can only derive from a type 5 clause. To simplify our proof we first show the following claims:

Claim 1

Every type 3.3 clause derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with an \(\mathcal {EL}\)-clause, \({\mathcal {A}}\) is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) starting with \({\mathcal {A}}\).

Claim 2

Every type 6.3 clause \({\mathcal {F}}\) derivable form \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with a clause \({\mathcal {L}}\) of type 5 is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) starting with \({\mathcal {L}}\).

Claim 3

Every type 6.1 and 6.2 clause \(\Upsilon \) derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with \({\mathcal {F}}\) of type 6.3 is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) starting with \({\mathcal {F}}\).

Proof of Claim 1

We show the claim via induction. Assume that at some point all 3.3 clauses derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with an \(\mathcal {EL}\)-clause are also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) (IH2). Assume that a new 3.3 clause \({\mathcal {E}}\) is derived in some part of the derivation that is starting with \({\mathcal {A}}\). We show only the case that \({\mathcal {A}}\) is of the form \(A(x)\leftarrow R(x,y)\wedge \mathbf{D }(y)\), i.e. of type 4.1; for \({\mathcal {A}}\) of type 4.2 the proof is similar. \(\square \)

According to Table 10 clause \({\mathcal {E}}\) of type 3.3 can be produced by inferences of the form \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {E}}\) where \({\mathcal {E}}_1\) and \({\mathcal {D}}_1\) have one of the following forms:

  1. 1.

    Clause \({\mathcal {E}}_1\) is of type 4.1, and clause \({\mathcal {D}}_1\) is of type 2.1; the case where \({\mathcal {E}}_1\) is of type 4.2 and \({\mathcal {D}}_1\) is of type 2.2 is similar. Since \(\Gamma _{\text {H} {\mathcal {S}}}\) never produces clauses of type 4.1, \({\mathcal {E}}_1\in {\mathcal {T}}\). In contrast, \({\mathcal {D}}_1\) is produced either by a superposition inference and hence by IH1 it can be obtained by \(\Gamma _{\mathsf {ESLD} }\), or by an inference of the form \({\mathcal {J}}_1,{\mathcal {D}}_2\vdash {\mathcal {D}}_1\), where either \({\mathcal {J}}_1\) is of type 3.1 and \({\mathcal {D}}_2\) is again of type 2.1, or \({\mathcal {J}}_1\) is of type 2.2 of the form \(R(f(x),x)\leftarrow A(x)\wedge B(f(x))\) and \({\mathcal {D}}_2\) is of type 2.3. In the latter case \({\mathcal {J}}_1\) is obtained by superposing a type 6.2 clause into a type 2.1 and by IH1 \({\mathcal {D}}_1\) can be derived by \(\Gamma _{\mathsf {ESLD} }\). Consequently, we investigate the former case, that is if \({\mathcal {J}}_1\) is of type 3.1, then \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {E}}\) can be unfolded into the inferences \({\mathcal {E}}_1,{\mathcal {J}}_1\vdash {\mathcal {E}}_2\) and \({\mathcal {E}}_2,{\mathcal {D}}_2\vdash {\mathcal {E}}\). Clauses of type 3.1 are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\); hence, \({\mathcal {J}}_1\in {\mathcal {T}}\), while \({\mathcal {D}}_2\) (again of type 2.1) is of lower derivation depth. By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {E}}_1,\ldots ,{\mathcal {E}}_n,{\mathcal {E}}\) where \({\mathcal {E}}_i,{\mathcal {J}}_i\vdash {\mathcal {E}}_{i+1}\), all \({\mathcal {E}}_i\) are of type 4.1, \({\mathcal {E}}_i\in {\mathcal {T}}\), all \({\mathcal {J}}_i\) are of type 3.1 (or 3.2) also in \({\mathcal {T}}\) and \({\mathcal {E}}\) is derived by some \({\mathcal {E}}_n,{\mathcal {D}}_n\vdash {\mathcal {E}}\), where \({\mathcal {D}}_n\) is of type 2.1 (or 2.2) and again in \({\mathcal {T}}\) or obtained by superposition inference and hence derivable by \(\Gamma _{\mathsf {ESLD} }\) (IH1). Consequently, \({\mathcal {E}}\) is derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\).

  2. 2.

    Clause \({\mathcal {E}}_1\) is of type 3.3 of the form \(A(x)\leftarrow B(x)\wedge C(f(x))\) and clause \({\mathcal {D}}_1\) is of type 2.3 of the form \(C(f(x))\leftarrow D(x)\). Since \({\mathcal {E}}\) is derived by a sequence starting with \({\mathcal {A}}\), so does \({\mathcal {E}}_1\) and hence by IH2 \({\mathcal {E}}_1\) is derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\). Now, we turn our attention to \({\mathcal {D}}_1\). By a second induction we can show that if \({\mathcal {D}}_1\) is derivable by inferences over other clauses, then \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {E}}\) can either be unfolded using these clauses which are of lower derivation depth or \({\mathcal {D}}_1\) is derivable by \(\Gamma _{\mathsf {ESLD} }\).

    Clause \({\mathcal {D}}_1\) can be produced by inferences of the form \({\mathcal {K}},{\mathcal {G}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {D}}_1\), where \({\mathcal {K}}\) and \({\mathcal {G}}\) have one of the following forms:

    1. (a)

      \({\mathcal {K}}\) is of type 2.3, included in \({\mathcal {T}}\), and \({\mathcal {G}}\) is of type 6.1; thus, \({\mathcal {D}}_1\) is obtained by superposition and by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\).

    2. (b)

      \({\mathcal {K}}\) is of type 4.1 (4.2), and \({\mathcal {G}}\) is of type 2.2 (2.1). We show only the case 4.1+2.2. \({\mathcal {K}}\) is of the form \(A(x)\leftarrow R(x,y)\wedge [\mathbf{C }(y)]\). First, assume that \({\mathcal {K}}\) contains the conjunct C(y). Then, inference \({\mathcal {K}}, {\mathcal {G}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {D}}_1\) corresponds to an inference by the function-rule, and moreover, recall that since \({\mathcal {K}}\) is of type 4.1 we have \({\mathcal {K}}\in {\mathcal {T}}\). Consequently, if additionally \({\mathcal {G}}\) is obtained by superposition and hence by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\), or \({\mathcal {G}}\in {\mathcal {T}}\), then \({\mathcal {D}}_1\) can be derived by \(\Gamma _{\mathsf {ESLD} }\) as required. Furthermore, \({\mathcal {G}}\) can be produced by an inference between a clause \({\mathcal {J}}_1\) of type 2.2(2.1) of the form \(R(f(x),x)\leftarrow A(x)\wedge B(f(x))\) and a clause of type 2.3, \(B(f(x))\leftarrow C(x)\). In this case, \({\mathcal {J}}_1\) is obtained by superposition with clauses of types 2.1, 6.2 and hence by IH1 \({\mathcal {G}}\) can be derived by \(\Gamma _{\mathsf {ESLD} }\). In contrast, \({\mathcal {G}}\) can be produced by an inference between a clause \({\mathcal {J}}_1\) of type 3.1(3.2) and a clause \({\mathcal {G}}_1\) of type 2.2(2.1). Then, the inference \({\mathcal {K}},{\mathcal {G}}\vdash {\mathcal {D}}_1\) can be unfolded into \({\mathcal {K}},{\mathcal {J}}_1\vdash {\mathcal {K}}_1\) and \({\mathcal {K}}_1,{\mathcal {G}}_1\vdash {\mathcal {D}}_1\). Furthermore, we have \({\mathcal {J}}_1\in {\mathcal {T}}\) since such clauses are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\) and hence \({\mathcal {K}}_1\) can be derived by \(\Gamma _{\mathsf {SLD} }\) from \({\mathcal {K}}\). This can be done exhaustively until we reach a derivation of the form \({\mathcal {K}}_0,{\mathcal {K}}_1,\ldots ,{\mathcal {K}}_n,{\mathcal {D}}_1\) where for \(0\le i<n\) we have \({\mathcal {K}}_i,{\mathcal {J}}_{i+1}\vdash {\mathcal {K}}_{i+1}\), \({\mathcal {K}}_0={\mathcal {K}}\), all \({\mathcal {J}}_{i+1}\) are of type 3.1, and \({\mathcal {K}}_n,{\mathcal {G}}_n\vdash {\mathcal {D}}_1\) for some \({\mathcal {G}}_n\) included in \({\mathcal {T}}\), or that has been produced by superposition, and hence by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\). Since all \({\mathcal {J}}_i\) are of type 3.1 and \({\mathcal {K}}_0\in {\mathcal {T}}\), then \({\mathcal {K}}_n\) is derivable by \(\Gamma _{\mathsf {ESLD} }\).

      In case that \({\mathcal {K}}\) is of the form \(A(x)\leftarrow R(x,y)\), then the inference \({\mathcal {K}}, {\mathcal {G}}\vdash {\mathcal {D}}_1\) can be used to unfold the inference \({\mathcal {E}}_1, {\mathcal {D}}_1\vdash {\mathcal {E}}\) into \({\mathcal {E}}_1, {\mathcal {K}}\vdash {\mathcal {E}}'\), \({\mathcal {E}}', {\mathcal {G}}\vdash {\mathcal {E}}\) where \({\mathcal {G}}, {\mathcal {K}}\) are derivable at lower derivation depths.

    3. (c)

      \({\mathcal {K}}\) is of type 3.3 of the form \(C(x)\leftarrow \mathbf{B }(x)\) and \({\mathcal {G}}\) is of type 2.3, \(B(f(x))\leftarrow D(x)\). In this case the inference \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {E}}\) can be unfolded into \({\mathcal {E}}_1,{\mathcal {K}}\vdash {\mathcal {E}}'\) and \({\mathcal {E}}',{\mathcal {G}}\vdash {\mathcal {E}}\) and \({\mathcal {K}}\) and \({\mathcal {G}}\) obviously have smaller derivation depths.

    4. (d)

      Both \({\mathcal {K}}\) and \({\mathcal {G}}\) are of type 2.3. Then, inference \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {E}}\) can be unfolded into inferences of the form \({\mathcal {E}}_1,{\mathcal {K}}\vdash {\mathcal {E}}'\), \({\mathcal {E}}',{\mathcal {G}}\vdash {\mathcal {E}}\) where \({\mathcal {K}}\) and \({\mathcal {G}}\) are derivable at lower depths.

  3. 3.

    Clause \({\mathcal {E}}_1\) is of type 3.3 of the form \(A(x)\leftarrow B(x)\wedge C(f(x))\), and clause \({\mathcal {D}}_1\) is of type 3.3 of the form \(C(x)\leftarrow \mathbf{D }(x)\). Since \({\mathcal {E}}\) is derived by a sequence starting with \({\mathcal {A}}\), so does \({\mathcal {E}}_1\) and hence by IH2 \({\mathcal {E}}_1\) is derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\). Now, we turn our attention to \({\mathcal {D}}_1\). By a second induction we can show that if \({\mathcal {D}}_1\) is derivable by inferences over other clauses, then \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {E}}\) can either be unfolded using these clauses which are of lower derivation depth or \({\mathcal {D}}_1\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). Clause \({\mathcal {D}}_1\) can be produced by inferences of the form \({\mathcal {K}},{\mathcal {G}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {D}}_1\), where \({\mathcal {K}}\) and \({\mathcal {G}}\) have one of the following forms:

    1. (a)

      \({\mathcal {K}}\) is of type 4.1 (or 4.2) of the form \(C(x)\leftarrow R(x,y)\), and \({\mathcal {G}}\) is of type 2.1 (2.2) of the form \(R(x,f(x))\leftarrow D(x)\). Since clause \({\mathcal {K}}\) is in \({\mathcal {T}}\) if additionally \({\mathcal {G}}\) is in \({\mathcal {T}}\) we can show that \({\mathcal {D}}_1\) is derivable by \(\Gamma _{\mathsf {ESLD} }\) as required. If \({\mathcal {G}}\) is obtained by superposition, or by an inference with clauses of types 3.3, 2.1 similarly as in the previous Case 2 we can show that \({\mathcal {G}}\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). Consequently, \({\mathcal {D}}_1\) can be derived by \(\Gamma _{\mathsf {ESLD} }\).

    2. (b)

      \({\mathcal {K}}\) is of type 3.3 of the form \(C(x)\leftarrow D(x)\wedge B(f(x))\) and \({\mathcal {G}}\) is of the form \(B(f(x))\leftarrow K(x)\). Clause \({\mathcal {K}}\) is either obtained by a superposition inference with clauses of types 2.3, 6.2, and hence by IH2 \({\mathcal {K}}\) is derivable by \(\Gamma _{\mathsf {ESLD} }\), or by a resolution inference on a \(\mathcal {EL}\)-clause of type 4.1 (4.2) with a type 2.1 (2.2), and hence derivable by \(\Gamma _{\mathsf {ESLD} }\) according to IH1. Moreover, \({\mathcal {G}}\) is either in \({\mathcal {T}}\) or obtained by superposition with types 2.3, 6.1 and according to IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\).

Proof of Claim 2

We show Claim 2 by induction. We show only the case that \({\mathcal {L}}\) is of the form \(y\approx z\leftarrow \mathbf{A }(x)\leftarrow R(x,y)\wedge R(x,z) \wedge B(z)\); for \({\mathcal {L}}\) with inverse role the proof is similar.

Base case: Let \({\mathcal {L}}, {\mathcal {D}}\vdash {\mathcal {F}}_1\). Since type 5 clauses are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\)\({\mathcal {L}}\) is in \({\mathcal {T}}\). According to Table 10\({\mathcal {D}}\) is of type 2.1, or 2.2. We examine different cases for the derivation of \({\mathcal {D}}\):

  1. 1.

    \({\mathcal {D}}\) is obtained by a superposition inference with a type 6.1 clause. By IH1 it is produced by \(\Gamma _{\mathsf {ESLD} }\).

  2. 2.

    \({\mathcal {D}}\) is produced by an inference of the form \({\mathcal {D}}_1,{\mathcal {J}}_1\vdash {\mathcal {D}}\), where \({\mathcal {D}}_1\) is of type 2.1(2.2), \(R(x,f(x))\leftarrow A(x)\wedge B(f(x))\) and \({\mathcal {J}}_1\) is of type 2.3, \(B(f(x))\leftarrow C(x)\). Clause \({\mathcal {D}}_1\) can only be obtained by a superposition inference with a type 6.2 clause and hence by IH1 \({\mathcal {D}}\) is derivable by \(\Gamma _{\mathsf {ESLD} }\) as required.

  3. 3.

    \({\mathcal {D}}\) is produced by an inference of the form \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\), where \({\mathcal {E}}_1\) is of type 3.1(3.2) and \({\mathcal {D}}_1\) is again of type 2.1 (2.2). Consequently, \(\Upsilon ,{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {F}}_1\) can be unfolded into the inferences \(\Upsilon ,{\mathcal {E}}_1\vdash \Upsilon _2\) and \(\Upsilon _2,{\mathcal {D}}_1\vdash {\mathcal {F}}_1\). Clauses of type 3.1 are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\), hence \({\mathcal {E}}_1\in {\mathcal {T}}\), while \({\mathcal {D}}_2\) (again of type 2.1) is of lower derivation depth. By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \(\Upsilon _1,\ldots ,\Upsilon _n,{\mathcal {F}}_1\) where \(\Upsilon _i,{\mathcal {E}}_i\vdash \Upsilon _{i+1}\), \(\Upsilon _1=\Upsilon \) and all \(\Upsilon _i\) are of type 5, all \({\mathcal {E}}_i\) are of type 3.1 (or 3.2) in \({\mathcal {T}}\) and \({\mathcal {F}}_1\) is obtained by \(\Upsilon _n,{\mathcal {D}}_n\vdash {\mathcal {F}}_1\), where \({\mathcal {D}}_n\) is of type 2.1 (or 2.2). Clause \({\mathcal {D}}_n\) is either in \({\mathcal {T}}\) or obtained by superposition, and by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\).

Consequently, \({\mathcal {F}}_1\) can derive from \({\mathcal {L}}\) by \(\Gamma _{\mathsf {ESLD} }\). \(\square \)

Induction step: Assume that for \(1\le i\le n\) all type 6.3 clauses \({\mathcal {F}}_i\) derivable by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting from \({\mathcal {L}}\) are also derivable by \(\Gamma _{\mathsf {ESLD} }\) (IH3). Assume that a new clause \({\mathcal {F}}\) of type 6.3 is produced next by \(\Gamma _{\text {H} {\mathcal {S}}}\) by some inference \({\mathcal {F}}_n, {\mathcal {N}}\vdash {\mathcal {F}}\). According to Table 10 clause \({\mathcal {F}}_n\) is of type 6.3 and by IH2 it is obtained by \(\Gamma _{\mathsf {ESLD} }\); moreover, clause \({\mathcal {N}}\) is of type 2.3 of the form \(A(f(x))\leftarrow B(x)\), with a function-free body. We study different cases for \({\mathcal {N}}\):

  1. 1.

    \({\mathcal {N}}\) is obtained by a superposition inference. By IH1 it is produced by \(\Gamma _{\mathsf {ESLD} }\).

  2. 2.

    \({\mathcal {N}}\) is obtained by an inference on clauses of type 4.1 (4.2) and 2.2 (2.1). We show that \({\mathcal {N}}\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). The proof is similar to Case 2b of Claim 2.

  3. 3.

    \({\mathcal {N}}\) is produced by an inference of the form \({\mathcal {K}},{\mathcal {G}}\vdash {\mathcal {N}}\), where \({\mathcal {K}}\) is of type 3.3 of the form \(C(x)\leftarrow \mathbf{B }(x)\) and \({\mathcal {G}}\) is of type 2.3, \(B(f(x))\leftarrow D(x)\). In this case the inference \({\mathcal {F}}_n,{\mathcal {N}}\vdash {\mathcal {F}}\) can be unfolded into \({\mathcal {F}}_n,{\mathcal {K}}\vdash {\mathcal {F}}'\) and \({\mathcal {F}}'_n,{\mathcal {G}}\vdash {\mathcal {F}}\). By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {F}}_i,\ldots ,{\mathcal {F}}_{i+k},{\mathcal {F}}\) where \({\mathcal {F}}_j,{\mathcal {E}}_j\vdash {\mathcal {F}}_{j+1}\) are of type 6.3, all \({\mathcal {E}}_j\) are of type 3.3 included in \({\mathcal {T}}\), or by Claim 1 they are derivable by \(\Gamma _{\mathsf {ESLD} }\), and \({\mathcal {F}}\) is derived by some \({\mathcal {F}}_{i+k},{\mathcal {N}}_{i+k}\vdash {\mathcal {F}}\), where \({\mathcal {N}}_{i+k}\) is of type 2.3 of lower derivation depth.

  4. 4.

    \({\mathcal {N}}\) is produced by an inference of the form \({\mathcal {K}},{\mathcal {G}}\vdash {\mathcal {N}}\), where both \({\mathcal {K}}\) and \({\mathcal {G}}\) are of type 2.3. Then, inference \({\mathcal {F}}_n,{\mathcal {N}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {F}}\) can be unfolded into inferences of the form \({\mathcal {F}}_n,{\mathcal {K}}\vdash {\mathcal {F}}'_n\), \({\mathcal {F}}'_n,{\mathcal {G}}\vdash {\mathcal {F}}'\) where \({\mathcal {K}}\) and \({\mathcal {G}}\) are derivable at lower depths.

Consequently, \({\mathcal {F}}\) of type 6.3 is also derivable from \({\mathcal {L}}\) by \(\Gamma _{\mathsf {ESLD} }\).

Proof of Claim 3

Again we use induction.

Base case: Let \({\mathcal {F}},{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} \Upsilon _1\). We distinguish different cases:

  1. 1.

    Clause \({\mathcal {F}}\) is the form \(f(z)\approx z\leftarrow \mathbf{A }(x)\wedge R(x,z)\wedge B(z)\), and \({\mathcal {D}}\) is type 2.1 of the form \(R(x,g(x))\leftarrow \mathbf{C }(x)\). In this case \(\Upsilon _1\) is of type 6.1. Clause \({\mathcal {D}}\) can either be produced by superposition inference, and by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\), or it is produced by an inference of the form \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\), where \({\mathcal {E}}_1\) is of type 3.1 (3.2) let \(R(x,y)\leftarrow S(x,y)\) and \({\mathcal {D}}_1\) is again of type 2.1 (2.2), respectively, let \(S(x,g(x))\leftarrow C(x)\). Clearly, \({\mathcal {F}},{\mathcal {D}}_1\vdash ^{\Gamma _{\mathsf {REQ} }}{\mathcal {D}}\) can be unfolded into the inferences \({\mathcal {F}},{\mathcal {E}}_1\vdash {\mathcal {F}}_1\) and \({\mathcal {F}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\). Clauses of type 3.1 are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\); hence, \({\mathcal {E}}_1\in {\mathcal {T}}\), while \({\mathcal {D}}_1\) (again of type 2.1) is of lower derivation depth. By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {F}}_1,\ldots ,{\mathcal {F}}_n,{\mathcal {C}}\) where \({\mathcal {F}}_i,{\mathcal {E}}_i\vdash {\mathcal {F}}_{i+1}\), all \({\mathcal {F}}_i\) are of type 6.3 (and hence are obtained by \(\Gamma _{\mathsf {ESLD} }\) Claim 2), all \({\mathcal {E}}_i\) are of type 3.1 (or 3.2) also in \({\mathcal {T}}\) and \({\mathcal {C}}\) is derived by some \({\mathcal {F}}_n,{\mathcal {D}}_n\vdash {\mathcal {C}}\), where \({\mathcal {D}}_n\) is of type 2.1 (or 2.2) and again in \({\mathcal {T}}\) or derived by using superposition; hence, by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\). We conclude that \(\Upsilon _1\) is derivable by \(\Gamma _{\mathsf {ESLD} }\).

  2. 2.

    Clause \({\mathcal {F}}\) is of the form \(f(z)\approx z\leftarrow \mathbf{A }(x)\wedge R(x,z)\wedge B(z)\) and \({\mathcal {D}}\) is type 2.2 of the form \(R(g(x),x)\leftarrow \mathbf{C }(x)\). In this case \(\Upsilon _1\) is of type 6.2. Clause \({\mathcal {D}}\) can either be produced by superposition inference and by IH1 it has been obtained by \(\Gamma _{\mathsf {ESLD} }\), or \({\mathcal {D}}_1\) is produced by an inference of the form \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\), where \({\mathcal {E}}_1\) is of type 3.1 (or 3.2), let \(R(x,y)\leftarrow S(x,y)\) and \({\mathcal {D}}_1\) is again of type 2.2, (2.1), let \(S(g(x),x)\leftarrow C(x)\). Clearly, \({\mathcal {F}},{\mathcal {D}}_1\vdash ^{\Gamma _{\mathsf {REQ} }}{\mathcal {D}}\) can be unfolded into the inferences \({\mathcal {F}},{\mathcal {E}}_1\vdash {\mathcal {F}}_1\) and \({\mathcal {F}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\). Clauses of type 3.1 are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\); hence, \({\mathcal {E}}_1\in {\mathcal {T}}\), while \({\mathcal {D}}_1\) (again of type 2.1) is of lower derivation depth. By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {F}}_1,\ldots ,{\mathcal {F}}_n,{\mathcal {C}}\) where \({\mathcal {F}}_i,{\mathcal {E}}_i\vdash {\mathcal {F}}_{i+1}\), all \({\mathcal {F}}_i\) are of type 6.3 and hence are obtained by \(\Gamma _{\mathsf {ESLD} }\) (Claim 2), all \({\mathcal {E}}_i\) are of type 3.1 (or 3.2) also in \({\mathcal {T}}\) and \({\mathcal {C}}\) is derived by some \({\mathcal {F}}_n,{\mathcal {D}}_n\vdash {\mathcal {C}}\), where \({\mathcal {D}}_n\) is of type 2.1 (or 2.2) and again in \({\mathcal {T}}\) or obtained by \(\Gamma _{\mathsf {ESLD} }\) using superposition. We conclude that \(\Upsilon _1\) is derivable by \(\Gamma _{\mathsf {ESLD} }\).

  3. 3.

    Clause \({\mathcal {F}}_1\) is of type 6.3 of the form \(x\approx z\leftarrow \mathbf{A }(f(x))\wedge R(f(x),z)\wedge B(x)\wedge C(z)\) and \({\mathcal {D}}_1\) is type 2.1 of the form \(R(x,g(x))\leftarrow \mathbf{C }(x)\). The proof is similar to the previous case.

Assume that at some point all 6.1 and 6.2 clauses \(\Upsilon _i\) derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with \({\mathcal {F}}\) of type 6.3 are also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) starting with \({\mathcal {F}}\) (IH4). We assume that a new 6.1, or 6.2 clause \(\Upsilon \) is produced in some part of the derivation that is starting with \({\mathcal {F}}\). According to Table 10 such clauses can be produced by inferences of the form \(\Upsilon _n,{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} \Upsilon \) that can have one of the following types:

  1. 1.

    Clause \(\Upsilon _n\) of type 6.2 of the form \(g(f(x))\approx x\leftarrow A(f(x))\wedge B(x)\wedge C(g(f(x)))\), or of the form \(g(f(x))\approx x\leftarrow C(f(x))\wedge B(x)\), or of type 6.1 of the form \(g(x)\approx f(x)\leftarrow C(f(x))\wedge B(x)\). Clause \({\mathcal {D}}\) is of type 2.3 of the form \(C(g(x))\leftarrow K(x)\). The proof is similar in all cases. Clause \({\mathcal {D}}\) is obtained in one of the following cases:

    1. (a)

      \({\mathcal {D}}\) is produced by superposition inference with a clause of type 2.3 in \({\mathcal {T}}\) and a type 6.1 clause and hence by IH1 it is derivable by \(\Gamma _{\mathsf {ESLD} }\),

    2. (b)

      \({\mathcal {D}}\) is obtained by an inference \({\mathcal {J}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\), where \({\mathcal {J}}_1\) is of type 4.1 (4.2) and \({\mathcal {D}}_1\) is of type 2.2 (2.1). \({\mathcal {J}}_1\) is in \({\mathcal {T}}\) since \(\Gamma _{\text {H} {\mathcal {S}}}\) never produces type 4.1 clauses. \({\mathcal {D}}_1\) can be produced by an inference of the form \({\mathcal {E}}_2,{\mathcal {D}}_2\vdash {\mathcal {D}}_1\), where \({\mathcal {E}}_2\) is of type 3.1, or 3.2 and \({\mathcal {D}}_2\) is again of type 2.2, 2.1, respectively. Clearly, \({\mathcal {J}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\) can be unfolded into the inferences \({\mathcal {J}}_1,{\mathcal {E}}_2\vdash {\mathcal {J}}_2\) and \({\mathcal {J}}_2,{\mathcal {D}}_2\vdash {\mathcal {D}}\). Clauses of type 3.1 are never produced by \(\Gamma _{\text {H} {\mathcal {S}}}\); hence, \({\mathcal {J}}_1\in {\mathcal {T}}\), while \({\mathcal {D}}_1\) (again of type 2.1) is of lower derivation depth. Again, we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {J}}_1,\ldots ,{\mathcal {J}}_n,{\mathcal {D}}\) where \({\mathcal {J}}_i,{\mathcal {E}}_i\vdash {\mathcal {J}}_{i+1}\), all \({\mathcal {J}}_i\) are of type 4.1 (and hence are obtained by \(\Gamma _{\mathsf {ESLD} }\)), all \({\mathcal {E}}_i\) are of type 3.1 (or 3.2) also in \({\mathcal {T}}\) and \({\mathcal {D}}\) is derived by some \({\mathcal {F}}_n,{\mathcal {D}}_n\vdash {\mathcal {C}}\), where \({\mathcal {D}}_n\) is of type 2.1 and it is in \({\mathcal {T}}\), or it is obtained by superposition and hence derivable by \(\Gamma _{\mathsf {ESLD} }\) by IH1.

    3. (c)

      \({\mathcal {D}}\) is produced by an inference of the form \({\mathcal {E}}_1,{\mathcal {D}}_1\vdash {\mathcal {D}}\), where \({\mathcal {E}}_1\) is of type 3.3, let \(C(x)\leftarrow \mathbf{B }(x)\) and \({\mathcal {D}}_1\) is again of type 2.3, let \(B(g(x))\leftarrow K(x)\). Clearly, \({\mathcal {K}}_n,{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {K}}\) can be unfolded into the inferences \({\mathcal {K}}_n,{\mathcal {E}}_1\vdash {\mathcal {K}}'\) and \({\mathcal {K}}',{\mathcal {D}}_1\vdash {\mathcal {K}}\). By a straightforward inductive claim we can show that we can exhaustively unfold these inferences until we have a derivation of the form \({\mathcal {K}}_n,\ldots ,{\mathcal {K}}_{n+k},{\mathcal {D}}\) where \({\mathcal {K}}_i,{\mathcal {E}}_i\vdash {\mathcal {K}}_{i+1}\), all \({\mathcal {K}}_i\) are of type 6.3 derivable by \(\Gamma _{\mathsf {ESLD} }\), all \({\mathcal {E}}_i\) are of type 3.3 and are either in \({\mathcal {T}}\), or derivable by \(\Gamma _{\mathsf {ESLD} }\) according to Claim 1, and \({\mathcal {K}}\) is obtained by some \({\mathcal {K}}_{n+k},{\mathcal {D}}_n\vdash {\mathcal {K}}\), where \({\mathcal {D}}_n\) is in \({\mathcal {T}}\), or obtained by superposition and hence it can be obtained by \(\Gamma _{\mathsf {ESLD} }\) .

    4. (d)

      \({\mathcal {D}}\) is produced by an inference of the form \({\mathcal {E}},{\mathcal {G}}\vdash {\mathcal {D}}\), where both \({\mathcal {E}}\) and \({\mathcal {G}}\) are of type 2.3. Then, inference \({\mathcal {K}}_n,{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}}{\mathcal {K}}\) can be unfolded into inferences of the form \({\mathcal {K}}_n,{\mathcal {E}}\vdash {\mathcal {K}}'_n\), \({\mathcal {K}}'_n,{\mathcal {G}}\vdash {\mathcal {K}}\) where \({\mathcal {E}}\) and \({\mathcal {G}}\) are derivable at lower depths.

We conclude that every type 6.1, 6.2 clause \(\Upsilon \) derivable by \(\Gamma _{\text {H} {\mathcal {S}}}\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\) from \({\mathcal {T}}\).

Let us now consider the superposition inference \({\mathcal {C}}_1, \Upsilon \vdash {\mathcal {C}}\). According to Claim 2 the side premise \(\Upsilon \) is derivable by \(\Gamma _{\mathsf {ESLD} }\). Moreover, by the definition of basic superposition \({\mathcal {C}}_1\) is in \({\mathcal {T}}\). We conclude that \({\mathcal {C}}\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). If \(\Upsilon \) is of type 6.1 then \({\mathcal {C}}\) has a function-free body and hence \({\mathcal {C}}'\) coincides with \({\mathcal {C}}\). It remains to examine the case where \(\Upsilon \) is of type 6.2 and \({\mathcal {C}}\) contains functionals in its body.

According to \(\Gamma _{\text {H} {\mathcal {S}}}\) clause \({\mathcal {C}}'\) is obtained by an inference \({\mathcal {C}},{\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {C}}'\) where \({\mathcal {D}}\) is of type 2.3 of the form \(B(f(x))\leftarrow D(x)\). If \({\mathcal {D}}\) is in \({\mathcal {T}}\), then \({\mathcal {C}}'\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\). If \({\mathcal {D}}\) is produced by superposition with a type 6.1 clause, it holds by Claim 2 that it can be obtained by \(\Gamma _{\mathsf {ESLD} }\), and again \({\mathcal {C}}'\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\). If \({\mathcal {D}}\) is produced by inferences on other clauses that is \({\mathcal {F}}, {\mathcal {G}}\vdash {\mathcal {D}}\), then we show that either \({\mathcal {C}}, {\mathcal {D}}\vdash {\mathcal {C}}'\) can be unfolded into \({\mathcal {C}}, {\mathcal {F}}\vdash {\mathcal {C}}_1,\)\({\mathcal {C}}_1, {\mathcal {G}}\vdash {\mathcal {C}}'\), or \({\mathcal {C}}'\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). In the following we examine different cases for \({\mathcal {F}}, {\mathcal {G}}\):

  1. 1.

    \({\mathcal {F}}\) is a type 4.1, or 4.2 clause, and \({\mathcal {G}}\) is a type 2.2, or 2.1 clause. We have already shown that \({\mathcal {C}}'\) is derivable by \(\Gamma _{\mathsf {ESLD} }\) in the proof of Lemma B.1, Claim 1, Case 2b.

  2. 2.

    \({\mathcal {F}}\) is of type 3.3 of the form \(B(x)\leftarrow \mathbf{C }(x)\) and \({\mathcal {G}}\) is of type 2.3 of the form \(C(f(x))\leftarrow D(x)\) and clearly, the inference \({\mathcal {C}}, {\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {C}}'\) can be unfolded into a sequence \({\mathcal {C}}, {\mathcal {F}}\vdash {\mathcal {C}}_1, {\mathcal {C}}_1, {\mathcal {G}}\vdash {\mathcal {C}}'\). We can exhaustively unfold the inferences until we have a derivation of the form \({\mathcal {C}}_1,\ldots ,{\mathcal {C}}_n,{\mathcal {C}}'\) where \({\mathcal {C}}_i,{\mathcal {F}}_i\vdash {\mathcal {C}}_{i+1}\), all \({\mathcal {C}}_i\) are of type 2.1, or 2.2, all \({\mathcal {F}}_i\) are of type 3.3 in \({\mathcal {T}}\) or derivable by \(\Gamma _{\mathsf {ESLD} }\) according to Claim 1. \({\mathcal {C}}'\) is derived by some \({\mathcal {C}}_n,{\mathcal {D}}_n\vdash {\mathcal {C}}\), where \({\mathcal {D}}_n\) is of type 2.1 and it is in \({\mathcal {T}}\), or it is obtained by superposition and hence derivable by \(\Gamma _{\mathsf {ESLD} }\) by IH1.

  3. 3.

    \({\mathcal {F}}\) is of type 2.3 of the form \(B(f(x))\leftarrow K(x)\wedge C(f(x))\), and \({\mathcal {G}}\) is of type 2.3 of the form \(C(f(x))\leftarrow D(x)\). The inference \({\mathcal {C}}, {\mathcal {D}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {C}}'\) can be unfolded into a sequence \({\mathcal {C}}, {\mathcal {F}}\vdash {\mathcal {C}}_1, {\mathcal {C}}', {\mathcal {G}}\vdash {\mathcal {C}}'\).

We conclude that \({\mathcal {C}}'\) is derivable by \(\Gamma _{\mathsf {ESLD} }\). \(\square \)

Lemma B.2

Let \({\mathcal {T}}\) be a Horn-\(\mathcal {SHIQ}\) TBox and \({\mathcal {Q}}\) a CQ. Every type 1 clause derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with \({\mathcal {Q}}\) is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\) starting with \({\mathcal {Q}}\).

Proof

A clause \({\mathcal {Q}}\) of type 1 that is included in \({\mathcal {T}}\) is function-free by the definition of CQs. Therefore, the basic superposition inference is never applied on a type 1 clause.

Assume that at some point every type 1 clause \({\mathcal {Q}}_i\) derivable by \(\Gamma _{\text {H} {\mathcal {S}}}\) starting with \({\mathcal {Q}}\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\). Let \({\mathcal {Q}}_i, {\mathcal {C}}\vdash ^{\Gamma _{\text {H} {\mathcal {S}}}} {\mathcal {Q}}_{i+1}\), according to Table 10\({\mathcal {Q}}_{i+1}\) is also of type 1, and \({\mathcal {C}}\) is of type 2.1, 2.2, or 2.3 with a function-free body. We are only interested in the case where the derivation of \({\mathcal {C}}\) involves a superposition inference. In any other case the proof is the same as the one presented in [41] for \(\mathcal {ELHI}\). (Lemma 3. Note that \(\Gamma _{\text {H} {\mathcal {S}}}\) calculus coincides with \(\Gamma _{\mathsf {REQ} }\) for the \(\mathcal {ELHI}\) fragment of Horn-\(\mathcal {SHIQ}\).) By Lemma B.1 it follows that if the derivation of \({\mathcal {C}}\) involves a superposition inference, then \({\mathcal {C}}\) is also derivable by \(\Gamma _{\mathsf {ESLD} }\). \(\square \)

In the following definition we extend the notion of a function-compact derivation presented in [41] to consider clauses with equality that can contain functional terms in their head (Table 11).

Definition B.1

Let \(\Sigma \) be a set of Horn clauses and \(\Upsilon _1, \ldots , \Upsilon _n\) a derivation by \(\Gamma _{\mathsf {SLD} }\) where \(\Upsilon _i, {\mathcal {C}}_i\vdash \Upsilon _{i+1}\) and \({\mathcal {C}}_i\in \Sigma \) for \(1\le i\le n\). Assume that all \(\Upsilon _i, 2\le i\le n-1\) contain a term of the form \(f(s_i)\) and of the same depth in their body and that \(\Upsilon _1, \Upsilon _n\) are function-free, or clauses with equality that have a function-free body. The derivation is function-compact if all the side premises \({\mathcal {C}}_i\) also contain a term of the form \(f(x_i)\).

Proposition B.1

Let \({\mathcal {T}}\) be a Horn-\(\mathcal {SHIQ}\) TBox and \({\mathcal {Q}}\) a CQ query. Any extended-SLD derivation from \({\mathcal {T}}\cup {\mathcal {Q}}\) by \(\Gamma _{\mathsf {ESLD} }\) is produced by using as side premises clauses that have function symbols only in the head.

Proof

By Definition 4.2\(\Gamma _{\mathsf {ESLD} }\) uses as side premises either clauses with a function-free body that are included in \({\mathcal {T}}\), or they have produced by the function-rule, which by Definition 4.1 contain function symbols only in the head, or they have been produced by a superposition inference, or clauses of type 3.3 that are function-free. \(\square \)

We recall Lemma 2 presented in [41].

Table 11 Inferences by \(\Gamma _{\text {H} {\mathcal {S}}}\) on Horn-\(\mathcal {SHIQ}\) clauses without equality

Lemma

[41] Any derivation built by inferences that have as side premises Horn clauses that can contain terms with function symbols only in the head can be transformed into one that is function-compact.

Theorem 3 Let \({\mathcal {T}}\) be a TBox in Horn-\(\mathcal {SHIQ}\), \({\mathcal {Q}}\) be a CQ, and an ABox \({\mathcal {A}}\). Every derivation from \({\mathcal {T}}\cup {\mathcal {Q}}\) by \(\Gamma _{\text {RH} {\mathcal {S}}}\) terminates. Moreover, \(\mathsf {DD} (\mathsf {R} \text{- }{\mathsf {Hshiq} }({\mathcal {Q}},{\mathcal {T}})\cup {\mathcal {A}})\) is a rewriting of \({\mathcal {Q}}\), \({\mathcal {T}}\).

Proof

Let \(\mathfrak {R}=\mathsf {DD} (\mathsf {R} \text{- }{\mathsf {Hshiq} }({\mathcal {Q}},{\mathcal {T}})\cup {\mathcal {A}})\). We show correctness. We need to show that \(\mathsf {cert} ({\mathcal {Q}},{\mathcal {T}}\cup {\mathcal {A}})=\mathsf {cert} ({\mathcal {Q}},\mathfrak {R}\cup {\mathcal {A}})\). Since \(\Gamma _{\text {RH} {\mathcal {S}}}\) is a resolution-based calculus it holds \(\mathsf {cert} ({\mathcal {Q}},{\mathcal {T}}\cup {\mathcal {A}})\supseteq \mathsf {cert} ({\mathcal {Q}}, \mathfrak {R}\cup {\mathcal {A}})\). To show that \(\mathsf {cert} ({\mathcal {Q}},{\mathcal {T}}\cup {\mathcal {A}})\subseteq \mathsf {cert} ({\mathcal {Q}}, \mathfrak {R}\cup {\mathcal {A}})\) by Theorem 2 it suffices to show that every clause \(\Upsilon \) in \({\mathcal {S}}({\mathcal {T}}\cup \{{\mathcal {Q}}\})\) is also in \(\mathsf {R} \text{- }{\mathsf {Hshiq} }({\mathcal {Q}},{\mathcal {T}})\).

At first, we consider clauses of types 1, 6.1–6.3 in \({\mathcal {S}}({\mathcal {T}}\cup \{{\mathcal {Q}}\})\). By Lemma B.2 every \(\Upsilon \) of type 1 derivable from \({\mathcal {T}}\cup \{{\mathcal {Q}}\}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) is also derivable from \({\mathcal {T}}\cup \{{\mathcal {Q}}\}\) by \(\Gamma _{\mathsf {ESLD} }\). Moreover, by Claims 2,3 of Lemma B.1 every \(\Upsilon \) of type 6.1, 6.2 or 6.3 derivable from \({\mathcal {T}}\) by \(\Gamma _{\text {H} {\mathcal {S}}}\) is also derivable from \({\mathcal {T}}\) by \(\Gamma _{\mathsf {ESLD} }\). By Proposition B.1 the derivation of \(\Upsilon \) can be transformed into a function-compact one. Assume that all clauses \(\Upsilon _i\) of type 1 that are function-free derivable by \(\Gamma _{\mathsf {ESLD} }\) are also derivable by \(\Gamma _{\text {RH} {\mathcal {S}}}\). The proof is similar for \(\Upsilon _i\) of type 6.1, 6.2 or 6.3 with a function-free body. Note that clauses \(\Upsilon _i\) are included in \({\mathcal {S}}({\mathcal {T}}\cup \{{\mathcal {Q}}\})\). Assume a new type 1 function-free clause \(\Upsilon _{i+1}\) is produced. There are two cases:

  1. 1.

    \(\Upsilon _{i+1}\) is derived from some function-free \(\Upsilon _j\) of type 1 (type 6.3 with a function-free body if \(\Upsilon _{i+1}\) is of type 6.1, 6.2, and of type 5 if \(\Upsilon _{i+1}\) is of type 6.3) with \(j\le i\) and side premise some clause \({\mathcal {C}}_j\) (types 3.1–3.3) derivable by \(\Gamma _{\mathsf {ESLD} }\). Since both \(\Upsilon _j\) and \(\Upsilon _{i+1}\) are function-free this inference can be captured by the unfolding inference rule; hence, \(\Upsilon _j,{\mathcal {C}}_j\vdash ^{\Gamma _{\text {RH} {\mathcal {S}}}} \Upsilon _{i+1}\) and thus \(\Upsilon _{i+1}\in \mathfrak {R}\).

  2. 2.

    \(\Upsilon _{i+1}\) is derived from some \(\Upsilon _j\) by \(\Gamma _{\mathsf {ESLD} }\) with an extended-SLD derivation of the form \(\Upsilon _j,\Upsilon _{j+1},\ldots ,\Upsilon _{j+k}\) where \(\Upsilon _{j+k}=\Upsilon _{i+1}\), all intermediate clauses contain a term \(f(s_l)\) in some body atom, while also by function-compactness all side premises contain \(f(t_l)\) and are either of the form \(R_1(x,f(x))\leftarrow \mathbf{D }_1\), or \(R_1(f(x),x)\leftarrow \mathbf{D }_1, \ldots R_k(x,f(x))\leftarrow \mathbf{D }_k(x)\), or \( R_k(x,f(x))\leftarrow \mathbf{D }_k(x)\), or \(A_1(f(x))\leftarrow \mathbf{C }_1, \ldots A_k(f(x))\leftarrow \mathbf{C }_k\) (we have shown they are derivable by \(\Gamma _{\mathsf {ESLD} }\)), while the atoms of all intermediate clauses \(\Upsilon _{j+1},\ldots \Upsilon _{j+{k-1}}\) over which they resolve are of the form \(R_l(u_l,f(s_l))\), \(R_l(f(s_l),u_l)\), or \(A_l(f(s_l))\), for \(1< l \le k\). Moreover, since \(\Upsilon _j\) is function-free and \(\Upsilon _{j+1}\) mentions f, the atom of \(\Upsilon _j\) that resolves with \({\mathcal {C}}_j\) is of the form \(R_1(s,t)\) or \(A_1(t)\) and the mgu \(\sigma _1\) must contain a mapping of the form \(t\mapsto f(x)\) for t an ej-variable of \(\Upsilon _j\). Note that clause \(\Upsilon _j\) contains atoms \(R_l(u_l,v_l)\), \(A_l(u_l)\), \(1<l\le k\) such that \(R_l(u_l,v_l)\sigma _l= R_l(u_l,f(s_l))\) and \(A_l(u_l)\sigma _l=A_l(f(s_l))\), \(1\le l\le k\). Let \(S^1_1, \ldots , S^1_k\) denote the sets that contain all the role atoms \(R_l(u_l,v_l)\), \(1\le l\le k\) of \(\Upsilon _j\) and \(S^2_1, \ldots , S^2_k\) the sets that contain all the concept atoms \(A_l(u_l), 1\le l\le k\) of \(\Upsilon _j\). (Note that either can be empty.) Since there is an mgu for all intermediate extended-SLD inferences, there is also a simultaneous mgu for \(S^1_l\cup \{R_l(x,f(x))\}\) and \(S^2_l\cup \{A_l(f(x)\}\), \(1\le l\le k\) [16]. Moreover, as analysed above and by construction of the simultaneous mgu, this must contain a mapping of the form \(t\mapsto f(x)\) for t an ej-variable of \(\Upsilon _j\) (w.r.t. variable renaming). Consequently, there is an inference of the form \(\Upsilon _j,{\mathcal {C}}_1, \ldots , {\mathcal {C}}_n\vdash \Upsilon _{i+1}\) using the shrinking rule.

We also need to show that the side premises \({\mathcal {C}}_j\) derivable from \(\Gamma _{\mathsf {ESLD} }\) used to obtain clause \(\Upsilon _{i+1}\) are also derivable by \(\Gamma _{\text {RH} {\mathcal {S}}}\). If a side premise \({\mathcal {C}}\) derives from an \(\mathcal {EL}\)-clause then from Claim 1 of Lemma  B.1 and Proposition B.1 it follows that it can be obtained by unfolding and shrinking. Consider that the side premise \({\mathcal {C}}\) is obtained from inferences of the form \({\mathcal {I}}, {\mathcal {M}}\vdash {\mathcal {C}}_1, {\mathcal {C}}_1, {\mathcal {N}}_1\vdash {\mathcal {C}}_2,\ldots , {\mathcal {C}}_{n-1},{\mathcal {N}}_{n-1}\vdash {\mathcal {C}}_n\), where \({\mathcal {I}}, {\mathcal {M}}\vdash {\mathcal {C}}_1\) is a superposition inference. If \({\mathcal {M}}\) is of type 6.1, then from Lemma B.1 and Proposition B.1 it follows that the inference \({\mathcal {I}}, {\mathcal {M}}\vdash {\mathcal {C}}_1\) can be captured by the sup-1 rule and that \({\mathcal {C}}\) coincides with \({\mathcal {C}}_1\). If \({\mathcal {M}}\) is of type 6.2 then from the proof of Claim 2 Lemma B.1 and Proposition B.1 it follows that the inferences \({\mathcal {I}}, {\mathcal {M}}\vdash {\mathcal {C}}_1, {\mathcal {C}}_1, {\mathcal {N}}_1\vdash {\mathcal {C}}_2,\ldots , {\mathcal {C}}_{n-1},{\mathcal {N}}_{n-1}\vdash {\mathcal {C}}_n\) are captured by the sup-2 rule and \({\mathcal {C}}={\mathcal {C}}_n\). Finally, the proof is straightforward for the side premises that are in \({\mathcal {T}}\), or are obtained by the function-rule of \(\Gamma _{\mathsf {ESLD} }\).

Subsequently, we consider the remaining types of clauses included in \({\mathcal {S}}({\mathcal {T}}\cup \{{\mathcal {Q}}\})\) and show that they are produced by \(\Gamma _{\text {RH} {\mathcal {S}}}\). The clauses of type 3.3 included in \({\mathcal {S}}({\mathcal {T}}\cup {\mathcal {Q}})\) either appear in \({\mathcal {T}}\) or are derivable by unfolding and shrinking which follows by the proof of Claim 1 in Lemma B.1. The clauses of types 2.1–2.3 either appear in \({\mathcal {T}}\) or are derivable by superposition, and by Lemma B.1 it follows that they can be obtained by sup-1 or sup-2 rules. Finally, the clauses of type 4.1, 4.2 or 5 either appear in \({\mathcal {T}}\) or are derivable by unfolding. We conclude that clauses in \({\mathcal {S}}({\mathcal {T}}\cup \{{\mathcal {Q}}\})\) are also in \(\mathsf {R} \text{- }{\mathsf {Hshiq} }({\mathcal {Q}},{\mathcal {T}})\). \(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Trivela, D., Stoilos, G., Chortaras, A. et al. Resolution-based rewriting for Horn-\(\mathcal {SHIQ}\) ontologies. Knowl Inf Syst 62, 107–143 (2020). https://doi.org/10.1007/s10115-019-01345-2

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10115-019-01345-2

Keywords

Navigation