是否存在一种类型理论,其中可以表示相同形状的归纳数据类型的等价性?

Is there a type theory in which the equivalence of identically shaped inductive datatypes is representable?

假设我有两个归纳定义的数据类型:

Inductive list1 (A : Type) : Type :=
 | nil1 : list1 A
 | cons1 : A -> list1 A -> list1 A.

Inductive list2 (A : Type) : Type :=
 | nil2 : list2 A
 | cons2 : A -> list2 A -> list2 A.

对于任何 P (list1 a) 我应该能够构造一个 P (list2 a),通过应用我用来构造 P (list1 a) 的完全相同的方法,除了将 nil1 替换为 nil2list1list2cons1cons2。类似地,任何将 list1 a 作为参数的函数都可以扩展为采用 list2 a.

是否有类型系统允许我以这种方式谈论具有相同形状(具有相同形状的构造函数)的两种数据类型,并证明 P (list1 a) -> P (list2 a)?例如,这是单价、HOTT 或 cubical/observational 类型系统允许的吗?它还可能允许定义像 reverse: list_like a -> list_like a 这样接受 list1s 和 list2s 作为参数的函数。

在单价的HoTT中,确实可以证明list1 A对所有A等于list2 A。给出证明 p : list1 A = list2 A,运输(或 subst)为任何 P 提供 P (list1 A) -> P (list2 A)。在立方类型理论中,这种传输也可以按预期计算。据我所知,立方类型理论(CCHM or cartesian) is the only setting where this currently works. cubicaltt 是最有用(但仍然不是很实用)的实现。