def _is_finite_with_finite_vars(f, domain=S.Complexes):
 def assumptions(s):
  A = s.assumptions0
  if (A.get('finite', None) is None):
   A['finite'] = True
  A.setdefault('complex', True)
  A.setdefault('real', domain.is_subset(S.Reals))
  return A
 reps = {s: Dummy(**assumptions(s)) for s in f.free_symbols}
 return f.xreplace(reps).is_finite

def _is_finite_with_finite_vars ( f , domain = S . Complexes ) : def assumptions ( s ) : A = s . assumptions0 if ( A . get ( 'finite' , None ) is None ) : A [ 'finite' ] = True A . setdefault ( 'complex' , True ) A . setdefault ( 'real' , domain . is_subset ( S . Reals ) ) return A reps = { s : Dummy ( ** assumptions ( s ) ) for s in f . free_symbols } return f . xreplace ( reps ) . is_finite
return true if the given expression is finite .