def _trunc(f, minpoly, p):
 ring = f.ring
 minpoly = minpoly.set_ring(ring)
 p_ = ring.ground_new(p)
 return f.trunc_ground(p).rem([minpoly, p_]).trunc_ground(p)

def _trunc ( f , minpoly , p ) : ring = f . ring minpoly = minpoly . set_ring ( ring ) p_ = ring . ground_new ( p ) return f . trunc_ground ( p ) . rem ( [ minpoly , p_ ] ) . trunc_ground ( p )
compute the reduced representation of a polynomial f in mathbb z_p[z] / (check m_{alpha}(z))[x] parameters f : polyelement polynomial in mathbb z[x .