## Simple General Recursion in Type Theory (2000)

Venue: | Nordic Journal of Computing |

Citations: | 10 - 2 self |

### BibTeX

@ARTICLE{Bove00simplegeneral,

author = {Ana Bove},

title = {Simple General Recursion in Type Theory},

journal = {Nordic Journal of Computing},

year = {2000},

volume = {8},

pages = {2001}

}

### Years of Citing Articles

### OpenURL

### Abstract

General recursive algorithms are such that the recursive calls are performed on arguments satisfying no condition that guarantees termination. Hence, there is no direct way of formalising them in type theory. The standard way of handling general recursion in type theory uses a well-founded recursion principle. Unfortunately, this way of formalising general recursive algorithms often produces unnecessarily long and complicated codes. On the other hand, functional programming languages like Haskell impose no restrictions on recursive programs, and then writing general recursive algorithms is straightforward. In addition, functional programs are usually short and self-explanatory. However, the existing frameworks for reasoning about the correctness of Haskell-like programs are weaker than the framework provided by type theory. The goal of this work is to present a method that combines the advantages of both programming styles when writing simple general recursive algorithms....

### Citations

471 |
The calculus of constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context ...type theory. In addition, we use the proof assistant ALF [AGNvS94, MN94] for presenting our examples. However, our method can also be used in other type theories such as the Calculus of Constructions =-=[CH88], and then we could -=-use the proof assistant Coq [DFH + 91] for presenting the examples. In what follows, sometimes we use "type theory" as an abbreviation for "Martin-Lof's type theory". This paper su... |

441 |
The formulae-as-types notion of construction
- Howard
- 1980
(Show Context)
Citation Context ... rule for each of the cases that need to be considered and provides an easy syntactic condition that guarantees the termination of the algorithm. 1 Introduction Following the Curry-Howard isomorphism =-=[How80]-=-, constructive type theory (see for example [ML84, CH88]) can be seen as a programming language where specifications are represented as types and programs as objects of the types. 1 Hence, when a spec... |

342 | Intuitionistic type theory - Martin-Löf - 1984 |

261 | Programming in Martin-Löf’s Type Theory: An Introduction - Nordstrom, Petersson, et al. - 1990 |

177 | An introduction to inductive definitions - Aczel - 1977 |

147 |
LEGO Proof Development System: User's Manual
- Luo, Pollack
- 1992
(Show Context)
Citation Context ...ted a verification of a first-order unification algorithm using the Coq proof assistant. A special attention should be paid to McBride's formalisation (see [McB99]) of a unification algorithm in Lego =-=[LP92]-=-, where he exploits the use of dependent types in programming. The way in which McBride defines terms and substitutions permits a reformulation of the unification problem in a structural way with a le... |

93 | The ALF proof editor and its proof engine - Magnusson, Nordström - 1994 |

70 | Dependently Typed Functional Programs and their Proofs
- McBride
- 1999
(Show Context)
Citation Context ...nd then proves it. Rouyer [Rou92] has presented a verification of a first-order unification algorithm using the Coq proof assistant. A special attention should be paid to McBride's formalisation (see =-=[McB99]-=-) of a unification algorithm in Lego [LP92], where he exploits the use of dependent types in programming. The way in which McBride defines terms and substitutions permits a reformulation of the unific... |

65 | A general formulation of simultaneous inductiverecursive definitions in type theory
- Dybjer
- 2000
(Show Context)
Citation Context .... This would at first seem to be not possible since fAcc would need f alg to be defined and we would use fAcc to define f alg. However, Dybjer's schema on simultaneous inductive-recursive definitions =-=[Dyb00]-=- gives us the means to define fAcc and f alg in a simultaneous way. In [BC00], we show how we can formalise nested recursive algorithms using Dybjer's schema. The method for formalising nested algorit... |

36 | A user’s guide to ALF - Altenkirch, Gaspes, et al. - 1994 |

34 |
Deductive Synthesis of the Unification Algorithm
- Manna, Waldinger
- 1981
(Show Context)
Citation Context ...eral studies. Here we briefly discuss only those that are more relevant. See [Bov99] for a more complete discussion of the related work on unification. In [Pau85], Paulson closely follows the work in =-=[MW81]-=- to verify the unification algorithm in LCF [GMW79]. However, although Manna and Waldinger synthesise a program, Paulson states the unification algorithm and then proves it. Rouyer [Rou92] has present... |

