def _minpoly_from_dense(minpoly, ring):
 minpoly_ = ring.zero
 for (monom, coeff) in minpoly.terms():
  minpoly_[monom] = ring.domain(coeff)
 return minpoly_

def _minpoly_from_dense ( minpoly , ring ) : minpoly_ = ring . zero for ( monom , coeff ) in minpoly . terms ( ) : minpoly_ [ monom ] = ring . domain ( coeff ) return minpoly_
change representation of the minimal polynomial from dmp to polyelement for a given ring .