The functorial structure of type constructors is the foundation for many definition and proof principles in higher-order logic (HOL). For example, inductive and coinductive datatypes can be built modularly from bounded natural functors (BNFs), a class of well-behaved type constructors. Composition, fixpoints, and, under certain conditions, subtypes are known to preserve the BNF structure. In this article, we tackle the preservation question for quotients, the last important principle for introducing new types in HOL. We identify sufficient conditions under which a quotient inherits the BNF structure from its underlying type. Surprisingly, lifting the structure in the obvious manner fails for some quotients, a problem that also affects the quotients of polynomial functors used in the Lean proof assistant. We provide a strictly more general lifting scheme that supports such problematic quotients. We extend the Isabelle/HOL proof assistant with a command that automates the registration of a quotient type as a BNF, reducing the proof burden on the user from the full set of BNF axioms to our inheritance conditions. We demonstrate the command's usefulness through several case studies.
翻译:类型构建器的构成、 固定点 以及在某些条件下, 亚型类型是维护 BNF 结构的基础 。 在本条中, 我们处理数字保存问题, 这是在高阶逻辑中引入新类型的最后重要原则 。 我们确定一个商号从基础类型继承 BNF 结构的充足条件 。 令人惊讶的是, 以明显的方式提升该结构会对某些商号失灵, 这个问题也影响到Lean 校对助理所使用的多角度式配置器的商数 。 我们提供了一个更宽泛的提振方案, 支持这种有问题的商数 。 我们将伊莎贝尔/ HOL 校对助手的指令扩展为自动化注册 BNF 类型, 将用户的证明负担从 完全的 BNF 数据库中降低到 Wexi 数据库的完整版本 。