Partial Recursive Functions in Higher-Order Logic

  • Alexander Krauss
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4130)


Based on inductive definitions, we develop an automated tool for defining partial recursive functions in Higher-Order Logic and providing appropriate reasoning tools for them. Our method expresses termination in a uniform manner and includes a very general form of pattern matching, where patterns can be arbitrary expressions. Termination proofs can be deferred, restricted to subsets of arguments and are interchangeable with other proofs about the function. We show that this approach can also facilitate termination arguments for total functions, in particular for nested recursions. We implemented our tool as a definitional specification mechanism for Isabelle/HOL.


Recursion Relation Partial Function Recursive Call Total Function Induction Rule 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barthe, G., Forest, J., Pichardie, D., Rusu, V.: Defining and reasoning about recursive functions: a practical tool for the Coq proof assistant. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, Springer, Heidelberg (2006)CrossRefGoogle Scholar
  2. 2.
    Berghofer, S., Wenzel, M.: Inductive datatypes in HOL - lessons learned in formal-logic engineering. In: Bertot, Y., Dowek, G., Hirschowitz, A., Paulin, C., Théry, L. (eds.) TPHOLs 1999. LNCS, vol. 1690, pp. 19–36. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  3. 3.
    Bertot, Y., Castéran, P.: Interactive theorem proving and program development: Coq’Art: the calculus of inductive constructions. Texts in theoretical comp. science. Springer, Heidelberg (2004)zbMATHGoogle Scholar
  4. 4.
    Bove, A., Capretta, V.: Modelling general recursion in type theory. Mathematical Structures in Computer Science 15(4), 671–708 (2005)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Boyer, R.S., Moore, J.S.: A Computational Logic. Academic Press, New York (1979)zbMATHGoogle Scholar
  6. 6.
    Dubois, C., Donzeau-Gouge, V.: A step towards the mechanization of partial functions: domains as inductive predicates. In: CADE-15 Workshop on mechanization of partial functions (1998)Google Scholar
  7. 7.
    Giesl, J.: Termination of nested and mutually recursive algorithms. Journal of Automated Reasoning 19(1), 1–29 (1997)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Giesl, J., Thiemann, R., Schneider-Kamp, P.: Proving and disproving termination of higher-order functions. In: Gramlich, B. (ed.) FroCos 2005. LNCS (LNAI), vol. 3717, pp. 216–231. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Gordon, M., Melham, T. (eds.): Introduction to HOL: A theorem proving environment for higher order logic. Cambridge University Press, Cambridge (1993)zbMATHGoogle Scholar
  10. 10.
    Harrison, J.: The HOL Light theorem prover,
  11. 11.
    Krstić, S., Matthews, J.: Inductive invariants for nested recursion. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 253–269. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  12. 12.
    Lee, C.S., Jones, N.D., Ben-Amram, A.M.: The size-change principle for program termination. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 81–92 (2001)Google Scholar
  13. 13.
    Manolios, P., Moore, J.S.: Partial functions in ACL2. J. Autom. Reasoning 31(2), 107–127 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Müller, O., Slind, K.: Treating partiality in a logic of total functions. The Computer Journal 40(10), 640–652 (1997)CrossRefGoogle Scholar
  15. 15.
    Nipkow, T., Paulson, L.C., Wenzel, M.T.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHCrossRefGoogle Scholar
  16. 16.
    Paulson, L.C.: A fixedpoint approach to implementing (co)inductive definitions. In: Bundy, A. (ed.) CADE 1994. LNCS, vol. 814, pp. 148–161. Springer, Heidelberg (1994)Google Scholar
  17. 17.
    Slind, K.: Function definition in Higher-Order Logic. In: von Wright, J., Harrison, J., Grundy, J. (eds.) TPHOLs 1996. LNCS, vol. 1125, pp. 381–397. Springer, Heidelberg (1996)Google Scholar
  18. 18.
    Slind, K.: Reasoning About Terminating Functional Programs. PhD thesis, Institut für Informatik, TU München (1999)Google Scholar
  19. 19.
    Slind, K.: Another look at nested recursion. In: Aagaard, M.D., Harrison, J. (eds.) TPHOLs 2000. LNCS, vol. 1869, pp. 498–518. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  20. 20.
    Urban, C., Tasson, C.: Nominal techniques in Isabelle/HOL. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 38–53. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Walther, C.: On proving the termination of algorithms by machine. Artif. Intell. 71(1), 101–157 (1994)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Alexander Krauss
    • 1
  1. 1.Institut für InformatikTechnische Universität München 

Personalised recommendations