- Research Article
8
- 10.1016/j.apal.2008.07.004
Cartesian closed Dialectica categories
- Sep 04, 2008
- Annals of Pure and Applied Logic
- Bodil Biering
Cartesian closed Dialectica categories
We give a Natural Deduction formulation of an adaptation of Gödel’s functional (Dialectica) interpretation to the extraction of (more) efficient programs from (classical) proofs. We adapt Jørgensen’s formulation of pure Dialectica translation by eliminating his “Contraction Lemma” and allowing free variables in the extracted terms (which is more suitable in a Natural Deduction setting). We also adapt Berger’s uniform existential and universal quantifiers to the Dialectica-extraction context. The use of such quantifiers without computational meaning permits the identification and isolation of contraction formulas which would otherwise be redundantly included in the pure-Dialectica extracted terms. In the end we sketch the possible combination of our refinement of Gödel’s Dialectica interpretation with its adaptation to the extraction of bounds due to Kohlenbach into a light monotone functional interpretation.KeywordsProgram extraction from (classical) proofsComplexity of extracted programsBerger’s uniform quantifiersGödel’s Functional interpretationProof-Carrying CodeProof Mining
Cartesian closed Dialectica categories
Cartesian closed Dialectica categories
Refined Environment Classifiers
Generating high-performance code and applying typical optimizations within the bodies of loops and functions involves moving or storing open code for later use, often in a different binding environment. There are ample opportunities for variables being left unbound or accidentally captured. It has been a tough challenge to statically ensure that by construction the generated code is nevertheless well-typed and well-scoped: all free variables in manipulated and stored code fragments shall eventually be bound, by their intended binders. We present the calculus for code generation with mutable state that for the first time achieves type-safety and hygiene without ad hoc restrictions. The calculus strongly resembles region-based memory management, but with the orders of magnitude simpler proofs. It employs the rightly abstract representation for free variables, which, like hypothesis in natural deduction, are free from the bureaucracy of syntax imposed by the type environment or numbering conventions. Although the calculus was designed for the sake of formalization and is deliberately bare-bone, it turns out easily implementable and not too bothersome for writing realistic program.
Read moreProceedings Third International Workshop on Classical Logic and Computation
The fact that classical mathematical proofs of simply existential statements\ncan be read as programs was established by Goedel and Kreisel half a century\nago. But the possibility of extracting useful computational content from\nclassical proofs was taken seriously only from the 1990s on when it was\ndiscovered that proof interpretations based on Goedel's and Kreisel's ideas can\nprovide new nontrivial algorithms and numerical results, and the Curry-Howard\ncorrespondence can be extended to classical logic via programming concepts such\nas continuations and control operators.\n The workshop series "Classical Logic and Computation" aims to support a\nfruitful exchange of ideas between the various lines of research on\ncomputational aspects of classical logic. This volume contains the abstracts of\nthe invited lectures and the accepted contributed papers of the third CL&C\nworkshop which was held jointly with the workshop "Program Extraction and\nConstructive Mathematics" at the University of Brno in August 21-22, 2010, as a\nsatellite of CSL and MFCS. The workshops were held in honour of Helmut\nSchwichtenberg who became "professor emeritus" in September 2010.\n The topics of the papers include the foundations, optimizations and\napplications of proof interpretations such as Hilbert's epsilon substitution\nmethod, Goedel's functional interpretation, learning based realizability and\nnegative translations as well as special calculi and theories capturing\ncomputational and complexity-theoretic aspects of classical logic such as the\nlambda-mu-calculus, applicative theories, sequent-calculi, resolution and\ncut-elimination\n
Read moreA complexity analysis of functional interpretations
A complexity analysis of functional interpretations
On the proof theory of the intermediate logic MH
A natural deduction formulation is given for the intermediate logic called MH by Gabbay in [4]. Proof-theoretic methods are used to show that every deduction can be normalized, that MH is the weakest intermediate logic for which the Glivenko theorem holds, and that the Craig-Lyndon interpolation theorem holds for it.
Read moreClosure and Quine's *101
The purpose of this paper is to suggest two alternatives to Quine's definition of closure. These new definitions have two advantages over Quine's definition, and they probably are the simplest definitions having both advantages. The two advantages are:(1). Principle *101 becomes superfluous and may be dropped from Quine's set of principles for quantification. (In the case of my second definition, however, the dropping of *101 must be balanced by a slight change in *104.)(2). Closure is made independent of the alphabetical order of variables.The second of these advantages turns on the fact that the “alphabetical order” possessed by variables in virtue of their respective positions in the alphabet (or arbitrarily assigned to them) is a mere convention and not of genuine logical significance. It seems therefore desirable to consider some alternatives to Quine's definition of closure, since according to his definition the closure of a given formula will be one statement or another, depending upon whether or not one letter of the alphabet is alphabetically prior to a certain other letter. It is interesting that the removal of this minor artificiality also enables us to dispense with *101.According to Quine, the closure of a formula containing n free variables is obtained by prefixing to it in alphabetical order the n universal quantifiers formed from these variables by enclosing each in a pair of parentheses. (If n = 0 the formula is its own closure and is a “statement” rather than a “matrix.”) Thus the statement ‘(x)(y)(z)(xϵy ▪ yϵz)’ would be the closure of ‘xϵy ▪ yϵz’, but ‘(z)(x)(y)(xϵy ▪ yϵz)’ would not be its closure. Now there is no reason why ‘(z)(x)(y)(xϵy ▪ yϵz)’ or (y)(z)(x)(xϵy ▪ yϵz) and so on, could not just as well be regarded as “the” closure of ‘(xϵy ▪ yϵz’ as ‘(x)(y)(z)(xϵy ▪ yϵz)’. I therefore propose to allow to each formula not merely one closure, but as many closures as can be obtained by permuting in various ways the n prefixed universal quantifiers. In this way alphabetical order becomes irrelevant and no preference is given to one order of prefixed quantifiers in contrast to other orders which seem equally good. This constitutes my first redefinition of closure.
Read moreGeneralized interpolation theorems
Chang [1], [2] has proved the following generalization of the Craig interpolation theorem [3]: For any first-order formulas φ and ψ with free first- and second-order variables among ν1, …, νn, R and ν1, …, νn, S respectively, and for any sequence Q1, …, Qn of quantifiers such that Q1 is universal whenever ν1 is a second-order variable, ifthen there is a first-order formula θ with free variables among ν1, …, νn such that(Note that the Craig interpolation theorem is the special case of Chang's theorem in which Q1, …, Qn are all universal quantifiers.) Chang also raised the question [2, Remark (k)] as to whether the Lopez-Escobar interpolation theorem [6] for the infinitary language Lω1ω possesses a similar generalization. In this paper, we show that the answer to Chang's question is affirmative and, moreover, that several interpolation theorems for applied second-order languages for number theory also possess such generalizations.Maehara and Takeuti [7] have established independently proof-theoretic interpolation theorems for first-order logic and Lω1ω which have as corollaries both Chang's theorem and its analog for Lω1ω. Our proofs are quite different from theirs and rely on model-theoretic techniques stemming from the analogy between the theory of definability in Lω1ω and the theory of Borel and analytic sets of real numbers, rather than the technique of cut-elimination.
Read moreA Constructive Logic with Classical Proofs and Refutations
We study a conservative extension of classical propositional logic distinguishing between four modes of statement: a proposition may be affirmed or denied, and it may be strong or classical. Proofs of strong propositions must be constructive in some sense, whereas proofs of classical propositions proceed by contradiction. The system, in natural deduction style, is shown to be sound and complete with respect to a Kripke semantics. We develop the system from the perspective of the propositions-as-types correspondence by deriving a term assignment system with confluent reduction. The proof of strong normalization relies on a translation to System F with Mendler-style recursion.
Read moreTHE SUBFORMULA PROPERTY IN CLASSICAL NATURAL DEDUCTION ESTABLISHED CONSTRUCTIVELY
A constructive proof is provided for the claim that classical first-order logic admits of a natural deduction formulation featuring the subformula property.
Read moreA Curry–Howard View of Basic Justification Logic
In this paper we suggest reading a constructive necessity of a formula $$\Box A$$ as internalizing a notion of constructive truth of A a proof within a deductive system I and validity of A a proof under an interpretation $$[\![{A}]\!]_{J}$$ within some system J. An example of such a relation is provided by the simply typed lambda calculus as I and its implementation in SK combinators as J. We utilize justification logic to axiomatize the notion of validity-under-interpretation and, hence, treat a semantical notion in a purely proof-theoretic manner. We present the system in Gentzen-style natural deduction formulation and provide reduction and expansion rules for the $$\Box $$ connective. Finally, we add proof-terms and proof-term equalities to obtain a corresponding calculus Jcalc $$^{-}$$ that can be viewed as an extension of the Curry---Howard isomorphism with justifications. We provide standard metatheoretic results and suggest a programming language interpretation in languages with foreign function interfaces FFIs.
Read moreNonstandard Functional Interpretations and Categorical Models
Recently, the second author, Briseid, and Safarik introduced nonstandard Dialectica, a functional interpretation capable of eliminating instances of familiar principles of nonstandard arithmetic—including overspill, underspill, and generalizations to higher types—from proofs. We show that the properties of this interpretation are mirrored by first-order logic in a constructive sheaf model of nonstandard arithmetic due to Moerdijk, later developed by Palmgren, and draw some new connections between nonstandard principles and principles that are rejected by strict constructivism. Furthermore, we introduce a variant of the Diller–Nahm interpretation with two different kinds of quantifiers, similar to Hernest’s light Dialectica interpretation, and show that one can obtain nonstandard Dialectica by weakening the computational content of the existential quantifiers—a process called herbrandization. We also define a constructive sheaf model mirroring this new functional interpretation, and show that the process of herbrandization has a clear meaning in terms of these sheaf models.
Read moreCoarsening Natural Deduction Proofs I: Finding Perfect Proofs
This paper explores how, given a proof, we can systematically transform it into a proof that contains no irrelevancies and which is as strong as possible. I define a weaker and stronger notion of what counts as a proof with no irrelevancies, calling them perfect proofs and gaunt proofs, respectively. Using classical core logic to study classical validities and core logic to study intuitionistic validities, I show that every core proof or classical core proof can be transformed into a perfect proof. In a sequel paper, I show how proofs in core logic can also be transformed into gaunt proofs and I observe that this property fails for classical core logic.
Read moreMeta-programming with names and necessity
Meta-programming languages provide infrastructure to generate and execute object programs at run-time. In a typed setting, they contain a modal type constructor which classifies object code. These code types generally come in two flavors: closed and open. Closed code expressions can be invoked at run-time, but the computations over them are more rigid, and typically produce less efficient residual object programs. Open code provides better inlining and partial evaluation of object programs, but once constructed, expressions of this type cannot in general be evaluated.Recent work in this area has focused on combining the two notions into a sound system. We present a novel way to achieve this. It is based on adding the notion of names from the work on Nominal Logic and FreshML to the λ -calculus of proof terms for the necessity fragment of modal logic S4. The resulting language provides a more fine-grained control over free variables of object programs when compared to the existing languages for meta-programming. In addition, this approach lends itself well to addition of intensional code analysis, i.e. ability of meta programs to inspect and destruct object programs at run-time in a type-safe manner, which we also undertake.
Read moreFusing Quantifiers and Connectives: Is Intuitionistic Logic Different?
A paper by Dag Westerståhl and myself twenty years ago introduced operators that are both connectives and quantifiers. We introduced two binary operators that are classically interdefinable: one that fuses conjunction and existential quantification and one that fuses implication and universal quantification. We called the system PFO. A complete Gentzen-Prawitz style Natural Deduction axiomatization of classical PL was provided. For intuitionistic PL, however, it seemed that existential quantification should be fused with disjunction rather than with conjunction. Whether this was true, and if so why, were questions not answered at the time. Also, it seemed that there is no uniform definition of such a disjunctive-existential operator in classical PFO. This, too, remained a conjecture. In this paper, I return to these previously unresolved questions, and resolve them.
Read moreA logic programming approach to implementing higher-Order term rewriting
Term rewriting has proven to be an important technique in theorem proving. In this paper, we illustrate that rewrite systems and strategies for higher-order term rewriting, which includes the usual notion of first-order rewriting, can be naturally specified and implemented in a higher-order logic programming language. We adopt a notion of higherorder rewrite system which uses the simply typed λ-calculus as the language for expressing rules, with a restriction on the occurrences of free variables on the left hand sides of rules so that matching of terms with rewrite templates is decidable. The logic programming language contains an implementation of the simply-typed lambda calculus including Βη-conversion and higher-order unification. In addition, universal quantification in queries and the bodies of clauses is permitted. For higher-order rewriting, we show how these operations implemented at the meta-level provide elegant mechanisms for the object-level operations of descending through terms and matching terms with rewrite templates. We discuss tactic style theorem proving in this environment and illustrate how term rewriting strategies can be expressed as tactic-style search.
Read more