Proof-Relevant Parametricity

Part of the Lecture Notes in Computer Science book series (LNCS, volume 9600)


Parametricity is one of the foundational principles which underpin our understanding of modern programming languages. Roughly speaking, parametricity expresses the hidden invariants that programs satisfy by formalising the intuition that programs map related inputs to related outputs. Traditionally parametricity is formulated with proof-irrelevant relations but programming in Type Theory requires an extension to proof-relevant relations. But then one might ask: can our proofs that polymorphic functions are parametric be parametric themselves? This paper shows how this can be done and, excitingly, our answer requires a trip into the world of higher dimensional parametricity.



We thank Bob Atkey, Peter Hancock and the anonymous reviewers for helpful discussions and comments.


  1. Atkey, R.: Relational parametricity for higher kinds. In: Cégielski, P., Durand, A. (eds.) CSL 2012. LIPIcs, vol. 16, pp. 46–61. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, Dagstuhl (2012)Google Scholar
  2. Atkey, R., Ghani, N., Johann, P.: A relationally parametric model of dependent type theory. In: POPL, pp. 503–515. ACM (2014)Google Scholar
  3. Bernardy, J.P., Coquand, T., Moulin, G.: A presheaf model of parametric type theory. In: Ghica, D.R. (ed.) MFPS, pp. 17–33. ENTCS, Elsevier, Amsterdam (2015)Google Scholar
  4. Bernardy, J.P., Jansson, P., Paterson, R.: Proofs for free. J. Funct. Program. 22, 107–152 (2012)MathSciNetCrossRefzbMATHGoogle Scholar
  5. Bezem, M., Coquand, T., Huber, S.: A model of type theory in cubical sets. In: Types for Proofs and Programs (TYPES 2013). Leibniz International Proceedings in Informatics, vol. 26, pp. 107–128. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2014)Google Scholar
  6. Brown, R., Higgins, P.J.: On the algebra of cubes. J. Pure Appl. Algebra 21(3), 233–260 (1981)MathSciNetCrossRefzbMATHGoogle Scholar
  7. Brown, R., Higgins, P.J., Sivera, R.: Nonabelian Algebraic Topology: Filtered Spaces, Crossed Complexes, Cubical Homotopy Groupoids. EMS Tracts in Mathematics, vol. 15. European Mathematical Society Publishing House, Zurich (2011)CrossRefzbMATHGoogle Scholar
  8. Coquand, T., Huet, G.: The calculus of constructions. Inf. Comput. 76, 95–120 (1988)MathSciNetCrossRefzbMATHGoogle Scholar
  9. Dunphy, B., Reddy, U.: Parametric limits. In: LICS, pp. 242–251 (2004)Google Scholar
  10. Garner, R.: Two-dimensional models of type theory. Math. Struct. Comput. Sci. 19(04), 687–736 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  11. Ghani, N., Johann, P., Nordvall Forsberg, F., Orsanigo, F., Revell, T.: Bifibrational functorial semantics of parametric polymorphism. In: Ghica, D.R. (ed.) MFPS, pp. 67–83. ENTCS, Elsevier, Amsterdam (2015a)Google Scholar
  12. Ghani, N., Nordvall Forsberg, F., Orsanigo, F.: Parametric polymorphism — universally. In: de Paiva, V., de Queiroz, R., Moss, L.S., Leivant, D., de Oliveira, A. (eds.) WoLLIC 2015. LNCS, vol. 9160, pp. 81–92. Springer, Heidelberg (2015b)Google Scholar
  13. Grandis, M.: The role of symmetries in cubical sets and cubical categories (on weak cubical categories, I). Cah. Topol. Gom. Diff. Catg. 50(2), 102–143 (2009)MathSciNetzbMATHGoogle Scholar
  14. Krishnaswami, N.R., Dreyer, D.: Internalizing relational parametricity in the extensional calculus of constructions. In: CSL, pp. 432–451 (2013)Google Scholar
  15. Mac Lane, S.: Categories for the Working Mathematician, vol. 5. Springer, New York (1998)zbMATHGoogle Scholar
  16. Martin-Löf, P.: An intuitionistic theory of types. In: Twenty-Five Years of Constructive Type Theory (1972)Google Scholar
  17. O’Hearn, P.W., Tennent, R.D.: Parametricity and local variables. J. ACM 42(3), 658–709 (1995)MathSciNetCrossRefzbMATHGoogle Scholar
  18. Polonsky, A.: Extensionality of lambda-*. In: Herbelin, H., Letouzey, P., Sozeau, M. (eds.) 20th International Conference on Types for Proofs and Programs (TYPES 2014). Leibniz International Proceedings in Informatics (LIPIcs), vol. 39, pp. 221–250. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl (2015)Google Scholar
  19. Reynolds, J.: Types, abstraction and parametric polymorphism. In: Mason, R.E.A. (ed.) Information Processing 1983, pp. 513–523. North-Holland, Amsterdam (1983)Google Scholar
  20. Robinson, E., Rosolini, G.: Reflexive graphs and parametric polymorphism. In: LICS, pp. 364–371 (1994)Google Scholar
  21. Strachey, C.: Fundamental concepts in programming languages. High. Order Symbolic Comput. 13(1–2), 11–49 (2000)CrossRefzbMATHGoogle Scholar
  22. The Univalent Foundations Program: Homotopy Type Theory: Univalent Foundations of Mathematics (2013).
  23. Voevodsky, V.: The equivalence axiom and univalent models of type theory. Talk at CMU on 4 February 2010 (2010).
  24. Wadler, P.: Theorems for free! In: FPCA, pp. 347–359 (1989)Google Scholar
  25. Wadler, P.: The Girard-Reynolds isomorphism (second edition). Theoret. Comput. Sci. 375(1–3), 201–226 (2007)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.University of StrathclydeGlasgowScotland

Personalised recommendations