Skip to content
Discussion options

You must be logged in to vote

I think your python code might use the wrong equality?

from z3 import *

# The result we want is that the two arrays are equal, but the result is unsat.
i, v = Ints("i v")
a = Array("a", IntSort(), IntSort())
a = Store(a, i, v)
b = Array("b", IntSort(), IntSort())
b = Store(b, i, v)

x = Solver()
x.add(a == b)
print(x.check())

Returns sat as expected

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by toolCHAINZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #288 on July 16, 2025 08:24.