I'm trying to prove statements such as the following:
(assert (=
(mod i n)
(mod j n)))
(assert (> n 0))
(assert (not (=
(mod (+ i 1) n)
(mod (+ j 1) n))))
(check-sat)
(get-model)
Others are:
(((i % n) + j) % n) == ((i + j) % n)
((i - n + 1) % n) == ((i + 1) % n)
((((a - 1) % n) + 1) % n) == (a % n)
But z3 does not seem to terminate when proving these statements. Are they beyond the power of z3/smt solvers?
If it is the only way I would not mind doing more explicit proof steps, but these rules seem so elementary I would not know where to begin. Even when using induction I quickly run into cases (like the initial example) that I would expect to be true, but which do not seem to be provable with z3.
I am using z3 4.8.6, for what it's worth. Can anyone shed some light on this why this is hard, or maybe point me in the direction of papers/z3 flags that make this feasible?