考虑到欧米茄策略是在COQ中重新定论的,该如何导入LIA策略?

发布于 2025-02-06 13:24:44 字数 286 浏览 1 评论 0原文

我有错误:

Error: The reference lia was not found in the current environment.

如何解决?

代码:

Require Import Lia.

 Theorem t:
    forall n: nat, 1 + n > n.
 Proof.
 Show Proof.
 intro.
 Show Proof.
 lia.
 Show Proof.
 Qed.

I got the error:

Error: The reference lia was not found in the current environment.

how do I fix it?

code:

Require Import Lia.

 Theorem t:
    forall n: nat, 1 + n > n.
 Proof.
 Show Proof.
 intro.
 Show Proof.
 lia.
 Show Proof.
 Qed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

香草可樂 2025-02-13 13:24:44

需要导入lia。在顶部。例如,

Require Import Lia.

 Theorem t:
    forall n: nat, 1 + n > n.
 Proof.
 Show Proof.
 intro.
 Show Proof.
 lia.
 Show Proof.
 Qed.

注意这是Omega编辑的替代


正如Ana Borges所指出的那样:

请注意,根据 coq changelog ,Omega仅在COQ 8.12中弃权并在8.14中删除。如果您使用的是旧版本的Coq,则仍然可以使用它。但是,即使在8.11中,建议是切换到LIA,除非您有很好的理由,否则我建议您更新COQ安装(最新的是8.15.2)。

Do Require Import Lia. at the top. e.g.

Require Import Lia.

 Theorem t:
    forall n: nat, 1 + n > n.
 Proof.
 Show Proof.
 intro.
 Show Proof.
 lia.
 Show Proof.
 Qed.

note this is a replacement for Omega


Edit:

As Ana Borges kindly pointed out:

Note that according to the Coq changelog, omega was only deprecated in Coq 8.12 and removed in 8.14. If you are using an older version of Coq, you can still make use of it. However, even in 8.11 the recommendation was to switch to lia, and unless you have a very good reason I would recommend updating your Coq installation anyway (the latest is 8.15.2).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文