skip to main content
research-article
Open Access
Artifacts Evaluated & Functional

Decidability of conversion for type theory in type theory

Published:27 December 2017Publication History
Skip Abstract Section

Abstract

Type theory should be able to handle its own meta-theory, both to justify its foundational claims and to obtain a verified implementation. At the core of a type checker for intensional type theory lies an algorithm to check equality of types, or in other words, to check whether two types are convertible. We have formalized in Agda a practical conversion checking algorithm for a dependent type theory with one universe à la Russell, natural numbers, and η-equality for Π types. We prove the algorithm correct via a Kripke logical relation parameterized by a suitable notion of equivalence of terms. We then instantiate the parameterized fundamental lemma twice: once to obtain canonicity and injectivity of type formers, and once again to prove the completeness of the algorithm. Our proof relies on inductive-recursive definitions, but not on the uniqueness of identity proofs. Thus, it is valid in variants of intensional Martin-Löf Type Theory as long as they support induction-recursion, for instance, Extensional, Observational, or Homotopy Type Theory.

Skip Supplemental Material Section

Supplemental Material

typetheoryintypetheory.webm

webm

112 MB

References

  1. Andreas Abel, Thierry Coquand, and Peter Dybjer. 2007. Normalization by Evaluation for Martin-Löf Type Theory with Typed Equality Judgements. In 22nd IEEE Symposium on Logic in Computer Science (LICS 2007), 10-12 July 2007, Wroclaw, Poland, Proceedings. IEEE Computer Society Press, 3–12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Andreas Abel, Thierry Coquand, and Bassel Mannaa. 2016. On Decidability of Conversion in Type Theory. In 22nd International Conference on Types for Proofs and Programs, TYPES 2016, Novi Sad, Serbia, May 23-26, 2016, Book of Abstracts, Silvia Ghilezan and Jelena Ivetic (Eds.). EasyChair.Google ScholarGoogle Scholar
  3. Andreas Abel and Brigitte Pientka. 2016. Well-founded recursion with copatterns and sized types. Journal of Functional Programming 26 (2016), 61. Google ScholarGoogle ScholarCross RefCross Ref
  4. Andreas Abel and Gabriel Scherer. 2012. On Irrelevance and Algorithmic Equality in Predicative Type Theory. Logical Methods in Computer Science 8, 1:29 (2012), 1–36. Google ScholarGoogle ScholarCross RefCross Ref
  5. AgdaTeam. 2017. The Agda Wiki. http://wiki.portal.chalmers.se/agda/pmwiki.phpGoogle ScholarGoogle Scholar
  6. Thorsten Altenkirch and Ambrus Kaposi. 2016. Type theory in type theory using quotient inductive types. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, St. Petersburg, FL, USA, January 20 - 22, 2016, Rastislav Bodík and Rupak Majumdar (Eds.). ACM Press, 18–29. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Thorsten Altenkirch and Ambrus Kaposi. 2017. Normalisation by Evaluation for Type Theory, in Type Theory. Logical Methods in Computer Science 13(4:1) (2017), 1–26. Google ScholarGoogle ScholarCross RefCross Ref
  8. Bruno Barras. 2010. Sets in Coq, Coq in Sets. Journal of Formalized Reasoning 3, 1 (2010), 29–48. Google ScholarGoogle ScholarCross RefCross Ref
  9. Thierry Coquand. 1991. An Algorithm for Testing Conversion in Type Theory. In Logical Frameworks, Gérard Huet and Gordon Plotkin (Eds.). Cambridge University Press, 255–279. http://dl.acm.org/citation.cfm?id=120477.120486Google ScholarGoogle Scholar
  10. Thierry Coquand and Gérard P. Huet. 1988. The Calculus of Constructions. Information and Computation 76, 2/3 (1988), 95–120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. N. G. de Bruijn. 1972. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae 75, 5 (1972), 381–392. Google ScholarGoogle ScholarCross RefCross Ref
  12. Peter Dybjer. 1995. Internal Type Theory. In Types for Proofs and Programs, International Workshop TYPES’95, Torino, Italy, June 5-8, 1995, Selected Papers (Lecture Notes in Computer Science), Stefano Berardi and Mario Coppo (Eds.), Vol. 1158. Springer, 120–134. Google ScholarGoogle ScholarCross RefCross Ref
  13. Peter Dybjer. 2000. A General Formulation of Simultaneous Inductive-Recursive Definitions in Type Theory. The Journal of Symbolic Logic 65, 2 (2000), 525–549. Google ScholarGoogle ScholarCross RefCross Ref
  14. Peter Dybjer and Anton Setzer. 2001. Indexed Induction-Recursion. In Proof Theory in Computer Science, International Seminar, PTCS 2001, Dagstuhl Castle, Germany, October 7-12, 2001, Proceedings (Lecture Notes in Computer Science), Reinhard Kahle, Peter Schroeder-Heister, and Robert F. Stärk (Eds.), Vol. 2183. Springer, 93–113. Google ScholarGoogle ScholarCross RefCross Ref
  15. Peter Dybjer and Anton Setzer. 2003. Induction-recursion and initial algebras. Annals of Pure and Applied Logic 124, 1-3 (2003), 1–47. Google ScholarGoogle ScholarCross RefCross Ref
  16. Harvey Friedman. 1975. Equality between functionals. In Logic Colloquium (Lecture Notes in Mathematics), R. Parikh (Ed.), Vol. 453. Springer, 22–37. Google ScholarGoogle ScholarCross RefCross Ref
  17. Herman Geuvers. 1994. A short and flexible proof of Strong Normalization for the Calculus of Constructions. In Types for Proofs and Programs, International Workshop TYPES’94, Båstad, Sweden, June 6-10, 1994, Selected Papers (Lecture Notes in Computer Science), Peter Dybjer, Bengt Nordström, and Jan M. Smith (Eds.), Vol. 996. Springer, 14–38. Google ScholarGoogle ScholarCross RefCross Ref
  18. Neil Ghani, Lorenzo Malatesta, and Fredrik Nordvall Forsberg. 2015. Positive Inductive-Recursive Definitions. 11, 1 (2015). Google ScholarGoogle ScholarCross RefCross Ref
  19. Jean-Yves Girard. 1972. Interprétation fonctionnelle et élimination des coupures dans l’arithmétique d’ordre supérieur. Thèse de Doctorat d’État. Université de Paris VII.Google ScholarGoogle Scholar
  20. Healfdene Goguen. 1994. A Typed Operational Semantics for Type Theory. Ph.D. Dissertation. University of Edinburgh. Available as LFCS Report ECS-LFCS-94-304.Google ScholarGoogle Scholar
  21. Healfdene Goguen. 2000. A Kripke-Style Model for the Admissibility of Structural Rules. In Types for Proofs and Programs, International Workshop, TYPES 2000, Durham, UK, December 8-12, 2000, Selected Papers (Lecture Notes in Computer Science), Paul Callaghan, Zhaohui Luo, James McKinna, and Robert Pollack (Eds.), Vol. 2277. Springer, 112–124. Google ScholarGoogle ScholarCross RefCross Ref
  22. Robert Harper and Frank Pfenning. 2005. On Equivalence and Canonical Forms in the LF Type Theory. ACM Trans. Comput. Logic 6, 1 (Jan. 2005), 61–101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. John Hughes, Lars Pareto, and Amr Sabry. 1996. Proving the Correctness of Reactive Systems Using Sized Types. In Conference Record of POPL’96: The 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Papers Presented at the Symposium, St. Petersburg Beach, Florida, USA, January 21-24, 1996, Hans-Juergen Boehm and Guy L. Steele Jr. (Eds.). ACM Press, 410–423. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. INRIA. 2017. The Coq Proof Assistant Reference Manual (version 8.7 ed.). INRIA. http://coq.inria.fr/Google ScholarGoogle Scholar
  25. Per Martin-Löf. 1975. An Intuitionistic Theory of Types: Predicative Part. In Logic Colloquium ‘73, H. E. Rose and J. C. Shepherdson (Eds.). North-Holland, 73–118.Google ScholarGoogle Scholar
  26. Jorge Luis Sacchini. 2013. Type-Based Productivity of Stream Definitions in the Calculus of Constructions. In 28th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2013, New Orleans, LA, USA, June 25-28, 2013. IEEE Computer Society Press, 233–242. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Carsten Schürmann and Jeffrey Sarnat. 2008. Structural Logical Relations. In Proceedings of the Twenty-Third Annual IEEE Symposium on Logic in Computer Science, LICS 2008, 24-27 June 2008, Pittsburgh, PA, USA, Frank Pfenning (Ed.). IEEE Computer Society Press, 69–80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Thomas Streicher. 1993. Investigations into Intensional Type Theory. Habilitation thesis, Ludwig-Maximilians-University Munich.Google ScholarGoogle Scholar
  29. Benjamin Werner. 1992. A Normalization Proof for an Impredicative Type System with Large Eliminations over Integers. In Proceedings of the 1992 Workshop on Types for Proofs and Programs, Båstad, Sweden, June 1992, Bengt Nordström, Kent Petersson, and Gordon Plotkin (Eds.). 341–357. http://www.cs.chalmers.se/Cs/Research/Logic/Types/proc92.psGoogle ScholarGoogle Scholar
  30. Benjamin Werner. 1994. Une Théorie des Constructiones Inductives. Ph.D. Dissertation. Universite Paris 7.Google ScholarGoogle Scholar

Index Terms

  1. Decidability of conversion for type theory in type theory

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 2, Issue POPL
        January 2018
        1961 pages
        EISSN:2475-1421
        DOI:10.1145/3177123
        Issue’s Table of Contents

        Copyright © 2017 Owner/Author

        This work is licensed under a Creative Commons Attribution International 4.0 License.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 27 December 2017
        Published in pacmpl Volume 2, Issue POPL

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader