关于Let定义隐式参数的Coq不一致行为
我发现了一些关于隐式参数的不一致行为关于Let定义隐式参数的Coq不一致行为,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"." *)
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
隐式,
然而,当您将替换为定义时,不会发生错误。
我有什么问题吗?或者这是一个bug?我想这是一个bug,是的。在id1的情况下,声明隐式参数的符号将被忽略,您可以通过Print implicit id1
命令看到这一点