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.
Supplemental Material
- }}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 Scholar
Digital Library
- }}H. P. Barendregt. Lambda calculi with types. Handbook of logic in computer science, 2:117--309, 1992. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
- }}J.-P. Bernardy, P. Jansson, and K. Claessen. Testing polymorphic properties. In Proc. of ESOP 2010, volume 6012 of LNCS. Springer, 2010a. Google Scholar
Digital Library
- }}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 Scholar
- }}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 Scholar
- }}T. Coquand. An analysis of Girard's paradox. In Proc. of LICS 1986, pages 227--236. IEEE Comp. Society Press, 1986.Google Scholar
- }}T. Coquand. Pattern matching with dependent types. In Proc. of the Workshop on Types for Proofs and Programs, pages 66--79, 1992.Google Scholar
- }}P. Dybjer. Inductive families. Formal Aspects of Computing, 6(4):440--465, 1994.Google Scholar
Digital Library
- }}J. Gibbons and R. Paterson. Parametric datatype-genericity. In Proc. of WGP 2009, pages 85--93, Edinburgh, Scotland, 2009. ACM. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}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 Scholar
- }}R. Hinze. Church numerals, twice! J. Funct. Program., 15(1):1--13, 2005. Google Scholar
Digital Library
- }}P. Johann. A generalization of short-cut fusion and its correctness proof. Higher-Order and Symbol. Comput., 15(4):273--300, 2002. Google Scholar
Digital Library
- }}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 Scholar
Digital Library
- }}C. McBride and J. McKinna. The view from the left. J. Funct. Program., 14(01):69--111, 2004. Google Scholar
Digital Library
- }}A. Miquel. Le Calcul des Constructions implicite: syntaxe et sémantique. Thèse de doctorat, Université Paris 7, 2001.Google Scholar
- }}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 Scholar
Digital Library
- }}G. Neis, D. Dreyer, and A. Rossberg. Non-parametric parametricity. In Proc. of ICFP 2009, pages 135--148, Edinburgh, Scotland, 2009. ACM. Google Scholar
Digital Library
- }}U. Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers Tekniska Höskola, 2007.Google Scholar
- }}N. Oury and W. Swierstra. The power of Pi. In Proc. of ICFP 2008, pages 39--50, Victoria, BC, Canada, 2008. ACM. Google Scholar
Digital Library
- }}C. Paulin-Mohring. Inductive definitions in the system Coq - rules and properties. In Typed Lambda Calculi and Applications, pages 328--345. Springer, 1993. Google Scholar
Digital Library
- }}G. Plotkin and M. Abadi. A logic for parametric polymorphism. In LNCS, volume 664, page 361--375. Springer-Verlag, 1993. Google Scholar
Digital Library
- }}J. C. Reynolds. Types, abstraction and parametric polymorphism. Information processing, 83(1):513--523, 1983.Google Scholar
- }}I. Takeuti. The theory of parametricity in lambda cube. Manuscript, 2004.Google Scholar
- }}The Coq development team. The Coq proof assistant, 2010.Google Scholar
- }}J. Voigtländer. Bidirectionalization for free! (Pearl). In Proc. of POPL 2009, pages 165--176, Savannah, GA, USA, 2009a. ACM. Google Scholar
Digital Library
- }}J. Voigtländer. Free theorems involving type constructor classes: Funct. pearl. SIGPLAN Not., 44(9):173--184, 2009b. Google Scholar
Digital Library
- }}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 Scholar
- }}D. Vytiniotis and S. Weirich. Parametricity, type equality, and higher-order polymorphism. J. Funct. Program., 20(2):175--210, 2010. Google Scholar
Digital Library
- }}P. Wadler. Theorems for free! In Proc. of FPCA 1989, pages 347--359, Imperial College, London, United Kingdom, 1989. ACM. Google Scholar
Digital Library
- }}P. Wadler. The Girard-Reynolds isomorphism. Theor. Comp. Sci., 375(1-3):201--226, 2007. Google Scholar
Digital Library
- }}P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In POPL'89, pages 60--76. ACM, 1989. Google Scholar
Digital Library
Index Terms
Parametricity and dependent types
Recommendations
Parametricity and dependent types
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programmingReynolds' 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 ...
Theorems for free for free: parametricity, with and without types
The polymorphic blame calculus integrates static typing, including universal types, with dynamic typing. The primary challenge with this integration is preserving parametricity: even dynamically-typed code should satisfy it once it has been cast to a ...
Relational parametricity for references and recursive types
TLDI '09: Proceedings of the 4th international workshop on Types in language design and implementationWe present a possible world semantics for a call-by-value higher-order programming language with impredicative polymorphism, general references, and recursive types. The model is one of the first relationally parametric models of a programming language ...







Comments