diff options
author | Pierre Letouzey <pierre.letouzey@inria.fr> | 2017-05-24 18:04:10 +0200 |
---|---|---|
committer | Pierre Letouzey <pierre.letouzey@inria.fr> | 2017-10-05 23:30:05 +0200 |
commit | 87539cd9f8ce912e5e084dfbed5fa366555b6006 (patch) | |
tree | c6d088147366f7be5fb6f660d0cfaa37b54ca06b /test-suite/success | |
parent | 87a63ffc6dd36be0ef2e757b46f3c81f67f96207 (diff) |
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).
Diffstat (limited to 'test-suite/success')
-rw-r--r-- | test-suite/success/ROmega4.v | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test-suite/success/ROmega4.v b/test-suite/success/ROmega4.v new file mode 100644 index 000000000..58ae5b8fb --- /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. |