aboutsummaryrefslogtreecommitdiff
path: root/plugins/micromega/ZifyInst.v
diff options
context:
space:
mode:
authorFrédéric Besson2020-01-06 11:57:11 +0100
committerFrédéric Besson2020-01-06 22:10:50 +0100
commit97bec684eb514700879778c0da9b05e4264a99f6 (patch)
tree87c2c64a4a024b4f1bee1229e54ca1dc9c9d41d8 /plugins/micromega/ZifyInst.v
parent95124216fba92f75e0aef97f4c0003eeb8689557 (diff)
[micromega] fix of bug #11191
- Add an instance to ZifyInst to instruct zify that 0 < x -> 0 < y -> 0 < Z.pow x y - More aggressive interval analysis to bound non-linear monomials.
Diffstat (limited to 'plugins/micromega/ZifyInst.v')
-rw-r--r--plugins/micromega/ZifyInst.v19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/micromega/ZifyInst.v b/plugins/micromega/ZifyInst.v
index 97f6fe0613..edfb5a2a94 100644
--- a/plugins/micromega/ZifyInst.v
+++ b/plugins/micromega/ZifyInst.v
@@ -523,3 +523,22 @@ Instance SatProdPos : Saturate Z.mul :=
SatOk := Z.mul_pos_pos
|}.
Add Saturate SatProdPos.
+
+Lemma pow_pos_strict :
+ forall a b,
+ 0 < a -> 0 < b -> 0 < a ^ b.
+Proof.
+ intros.
+ apply Z.pow_pos_nonneg; auto.
+ apply Z.lt_le_incl;auto.
+Qed.
+
+
+Instance SatPowPos : Saturate Z.pow :=
+ {|
+ PArg1 := fun x => 0 < x;
+ PArg2 := fun y => 0 < y;
+ PRes := fun r => 0 < r;
+ SatOk := pow_pos_strict
+ |}.
+Add Saturate SatPowPos.