From 87539cd9f8ce912e5e084dfbed5fa366555b6006 Mon Sep 17 00:00:00 2001 From: Pierre Letouzey Date: Wed, 24 May 2017 18:04:10 +0200 Subject: romega: takes advantage of context variables with body When a context variable x is of the form "x := body : Z", romega is now made aware of this body. Technically, we reify an equation x = body, and push a corresponding (eq_refl x) as argument of the final do_omega. See also the previous commit adding this same feature to omega (fixing bug 142). --- test-suite/success/ROmega4.v | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test-suite/success/ROmega4.v (limited to 'test-suite') diff --git a/test-suite/success/ROmega4.v b/test-suite/success/ROmega4.v new file mode 100644 index 0000000000..58ae5b8fb8 --- /dev/null +++ b/test-suite/success/ROmega4.v @@ -0,0 +1,26 @@ +(** ROmega is now aware of the bodies of context variables + (of type Z or nat). + See also #148 for the corresponding improvement in Omega. +*) + +Require Import ZArith ROmega. +Open Scope Z. + +Goal let x := 3 in x = 3. +intros. +romega. +Qed. + +(** Example seen in #4132 + (actually solvable even if b isn't known to be 5) *) + +Lemma foo + (x y x' zxy zxy' z : Z) + (b := 5) + (Ry : - b <= y < b) + (Bx : x' <= b) + (H : - zxy' <= zxy) + (H' : zxy' <= x') : - b <= zxy. +Proof. +romega. +Qed. -- cgit v1.2.3