【发布时间】:2020-11-26 12:48:45
【问题描述】:
试图简化这个布尔表达式。
(not (and (or (not e) (not f) (not h))
(or (not f) (not h) d)
(or (not e) (not h) c)
(or (not h) d c)
(or (not e) (not f) (not g) a)
(or (not f) d (not g) a)
(or (not e) (not f) a i)
(or (not f) d a i)
(or (not e) c (not g) a)
(or d c (not g) a)
(or (not e) c a i)
(or d c a i)
(or (not e) (not f) a b)
(or (not f) d a b)
(or (not e) c a b)
(or d c a b)))
这应该简化为这样的 cnf 形式的布尔表达式。
(and
(or (not a) h)
(or (not b) (not i) g h)
(or (not c) f)
(or (not d) e))
我一直在尝试通过使用 "ctx-solver-simplify" 和 "tseitin-cnf" 策略来实现这一目标。如果仅应用 "ctx-solver-simplify",则不会对这种情况执行简化。当then("tseitin-cnf", "ctx-solver-simplify") 应用这两种策略时,会返回一个包含大量辅助变量的结果。这也不是预期的简化形式。
有没有办法将此表达式简化为预期的输出?
编辑: 在 Z3 github repo 中提出了同样的问题,并得到了非常好的工作响应。这就是问题所在。
【问题讨论】:
标签: z3 boolean-logic boolean-expression cnf