Skip to main content

A Datastructure for Iterated Powers

  • Conference paper
Mathematics of Program Construction (MPC 2006)

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

Included in the following conference series:

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.

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.: Containers: Constructing strictly positive types. Theor. Comput. Sci. 342(1), 3–27 (2005)

    Article  MATH  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

    Article  MATH  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

  6. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. In: Coq’Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004)

    Google Scholar 

  7. Bird, R., Meertens, L.: Nested datatypes. In: Jeuring, J. (ed.) MPC 1998. LNCS, vol. 1422, pp. 52–67. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  8. Bird, R., Paterson, R.: Generalised folds for nested datatypes. Formal Aspects of Comput. 11(2), 200–222 (1999)

    Article  MATH  Google Scholar 

  9. Bird, R.S., Paterson, R.: De Bruijn notation as a nested datatype. J. of Functional Programming 9(1), 77–91 (1999)

    Article  MATH  MathSciNet  Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

  12. Hinze, R.: Efficient generalized folds. In: Jeuring, J. (ed.) Proc. of 2nd Wksh. on Generic Programming, WGP 2000, Univ. Utrecht (2000)

    Google Scholar 

  13. Hinze, R.: Generalizing generalized tries. J. of Funct. Program. 10(4), 327–351 (2000)

    Article  MATH  MathSciNet  Google Scholar 

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

    Chapter  Google Scholar 

  15. Hoogendijk, P.F., de Moor, O.: Container types categorically. J. of Funct. Program. 10(2), 91–225 (2000)

    Google Scholar 

  16. Löh, A.: Exploring Generic Haskell. Proefschrift (PhD thesis). Institute for Programming Research and Algorithmics, Universiteit Utrecht, 331 pages (2004)

    Google Scholar 

  17. Martin, C., Gibbons, J., Bayley, I.: Disciplined, efficient, generalised folds for nested datatypes. Formal Aspects of Comput. 16(1), 19–35 (2004)

    Article  MATH  Google Scholar 

  18. Matthes, R.: Coq development for A Datastructure for Iterated Powers (2006), http://www.irit.fr/~Ralph.Matthes/Coq/MPC06/

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

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

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

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

  23. The Coq Development Team: The Coq Proof Assistant Reference Manual Version 8.0. Project LogiCal, INRIA (2005), System, available from: http://coq.inria.fr/

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

    Chapter  Google Scholar 

  25. Xi, H.: Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University (1998)

    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

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)

Publish with us

Policies and ethics