def lcim(numbers):
 result = None
 if all((num.is_irrational for num in numbers)):
  factorized_nums = list(map((lambda num: num.factor()), numbers))
  factors_num = list(map((lambda num: num.as_coeff_Mul()), factorized_nums))
  term = factors_num[0][1]
  if all(((factor == term) for (coeff, factor) in factors_num)):
   common_term = term
   coeffs = [coeff for (coeff, factor) in factors_num]
   result = (lcm_list(coeffs) * common_term)
 elif all((num.is_rational for num in numbers)):
  result = lcm_list(numbers)
 else:
  pass
 return result

def lcim ( numbers ) : result = None if all ( ( num . is_irrational for num in numbers ) ) : factorized_nums = list ( map ( ( lambda num : num . factor ( ) ) , numbers ) ) factors_num = list ( map ( ( lambda num : num . as_coeff_Mul ( ) ) , factorized_nums ) ) term = factors_num [ 0 ] [ 1 ] if all ( ( ( factor == term ) for ( coeff , factor ) in factors_num ) ) : common_term = term coeffs = [ coeff for ( coeff , factor ) in factors_num ] result = ( lcm_list ( coeffs ) * common_term ) elif all ( ( num . is_rational for num in numbers ) ) : result = lcm_list ( numbers ) else : pass return result
returns the least common integral multiple of a list of numbers .