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.
- Henk P. Barendregt. 1984. The Lambda Calculus: Its Syntax and Semantics (2nd revised ed.). North-Holland.Google Scholar
- 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 Scholar
- Mario Carneiro. 2018. Formalizing computability theory via partial recursive functions. arXiv preprint arXiv:1810.08380 (2018).Google Scholar
- Martin David Coen. 1992. Interactive program derivation. Technical Report. University of Cambridge, Computer Laboratory.Google Scholar
- Martin Davis. 1973. Hilbert’s Tenth Problem is Unsolvable. The American Mathematical Monthly 80, 3 (1973), 233–269.Google ScholarCross Ref
- 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 ScholarCross Ref
- Anatoli Degtyarev and Andrei Voronkov. 1996. The undecidability of simultaneous rigid E-unification. Theoretical Computer Science 166, 1-2 (1996), 291–300.Google ScholarDigital Library
- Gilles Dowek. 1993. The undecidability of typability in the lambda-picalculus. In International Conference on Typed Lambda Calculi and Applications. Springer, 139–145.Google ScholarDigital Library
- Gilles Dowek. 2001. Higher-Order Unification and Matching. Handbook of automated reasoning 2 (2001), 1009–1062.Google Scholar
- Andrej Dudenhefner and Jakob Rehof. 2018. A Simpler Undecidability Proof for System F Inhabitation. TYPES 2018 (2018).Google Scholar
- William M Farmer. 1988. A unification algorithm for second-order monadic terms. Annals of Pure and applied Logic 39, 2 (1988), 131–174.Google ScholarCross Ref
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- Warren D. Goldfarb. 1981. The undecidability of the second-order unification problem. Theoretical Computer Science 13 (1981), 225–230.Google ScholarCross Ref
- John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman. 2006. Introduction to Automata Theory, Languages, and Computation (3rd ed.). AddisonWesley.Google Scholar
- Jason Hu and Ondvrej Lhoták. 2019. Undecidability of D <: and Its Decidable Fragments. arXiv preprint arXiv:1908.05294 (2019)Google Scholar
- Zhong Sheng Hu. 2019. Decidability and Algorithmic Analysis of Dependent Object Types (DOT). http://hdl.handle.net/10012/14964Google Scholar
- Gerard Pierre Huet. 1972. Constrained resolution: a complete method for higher-order logic. (1972).Google Scholar
- Gérard P Huet. 1973. The undecidability of unification in third order logic. Information and control 22, 3 (1973), 257–267.Google Scholar
- Gerard P. Huet. 1975. A unification algorithm for typed λ-calculus. Theoretical Computer Science 1, 1 (1975), 27?57.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- CL Lucchesi. 1972. The undecidability of the unification problem for third order languages. Report CSRR 2059 (1972), 129–198.Google Scholar
- 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 Scholar
- Yuri V. Matijasevivc. 1970. Enumerable sets are Diophantine. In Soviet Mathematics: Doklady, Vol. 11. 354–357.Google Scholar
- 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 ScholarCross Ref
- Michael S Paterson and Mark N Wegman. 1978. Linear unification. J. Comput. System Sci. 16, 2 (1978), 158–167.Google ScholarCross Ref
- Emil L Post. 1946. A variant of a recursively unsolvable problem. Bull. Amer. Math. Soc. 52, 4 (1946), 264–268.Google ScholarCross Ref
- 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 ScholarCross Ref
- John C Reynolds. 1983. Types, abstraction and parametric polymorphism. (1983).Google Scholar
- John Alan Robinson. 1965. A machine-oriented logic based on the resolution principle. Journal of the ACM (JACM) 12, 1 (1965), 23–41.Google ScholarDigital Library
- Joseph Rouyer. 1992. Développement de l’algorithme d’unification dans le calcul des constructions avec types inductifs. Ph.D. Dissertation. INRIA.Google Scholar
- Steven Schäfer. 2019. Engineering Formal Systems in Constructive Type Theory. Ph.D. Dissertation. Saarland University. https://www.ps.unisaarland.de/~schaefer/thesis/Google Scholar
- Gert Smolka and Adrien Husson. 2014. Introduction to Computational Logic. (2014). https://courses.ps.uni-saarland.de/icl/2/Resources Unification.Google Scholar
- Wayne Snyder and Jean H Gallier. 1989. Higher order unification revisited: Complete sets of transformations. Technical Reports (CIS) (1989), 778.Google ScholarDigital Library
- Matthieu Sozeau. 2009. A New Look at Generalized Rewriting in Type Theory. Journal of Formalized Reasoning 2, 1 (2009).Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- Masako Takahashi. 1989. Parallel reductions in λ-calculus. Journal of Symbolic Computation 7, 2 (1989), 113?123.Google ScholarDigital Library
- Christian Urban, Andrew M Pitts, and Murdoch J Gabbay. 2004. Nominal unification. Theoretical Computer Science 323, 1-3 (2004), 473–497.Google ScholarDigital Library
- Pawel Urzyczyn. 1997. Type Reconstruction in F Ω. Mathematical. Structures in Comp. Sci. 7, 4 (Aug. 1997), 329–358. Google ScholarDigital Library
- 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 Scholar
Index Terms
- Undecidability of higher-order unification formalised in Coq
Recommendations
On synthetic undecidability in Coq, with an application to the Entscheidungsproblem
CPP 2019: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and ProofsWe formalise the computational undecidability of validity, satisfiability, and provability of first-order formulas following a synthetic approach based on the computation native to Coq's constructive type theory. Concretely, we consider Tarski and ...
Call-by-push-value in Coq: operational, equational, and denotational theory
CPP 2019: Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and ProofsCall-by-push-value (CBPV) is an idealised calculus for functional and imperative programming, introduced as a subsuming paradigm for both call-by-value (CBV) and call-by-name (CBN). We formalise weak and strong operational semantics for (effect-free) ...
Completeness and decidability of converse PDL in the constructive type theory of Coq
CPP 2018: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and ProofsThe completeness proofs for Propositional Dynamic Logic (PDL) in the literature are non-constructive and usually presented in an informal manner. We obtain a formal and constructive completeness proof for Converse PDL by recasting a completeness proof ...
Comments