我正在学习同伦类型理论(HoTT)及其与COQ的关系。 特别是身份类型的路径归纳概念对我来说依然神秘。
因此我用COQ做了一些实验。这是COQ中的广义路径归纳吗?
让我们先从一个简单的引理使用路径诱导标准平等类型:
Lemma eq_sym: forall (x y:nat), x = y -> y = x.
intros.
apply (match H in (_ = y0) return y0 = x with eq_refl => eq_refl end).
Defined.
现在让我们看看如果是这样的COQ“EQ”类型的特殊处理。因此,让我们来定义(仅适用于NAT)的新平等类型有类似的对称引理:
Inductive est (x : nat) : nat -> Prop :=
est_refl: est x x.
Lemma est_sym: forall (x y:nat), est x y -> est y x.
intros.
apply (match H in (est _ y0) return est y0 x with est_refl => est_refl x end).
Defined.
好吧,这部作品在像标准“=”类型相同的方式。
现在让我们来概括它:
Inductive tri (x : nat) : nat->nat->Prop :=
tri_refl: tri x x x.
Lemma tri_sym: forall (x y z:nat), tri x y z -> tri z x y.
intros.
apply (match H in (tri _ y0 z0) return tri z0 x y0 with tri_refl => tri_refl x end).
Defined.
我的问题是:
请问这个涉及到HOTT的理论?
这是不属于HoTT的广义路径归纳吗?