Skip to main content

Automating inversion of inductive predicates in Coq

  • Conference paper
  • First Online:
Types for Proofs and Programs (TYPES 1995)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1158))

Included in the following conference series:

Abstract

An inductive definition of a set is often informally presented by giving some rules that explain how to build the elements of the set. The closure property states that any object is in the set if and only if it has been generated according to the formation rules. This is enough to justify case analysis reasoning: we can read the formation rules backwards to derive the necessary conditions for a given instance to hold. The problem of inversion consists in finding out these conditions.

In this paper we address the problem of deriving inversion lemmas in logical frameworks based on Type Theory that have been extended with inductive definitions at the primitive level. These frameworks associate to each inductive definition a case analysis principle corresponding to the closure property. In this formal context, inversion lemmas can be seen as derived case analysis principles. Though they are intuitively simple they are curiously hard to formalize.

We relate first inversion to completion in logic programming. Then we discuss two general algorithms to generate inversion lemmas. They are presented in the proof assistant system Coq [8] but they can be adapted to any other proof assistant having a similar notion of inductive definition.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. P. Aczel: An Introduction to Inductive Definitions. The Handbook of Mathematical Logic, J. Barwise ed., North-Holland, (1992) 739–782

    Google Scholar 

  2. L. Augustsson: Compiling Pattern Matching. In J.P. Jouannaud, ed., Conference on Functional Programming Languages and Computer Architecture (LNCS 201), pages, 368–381, Nancy, France, 1985.

    Google Scholar 

  3. K. Clark: Negation as Failure. Logic and Databases, Ed.H. Gallaire, J.Minker. Plenum Press New York, pp.293–322, 1978.

    Google Scholar 

  4. T. Coquand: Pattern Matching with Dependent Types. Informal Proceedings Types for Proofs and Programs, June 1992.

    Google Scholar 

  5. T. Coquand, J.M.Smith: What is the status of pattern matching in type theory. El Wintermöte, pp.112–114, June 1993.

    Google Scholar 

  6. T. Coquand, G. Huet: The Calculus of Constructions. Information and Computation. Vol. 76, Nos. 2/3, February/March 1988.

    Google Scholar 

  7. C. Cornes: Inversion des Prédicats Inductifs. Université Paris VII, Rapport de stage de DEA Informatique Fondamentale. 1993.

    Google Scholar 

  8. C. Cornes et al: The Coq Proof Assistant Reference Manual, Version 5.10. Projet Coq, Inria-Rocquencourt and CNRS-ENS Lyon, France.

    Google Scholar 

  9. C. Cornes, D. Terrasse: Inverting Inductive Predicates in Coq. Rapport de Recherche I.N.R.I.A. to appear.

    Google Scholar 

  10. E. Giménez: Codifying guarded definitions with recursive schemes. In BRA Workshop on Types for Proofs and Programs, June 1994. LNCS 996 (1994) 39–59.

    Google Scholar 

  11. E. Giménez: The implementation of coinductive types in Coq: an experiment with the Alternating Bit Protocol. In BRA Workshop Types for Proofs and Programs, Turin, June 1995. To appear in the LNCS series.

    Google Scholar 

  12. Z. Luo: Computation and Reasoning: A Type Theory for Computer Science. 1994. Oxford University Press.

    Google Scholar 

  13. P. Manoury, M. Simonot: Automatizing Termination Proofs of Recursively Defined Functions. Theoretical Computer Science. Vol. 135, pp.319–343, 1994.

    Google Scholar 

  14. P. Martin-Löf: Intuitionistic Type Theory. Bibliopolis, Napoli, 1984.

    Google Scholar 

  15. Ch. Paulin-Mohring: Inductive Definitions in the System Coq: Rules and Properties. Proceedings of the International Conference on Typed Lambda Calculi and Applications (TLCA), Springer-Verlag LNCS 664 (1992) 328–345.

    Google Scholar 

  16. T. Streicher: Semantical Investigations into Intensional Type Theory. LMU München. Habilitationsschrift. 1993

    Google Scholar 

  17. B. Werner: Une Théorie des Constructions Inductives. Thèse Université Paris VII, May 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Stefano Berardi Mario Coppo

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cornes, C., Terrasse, D. (1996). Automating inversion of inductive predicates in Coq. In: Berardi, S., Coppo, M. (eds) Types for Proofs and Programs. TYPES 1995. Lecture Notes in Computer Science, vol 1158. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61780-9_64

Download citation

  • DOI: https://doi.org/10.1007/3-540-61780-9_64

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61780-8

  • Online ISBN: 978-3-540-70722-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics