transformation to remove trivial formulas