def my_nasty_tactic(exp):
    parameter = re.findall('exists ([^.]*)\\..*', exp)
if len(parameter) == 1:
    parameter = parameter[0]
substitution = re.findall('&[ ]*\\([ ]*([^ ]+)[ ]*=[ ]*' + parameter +
    '[ ]*\\)', exp)
if len(substitution) == 1:
    substitution = substitution[0]
exp_abs = re.sub('exists(?= [^.]*\\..*)', '\\ ', exp)
exp_abs = re.sub('&[ ]*\\([ ]*' + substitution + '[ ]*=[ ]*' + parameter +
    '[ ]*\\)', '', exp_abs)
return read_expr('(%s)(%s)' % (exp_abs, substitution)).simplify()
Simplify a Logic Expression using NLTK