The Exp-Log Normal Form of Types and Canonical Terms for Lambda Calculus with Sums

In the presence of sum types, the eta-long beta-normal form of terms of lambda calculus is not canonical. Natural deduction systems for intuitionistic logic (with disjunction) suffer the same defect, thanks to the Curry-Howard correspondence. This canonicity problem has been open in Proof Theory since the 1960s, while it has been addressed in Computer Science, since the 1990s, by a number of authors using de- cision procedures: instead of deriving a notion of syntactic canonical normal form, one gives a procedure based on program analysis to de- cide when any two terms of the lambda calculus with sum types are essentially the same one. In this paper, we show the canonicity problem is difficult because it is too specialized: rather then picking a canonical representative out of a class of beta-eta-equal terms of a given type, one should do so for the enlarged class of terms that are of a type isomorphic to the given one. We isolate a type normal form, ENF, generalizing the usual disjunctive normal form to handle exponentials, and we show that the eta-long beta-normal form of terms at ENF type is canonical, when the eta axiom for sums is expressed via evaluation contexts. By coercing terms from a given type to its isomorphic ENF type, our technique gives unique canonical representatives for examples that had previously been handled using program analysis.

[1]  Danko Ilik An interpretation of the Sigma-2 fragment of classical Analysis in System T , 2013 .

[2]  G. Kreisel A Survey of Proof Theory II , 1971 .

[3]  Roberto Di Cosmo,et al.  Extensional normalisation and type-directed partial evaluation for typed lambda calculus with sums , 2004, POPL.

[4]  Danko Ilik Type Directed Partial Evaluation for Level-1 Shift and Reset , 2013 .

[5]  Daniel J. Dougherty,et al.  Equality between Functionals in the Presence of Coproducts , 2000, Inf. Comput..

[6]  Daniel J. Dougherty Some Lambda Calculi with Categorial Sums and Products , 1993, RTA.

[7]  Danko Ilik,et al.  Axioms and decidability for type isomorphism in the presence of sums , 2014, CSL-LICS.

[8]  Sam Lindley,et al.  Extensional Rewriting with Sums , 2007, TLCA.

[9]  H. Friedman Equality between functionals , 1975 .

[10]  Roberto Di Cosmo,et al.  Remarks on isomorphisms in typed lambda calculi with empty and sum types , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[11]  Martin Hofmann,et al.  Normalization by evaluation for typed lambda calculus with coproducts , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[12]  Vincent Balat,et al.  Keeping sums under control , 2004 .

[13]  P. Schroeder-Heister,et al.  Identity of Proofs Based on Normalization and Generality , 2002 .

[14]  D. Prawitz Ideas and Results in Proof Theory , 1971 .

[15]  Roberto Di Cosmo,et al.  A Confluent Reduction for the Extensional Typed lambda-Calculus with Pairs, Sums, Recursion and terminal Object , 1993, ICALP.

[16]  Neil Ghani,et al.  ßn-Equality for Coproducts , 1995, TLCA.

[17]  T. J. I'A. B. Orders of Infinity: the “Infinitärcalcül” of Paul du Bois-Reymond , 1911, Nature.

[18]  Dale Miller,et al.  Focusing and Polarization in Intuitionistic Logic , 2007, CSL.

[19]  R. D. Cosmo,et al.  A confluent reduction for the extensional typed λ − calculus with pairs , sums , recursion and terminal object , 1993 .

[20]  Danko Ilik Continuation-passing style models complete for intuitionistic logic , 2013, Ann. Pure Appl. Log..