arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.14600cs.LOmath.CT
收藏

子类型的范畴模型

Categorical models of subtyping

Greta Coraglia, Jacopo Emmenegger

AI总结:

本文提出基于一般纤维化的子类型范畴模型,将子类型视为缩写机制,提供规则、一致性条件与显式模型,并与强制子类型对比,为类型构造子与子类型关系提供工具。

摘要:

传统上,大多数用于依赖类型的范畴模型都严重基于集合:上下文构成一个范畴,并且对于每个上下文,我们有一组该上下文中的类型——并且对于每个类型,有一组该类型的项。这对于带家族的范畴、带属性的范畴以及自然模型都是如此;特别是,它们都可以追溯到某些离散的Grothendieck纤维化。我们将这一直觉推广到一般的、不一定是离散的纤维化情形,使得在给定上下文之上,人们不仅有一个集合,而且有一个类型的范畴。我们认为,这种附加结构可以归因于一种子类型概念,它与强制子类型共享许多特征,从某种意义上说,它是将子类型视为一种缩写机制进行思考的产物:我们说给定类型$A'$是$A$的子类型,如果存在从$A'$到$A$的唯一强制。那么,每当我们需要一个类型$A$的项时,只需有一个类型$A'$的项就足够了,我们可以将其“插入”到$A$中。对于这个版本的子类型,我们提供规则、一致性条件和显式模型,并将其与Z. Luo等人引入的强制子类型进行比较和对比。最后,我们建议如何使用我们提出的工具来寻找将子类型与某些类型构造子联系起来的适当规则。

英文摘要:

Most categorical models for dependent types have traditionally been heavily set based: contexts form a category, and for each we have a set of types in said context -- and for each type a set of terms of said type. This is the case for categories with families, categories with attributes, and natural models; in particular, all of them can be traced back to certain discrete Grothendieck fibrations. We extend this intuition to the case of general, non necessarily discrete, fibrations, so that over a given context one has not only a set but a category of types. We argue that the added structure can be attributed to a notion of subtyping that shares many features with that of coercive subtyping, in the sense that it is the product of thinking about subtyping as an abbreviation mechanism: we say that a given type $A'$ is a subtype of $A$ if there is a unique coercion from $A'$ to $A$. Whenever we need a term of type $A$, then, it suffices to have a term of type $A'$, which we can `plug-in' into $A$. For this version of subtyping we provide rules, coherences, and explicit models, and we compare and contrast it to coercive subtyping as introduced by Z. Luo and others. We conclude by suggesting how the tools we present can be employed in finding appropriate rules relating subtyping and certain type constructors.

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

↑