[英]Rbar / Rbar_le / coquelicot lemma
我正在通過 Coq 8.12.0 參考手冊學習 Coq,但無法證明以下引理。
From Coq Require Import Lia Reals Lra List.
Lemma lemma1 : forall (x y:Rbar), Rbar_le x 0 -> Rbar_le y 0
-> Rbar_le (Rbar_plus x y) 0.
Proof.
destruct x ; destruct y ; simpl ; intuition.
destruct H.
destruct H0.
unfold Rle.
auto with real.
right.
...
然后我被卡住以完成證明。 有任何想法嗎?
當您輸入right
的策略時,您在證明中做出了一個未被假設中的事實證實的選擇。 你應該刪除這條線,並嘗試找到另一種方法來證明你最初的猜想,這似乎真的可以證明。
實際上,如果您開始展開Rle
的定義並使用destruct
,您將進入太多細節。 你之后的目標...; intuition
...; intuition
如下:
1 subgoal (ID 207)
r, r0 : R
H : r <= 0
H0 : r0 <= 0
============================
r + r0 <= 0
這是簡單線性算術的目標(因為我們只將變量相加並使用簡單的比較)。 這可以通過一種稱為lra
的強大策略來解決。 就叫吧。 您的證明的完整腳本在這里:
Lemma lemma1 : forall (x y:Rbar), Rbar_le x 0 -> Rbar_le y 0
-> Rbar_le (Rbar_plus x y) 0.
Proof.
destruct x ; destruct y ; simpl ; intuition.
lra.
Qed.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.