0

我试图用 Z3 证明在一般拓扑中给出的定理

TPTP-拓扑

我正在使用以下 Z3-SMT-LIB 代码翻译那里给出的代码

;; File     : TOP001-2 : TPTP v6.0.0. Released v1.0.0.
;; Domain   : Topology
;; Problem  : Topology generated by a basis forms a topological space, part 1

(declare-sort S)
(declare-sort Q)
(declare-sort P)

(declare-fun elemcoll (S Q) Bool)
(declare-fun elemset (P S) Bool)
(declare-fun unionmemb (Q) S)

(declare-fun f1 (Q P) S)

(declare-fun f11 (Q S) P)
(declare-fun basis (S Q) Bool)
(declare-fun Subset (S S) Bool)
(declare-fun topbasis (Q) Q)

;; union of members axiom 1.
(assert (forall ((U P) (Vf Q)) (or (not (elemset U (unionmemb Vf))) 
                                    (elemset U (f1 Vf U) ) )   ))
;; union of members axiom 2.

(assert (forall ((U P) (Vf Q)) (or (not (elemset U (unionmemb Vf))) 
                                   (elemcoll (f1 Vf U) Vf ) )   ))


;; basis for topology, axiom 28

(assert (forall ((X S) (Vf Q)) (or (not (basis X Vf)) (= (unionmemb Vf) X )  )   ))

;; Topology generated by a basis, axiom 40.

(assert (forall ((Vf Q) (U S)) (or (elemcoll U (topbasis Vf))   
                               (elemset (f11 Vf U) U))   ))

;; Set theory, axiom 7.

(assert (forall ((X S) (Y Q)) (or (not (elemcoll X Y)) (Subset X (unionmemb Y) ) )  ))

;; Set theory, axiom 8.
(assert (forall ((X S) (Y S) (U P)) (or (not (Subset X Y)) (not (elemset U X))
                                                                (elemset U Y)     )))

;; Set theory, axiom 9.
(assert (forall ((X S)) (Subset X X )  ))

;; Set theory, axiom 10.
(assert (forall ((X S) (Y S) (Z S)) (or (not (= X Y)) (not (Subset Z X)) (Subset Z Y) )  ))

;; Set theory, axiom 11.
(assert (forall ((X S) (Y S) (Z S)) (or (not (= X Y)) (not (Subset X Z)) (Subset Y Z) )  ))

(check-sat)

(push)
(declare-fun cx () S)
(declare-fun f () Q)
(assert (basis cx f))
(assert (not (elemcoll cx (topbasis f))))   
(check-sat)
(pop)

(push)
(assert (basis cx f))
(assert (elemcoll cx (topbasis f)))  
(check-sat)
(pop)

对应的输出是

sat
sat
sat

请在此处在线运行此示例

第一个sat是正确的;但第二个sat是错误的,它必须是unsat。换句话说,Z3 是说定理及其否定同时为真。

请让我知道在这种情况下会发生什么。非常感谢。一切顺利。

4

1 回答 1

2

一个公式和公式的否定都可能与背景理论 T 一致。特别是,当 T 不完整时,有些句子既不是 T 的结果,也不与 T 不一致。在你的情况下理论 T 是拓扑公理的集合。您可以使用命令(get-model)来获取满足公理和句子的模型。

于 2014-04-14T16:33:06.327 回答