def dmp_ground_p(f, c, u):
 if ((c is not None) and (not c)):
  return dmp_zero_p(f, u)
 while u:
  if (len(f) != 1):
   return False
  f = f[0]
  u -= 1
 if (c is None):
  return (len(f) <= 1)
 else:
  return (f == [c])

def dmp_ground_p ( f , c , u ) : if ( ( c is not None ) and ( not c ) ) : return dmp_zero_p ( f , u ) while u : if ( len ( f ) != 1 ) : return False f = f [ 0 ] u -= 1 if ( c is None ) : return ( len ( f ) <= 1 ) else : return ( f == [ c ] )
return true if f is constant in k[x] .