exercise1.smt2 796 B

123456789101112131415161718192021222324252627282930
  1. (set-option :produce-proofs true)
  2. (declare-const x Bool)
  3. (declare-const y Bool)
  4. (declare-const z Bool)
  5. ; we define our conjecture
  6. (define-fun conjecture () Bool
  7. (=> (and (xor x y) (= y z))
  8. (and x z)))
  9. ; subsequently we assert the negation to check for validity
  10. (assert (not conjecture))
  11. ; check validity of conjecture by checking whether not conjecture is sat, which would mean there exists a counterexample
  12. (check-sat)
  13. ;(get-model)
  14. ; we assert a different value for x as a blocking clause to find additional solutions
  15. (assert (not (and (not x) y z)))
  16. (check-sat)
  17. ;(get-model)
  18. ; we assert a different value for y as a blocking clause to find additional solutions
  19. (assert (not (and x (not y) (not z))))
  20. (check-sat)
  21. ; as this formula has become unsat, we retrieve a proof
  22. ;(get-proof)