Proof equality of two formulas in prolog.