我正在學習同倫類型理論(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的廣義路徑歸納嗎?