(ex, x)
return result
Returns the minimal polynomial of a ``RootOf`` object.
Returns the minimal polynomial of a ``RootOf`` object.
Returns the minimal polynomial of a RootOf object .
def _minpoly_rootof(ex, x):
    """
    Returns the minimal polynomial of a ``RootOf`` object.
    """
    p = ex.expr
    p = p.subs({ex.poly.gens[0]:x})
    _, factors = factor_list(p, x)
    result = _choose_factor(factors, x, ex)
    return result
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