use ``minpoly`` in ``Expr.equals`` with a bound to avoid stalling