Is there any way to disable simplification/rewriting of assertions in Z3 (version 4.8.8)?
I am currently working on proof replay of Z3 proofs within KeY (https://www.key-project.org). However, to be able to replay Z3's "asserted" rule, I need the exact assertion as specified in the SMT-LIB input to Z3, not a simplified version of it.
As an extreme example of what could happen, consider this SMT-LIB input:
(set-option :produce-proofs true)
(assert
(not
(forall ((y Int))
(exists ((x Int))
(= x (+ y 1))
)
)
)
)
(check-sat)
(get-proof)
Running Z3 4.8.8 leads to the following output:
unsat
((proof
(asserted false)))
Obviously, the assertion has been simplified, which makes the proof not really helpful. Is there any way to completely disable this simplification (and thus get a "real" proof from Z3, which I can replay in our tool)?
You might be better served if you use a more recent version of z3. For instance, given your example, a recently compiled-from-github-master version produces:
The format remains undocumented, and in general it will be really hard for z3 to produce granular proofs in the presence of quantifiers. A direct quote from: https://theory.stanford.edu/~nikolaj/programmingz3.html#sec-proofs says: