Advertisement

Journal of Automated Reasoning

, Volume 61, Issue 1–4, pp 455–484 | Cite as

Formalization of the Resolution Calculus for First-Order Logic

  • Anders Schlichtkrull
Article

Abstract

I present a formalization in Isabelle/HOL of the resolution calculus for first-order logic with formal soundness and completeness proofs. To prove the calculus sound, I use the substitution lemma, and to prove it complete, I use Herbrand interpretations and semantic trees. The correspondence between unsatisfiable sets of clauses and finite semantic trees is formalized in Herbrand’s theorem. I discuss the difficulties that I had formalizing proofs of the lifting lemma found in the literature, and I formalize a correct proof. The completeness proof is by induction on the size of a finite semantic tree. Throughout the paper I emphasize details that are often glossed over in paper proofs. I give a thorough overview of formalizations of first-order logic found in the literature. The formalization of resolution is part of the IsaFoL project, which is an effort to formalize logics in Isabelle/HOL.

Keywords

First-order logic Resolution Isabelle/HOL Herbrand’s theorem Soundness Completeness Semantic trees 

Notes

Acknowledgements

I would like to thank Jørgen Villadsen, Jasmin Christian Blanchette, and Dmitriy Traytel who supervised me in making the formalization. I would also like to thank Jørgen, Jasmin, John Bruntse Larsen, Andreas Halkjær From, and the anonymous referees for their valuable feedback on the paper.

