如何用Z3证明单参数群的定理

如何用Z3证明单参数群的定理,z3,theorem-proving,abstract-algebra,Z3,Theorem Proving,Abstract Algebra,使用Z3可以证明 形成一个单参数组 使用以下Z3代码进行验证: (declare-sort S) (declare-fun carte (Real Real) S) (declare-fun h (Real S) S) (declare-fun a () Real) (declare-fun b () Real) (assert (forall ( (x Real) (y Real) (t Real)) (= (h t (carte x y))

使用Z3可以证明

形成一个单参数组

使用以下Z3代码进行验证:

(declare-sort S)
(declare-fun carte (Real Real) S)
(declare-fun h (Real S) S)

(declare-fun a () Real)
(declare-fun b () Real)
(assert (forall ( (x Real) (y Real) (t Real)) (= (h t (carte x y)) 
                                                 (carte (+ x (* a t)) 
                                                      (+ y (* b t)))   )   ) )

(check-sat)

(push)
(assert (forall ((x Real) (y Real) (t Real) (s Real)) (distinct (h s (h t (carte x y))) 
                                                                 (h (+ t s) (carte x y)))  ))
(check-sat)
(pop)

(push)
(assert (forall ((x Real) (y Real) ) (distinct (h 0 (carte x y)) 
                                               (carte x y))    ))
(check-sat)
(pop)



(push)
(assert (forall ((x Real) (y Real) (t Real)) (distinct (h t (h (- 0 t) (carte x y))) 
                                                       (carte x y))    ))
(check-sat)
(pop)


(push)
(assert (forall ((x Real) (y Real) (t Real)) (distinct (h (- 0 t) (h t (carte x y))) 
                                                       (carte x y))    ))
(check-sat)
(pop)
(declare-sort S)
(declare-fun carte (Real Real Real) S)
(declare-fun h (Real S) S)

(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(assert (forall ( (x Real) (y Real) (z Real) (t Real)) (= (h t (carte x y z)) 
                                                 (carte (+ x (* a t)) 
                                                      (+ y (* b t))  (+ z (* c t))   )   )   ) )

(check-sat)

(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real) (s Real)) (distinct (h s (h t (carte x y z))) 
                                                                 (h (+ t s) (carte x y z)))  ))
(check-sat)
(pop)

(push)
(assert (forall ((x Real) (y Real) (z Real) ) (distinct (h 0 (carte x y z)) 
                                               (carte x y z))    ))
(check-sat)
(pop)



(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real)) (distinct (h t (h (- 0 t) (carte x y z))) 
                                                       (carte x y z))    ))
(check-sat)
(pop)


(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real)) (distinct (h (- 0 t) (h t (carte x y z))) 
                                                       (carte x y z))    ))
(check-sat)
(pop)
相应的输出是

sat
unsat
unsat
unsat
unsat
sat
unsat
unsat
unsat
unsat
请联机运行代码

其他例子:证明

形成一个单参数组

使用以下Z3代码进行验证:

(declare-sort S)
(declare-fun carte (Real Real) S)
(declare-fun h (Real S) S)

(declare-fun a () Real)
(declare-fun b () Real)
(assert (forall ( (x Real) (y Real) (t Real)) (= (h t (carte x y)) 
                                                 (carte (+ x (* a t)) 
                                                      (+ y (* b t)))   )   ) )

(check-sat)

(push)
(assert (forall ((x Real) (y Real) (t Real) (s Real)) (distinct (h s (h t (carte x y))) 
                                                                 (h (+ t s) (carte x y)))  ))
(check-sat)
(pop)

(push)
(assert (forall ((x Real) (y Real) ) (distinct (h 0 (carte x y)) 
                                               (carte x y))    ))
(check-sat)
(pop)



(push)
(assert (forall ((x Real) (y Real) (t Real)) (distinct (h t (h (- 0 t) (carte x y))) 
                                                       (carte x y))    ))
(check-sat)
(pop)


(push)
(assert (forall ((x Real) (y Real) (t Real)) (distinct (h (- 0 t) (h t (carte x y))) 
                                                       (carte x y))    ))
(check-sat)
(pop)
(declare-sort S)
(declare-fun carte (Real Real Real) S)
(declare-fun h (Real S) S)

(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(assert (forall ( (x Real) (y Real) (z Real) (t Real)) (= (h t (carte x y z)) 
                                                 (carte (+ x (* a t)) 
                                                      (+ y (* b t))  (+ z (* c t))   )   )   ) )

(check-sat)

(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real) (s Real)) (distinct (h s (h t (carte x y z))) 
                                                                 (h (+ t s) (carte x y z)))  ))
(check-sat)
(pop)

(push)
(assert (forall ((x Real) (y Real) (z Real) ) (distinct (h 0 (carte x y z)) 
                                               (carte x y z))    ))
(check-sat)
(pop)



(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real)) (distinct (h t (h (- 0 t) (carte x y z))) 
                                                       (carte x y z))    ))
(check-sat)
(pop)


(push)
(assert (forall ((x Real) (y Real) (z Real) (t Real)) (distinct (h (- 0 t) (h t (carte x y z))) 
                                                       (carte x y z))    ))
(check-sat)
(pop)
相应的输出是

sat
unsat
unsat
unsat
unsat
sat
unsat
unsat
unsat
unsat
请联机运行此代码

另一个例子:证明这一点

形成一个单参数组

在线给出了证明,在线给出了四维延拓

最后几个例子:证明这一点

形成一个单参数组

证据是在网上提供的

证明

形成一个单参数组

证据是在网上提供的

更一般地说,证明这一点

形成一个单参数组

证据是在网上提供的

一个三维延伸:证明

形成一个单参数组

证据是在网上提供的

一个双曲函数的例子:证明

形成一个单参数组

证据是在网上提供的

我的问题是:

  • 有可能用数组来证明更高的维度吗

  • 我声称Z3是唯一能够执行这些证明的系统。你同意吗