如何在Coq中的模块签名之外显示符号?

时间:2013-03-30 16:36:57

标签: 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.

1 个答案:

答案 0 :(得分:2)

您可以替换:

Declare Module Field : Field_Axioms.

使用:

Declare Module Import Field : Field_Axioms.