References

  1. 1.
    Anderson, R., Bledsoe, W.W.: A linear format for resolution with merging and a new technique for establishing completeness. J. ACM 17(3), 525–534 (1970)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)CrossRefMATHGoogle Scholar
  3. 3.
    Becker, H., Blanchette, J.C., Waldmann, U., Wand, D.: Formalization of Knuth–Bendix orders for lambda-free higher-order terms. Archive of Formal Proofs (2016). http://isa-afp.org/entries/Lambda_Free_KBOs.shtml, Formal proof development
  4. 4.
    Ben-Ari, M.: Mathematical Logic for Computer Science, 3rd edn. Springer, New York (2012)CrossRefMATHGoogle Scholar
  5. 5.
    Berghofer, S.: First-order logic according to Fitting. Archive of Formal Proofs (2007). http://isa-afp.org/entries/FOL-Fitting.shtml, Formal proof development
  6. 6.
    Blanchette, J.C., Böhme, S., Paulson, L.C.: Extending Sledgehammer with SMT solvers. J. Autom. Reason. 51(1), 109–128 (2013)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Blanchette, J.C., Fleury, M., Weidenbach, C.: A verified SAT solver framework with learn, forget, restart, and incrementality. In: Olivetti, N., Tiwari, A. (eds.) IJCAR 2016, LNCS, vol. 9706, pp. 25–44. Springer, New York (2016)Google Scholar
  8. 8.
    Blanchette, J.C., Hölzl, J., Lochbihler, A., Panny, L., Popescu, A., Traytel, D.: Truly modular (co)datatypes for Isabelle/HOL. In: Klein, G., Gamboa, R. (eds.) ITP 2014, LNCS, vol. 8558, pp. 93–110. Springer, New York (2014)Google Scholar
  9. 9.
    Blanchette, J.C., Popescu, A., Traytel, D.: Abstract completeness. Archive of Formal Proofs (2014). http://isa-afp.org/entries/Abstract_Completeness.shtml, Formal proof development
  10. 10.
    Blanchette, J.C., Popescu, A., Traytel, D.: Foundational extensible corecursion: a proof assistant perspective. In: Fisher, K., Reppy, J. (eds.) ICFP’15, pp. 192–204. ACM (2015)Google Scholar
  11. 11.
    Blanchette, J.C., Popescu, A., Traytel, D.: Abstract soundness. Archive of Formal Proofs (2017). http://isa-afp.org/entries/Abstract_Soundness.shtml, Formal proof development
  12. 12.
    Blanchette, J.C., Popescu, A., Traytel, D.: Soundness and completeness proofs by coinductive methods. J. Autom. Reason. 58(1), 149–179 (2017)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Blanchette, J.C., Waldmann, U., Wand, D.: Formalization of recursive path orders for lambda-free higher-order terms. Archive of Formal Proofs (2016). http://isa-afp.org/entries/Lambda_Free_RPOs.shtml, Formal proof development
  14. 14.
    Braselmann, P., Koepke, P.: Gödel completeness theorem. Formaliz. Math. 13(1), 49–53 (2005)Google Scholar
  15. 15.
    Braselmann, P., Koepke, P.: A sequent calculus for first-order logic. Formaliz. Math. 13(1), 33–39 (2005)Google Scholar
  16. 16.
    Breitner, J.: Visual theorem proving with the Incredible Proof Machine. In: Blanchette, J.C., Merz, S. (eds.) ITP 2016, LNCS, vol. 9807, pp. 123–139. Springer, New York (2016)Google Scholar
  17. 17.
    Breitner, J., Lohner, D.: The meta theory of the Incredible Proof Machine. Archive of Formal Proofs (2016). http://isa-afp.org/entries/Incredible_Proof_Machine.shtml, Formal proof development
  18. 18.
    Bundy, A.: The use of explicit plans to guide inductive proofs. In: Lusk, E., Overbeek, R. (eds.) CADE-9, LNCS, vol. 310, pp. 111–120. Springer, New York (1988)Google Scholar
  19. 19.
    Chang, C.L., Lee, R.C.T.: Symbolic Logic and Mechanical Theorem Proving, 1st edn. Academic Press, Cambridge (1973)MATHGoogle Scholar
  20. 20.
    Coen, M., Slind, K., Krauss, A.: Theory unification. Isabelle. http://isabelle.in.tum.de/library/HOL/HOL-ex/Unification.html. Accessed 13 Dec 2017
  21. 21.
    Coen, M.D.: Interactive program derivation. Ph.D. thesis, University of Cambridge (1992). http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-272.html
  22. 22.
    Corbin, J., Bidoit, M.: A rehabilitation of Robinson’s unification algorithm. In: IFIP Congress, pp. 909–914 (1983)Google Scholar
  23. 23.
    Davis, J., Myreen, M.O.: The reflective Milawa theorem prover is sound (down to the machine code that runs it). J. Autom. Reason. (2015)Google Scholar
  24. 24.
    Ebbinghaus, H., Flum, J., Thomas, W.: Mathematical Logic, 2nd edn. Springer, New York (1994)CrossRefMATHGoogle Scholar
  25. 25.
    Fitting, M.: First-Order Logic and Automated Theorem Proving, 2nd edn. Springer, New York (1996). Second EditionCrossRefMATHGoogle Scholar
  26. 26.
    Gebhard, H.: Beweisplanung für die Beweise der Vollständigkeit verschiedener Resolutionskalküle in \(\rm \Omega \it \) MEGA. Master’s thesis, Saarland University (1999)Google Scholar
  27. 27.
    Goubault-Larrecq, J., Jouannaud, J.P.: The blossom of finite semantic trees. In: Voronkov, A., Weidenbach, C. (eds.) Programming Logics: Essays in Memory of Harald Ganzinger, LNCS, pp. 90–122. Springer, New York (2013)CrossRefGoogle Scholar
  28. 28.
    Harrison, J.: Formalizing basic first order model theory. In: Grundy, J., Newey, M. (eds.) TPHOL’s 1998, LNCS, vol. 1497, pp. 153–170. Springer, New York (1998)Google Scholar
  29. 29.
    Harrison, J.: Towards self-verification of HOL Light. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006, LNCS, vol. 4130, pp. 177–191. Springer, New York (2006)Google Scholar
  30. 30.
    Harrison, J.: Handbook of Practical Logic and Automated Reasoning. Cambridge University Press, Cambridge (2009)CrossRefMATHGoogle Scholar
  31. 31.
    Ilik, D.: Constructive completeness proofs and delimited control. Ph.D. thesis, École Polytechnique (2010). https://tel.archives-ouvertes.fr/tel-00529021/document
  32. 32.
    Ilik, D., Lee, G., Herbelin, H.: Kripke models for classical logic. Ann. Pure Appl. Log. 161(11), 1367–1378 (2010)MathSciNetCrossRefMATHGoogle Scholar
  33. 33.
    IsaFoL authors: IsaFoL: Isabelle Formalization of Logic. https://bitbucket.org/isafol/isafol. Accessed 13 Dec 2017
  34. 34.
    IsaFoR developers: An Isabelle/HOL formalization of rewriting for certified termination analysis. http://cl-informatik.uibk.ac.at/software/ceta/. Accessed 13 Dec 2017
  35. 35.
    Jensen, A.B., Schlichtkrull, A., Villadsen, J.: Verification of an LCF-style first-order prover with equality. In: Isabelle Workshop 2016 Associated with ITP 2016 (2016)Google Scholar
  36. 36.
    Jensen, A.B., Schlichtkrull, A., Villadsen, J.: First-order logic according to Harrison. Archive of Formal Proofs (2017). http://isa-afp.org/entries/FOL_Harrison.shtml, Formal proof development
  37. 37.
    Kohlhase, M.: Theorem prover museum – OMEGA theories – folders: propositional-logic, resolution, proof-theory, prop-res. https://github.com/theoremprover-museum/OMEGA/tree/master/theories. Accessed 13 Dec 2017
  38. 38.
    Krauss, A.: Partial and nested recursive function definitions in higher-order logic. J. Autom. Reason. 44(4), 303–336 (2010)MathSciNetCrossRefMATHGoogle Scholar
  39. 39.
    Kumar, R., Arthan, R., Myreen, M.O., Owens, S.: Self-formalisation of higher-order logic: semantics, soundness, and a verified implementation. J. Autom. Reason. 56(3), 221–259 (2016)MathSciNetCrossRefMATHGoogle Scholar
  40. 40.
    Lammich, P.: Efficient verified (UN)SAT certificate checking. In: de Moura, L. (ed.) CADE-26, LNCS, vol. 10395, pp. 237–254. Springer, New York (2017)Google Scholar
  41. 41.
    Lammich, P.: The GRAT tool chain. In: Gaspers, S., Walsh, T. (eds.) SAT 2017, LNCS, vol. 10491, pp. 457–463. Springer, New York (2017)Google Scholar
  42. 42.
    Leitsch, A.: On different concepts of resolution. Math. Log. Q. 35(1), 71–77 (1989)MathSciNetCrossRefMATHGoogle Scholar
  43. 43.
    Leitsch, A.: The Resolution Calculus. Springer, New York (1997)CrossRefMATHGoogle Scholar
  44. 44.
    Manna, Z., Waldinger, R.: Deductive synthesis of the unification algorithm. Sci. Comput. Program. 1(1), 5–48 (1981)MathSciNetCrossRefMATHGoogle Scholar
  45. 45.
    Margetson, J., Ridge, T.: Completeness theorem. Archive of Formal Proofs (2004). http://isa-afp.org/entries/Completeness.shtml, Formal proof development
  46. 46.
    Nipkow, T., Klein, G.: Concrete Semantics: With Isabelle/HOL. Springer, New York (2014)CrossRefMATHGoogle Scholar
  47. 47.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL—A Proof Assistant for Higher-Order Logic. Springer, New York (2002)MATHGoogle Scholar
  48. 48.
    Paulson, L.C.: Verifying the unification algorithm in LCF. Sci. Comput. Program. 5(2), 143–169 (1985)MathSciNetCrossRefMATHGoogle Scholar
  49. 49.
    Paulson, L.C.: Gödel’s incompleteness theorems. Archive of Formal Proofs (2013). http://isa-afp.org/entries/Incompleteness.shtml, Formal proof development
  50. 50.
    Paulson, L.C.: A machine-assisted proof of Gödel’s incompleteness theorems for the theory of hereditarily finite sets. Rev. Symb. Log. 7(03), 484–498 (2014)MathSciNetCrossRefMATHGoogle Scholar
  51. 51.
    Paulson, L.C.: A mechanised proof of Gödel’s incompleteness theorems using Nominal Isabelle. J. Autom. Reason. 55(1), 1–37 (2015)CrossRefMATHGoogle Scholar
  52. 52.
    Peltier, N.: Propositional resolution and prime implicates generation. Archive of Formal Proofs (2016). http://isa-afp.org/entries/PropResPI.shtml, Formal proof development
  53. 53.
    Peltier, N.: A variant of the superposition calculus. Archive of Formal Proofs (2016). http://isa-afp.org/entries/SuperCalc.shtml, Formal proof development
  54. 54.
    Persson, H.: Constructive completeness of intuitionistic predicate logic. Ph.D. thesis, Chalmers University of Technology (1996). http://web.archive.org/web/19970715002824/http://www.cs.chalmers.se/~henrikp/Lic/
  55. 55.
    Sekar, R., Ramakrishnan, I.V., Voronkov, A.: Term indexing. In: Handbook of Automated Reasoning, vol. 2, pp. 1853–1964 (2001)Google Scholar
  56. 56.
    Raffalli, C.: Krivine’s abstract completeness proof for classical predicate logic. https://github.com/craff/phox/blob/master/examples/complete.phx (2005, possibly earlier). Accessed 13 Dec 2017
  57. 57.
    Riazanov, A., Voronkov, A.: Vampire. In: Ganzinger, H. (ed.) CADE-16, LNCS, vol. 1632, pp. 292–296. Springer, New York (1999)Google Scholar
  58. 58.
    Ridge, T.: A mechanically verified, efficient, sound and complete theorem prover for first order logic. Archive of Formal Proofs (2004). http://isa-afp.org/entries/Verified-Prover.shtml, Formal proof development
  59. 59.
    Ridge, T., Margetson, J.: A mechanically verified, sound and complete theorem prover for first order logic. In: Hurd, J., Melham, T. (eds.) TPHOL’s 2005, LNCS, vol. 3603, pp. 294–309. Springer, New York (2005)Google Scholar
  60. 60.
    Robinson, J.A.: A machine-oriented logic based on the resolution principle. J. ACM 12(1), 23–41 (1965)MathSciNetCrossRefMATHGoogle Scholar
  61. 61.
    Robinson, J.A.: The generalized resolution principle. Mach. Intell. 3, 77–93 (1968)MATHGoogle Scholar
  62. 62.
    Ruiz-Reina, J.L., Martín-Mateos, F.J., Alonso, J.A., Hidalgo, M.J.: Formal correctness of a quadratic unification algorithm. J. Autom. Reason. 37(1), 67–92 (2006)MathSciNetMATHGoogle Scholar
  63. 63.
    Schlichtkrull, A.: Formalization of resolution calculus in Isabelle. Master’s thesis, Technical University of Denmark (2015). https://people.compute.dtu.dk/andschl/Thesis.pdf
  64. 64.
    Schlichtkrull, A.: Formalization of the resolution calculus for first-order logic. In: Blanchette, J.C., Merz, S. (eds.) ITP 2016, LNCS, vol. 9807, pp. 341–357. Springer, New York (2016)Google Scholar
  65. 65.
    Schlichtkrull, A.: The resolution calculus for first-order logic. Archive of Formal Proofs (2016). http://isa-afp.org/entries/Resolution_FOL.shtml, Formal proof development
  66. 66.
    Schlichtkrull, A., Blanchette, J.C., Traytel, D., Waldmann, U.: Formalization of Bachmair and Ganzinger’s simple ordered resolution prover. https://bitbucket.org/isafol/isafol/src/master/Ordered_Resolution_Prover/. Accessed 13 Dec 2017
  67. 67.
    Schlichtkrull, A., Villadsen, J.: Paraconsistency. Archive of Formal Proofs (2016). http://isa-afp.org/entries/Paraconsistency.shtml, Formal proof development
  68. 68.
    Schlöder, J.J., Koepke, P.: The Gödel completeness theorem for uncountable languages. Formaliz. Math. 20(3), 199–203 (2012)MATHGoogle Scholar
  69. 69.
    Schulz, S.: System description: E 1.8. In: McMillan, K., Middeldorp, A., Voronkov, A. (eds.) LPAR-19, LNCS, vol. 8312, pp. 735–743. Springer, New York (2013)Google Scholar
  70. 70.
    Shankar, N.: Proof-checking metamathematics. Ph.D. thesis, University of Texas (1986)Google Scholar
  71. 71.
    Shankar, N.: Metamathematics, Machines, and Gödel’s Proof. Cambridge University Press, Cambridge (1994)CrossRefMATHGoogle Scholar
  72. 72.
    Slind, K.: Reasoning about terminating functional programs. Ph.D. thesis, Technical University of Munich (1999). https://mediatum.ub.tum.de/?id=601660
  73. 73.
    Sternagel, C., Thiemann, R.: Formalizing Knuth-Bendix orders and Knuth-Bendix completion. In: F. van Raamsdonk (ed.) RTA ’13, LIPIcs, vol. 21, pp. 287–302. Schloss Dagstuhl–Leibniz-Zentrum für Informatik (2013)Google Scholar
  74. 74.
    Weidenbach, C., Dimova, D., Fietzke, A., Kumar, R., Suda, M., Wischnewski, P.: SPASS version 3.5. In: Schmidt, R.A. (ed.) CADE-22, LNCS, vol. 5663, pp. 140–145. Springer, New York (2009)Google Scholar
  75. 75.
    Wenzel, M.: Isar—a generic interpretative approach to readable formal proof documents. In: Bertot, Y., Dowek, G., Théry, L., Hirschowitz, A., Paulin, C. (eds.) TPHOL’s 1999, LNCS, vol. 1690, pp. 167–183. Springer, New York (1999)Google Scholar

Copyright information

© Springer Science+Business Media B.V., part of Springer Nature 2018

Authors and Affiliations

  1. 1.DTU ComputeTechnical University of DenmarkKongens LyngbyDenmark

Personalised recommendations