Coq错误:在当前环境中找不到引用evenb

时间:2016-04-03 04:00:10

标签: coq

我正在尝试阅读Software Foundations Coq一书(http://www.cis.upenn.edu/~bcpierce/sf/current/toc.html),但是当我编译Induction.v(看起来像http://www.cs.uml.edu/~rhenniga/coq/sf_induction.html)时,我收到错误消息“Error:The在当前环境中找不到参考偶数。“ - 即使在编译Basics.v之后。有什么想法吗?

3 个答案:

答案 0 :(得分:2)

  

我可以确认从同一目录中打开CoqIDE可以在macOS上运行:cd <sf-dir>; /Applications/CoqIDE_8.5.app/Contents/MacOS/coqide

来自:The reference "X" was not found in the current environment

答案 1 :(得分:2)

尝试擦除与Coq或软件基础书相关的地址中的每个空白字符。


以我为例,当我处理文件时

  

C:\ Users \ XxX \ Documents \ software Foundation \ lf \ Induction.v

,CoqIDE无法执行From LF Require Export Basics和定义evenb_S定理。另外,在Basics.vo中使用CoqIDE中的[编译]-[编译缓冲区]功能时,我看不到像Basics.globBasics.v这样的文件。


将文件夹名称更改为

时,一切正常
  

C:\ Users \ XxX \ Documents \ softwarefoundation \ lf \ Basic.v


Coq安装程序已告知此>> Link to the screenshot image of Coq setup

答案 2 :(得分:1)

使用CREATE OR REPLACE FUNCTION insert_test2(p_category_id INT, p_tname TEXT, p_some_info TEXT) RETURNS void AS $BODY$ DECLARE resultId INTEGER; BEGIN INSERT INTO test(category_id, tname, some_info) SELECT p_category_id, p_tname, p_some_info ON CONFLICT(category_id, tname) DO NOTHING; END $BODY$ LANGUAGE plpgsql VOLATILE COST 100; SELECT insert_test2(1, 'Colors', 'Blue'); SELECT insert_test2(2, 'Colors', 'Red'); 命令编译Basic.v应该在同一目录中生成coqc Basics.vBasic.vo个文件。那么你也可以在同一目录中编译Basic.glob; Induction.v