Coq: Error: The reference [Lemma/Theorem] was not found in the current environment

Coq: Error: The reference [Lemma/Theorem] was not found in the current environment

出于某种原因,我找不到引理定义 here,这让我发疯。

Require Import List.
Require Import Setoid.
Require Import Lists.List.

Search nth_error_In.

我收到以下错误,我不明白为什么。

Error: The reference nth_error_In was not found in the current environment.

需要什么才能使用它。

问题是该定理在您的 Coq (8.4) 版本上不可用,仅在 8.5 上可用。您应该升级您的 Coq 版本或将 8.5 中的证明反向移植到您的开发中。