Monadic Presentations of Lambda Terms Using Generalized Inductive Types
Conference paper
First Online:
Abstract
We present a definition of untyped λ-terms using a heterogeneous datatype, i.e. an inductively defined operator. This operator can be extended to a Kleisli triple, which is a concise way to verify the substitution laws for λ-calculus. We also observe that repetitions in the definition of the monad as well as in the proofs can be avoided by using well-founded recursion and induction instead of structural induction. We extend the construction to the simply typed λ-calculus using dependent types, and show that this is an instance of a generalization of Kleisli triples. The proofs for the untyped case have been checked using the LEGO system.
Keywords
Type Theory inductive types λ-calculus category theoryPreview
Unable to display preview. Download preview PDF.
References
- [Alt93a]T. Altenkirch. Constructions, Inductive Types and Strong Normalization. PhD thesis, University of Edinburgh, November 1993.Google Scholar
- [Alt93b]T. Altenkirch. A formalization of the strong normalization proof for System F in LEGO. In J.F. Groote M. Bezem, editor, Typed Lambda Calculi and Applications, LNCS 664, pages 13–28, 1993.CrossRefGoogle Scholar
- [Alt98]T. Altenkirch. Logical relations and inductive/coinductive types. Proceedings of CSL 98, LNCS 1584, pages 343–354,1998.Google Scholar
- [Alt99]T. Altenkirch. Extensional equality in intensional type theory. In Proceedings of LICS 99, pages 412–420, 1999.Google Scholar
- [AP93]M. Abadi and G. Plotkin. A logic for parametric polymorphism. In Typed Lambda Calculi and Applications-TLCA’ 93, pages 361–375, 1993.Google Scholar
- [BH94]F. Bellegarde and J. Hook. Substitution: A formal methods case study using monads and transformations. Science of Computer Programming, 23(2-3), 1994.Google Scholar
- [BM98]R. Bird and L. Meertens. Nested datatypes. In J. Jeuring, editor, Mathematics of Program Construction, number 1422 in LNCS, pages 52–67. Springer Verlag, 1998.CrossRefGoogle Scholar
- [BP99]R. Bird and R. Paterson. de Bruijn notation as a nested datatype. Journal of Functional Programming, 9:77–91, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
- [Dyb94]P. Dybjer. Inductive families. Formal Aspects of Computing, 6(4):440–465, 1994.zbMATHCrossRefGoogle Scholar
- [EL99]M. Emms and H. Leiss. Extending the type checker of Standard ML by polymorphic recursion. TCS, 212(1), 1999.Google Scholar
- [FPT99]M. Fiore, G. Plotkin, and D. Turi. Abstract syntax and variable binding. In Proceedings of LICS 99, pages 193–204,1999.Google Scholar
- [GLT89]J.-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types. Cambridge University Press, 1989.Google Scholar
- [HJW+92]P. Hudak et al. Report on the programming language Haskell: a non-strict, purely functional language (version 1.2). ACM SIGPLAN Notices, 27(5), May 1992.Google Scholar
- [HMM86]R. Harper, D. MacQueen, and R. Milner. Standard ML. Technical Report ECS-LFCS-86-2, Department of Computer Science, University of Edinburgh, 1986.Google Scholar
- [Hof97]M. Hofmann. Semantics of Logics of Computation, chapter Syntax and Semantics of Dependent Types. Cambridge University Press, 1997.Google Scholar
- [Hof99]M. Hofmann. Semantical analysis in higher order abstract syntax. In Proceedings of LICS 99, pages 204–213, 1999.Google Scholar
- [Hue92]G. Huet. Constructive computation theory PART I. Notes de cours, 1992.Google Scholar
- [LP92]Z. Luo and R. Pollack. The LEGO proof development system: A user’s manual. LFCS report ECS-LFCS-92-211, University of Edinburgh, 1992.Google Scholar
- [Man76]E. Manes. Algebraic Theories, volume 26 of Graduate Texts in Mathematics. Springer Verlag, 1976.Google Scholar
- [Mar84]P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis, 1984.Google Scholar
- [ML71]S. Mac Lane. Categories for the Working Mathematician. Springer Verlag, 1971.Google Scholar
- [Mog91]E. Moggi. Notions of computation and monads. Information and Computation, 93(1), 1991.Google Scholar
- [MP93]J. McKinna and R. Pollack. Pure type systems formalized. In Proceedings TLCA’93, LNCS 664, pages 289–305, 1993.Google Scholar
- [RA99]B. Reus and T. Altenkirch. The implementation of the ?-monad in LEGO. Available on the WWW at: http://www.informatik.uni-muenchen.de/~reus/drafts/lambda.html, March 1999.Google Scholar
- [Wad89]P. Wadler. Theorems for free! In 4’th Symposium on Functional Programming Languages and Computer Architecture, ACM, London, September 1989.Google Scholar
Copyright information
© Springer-Verlag Berlin Heidelberg 1999