Implementing Theorem Provers in Logic Programming

Logic programming languages have many characteristics that indicate that they should serve as good implementation languages for theorem provers. For example, they are based on search and unification which are also fundamental to theorem proving. We show how an extended logic programming language can be used to implement theorem provers and other aspects of proof systems for a variety of logics. In this language firstorder terms are replaced with simply-typed λ-terms, and thus unification becomes higher-order unification. Also, implication and universal quantification are allowed in goals. We illustrate that inference rules can be very naturally specified, and that the primitive search operations of this language correspond to those needed for searching for proofs. We argue on several levels that this extended logic programming language provides a very suitable environment for implementing tactic style theorem provers. Such theorem provers provide extensive capabilities for integrating techniques for automated theorem proving into an interactive proof environment. We are also concerned with representing proofs as objects. We illustrate how such objects can be constructed and manipulated in the logic programming setting. Finally, we propose extensions to tactic style theorem provers in working toward the goal of developing an interactive theorem proving environment that provides a user with many tools and techniques for building and manipulating proofs, and that integrates sophisticated capabilities for automated proof discovery. Many of the theorem provers we present have been implemented in the higher-order logic programming language λProlog. Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MSCIS-87-109. This technical report is available at ScholarlyCommons: http://repository.upenn.edu/cis_reports/631 IMPLEMENTING THEOREM PROVERS IN LOGIC PROGRAMMING Amy Felty MS-CIS-87-109 LlNC LAB 87 Department of Computer and Information Science School of Engineering and Applied Science University of Pennsylvania Philadelphia, PA 191 04-6389

[1]  Amy P. Felty,et al.  An Integration of Resolution and Natural Deduction Theorem Proving , 1986, AAAI.

[2]  Ewan Klein,et al.  Type-driven translation , 1985 .

[3]  M. Moortgat Mixed Composition and Discontinuous Dependencies , 1988 .

[4]  J. Katz,et al.  An integrated theory of linguistic descriptions , 1964 .

[5]  Gerhard Gentzen,et al.  Investigations into Logical Deduction , 1970 .

[6]  R. Smullyan First-Order Logic , 1968 .

[7]  G. Nadathur A higher-order logic as the basis for logic programming , 1987 .

[8]  Robert L. Constable,et al.  Proofs as programs , 1985, TOPL.

[9]  P. Martin-Löf Constructive mathematics and computer programming , 1984 .

[10]  Per Martin-Löf,et al.  Constructive mathematics and computer programming , 1984 .

[11]  J. Lambek The Mathematics of Sentence Structure , 1958 .

[12]  Dale Miller,et al.  A Theory of Modules for Logic Programming , 1986, SLP.

[13]  Gopalan Nadathur,et al.  Hereditary Harrop Formulas and Uniform Proof Systems , 1987, Logic in Computer Science.

[14]  Dale A. Miller,et al.  A compact representation of proofs , 1987, Stud Logica.

[15]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[16]  Amy P. Felty,et al.  Using Extended Tactics to Do Proof Transformations , 1986 .

[17]  Zohar Manna,et al.  A Deductive Approach to Program Synthesis , 1979, TOPL.

[18]  Lars Hallnäs,et al.  A proof-theoretic approach to logic programming, I. Generalized horn clauses , 1988 .

[19]  Zohar Manna,et al.  The logical basis for computer programming. Volume 1: deductive reasoning , 1985 .

[20]  Robin Milner Dialogue with a Proof System , 1987, TAPSOFT, Vol.1.

[21]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

[22]  Gerald Gazdar,et al.  Unbounded Dependencies and Coordinate Structure , 1981 .

[23]  Lawrence C. Paulson The representation of logics in higher-order logic , 1987 .

[24]  Gopalan Nadathur,et al.  Some Uses of Higher-Order Logic in Computational Linguistics , 1986, ACL.

[25]  Lawrence C. Paulson,et al.  Natural Deduction as Higher-Order Resolution , 1986, J. Log. Program..

[26]  W. W. Bledsoe,et al.  Non-Resolution Theorem Proving , 1977, Artif. Intell..

[27]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[28]  Roman Jakobson,et al.  Structure of Language and Its Mathematical Aspects , 1961 .

[29]  Jean H. Gallier,et al.  Logic for Computer Science: Foundations of Automatic Theorem Proving , 1985 .

[30]  F. Dick A survey of the project Automath , 1980 .

[31]  Peter Schroeder-Heister,et al.  A natural extension of natural deduction , 1984, Journal of Symbolic Logic.

[32]  S. Ariel,et al.  Introduction to Theoretical Linguistics. , 1968 .

[33]  David M. Perlmutter Deep and surface structure constraints in syntax , 1973 .

[34]  Gopalan Nadathur,et al.  A Logic Programming Approach to Manipulating Formulas and Programs , 1987, SLP.

[35]  Michael James McCloskey,et al.  A fragment of a grammar of modern Irish , 1978 .

[36]  de Ng Dick Bruijn,et al.  A survey of the project Automath , 1980 .

[37]  W. W. Bledsoe,et al.  Some Thoughts on Proof Discovery , 1986, SLP.

[38]  Ricardo Caferra,et al.  Proof Analogy in Interactive Theorem Proving: A Method to Express and Use It via Second Order Pattern Matching , 1987, AAAI.

[39]  William F. Clocksin,et al.  Programming in Prolog , 1981, Springer Berlin Heidelberg.

[40]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[41]  E. Engdahl Parasitic gaps, resumptive pronouns, and subject extractions , 1985 .

[42]  Michael J. C. Gordon,et al.  Edinburgh LCF: A mechanised logic of computation , 1979 .

[43]  Mark Steedman,et al.  A Lazy way to Chart-Parse with Categorial Grammars , 1987, ACL.

[44]  Zohar Manna,et al.  The logical basis for computer programming , 1985 .