나는 간단한 명제가있다. 엄격하게 정렬 된 정수 목록의 첫 번째 요소는 목록의 모든 요소 중 최소값이라고 주장하고 싶습니다. 정렬 된 목록을 정의하는 방법은 모든 요소가 다음 요소보다 작다는 로컬 불변 식을 정의하는 것입니다. 나는 Z3에 다음과 같은 방법으로 내 제안을 공식화 한 -Bernie-Schonfinkel의 공식은 정확히 무엇입니까?
(set-option :mbqi true)
(set-option :model-compact true)
(declare-fun S (Int) Bool)
(declare-fun preceeds (Int Int) Bool)
(declare-fun occurs-before (Int Int) Bool)
;; preceeds is anti-reflexive
(assert (forall ((x Int)) (=> (S x) (not (preceeds x x)))))
;; preceeds is monotonic
(assert (forall ((x Int) (y Int)) (=> (and (S x) (and (S y) (and (preceeds x y))))
(not (preceeds y x)))))
;; preceeds is a function
(assert (forall ((x Int) (y Int) (z Int)) (=> (and (S x) (and (S y) (and (S z) (and (preceeds x y)
(preceeds x z)))))
(= y z))))
;; preceeds induces local order
(assert (forall ((x Int) (y Int)) (=> (and (S x) (and (S y) (preceeds x y)))
(< x y))))
;; preceeds implies occurs-before
(assert (forall ((x Int) (y Int)) (=> (and (and (S x) (S y)) (preceeds x y))
(occurs-before x y))))
;;occurs-before is transitivie
(assert (forall ((x Int)(y Int)(z Int))
(=> (and (S x) (and (S y) (and (S z)(and (occurs-before x y) (occurs-before y z)))))
(occurs-before x z))
))
(declare-const h Int)
(assert (S h))
(assert (forall ((x Int)) (=> (S x) (occurs-before h x))))
(assert (forall ((y Int)) (=> (S y) (< h y))))
(check-sat)
(get-model)
첫째, 나는 효과적으로 명제이다 식의 어떤 클래스 정확히 알고 싶습니다. 내 주장을 효과적으로 명제로 분류 할 수 있습니까? 두 번째로 위에 제시된 제형이 맞습니까? 셋째, 효과적으로 명제가있는 경우에만 수량화 된 수식을 수락하기 위해 Z3에서 어떤 옵션을 설정해야합니까?