Skip to main content

Equations: A Dependent Pattern-Matching Compiler

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6172))

Abstract

We present a compiler for definitions made by pattern matching on inductive families in the Coq system. It allows to write structured, recursive dependently-typed functions as a set of equations, automatically find their realization in the core type theory and generate proofs to ease reasoning on them. It provides a complete package to define and reason on functions in the proof assistant, substantially reducing the boilerplate code and proofs one usually has to write, also hiding the intricacies related to the use of dependent types and complex recursion schemes.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Goguen, H., McBride, C., McKinna, J.: Eliminating dependent pattern matching. In: Futatsugi, K., Jouannaud, J.-P., Meseguer, J. (eds.) Algebra, Meaning, and Computation. LNCS, vol. 4060, pp. 521–540. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Coquand, T.: Pattern Matching with Dependent Types. In: Proceedings of the Workshop on Logical Frameworks (1992)

    Google Scholar 

  3. Augustsson, L.: Compiling Pattern Matching. In: FPCA, pp. 368–381 (1985)

    Google Scholar 

  4. Barras, B., Corbineau, P., Grégoire, B., Herbelin, H., Sacchini, J.L.: A New Elimination Rule for the Calculus of Inductive Constructions. In: Berardi, S., Damiani, F., de’Liguoro, U. (eds.) TYPES 2008. LNCS, vol. 5497, pp. 32–48. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  5. Norell, U.: Towards a practical programming language based on dependent type theory. PhD thesis, Department of Computer Science and Engineering, Chalmers University of Technology, SE-412 96 Göteborg, Sweden (2007)

    Google Scholar 

  6. McBride, C.: Elimination with a Motive. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) TYPES 2000. LNCS, vol. 2277, pp. 197–216. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  7. McBride, C., Goguen, H., McKinna, J.: A Few Constructions on Constructors. Types for Proofs and Programs, 186–200 (2004)

    Google Scholar 

  8. Sozeau, M., Oury, N.: First-class type classes. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 278–293. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Streicher, T.: Semantics of Type Theory. Springer, Heidelberg (1991)

    MATH  Google Scholar 

  10. Cornes, C.: Conception d’un langage de haut niveau de représentation de preuves: Récurrence par filtrage de motifs, Unification en présesence de types inductifs primitifs, Synthése de lemmes d’inversion. PhD thesis, Université Paris 7 (1997)

    Google Scholar 

  11. McBride, C.: Inverting Inductively Defined Relations in LEGO. In: Giménez, E., Paulin-Mohring, C. (eds.) TYPES 1996. LNCS, vol. 1512, pp. 236–253. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  12. McBride, C., McKinna, J.: The view from the left. J. Funct. Program. 14, 69–111 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  13. Barthe, G., Forest, J., Pichardie, D., Rusu, V.: Defining and Reasoning About Recursive Functions: A Practical Tool for the Coq Proof Assistant. Functional and Logic Programming, 114–129 (2006)

    Google Scholar 

  14. Bove, A., Capretta, V.: Modelling general recursion in type theory. Mathematical Structures in Computer Science 15, 671–708 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  15. Sozeau, M.: Un environnement pour la programmation avec types dépendants. PhD thesis, Université Paris 11, Orsay, France (2008)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Sozeau, M. (2010). Equations: A Dependent Pattern-Matching Compiler. In: Kaufmann, M., Paulson, L.C. (eds) Interactive Theorem Proving. ITP 2010. Lecture Notes in Computer Science, vol 6172. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14052-5_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14052-5_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14051-8

  • Online ISBN: 978-3-642-14052-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics