arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1908.07776cs.PL
收藏

自由定理,通过Dinaturality

Free Theorems Simply, via Dinaturality

Janis Voigtländer

摘要:

自由定理是参数多态代码推理的一个常用工具。它们在教学中也有启发性的用途。然而,它们的推导可能是乏味的,因为它涉及到展开许多定义,然后希望能够将得到的逻辑公式简化为一些漂亮而简短的东西。即使在机械化的发电机中,也不容易获得正确的化学品以实现良好的结果。Dinaturality是一种范畴抽象,它捕捉了自由定理的许多实例。可以说,它的起源更多地涉及到概念上的解释,但是,从它生成有用的语句也有它的陷阱。我们提出了一个简单的方法,从标准制定的关系参数,以一种相当直接的方式获得与非自然相关的自由定理。正如所提供的Haskell代码所示,它在概念上很吸引人,并且易于控制和实现。

英文摘要:

Free theorems are a popular tool in reasoning about parametrically polymorphic code. They are also of instructive use in teaching. Their derivation, though, can be tedious, as it involves unfolding a lot of definitions, then hoping to be able to simplify the resulting logical formula to something nice and short. Even in a mechanised generator it is not easy to get the right heuristics in place to achieve good outcomes. Dinaturality is a categorical abstraction that captures many instances of free theorems. Arguably, its origins are more conceptually involved to explain, though, and generating useful statements from it also has its pitfalls. We present a simple approach for obtaining dinaturality-related free theorems from the standard formulation of relational parametricity in a rather direct way. It is conceptually appealing and easy to control and implement, as the provided Haskell code shows.

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

↑