Command line 在构建脚本中验证coq定理?

Command line 在构建脚本中验证coq定理?,command-line,automation,coq,Command Line,Automation,Coq,我正在学习编程语言的元理论 在IDE中以交互方式编写和验证定理非常好,但我需要自动(重新)验证。我看到了手册页,但是我没有看到任何地方详细说明这个用例 如何将coq验证合并到构建脚本中?如果我们有这个元理论/hello\u world.v: $ cat metatheory/hello_world.v Theorem hello_world : forall a b:Prop, a /\ b -> b /\ a. intros a b H. split. destruct H as [H1

我正在学习编程语言的元理论

在IDE中以交互方式编写和验证定理非常好,但我需要自动(重新)验证。我看到了手册页,但是我没有看到任何地方详细说明这个用例


如何将coq验证合并到构建脚本中?

如果我们有这个
元理论/hello\u world.v

$ cat metatheory/hello_world.v
Theorem hello_world : forall a b:Prop, a /\ b -> b /\ a.
intros a b H.
split.
destruct H as [H1 H2].
exact H1. (* A bug: We actually need H2 here. *)
intuition.
然后,我们可以看到以下错误(退出代码失败):

如果我们解决了问题:

$ coqtop -batch -silent -l metatheory/hello_world.v

…有一个成功的退出代码。

你有没有研究过
coqc
coqchk
?我看到了它们,但缺少一个简单的例子来说明它们的用法。我也不担心检查的性能,因为理论还很小;解释型解决方案现在更适合。
$ coqtop -batch -silent -l metatheory/hello_world.v