我试图通过归纳证明:
给定组G然后forall(x,y,z)/((y ^ n)x(z ^ n)= x)=> (订单(G)= n)
我正在使用带有以下代码的有界归纳
;; Derive order n from a single axiom for groups order n.
;; ((Y^n)X(Z^n) = X )=> (order(G) = n) for 1 < n < 23
(declare-sort S)
(declare-fun e () S)
(declare-fun mult (S S) S)
(declare-fun power (S Int) S)
(assert (forall ((x S)) (= e (power x 0))))
(assert (forall ((x S)) (= x (power x 1))))
(assert (forall ((n Int) (x S))
(=> (and (>= n 2) (<= n 22))
(= (power x n) (mult x (power x (- n 1)))))))
(assert (= (mult e e) e))
(check-sat)
(define-fun p ((x S) (y S) (z S) (w S) (n Int)) Bool
(=> (= (mult (power y n) (mult x (power z n)))
x) (= (power w n) e) ) )
(assert (forall ((x S) (y S) (z S) (w S)) (p x y z w 2)))
(assert (forall ((x S) (y S) (z S) (w S) (n Int))
(=> (and (> n 2) (<= n 22))
(= (p x y z w n) (p x y z w (- n 1))))))
;; Bounded inductive proof.
(assert (not (forall ((x S) (y S) (z S) (w S)) (p x y z w 22))))
(check-sat)
输出是预期的:
sat
unsat
在线运行此代码here
我正在证明2&lt; n&lt; 23.当我尝试2&lt; n&lt; 24我正在获得“超时”。
问题是:在这个证明中如何超越n = 22?
答案 0 :(得分:0)
使用Leonardo de Moura建议的(set-option :qi-eager-threshold 70000)
,Z3能够证明该定理直到n = 60000(本地,在线直到n = 10000)。