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

Sikkel:作为Agda库的多模式简单类型论

Sikkel: Multimode Simple Type Theory as an Agda Library

Joris Ceulemans, Andreas Nuyts, Dominique Devriese

摘要:

类型论的许多变体通过额外的原语或属性(如univalence,guarded recursion或parametricity)扩展了基本理论,以实现在原始理论中更难或不可能实现的构造或证明。然而,实现这种扩展的类型论(无论是从头开始还是通过修改现有的实现)是它们更广泛采用的一大障碍。在本文中,我们提出了Sikkel,在依赖类型的程序设计语言Agda,允许用户在扩展的类型论编程库。它使用了一种深度嵌入的语言,可以很容易地扩展额外的类型和术语构造函数,从而支持各种各样的类型论。此外,Sikkel有一个类型检查器,在这个意义上,所有类型良好的程序都自动转换为基于预层模型的浅嵌入中的语义。此外,我们的模型支持通过使用模态在它们之间传输定义来组合不同的基本类别。这使得特别是一个通用的方法提取定义的元级别,使我们可以使用扩展的类型论来定义定期Agda功能和证明他们的属性。在本文中,我们证明了Sikkel理论与保护递归和参数,但其他扩展可以很容易地插入。目前,Sikkel只支持简单的类型论,但它的模型已经预测了未来依赖类型和宇宙的增加。

英文摘要:

Many variants of type theory extend a basic theory with additional primitives or properties like univalence, guarded recursion or parametricity, to enable constructions or proofs that would be harder or impossible to do in the original theory. However, implementing such extended type theories (either from scratch or by modifying an existing implementation) is a big hurdle for their wider adoption. In this paper we present Sikkel, a library in the dependently typed programming language Agda that allows users to program in extended type theories. It uses a deeply embedded language that can be easily extended with additional type and term constructors, thus supporting a wide variety of type theories. Moreover, Sikkel has a type checker that is sound by construction in the sense that all well-typed programs are automatically translated to their semantics in a shallow embedding based on presheaf models. Additionally, our model supports combining different base categories by using modalities to transport definitions between them. This enables in particular a general approach for extracting definitions to the meta-level, so that we can use the extended type theories to define regular Agda functions and prove properties of them. In this paper, we demonstrate Sikkel theories with guarded recursion and parametricity, but other extensions can be easily plugged in. For now, Sikkel supports only simple type theories but its model already anticipates the future addition of dependent types and a universe.

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

↑