I often use this grading code

evalb(convert(simplify(expand(simplify(input-ta, symbolic)), symbolic), expln) = 0)