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

通过部分 Galois 连接和等价关系进行迁移

Transport via Partial Galois Connections and Equivalences

Kevin Kappelmann

AI总结:

针对不同表示类型间难以复用程序的问题,本文提出基于部分 Galois 连接与等价关系的简单类型论迁移框架,并在 Isabelle/HOL 中形式化验证。

摘要:

多种类型可以表示同一个概念。例如,列表和树都可以表示集合。遗憾的是,这很容易导致不完整的库:某些集合操作可能只适用于列表,而另一些只适用于树。类似地,子类型和商类型在形式化验证中常被用于构造新的类型抽象。在这种情况下,人们往往希望为新的类型抽象复用表示类型上的操作,却无法实现:这些类型并不相同。为了解决这些问题,我们提出了一个通过等价关系迁移程序的新框架。现有迁移框架要么是为依赖类型、构造性证明助手设计的,要么使用单价性,或者局限于部分商类型。我们的框架(1)面向简单类型论设计,(2)推广了以往处理部分商类型的方法,(3)基于标准数学概念,尤其是 Galois 连接和等价关系。我们引入了部分 Galois 连接和等价关系的概念,并证明了它们在(依赖)函数关系子、(余)数据类型以及复合下的封闭性质。我们在 Isabelle/HOL 中形式化了该框架,并提供了一个原型。这是发表于 2023 年第 21 届亚洲程序设计语言与系统研讨会的论文《Transport via Partial Galois Connections and Equivalences》的扩展版本。

英文摘要:

Multiple types can represent the same concept. For example, lists and trees can both represent sets. Unfortunately, this easily leads to incomplete libraries: some set-operations may only be available on lists, others only on trees. Similarly, subtypes and quotients are commonly used to construct new type abstractions in formal verification. In such cases, one often wishes to reuse operations on the representation type for the new type abstraction, but to no avail: the types are not the same. To address these problems, we present a new framework that transports programs via equivalences. Existing transport frameworks are either designed for dependently typed, constructive proof assistants, use univalence, or are restricted to partial quotient types. Our framework (1) is designed for simple type theory, (2) generalises previous approaches working on partial quotient types, and (3) is based on standard mathematical concepts, particularly Galois connections and equivalences. We introduce the notion of partial Galois connections and equivalences and prove their closure properties under (dependent) function relators, (co)datatypes, and compositions. We formalised the framework in Isabelle/HOL and provide a prototype. This is the extended version of "Transport via Partial Galois Connections and Equivalences", 21st Asian Symposium on Programming Languages and Systems, 2023.

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

↑