Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
Termination Checking Nested Inductive and Coinductive Types Thorsten Altenkirch and Nils Anders Danielsson
 

Summary: Termination Checking Nested Inductive and Coinductive Types
Thorsten Altenkirch and Nils Anders Danielsson
University of Nottingham
Abstract
In the dependently typed functional programming language Agda one can easily mix induction
and coinduction. The implementation of the termination/productivity checker is based on a simple
extension of a termination checker for a language with inductive types. However, this simplicity
comes at a price: only types of the form X.Y.F X Y can be handled directly, not types of the form
Y.X.F X Y. We explain the implementation of the termination checker and the ensuing problem.
1 Introduction
This short and speculative note discusses how one can--apparently--extend a termination checker which
accepts structurally recursive programs so that it also accepts guarded corecursive programs (and proofs)
and even mixed recursive/corecursive definitions. However, we will also point out a problem with the
extended checker: the "obvious" way to represent a coinductive type nested within an inductive type
does not work.
Some familiarity with total, dependently typed languages, induction, coinduction, structural recur-
sion and guarded corecursion is assumed.
2 foetus
Originally the termination checker of the dependently typed functional programming language Agda
(Norell 2007; Agda Team 2010) only supported structural recursion. The checker was based on foetus

  

Source: Altenkirch, Thorsten - School of Computer Science, University of Nottingham

 

Collections: Computer Technologies and Information Sciences