Program Extraction from Nested Definitions

  • Kenji Miyamoto
  • Fredrik Nordvall Forsberg
  • Helmut Schwichtenberg
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7998)


Minlog is a proof assistant which automatically extracts computational content in an extension of Gödel’s T from formalized proofs. We report on extending Minlog to deal with predicates defined using a particular combination of induction and coinduction, via so-called nested definitions. In order to increase the efficiency of the extracted programs, we have also implemented a feature to translate terms into Haskell programs. To illustrate our theory and implementation, a formalisation of a theory of uniformly continuous functions due to Berger is presented.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
  2. 2.
    Berger, U.: Program extraction from normalization proofs. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664, pp. 91–106. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  3. 3.
    Berger, U.: From coinductive proofs to exact real arithmetic: theory and applications. Logical Methods in Computer Science 7(1), 1–24 (2011)CrossRefGoogle Scholar
  4. 4.
    Berger, U., Seisenberger, M.: Proofs, programs, processes. Theory of Computing Systems 51, 313–329 (2012)MathSciNetMATHCrossRefGoogle Scholar
  5. 5.
    Berghofer, S., Nipkow, T.: Executing higher order logic. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) TYPES 2000. LNCS, vol. 2277, pp. 24–40. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  6. 6.
    Bird, R., Meertens, L.: Nested datatypes. In: Jeuring, J. (ed.) MPC 1998. LNCS, vol. 1422, pp. 52–67. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  7. 7.
    Bishop, E.: Foundations of Constructive Analysis. McGraw-Hill, New York (1967)MATHGoogle Scholar
  8. 8.
    Ciaffaglione, A., Di Gianantonio, P.: A co-inductive approach to real numbers. In: Coquand, T., Nordström, B., Dybjer, P., Smith, J. (eds.) TYPES 1999. LNCS, vol. 1956, pp. 114–130. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  9. 9.
  10. 10.
    Danielsson, N.A., Altenkirch, T.: Mixing Induction and Coinduction. Draft (2009)Google Scholar
  11. 11.
    Ghani, N., Hancock, P., Pattinson, D.: Continuous functions on final coalgebras. In: Power, J. (ed.) CMCS 2006. Electr. Notes in Theoret. Computer Science (2006)Google Scholar
  12. 12.
    Hancock, P., Pattinson, D., Ghani, N.: Representations of stream processors using nested fixed points. Logical Methods in Computer Science 5(3) (2009)Google Scholar
  13. 13.
  14. 14.
    Jacobs, B., Rutten, J.: An introduction to (co)algebras and (co)induction. In: Sangiorgi, D., Rutten, J. (eds.) Advanced Topics in Bisimulation and Coinduction, vol. 52, pp. 38–99. Cambridge University Press (2011)Google Scholar
  15. 15.
    Krebbers, R., Spitters, B.: Type classes for efficient exact real arithmetic in Coq. Logical Methods in Computer Science 9(1) (2013)Google Scholar
  16. 16.
    Kreisel, G.: Interpretation of analysis by means of constructive functionals of finite types. In: Heyting, A. (ed.) Constructivity in Mathematics, pp. 101–128. North-Holland, Amsterdam (1959)Google Scholar
  17. 17.
    Letouzey, P.: Extraction in coq: An overview. In: Beckmann, A., Dimitracopoulos, C., Löwe, B. (eds.) CiE 2008. LNCS, vol. 5028, pp. 359–369. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  18. 18.
    The Minlog System,
  19. 19.
  20. 20.
    Nakata, K., Uustalu, T.: Resumptions, weak bisimilarity and big-step semantics for while with interactive I/O: An exercise in mixed induction-coinduction. In: Aceto, L., Sobocinski, P. (eds.) SOS. EPTCS, vol. 32, pp. 57–75 (2010)Google Scholar
  21. 21.
  22. 22.
    Schwichtenberg, H.: Minlog. In: Wiedijk, F. (ed.) The Seventeen Provers of the World. LNCS (LNAI), vol. 3600, pp. 151–157. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  23. 23.
    Schwichtenberg, H.: Constructive analysis with witnesses. Manuscript (April 2012),
  24. 24.
    Schwichtenberg, H., Wainer, S.S.: Proofs and Computations. In: Perspectives in Logic. Association for Symbolic Logic and Cambridge University Press (2012)Google Scholar
  25. 25.
    Scott, D.: Domains for denotational semantics. In: Nielsen, M., Schmidt, E.M. (eds.) ICALP 1982. LNCS, vol. 140, pp. 577–610. Springer, Heidelberg (1982)CrossRefGoogle Scholar
  26. 26.
    Takeyama, M.: A new compiler MAlonzo,
  27. 27.
    Wiedmer, E.: Exaktes Rechnen mit reellen Zahlen und anderen unendlichen Objekten. PhD thesis, ETH Zürich (1977)Google Scholar
  28. 28.
    Wiedmer, E.: Computing with infinite objects. Theoretical Comput. Sci. 10, 133–155 (1980)MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Kenji Miyamoto
    • 1
  • Fredrik Nordvall Forsberg
    • 2
  • Helmut Schwichtenberg
    • 1
  1. 1.Ludwig-Maximilians-Universität MünchenGermany
  2. 2.Swansea UniversityUK

Personalised recommendations