I am learning Coq via the Coq 8.12.0 reference manual, and have trouble proving the following lemma.
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.
...
And then I get stuck to finish the proof. Any ideas ?
When you entered the tactic
right
you made a choice in the proof that is not confirmed by the facts in your hypothesis. You should remove this line, and try to find another way to prove your initial conjecture, which really seems provable.Actually, you are entering into too much detail if you start unfolding the definition of
Rle
and usingdestruct
. The goal after your...; intuition
is as follows:This is a goal of simple linear arithmetic (because we only add variables together and use simple comparisons). This is solved by a powerful tactic called
lra
. Just call it. The full script for your proof is here: