Skip to main content Accessibility help

Proofs for free: Parametricity for dependent types


Reynolds' abstraction theorem (Reynolds, J. C. (1983) Types, abstraction and parametric polymorphism, Inf. Process.83(1), 513–523) 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 obtain a similar result for pure type systems (PTSs): for any PTS used as a programming language, there is a PTS that can be used as a logic for parametricity. Types in the source PTS are translated to relations (expressed as types) in the target. Similarly, values of a given type are translated to proofs that the values satisfy the relational interpretation. We extend the result to inductive families. We also show that the assumption that every term satisfies the parametricity condition generated by its type is consistent with the generated logic.

Hide All
Abadi, M., Cardelli, L. & Curien, P. (1993) Formal parametric polymorphism. In Proceedings of POPL'93 (Charleston, SC). New York: ACM, pp. 157170.
Barendregt., H. P. (1992) Lambda calculi with types. Handbook Log. Comput. Sci. 2, 117309.
Bernardy, J.-P. (2010) Lightweight free theorems: Agda library. Accessed March 13, 2012. Available at:
Bernardy, J.-P., Jansson, P. & Paterson, R. (2010) Parametricity and dependent types. In Proceedings of ICFP 2010 (Baltimore, MD, September 27–29). New York: ACM, pp. 345356.
Bernardy, J.-P. & Lasson, M. (2011) Realizability and parametricity in pure type systems. In the Proceedings of FoSSaCS 2011 (Saarbruecken, Germany, March 26–April 3), Hofmann, M. (ed), LNCS, vol. 6604. Berlin, Germany: Springer-Verlag, pp. 108122.
Böhm, C. & Berarducci, A. (1985) Automatic synthesis of typed lambda-programs on term algebras. Theor. Comp. Sci. 39 (2–3), 135154.
Böhme, S. (2007) Free Theorems for Sublanguages of Haskell. Master's thesis, Technische Universität Dresden, Netherlands.
Church, A. (1940) A formulation of the simple theory of types. J. Symb. Log. 5 (2), 5668.
Coquand, T. (1986) An analysis of Girard's paradox. In Logic in Computer Science, Meyer, A. R. & Chandra, A. K. (eds), Piscataway, NJ: IEEE, pp. 227236.
Coquand, T. (1992) Pattern matching with dependent types. In the Proceedings of the Workshop on Types for Proofs and Programs (Torino, Italy), pp. 6679.
Dybjer, P. (1994) Inductive families. Form. Asp. Comput. 6 (4), 440465.
Gibbons, J. & Paterson, R. (2009) Parametric data-type genericity. In the Proceedings of WGP 2009 (Edinburgh, UK, August 30) New York: ACM, pp. 8593.
Girard, J.-Y. (1972) Interprétation Fonctionnelle et Elimination Des Coupures de L'arithmétique D'ordre Supérieur, Thèeses d'état, Université de Paris, Paris, France.
Hofmann, M. & Streicher, T. (1996) The groupoid interpretation of type theory. In Venice Festschrift, Sambin, G. & Smith, J. (eds), Oxford, UK: Oxford University Press, pp. 83111.
Johann, P. & Voigtländer, J. (2006) The impact of seq on free theorems-based program transformations. Fundam. Inf. 69 (1–2), 63102.
Mairson, H. (1991) Outline of a proof theory of parametricity. In the Proceedings of FPCA 1991 (Cambridge, MA, August 26–30), LNCS, vol. 523. New York: Springer-Verlag, pp. 313327.
McBride, C. & McKinna, J. (2004) The view from the left. J. Funct. Program. 14 (01), 69111.
Miquel, A. (2001) Le Calcul des Constructions Implicite: Syntaxe et Sémantique. Theèses de Doctorat, Université Paris, Paris, France.
Monnier, S. & Haguenauer, D. (2010) Singleton types here, singleton types there, singleton types everywhere. In the Proceedings of PLPV 2010 (Madrid, Spain, January 19). New York: ACM, pp. 18.
Morris, P. & Altenkirch, T. (2009) Indexed containers. In the Proceedings of the Twenty-Fourth IEEE Symposium on Logic in Computer Science. Piscataway, NJ: IEEE, pp. 277285.
Neis, G., Dreyer, D. & Rossberg, A. (2009) Non-parametric parametricity. In Proceedings of ICFP 2009 (Los Angeles, August). New York: ACM, pp. 135148.
Norell, U. (2007) Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Chalmers Tekniska Högskola, Gothenburg, Sweden.
Oury, N. & Swierstra, W. (2008) The power of Pi. In the Proceedings of ICFP 2008 (Victoria, BC, Canada, September 20–28). New York: ACM, pp. 3950.
Paulin-Mohring, C. (1993) Inductive definitions in the system Coq – rules and properties. In Typed Lambda Calculi and Applications, Bezem, M. & Groote, J. F. (eds), Berlin, Germany: Springer pp. 328345.
Plotkin, G. & Abadi, M. (1993) A logic for parametric polymorphism. In the Proceedings of TLCA '93, (Utrecht, The Netherlands, March 16–18), LNCS, vol. 664. Berlin, Germany: Springer, pp. 361375.
Pouillard, N. (2011) Nameless, painless. In the Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming, ICFP '11 (Tokyo, Japan, September 19–21). New York: ACM, pp. 320332.
Reynolds, J. C. (1983) Types, abstraction and parametric polymorphism. Inf. Process. 83 (1), 513523.
The Coq Development Team. (2010) The Coq Proof Assistant. Reference manual. Available at:
Voigtländer, J. (2009) Free theorems involving type constructor classes: Funct. pearl. In the Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming (Edinburgh, UK, August 31–September 2). New York: ACM, pp. 173184.
Vytiniotis, D. & Weirich, S. (2010) Parametricity, type equality, and higher-order polymorphism. J. Funct. Program. 20 (02), 175210.
Wadler, P. (1989) Theorems for free! In the Proceedings of FPCA 1989 (London, UK, September 11–13). New York: ACM, pp. 347359.
Wadler, P. (2007) The Girard–Reynolds isomorphism. Theor. Comp. Sci. 375 (1–3), 201226.
Wadler, P. & Blott, S. (1989) How to make ad-hoc polymorphism less ad hoc. In the Proceedings of POPL'89 (Austin, TX, January 11–13). New York: ACM, pp. 6076.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Proofs for free: Parametricity for dependent types

Submit a response


No Discussions have been published for this article.


Reply to: Submit a response

Your details

Conflicting interests

Do you have any conflicting interests? *