added pretty printing and equality operator for Formula