An Integration of Resolution and Natural Deduction Theorem Proving
Total Page:16
File Type:pdf, Size:1020Kb
From: AAAI-86 Proceedings. Copyright ©1986, AAAI (www.aaai.org). All rights reserved. An Integration of Resolution and Natural Deduction Theorem Proving Dale Miller and Amy Felty Computer and Information Science University of Pennsylvania Philadelphia, PA 19104 Abstract: We present a high-level approach to the integra- ble of translating between them. In order to achieve this goal, tion of such different theorem proving technologies as resolution we have designed a programming language which permits proof and natural deduction. This system represents natural deduc- structures as values and types. This approach builds on and ex- tion proofs as X-terms and resolution refutations as the types of tends the LCF approach to natural deduction theorem provers such X-terms. These type structures, called ezpansion trees, are by replacing the LCF notion of a uakfation with explicit term essentially formulas in which substitution terms are attached to representation of proofs. The terms which represent proofs are quantifiers. As such, this approach to proofs and their types ex- given types which generalize the formulas-as-type notion found tends the formulas-as-type notion found in proof theory. The in proof theory [Howard, 19691. Resolution refutations are seen LCF notion of tactics and tacticals can also be extended to in- aa specifying the type of a natural deduction proofs. This high corporate proofs as typed X-terms. Such extended tacticals can level view of proofs as typed terms can be easily combined with be used to program different interactive and automatic natural more standard aspects of LCF to yield the integration for which Explicit representation of proofs deduction theorem provers. we are looking. as typed values within a programming language provides sev- In Section 2 we describe a representation of natural deduc- eral capabilities not generally found in other theorem proving tion proofs as X-terms, and in Section 3 we show how the LCF systems. For example, it is possible to write a tactic which notion of tactics and tacticals can be used to specify an inter- can take the type specified by a resolution refutation and auto- active theorem prover based on such a term representation of matically construct a complete natural deduction proof. Such natural deduction proofs. In Section 4 we describe how resolu- a capability can be of use in the development of user oriented tion refutations can be converted to generalized type structures explanation facilities. called expansion trees. In Section 5 we show how tactics can 1. Introduction make use of the information stored in these generalized types. Theorem provers built on resolution and natural deduction Also in Section 5, we present a program in the language of tat- have very different characteristics. For example, a search for a tics which is capable of automatically converting a resolution resolution refutation starts by taking a proposed theorem and refutation to a natural deduction proof. putting its negation into skolem normal and conjunctive nor- mal form. AS a result of using such normal forms, the search 2. Natural Deduction Proofs space of refutations is very homogeneous, and automatic thee- Although much of what we describe here is applicable to rem provers using this paradigm are rather easy to build. On most forms of natural deduction, the form we present in this pa- the other hand, since the search in such a theorem prover is per is essentially the sequent system LK presented in [Gentzen, carried out in a space which is rather remote from a useJs orig- 19351 but without the cut rule. More modern presentations of inal input, it is difficult to get the user to interact with the similar systems can be found in [Gallier, 19861 and [Prawitz, search process. On these accounts, natural deduction theorem 19651. Proofs in the LK system are finite, ordered trees in proving is just the opposite. For example, no normal forms which nodes are labeled with sequents. A sequent, written as are generally used and only subformulas or instances of sub- l? --) 8, will represent the proposition “from all the formulas formulas of the proposed theorem are used during the search in the set P, some formula in the set 0 can be proved.” Notice for a proof. AS a result, it is very easy to involve a user in the that the proposition connected to the sequent A -----* A is triv- search for a proof since the state of the search at any moment is ially true. Sequents of this simple kind are called axioms. The easily understood. On the other hand, natural deduction often non-terminal nodes of an LK proof are called inference rules leaves too many unimportant features in the search space which and are listed below. the preprocessing done by normal forms would have removed. I’ - Q,A r - e,c A,C,I‘ - e Thus, resolution is often the core of automatic theorem provers and-r and-l while natural deduction is often the core of interactive theorem r - Q,Ar\C AAC,l? - 0 provers. A,r - 8 Clearly it is desirable to find some way to smoothly in- c,r - 8 or-l I’ - @,A,C or-r tegrate these two very different paradigms. In this paper, we AvC,r - 8 r - Q,AvC propose just such an integration. This integration is not a merg- ing of the two different search spaces. It is, instead, an inte- r - 8,A not -1 A,r - 0 not-r gration of the two kinds of proofs. We shall present a system -A,lY - 8 r - Q,-A which explicitly represents proofs in both systems and is capa- r - Q,A C,A - A This work has been supported by NSF grants MCS8219196 imp- 1 A,l? - Q,C imp-r CER, MCS-82-07294, and DARPA NOOO- 14-85-K-0018. A> C,r,A - Q,A I’ - Q,A>C lc)s / SCIENCE These free variables are also abstracted with X-bindings. Thus WIPJ - 63 all-l r - QMYIP all-r a partial proof is represented as a function from subproofs to a vxp,r - 8 r - Q,Vz P completed proof. Example 3. A partial proof of the formula in Example 1 is WYW - 43 some-l r - 0, [x/tlP 803110-r jxp,r - 8 r - e,jx P given in Figure 2 and by the term lambda X lambda Y. imp-r(and-l(or-l(X,thin-l(Y)))). r-43 thin-1 r-8 thin-r A,r - 8 r - O,A In order for the mechanism of X-conversion to correctly represent the operation of supplying a partial proof with a sub- All but the last two rules are introduction rules and are responsi- proof, we must type these X-terms. For example, XxXy T(x, y) ble for introducing into sequents the variouslogical connectives. represents a partial proof of some sequent in which two sub- The proviso that the variable y is not free in any formula of the proofs must be supplied. However, before this term can be lower sequent must be added to the rules all-r and some-l. A applied to some actual proof, say S, one must check that the derivation tree is an LK proof of A if the root of the tree is the abstracted variable x is a place holder for proofs of the sequent sequent - A and its leaves are axioms. for which S is a proof. Thus, we should make sequents and functions among sequents be the types of X-terms. For exam- Example 1. Figure 1 is an LK proof of the formula ple, if x and y are place holders for proofs of the sequents 01 and 02, respectively, and if XxXy T (2, y) is a partial proof of the [P(X) 1 [P(4v ml Avx c&N1 3x d4. sequent cr, then we attach to this X-term the type 01 + 02 + cr. These proof trees can be represented more manageably as The type of the X-term representing the partial proof in Figure term structures. For example, let axiom(A) represent the proof 2 is, therefore, tree which contains just the sequent A - A. The inference rules can be represented by function symbols of 1 or 2 argu- ments. For example, if 2’1 and 2’2 are proofs of l?,A + 8 (- k(a) v d~)l AV’b(4z 1 !+>I ’ SCq(4)- and I’, B - 9, respectively, we would write or-l(Ti, Ti) to Remember that the typed X-calculus has the following restric- represent the proof tion on application: a term g can be applied to a term h if and only if the type of g is of the form Q + ,8 and the type of h is Tl 7’2 or-l of the form cy. This restriction thus enforces the restriction of I’,AvB - 8 combining partial proofs with completed subproofs. We shall assume that the reader is familiar with the basic properties of where T: and Ti are the terms representing the proofs Tl and X-conversion. Tz, respectively. Many inference rules require more information some-r PC4 - PM q(a) - 3x dz) q(b) - m imp-l some-r l+),P@) ’ Cd4 - 32 44 q(b) - 32 44 all-l thin-l p(a),v's Ip(x) ' q(x)1- 32 q(x) q(b),VJz [P(Z) ’ +)I - ckcd4 or-l p(a)’ q(b),Vx[Pb) ’ q(‘)l - 3x ‘(‘) and-l [p(a)V q(b)] A v ’zb(x) ’ q(x)] - 32 dz> imp-r - [p(a) V q(b)] A ‘4~ [P(X) 3 Q(x)] ’ 32 q(X) Figure 1.