General recursion in type theory

  • Authors:
  • Ana Bove

  • Affiliations:
  • Department of Computing Science, Chalmers University of Technology, Göteborg, Sweden

  • Venue:
  • TYPES'02 Proceedings of the 2002 international conference on Types for proofs and programs
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this work, a method to formalise general recursive algorithms in constructive type theory is presented throughout examples. The method separates the computational and logical parts of the definitions. As a consequence, the resulting type-theoretic algorithms are clear, compact and easy to understand. They are as simple as their equivalents in a functional programming language, where there is no restriction on recursive calls. Given a general recursive algorithm, the method consists in defining an inductive special-purpose accessibility predicate that characterises the inputs on which the algorithm terminates. The type-theoretic version of the algorithm can then be defined by structural recursion on the proof that the input values satisfy this predicate. When formalising nested algorithms, the special-purpose accessibility predicate and the type-theoretic version of the algorithm must be defined simultaneously because they depend on each other. Since the method separates the computational part from the logical part of a definition, formalising partial functions becomes also possible.