Added a isSimplified function that checks if an expression is simplified by matching it to a bunch of illegal expressions.