Abstract
Homotopy Type Theory promises a unification of the concepts of equality and equivalence in Type Theory, through the introduction of the univalence principle. However, existing proof assistants based on type theory treat this principle as an axiom, and it is not yet clear how to extend them to handle univalence internally. In this paper, we propose a construction grounded on a univalent version of parametricity to bring the benefits of univalence to the programmer and prover, that can be used on top of existing type theories. In particular, univalent parametricity strengthens parametricity to ensure preservation of type equivalences. We present a lightweight framework implemented in the Coq proof assistant that allows the user to transparently transfer definitions and theorems for a type to an equivalent one, as if they were equal. Our approach handles both type and term dependency. We study how to maximize the effectiveness of these transports in terms of computational behavior, and identify a fragment useful for certified programming on which univalent transport is guaranteed to be effective. This work paves the way to easier-to-use environments for certified programming by supporting seamless programming and proving modulo equivalences.
- Thorsten Altenkirch and Ambrus Kaposi. 2017. Towards a cubical type theory without an interval. Leibniz International Proceedings in Informatics.Google Scholar
- Thorsten Altenkirch, Conor McBride, and Wouter Swierstra. 2007. Observational equality, now!. In Proceedings of the Workshop on Programming Languages meets Program Verification (PLPV 2007). 57–68. Google Scholar
Digital Library
- Abhishek Anand and Greg Morrisett. 2017. Revisiting Parametricity: Inductives and Uniformity of Propositions. CoRR abs/1705.01163 (2017). http://arxiv.org/abs/1705.01163Google Scholar
- John Bacon. 1974. The Untenability of Genera. Logique et Analyse 17, 65/66 (jan-apr 1974), 197–208.Google Scholar
- Andrej Bauer, Jason Gross, Peter LeFanu Lumsdaine, Michael Shulman, Matthieu Sozeau, and Bas Spitters. 2017. The HoT T Library: A Formalization of Homotopy Type Theory in Coq. In Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs (CPP 2017). ACM, New York, NY, USA, 164–172. Google Scholar
Digital Library
- Jean-Philippe Bernardy, Thierry Coquand, and Guilhem Moulin. 2015. A Presheaf Model of Parametric Type Theory. Electronic Notes in Theoretical Computer Science 319 (2015), 67–82. Google Scholar
Digital Library
- Jean-Philippe Bernardy, Patrik Jansson, and Ross Paterson. 2012. Proofs for free: Parametricity for dependent types. Journal of Functional Programming 22, 2 (March 2012), 107–152. Google Scholar
Digital Library
- Simon Boulier, Pierre-Marie Pédrot, and Nicolas Tabareau. 2017. The next 700 syntactical models of type theory. In Certified Programs and Proofs (CPP 2017). Paris, France, 182 – 194. Google Scholar
Digital Library
- Cyril Cohen, Thierry Coquand, Simon Huber, and Anders Mörtberg. 2016. Cubical Type Theory: a constructive interpretation of the univalence axiom. (Oct. 2016). https://hal.inria.fr/hal- 01378906 Accepted for publication in LIPIcs.Google Scholar
- Cyril Cohen, Maxime Dénès, and Anders Mörtberg. 2013. Refinements for Free!. In Proceedings of the International Conference on Certified Programming and Proofs (CPP 2013) (Lecture Notes in Computer Science), G. Gonthier and M. Norrish (Eds.), Vol. 8307. Springer-Verlag, 147–162. Google Scholar
Digital Library
- The Coq Development Team. 2016. The Coq proof assistant reference manual. http://coq.inria.fr Version 8.6.Google Scholar
- Nicola Gambino and Martin Hyland. 2004. Wellfounded trees and dependent polynomial functors. In Proceedings of Types for Proofs and Programs (TYPES 2003) (Lecture Notes in Computer Science), Vol. 3085. Springer-Verlag, 210–225.Google Scholar
Cross Ref
- Florian Haftmann, Alexander Krauss, Ondřej Kunčar, and Tobias Nipkow. 2013. Data Refinement in Isabelle/HOL. In Proceedings of the 4th International Conference on Interactive Theorem Proving (ITP 2013) (Lecture Notes in Computer Science), S. Blazy, C. Paulin-Mohring, and D. Pichardie (Eds.), Vol. 7998. Springer-Verlag, 100–115. Google Scholar
Digital Library
- Brian Huffman and Ondřej Kunčar. 2013. Lifting and Transfer: A Modular Design for Quotients in Isabelle/HOL. In Proceedings of the 3rd International Conference on Certified Programs and Proofs (CPP 2013). Springer-Verlag, Melbourne, Australia, 131–146. Google Scholar
Digital Library
- Neelakantan R. Krishnaswami and Derek Dreyer. 2013. Internalizing Relational Parametricity in the Extensional Calculus of Constructions. In Proceedings of the Conference for Computer Science Logic (CSL 2013). 432–451.Google Scholar
- Peter Lammich. 2013. Automatic Data Refinement. In Proceedings of the 4th International Conference on Interactive Theorem Proving (ITP 2013) (Lecture Notes in Computer Science), S. Blazy, C. Paulin-Mohring, and D. Pichardie (Eds.), Vol. 7998. Springer-Verlag, 84–99. Google Scholar
Digital Library
- Nicolas Magaud. 2003. Changing Data Representation within the Coq system. In International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2003) (Lecture Notes in Computer Science), D. Basin and B. Wolff (Eds.), Vol. 2758. Springer-Verlag.Google Scholar
Cross Ref
- Nicolas Magaud and Yves Bertot. 2000. Changing Data Structures in Type Theory: A Study of Natural Numbers. In International Workshop on Types for Proofs and Programs (TYPES 2000) (Lecture Notes in Computer Science), P. Callaghan, Z. Luo, J. McKinna, and R. Pollack (Eds.), Vol. 2277. Springer-Verlag, 181–196. Google Scholar
Digital Library
- Per Martin-Löf. 1971. An Intuitionistic Theory of Types. Unpublished manuscript.Google Scholar
- Christine Paulin-Mohring. 2015. Introduction to the Calculus of Inductive Constructions. In All about Proofs, Proofs for All, Bruno Woltzenlogel Paleo and David Delahaye (Eds.). Studies in Logic (Mathematical logic and foundations), Vol. 55.Google Scholar
- Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. 2006. Simple unification-based type inference for GADTs. In Proceedings of the 11th ACM SIGPLAN Conference on Functional Programming (ICFP 2006). ACM Press, Portland, Oregon, USA, 50–61. Google Scholar
Digital Library
- John C. Reynolds. 1983. Types, Abstraction and Parametric Polymorphism. In IFIP Congress. 513–523.Google Scholar
- Matthieu Sozeau and Nicolas Oury. 2008. First-Class Type Classes. In Proceedings of the 21st International Conference on Theorem Proving in Higher-Order Logics. Montreal, Canada, 278–293. Google Scholar
Digital Library
- The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study.Google Scholar
- Philip Wadler. 1989. Theorems for Free!. In Functional Programming Languages and Computer Architecture. ACM Press, 347–359. Google Scholar
Digital Library
- Theo Zimmermann and Hugo Herbelin. 2015. Automatic and Transparent Transfer of Theorems along Isomorphisms in the Coq Proof Assistant. arXiv:1505.05028v4.Google Scholar
Index Terms
Equivalences for free: univalent parametricity for effective transport
Recommendations
The Marriage of Univalence and Parametricity
Reasoning modulo equivalences is natural for everyone, including mathematicians. Unfortunately, in proof assistants based on type theory, which are frequently used to mechanize mathematical results and carry out program verification efforts, equality is ...
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 ...
An Axiomatic System of Parametricity
Plotkin and Abadi have proposed a syntactic system for parametricity based on a second order predicate logic. This paper shows three theorems about that system. The first is consistency of the system, which is proved by the method of relativization. The ...






Comments