Skip to content

Incorrect answer on NRA formula #2546

@muchang

Description

@muchang

Hi,
For this formula:

(set-logic NRA)
(declare-fun a () Real)
(declare-fun b () Real)
(declare-fun c () Real)
(declare-fun d () Real)
(declare-fun f () Real)
(assert
  (=>
    (exists
      ((e Real))
      (=> (and (= a 2) (< c b)) (or (< f 0) (> (* e f) f) (= a 2)))
    )
    (forall
      ((i Real))
      (exists
        ((j Real))
        (exists
          ((k Real))
          (forall
            ((l Real))
            (<=
              (+ j (* 17 l) (* 2 k) (* (- 1) i))
              1
            )
          )
        )
      )
    )
  )
)
(check-sat)
(get-model)

z3 will report sat, and give a model:

(model 
  (define-fun f () Real
    0.0)
  (define-fun b () Real
    0.0)
  (define-fun a () Real
    0.0)
  (define-fun c () Real
    0.0)
  (define-fun d () Real
    0.0)
)

If I feed this model to the formula, z3 will report unsat.

OS: Ubuntu 18.04
Revision: 0d3fed9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions