def _minpoly_rootof(ex, x):
    p = ex.expr
    p = p.subs({ex.poly.gens[0]:x})
    _, factors = factor_list(p, x)
    result = _choose_factor(factors, x, ex)
    return result
Returns the minimal polynomial of a ``CRootOf`` object.
dataset/ETHPy150Open sympy/sympy/sympy/polys/numberfields.py/_minpoly_rootof