Inductive Reasoning for Coinductive Types

01/24/2023
by   Alexander Bagnall, et al.
0

We present AlgCo (Algebraic Coinductives), a practical framework for inductive reasoning over commonly used coinductive types such as conats, streams, and infinitary trees with finite branching factor. The key idea is to exploit the domain-theoretic notion of algebraic CPO to define continuous operations over coinductive types indirectly via primitive recursion on "dense" collections of their elements. This enables a convenient strategy for reasoning about algebraic coinductives by straightforward proofs by induction. We implement the AlgCo framework in Coq and demonstrate its power by verifying a stream variant of the sieve of Eratosthenes, a regular expression library based on coinductive trie encodings of formal languages, and weakest pre-expectation style semantics for coinductive sampling processes over discrete probability distributions in the random bit model.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset