Z3中的量词模式

Z3中的量词模式,z3,smt,quantifiers,Z3,Smt,Quantifiers,我很难证明这个相当简单的Z3查询 (set-option :smt.auto-config false) ; disable automatic self configuration (set-option :smt.mbqi false) ; disable model-based quantifier instantiation (declare-fun sum (Int) Int) (declare-fun list () (Array Int Int)) (declare-fun i0

我很难证明这个相当简单的Z3查询

(set-option :smt.auto-config false) ; disable automatic self configuration
(set-option :smt.mbqi false) ; disable model-based quantifier instantiation
(declare-fun sum (Int) Int)
(declare-fun list () (Array Int Int))
(declare-fun i0 () Int)
(declare-fun s0 () Int)
(declare-fun i1 () Int)
(declare-fun s1 () Int)
(assert (forall ((n Int))
  (! (or (not (<= n 0)) (= (sum n) 0)) 
     :pattern ((sum n)))))
(assert (forall ((n Int))
  (! (let ((a1 (= (sum n)
                   (+ (select list (- n 1))
                      (sum (- n 1))))))
       (or (<= n 0) a1))
     :pattern ((sum n)))))
(assert (>= i0 0))
(assert (= s0 (sum i0)))
(assert (= i1 (+ 1 i0)))
(assert (= s1 (+ 1 s0 (select list i0))))
(assert (not (= s1 (sum i1))))

(check-sat)
(设置选项:smt.auto-config false);禁用自动自配置
(设置选项:smt.mbqi false);禁用基于模型的量词实例化
(声明乐趣总和(Int)Int)
(声明乐趣列表()(数组Int))
(声明funi0()Int)
(声明乐趣s0()Int)
(声明funi1()Int)
(声明乐趣s1()Int)
(断言(对于所有((n Int))

(!)或(没关系,我的查询中有一个愚蠢的错误

此代码:

(assert (= s1 (+ 1 s0 (select list i0))))
应该是:

(assert (= s1 (+ s0 (select list i0))))