skip to main content
research-article

A relationally parametric model of dependent type theory

Published:08 January 2014Publication History
Skip Abstract Section

Abstract

Reynolds' theory of relational parametricity captures the invariance of polymorphically typed programs under change of data representation. Reynolds' original work exploited the typing discipline of the polymorphically typed lambda-calculus System F, but there is now considerable interest in extending relational parametricity to type systems that are richer and more expressive than that of System F.

This paper constructs parametric models of predicative and impredicative dependent type theory. The significance of our models is twofold. Firstly, in the impredicative variant we are able to deduce the existence of initial algebras for all indexed=functors. To our knowledge, ours is the first account of parametricity for dependent types that is able to lift the useful deduction of the existence of initial algebras in parametric models of System F to the dependently typed setting. Secondly, our models offer conceptual clarity by uniformly expressing relational parametricity for dependent types in terms of reflexive graphs, which allows us to unify the interpretations of types and kinds, instead of taking the relational interpretation of types as a primitive notion. Expressing our model in terms of reflexive graphs ensures that it has canonical choices for the interpretations of the standard type constructors of dependent type theory, except for the interpretation of the universe of small types, where we formulate a refined interpretation tailored for relational parametricity. Moreover, our reflexive graph model opens the door to generalisations of relational parametricity, for example to higher-dimensional relational parametricity.

Skip Supplemental Material Section

Supplemental Material

d3_right_t2.mp4

References

  1. . Atkey. A Deep Embedding of Parametric Polymorphism in Coq. Proc., Workshop on Mechanising Metatheory, 2009.Google ScholarGoogle Scholar
  2. R. Atkey. Relational Parametricity for Higher Kinds. Proc., Computer Science Logic, pp. 46--61, 2012.Google ScholarGoogle Scholar
  3. . Atkey, P. Johann, and A. Kennedy. Abstraction and Invariance for Algebraically Indexed Types. Proc., Principles of Programming Languages, pp. 87--100, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. . S. Bainbridge, P. J. Freyd, A. Scedrov, and P. J. Scott. Functorial Polymorphism. Theoretical Computer Science 70(1), pp. 35--64, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. .-P. Bernardy, P. Jansson, and R. Paterson. Proofs for Free - Parametricity for Dependent Types. Journal of Functional Programming 22(2), pp. 107--152, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. . Bove, P. Dybjer, and U. Norell. A Brief Overview of Agda -- A Functional Language with Dependent Types. Proc., Theorem Proving in Higher Order Logics, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. . Cheney and R. Hinze. A lightweight implementation of generics and dynamics. Proc., Workshop on Haskell, pp. 90--104, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. . Chlipala. Parametric higher-order abstract syntax for mechanized semantics. Proc., International Conference on Functional Programming, pp. 143--156, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. he Coq Development Team. The Coq proof assistant reference manual. LogiCal Project, Version 8.0, 2004.Google ScholarGoogle Scholar
  10. . Coquand and G. P. Huet. The Calculus of Constructions. Information and Computation 76(2/3), pp. 95--120, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. . Dunphy and U. S. Reddy. Parametric Limits. Proc., Logic in Computer Science, pp. 242--251, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. . Dybjer. Internal Type Theory. Proc., Types for Proofs and Programs, pp. 120--134, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. . Hasegawa. Categorical Data Types in Parametric Polymorphism. Mathematical Structures in Computer Science 4(1), pp. 71--109, 1994.Google ScholarGoogle Scholar
  14. . Hasegawa. Relational Limits in General Polymorphism. Publications of the Research Institute for Mathematical Sciences 30, pp. 535--576, 1994.Google ScholarGoogle Scholar
  15. . Hofmann. Syntax and Semantics of Dependent Types. In Semantics and Logics of Computation, Cambridge University Press, pp. 79--130, 1997.Google ScholarGoogle ScholarCross RefCross Ref
  16. . Hofmann and T. Streicher. Lifting Grothendieck Universes. Unpublished manuscript. 199?Google ScholarGoogle Scholar
  17. . Jacobs. Categorical Logic and Type Theory. Elsevier, 1999.Google ScholarGoogle Scholar
  18. . Johann. Short Cut Fusion: Proved and Improved. Proc., Semantics, Application, and Implementation of Program Generation, pp. 47--71, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. . Krishnaswami and D. Dreyer. Internalizing Relational Parametricity in the Extensional Calculus of Constructions. Proc., Computer Science Logic, 2013.Google ScholarGoogle Scholar
  20. . Mac Lane. Categories for the Working Mathematician, Second Edition. Springer-Verlag, 1998.Google ScholarGoogle Scholar
  21. . G. Mairson. Outline of a Proof Theory of Parametricity. Proc., Functional Programming Languages and Computer Architecture, pp. 313--327, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. . Martin-Löf. Intuitionistic Type Theory. Bibliopolis, 1984.Google ScholarGoogle Scholar
  23. . Nanevski, A. Banerjee,D. Garg. Dependent Type Theory for Verification of Information Flowand Access Control Policies. ACM Transactions on Programming Languages and Systems 35(2), pp. 6:1--6:41, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. . M. Pitts. Parametric Polymorphism and Operational Equivalence. Mathematical Structures in Computer Science 10, pp. 321--359, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. . D. Plotkin. Lambda Definability and Logical Relations. Technical Report, University of Edinburgh, 1973.Google ScholarGoogle Scholar
  26. . D. Plotkin and M. Abadi. A Logic for Parametric Polymorphism. Proc., Typed Lambda Calculi and Applications, pp. 361--375, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. . C. Reynolds. Polymorphism is Not Set-Theoretic. Proc., Semantics of Data Types, pp. 145--156, 1984.Google ScholarGoogle ScholarCross RefCross Ref
  28. . C. Reynolds. Types, Abstraction and Parametric Polymorphism. Information Processing 83, pp. 513--523, 1983.Google ScholarGoogle Scholar
  29. . Robinson. Parametricity as Isomorphism. Theoretical Computer Science 136, pp. 163--181, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. . Robinson and G. Rosolini. ReflexiveGraphs and Parametric Polymorphism. Proc., Logic in Computer Science, pp. 364--371, 1994.Google ScholarGoogle Scholar
  31. . Takeuti. The Theory of Parametricity in the Lambda Cube. Technical Report 1217, Kyoto University, 2001.Google ScholarGoogle Scholar
  32. he Univalent Foundations Program. Homotopy Type Theory. Institute for Advanced Study, 2013.Google ScholarGoogle Scholar
  33. D. Vytiniotis and S. WeirichParametricity, Type Equality, and Higher-Order Polymorphism. Journal of Functional Programming 20(2), pp. 175--201, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. . Wadler. The Girard-Reynolds Isomorphism (second edition). Theoretical Computer Science 375(1--3), pp. 201--226, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. . Wadler. Theorems for Free! Proc., Functional Programming Languages and Computer Architecture, pp. 347--359, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A relationally parametric model of dependent type theory

        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 49, Issue 1
          POPL '14
          January 2014
          661 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2578855
          Issue’s Table of Contents
          • cover image ACM Conferences
            POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
            January 2014
            702 pages
            ISBN:9781450325448
            DOI:10.1145/2535838

          Copyright © 2014 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 8 January 2014

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

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

        Learn more

        Got it!