Parametricity is a property of the syntax of type theory implying e.g. that there is only one function having the type of the polymorphic identity function. Parametricity is usually proven externally, and does not hold internally. Internalising it is difficult because once there is a term witnessing parametricity, it also has to be parametric itself and this results in the appearance of higher dimensional cubes. In previous theories with internal parametricity, either an explicit syntax for higher cubes is present or the theory is extended with a new sort for the interval. In this paper we present a type theory with internal parametricity which is a simple extension of Martin-L\"of type thoery: there are a few new type formers, term formers and equations. Geometry is not explicit in this syntax, but emergent: the new operations and equations only refer to objects up to dimension 3. We show that this theory is modelled by presheaves over the BCH cube category. Fibrancy conditions are not needed because we use span-based rather than relational parametricity. We define a gluing model for this theory implying that external parametricity and canonicity hold. The theory can be seen as a special case of a new kind of modal type theory, and it is the simplest setting in which the computational properties of higher observational type theory can be demonstrated.
翻译:参数性是类型论语法的一种性质,它表明例如多态恒等函数类型仅存在唯一函数。参数性通常在外部证明,而非在系统内部成立。将其内化之所以困难,是因为一旦存在见证参数性的项,该参数性自身也必须具有参数性,从而引发高维立方体的出现。在以往包含内部参数性的理论中,要么显式引入了高维立方体的语法,要么通过新增区间类型扩展了理论。本文提出一种内部参数性类型论,它是对Martin-Löf类型论的简单扩展:仅需新增若干类型构造子、项构造子及等式约束即可实现。该语法中几何结构并非显式存在,而是涌现性的:新运算与等式仅涉及维度不超过3的对象。我们证明该理论可由BCH立方体范畴上的预层建模。由于采用基于跨距的参数性而非关系型参数性,因此无需纤维性条件。我们为该理论构建了粘合模型,从而确保外部参数性与规范性成立。该理论可视为新型模态类型论的特例,并成为展示高阶观察类型论计算性质的最简框架。