FUNCTIONAL PEARL LinearlambdacalculusandPTIME-completeness
نویسندگان
چکیده
We give transparent proofs of the PTIME-completeness of two decision problems for terms in the λ-calculus. The first is a reproof of the theorem that type inference for the simplytyped λ-calculus is PTIME-complete. Our proof is interesting because it uses no more than the standard combinators Church knew of some 70 years ago, in which the terms are linear affine – each bound variable occurs at most once. We then derive a modification of Church’s coding of Booleans that is linear, where each bound variable occurs exactly once. A consequence of this construction is that any interpreter for linear λ-calculus requires polynomial time. The logical interpretation of this consequence is that the problem of normalizing proofnets for multiplicative linear logic (MLL) is also PTIME-complete. 1 Type inference for simply typed λ-calculus The Circuit Value Problem (CVP) is to determine the output of a circuit, given an input to that circuit. CVP is complete for PTIME, because polynomial-time computations can be described by polynomial-sized circuits (Ladner, 1975). The Cook-Levin NP-completeness theorem, it should be noticed, merely augments these circuits with extra inputs which correspond to nondeterministic choices during a polynomial-time computation. We show how to code CVP into simply-typed λterms, where both type inference and term evaluation are synonymous with circuit evaluation. The programs we write to evaluate circuits are not perverse: they are completely natural, and are built out of the standard Church coding of Boolean logic (e.g. see Hindley & Seldin (1986)). We use ML as a presentation device, without exploiting its let-polymorphism. That is, we use the convenience of naming to identify λ-terms of constant size, used to build circuits. Had we expanded the definitions, the term representing the circuit would grow by only a constant factor, and become harder to read. Here, then, are the standard, classical combinators, coded in ML:
منابع مشابه
Parsing Parses A Pearl of (Dependently Typed) Programming and Proof
We present a functional parser for arbitrary context-free grammars, together with soundness and completeness proofs, all inside Coq. By exposing the parser in the right way with parametric polymorphism and dependent types, we are able to use the parser to prove its own soundness, and, with a little help from relational parametricity, prove its own completeness, too. Of particular interest is on...
متن کاملThe Do-Calculus Revisited
The do-calculus was developed in 1995 to facilitate the identification of causal effects in non-parametric models. The completeness proofs of [Huang and Valtorta, 2006] and [Shpitser and Pearl, 2006] and the graphical criteria of [Tian and Shpitser, 2010] have laid this identification problem to rest. Recent explorations unveil the usefulness of the do-calculus in three additional areas: mediat...
متن کاملCausal Inference by Surrogate Experiments: z-Identifiability
We address the problem of estimating the effect of intervening on a set of variables X from experiments on a different set, Z, that is more accessible to manipulation. This problem, which we call z-identifiability, reduces to ordinary identifiability when Z = ∅ and, like the latter, can be given syntactic characterization using the do-calculus [Pearl, 1995; 2000]. We provide a graphical necessa...
متن کاملFunctional and Physical Properties of Instant Beverage Powder Made From Two Different Varieties of Pearl Millet
The objective of this experiment was to assess the effects of malting, extrusion and a combination of both processes on the physical and functional properties of the pearl millet flour (PMF) and pearl millet based instant beverage powder (PMIBP) produced. PMF and PMIBP were prepared by malting, extrusion and a combination of malting and extrusion cooking from two different varieties of pearl mi...
متن کاملd-Separation: From Theorems to Algorithms
An efficient algorithm is developed that identifies all independencies implied by the topology of a Baye sian network. Its correctness and maximality stems from the soundness and completeness of d separation with respect to probability theory. The al gorithm runs in time 0 (IE I ) where E is the number of edges in the network.
متن کامل