3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 08:35:31 +00:00

disable try_add_overflow_bound, add note on possible rewrite

This commit is contained in:
Jakob Rath 2023-01-11 13:15:46 +01:00
parent fa036ae486
commit 0a2c69332d
2 changed files with 19 additions and 9 deletions

View file

@ -1279,8 +1279,19 @@ namespace polysat {
* x > x + y & x <= n => y >= N - n
* -x <= -x - y & x <= n => y = 0 or y >= N - n
* -x < -x - y & x <= n => y >= N - n
*
* NOTE: x + y <= x <==> -y <= x <==> -x-1 <= y-1
* x <= x + y <==> x <= -y-1 <==> y <= -x-1
* (see notes on equivalent forms in ule_constraint.cpp)
*
* x >= x + y ==> -y <= x
* x > x + y ==> y <= -x-1
* -x <= -x - y ==> -y <= x-1
* -x < -x - y ==> y <= -x
* Add these as simplification rules on ule_constraint instead of this inference rule?
*/
bool saturation::try_add_overflow_bound(pvar x, conflict& core, inequality const& axb_l_y) {
return false;
set_rule("[x] x >= x + y & x <= n => y = 0 or y >= 2^N - n");
signed_constraint y_eq_0;
vector<signed_constraint> x_ge_bound;

View file

@ -53,17 +53,16 @@ Note:
It can be seen as an instance of lemma 5.2 of Supratik and John.
The following forms are equivalent:
Useful equivalences:
p <= q
p <= p - q - 1
q - p <= q
q - p <= -p - 1
-q - 1 <= -p - 1
-q - 1 <= p - q - 1
- p <= q <=> q - p <= -p - 1 (periodicity 3 if used for rewriting)
<=> -q - 1 <= p - q - 1 (after rewriting twice)
- p <= q <=> p <= p - q - 1
- p <= q <=> -q - 1 <= -p - 1 (combine previous rules)
- p <= q <=> q - p <= q (another combination)
Useful lemmas:
- p <= q ==> p == 0 || -q <= -p