The Generic Approximation Lemma

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 generi...

Full description

Bibliographic Details
Main Authors: Hutton, Graham, Gibbons, Jeremy
Format: Article
Published: Elsevier Science 2001
Online Access:https://eprints.nottingham.ac.uk/225/
Description
Summary: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.