This is the reduction of a more interesting problem, in which the missing property was (for positive k
,M
and N
), that ((k % M) * N) < M*N
. Below is an encoding of the simpler problem that a <= b ==> (a*c) <= (b*c)
. Such a query succeeds (we get unsat
), but if the expression b
is replaced by b+1
(as in the second query below) then we get unknown
, which seems surprising. Is this the expected behaviour? Are there options to improve the handling of such inequalities? I tried with and without configuration options, and various versions of Z3, including the current unstable branch. Any tips would be much appreciated!
(declare-const a Int)
(declare-const b Int)
(declare-const c Int)
(assert (> a 0))
(assert (> b 0))
(assert (> c 0))
(assert (<= a b))
(assert (not (<= (* a c) (* b c))))
(check-sat)
(assert (<= a (+ b 1)))
(assert (not (<= (* a c) (* (+ b 1) c))))
(check-sat)