如何在Coq中使用模内引理?

如何在Coq中使用模内引理?,coq,Coq,我在一个名为a.v Module Type WeakPair. ... End WeakPair. Module WeakPairProps (Import WP : WeakPair). Lemma Weak_A .... End WeakPairProps. 然后我想定义另一个文件B.v,它可以使用WeakPairProps中的Lemma,例如:Weak\u A。 因为WeakPairProps不是一种模块类型,所以我不知道如何编写一个可以重用WeakPairProps中引理的模

我在一个名为
a.v

Module Type WeakPair.
...

End WeakPair.

Module WeakPairProps (Import WP : WeakPair).

 Lemma Weak_A ....

End WeakPairProps.
然后我想定义另一个文件
B.v
,它可以使用
WeakPairProps
中的
Lemma
,例如:
Weak\u A

因为
WeakPairProps
不是一种模块类型,所以我不知道如何编写一个可以重用
WeakPairProps

中引理的模块。首先,您需要定义一个实现模块类型的模块
WeakPair

Module WeakPairImpl <: WeakPair.
(* stuff goes here *)
End WeakPairImpl.
现在您可以参考引理:

WeakPairPropsInst.lemma
如果不希望使用限定名称,可以导入WeakPairPropsInst

WeakPairPropsInst.lemma