Principal Typings for Explicit Substitutions Calculi
Having principal typings (for short PT) is an important property of type systems. In simply typed systems, this property guarantees the possibility of a complete and terminating type inference mechanism. It is well-known that the simply typed λ-calculus has this property but recently J.B. Wells has introduced a system-independent definition of PT, which allows to prove that some type systems, e.g. the Hindley/Milner type system, do not satisfy PT. Explicit substitutions address a major computational drawback of the λ-calculus and allow the explicit treatment of the substitution operation to formally correspond to its implementation. Several extensions of the λ-calculus with explicit substitution have been given but some of which do not preserve basic properties such as the preservation of strong normalization. We consider two systems of explicit substitutions (λs e and λσ) and show that they can be accommodated with an adequate notion of PT. Specifically, our results are as follows:
∙ We introduce PT notions for the simply typed versions of the λs e - and the λσ-calculi and prove that they agree with Wells’ notion of PT.
∙ We show that these versions satisfy PT by revisiting previously introduced type inference algorithms.
Keywordslambda-calculus explicit substitution principal typings
Unable to display preview. Download preview PDF.
- [AyMu2000]Ayala-Rincón, M., Muñoz, C.: Explicit Substitutions and All That. Revista Colombiana de Computación 1(1), 47–71 (2000)Google Scholar
- [Bo95]Borovanský, P.: Implementation of Higher-Order Unification Based on Calculus of Explicit Substitutions. In: Bartošek, M., Staudek, J., Wiedermann, J. (eds.) SOFSEM 1995. LNCS, vol. 1012, pp. 363–368. Springer, Heidelberg (1995)Google Scholar
- [deBru72]de Bruijn, N.G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae 34, 381–392 (1972)Google Scholar
- [Jim96]Jim, T.: What are principal typings and what are they good for? In: Proc. of POPL 1995: Symp. on Principles of Programming Languages, pp. 42–53. ACM, New York (1996)Google Scholar