def _rational_reconstruction_func_coeffs(hm, p, m, ring, k):
 h = ring.zero
 for (monom, coeff) in hm.iterterms():
  if (k == 0):
   coeffh = _rational_function_reconstruction(coeff, p, m)
   if (not coeffh):
    return None
  else:
   coeffh = ring.domain.zero
   for (mon, c) in coeff.drop_to_ground(k).iterterms():
    ch = _rational_function_reconstruction(c, p, m)
    if (not ch):
     return None
    coeffh[mon] = ch
  h[monom] = coeffh
 return h

def _rational_reconstruction_func_coeffs ( hm , p , m , ring , k ) : h = ring . zero for ( monom , coeff ) in hm . iterterms ( ) : if ( k == 0 ) : coeffh = _rational_function_reconstruction ( coeff , p , m ) if ( not coeffh ) : return None else : coeffh = ring . domain . zero for ( mon , c ) in coeff . drop_to_ground ( k ) . iterterms ( ) : ch = _rational_function_reconstruction ( c , p , m ) if ( not ch ) : return None coeffh [ mon ] = ch h [ monom ] = coeffh return h
reconstruct every coefficient c_h of a polynomial h in mathbb z_p[t_1 .