'Return infimum (if possible) else S.Infinity.'

@staticmethod
def _infimum_key(expr):

    try:
        infimum = expr.inf
        assert infimum.is_comparable
    except (NotImplementedError, AttributeError, AssertionError, ValueError):
        infimum = S.Infinity
    return infimum
