Advertisement

Monadic Presentations of Lambda Terms Using Generalized Inductive Types

  • Thorsten Altenkirch
  • Bernhard Reus
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1683)

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 theory 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [Alt93a]
    T. Altenkirch. Constructions, Inductive Types and Strong Normalization. PhD thesis, University of Edinburgh, November 1993.Google Scholar
  2. [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
  3. [Alt98]
    T. Altenkirch. Logical relations and inductive/coinductive types. Proceedings of CSL 98, LNCS 1584, pages 343–354,1998.Google Scholar
  4. [Alt99]
    T. Altenkirch. Extensional equality in intensional type theory. In Proceedings of LICS 99, pages 412–420, 1999.Google Scholar
  5. [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
  6. [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
  7. [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
  8. [BP99]
    R. Bird and R. Paterson. de Bruijn notation as a nested datatype. Journal of Functional Programming, 9:77–91, 1999.zbMATHCrossRefMathSciNetGoogle Scholar
  9. [Dyb94]
    P. Dybjer. Inductive families. Formal Aspects of Computing, 6(4):440–465, 1994.zbMATHCrossRefGoogle Scholar
  10. [EL99]
    M. Emms and H. Leiss. Extending the type checker of Standard ML by polymorphic recursion. TCS, 212(1), 1999.Google Scholar
  11. [FPT99]
    M. Fiore, G. Plotkin, and D. Turi. Abstract syntax and variable binding. In Proceedings of LICS 99, pages 193–204,1999.Google Scholar
  12. [GLT89]
    J.-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types. Cambridge University Press, 1989.Google Scholar
  13. [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
  14. [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
  15. [Hof97]
    M. Hofmann. Semantics of Logics of Computation, chapter Syntax and Semantics of Dependent Types. Cambridge University Press, 1997.Google Scholar
  16. [Hof99]
    M. Hofmann. Semantical analysis in higher order abstract syntax. In Proceedings of LICS 99, pages 204–213, 1999.Google Scholar
  17. [Hue92]
    G. Huet. Constructive computation theory PART I. Notes de cours, 1992.Google Scholar
  18. [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
  19. [Man76]
    E. Manes. Algebraic Theories, volume 26 of Graduate Texts in Mathematics. Springer Verlag, 1976.Google Scholar
  20. [Mar84]
    P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis, 1984.Google Scholar
  21. [ML71]
    S. Mac Lane. Categories for the Working Mathematician. Springer Verlag, 1971.Google Scholar
  22. [Mog91]
    E. Moggi. Notions of computation and monads. Information and Computation, 93(1), 1991.Google Scholar
  23. [MP93]
    J. McKinna and R. Pollack. Pure type systems formalized. In Proceedings TLCA’93, LNCS 664, pages 289–305, 1993.Google Scholar
  24. [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
  25. [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

Authors and Affiliations

  • Thorsten Altenkirch
    • 1
  • Bernhard Reus
    • 1
  1. 1.Ludwig-Maximilians-UniversitätOettingenstr. 67Germany

Personalised recommendations