0
我正在嘗試使用HoTT書籍中的類型構造函數/消除器來闡述各種deMorgans法則的一些證明。我已經跳過了相關的東西挑選https://mdnahas.github.io/doc/Reading_HoTT_in_Coq.pdf並將其全部轉儲到.v文本文件中。我需要消除/介紹產品,聯產品和建立否定的方法規則。到目前爲止,我有,錯誤:非法應用(非功能性構造)
Definition idmap {A:Type} (x:A) : A := x.
Inductive prod {A B:Type} : Type := pair : A -> B -> @prod A B.
Notation "x * y" := (prod x y) : type_scope.
Section projections.
Context {A : Type} {B : Type}.
Definition fst (p: A * B) :=
match p with
| (x , y) => x
end.
Definition snd (p:A * B) :=
match p with
| (x , y) => y
end.
End projections.
上的錯誤 「的定義FST(P:A * B):=」 是
Error: Illegal application (Non-functional construction):
The expression "prod" of type "Type"
cannot be applied to the term
"A" : "Type"
我試圖通過錯誤列表上勒柯克現場尋找,但沒」找不到任何東西。
如果下面貼的回答幫你解決問題,那麼它會是不錯的,如果你接受了答案。 –