【24h】

Theories as Types

机译:作为类型的理论

获取原文

摘要

Theories are an essential structuring principle that enable modularity, encapsulation, and reuse in formal libraries and programs (called classes there). Similar effects can be achieved by dependent record types. While the former form a separate language layer, the latter are a normal part of the type theory. This overlap in functionality can render different systems non-interoperable and lead to duplication of work. We present a type-theoretic calculus and implementation of a variant of record types that for a wide class of formal languages naturally corresponds to theories. Moreover, we can now elegantly obtain a contravariant functor that reflects the theory level into the object level: for each theory we obtain the type of its models and for every theory morphism a function between the corresponding types. In particular this allows shallow - and thus structure-preserving - encodings of mathematical knowledge and program specifications while allowing the use of object-level features on models, e.g. equality and quantification.
机译:理论是一个基本的结构原理,可实现正常的库和程序中的模块化,封装和重用(其中包含课程)。类似的效果可以通过依赖记录类型来实现。虽然前者形成一个单独的语言层,但后者是类型理论的正常部分。功能中的重叠可以使不同的系统不可互操作并导致工作重复。我们介绍了一种理论理的微积分和实现的记录类型的变种,即为广泛类别的正式语言自然对应于理论。此外,我们现在可以优雅地获得反映理论水平的逆变函数:对于每个理论,我们获得其模型的类型,以及每个理论态度在相应类型之间的函数。特别是这允许浅层,从而进行结构保留 - 数学知识和节目规范的编码,同时允许在模型上使用对象级功能,例如,平等和量化。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利