def dmp_ground_trunc(f, p, u, K):
 if (not u):
  return dup_trunc(f, p, K)
 v = (u - 1)
 return dmp_strip([dmp_ground_trunc(c, p, v, K) for c in f], u)

def dmp_ground_trunc ( f , p , u , K ) : if ( not u ) : return dup_trunc ( f , p , K ) v = ( u - 1 ) return dmp_strip ( [ dmp_ground_trunc ( c , p , v , K ) for c in f ] , u )
reduce a k[x] polynomial modulo a constant p in k .