Sciweavers

CEFP
2009
Springer

Reasoning about Codata

13 years 10 months ago
Reasoning about Codata
Programmers happily use induction to prove properties of recursive programs. To show properties of corecursive programs they employ coinduction, but perhaps less enthusiastically. Coinduction is often considered a rather low-level proof method, in particular, as it departs quite radically from equational reasoning. Corecursive programs are conveniently defined using recursion equations. Suitably restricted, these equations possess unique solutions. Uniqueness gives rise to a simple and attractive proof technique, which essentially brings equational reasoning to the coworld. We illustrate the approach using two major examples: streams and infinite binary trees. Both coinductive types exhibit a rich structure: they are applicative functors or idioms, and they can be seen as memo-tables or tabulations. We show that definitions and calculations benefit immensely from this additional structure.
Ralf Hinze
Added 16 Feb 2011
Updated 16 Feb 2011
Type Journal
Year 2009
Where CEFP
Authors Ralf Hinze
Comments (0)