The ability to cast values between related types is a leitmotiv of many flavors of dependent type theory, such as observational type theories, subtyping, or cast calculi for gradual typing. These casts all exhibit a common structural behavior that boils down to the pervasive functoriality of type formers. We propose and extensively study a type theory, called AdapTT, which makes systematic and precise this idea of functorial type formers, with respect to an abstract notion of adapters relating types. Leveraging descriptions for functorial inductive types in AdapTT, we derive structural laws for type casts on general inductive type formers.
翻译:在相关类型之间转换值的能力是多种依赖类型理论变体的核心主题,例如观测类型理论、子类型化或渐进类型化的强制转换演算。这些转换均展现出一种共同的结构行为,其本质可归结为类型构造子的普遍函子性。我们提出并深入研究了一种称为AdapTT的类型理论,该理论基于适配器关联类型的抽象概念,系统且精确地实现了函子性类型构造子的思想。通过利用AdapTT中函子性归纳类型的描述,我们推导出通用归纳类型构造子上类型转换的结构性定律。