I'm playing with uninterpreted sorts and functions and cannot quite understand how quantified formulas interact with empty models. Here (also here http://rise4fun.com/Z3Py/6ets) are some simple examples that somewhat confuse me:
[∀v : False]
is unsat, while "intuitively" it holds for an empty model.- Checking
[∃v : v = v]
yields an empty model while that does not have a satisfying assignment. - Some formulas, seemingly equivalent to
[∃v : v = v]
, somehow prevent z3 from producing empty models.[∃v, v1 : v = v1]
is one such example. E.g., if we add such formula to a solver and then try to create something resembling an allsat procedure (adding more and more constraints to rule out more and more models), we would run into unsat before getting an empty model.
So, could you please refer me to any documents/papers describing how z3 handles quantifiers and empty models?
Also, if I choose to restrict my attention to nonempty models only, what is the correct way to ask z3 for that? Things like [∃v, v1 : v = v1]
seem to do the trick, but is there a better way?