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].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: \(\partial\) for data: derivatives of data structures. Fundamenta Informaticae (2005)
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)
Benke, M., Dybjer, P., Jansson, P.: Universes for generic programs and proofs in dependent type theory. Nordic Journal of Computing 10, 265–269 (2003)
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)
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)
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)
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)
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)
de Bruijn, N.G.: Telescopic Mappings in Typed Lambda-Calculus. Information and Computation 91, 189–204 (1991)
Dybjer, P.: Inductive Sets and Families in Martin-Löf’s Type Theory. In: Huet, G., Plotkin, G. (eds.) Logical Frameworks. CUP (1991)
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)
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)
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/
Harper, R., Pollack, R.: Type checking with universes. Theoretical Computer Science 89, 107–136 (1991)
Hinze, R., Jeuring, J., Löh, A.: Type-indexed data types. Science of Computer Programmming 51, 117–151 (2004)
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)
Huet, G.: The Zipper. Journal of Functional Programming 7(5), 549–554 (1997)
Luo, Z.: Computation and Reasoning: A Type Theory for Computer Science. Oxford University Press, Oxford (1994)
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)
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)
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/
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)
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)
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)
McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)
Paulin-Mohring, C.: Définitions Inductives en Théorie des Types d’Ordre Supérieur. Habilitation Thesis. Université Claude Bernard, Lyon I (1996)
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)
Streicher, T.: Investigations into intensional type theory. Habilitation Thesis, Ludwig Maximilian Universität (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)