Z3 线性算术证明中Skolem函数的引入

Z3 线性算术证明中Skolem函数的引入,z3,Z3,给定以下SMT2脚本: (set-option :produce-proofs true) (set-logic AUFLIRA) (declare-sort Complex$ 0) (declare-fun r$ () Real) (declare-fun s$ () Complex$) (declare-fun re$ (Complex$) Real) (declare-fun norm$ (Complex$) Real) (assert (! (not (=> (and (foral

给定以下SMT2脚本:

(set-option :produce-proofs true)
(set-logic AUFLIRA)
(declare-sort Complex$ 0)
(declare-fun r$ () Real)
(declare-fun s$ () Complex$)
(declare-fun re$ (Complex$) Real)
(declare-fun norm$ (Complex$) Real)
(assert (! (not (=> (and (forall ((?v0 Complex$)) (<= (ite (< (re$ ?v0) 0.0) (- (re$ ?v0)) (re$ ?v0)) (norm$ ?v0))) (<= (norm$ s$) r$)) (<= (ite (< (re$ s$) 0.0) (- (re$ s$)) (re$ s$)) (+ r$ 1.0)))) :named a0))
(check-sat)
(get-proof)
Z3不稳定版本生成了一个包含Skolem函数norm$0的证明。此函数在重写步骤中引入:

(ALL v0. (if 0 <= Re v0 then Re v0 else - 1 * Re v0) <= cmod v0) =
((ALL v0. cmod v0 = (if 0 <= Re v0 then Re v0 else - 1 * Re v0) + norm_0 v0) & (ALL v0. 0 <= norm_0 v0))

命令行开关可以抑制这种行为吗?也就是说,有没有一个选项使得Z3在没有这样的Skolem函数的情况下生成证明?原则上,这应该是可能的,因为Z3版本3.2找到了不需要Skolem函数的证明。

Skolem常量由MBQI基于模型的量词实例化模块引入。这可能是让您看到不同行为的新部分。 MBQI比基于模式的量词实例化强大得多。 但是,对于您的示例,基于模式的量词实例化策略是有效的。所以你可以试试这个

换句话说,按如下方式运行Z3以抑制MBQI:

z3 skolem-example.smt2 smt.mbqi=false自动配置=false