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.
翻译:我们提出了Algco(代数诱导学)这个实用框架,用于对常用的硬币类型进行感测推理,如锥形、溪流和有有限分流系数的断层树。关键的想法是利用代数环球球球的域理论概念,通过原始“感知”元素集合的“感知”来间接地界定对硬币类型的连续操作。这样就可以通过感知直接证据来对代数硬币进行推理的方便策略。我们在科克实施阿尔格科框架,并通过核查以正式语言的硬币三角编码和最弱的预预期前型型语义拼图解库的埃拉托西斯内斯省流变量,以及随机位模型离散概率分布的硬币感采样过程。