The ctx-solver-simplify
tactic only works for bool variables, so how would I deal with variables over finite domain (e.g., which tactics to use)? For example, if z
can only take 3 values 0,1,2
, then how to simplify Or(z==0,z==1,z==2)
to true
?
Also, even for bool expressions, the tactic ctx-solver-simplify
doesn't simplify completely. For example:
x,y,z = z3.Bools('x y z')
c1 = z3.And(x==True,y==True,z==True)
c2 = z3.And(x==True,y==True,z==False)
c3 = z3.And(x==True,y==False,z==True)
c4 = z3.And(x==True,y==True,z==False)
z3.Tactic('ctx-solver-simplify')(z3.Or([c1,c2,c3,c4]))
[[Or(And(x, z), And(x == True, y == True, z == False))]]
How do I get something like And(x, Or(z, y))
?
Thanks !