Yes, removing irrelevant facts can make a big difference. Suppose that we have a unsatisfiable formula of the form F_1 and F_2 and (not G)
. Moreover, let us assume that F_1 and (not G)
is unsatisfiable, and F_2
is satisfiable. F_2
is what you call irrelevant. If there is a cheap way to remove F_2
before sending the formulat to Z3, it will probable make a big difference.
Z3 has heuristics for "ignoring" irrelevant facts, but they are just heuristics. For our example, the worst case scenario is a F_2
that is really hard for Z3 to satisfy. Z3 is essentially trying to build an interpretation/solution that satisfies the input formula (the formula F_1 an F_2 and (not G)
in our working example). A formula is unsatisfiable when Z3 can show it is impossible to build the interpretation. In practice, the formula F_2
is irrelevant for Z3 only if it can quickly show it to be satisfiable, and the interpretation/solution for F_2
does not conflicts F_1 and (not G)
. If that is not the case, Z3 can waste a lot of resources with F_2
.