Consistency and Completeness of Rewriting in the Calculus of Constructions
Adding rewriting to a proof assistant based on the Curry-Howard isomorphism, such as Coq, may greatly improve usability of the tool. Unfortunately adding an arbitrary set of rewrite rules may render the underlying formal system undecidable and inconsistent. While ways to ensure termination and confluence, and hence decidability of type-checking, have already been studied to some extent, logical consistency has got little attention so far.
In this paper we show that consistency is a consequence of canonicity, which in turn follows from the assumption that all functions defined by rewrite rules are complete. We provide a sound and terminating, but necessarily incomplete algorithm to verify this property. The algorithm accepts all definitions that follow dependent pattern matching schemes presented by Coquand and studied by McBride in his PhD thesis. Moreover, many definitions by rewriting containing rules which depart from standard pattern matching are also accepted.
KeywordsPattern Match Function Symbol Critical Pair Proof Assistant Elimination Rule
Unable to display preview. Download preview PDF.
- 2.Barendregt, H.: Lambda calculi with types. In: Abramsky, S., Gabbay, D.M., Maibaum, T.S.E. (eds.) Handbook of Logic in Computer Science, ch. 2, pp. 117–309. Oxford University Press, Oxford (1992)Google Scholar
- 8.Chrząszcz, J.: Modules in Type Theory with Generative Definitions. PhD thesis, Warsaw Univerity and University of Paris-Sud (January 2004)Google Scholar
- 9.The Coq proof assistant, http://coq.inria.fr/
- 10.Coquand, T.: Pattern matching with dependent types. In: Proceedings of the Workshop on Types for Proofs and Programs, Båstad, Sweden, pp. 71–83 (1992)Google Scholar
- 11.Cornes, C.: Conception d’un langage de haut niveau de répresentation de preuves. PhD thesis, Université Paris VII (1997)Google Scholar
- 13.Kounalis, E.: Completeness in data type specifications. In: Caviness, B.F. (ed.) ISSAC 1985 and EUROCAL 1985. LNCS, vol. 204, pp. 348–362. Springer, Heidelberg (1985)Google Scholar
- 14.McBride, C.: Dependently Typed Functional Programs and Their Proofs. PhD thesis, University of Edinburgh (1999)Google Scholar
- 17.Terese.: Term Rewriting Systems. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (2003)Google Scholar
- 18.Thiel, J.-J.: Stop loosing sleep over incomplete specifications. In: Proc. of POPL 1984, pp. 76–82. ACM Press, New York (1984)Google Scholar
- 20.Walukiewicz-Chrząszcz, D.: Termination of Rewriting in the Calculus of Constructions. PhD thesis, Warsaw University and University Paris XI (2003)Google Scholar
- 21.Walukiewicz-Chrząszcz, D., Chrząszcz, J.: Consistency and completeness of rewriting in the calculus of constructions, available for download at http://www.mimuw.edu.pl/homedirchrzaszcz/papers/
- 22.Werner, B.: Méta-théorie du Calcul des Constructions Inductives. PhD thesis, Université Paris 7 (1994)Google Scholar