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.
Supplemental Material
- . Atkey. A Deep Embedding of Parametric Polymorphism in Coq. Proc., Workshop on Mechanising Metatheory, 2009.Google Scholar
- R. Atkey. Relational Parametricity for Higher Kinds. Proc., Computer Science Logic, pp. 46--61, 2012.Google Scholar
- . Atkey, P. Johann, and A. Kennedy. Abstraction and Invariance for Algebraically Indexed Types. Proc., Principles of Programming Languages, pp. 87--100, 2013. Google Scholar
Digital Library
- . S. Bainbridge, P. J. Freyd, A. Scedrov, and P. J. Scott. Functorial Polymorphism. Theoretical Computer Science 70(1), pp. 35--64, 1990. Google Scholar
Digital Library
- .-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 Scholar
Digital Library
- . 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 Scholar
Digital Library
- . Cheney and R. Hinze. A lightweight implementation of generics and dynamics. Proc., Workshop on Haskell, pp. 90--104, 2002. Google Scholar
Digital Library
- . Chlipala. Parametric higher-order abstract syntax for mechanized semantics. Proc., International Conference on Functional Programming, pp. 143--156, 2008. Google Scholar
Digital Library
- he Coq Development Team. The Coq proof assistant reference manual. LogiCal Project, Version 8.0, 2004.Google Scholar
- . Coquand and G. P. Huet. The Calculus of Constructions. Information and Computation 76(2/3), pp. 95--120, 1988. Google Scholar
Digital Library
- . Dunphy and U. S. Reddy. Parametric Limits. Proc., Logic in Computer Science, pp. 242--251, 2004. Google Scholar
Digital Library
- . Dybjer. Internal Type Theory. Proc., Types for Proofs and Programs, pp. 120--134, 1996. Google Scholar
Digital Library
- . Hasegawa. Categorical Data Types in Parametric Polymorphism. Mathematical Structures in Computer Science 4(1), pp. 71--109, 1994.Google Scholar
- . Hasegawa. Relational Limits in General Polymorphism. Publications of the Research Institute for Mathematical Sciences 30, pp. 535--576, 1994.Google Scholar
- . Hofmann. Syntax and Semantics of Dependent Types. In Semantics and Logics of Computation, Cambridge University Press, pp. 79--130, 1997.Google Scholar
Cross Ref
- . Hofmann and T. Streicher. Lifting Grothendieck Universes. Unpublished manuscript. 199?Google Scholar
- . Jacobs. Categorical Logic and Type Theory. Elsevier, 1999.Google Scholar
- . Johann. Short Cut Fusion: Proved and Improved. Proc., Semantics, Application, and Implementation of Program Generation, pp. 47--71, 2001. Google Scholar
Digital Library
- . Krishnaswami and D. Dreyer. Internalizing Relational Parametricity in the Extensional Calculus of Constructions. Proc., Computer Science Logic, 2013.Google Scholar
- . Mac Lane. Categories for the Working Mathematician, Second Edition. Springer-Verlag, 1998.Google Scholar
- . G. Mairson. Outline of a Proof Theory of Parametricity. Proc., Functional Programming Languages and Computer Architecture, pp. 313--327, 1991. Google Scholar
Digital Library
- . Martin-Löf. Intuitionistic Type Theory. Bibliopolis, 1984.Google Scholar
- . 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 Scholar
Digital Library
- . M. Pitts. Parametric Polymorphism and Operational Equivalence. Mathematical Structures in Computer Science 10, pp. 321--359, 2000. Google Scholar
Digital Library
- . D. Plotkin. Lambda Definability and Logical Relations. Technical Report, University of Edinburgh, 1973.Google Scholar
- . D. Plotkin and M. Abadi. A Logic for Parametric Polymorphism. Proc., Typed Lambda Calculi and Applications, pp. 361--375, 1993. Google Scholar
Digital Library
- . C. Reynolds. Polymorphism is Not Set-Theoretic. Proc., Semantics of Data Types, pp. 145--156, 1984.Google Scholar
Cross Ref
- . C. Reynolds. Types, Abstraction and Parametric Polymorphism. Information Processing 83, pp. 513--523, 1983.Google Scholar
- . Robinson. Parametricity as Isomorphism. Theoretical Computer Science 136, pp. 163--181, 1994. Google Scholar
Digital Library
- . Robinson and G. Rosolini. ReflexiveGraphs and Parametric Polymorphism. Proc., Logic in Computer Science, pp. 364--371, 1994.Google Scholar
- . Takeuti. The Theory of Parametricity in the Lambda Cube. Technical Report 1217, Kyoto University, 2001.Google Scholar
- he Univalent Foundations Program. Homotopy Type Theory. Institute for Advanced Study, 2013.Google Scholar
- D. Vytiniotis and S. WeirichParametricity, Type Equality, and Higher-Order Polymorphism. Journal of Functional Programming 20(2), pp. 175--201, 2010. Google Scholar
Digital Library
- . Wadler. The Girard-Reynolds Isomorphism (second edition). Theoretical Computer Science 375(1--3), pp. 201--226, 2007. Google Scholar
Digital Library
- . Wadler. Theorems for Free! Proc., Functional Programming Languages and Computer Architecture, pp. 347--359, 1989. Google Scholar
Digital Library
Index Terms
A relationally parametric model of dependent type theory
Recommendations
A relationally parametric model of dependent type theory
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesReynolds' 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, ...
Parametric quantifiers for dependent type theory
Polymorphic type systems such as System F enjoy the parametricity property: polymorphic functions cannot inspect their type argument and will therefore apply the same algorithm to any type they are instantiated on. This idea is formalized mathematically ...
State Dependent IO-Monads in Type Theory
We introduce the notion of state dependent interactive programs for Martin-Löf Type Theory. These programs are elements of coalgebras of certain endofunctors on the presheaf category S→Set. We prove the existence of final coalgebras for these functors. ...







Comments