coq - 如何使 Coq 中模块签名之外的注释可见?

标签 coq theorem-proving

我在 Coq 中定义了一个模块签名,它定义了几个符号。然而,当我尝试在签名之外使用这些符号时,Coq 失败了。下面给出了我的代码的简化版本。任何帮助将不胜感激。

Module Type Field_Axioms.

  Delimit Scope Field_scope with F.
  Open Scope Field_scope.

  Parameter Element : Set.

  Parameter addition : Element -> Element -> Element.

  Infix " + " := addition : Field_scope. (* ASSIGNS THE "+" OPERATOR TO SCOPE. *)

End Field_Axioms

Module Type Ordered_Field_Axioms.

  Declare Module Field : Field_Axioms.

  Print Scope Field_scope. (* SHOWS THAT THE SCOPE IS EMPTY. *)

End Ordered_Field_Axioms.

最佳答案

您可以替换:

Declare Module Field : Field_Axioms.

与:

Declare Module Import Field : Field_Axioms.

关于coq - 如何使 Coq 中模块签名之外的注释可见?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15720888/

相关文章:

coq - 如何使用 Coq 构建一阶逻辑项?

coq - 模式匹配不专门类型

logic - 使用 Coq 证明助手证明 (p->q)->(~q->~p)

idris - 关于 `mod` 的 Idris 证明

isabelle - Simp 不使用 Isabelle 中提供的引理

coq - Coq 中的析取三段论策略?

coq - 在 coq 中编写隐式证明对象的不可能模式

coq - 子集参数

list - Coq:依赖列表上的类型不匹配可以通过证明来解决