Abstract
This paper presents an extension of an ML style type system to support dependent product types for programs. The study is based on the lambda calculus with primitive recursion and a simple type system with primitive recursive sequences of types and products dependent on natural numbers. I show that it is possible in this system, called T π, to type a sensible primitive recursive function that is not typable in ML. The paper presents typing rules, a semantic model with soundness and completeness theorems, and examples of how to type representations of tuples and projections as products dependent on the tuple width. I discuss a method for type reconstruction that extends ML style type reconstruction to dependent types. The type system is a representation of an earlier system by Tait [9] and Martin Löf
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Luis Damas and Robin Milner. Principal type-schemes for functional programs. In Conference Record of the Ninth Annual ACM Symposium on Principles of Programming Languages, pages 207–212. ACM, January 1982.
R. Hindley. The principal type-scheme of an object in combinatory logic. Transactions of the American Mathematical Society, 146:29–60, December 1969.
R. Hindley. The completeness theorem for typing lambda terms. Theoretical Computer Science, 22:1–17, January 1983.
Per Martin-Löf. Infinite terms and a system of natural deduction. In Compositio Mathematical pages 93–103. Wolters-Noordhoof, 1972.
Per Martin-Löf. An intuitionistic theory of types: Predicative part. In H. E. Rose and J. C. Shepherdson, editors, Logic Colloquium '73, pages 73–118. North Holland, 1975.
Albert R. Meyer. What is a model of the lambda calculus? Information and Control, 52:87–122, 1982.
Bengt Nordström, Kent Petersson, and Jan Smith. Programming in Martin-Löf's Type Theory. Oxford University Press, New York, NY, 1990.
Atsushi Ohori. A simple semantics for ML polymorphism. In Functional Programming and Computer Architecture, 1989.
W. W. Tait. Infinitely long terms of transfinite type. In Crossley and Dummett, editors, Formal Systems and Recursive Functions, pages 177–185. North Holland, 1965.
David A. Turner. Sasl language manual. Technical report, University of St. Andrews, 1976.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nelson, N. (1992). Primitive recursive functional with dependent types. In: Brookes, S., Main, M., Melton, A., Mislove, M., Schmidt, D. (eds) Mathematical Foundations of Programming Semantics. MFPS 1991. Lecture Notes in Computer Science, vol 598. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55511-0_6
Download citation
DOI: https://doi.org/10.1007/3-540-55511-0_6
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55511-7
Online ISBN: 978-3-540-47194-3
eBook Packages: Springer Book Archive