Generalised algebraic theories (GATs) allow multiple sorts indexed over each other. For example, the theories of categories or Martin-L{ö}f type theories form GATs. Categories have two sorts, objects and morphisms, and the latter are double-indexed over the former. Martin-L{ö}f type theory has four sorts: contexts, substitutions, types and terms. For example, types are indexed over contexts, and terms are indexed over both contexts and types. In this paper we show that any GAT can be reduced to a GAT with only two sorts, and there is a section-retraction correspondence (formally, a strict coreflection) between models of the original and the reduced GAT. In particular, any model of the original GAT can be turned into a model of the reduced (two-sorted) GAT and back, and this roundtrip is the identity. The reduced GAT is simpler than the original GAT in the following aspects: it does not have sort equalities; it does not have interleaved sorts and operations; if the original GAT did not have interleaved sorts and operations, then the reduced GAT won't have operations interleaved between different sorts. In a type-theoretic metatheory, the initial algebra of a GAT is called a quotient inductive-inductive type (QIIT). Our reduction provides a way to implement QIITs with sort equalities or interleaved constructors which are not allowed by Cubical Agda. An instance of our reduction is the well-known method of reducing mutual inductive types to a single indexed family. Our approach is semantic in that it does not rely on a syntactic description of GATs, but instead, on Uemura's bi-initial characterisation of the category of (finite) GATs in the 2-category of finitely complete categories with a chosen exponentiable morphism.


翻译:广义代数理论(GAT)允许多种类型相互索引。例如,范畴论或Martin-Löf类型理论构成GAT。范畴论具有两种类型:对象和态射,后者在前者上双重索引。Martin-Löf类型理论具有四种类型:上下文、替换、类型和项。例如,类型在上下文上索引,而项同时在上下文和类型上索引。本文证明任何GAT均可约化为仅含两种类型的GAT,且原GAT与约化GAT的模型之间存在截面-收缩对应关系(严格形式为严格余反射)。特别地,原GAT的任何模型均可转换为约化(双类型)GAT的模型并还原,此循环变换为恒等映射。约化GAT在以下方面较原GAT更简化:不包含类型等式;不包含交错排列的类型与运算;若原GAT本无交错排列的类型与运算,则约化GAT亦不会出现不同类型间的交错运算。在类型理论的元理论中,GAT的初始代数称为商归纳-归纳类型(QIIT)。本约化方法为在Cubical Agda中实现那些不允许包含类型等式或交错构造子的QIIT提供了途径。该约化的一个实例是将互归纳类型约化为单一索引族的经典方法。本方法具有语义学特性:不依赖GAT的语法描述,而是基于上村在具有可指数态射的有限完备范畴的2-范畴中,对(有限)GAT范畴的双始刻画的表征。

0
下载
关闭预览

相关内容

图注意力网络(Graph Attention Network,GAT),它通过注意力机制(Attention Mechanism)来对邻居节点做聚合操作,实现了对不同邻居权重的自适应分配,从而大大提高了图神经网络模型的表达能力。
【干货书】线性代数理论与应用,412页pdf
专知会员服务
66+阅读 · 2023年2月12日
【干货书】Python代数和几何,429页pdf
专知会员服务
78+阅读 · 2023年1月8日
专知会员服务
35+阅读 · 2021年7月17日
专知会员服务
78+阅读 · 2021年5月11日
专知会员服务
78+阅读 · 2021年3月16日
【硬核书】矩阵代数:统计学的理论、计算和应用,664页pdf
【硬核书】矩阵代数基础,248页pdf
专知
16+阅读 · 2021年12月9日
那些值得推荐和收藏的线性代数学习资源
这可能是「多模态机器学习」最通俗易懂的介绍
计算机视觉life
113+阅读 · 2018年12月20日
统计学常用数据类型
论智
19+阅读 · 2018年7月6日
在TensorFlow中对比两大生成模型:VAE与GAN
机器之心
12+阅读 · 2017年10月23日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月19日
Arxiv
0+阅读 · 2月15日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员