我在从 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
并尝试将其加载到另一个模块中,例如FinSetList
or 。当我尝试导入模块时,Coq(通过 Proof General)发出警告:FinSetRBT
Require Import FinSet
Warning: trying to mask the absolute name "FinSet"!
此外,我看不到FinSet
. 如何将定义(在本例中为公理)从一个模块导入另一个模块?我基本上遵循了 Pierce 的“软件基础”讲座中概述的步骤。但是,他们不为我工作。