Consistency and Completeness of Rewriting in the Calculus of Constructions

  • Daria Walukiewicz-Chrząszcz
  • Jacek Chrząszcz
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4130)


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.


Pattern Match Function Symbol Critical Pair Proof Assistant Elimination Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barbanera, F., Fernández, M., Geuvers, H.: Modularity of strong normalization in the algebraic-λ-cube. Journal of Functional Programming 7(6), 613–660 (1997)MATHCrossRefMathSciNetGoogle Scholar
  2. 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
  3. 3.
    Barras, B., Grégoire, B.: On the role of type decorations in the calculus of inductive constructions. In: Ong, L. (ed.) CSL 2005. LNCS, vol. 3634, pp. 151–166. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  4. 4.
    Blanqui, F.: Definitions by rewriting in the Calculus of Constructions. Mathematical Structures in Computer Science 15(1), 37–92 (2005)MATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Blanqui, F., Jouannaud, J.-P., Okada, M.: The Calculus of Algebraic Constructions. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 301–316. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  6. 6.
    Brady, E., McBride, C., McKinna, J.: Inductive families need not store their indices. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 115–129. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Chrząszcz, J.: Modules in Coq are and will be correct. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 130–146. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  8. 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. 9.
    The Coq proof assistant,
  10. 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. 11.
    Cornes, C.: Conception d’un langage de haut niveau de répresentation de preuves. PhD thesis, Université Paris VII (1997)Google Scholar
  12. 12.
    Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Informatica 10, 27–52 (1978)MATHCrossRefMathSciNetGoogle Scholar
  13. 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. 14.
    McBride, C.: Dependently Typed Functional Programs and Their Proofs. PhD thesis, University of Edinburgh (1999)Google Scholar
  15. 15.
    Paulin-Mohring, C.: Inductive definitions in the system Coq: Rules and properties. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664, pp. 328–345. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  16. 16.
    Schürmann, C., Pfenning, F.: A coverage checking algorithm for LF. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 120–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  17. 17.
    Terese.: Term Rewriting Systems. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge (2003)Google Scholar
  18. 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
  19. 19.
    Walukiewicz-Chrząszcz, D.: Termination of rewriting in the calculus of constructions. Journal of Functional Programming 13(2), 339–414 (2003)MATHMathSciNetGoogle Scholar
  20. 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. 21.
    Walukiewicz-Chrząszcz, D., Chrząszcz, J.: Consistency and completeness of rewriting in the calculus of constructions, available for download at
  22. 22.
    Werner, B.: Méta-théorie du Calcul des Constructions Inductives. PhD thesis, Université Paris 7 (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Daria Walukiewicz-Chrząszcz
    • 1
  • Jacek Chrząszcz
    • 1
  1. 1.Institute of InformaticsWarsaw UniversityWarsawPoland

Personalised recommendations