hinze-streams: Streams and Unique Fixed Points
Numeric instances for infinite streams. An implementation of:
Functional Pearl: Streams and Unique Fixed Points, Ralf Hinze, University of Oxford
Streams, infinite sequences of elements, live in a coworld: they are given by a coinductive data type, operations on streams are implemented by corecursive programs, and proofs are conducted using coinduction. But there is more to it: suitably restricted, stream equations possess unique solutions, a fact that is not very widely appreciated. We show that this property gives rise to a simple and attractive proof technique essentially bringing equational reasoning to the coworld. In fact, we redevelop the theory of recurrences, finite calculus and generating functions using streams and stream operators building on the cornerstone of unique solutions. The development is constructive: streams and stream operators are implemented in Haskell, usually by one-liners. The resulting calculus or library, if you wish, is elegant and fun to use. Finally, we rephrase the proof of uniqueness using generalised algebraic data types.
Along with the usual instances for infinite streams, this provides: Num, Enum, Real, Fractional, as well as recurrences on streams, finite calculus, generators
Modules
[Index]
Downloads
- hinze-streams-1.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 1.0 |
---|---|
Dependencies | base, haskell98, Stream [details] |
License | BSD-3-Clause |
Author | Ralf Hinze |
Maintainer | Don Stewart <dons@galois.com> |
Category | Data |
Home page | http://code.haskell.org/~dons/code/hinze-streams |
Uploaded | by DonaldStewart at 2009-05-03T21:25:11Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 1340 total (3 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |