Elimination of Negation in a Logical Framework [chapter]

Alberto Momigliano
2000 Lecture Notes in Computer Science  
We address the issue of endowing a logical framework with a logically justified notion of negation. Logical frameworks with a logic programming interpretation such as hereditary Harrop formulae cannot directly express negative information, although negation is a useful specification tool. Since negation-as-failure does not fit well in a logical framework, especially one endowed with hypothetical and parametric judgments, we adapt the idea of elimination of negation from Horn logic to a fragment
more » ... of higher-order hereditary Harrop formulae. The idea is to replace occurrences of negative predicates with positive ones which are operationally equivalent. This entails two separate phases. Complementing terms, i.e. in our case higher-order patterns. Due the presence of partially applied lambda terms, intuitionistic lambda calculi are not closed under complementation. We thus develop a strict lambda calculus, where we can directly express whether a function depends on its argument. Complementing clauses. This can be seen as a negation normal form procedure which is consistent with intuitionistic provability. It entails finding a middle ground between the Closed World Assumption usually associated with negation and the Open World Assumption typical of logical frameworks. As this is in general not possible, we restrict ourselves to a fragment in which clause complementation is viable and that has proven to be expressive enough for the practice of logical frameworks. The main technical idea is to isolate a set of programs where static and dynamic clauses do not overlap. This dissertation would not have been possible without the help and support of many different people. First and foremost my thesis advisor, Frank Pfenning, who has guided me through every step of this research, from the high level design decisions down to the most technical details. There is probably not a single line that does not carry his imprint. Of course, any remaining mistake is solely my responsibility. In the process, he has taught me a rigorous discipline and a style in approaching formal problems that has made me a far better researcher and perhaps a better person, too. I would also like to thank wholeheartedly the members of my dissertation committee, Dale Miller and Dana Scott for their useful comments and encouragement. I am also deeply grateful to Carsten Schürmann, who, under the motto "What do you want to prove today?" has always been ready and willing to discuss a wide range of issues from from type-theory to the practicalities of the Twelf system. I'm also indebted to Roberto Virga for many discussions and his precious help in debugging the strict calculus rules. Thanks to Iliano Cervesato for his comments to an early version of the material in Chapter 3 and for making available his manuscript [Cer]. I'd also like to thank Mario Ornaghi for his friendship and hospitality at DSI, Milan and the many discussions on the essence of logic programming. Thanks also to Ugo . A particular thanks to Lena. Finally, I want to thank my beloved Claudia, who has been waiting for me on the other part of the ocean, so very patient and affectionate during those hard and long years of separation. It is so sad that my mother is not here anymore to witness the happy conclusion of such a difficult journey. All I can do is dedicate this dissertation to her memory. 1.1. LOGICAL FRAMEWORKS 1 Les dernieres efforts des logiciens, in Science et Methode, p. 193. 1.2. NEGATION 4 also be useful for (inuitionistic) generic theorem proving systems, especially ones based on higher-order logic or type theory such as Isabelle [Isa98] and Coq[DFH + 93]. Those systems (Isabelle and Coq excluded) do not provide a primitive negation operator. Indeed, constructive logics usually implement negative information as ¬A ≡ A → ⊥, where ⊥ denotes absurdity and the Duns Scoto Law is the elimination rule. Thus negative predicates have no special status; that would correspond to explicitly coding negative information in a program, which is entirely consistent with the procedural interpretation of hypothetical judgments available in logical frameworks with a logic programming interpretation. However, this would not only significantly complicate goal-oriented proof search (as it is manifested in the difficulty of implementing, for example, the full logic of Forum [Mil94]), but providing negative definitions seems to be particularly error-prone, repetitive and not particularly interesting; more importantly, in a logical framework we have also to fulfill the proof obligation that the proposed negative definition does behave as the complement (of its positive counterpart). Providing a viable negation operator has an immediate practical relevance in programming in those languages, since it relieves the user from the burden of explicitly encoding negative information in the form of clauses which express the condition for a predicate not to hold. Automating the synthesis of negative information has not only a clear benefit in the logic programming sense, but it may also have a rather dramatic effect on the possibility of implementing deductive systems that would prove to be too unwieldy to deal with otherwise. The synthesis of the negation of predicates such as typable, well-formed, canonical form, subsort, value etc.-as well as Prolog-like predicates such as equality, set membership and the like-will increase the amount of meta-theory that can be formalized. Of course, the addition of negation does not change the recursion-theoretic expressive power of a language, but we claim that it does make a difference at the representation level. To bring this to the extreme, deductive systems can be expressed eventually in, say, first-order Horn logic and ideally proved-checked or even demonstrated by a resolution theorem prover or more likely by an interactive one. In practice, this has turned out to be very problematic, if not a total failure; hence the refinement of the tools to higher-order logic and type-theory. Traditionally, negation-as-failure (NF ) [Cla78] has been the overwhelmingly used approach in logic programming (see [AB94] for a recent survey): that is, infer ¬A if every proof of A fails finitely. The operational nature of this rule and its ultimately troublesome logical status is a serious threat to the logical frameworks' endeavor. We will return on the topic of why NF is an absolutely inadequate way to address the issues of negation in a such a framework in Section 1.4. While the topic of negation has been pursued to the extreme in first-order logic programming (we shall try a small review of closely related approaches in Section 1.3), the field is almost virgin as far as higherorder logic and type theory is concerned: languages such as λProlog implement NF with the usual cut-fail combination: a logical reconstruction for the first order fragment has been attempted, with somewhat disappointing results, in Harland's thesis [Har91b] . Though the impetus of this enterprise may seem at first sight mainly pragmatic, it should not be underrated. In short, we are trying to design a reasonable notion of negation, a basic building block of any logic under severe computational constraints: "The problem is difficult because it seeks a notion of negation which is simultaneously semantically elegant and computationally feasible: in both execution and mathematical/logical semantics the extended language should cleanly extend the definite clause language" [JLLM91]. The reason why NF is so popular in the logic programming paradigm is that it essentially requires no modification to the search structure of an logic programming interpreter. The real question is whether it also satisfies the other aforementioned criteria. Nonetheless this is just a part of it: "... this notion [NF ] is a basic logical notion, a notion of value to pure logic (as studied since the Ancient Greeks) of equal importance and theoretical standing as notion like Possibility, Deduction, Axiom and the like. The role of negation by failure in logic programming in only a special case: one manifestation of its role in logic" [Gab91]. Our answer to this plea will be to show that, paradoxically, the best way to deal with negation in the logic programming setting is to eliminate it through transformation.
doi:10.1007/3-540-44622-2_28 fatcat:hywfda5dhfhtdgf2lmigtjz4om