def _chinese_remainder_reconstruction_univariate(hp, hq, p, q):
 n = hp.degree()
 x = hp.ring.gens[0]
 hpq = hp.ring.zero
 for i in range((n + 1)):
  hpq[(i,)] = crt([p, q], [hp.coeff((x ** i)), hq.coeff((x ** i))], symmetric=True)[0]
 hpq.strip_zero()
 return hpq

def _chinese_remainder_reconstruction_univariate ( hp , hq , p , q ) : n = hp . degree ( ) x = hp . ring . gens [ 0 ] hpq = hp . ring . zero for i in range ( ( n + 1 ) ) : hpq [ ( i , ) ] = crt ( [ p , q ] , [ hp . coeff ( ( x ** i ) ) , hq . coeff ( ( x ** i ) ) ] , symmetric = True ) [ 0 ] hpq . strip_zero ( ) return hpq
construct a polynomial h_{pq} in mathbb{z}_{p q}[x] such that .