arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2110.06107cs.PL
收藏

类属级多态N元函数

Generic Level Polymorphic N-ary Functions

Guillaume Allais

摘要:

Agda的标准库在不同的地方与n元函数和关系作斗争。它为第一和第二元的函数引入了同余和替换运算符,并为用户提供了方便的组合子来操作正好为一元的索引族。在仔细分析了统一器能够解决的问题后,我们设计了一个统一器友好的n元函数表示。这使我们能够编写作用于n元函数的通用程序,这些程序通过统一自动重建其输入类型的表示。特别是,我们可以定义全层次的多态n元版本的同余,替换和索引家庭的组合子,所有需要最少的用户输入。

英文摘要:

Agda's standard library struggles in various places with n-ary functions and relations. It introduces congruence and substitution operators for functions of arities one and two, and provides users with convenient combinators for manipulating indexed families of arity exactly one. After a careful analysis of the kinds of problems the unifier can easily solve, we design a unifier-friendly representation of n-ary functions. This allows us to write generic programs acting on n-ary functions which automatically reconstruct the representation of their inputs' types by unification. In particular, we can define fully level polymorphic n-ary versions of congruence, substitution and the combinators for indexed families, all requiring minimal user input.

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

↑