(set-option:macro-finder true):不适用于群论的定理

时间:2014-04-17 01:28:26

标签: z3 z3py

我试图使用以下代码

来证明群论中的正确取消属性
(set-option :macro-finder true)

(declare-sort S)
(declare-fun e () S)
(declare-fun mult (S S) S)
(declare-fun inv (S) S)
(assert (forall ((x S) (y S) (z S)) (= (mult (mult x y) z) (mult x (mult y z)))))
(assert (forall ((x S)) (= (mult e x)  x)))
(assert (forall ((x S)) (= (mult (inv x) x) e)))
(assert (forall ((x S)) (= (mult x e)  x)))
(assert (forall ((x S)) (= (mult x (inv x)) e)))

(check-sat)
(assert (not (forall ((x S) (y S) (z S)) (=> (= (mult y x) (mult z x)) (= y z)))))
(check-sat)

但我正在获取

sat
(error: "out of memory")

请让我知道会发生什么。非常感谢。

2 个答案:

答案 0 :(得分:1)

Z3并未特别针对普遍代数中的证明定理进行调整。 具有超级位置的定理证明,如E,Spass,Vampire, 传统上非常适合这样的定理。

也就是说,不稳定分支中的Z3版本没有问题。 这是我得到的:

z3.exe ua.smt2 /v:10
(simplifier :num-exprs 23 :num-asts 196 :time 0.00 :before-memory 2.61 :after-memory 2.61)
(smt.simplifier-done)
(smt.searching)
(smt.mbqi)
sat
(smt.simplifier-done)
(smt.searching)
(smt.mbqi)
(smt.simplifier-done)
(smt.searching) 
(smt.simplifying-clause-set :num-deleted-clauses 0)
(smt.simplifier-done)
(smt.searching)
(smt.simplifying-clause-set :num-deleted-clauses 1)
(smt.mbqi :failed k!6)
(smt.simplifier-done)
(smt.searching)
(smt.simplifier-done)
(smt.searching)
(smt.mbqi :failed k!7)
(smt.simplifier-done)
(smt.searching)
(smt.simplifier-done)
(smt.searching)
(smt.mbqi :failed k!8)
(smt.simplifier-done)
(smt.searching)
(smt.simplifier-done)
(smt.searching)
(smt.mbqi :failed k!9)
(smt.restarting :propagations 0 :decisions 0 :conflicts 0 :restart 100 :restart-outer 100 :agility 0.00)
unsat

您可以下载最新版本的所谓"不稳定" Z3的分支 来自z3.codeplex.com>下载> "计划"

答案 1 :(得分:1)

对于Z3的主分支版本,这只是一个难题,运行第二个check-sat时内存不足。当前版本(不稳定分支)很快解决了它。 (请注意,macro-finder选项已重命名为smt.macro_finder,但这对此文件没有太大影响。)