skip to main content
10.1145/3372885.3373832acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Undecidability of higher-order unification formalised in Coq

Published:22 January 2020Publication History

ABSTRACT

We formalise undecidability results concerning higher-order unification in the simply-typed λ-calculus with β-conversion in Coq. We prove the undecidability of general higher-order unification by reduction from Hilbert’s tenth problem, the solvability of Diophantine equations, following a proof by Dowek. We sharpen the result by establishing the undecidability of second-order and third-order unification following proofs by Goldfarb and Huet, respectively.

Goldfarb’s proof for second-order unification is by reduction from Hilbert’s tenth problem. Huet’s original proof uses the Post correspondence problem (PCP) to show the undecidability of third-order unification. We simplify and formalise his proof as a reduction from modified PCP. We also verify a decision procedure for first-order unification.

All proofs are carried out in the setting of synthetic undecidability and rely on Coq’s built-in notion of computation.

References

  1. Henk P. Barendregt. 1984. The Lambda Calculus: Its Syntax and Semantics (2nd revised ed.). North-Holland.Google ScholarGoogle Scholar
  2. Jonas Bayer, Marco David, Abhik Pal, Benedikt Stock, and Dierk Schleicher. 2019. The DPRM Theorem in Isabelle (Short Paper). In 10th International Conference on Interactive Theorem Proving (ITP 2019). Schloss DagstuhlLeibniz-Zentrum fuer Informatik.Google ScholarGoogle Scholar
  3. Mario Carneiro. 2018. Formalizing computability theory via partial recursive functions. arXiv preprint arXiv:1810.08380 (2018).Google ScholarGoogle Scholar
  4. Martin David Coen. 1992. Interactive program derivation. Technical Report. University of Cambridge, Computer Laboratory.Google ScholarGoogle Scholar
  5. Martin Davis. 1973. Hilbert’s Tenth Problem is Unsolvable. The American Mathematical Monthly 80, 3 (1973), 233–269.Google ScholarGoogle ScholarCross RefCross Ref
  6. Nicolaas Govert De Bruijn. 1972. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. In Indagationes Mathematicae (Proceedings), Vol. 75. Elsevier, 381–392.Google ScholarGoogle ScholarCross RefCross Ref
  7. Anatoli Degtyarev and Andrei Voronkov. 1996. The undecidability of simultaneous rigid E-unification. Theoretical Computer Science 166, 1-2 (1996), 291–300.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Gilles Dowek. 1993. The undecidability of typability in the lambda-picalculus. In International Conference on Typed Lambda Calculi and Applications. Springer, 139–145.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Gilles Dowek. 2001. Higher-Order Unification and Matching. Handbook of automated reasoning 2 (2001), 1009–1062.Google ScholarGoogle Scholar
  10. Andrej Dudenhefner and Jakob Rehof. 2018. A Simpler Undecidability Proof for System F Inhabitation. TYPES 2018 (2018).Google ScholarGoogle Scholar
  11. William M Farmer. 1988. A unification algorithm for second-order monadic terms. Annals of Pure and applied Logic 39, 2 (1988), 131–174.Google ScholarGoogle ScholarCross RefCross Ref
  12. Yannick Forster, Edith Heiter, and Gert Smolka. 2018. Verification of PCP-related computational reductions in Coq. In International Conference on Interactive Theorem Proving. Springer, 253–269.Google ScholarGoogle ScholarCross RefCross Ref
  13. Yannick Forster, Dominik Kirst, and Gert Smolka. 2019a. On synthetic undecidability in Coq, with an application to the Entscheidungsproblem. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs. ACM, 38–51.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Yannick Forster and Fabian Kunze. 2019. A Certifying Extraction with Time Bounds from Coq to Call-By-Value Lambda Calculus. In 10th International Conference on Interactive Theorem Proving (ITP 2019) (Leibniz International Proceedings in Informatics (LIPIcs)), John Harrison, John O’Leary, and Andrew Tolmach (Eds.), Vol. 141. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 17:1–17:19. Google ScholarGoogle ScholarCross RefCross Ref
  15. Yannick Forster, Fabian Kunze, and Maximilian Wuttke. 2020a. Verified Programming of Turing Machines in Coq. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs. ACM.Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Yannick Forster and Dominique Larchey-Wendling. 2019. Certified undecidability of intuitionistic linear logic via binary stack machines and Minsky machines. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs. ACM, 104–117.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Yannick Forster, Dominique Larchey-Wendling, Andrej Dudenhefner, Edith Heiter, Dominik Kirst, Fabian Kunze, Gert Smolka, Simon Spies, Dominik Wehr, and Maximilian Wuttke. 2020b. A Coq Library of Undecidable Problems. In The Sixth International Workshop on Coq for Programming Languages (CoqPL 2020). https://github.com/uds-psl/coq-libraryundecidabilityGoogle ScholarGoogle Scholar
  18. Yannick Forster, Steven Schäfer, Simon Spies, and Kathrin Stark. 2019b. Call-by-push-value in Coq: operational, equational, and denotational theory. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs. ACM, 118–131.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Yannick Forster and Gert Smolka. 2017. Weak call-by-value lambda calculus as a model of computation in Coq. In International Conference on Interactive Theorem Proving. Springer, 189–206.Google ScholarGoogle ScholarCross RefCross Ref
  20. Warren D. Goldfarb. 1981. The undecidability of the second-order unification problem. Theoretical Computer Science 13 (1981), 225–230.Google ScholarGoogle ScholarCross RefCross Ref
  21. John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. 2006. Introduction to Automata Theory, Languages, and Computation (3rd ed.). AddisonWesley.Google ScholarGoogle Scholar
  22. Jason Hu and Ondvrej Lhoták. 2019. Undecidability of D <: and Its Decidable Fragments. arXiv preprint arXiv:1908.05294 (2019)Google ScholarGoogle Scholar
  23. Zhong Sheng Hu. 2019. Decidability and Algorithmic Analysis of Dependent Object Types (DOT). http://hdl.handle.net/10012/14964Google ScholarGoogle Scholar
  24. Gerard Pierre Huet. 1972. Constrained resolution: a complete method for higher-order logic. (1972).Google ScholarGoogle Scholar
  25. Gérard P Huet. 1973. The undecidability of unification in third order logic. Information and control 22, 3 (1973), 257–267.Google ScholarGoogle Scholar
  26. Gerard P. Huet. 1975. A unification algorithm for typed λ-calculus. Theoretical Computer Science 1, 1 (1975), 27?57.Google ScholarGoogle Scholar
  27. Assaf J Kfoury, Jerzy Tiuryn, and Pawel Urzyczyn. 1993. The undecidability of the semi-unification problem. Information and Computation 102, 1 (1993), 83–101.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Ramana Kumar and Michael Norrish. 2010. (Nominal) unification by recursive descent with triangular substitutions. In International Conference on Interactive Theorem Proving. Springer, 51–66.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Dominique Larchey-Wendling and Yannick Forster. 2019. Hilbert’s Tenth Problem in Coq. In 4th International Conference on Formal Structures for Computation and Deduction, FSCD 2019, Dortmund, Germany. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 27:1–27:20.Google ScholarGoogle Scholar
  30. CL Lucchesi. 1972. The undecidability of the unification problem for third order languages. Report CSRR 2059 (1972), 129–198.Google ScholarGoogle Scholar
  31. Alberto Martelli and Ugo Montanari. 1976. Unification in linear time and space: A structured presentation. Istituto di Elaborazione della Informazione, Consiglio Nazionale delle Ricerche.Google ScholarGoogle Scholar
  32. Yuri V. Matijasevivc. 1970. Enumerable sets are Diophantine. In Soviet Mathematics: Doklady, Vol. 11. 354–357.Google ScholarGoogle Scholar
  33. Dale Miller. 1991. A logic programming language with lambda-abstraction, function variables, and simple unification. Journal of logic and computation 1, 4 (1991), 497–536.Google ScholarGoogle ScholarCross RefCross Ref
  34. Michael S Paterson and Mark N Wegman. 1978. Linear unification. J. Comput. System Sci. 16, 2 (1978), 158–167.Google ScholarGoogle ScholarCross RefCross Ref
  35. Emil L Post. 1946. A variant of a recursively unsolvable problem. Bull. Amer. Math. Soc. 52, 4 (1946), 264–268.Google ScholarGoogle ScholarCross RefCross Ref
  36. Thiago Mendoncca Ferreira Ramos, César Muñoz, Mauricio Ayala-Rincón, Mariano Moscato, Aaron Dutle, and Anthony Narkawicz. 2018. Formalization of the Undecidability of the Halting Problem for a Functional Language. In International Workshop on Logic, Language, Information, and Computation. Springer, 196–209.Google ScholarGoogle ScholarCross RefCross Ref
  37. John C Reynolds. 1983. Types, abstraction and parametric polymorphism. (1983).Google ScholarGoogle Scholar
  38. John Alan Robinson. 1965. A machine-oriented logic based on the resolution principle. Journal of the ACM (JACM) 12, 1 (1965), 23–41.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Joseph Rouyer. 1992. Développement de l’algorithme d’unification dans le calcul des constructions avec types inductifs. Ph.D. Dissertation. INRIA.Google ScholarGoogle Scholar
  40. Steven Schäfer. 2019. Engineering Formal Systems in Constructive Type Theory. Ph.D. Dissertation. Saarland University. https://www.ps.unisaarland.de/~schaefer/thesis/Google ScholarGoogle Scholar
  41. Gert Smolka and Adrien Husson. 2014. Introduction to Computational Logic. (2014). https://courses.ps.uni-saarland.de/icl/2/Resources Unification.Google ScholarGoogle Scholar
  42. Wayne Snyder and Jean H Gallier. 1989. Higher order unification revisited: Complete sets of transformations. Technical Reports (CIS) (1989), 778.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Matthieu Sozeau. 2009. A New Look at Generalized Rewriting in Type Theory. Journal of Formalized Reasoning 2, 1 (2009).Google ScholarGoogle Scholar
  44. Matthieu Sozeau and Cyprien Mangin. 2019. Equations Reloaded: HighLevel Dependently-Typed Functional Programming and Proving in Coq. Proceedings of the ACM on Programming Languages 3, ICFP (2019).Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Kathrin Stark, Steven Schäfer, and Jonas Kaiser. 2019. Autosubst 2: reasoning with multi-sorted De Bruijn terms and vector substitutions. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs. ACM, 166–180.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Richard Statman. 1981. On the existence of closed terms in the typed λ calculus II: Transformations of unification problems. Theoretical Computer Science 15, 3 (1981), 329?338.Google ScholarGoogle Scholar
  47. Masako Takahashi. 1989. Parallel reductions in λ-calculus. Journal of Symbolic Computation 7, 2 (1989), 113?123.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Christian Urban, Andrew M Pitts, and Murdoch J Gabbay. 2004. Nominal unification. Theoretical Computer Science 323, 1-3 (2004), 473–497.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Pawel Urzyczyn. 1997. Type Reconstruction in F Ω. Mathematical. Structures in Comp. Sci. 7, 4 (Aug. 1997), 329–358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Jian Xu, Xingyuan Zhang, and Christian Urban. 2013. Mechanising Turing Machines and Computability Theory in Isabelle/HOL. In ITP (LNCS), Sandrine Blazy, Christine Paulin-Mohring, and David Pichardie (Eds.), Vol. 7998. Springer, 147–162.Google ScholarGoogle Scholar

Index Terms

  1. Undecidability of higher-order unification formalised in Coq

      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 2020: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs
        January 2020
        381 pages
        ISBN:9781450370974
        DOI:10.1145/3372885

        Copyright © 2020 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: 22 January 2020

        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