Skip to content

Simple divisibility problem diverges #7753

@LeventErkok

Description

@LeventErkok
(set-logic ALL)
(declare-fun x () Int)
(declare-fun y () Int)

; if y is 0, then so is x. Otherwise y divides x. Assert that, and prove the same for (abs y)
(assert      (ite (= y 0) (= x 0) (= (mod x      y)  0)))
(assert (not (ite (= y 0) (= x 0) (= (mod x (abs y)) 0))))

(check-sat)

The above says something really simple. If y divides x, then so does abs y. There's a little proviso to avoid y = 0 division case, in which case we require x to be 0 too.

CVC5 proves this instantly. z3, alas, does not seem to terminate.

Looking at the verbose output, something about the nl-sat/grobner-basis is going on a wild-goose change?

Metadata

Metadata

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