Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsat core insufficient #7098

Closed
MichaelRawson opened this issue Jan 24, 2024 · 0 comments
Closed

unsat core insufficient #7098

MichaelRawson opened this issue Jan 24, 2024 · 0 comments

Comments

@MichaelRawson
Copy link

Z3 occasionally produces an unsat core that isn't enough to produce unsat. I have the following example, minimised as far as I could from a generated problem:

(set-option :produce-unsat-cores true)

(declare-const k!1 Bool)
(declare-const k!2 Bool)
(declare-const k!4 Bool)
(declare-const k!5 Bool)
(declare-const k!10 Bool)
(declare-const k!11 Bool)
(declare-const k!21 Bool)
(declare-const k!22 Bool)

(assert (and ((_ pbeq 1 1 1) k!4 k!5) ((_ pbeq 1 1 1) k!1 k!2)))
(assert (forall ((a Real) (b Real))
  (=>
    (and (> a 0.0) (> b a))
    (and (=> k!10 (=> k!4 (=> k!11 (>= a b))))
         (=> k!21 (=> (and k!1 k!5) (=> k!22 (>= 0.0 b))))))
  ))

(assert k!1)
(assert k!11)
(assert k!22)

If you append

(check-sat-assuming (k!10 k!21))
(get-unsat-core)

it's unsat with core (k!10), but if you instead append

(check-sat-assuming (k!10))

it's sat. Note that the actual result Z3 produces is fine, just the unsat core is too small. @CEisenhofer was able to reproduce, and of course I'm happy to help too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant