def dmp_ground_content(f, u, K):
 from sympy.polys.domains import QQ
 if (not u):
  return dup_content(f, K)
 if dmp_zero_p(f, u):
  return K.zero
 (cont, v) = (K.zero, (u - 1))
 if (K == QQ):
  for c in f:
   cont = K.gcd(cont, dmp_ground_content(c, v, K))
 else:
  for c in f:
   cont = K.gcd(cont, dmp_ground_content(c, v, K))
   if K.is_one(cont):
    break
 return cont

def dmp_ground_content ( f , u , K ) : from sympy . polys . domains import QQ if ( not u ) : return dup_content ( f , K ) if dmp_zero_p ( f , u ) : return K . zero ( cont , v ) = ( K . zero , ( u - 1 ) ) if ( K == QQ ) : for c in f : cont = K . gcd ( cont , dmp_ground_content ( c , v , K ) ) else : for c in f : cont = K . gcd ( cont , dmp_ground_content ( c , v , K ) ) if K . is_one ( cont ) : break return cont
compute the gcd of coefficients of f in k[x] .