def dmp_ground_nth(f, N, u, K):
 v = u
 for n in N:
  if (n < 0):
   raise IndexError(('`n` must be non-negative, got %i' % n))
  elif (n >= len(f)):
   return K.zero
  else:
   d = dmp_degree(f, v)
   if (d == (- oo)):
    d = (-1)
   (f, v) = (f[(d - n)], (v - 1))
 return f

def dmp_ground_nth ( f , N , u , K ) : v = u for n in N : if ( n < 0 ) : raise IndexError ( ( '`n` must be non-negative, got %i' % n ) ) elif ( n >= len ( f ) ) : return K . zero else : d = dmp_degree ( f , v ) if ( d == ( - oo ) ) : d = ( - 1 ) ( f , v ) = ( f [ ( d - n ) ] , ( v - 1 ) ) return f
return the ground n-th coefficient of f in k[x] .