(expr, assumptions)
return test_closed_group(expr, assumptions, Q.rational)
Rational + Rational     -> Rational
        Rational + !Rational    -> !Rational
        !Rational + !Rational   -> ?
Rational + Rational     -> Rational
        Rational + !Rational    -> !Rational
        !Rational + !Rational   -> ?
Rational + Rational - > Rational Rational + !Rational - > !Rational !Rational + !Rational - > ?
def Add(expr, assumptions):
        """
        Rational + Rational     -> Rational
        Rational + !Rational    -> !Rational
        !Rational + !Rational   -> ?
        """
        if expr.is_number:
            if expr.as_real_imag()[1]:
                return False
        return test_closed_group(expr, assumptions, Q.rational)
def Add ( expr , assumptions ) : if expr . is_number : if expr . as_real_imag ( ) [ 1 ] : return False return test_closed_group ( expr , assumptions , Q . rational )