简单算术表达式的证明

Proofs of simple arithmetic expressions

我想证明一堆定理,如 100 + 100 = 200 或 1 > - / 2 的实数,但我似乎 coq 不能使用自动策略来做到这一点。有没有办法不用写几百行就可以证明这样的事情?

ring 将证明等式 lranra 将证明基本比较 interval 将证明涉及高级函数和常量的比较(sinPIexp)。 lra 无需安装扩展即可在 Coq 中使用。 interval 需要安装扩展(coq-intervalopam 包索引中)。 Coq 的一些预打包安装已经包含 interval.

Require Import Reals Lra Interval.Tactic.
Open Scope R_scope.

Lemma examples : 100 + 100 = 200 /\ 2 ^ 19 < 3 ^12 /\ 3.14 <= PI <= 3.15.
split.
(* your need. *)
ring.
split.
(* simpl comparison between constants (algebraic formulas). *)
lra.
(* advanced comparison between constants *)
interval.
Qed.

在写第一个版本的答案时,我有点失望,因为 interval 只处理了 <= 而没有处理 <