小编use*_*348的帖子

Coq关于Let定义的隐式参数的不一致行为

我发现了Coq关于隐式参数的某种不一致行为.

Section foo.
  Let id1 {t : Set} (x : t) := x.
  Let id2 {t : Set} (x : t) : t. assumption. Qed.
  Check id2 (1:nat).
  Check id1 (1:nat). (* Fails with "The term "1:nat" has type "nat" while it is expected to have type "Set"." *)
End foo.
Run Code Online (Sandbox Code Playgroud)

Let定义id1似乎并没有让t隐式的,而当你更换LetDefinition不会发生错误.我有什么不对或这是一个错误吗?

coq

5
推荐指数
1
解决办法
229
查看次数

标签 统计

coq ×1