I=IntSort()
f =Function('f', I, I)
x, y, z =Ints('x y z')
A=Array('A',I,I)
fml =Implies(x + 2 == y, f(Select(Store(A, x, 3), y - 2)) == f(y - x + 1))
s =Solver()
s.add(Not(fml))
print s.check()
Logical Queries - SAT+
sat unsat
model (clausal) proof
correction set core
local min correction set local min core
min correction set min core
Logical Queries
Section 2
Theory Solvers
Equality and Uninterpreted functions
EUF
(declare-sortA)
(declare-fun f (A) A)
(declare-const x A)
(assert (= (f (f x)) x))
(assert (= (f (f (f x))) x))
(check-sat)
(assert (not (= (f x) x)))
(check-sat)
A linear arithmetic conjecture
A linear arithmetic conjecture in SMT
(declare-const xR Real)
(declare-const yR Real)
(declare-const x Int)
(declare-const y Int)
(declare-const a Int)
(assert (< (+ xR yR) a))
(assert (> (+ x y) a))
(assert (or (= x xR) (< x xR (+ x 1)) (< (- x 1) xR x)))
(assert (or (= y yR) (< y yR (+ y 1)) (< (- y 1) yR y)))
(check-sat)
(get-model)