Add simplify function to support implication, exclusive or and equivalence