import - 如何在 Coq 中导入模块?

标签 import module coq

我在从 Coq 中的模块导入定义时遇到问题。我是 Coq 的新手,但无法使用该语言的引用手册或在线教程解决问题。我有一个模块,它定义了有限集的签名和公理,我打算在另一个模块中实现。还有更多,但它看起来像这样(作为引用,我正在密切关注 Filliatre 关于有限自动机的论文):

Module FinSet.    
...
Parameter fset     : Set -> Set.
Parameter member   : forall A : Set, A -> finset A -> Prop.
Parameter emptyset : forall A : Set, fset A.
Parameter union    : forall A : Set, fset A -> fset A -> fset A.
...
Axiom axiom_emptyset :
  forall A : Set, forall a : A, ~ (member a (emptyset A)).
Axiom axiom_union    :
  forall A : Set, forall a b : fset A, forall x : A, i
    member x (union a b) <-> (member x a) \/ (member x b).
...
End FinSet.

我使用 coqc 编译模块并尝试将其加载到另一个模块中,例如 FinSetListFinSetRBT ,使用命令 Require Import FinSet .当我尝试导入模块时,Coq(通过 Proof General)发出警告:
Warning: trying to mask the absolute name "FinSet"!

此外,我看不到 FinSet 中定义的任何内容.如何将定义(在本例中为公理)从一个模块导入另一个模块?我基本上遵循了 Pierce 的“软件基础”讲座中概述的步骤。但是,他们不为我工作。

最佳答案

尝试添加到您的 .emacs归档一些明确的包含路径:

 '(coq-prog-args (quote ("-I" "/home/tommd/path/to/some/stuff/lib" "-I" "/home/tommd/path/to/more/stuff/common")))

关于import - 如何在 Coq 中导入模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7904535/

相关文章:

java - Guice 子模块阻止继承绑定(bind)

coq - 建立有限自然数与sigma同构

coq - 无法破坏假设中的存在

python - 如何在python中安装带有下划线的模块名称?

python - 无法导入 Python 类

linux - 用于应用程序的 Ubuntu 内核模块

javascript - 包含构造函数的对象的闭包编译器注释

Coq:我如何从一个可判定的 Prop 中创建一个 bool 值?

windows - 导入路径无效 - Go + windows

php - 导出和导入 ARC2 RDF 数据的最佳方式是什么?