Abstract
Unification is a core component of every proof assistant or programming language featuring dependent types. In many cases, it must deal with higher-order problems up to conversion. Since unification in such conditions is undecidable, unification algorithms may include several heuristics to solve common problems. However, when the stack of heuristics grows large, the result and complexity of the algorithm can become unpredictable. Our contributions are twofold: (1) We present a full description of a new unification algorithm for the Calculus of Inductive Constructions (the base logic of Coq), including universe polymorphism, canonical structures (the overloading mechanism baked into Coq's unification), and a small set of useful heuristics. (2) We implemented our algorithm, and tested it on several libraries, providing evidence that the selected set of heuristics suffices for large developments.
- A. Abel and B. Pientka. Higher-order dynamic pattern unification for dependent types and records. In TLCA. Springer, 2011. Google Scholar
Digital Library
- A. Asperti, C. S. Coen, E. Tassi, and S. Zacchiroli. Crafting a proof assistant. In TYPES. Springer-Verlag, 2006. Google Scholar
Digital Library
- A. Asperti, W. Ricciotti, C. S. Coen, and E. Tassi. Hints in unification. In TPHOLs, volume 5674 of LNCS. Springer, 2009. Google Scholar
Digital Library
- A. Asperti, W. Ricciotti, C. S. Coen, and E. Tassi. A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions. LMCS, 8(1), 2012.Google Scholar
- E. Brady. Idris, a general-purpose dependently typed programming language: Design and implementation. JFP, 23, 2013.Google Scholar
- I. Cervesato and F. Pfenning. A linear spine calculus. Journal of Logic and Computation, 13(5):639–688, 2003.Google Scholar
Cross Ref
- A. Chlipala. Certified Programming with Dependent Types. MIT Press, 2011. http://adam.chlipala.net/cpdt/.Google Scholar
- F. Garillot. Generic Proof Tools and Finite Group Theory. PhD thesis, Ecole Polytechnique X, Dec. 2011.Google Scholar
- F. Garillot, G. Gonthier, A. Mahboubi, and L. Rideau. Packaging Mathematical Structures. In TPHOL. Springer, 2009. Google Scholar
Digital Library
- G. Gonthier, A. Asperti, J. Avigad, Y. Bertot, C. Cohen, F. Garillot, S. Le Roux, A. Mahboubi, R. O’Connor, S. Ould Biha, I. Pasca, L. Rideau, A. Solovyev, E. Tassi, and L. Théry. A machine-checked proof of the odd order theorem. In ITP. Springer, 2013. Google Scholar
Digital Library
- G. Gonthier, A. Mahboubi, and E. Tassi. A small scale reflection extension for the Coq system. Technical report, INRIA, 2008.Google Scholar
- G. Gonthier, B. Ziliani, A. Nanevski, and D. Dreyer. How to make ad hoc proof automation less ad hoc. JFP, 23(04):357–401, 2013.Google Scholar
- A. Mahboubi and E. Tassi. Canonical Structures for the working Coq user. In ITP. Springer, 2013. Google Scholar
Digital Library
- D. Miller. Unification of simply typed lamda-terms as logic programming. In ICLP. MIT Press, 1991.Google Scholar
- A. Nanevski, F. Pfenning, and B. Pientka. Contextual modal type theory. ACM Trans. Comput. Logic, 9(3), June 2008. Google Scholar
Digital Library
- U. Norell. Dependently Typed Programming in Agda. In TLDI. ACM, 2009. Google Scholar
Digital Library
- S. Peyton Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for gadts. In ICFP. ACM, 2006. Google Scholar
Digital Library
- J. Reed. Higher-order constraint simplification in dependent type theory. In LFMTP, 2009. Google Scholar
Digital Library
- C. Sacerdoti Coen. Mathematical Knowledge Management and Interactive Theorem Proving. PhD thesis, University of Bologna, 2004.Google Scholar
- A. Saïbi. Outils Generiques de Modelisation et de Demonstration pour la Formalisation des Mathematiques en Theorie des Types. Application a la Theorie des Categories. PhD thesis, University Paris 6, 1999.Google Scholar
- M. Sozeau and N. Tabareau. Universe Polymorphism in Coq. In ITP. Springer, 2014.Google Scholar
Cross Ref
- The Coq Development Team. The Coq Proof Assistant Reference Manual – Version V8.4, 2012.Google Scholar
- P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad hoc. In POPL, pages 60–76, 1989. Google Scholar
Digital Library
- B. Ziliani, D. Dreyer, N. Krishnaswami, A. Nanevski, and V. Vafeiadis. Mtac: A monad for typed tactic programming in coq. To appear in JFP, ??(?):??–??, 2015.Google Scholar
- B. Ziliani, D. Dreyer, N. R. Krishnaswami, A. Nanevski, and V. Vafeiadis. Mtac: A monad for typed tactic programming in Coq. In ICFP, 2013. Google Scholar
Digital Library
Index Terms
A unification algorithm for Coq featuring universe polymorphism and overloading
Recommendations
A unification algorithm for Coq featuring universe polymorphism and overloading
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional ProgrammingUnification is a core component of every proof assistant or programming language featuring dependent types. In many cases, it must deal with higher-order problems up to conversion. Since unification in such conditions is undecidable, unification ...
Undecidability of higher-order unification formalised in Coq
CPP 2020: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and ProofsWe 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 ...
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