2
型パラメーターと型インデックスの使用の違いと結果は何ですか?
Coqのような型理論では、次のようにパラメーターで型を定義できます。 Inductive ListP (Element : Type) : Type := NilP : ListP Element | ConsP : Element -> ListP Element -> ListP Element. または、次のように、インデックスを使用してタイプを定義することもできます。 Inductive ListI : Type -> Type := NilI : forall t, ListI t | ConsI : forall t, t -> ListI t -> ListI t. 私の質問は: …