Consider these two formulae:
Exists y. Forall x. (y>x)
, which isunsat
.Forall x. Exists y. (y>x)
, which issat
.
Note that we cannot find “models” for the sat
formula, e.g., using Z3 it outputs Z3Exception: model is not available
for the following code:
phi = ForAll([x],Exists([y], lit))
s_def = Solver()
s_def.add(phi)
print(s_def.model())
Also, quantifier elimination does not output an elimination, but a satisfiability result
[[]]
(i.e., True
):
x, y = Reals('x, y')
t = Tactic("qe")
lit = (y>x)
ae = Goal()
ae.add(ForAll([x],Exists([y], lit)))
ae_qe = t(ae)
print(ae_qe)
I think this happens because the value of y
fully depends on x
(e.g., if x
is 5
then y
can be 6
). Thus, I have some questions:
- Am I right with this interpretation?
- What would be the meaning of “a model of a universally quantified formula”?
- Do we say a formula accepts quantifier elimination even if it never eliminates the quantifier but "only: evaluate to
True
orFalse
? - Is there a way to synthetise or construct a model/function that represents a
y
that holds the constraint(y>x)
; e.g.f(x)=x+1
. In other words, does it make sense that the quantifier elimination of aForall x. Exists y. Phi(x,y)
like the example would beForall x. Phi(x,f(x))
?