@Override
    Expression<T> simplifyTwo(Expression<T> left, Expression<T> right, T type) {
        if (left instanceof Const && right instanceof Const) return new Const<T>(evaluate());
        else if (left.equals(right)) return new Multiply<T>(new Const<T>(type.parse("2")), left);
        else if ((left instanceof UnaryMin && ((UnaryMin<T>) left).a.equals(right)) ||
                (right instanceof UnaryMin && ((UnaryMin<T>) right).a.equals(left))) {
            return new Const<T>(type.parse("0"));
        }
        return null;
    }