Cubical Agda 中的内在正确性排序
Intrinsically Correct Sorting in Cubical Agda
AI总结:
该研究扩展了双代数语义的排序算法工作,在Cubical Agda中用多重集索引数据类型,将双代数语义提升至索引场景,直接由分配律得到内在正确的排序算法变体。
摘要:
Hinze 等人的论文《Sorting with Bialgebras and Distributive Laws》采用双代数语义框架来定义排序算法。他们从函子之间的分配律出发,利用折叠(fold)和展开(unfold)构造了多组排序算法,以这种方式产生的排序算法对包括插入/选择排序以及快速/树排序。我们对这项工作进行了扩展,在 Cubical Agda 中定义了具有内在正确性的变体。我们的核心思路是用多重集为数据类型加索引,这一方式简洁地刻画了排序算法终止时输出为输入列表的有序排列这一性质。通过将双代数语义提升到带索引的场景下,我们直接由分配律得到了排序算法的正确性。
英文摘要:
The paper "Sorting with Bialgebras and Distributive Laws" by Hinze et al. uses the framework of bialgebraic semantics to define sorting algorithms. From distributive laws between functors they construct pairs of sorting algorithms using both folds and unfolds. Pairs of sorting algorithms arising this way include insertion/selection sort and quick/tree sort. We extend this work to define intrinsically correct variants in cubical Agda. Our key idea is to index our data types by multisets, which concisely captures that a sorting algorithm terminates with an ordered permutation of its input list. By lifting bialgebraic semantics to the indexed setting, we obtain the correctness of sorting algorithms purely from the distributive law.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。