skip to main content
research-article

Parametricity and dependent types

Authors Info & Claims
Published:27 September 2010Publication History
Skip Abstract Section

Abstract

Reynolds' abstraction theorem shows how a typing judgement in System F can be translated into a relational statement (in second order predicate logic) about inhabitants of the type. We (in second order predicate logic) about inhabitants of the type. We obtain a similar result for a single lambda calculus (a pure type system), in which terms, types and their relations are expressed. Working within a single system dispenses with the need for an interpretation layer, allowing for an unusually simple presentation. While the unification puts some constraints on the type system (which we spell out), the result applies to many interesting cases, including dependently-typed ones.

Skip Supplemental Material Section

Supplemental Material

icfp-weds-1605-bernardy.mov

References

  1. }}T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In Proc. of the IFIP TC2/WG2.1 Working Conference on Generic Programming, pages 1--20. Kluwer, B.V., 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}H. P. Barendregt. Lambda calculi with types. Handbook of logic in computer science, 2:117--309, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}M. Benke, P. Dybjer, and P. Jansson. Universes for generic programs and proofs in dependent type theory. Nordic J. of Computing, 10(4):265--289, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}J.-P. Bernardy. A proof of the abstraction theorem for pure type systems (unary case). http://www.cse.chalmers.se/~bernardy/ParDep/html/Theorem.html, 2010.Google ScholarGoogle Scholar
  5. }}J.-P. Bernardy, P. Jansson, and K. Claessen. Testing polymorphic properties. In Proc. of ESOP 2010, volume 6012 of LNCS. Springer, 2010a. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}J.-P. Bernardy, P. Jansson, and R. Paterson. An abstraction theorem for pure type systems. Available from http://www.cse.chalmers.se/~bernardy/ParDep/abstraction-pts.pdf, 2010b.Google ScholarGoogle Scholar
  7. }}C. Böhm and A. Berarducci. Automatic synthesis of typed lambda programs on term algebras. Theor. Comp. Sci., 39(2--3):135--154, 1985.Google ScholarGoogle Scholar
  8. }}T. Coquand. An analysis of Girard's paradox. In Proc. of LICS 1986, pages 227--236. IEEE Comp. Society Press, 1986.Google ScholarGoogle Scholar
  9. }}T. Coquand. Pattern matching with dependent types. In Proc. of the Workshop on Types for Proofs and Programs, pages 66--79, 1992.Google ScholarGoogle Scholar
  10. }}P. Dybjer. Inductive families. Formal Aspects of Computing, 6(4):440--465, 1994.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}J. Gibbons and R. Paterson. Parametric datatype-genericity. In Proc. of WGP 2009, pages 85--93, Edinburgh, Scotland, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}A. Gill, J. Launchbury, and S. L. Peyton Jones. A short cut to deforestation. In Proc. of FPCA, pages 223--232, Copenhagen, Denmark, 1993. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}J. Y. Girard. Interprétation fonctionnelle et elimination des coupures de l'arithmétique d'ordre supérieur. Thèse d'état, Université de Paris 7, 1972.Google ScholarGoogle Scholar
  14. }}R. Hinze. Church numerals, twice! J. Funct. Program., 15(1):1--13, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}P. Johann. A generalization of short-cut fusion and its correctness proof. Higher-Order and Symbol. Comput., 15(4):273--300, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}P. Johann and J. Voigtländer. The impact of seq on free theorems-based program transformations. Fundam. Inf., 69(1--2):63--102, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}C. McBride and J. McKinna. The view from the left. J. Funct. Program., 14(01):69--111, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}A. Miquel. Le Calcul des Constructions implicite: syntaxe et sémantique. Thèse de doctorat, Université Paris 7, 2001.Google ScholarGoogle Scholar
  19. }}S. Monnier and D. Haguenauer. Singleton types here, singleton types there, singleton types everywhere. In Proc. of PLPV 2010, pages 1--8, Madrid, Spain, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}G. Neis, D. Dreyer, and A. Rossberg. Non-parametric parametricity. In Proc. of ICFP 2009, pages 135--148, Edinburgh, Scotland, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers Tekniska Höskola, 2007.Google ScholarGoogle Scholar
  22. }}N. Oury and W. Swierstra. The power of Pi. In Proc. of ICFP 2008, pages 39--50, Victoria, BC, Canada, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}C. Paulin-Mohring. Inductive definitions in the system Coq - rules and properties. In Typed Lambda Calculi and Applications, pages 328--345. Springer, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}G. Plotkin and M. Abadi. A logic for parametric polymorphism. In LNCS, volume 664, page 361--375. Springer-Verlag, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}J. C. Reynolds. Types, abstraction and parametric polymorphism. Information processing, 83(1):513--523, 1983.Google ScholarGoogle Scholar
  26. }}I. Takeuti. The theory of parametricity in lambda cube. Manuscript, 2004.Google ScholarGoogle Scholar
  27. }}The Coq development team. The Coq proof assistant, 2010.Google ScholarGoogle Scholar
  28. }}J. Voigtländer. Bidirectionalization for free! (Pearl). In Proc. of POPL 2009, pages 165--176, Savannah, GA, USA, 2009a. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}J. Voigtländer. Free theorems involving type constructor classes: Funct. pearl. SIGPLAN Not., 44(9):173--184, 2009b. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}D. Vytiniotis and S. Weirich. Type-safe cast does no harm: Syntactic parametricity for Fω and beyond. Preliminary version of "Parametricity, Type Equality and Higher-order Polymorphism", 2009.Google ScholarGoogle Scholar
  31. }}D. Vytiniotis and S. Weirich. Parametricity, type equality, and higher-order polymorphism. J. Funct. Program., 20(2):175--210, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}P. Wadler. Theorems for free! In Proc. of FPCA 1989, pages 347--359, Imperial College, London, United Kingdom, 1989. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}P. Wadler. The Girard-Reynolds isomorphism. Theor. Comp. Sci., 375(1-3):201--226, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In POPL'89, pages 60--76. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Parametricity and dependent types

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 45, Issue 9
      ICFP '10
      September 2010
      382 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1932681
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
        September 2010
        398 pages
        ISBN:9781605587943
        DOI:10.1145/1863543

      Copyright © 2010 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 27 September 2010

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    ePub

    View this article in ePub.

    View ePub
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!