Isomorphisms considered as equalities: Projecting functions and enhancing partial application through an implementation of λ+

We propose an implementation of λ+, a recently introduced simply typed lambda-calculus with pairs where isomorphic types are made equal. The rewrite system of λ+ is a rewrite system modulo an equivalence relation, which makes its implementation non-trivial. We also extend λ+ with natural numbers and general recursion and use Bekić's theorem to split mutual recursions. This splitting, together with the features of λ+, allows for a novel way of program transformation by reduction, by projecting a function before it is applied in order to simplify it. Also, currying together with the associativity and commutativity of pairs gives an enhanced form of partial application.

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

[2]  Simona Ronchi Della Rocca,et al.  Bounding normalization time through intersection types , 2012, ITRS.

[3]  Jacques Garrigue,et al.  The typed polymorphic label-selective λ-calculus , 1994, POPL '94.

[4]  Hans Bekic,et al.  Definable Operation in General Algebras, and the Theory of Automata and Flowcharts , 1984, Programming Languages and Their Definition.

[5]  Mariangiola Dezani-Ciancaglini,et al.  Intersection and Union Types: Syntax and Semantics , 1995, Inf. Comput..

[6]  Stéphane Lengrand,et al.  Non-idempotent intersection types and strong normalisation , 2013, Log. Methods Comput. Sci..

[7]  Joshua Dunfield,et al.  Elaborating intersection and union types , 2012, Journal of Functional Programming.

[8]  Giulio Manzonetto,et al.  Call-by-Value Non-determinism in a Linear Logic Type Discipline , 2013, LFCS.

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

[10]  Ugo de'Liguoro,et al.  Non deterministic extensions of untyped-calculus , 1995 .

[11]  Elaine Pimentel,et al.  Intersection Types from a Proof-theoretic Perspective , 2012, Fundam. Informaticae.

[12]  Ugo de'Liguoro,et al.  Non Deterministic Extensions of Untyped Lambda-Calculus , 1995, Inf. Comput..

[13]  Antonio Bucciarelli,et al.  A relational semantics for parallelism and non-determinism in a functional setting , 2012, Ann. Pure Appl. Log..

[14]  Gérard Boudol,et al.  Lambda-Calculi for (Strict) Parallel Functions , 1994, Inf. Comput..

[15]  Gilles Dowek,et al.  Quantum superpositions and projective measurement in the lambda calculus , 2016, ArXiv.

[16]  Michele Pagani,et al.  Linearity, Non-determinism and Solvability , 2010, Fundam. Informaticae.

[17]  Roberto Di Cosmo,et al.  Provable isomorphisms of types , 1992, Mathematical Structures in Computer Science.

[18]  Pablo Arrighi,et al.  A System F accounting for scalars , 2009, 0903.3741.

[19]  Benoît Valiron,et al.  The Vectorial Lambda-Calculus , 2013, ArXiv.

[20]  Delia Kesner,et al.  Quantitative Types for the Linear Substitution Calculus , 2014, IFIP TCS.

[21]  Luca Padovani,et al.  Polymorphic functions with set-theoretic types: part 1: syntax, semantics, and evaluation , 2014, POPL.

[22]  Gilles Dowek,et al.  Simply Typed Lambda-Calculus Modulo Type Isomorphisms , 2015, ArXiv.

[23]  Benoît Valiron,et al.  The vectorial λ-calculus , 2017, Inf. Comput..