Skip to main content

Using Structural Recursion for Corecursion

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

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

Included in the following conference series:

Abstract

We propose a (limited) solution to the problem of constructing stream values defined by recursive equations that do not respect the guardedness condition. The guardedness condition is imposed on definitions of corecursive functions in Coq, AGDA, and other higher-order proof assistants. In this paper, we concentrate in particular on those non-guarded equations where recursive calls appear under functions. We use a correspondence between streams and functions over natural numbers to show that some classes of non-guarded definitions can be modelled through the encoding as structural recursive functions. In practice, this work extends the class of stream values that can be defined in a constructive type theory-based theorem prover with inductive and coinductive types, structural recursion and guarded corecursion.

Work is partially supported by the INRIA CORDI post-doctoral program, the ANR project “A3Pat” ANR-05-BLAN-0146 and by EPSRC postdoctoral grant EP/F044046/1.

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. Abel, A.: Type-Based Termination. A Polymorphic Lambda-Calculus with Sized Higher-Order Types. PhD thesis, Fakultät für Mathematik, Informatik und Statistik der Ludwig-Maximilians-Universität München (2006)

    Google Scholar 

  2. Barthe, G., Courtieu, P.: Efficient Reasoning about Executable Specifications in Coq. In: Carreño, V.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2002. LNCS, vol. 2410, pp. 31–46. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  3. Barthe, G., Frade, M.J., Giménez, E., Pinto, L., Uustalu, T.: Type-based termination of recursive definitions. Mathematical Structures in Computer Science 14, 97–141 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  4. Bertot, Y.: Filters and co-inductive streams, an application to Eratosthenes’ sieve. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 102–115. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

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

    Book  MATH  Google Scholar 

  6. Bertot, Y., Komendantskaya, E.: Experiments on using structural recursion for corecursion: Coq code (2008), http://hal.inria.fr/inria-00322331/

  7. Bertot, Y., Komendantskaya, E.: Inductive and coinductive components of corecursive functions in Coq. Electr. Notes Theor. Comput. Sci. 203(5), 25–47 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  8. Bove, A.: General Recursion in Type Theory. PhD thesis, Department of Computing Science, Chalmers University of Technology (2002)

    Google Scholar 

  9. Bronson, S.: Posting to Coq club. Codata: problem with guardedness condition? (June 30, 2008), http://pauillac.inria.fr/pipermail/coq-club/2008/003783.html

  10. Coquand, T.: Infinite objects in type theory. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, pp. 62–78. Springer, Heidelberg (1994)

    Chapter  Google Scholar 

  11. Danielsson, N.A.: Posting to Coq club. Codata: problem with guardedness condition? An ad-hoc approach to productive definitions (1,4 August 2008), http://pauillac.inria.fr/pipermail/coq-club/2008/003859.html and http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=109

  12. Dijkstra, E.W.: Hamming’s exercise in SASL, circulated privately (June 1981)

    Google Scholar 

  13. Endrullis, J., Grabmayer, C., Hendriks, D., Isihara, A., Klop, J.W.: Productivity of stream definitions. In: Csuhaj-Varjú, E., Ésik, Z. (eds.) FCT 2007. LNCS, vol. 4639, pp. 274–287. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  14. Gianantonio, P.D., Miculan, M.: A unifying approach to recursive and co-recursive definitions. In: Geuvers, H., Wiedijk, F. (eds.) TYPES 2002. LNCS, vol. 2646, pp. 148–161. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  15. Giménez, E.: Un Calcul de Constructions Infinies et son Application à la Vérification des Systèmes Communicants. PhD thesis, Laboratoire de l’Informatique du Parallélisme, Ecole Normale Supérieure de Lyon (1996)

    Google Scholar 

  16. Gordon, M.J.C., Melham, T.F.: Introduction to HOL: a theorem proving environment for higher-order logic. Cambridge University Press, Cambridge (1993)

    MATH  Google Scholar 

  17. Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: POPL, pp. 410–423 (1996)

    Google Scholar 

  18. Jacobs, B., Rutten, J.: A tutorial on (co)algebras and (co)induction. EATCS Bulletin 62, 222–259 (1997)

    MATH  Google Scholar 

  19. Karczmarczuk, J.: Functional differentiation of computer programs. Higher-Order and Symbolic Computation 14(1), 35–57 (2001)

    Article  MATH  Google Scholar 

  20. Nipkow, T., Paulson, L.C., Wenzel, M. (eds.): Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  21. Niqui, M.: Coinductive field of exact real numbers and general corecursion. In: Proc. of CMCS 2006. ENTCS, vol. 164, pp. 121–139. Elsevier, Amsterdam (2006)

    Google Scholar 

  22. Nordström, B.: Terminating general recursion. BIT 28, 605–619 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  23. Paulson, L.: Mechanizing coinduction and corecursion in higher-order logic. Logic and Computation 2(7), 175–204 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  24. Regensburger, F.: Holcf: Higher order logic of computable functions. In: Schubert, E.T., Alves-Foss, J., Windley, P. (eds.) HUG 1995. LNCS, vol. 971, pp. 293–307. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  25. Sijtsma, B.: On the productivity of recursive list definitions. ACM Transactions on Programing Languages and Systems 11(4), 633–649 (1989)

    Article  Google Scholar 

  26. Slind, K.: Function definition in higher order logic. In: von Wright, J., Harrison, J., Grundy, J. (eds.) TPHOLs 1996. LNCS, vol. 1125, Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  27. The Agda Development Team. The agda reference manual, http://appserv.cs.chalmers.se/users/ulfn/wiki/agda.php

  28. The Coq Development Team. The Coq proof assistant reference manual, http://coq.inria.fr

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bertot, Y., Komendantskaya, E. (2009). Using Structural Recursion for Corecursion. In: Berardi, S., Damiani, F., de’Liguoro, U. (eds) Types for Proofs and Programs. TYPES 2008. Lecture Notes in Computer Science, vol 5497. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-02444-3_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-02444-3_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-02443-6

  • Online ISBN: 978-3-642-02444-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics