y=1/x, x=0 satisfiable in the reals?

£可爱£侵袭症+ 提交于 2019-11-28 09:35:20

问题


In SMT-LIB:

(declare-fun y () Real)
(declare-fun x () Real)
(assert (= 0.0 x))
(assert (= y (/ 1.0 x)))
(check-sat)

Should this model be SAT or UNSAT?


回答1:


In SMT-LIB 2.0 and 2.5, all functions are total, so this example is SAT in SMT-LIB. Both Z3 and CVC4 do indeed return SAT for the example in the question.

I found this counter-intuitive. I think it would be mathematically more well justified to say that y=1/x, x=0 is unsatisfiable in the reals. In Mathematica, the equivalent code returns an empty list, indicating that no solution exists, i.e., FindInstance[Element[x, Reals] && Element[y, Reals] && x == 0 && y == 1/x, {x, y}] returns {}

Nonetheless, / is defined this way in SMT-LIB. So as far as Z3 or CVC4 are concerned, this problem is SAT.



来源:https://stackoverflow.com/questions/38107558/y-1-x-x-0-satisfiable-in-the-reals

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!