Quanter Resolve - More Questions

Many thanks to Josh and Leonardo for answering the previous question.

I have a few more questions.

<1> Consider another example.

(exists k) i * k > = 4 and k > 1.

This has a simple solution i> 0. (for both Int and Real)

However, when I tried to follow,

(declare-const i Int)
(assert (exists ((k Int)) (and (>= (* i k)  4) (> k 1))))
(apply (using-params qe :qe-nonlinear true))

Z3 Failed to eliminate the quantifier here.

However, it can be eliminated for a real case. (when I and k are both values) Does excluding quantifier simplify integers?

<2> I use the Z3 C API on my system. I add some nonlinear constraints on integers with quantifiers in my system. Z3 is currently checking feasibility and giving me the correct model when the system is feasible.

I know that after excluding the quantifier, these constraints come down to linear constraints.

, z3 , . 1 , , . ?

z3 . . - z3 z3 ?

< 3 > . , z3 C-API?

< 4 > , , Z3, ? ?

.

+5
1

< 1 > (qe). , .

, Z3 . . .

< 2 > . . Z3 , . , (MBQI). Z3 - , .

< 3 > Z3_context. , , ​​ Z3_context. , :

Z3_config cfg = Z3_mk_config();
Z3_context ctx;
Z3_set_param_value(cfg, "MODEL", "true");
Z3_set_param_value(cfg, "ELIM_QUANTIFIERS", "true");
Z3_set_param_value(cfg, "ELIM_NLARITH_QUANTIFIERS", "true");
ctx = mk_context_custom(cfg, throw_z3_error);
Z3_del_config(cfg);

ctx Z3, .

< 4 > MBQI . - Z3 , . MBQI , . , . MBQI.

+6

All Articles