## The Generic Approximation Lemma (2001)

Venue: | Information Processing Letters |

Citations: | 13 - 2 self |

### BibTeX

@ARTICLE{Hutton01thegeneric,

author = {Graham Hutton and Jeremy Gibbons},

title = {The Generic Approximation Lemma},

journal = {Information Processing Letters},

year = {2001},

volume = {79},

pages = {2001}

}

### OpenURL

### Abstract

The approximation lemma is a simplification of the well-known take lemma, and is used to prove properties of programs that produce lists of values. We show how the approximation lemma, unlike the take lemma, can naturally be generalised from lists to a large class of datatypes, and present a generic approximation lemma that is parametric in the datatype to which it applies. As a useful by-product, we find that generalising the approximation lemma in this way also simplifies its proof. Keywords: Programming calculi; Functional Programming 1 Introduction The standard proof method for programs that consume lists of values is structural induction. However, this method is not applicable to the dual case of programs that produce lists of values, because in general such programs do not have a list argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in [6], and include fixpoint induction [4], the take lemma [3], coin...

### Citations

1331 | Imperative functional programming - Jones, Wadler - 1993 |

220 |
Introduction to Functional Programming Using Haskell
- Bird
- 1998
(Show Context)
Citation Context ...ypes. This is unfortunate, because the take lemma is perhaps the most widely-used proof method for programs that produce lists. Recently, the take lemma has been superseded by the approximation lemma =-=[2]-=-, which is equivalent in power but is simpler to prove and apply. We show how the approximation lemma, unlike the take lemma, can be generalised in a uniform way to other datatypes, and present a gene... |

123 |
Bisimilarity as a theory of functional programming
- Gordon
(Show Context)
Citation Context ...st argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in [6], and include fixpoint induction [4], the take lemma [3], coinduction =-=[7]-=-, and fusion [8]. All but one of the above proof methods for programs that produce lists are not specific to the datatype of lists, but can naturally be generalised to a large class of other datatypes... |

84 | Generic programming — an introduction
- Backhouse, Jansson, et al.
- 1999
(Show Context)
Citation Context ...onic and preserve the limit structure). The key to the generic approximation lemma itself is to define recursive datatypes as least fixpoints of functors , a standard technique in generic programming =-=[1]-=-. Recall that a functor is a mapping F that takes types to types and functions to functions, such that F preserves function typings, identity functions, and the composition of functions. The appropria... |

55 |
Mathematical Theory of Programming Correctness
- Bakker
- 1980
(Show Context)
Citation Context ...eneral such programs do not have a list argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in [6], and include fixpoint induction =-=[4]-=-, the take lemma [3], coinduction [7], and fusion [8]. All but one of the above proof methods for programs that produce lists are not specific to the datatype of lists, but can naturally be generalise... |

19 | Program Calculation Properties of Continuous Algebras
- Fokkinga, Meijer
- 1991
(Show Context)
Citation Context ...e exist two functions in : FA ! A and out : A ! FA that are each other's inverses. A functor is called locally continuous if its mapping on functions is itself continuous. A standard fixpoint theorem =-=[10, 5]-=- states that every locally continuous functor F on cpos and continuous functions has a unique (up to isomorphism) fixpoint A for which the identity function id : A ! A is the unique solution to the re... |

12 | Proof Methods for Structured Corecursive Programs
- Gibbons, Hutton
- 1999
(Show Context)
Citation Context ...roduce lists of values, because in general such programs do not have a list argument over which to perform induction. Proof methods that are applicable to such programs have recently been surveyed in =-=[6]-=-, and include fixpoint induction [4], the take lemma [3], coinduction [7], and fusion [8]. All but one of the above proof methods for programs that produce lists are not specific to the datatype of li... |