我正在尝试在coq的标准库中使用NDiv中的功能(在此处可见:https://coq.inria.fr/library/Coq.Numbers.Natural.Abstract.NDiv.html),因此我将以下两行输入coqide:
Require Import NDiv.
Check div_unique_exact.
但它会产生
的输出Error: The reference div_unique_exact was not found in the current environment
我不确定问题出在哪里。我也使用List Arth Bool和Classical_Prop等导入而没有问题。谢谢你的帮助。
答案 0 :(得分:2)
请注意,ratingBar.setRating(8 * stepSize);
以
NDiv
整个文件包含在此Module Type NDivProp (Import N : NAxiomsSig')(Import NP : NSubProp N).
中,这意味着您看到的每个引理仅在将模块参数传递给此模块类型仿函数时定义。您可能想要Module Type
(或Require Import NArith.
)之类的内容,从而可以看出Coq是否可以Require Import ZArith.
找到div_unique_exact
。如果我做
Locate
我得到了
Require Import Coq.NArith.NArith.
Locate div_unique_exact.
所以我们看到第一个条目显示以下内容将成功:
Constant Coq.NArith.BinNat.N.div_unique_exact
(shorter name to refer to it in current context is N.div_unique_exact)
Constant Coq.ZArith.BinInt.Z.Private_Div.NZQuot.div_unique_exact
(shorter name to refer to it in current context is BinInt.Z.Private_Div.NZQuot.div_unique_exact)
Constant Coq.Arith.PeanoNat.Nat.div_unique_exact
(shorter name to refer to it in current context is PeanoNat.Nat.div_unique_exact)
Constant Coq.NArith.BinNat.N.Private_NZDiv.div_unique_exact
(shorter name to refer to it in current context is N.Private_NZDiv.div_unique_exact)
Constant Coq.Arith.PeanoNat.Nat.Private_NZDiv.div_unique_exact
(shorter name to refer to it in current context is PeanoNat.Nat.Private_NZDiv.div_unique_exact)
Constant Coq.ZArith.BinInt.Z.Private_NZDiv.div_unique_exact
(shorter name to refer to it in current context is BinInt.Z.Private_NZDiv.div_unique_exact)
Constant Coq.ZArith.BinInt.Z.div_unique_exact
(shorter name to refer to it in current context is BinInt.Z.div_unique_exact)