论文标题
Sikkel:多模简单类型理论作为AGDA库
Sikkel: Multimode Simple Type Theory as an Agda Library
论文作者
论文摘要
类型理论的许多变体扩展了基本理论,具有其他原始或属性,例如单价,守卫的递归或参数,以实现在原始理论中难以或不可能做的结构或证据。但是,实施此类扩展类型的理论(从头开始或通过修改现有实现)是其更广泛采用的巨大障碍。在本文中,我们介绍了Sikkel,这是一个相关编程语言AGDA中的库,该库允许用户以扩展类型的理论编程。它使用一种深层嵌入式语言,可以通过其他类型和术语构造函数轻松扩展,从而支持各种类型的理论。此外,锡克尔(Sikkel)具有一个类型的检查器,可以通过构造声音,因为所有良好的程序都会在基于Presheaf模型的浅嵌入方式中自动翻译成其语义。此外,我们的模型还支持通过使用模式在它们之间传输定义的方式组合不同的基本类别。这特别是一种将定义提取到元级别的通用方法,因此我们可以使用扩展类型的理论来定义常规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.