Abstract
Bushes are considered as the first example of a truly nested datatype, i. e., a family of datatypes indexed over all types where a constructor argument not only calls this family with a changing index but even with an index that involves the family itself. For the time being, no induction principles for these datatypes are known. However, the author has introduced with Abel and Uustalu (TCS 333(1–2), pp. 3–66, 2005) iteration schemes that guarantee to define only terminating functions on those datatypes.
The article uses a generalization of Bushes to n-fold self-application and shows how to define elements of these types that have a number of data entries that is obtained by iterated raising to the power of n. Moreover, the data entries are just all the n-branching trees up to a certain height.
The real question is how to extract this list of trees from that complicated data structure and to prove this extraction correct. Here, we use the “refined conventional iteration” from the cited article for the extraction and describe a verification that has been formally verified inside Coq with its predicative notion of set.
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.: Containers: Constructing strictly positive types. Theor. Comput. Sci. 342(1), 3–27 (2005)
Abel, A., Matthes, R. (Co-)Iteration for higher-order nested datatypes. In: Geuvers, H., Wiedijk, F. (eds.) TYPES 2002. LNCS, vol. 2646, pp. 1–20. Springer, Heidelberg (2003)
Abel, A., Matthes, R., Uustalu, T.: Generalized iteration and coiteration for higher-order nested datatypes. In: Gordon, A.D. (ed.) FOSSACS 2003. LNCS, vol. 2620, pp. 54–69. Springer, Heidelberg (2003)
Abel, A., Matthes, R., Uustalu, T.: Iteration and coiteration schemes for higher-order and nested datatypes. Theor. Comput. Sci. 333(1-2), 3–66 (2005)
Backhouse, R., Jansson, P., Jeuring, J., Meertens, L.: Generic programming—an introduction. In: Swierstra, S.D., Oliveira, J.N. (eds.) AFP 1998. LNCS, vol. 1608, pp. 28–115. Springer, Heidelberg (1999)
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. In: Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)
Bird, R., Meertens, L.: Nested datatypes. In: Jeuring, J. (ed.) MPC 1998. LNCS, vol. 1422, pp. 52–67. Springer, Heidelberg (1998)
Bird, R., Paterson, R.: Generalised folds for nested datatypes. Formal Aspects of Comput. 11(2), 200–222 (1999)
Bird, R.S., Paterson, R.: De Bruijn notation as a nested datatype. J. of Functional Programming 9(1), 77–91 (1999)
Girard, J.-Y.: Interprétation fonctionnelle et élimination des coupures dans l’arithmétique d’ordre supérieur. Doctorat d’État. Université de Paris VII (1972)
Hinze, R.: Polytypic values possess polykinded types. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 2–27. Springer, Heidelberg (2000)
Hinze, R.: Efficient generalized folds. In: Jeuring, J. (ed.) Proc. of 2nd Wksh. on Generic Programming, WGP 2000, Univ. Utrecht (2000)
Hinze, R.: Generalizing generalized tries. J. of Funct. Program. 10(4), 327–351 (2000)
Hinze, R., Jeuring, J.: Generic haskell: Practice and theory. In: Backhouse, R., Gibbons, J. (eds.) Generic Programming. LNCS, vol. 2793, pp. 1–56. Springer, Heidelberg (2003)
Hoogendijk, P.F., de Moor, O.: Container types categorically. J. of Funct. Program. 10(2), 91–225 (2000)
Löh, A.: Exploring Generic Haskell. Proefschrift (PhD thesis). Institute for Programming Research and Algorithmics, Universiteit Utrecht, 331 pages (2004)
Martin, C., Gibbons, J., Bayley, I.: Disciplined, efficient, generalised folds for nested datatypes. Formal Aspects of Comput. 16(1), 19–35 (2004)
Matthes, R.: Coq development for A Datastructure for Iterated Powers (2006), http://www.irit.fr/~Ralph.Matthes/Coq/MPC06/
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)
Okasaki, C.: From fast exponentiation to square matrices: an adventure in types. In: Proc. of 4th ACM SIGPLAN Int. Conf. on Functional Programming, ICFP 1999, pp. 28–35. ACM Press, New York (1999)
Oury, N.: Extensionality in the calculus of constructions. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 278–293. Springer, Heidelberg (2005)
Rodriguez, D.: Verification of (co)iteration schemes for nested datatypes in Coq. Student project, Inst. für Informatik, LMU München (2006), Available from: http://www.tcs.ifi.lmu.de/~rodrigue/project.html
The Coq Development Team: The Coq Proof Assistant Reference Manual Version 8.0. Project LogiCal, INRIA (2005), System, available from: http://coq.inria.fr/
Wadler, P.: Theorems for free! In: Proc. of 4th Int. Conf. on Functional Programming Languages and Computer Architecture, FPCA 1989, pp. 347–359. ACM Press, New York (1989)
Xi, H.: Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University (1998)
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
Matthes, R. (2006). A Datastructure for Iterated Powers. In: Uustalu, T. (eds) Mathematics of Program Construction. MPC 2006. Lecture Notes in Computer Science, vol 4014. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11783596_18
Download citation
DOI: https://doi.org/10.1007/11783596_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-35631-8
Online ISBN: 978-3-540-35632-5
eBook Packages: Computer ScienceComputer Science (R0)