some speculative rewriting/solving in BOOL and UF theories
crazy hack impl