如何从Coq.Numbers.NatInt.NZDiv中导入定理?

时间:2019-06-17 16:07:21

标签: module coq coqide

this文档链接中,有关于除法的有用定理。我尝试在CoqIDE 8.9.0中使用Require Import导入它,但是虽然导入成功,但是以下代码失败,并显示The reference div_lt_upper_bound was not found in the current environment.

Require Import Coq.Numbers.NatInt.NZDiv.
Check div_lt_upper_bound.

我尝试下载文件的源代码并通过Load手动导入,但是随后得到以下消息,没有进一步说明(第一行为红色):

Application of a functor with too few arguments.
Interactive Module Type DivMod started
div is declared
modulo is declared
Module Type DivMod is defined
Interactive Module Type DivModNotation started
Module Type DivModNotation is defined
Module Type DivMod' is defined
Interactive Module Type NZDivSpec started
div_mod is declared
mod_bound_pos is declared
Module Type NZDivSpec is defined
Module Type NZDiv is defined

如何正确加载这些定理?为什么以前的方法不起作用?

1 个答案:

答案 0 :(得分:1)

快速的答案是您正在查看Module Type(请参阅Print NZDivProp.)。

实际用法很简单,例如。 g。

Require Import Arith.
Check Nat.div_lt_upper_bound.
(*
     Nat.div_lt_upper_bound
          : forall a b q : nat, b <> 0 -> a < b * q -> a / b < q
*)
相关问题