arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.15919cs.LO
收藏

Monad 用几页额外篇幅能做和不能做的事

What Monads Can and Cannot Do with a Few Extra Pages

IT University of Copenhagen(哥本哈根信息技术大学)

Rasmus Ejlers Møgelberg, Maaike Zwart

AI总结:

本文首次系统研究了在类型论中将 delay monad 与计算效应的 monad 结合以引入通用递归,给出了具体示例与可分配性定理,并通过弱互模拟性挽救了部分不可分配的情况。

摘要:

delay monad 提供了一种在类型论中引入通用递归的方法。为了直接在类型论中编写使用广泛计算效应的程序,我们需要将 delay monad 与这些效应的 monad 结合起来。在此,我们提出了对此类组合的首次系统性研究。我们同时研究了 coinductive delay monad 及其受保护递归的变体,给出了将它们与著名计算效应结合的具体示例。我们还提供了通用定理,说明哪些代数效应在 delay monad 上可分配,哪些不可分配。最后,我们通过考虑直到弱互模拟性的分配律,挽救了一些不可能的情况。

英文摘要:

The delay monad provides a way to introduce general recursion in type theory. To write programs that use a wide range of computational effects directly in type theory, we need to combine the delay monad with the monads of these effects. Here we present a first systematic study of such combinations. We study both the coinductive delay monad and its guarded recursive cousin, giving concrete examples of combining these with well-known computational effects. We also provide general theorems stating which algebraic effects distribute over the delay monad, and which do not. Lastly, we salvage some of the impossible cases by considering distributive laws up to weak bisimilarity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