Skip to main content

A Few Constructions on Constructors

  • Conference paper
Types for Proofs and Programs (TYPES 2004)

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

Included in the following conference series:

Abstract

We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a two-level approach—they require less work than the standard techniques which inspired them [11,8]. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style [7] to the equivalent programs expressed in terms of induction principles [21] and as such play a crucial behind-the-scenes rôle in Epigram [25].

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: \(\partial\) for data: derivatives of data structures. Fundamenta Informaticae (2005)

    Google Scholar 

  2. Altenkirch, T., McBride, C.: Generic programming within dependently typed programming. In: Generic Programming. Proceedings of the IFIP TC2 Working Conference on Generic Programming, Schloss Dagstuhl, July 2002 (2003)

    Google Scholar 

  3. Benke, M., Dybjer, P., Jansson, P.: Universes for generic programs and proofs in dependent type theory. Nordic Journal of Computing 10, 265–269 (2003)

    MATH  MathSciNet  Google Scholar 

  4. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development, Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  5. 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)

    Chapter  Google Scholar 

  6. Coquand, T.: An analysis of Girard’s paradox. In: Proceedings of the First IEEE Symposium on Logic in Computer Science, Cambridge, Massachussetts, pp. 227–236 (1986)

    Google Scholar 

  7. Coquand, T.: Pattern Matching with Dependent Types. In: Nordström, B., Petersson, K., Plotkin, G. (eds.) Electronic Proceedings of the Third Annual BRA Workshop on Logical Frameworks, Båstad, Sweden (1992)

    Google Scholar 

  8. Cornes, C., Terrasse, D.: Automating Inversion of Inductive Predicates in Coq. In: Berardi, S., Coppo, M. (eds.) TYPES 1995. LNCS, vol. 1158. Springer, Heidelberg (1996)

    Google Scholar 

  9. de Bruijn, N.G.: Telescopic Mappings in Typed Lambda-Calculus. Information and Computation 91, 189–204 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  10. Dybjer, P.: Inductive Sets and Families in Martin-Löf’s Type Theory. In: Huet, G., Plotkin, G. (eds.) Logical Frameworks. CUP (1991)

    Google Scholar 

  11. Giménez, E.: Codifying guarded definitions with recursive schemes. In: Smith, J., Dybjer, P., Nordström, B. (eds.) TYPES 1994. LNCS, vol. 996, pp. 39–59. Springer, Heidelberg (1995)

    Google Scholar 

  12. Giménez, E.: Structural Recursive Definitions in Type Theory. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, p. 397. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  13. Goguen, H.: A Typed Operational Semantics for Type Theory. PhD thesis, Laboratory for Foundations of Computer Science, University of Edinburgh (1994), Available from, http://www.lfcs.informatics.ed.ac.uk/reports/94/ECS-LFCS-94-304/

  14. Harper, R., Pollack, R.: Type checking with universes. Theoretical Computer Science 89, 107–136 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  15. Hinze, R., Jeuring, J., Löh, A.: Type-indexed data types. Science of Computer Programmming 51, 117–151 (2004)

    Article  MATH  Google Scholar 

  16. Hofmann, M., Streicher, T.: A groupoid model refutes uniqueness of identity proofs. In: Proc. Ninth Annual Symposium on Logic in Computer Science (LICS), Paris, France, pp. 208–212. IEEE Computer Society Press, Los Alamitos (1994)

    Chapter  Google Scholar 

  17. Huet, G.: The Zipper. Journal of Functional Programming 7(5), 549–554 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  18. Luo, Z.: Computation and Reasoning: A Type Theory for Computer Science. Oxford University Press, Oxford (1994)

    MATH  Google Scholar 

  19. Magnusson, L., Nordström, B.: The ALF proof editor and its proof engine. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806. Springer, Heidelberg (1994)

    Google Scholar 

  20. 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 

  21. McBride, C.: Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh (1999), Available from, http://www.lfcs.informatics.ed.ac.uk/reports/00/ECS-LFCS-00-419/

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

    Chapter  Google Scholar 

  23. McBride, C.: Epigram: Practical programming with dependent types. In: Vene, V., Uustalu, T. (eds.) AFP 2004. LNCS, vol. 3622, pp. 130–170. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  24. McBride, C., McKinna, J.: Functional Pearl: I am not a Number: I am a Free Variable. In: Nilsson, H. (ed.) Proceedings of the ACM SIGPLAN Haskell Workshop 2004, Snowbird, Utah. ACM, New York (2004)

    Google Scholar 

  25. McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)

    Google Scholar 

  26. Paulin-Mohring, C.: Définitions Inductives en Théorie des Types d’Ordre Supérieur. Habilitation Thesis. Université Claude Bernard, Lyon I (1996)

    Google Scholar 

  27. Smith, J.: The Independence of Peano’s Fourth Axiom from Martin-Löf’s Type Theory without Universes. Journal of Symbolic Logic 53(3) (1983)

    Google Scholar 

  28. Streicher, T.: Investigations into intensional type theory. Habilitation Thesis, Ludwig Maximilian Universität (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

McBride, C., Goguen, H., McKinna, J. (2006). A Few Constructions on Constructors. In: Filliâtre, JC., Paulin-Mohring, C., Werner, B. (eds) Types for Proofs and Programs. TYPES 2004. Lecture Notes in Computer Science, vol 3839. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11617990_12

Download citation

  • DOI: https://doi.org/10.1007/11617990_12

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-31429-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics