Skip to main content Accessibility help
×
Home

An induction principle for nested datatypes in intensional type theory

  • RALPH MATTHES (a1)

Abstract

Nested datatypes are families of datatypes that are indexed over all types such that the constructors may relate different family members (unlike the homogeneous lists). Moreover, the argument types of the constructors refer to indices given by expressions in which the family name may occur. Especially in this case of true nesting, termination of functions that traverse these data structures is far from being obvious. A joint paper with A. Abel and T. Uustalu (Theor. Comput. Sci., 333 (1–2), 2005, pp. 3–66) proposed iteration schemes that guarantee termination not by structural requirements but just by polymorphic typing. They are generic in the sense that no specific syntactic form of the underlying datatype “functor” is required. However, there was no induction principle for the verification of the programs thus obtained, although they are well known in the usual model of initial algebras on endofunctor categories. The new contribution is a representation of nested datatypes in intensional type theory (more specifically, in the calculus of inductive constructions) that is still generic and covers true nesting, guarantees termination of all expressible programs, and has an induction principle that allows to prove functoriality of monotonicity witnesses (maps for nested datatypes) and naturality properties of iteratively defined polymorphic functions.

Copyright

References

Hide All
Abel, A. (2006) A Polymorphic Lambda-Calculus with Sized Higher-Order Types, Doktorarbeit (PhD thesis). Ludwig-Maximilians-Universität München.
Abel, A., Matthes, R. & Uustalu, T. (2005) Iteration and coiteration schemes for higher-order and nested datatypes, Theor. Comput. Sci., 333 (1–2): 366.
Adams, R. (2006) Formalized metatheory with terms represented by an indexed family of types. In Revised Selected Papers from 1st International Workshop on Types for Proofs and Programs, TYPES 2004 (Jouy-en-Josas, December 2004), Filliâtre, J.-C., Paulin-Mohring, C. & Werner, B. (eds), Lecture Notes in Computer Science, vol. 3839. Springer, pp. 116.
Altenkirch, T. (1999) Extensional equality in intensional type theory. In Proceedings of the 14th Annual IEEE Symposium on Logic in Computer Science, LICS '99 (Trento, July 1999). IEEE CS Press, pp. 412420.
Altenkirch, T. & Reus, B. (1999) Monadic presentations of lambda terms using generalized inductive types. In Proceedings of the 13th International Workshop on Computer Science Logic, CSL '99 (Madrid, September 1999), Flum, J. & Rodríguez-Artalejo, M. (eds), Lecture Notes in Computer Science, vol. 1683. Springer, pp. 453468.
Bellegarde, F. & Hook, J. (1994) Substitution: A formal methods case study using monads and transformations, Sci. Comput. Program., 23 (2–3): 287311.
Bertot, Y. & Castéran, P. (2004) Interactive Theorem Proving and Program Development. Coq'Art: The Calculus of Inductive Constructions, Texts in Theoretical Computer Science: An EATCS Series. Springer.
Bird, R. & de Moor, O. (1997) Algebra of Programming, International Series in Computer Science, vol. 100. Prentice Hall.
Bird, R. & Meertens, L. (1998) Nested datatypes. In Proceedings of the 4th International Conference on Mathematics of Program Construction, MPC '98 (Marstrand, June 1998), Jeuring, J. (ed), Lecture Notes in Computer Science, vol. 1422. Springer, pp. 5267.
Bird, R. & Paterson, R. (1999a) De Bruijn notation as a nested datatype, J. Funct. Program., 9 (1): 7791.
Bird, R. & Paterson, R. (1999b) Generalised folds for nested datatypes, Formal Aspects Comput., 11 (2): 200222.
Capretta, V. (2004) A polymorphic representation of induction-recursion. Unpublished note.
Coq Development Team. (2006) The Coq proof assistant reference manual, version 8.1 [online], Project LogiCal, INRIA. Available at: http://coq.inria.fr/. (Accessed 4 May 2009).
Coquand, T. & Paulin, C. (1990) Inductively defined types. In Proceedings of the International Conference on Computer Logic, COLOG-88 (Tallinn, December 1988), Martin-Löf, P. & Mints, G. (eds), Lecture Notes in Computer Science, vol. 417. Springer, pp. 5066.
Dybjer, P. (2000) A general formulation of simultaneous inductive-recursive definitions in type theory, J. Symb. Logic, 65 (2): 525549.
Dybjer, P. & Setzer, A. (2003) Induction–recursion and initial algebras, Ann. Pure Appl. Logic, 124 (1): 147.
Girard, J.-Y. (1972) Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur, Thèse de Doctorat d'État. Université de Paris VII.
Hinze, R. (2000) Efficient generalized folds. In Proceedings of the 2nd Workshop on Generic Programming, WGP 2000 (Ponte de Lima, July 2000), Jeuring, J. (ed). Department of Computer Science, Universiteit Utrecht, pp. 1732.
Hofmann, M. (1995) Extensional Concepts in Intensional Type Theory, PhD thesis. University of Edinburgh.
Martin, C., Gibbons, J. & Bayley, I. (2004) Disciplined, efficient, generalised folds for nested datatypes, Formal Aspects Comput., 16 (1): 1935.
Matthes, R. (1998) Extensions of System F by Iteration and Primitive Recursion on Monotone Inductive Types, Doktorarbeit (PhD thesis). Ludwig-Maximilians-Universität München. Available at: http://www.irit.fr/~Ralph.Matthes/. (Accessed 4 May 2009).
Matthes, R. (2001) Monotone inductive and coinductive constructors of rank 2. In Proceedings of the 15th International Workshop on Computer Science Logic, CSL 2001 (Paris, September 2001), Fribourg, L. (ed), Lecture Notes in Computer Science, vol. 2142. Springer, pp. 600614.
Matthes, R. (2006) Verification of programs on truly nested datatypes in intensional type theory. In Proceedings of the Workshop on Mathematically Structured Functional Programming (Kuressaare, July 2006), McBride, C. & Uustalu, T. (eds), Electronic Workshops in Computing. BCS, article 10.
Matthes, R. (2008) Coq Development for “An Induction Principle for Nested Datatypes in Intensional Type Theory.” Available at: http://www.irit.fr/~Ralph.Matthes/Coq/InductionNested/.
McBride, C. (1999) Dependently Typed Functional Programs and Their Proofs, PhD thesis. University of Edinburgh.
Mendler, N. P. (1987) Recursive types and type constraints in second-order lambda calculus. In Proceedings of the 2nd Annual IEEE Symposium on Logic in Computer Science, LICS '87 (Ithaca, NY, June 1987). IEEE CS Press, pp. 3036.
Oury, N. (2005) Extensionality in the calculus of constructions. In Proceedings of the 18th International Conference on Theorem Proving in Higher-Order Logics, TPHOLs 2005 (Oxford, August 2005), Hurd, J. & Melham, T. F. (eds), Lecture Notes in Computer Science, vol. 3603. Springer, pp. 278293.
Uustalu, T. (1998) Natural Deduction for Intuitionistic Least and Greatest Fixedpoint Logics, with an Application to Program Construction, PhD thesis. Royal Institute of Technology, Stockholm.
Uustalu, T. & Vene, V. (1997) A cube of proof systems for the intuitionistic predicate μ-, ν-logic. In Selected Papers from 8th Nordic Workshop on Programming Theory, NWPT '96 (Oslo, December 1996), Haveraaen, M. & Owe, O. (eds). Research report 248. Department of Informatics, University of Oslo, pp. 237246.
Uustalu, T. & Vene, V. (2002) Least and greatest fixed points in intuitionistic natural deduction, Theor. Comput. Sci., 272 (1–2): 315339.
Werner, B. (2006) On the strength of proof-irrelevant type theories. In Proceedings of the 3rd International Joint Conference on Automated Reasoning, IJCAR 2006 (Seattle, WA, August 2006), Furbach, U. & Shankar, N. (eds), Lecture Notes in Artificial Intelligence, vol. 4130. Springer, pp. 604618.

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

An induction principle for nested datatypes in intensional type theory

  • RALPH MATTHES (a1)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *