prolog in equalities