30 | Terminating general recursion
- Nordström
- 1988
(Show Context)
Citation Context ...milar to the one presented here for formalising simple general recursive algorithms. 4.1 Related Work There are not many studies on formalising general recursion in type theory, as far as we know. In =-=[Nor88]-=-, Nordstrom uses the predicate Acc for that purpose. Balaa and Bertot [BB00] use fix-point equations to obtain the desired equalities for the recursive definitions in Coq, but one still has to mix the... |

18 | Function definition in Higher-Order Logic
- Slind
- 1996
(Show Context)
Citation Context ...quations to obtain the desired equalities for the recursive definitions in Coq, but one still has to mix the actual algorithm with proofs concerning the well-foundedness of the recursive calls. Slind =-=[Sli96]-=- has studied the problem of defining general recursive functions in classical higher order logic. As his framework is quite different from ours, he does not face the same kind of problem as we do. In ... |

16 | Fixpoint equations for well-founded recursion in type theory
- Balaa, Bertot
- 2000
(Show Context)
Citation Context ...rithms. 4.1 Related Work There are not many studies on formalising general recursion in type theory, as far as we know. In [Nor88], Nordstrom uses the predicate Acc for that purpose. Balaa and Bertot =-=[BB00]-=- use fix-point equations to obtain the desired equalities for the recursive definitions in Coq, but one still has to mix the actual algorithm with proofs concerning the well-foundedness of the recursi... |

16 |
Pattern matching with dependent types. In Proceeding from the logical framework workshop at B*astad
- Coquand
- 1992
(Show Context)
Citation Context ... Set to also refer to the type of propositions. 3 2.2 Brief Introduction to ALF ALF (see [AGNvS94, MN94]) is an interactive proof assistant for Martin-Lof's type theory extended with pattern matching =-=[Coq92]-=-. In Martin-Lof's type theory, theorems are identified with types and a proof is an object of the type. ALF ensures that the constructed objects are well-formed and well-typed. Since proofs are object... |

12 |
Développement de l’algorithme d’unification dans le calcul des constructions
- Rouyer
- 1992
(Show Context)
Citation Context ... the work in [MW81] to verify the unification algorithm in LCF [GMW79]. However, although Manna and Waldinger synthesise a program, Paulson states the unification algorithm and then proves it. Rouyer =-=[Rou92]-=- has presented a verification of a first-order unification algorithm using the Coq proof assistant. A special attention should be paid to McBride's formalisation (see [McB99]) of a unification algorit... |

3 | Programming in Martin-Löf type theory: Unification - A non-trivial example
- Bove
- 1999
(Show Context)
Citation Context ...of assistant Coq [DFH + 91] for presenting the examples. In what follows, sometimes we use "type theory" as an abbreviation for "Martin-Lof's type theory". This paper summarises th=-=e work presented in [Bov99]-=-. The rest of the paper is organised as follows: Although this paper is intended for readers who have some basic knowledge of Martin-Lof's type theory, in section 2 we give a brief introduction to thi... |

1 |
Nested general recursion and partiality
- Bove
- 2001
(Show Context)
Citation Context ...their Haskell versions, where there exists no restriction on the recursive calls. Second, as totality is now a separate task, we can also use this method to formalise partial functions as is shown in =-=[BC00]-=-. Finally, our method also simplifies the task of formal 17 verification. Often, in the process of verifying complex algorithms, the formalisation of the algorithm is so complicated and clouded with l... |

1 |
An efficient unificaction algorithm
- Martelli, Montanari
- 1982
(Show Context)
Citation Context ...ch that sb 0 (t) = sb 1 (sb(t)) for all term t. The unification algorithm we consider here is a deterministic version of the first (non-deterministic) algorithm presented by Martelli and Montanari in =-=[MM82]-=-. Its Haskell version 5 is presented in figure 2. Given a list of pairs of terms, the algorithm returns a substitution that unifies the list if such a substitution exists, or the special value Nothing... |

1 |
Verifying the unification algorithmn
- Paulson
- 1985
(Show Context)
Citation Context ...cation algorithms have been the centre of several studies. Here we briefly discuss only those that are more relevant. See [Bov99] for a more complete discussion of the related work on unification. In =-=[Pau85]-=-, Paulson closely follows the work in [MW81] to verify the unification algorithm in LCF [GMW79]. However, although Manna and Waldinger synthesise a program, Paulson states the unification algorithm an... |