I want to know if Z3 can show equivalent formulas after Quantifier Elimination.
Example (exists k) (i x k) = 1 and k > 5
is equivalent to
i > 0 and 5 i – 1 < 0.
Here, quantifier k has been eliminated.
Is this possible?
Thanks,
Kaustubh.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, Z3 can check whether two formulas are equivalent. To check whether
pandqare equivalent. We must check whether(not (iff p q))is unsatisfiable.Your example uses nonlinear arithmetic
i*k. The quantifier elimination module in Z3 has limited support for nonlinear real arithmetic. It is based on virtual term substitution, which is not complete. However, it is sufficient for your example.We must enable the quantifier elimination module in Z3, and the nonlinear extensions (i.e., virtual term substitution).
Here is how we can encode your example in Z3: http://rise4fun.com/Z3/rXfi