【发布时间】:2022-01-25 15:01:44
【问题描述】:
从真值表可以看出,我有 SMT 公式:
为了定义 3-sat 问题,我添加了两个新变量 d 和 e。 无论 d 和 e 的值如何,真值表对于相同的 a b c 给出相同的结果。
我想展示这两个公式给出的结果与 SMT 相同。所以我在下面写代码。 我有两个问题我的代码有什么问题,我想这是真的,但它给出了错误。 第二个问题,即使有两个新变量,我能否证明这种平衡。谢谢。
(declare-fun a () Bool)
(declare-fun b () Bool)
(declare-fun c () Bool)
(declare-fun d () Bool)
(declare-fun e () Bool)
(define-fun fml1 () Bool
(or (or a (or b (not c)))
(and (or b (or c (not a)))
(and (or d (or a (not b)))
(and (or a (or (not b) (not d)))
(and (or e (or a (not c)))
(and (or a (or (not e) (not c)))
)
(define-fun fml2 () Bool
(implies (and (not a) (and (not b) c))
(= a (or b c)))
)
(assert (distinct fml1 fml2))
(check-sat)
【问题讨论】: