Back-and-Forth Criterion for Quantifier Elimination