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

时间:2011-11-15 10:33:20

标签: coq

我发现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.

Let定义id1似乎没有隐含t, 而当您将Let替换为Definition时,不会发生错误。 我有什么问题或者这是一个错误吗?

1 个答案:

答案 0 :(得分:4)

我认为这是一个错误,是的。在id1的情况下,忽略声明隐式参数的符号,正如您可以使用Print Implicit id1命令看到的那样。

相关问题