In a constructive setting, no concrete formulation of ordinal numbers can simultaneously have all the properties one might be interested in; for example, being able to calculate limits of sequences is constructively incompatible with deciding extensional equality. Using homotopy type theory as the foundational setting, we develop an abstract framework for ordinal theory and establish a collection of desirable properties and constructions. We then study and compare three concrete implementations of ordinals in homotopy type theory: first, a notation system based on Cantor normal forms (binary trees); second, a refined version of Brouwer trees (infinitely-branching trees); and third, extensional well-founded orders. Each of our three formulations has the central properties expected of ordinals, such as being equipped with an extensional and well-founded ordering as well as allowing basic arithmetic operations, but they differ with respect to what they make possible in addition. For example, for finite collections of ordinals, Cantor normal forms have decidable properties, but suprema of infinite collections cannot be computed. In contrast, extensional well-founded orders work well with infinite collections, but almost all properties are undecidable. Brouwer trees take the sweet spot in the middle by combining a restricted form of decidability with the ability to work with infinite increasing sequences. Our three approaches are connected by canonical order-preserving functions from the "more decidable" to the "less decidable" notions. We have formalised the results on Cantor normal forms and Brouwer trees in cubical Agda, while extensional well-founded orders have been studied and formalised thoroughly by Escardo and his collaborators. Finally, we compare the computational efficiency of our implementations with the results reported by Berger.
翻译:在构造性语境中,序数的具体表述无法同时具备人们可能关注的所有性质;例如,能够计算序列极限与判定外延等价性在构造性意义上是不相容的。以同伦类型理论作为基础框架,我们发展了一个序数理论的抽象框架,并建立了一系列理想性质与构造。随后,我们研究并比较了同伦类型理论中序数的三种具体实现:其一,基于康托尔范式(二叉树)的记号系统;其二,布劳威尔树的改进版本(无穷分支树);其三,外延良基序。这三种表述均具备序数应有的核心性质,例如配备外延且良基的序关系及支持基本算术运算,但它们在附加功能上存在差异。举例而言,对于有限序数集合,康托尔范式具有可判定性质,但无法计算无穷集合的上确界。相较之下,外延良基序能良好处理无穷集合,但几乎所有性质均不可判定。布劳威尔树则通过结合受限可判定性与处理无穷递增序列的能力,达到了折衷方案。这三种方法通过从"更可判定"概念到"更不可判定"概念的规范保序函数相互关联。我们已在立方Agda中形式化了康托尔范式与布劳威尔树的相关结果,而外延良基序则由Escardo及其合作者进行了深入的形式化研究。最后,我们将实现的运算效率与Berger报告的结果进行了比较。