
Information and Computation IC2541 information and computation 125, 103117 (1996) article no. 0025 View metadata,A citation Symmetric and similar papers Lambda at core.ac.uk Calculus for Classical Program Extractionbrought to you by CORE provided by Elsevier - Publisher Connector Franco Barbanera and Stefano Berardi Dipartimento di Informatica, UniversitaÁ di Torino, Corso Svizzera, 185, 10149 Torino, Italy E-mail: [barba,stefano]Ädi.unito.it [Gri 90, Mur 90], originating from Friedman's A-transla- We introduce a *-calculus with symmetric reduction rules and tion [Fri 78]. An investigation of Prawitz's set of reductions ``classical'' types, i.e., types corresponding to formulas of classical for classical logic [Pra 65, Pra 81] was the starting point for propositional logic. The strong normalization property is proved to hold a method for extracting the constructive content from classi- for such a calculus, as well as for its extension to a system equivalent to Peano arithmetic. A theorem on the shape of terms in normal form is cal proofs devised in [BB 91], which has an interpretation also proved, making it possible to get recursive functions out of proofs in terms of a valuation semantics [BB 92]. All the above- 0 of 6 2 formulas, i.e., those corresponding to program specifications. mentioned methods have natural deduction versions of ] 1996 Academic Press, Inc. classical logics at their roots. On the sequent calculus-side, research efforts have led to the *+-calculus of Parigot [Par 92] and to Coquand's game-theoretical interpretation 1. INTRODUCTION [Coq 92]. These preliminary results, at least those on the natural The possibility of extracting recursive functions out of deduction-side, share a common problem: that of a complex intuitionistic proofs of formulas expressing their specifica- syntax. This, of course, represents a serious obstacle to a tions, i.e., in general, the feature of effectiveness of construc- neat and full understanding of classical logics from a com- tive mathematics, has had a leading role in the development putational point of view. of computer science. This role, not just limited to founda- Our main aim in the present paper is then to define a tional aspects, has been played in a wide spectrum of system for classical program extraction which is simple research fields, with the aim of supporting the working com- enough. Our starting point, in Section 2, will be to define a Sym puter scientist. In particular, the correspondence between classical simply typed *-calculus (*Prop), i.e., a *-calculus logical constructive systems and several *-calculi, known as which is in a Formulas-as-Types correspondence to the CurryHoward analogy, has been used to construct propositional classical logics. In this system, negation is not prototypes of systems for the design and development of a primitive connective, and we manage to identify a type provably correct programs [Con 86, NPS 90, PN 90]. (formula) A with its double negation A==. This enables us Classical logics were always left out of the investigations to get a system where we have a symmetric application, such on the relationships between logics, type-theories, and that either component of an application can be looked at programming languages. This, however, was not caused by virtually indifferently as function or argument. Because of its alleged lack of effective features. Indeed, as far as the part this symmetry, all the reductions of the calculus have a dual of logics relevant for computer science is concerned, this is version. It is relevant to stress that the reductions we define absolutely not the case. Quite old and well-known theoretic are simple and natural, and, differently from what was done results (for instance, [Kre 58]) made sure that it is possible in other systems for classical program extraction, no ad hoc Sym to get, out of a classical proof of \x _y.P(x, y) (with P reduction is introduced. Our system *Prop is then proved in decidable), a recursive function f such that, for any x, Section 5 to be strongly normalizable using a non-trivial P(x, f(x)) holds. What was still preventing classical logics version of Tait and Girard's computability method: sym- Sym to have a more relevant role in computer science, was metric candidates. In Section 3 system *Prop is extended with instead the lack of clear and practical methods to extract first order features in order to obtain a system corresponding Sym their constructive contents from classical proofs, and to Peano arithmetic (*PA ), still strongly normalizable, as systems that helped to understand their constructive proved in the Appendix. Moreover, a Shape of Normal features. Forms Theorem, proved in Section 4, makes it possible to In the recent years, many efforts have been made in this extract the constructive contents of terms corresponding to direction, among which has to be mentioned the interpreta- proofs of formulas of the form \x _y.P(x, y), with P tion of classical logics into calculi with continuations decidable. 103 0890-5401Â96 18.00 Copyright 1996 by Academic Press, Inc. All rights of reproduction in any form reserved. File: 643J 254101 . By:BV . Date:07:02:00 . Time:20:35 LOP8M. V8.0. Page 01:01 Codes: 6792 Signs: 4993 . Length: 60 pic 11 pts, 257 mm 104 BARBANERA AND BERARDI Sym Lemma . 2. *Prop : A SYMMETRIC SIMPLY TYPED 2 3 CLASSICAL *-CALCULUS A===A. Sym In this section, we will introduce the system *Prop . In such a system, types correspond to formulas and terms to proofs Proof. By induction on A, using Definition 2.2. K of propositional classical logic. We shall then often use indif- Definition Sym 2.4. (*Prop -Rules). The terms of the system ferently the words type, formula, and proposition as well as *Sym are defined by the following rules: term and proof. Prop The basis for building the types of our system consists of (var) xA : A two sets of base types: A=[a, b, ...] (atomic types) and ==[a=, b=, ...] (negated atomic types). These two sets A P1 : A1 P2 : A2 are used to build, as shown below, m-types and types. (( , )) (P1, P2): A17A2 Definition 2.1. (i) The set of m-types is defined by P :A (_ ) i i (i=1, 2) the grammar: i A1, A2 _i (Pi): A16A2 [xA: A] A ::=: | := | A 7 A | A 6 A, b P: = where : ranges over A and := over A=. (*) *xA .P: A= (ii) The set of types is defined by the grammar P : A= P : A (C) 1 2 (P1 C P2): = C ::=A | =. In the following the type of a term will often be denoted by superscripts while the superscripts A , A in terms such We need to define the m-types first since we wish to have 1 2 as _A1, A2(P ) will often be omitted. a calculus where formulas do not contain the absurdity i i proposition as a proper subtype. Such a choice is motivated Remark 2.5. The propositional classical logic asso- by technical reasons, which will be made clear in Section 5. ciated with our system is complete. Rules and connectives It is easy to check, however, that this is no restriction at all not given above can be derived as is usual in classical logic. (a formula A 7 = can always be identified with =, and We show below the (type part) of the derivation of the con- A6 = with A). It is also no restriction to prevent = being junctionelimination rule and the implicationelimination used as assumption in a derivation, as we dothat is, in the rule. calculus, not to have variables of type =. In the following we shall denote m-types by A, B, A1 , [A=] A , ..., while types will be denoted by C, D, C , C , .... i 2 1 2 A 7 A #(A= 6 A=)= A= 6A= By having a set of atomic types and a set of negated 1 2 1 2 1 2 atomic types, it is easy to see that we have a propositional = calculus where negation is neither primitive nor defined in Ai terms of =. = A Ä B=Def A 6 B Definition . = 2 2 We define the negation A of an A [B=] m-type A as follows: A Ä B#A= 6 B (A= 6 B)=#A 7 B= 1. (:)==:= = B 2. (:=)==: = = = 3. (A 7 B) =A 6 B We call the operator ``C'' symmetric application since, A= A A= A A A= 4. (A 6 B)==A= 7 B=. given the terms P and Q , both P C Q and Q C P Sym are correct *Prop -terms. This symmetry is reflected by the (pairwise dual, except for rule (Triv)) reductions rules We then get a calculus with involutive negation. defined below. File: 643J 254102 . By:BV . Date:07:02:00 . Time:20:35 LOP8M. V8.0. Page 01:01 Codes: 4501 Signs: 2734 . Length: 56 pic 0 pts, 236 mm CLASSICAL PROGRAM EXTRACTION 105 Definition . Sym Sym 2 6(*Prop -Reduction Rules). One of the main properties enjoyed by the system *Prop that will be essential for its applications is that of strong (;) *x.P C Q Ä; P[QÂx] normalization. = {(; ) Q C *x.P Ä;= P[QÂx] Theorem . Sym 2 9 (Strong Normalization for *Prop). Let C (') *x.(P Cx)Ä' P if x  FV(P) be a type. Then = {(' ) *x.(x CP)Ä'= P if x  FV(P) TermC=SNC. (?) (P1, P2) C _i(Qi )Ä? Pi C Qi (i=1, 2) = (? ) _ (Q ) C (P , P )Ä = Q C P (i=1, 2) { i i 1 2 ? i i The proof of this theorem will be the argument of (Triv) E[P] ÄTriv P if E[] is a context with Section 5.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-