skip to main content
10.1145/3167091acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article
Artifacts Available

A Coq formalization of normalization by evaluation for Martin-Löf type theory

Published:08 January 2018Publication History

ABSTRACT

We present a Coq formalization of the normalization-by-evaluation algorithm for Martin-Löf dependent type theory with one universe and judgmental equality. The end results of the formalization are certified implementations of a reduction-free normalizer and of a decision procedure for term equality.

The formalization takes advantage of a graph-based variant of the Bove-Capretta method to encode mutually recursive evaluation functions with nested recursive calls. The proof of completeness, which uses the PER-model of dependent types, is formalized by relying on impredicativity of the Coq system rather than on the commonly used induction-recursion scheme which is not available in Coq. The proof of soundness is formalized by encoding logical relations as partial functions.

Skip Supplemental Material Section

Supplemental Material

References

  1. Martín Abadi, Luca Cardelli, Pierre-Louis Curien, and Jean-Jacques Lévy. 1991. Explicit Substitutions. J. Funct. Program. 1, 4 (1991), 375s416.Google ScholarGoogle ScholarCross RefCross Ref
  2. Andreas Abel. 2010. Towards Normalization by Evaluation for the ß¿-Calculus of Constructions. In Functional and Logic Programming, 10th International Symposium, FLOPS 2010, Sendai, Japan, April 19-21, 2010. Proceedings (Lecture Notes in Computer Science), Matthias Blume, Naoki Kobayashi, and German Vidal (Eds.), Vol. 6009. Springer, 224s239. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andreas Abel, Klaus Aehlig, and Peter Dybjer. 2007a. Normalization by Evaluation for Martin-Lof Type Theory with One Universe. Electr. Notes Theor. Comput. Sci. 173 (2007), 17-39. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Andreas Abel and James Chapman. 2014. Normalization by Evaluation in the Delay Monad: A Case Study for Coinduction via Copatterns and Sized Types. In Proceedings 5th Workshop on Mathematically Structured Functional Programming, MSFP@ETAPS 2014, Grenoble, France, 12 April 2014. (EPTCS), Paul Levy and Neel Krishnaswami (Eds.), Vol. 153. 51-67.Google ScholarGoogle ScholarCross RefCross Ref
  5. Andreas Abel, Thierry Coquand, and Peter Dybjer. 2007b. Normalization by Evaluation for Martin-Lof 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, 3-12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Andreas Abel, Thierry Coquand, and Miguel Pagano. 2009. A Modular Type-Checking Algorithm for Type Theory with Singleton Types and Proof Irrelevance. In Typed Lambda Calculi and Applications, 9th International Conference, TLCA 2009, Brasilia, Brazil, July 1-3, 2009. Proceedings (Lecture Notes in Computer Science), Pierre-Louis Curien (Ed.), Vol. 5608. Springer, 5s19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Robin Adams. 2006. Pure Type Systems with Judgemental Equality. J. Funct. Program. 16, 2 (2006), 219-246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Klaus Aehlig and Felix Joachimski. 2004. Operational aspects of untyped Normalisation by Evaluation. Mathematical Structures in Computer Science 14, 4 (2004), 587s611. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Thorsten Altenkirch and Ambrus Kaposi. 2016. Normalisation by Evaluation for Dependent Types. In 1st International Conference on Formal Structures for Computation and Deduction, FSCD 2016, June 22-26, 2016, Porto, Portugal (LIPIcs), Delia Kesner and Brigitte Pientka (Eds.), Vol. 52. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 6:1-6:16.Google ScholarGoogle Scholar
  10. Bruno Barras and BenjaminWerner. 1997. Coq in Coq. (1997). Unpublished note.Google ScholarGoogle Scholar
  11. Ulrich Berger, Stefan Berghofer, Pierre Letouzey, and Helmut Schwichtenberg. 2006. Program Extraction from Normalization Proofs. Studia Logica 82, 1 (2006), 25s49.Google ScholarGoogle Scholar
  12. Ulrich Berger and Helmut Schwichtenberg. 1991. An Inverse of the Evaluation Functional for Typed lambda-calculus. In Proceedings of the Sixth Annual Symposium on Logic in Computer Science (LICS '91), Amsterdam, The Netherlands, July 15-18, 1991, Giles Kahn (Ed.). IEEE Computer Society, 203-211.Google ScholarGoogle ScholarCross RefCross Ref
  13. Yves Bertot and Pierre Castéran. 2004. Interactive Theorem Proving and Program Development - Coq'Art: The Calculus of Inductive Constructions. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ana Bove. 2009. Another Look at Function Domains. Electr. Notes Theor. Comput. Sci. 249 (2009), 61-74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Ana Bove and Venanzio Capretta. 2001. Nested General Recursion and Partiality in Type Theory. In Theorem Proving in Higher Order Logics, 14th International Conference, TPHOLs 2001, Edinburgh, Scotland, UK, September 3-6, 2001, Proceedings (Lecture Notes in Computer Science), Richard J. Boulton and Paul B. Jackson (Eds.), Vol. 2152. Springer, 121- 135. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Alexandre Buisse and Peter Dybjer. 2008. Towards Formalizing Categorical Models of Type Theory in Type Theory. Electr. Notes Theor. Comput. Sci. 196 (2008), 137-151. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Thierry Coquand and Peter Dybjer. 1997. Intuitionistic Model Constructions and Normalization Proofs. Mathematical Structures in Computer Science 7, 1 (1997), 75-94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Nils Anders Danielsson. 2006. A Formalisation of a Dependently Typed Language as an Inductive-Recursive Family. In Types for Proofs and Programs, International Workshop, TYPES 2006, Nottingham, UK, April 18-21, 2006, Revised Selected Papers (Lecture Notes in Computer Science), Thorsten Altenkirch and Conor McBride (Eds.), Vol. 4502. Springer, 93- 109. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Peter Dybjer. 2000. A General Formulation of Simultaneous Inductive-Recursive Definitions in Type Theory. J. Symb. Log. 65, 2 (2000), 525-549.Google ScholarGoogle ScholarCross RefCross Ref
  20. Andrzej Filinski and Henning Korsholm Rohde. 2004. A Denotational Account of Untyped Normalization by Evaluation. In Foundations of Software Science and Computation Structures, 7th International Conference, FOSSACS 2004, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2004, Barcelona, Spain, March 29 - April 2, 2004, Proceedings (Lecture Notes in Computer Science), Igor Walukiewicz (Ed.), Vol. 2987. Springer, 167s181.Google ScholarGoogle ScholarCross RefCross Ref
  21. François Garillot and Benjamin Werner. 2007. Simple Types in Type Theory: Deep and Shallow Encodings. In Theorem Proving in Higher Order Logics, 20th International Conference, TPHOLs 2007, Kaiserslautern, Germany, September 10-13, 2007, Proceedings (Lecture Notes in Computer Science), Klaus Schneider and Jens Brandt (Eds.), Vol. 4732. Springer, 368-382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Jean-Yves Girard, Paul Taylor, and Yves Lafont. 1989. Proofs and Types. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Peter Hancock, Conor McBride, Neil Ghani, Lorenzo Malatesta, and Thorsten Altenkirch. 2013. Small Induction Recursion. In Typed Lambda Calculi and Applications, 11th International Conference, TLCA 2013, Eindhoven, The Netherlands, June 26-28, 2013. Proceedings (Lecture Notes in Computer Science), Masahito Hasegawa (Ed.), Vol. 7941. Springer, 156- 172.Google ScholarGoogle Scholar
  24. Robert Pieter Nederpelt Lazarom. 1973. Strong Normalization in a Typed Lambda Calculus with Lambda Structured Types. Ph.D. Dissertation. Technische Universiteit Eindhoven.Google ScholarGoogle Scholar
  25. Pierre Letouzey. 2008. Extraction in Coq: An Overview. In Logic and Theory of Algorithms, 4th Conference on Computability in Europe, CiE 2008, Athens, Greece, June 15-20, 2008, Proceedings (Lecture Notes in Computer Science), Arnold Beckmann, Costas Dimitracopoulos, and Benedikt Löwe (Eds.), Vol. 5028. Springer, 359s369. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Per Martin-Löf. 1998. An Intuitionistic Theory of Types. In Twenty-Five Years of Constructive Type Theory, Giovanni Sambin and Jan M. Smith (Eds.). Oxford University Press.Google ScholarGoogle Scholar
  27. Bengt Nordström, Kent Petersson, and Jan M. Smith. 1990. Programming in Martin-Löf's Type Theory: An Introduction. Oxford University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Miguel Pagano. 2012. Type-Checking and Normalisation By Evaluation For Dependent Type Systems. Ph.D. Dissertation. Universidad Nacional De Córdoba.Google ScholarGoogle Scholar
  29. Matthieu Sozeau. 2007. A Dependently-Typed Formalization of Simply-Typed Lambda-Calculus: Substitution, Denotation, Normalization. (2007). Unpublished note.Google ScholarGoogle Scholar

Index Terms

  1. A Coq formalization of normalization by evaluation for Martin-Löf 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
      • Published in

        cover image ACM Conferences
        CPP 2018: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs
        January 2018
        306 pages
        ISBN:9781450355865
        DOI:10.1145/3176245

        Copyright © 2018 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 8 January 2018

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate18of26submissions,69%

        Upcoming Conference

        POPL '25

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader