I am very new to z3/z3py.
My goal:
Suppose I have a IntVector of size 5. I have 5 Exists(...) expressions and want to store whether the exists expressiosn is true or false as 1 and 0 in the IntVector at the corresponding position. In the end, I want to set a constraint of Sum(IntVector) to a number indicating that there must be this many Exists expressions are true and the rest false. I don't care whether the Exists expressions are satisfiable or not, and the only thing I expect is whether a certain number of the Exists expressions are true.
My Problem:
I simply use a Solver and add all above assumptions to it to check the satisfiability. The above implementation takes a long time and returns "unknown". But if I check just one of the Exists expression without adding the constraint of number of true Exists expressions, I will get sat or unsat in a short time. If I check all Exists expressions together without adding the constraint of number of true Exists expressions, I will get unsat (because some the Exists expressions are essentially unsat). I feel tactics and subgoals might solve my problem. But I don't yet have enough knowledge about them.
I hope my problem above makes sense. Could anyone give me some pointers here?