

def dmp_prs_resultant(f, g, u, K):
    '\n    Resultant algorithm in `K[X]` using subresultant PRS.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, ZZ\n    >>> R, x,y = ring("x,y", ZZ)\n\n    >>> f = 3*x**2*y - y**3 - 4\n    >>> g = x**2 + x*y**3 - 9\n\n    >>> a = 3*x*y**4 + y**3 - 27*y + 4\n    >>> b = -3*y**10 - 12*y**7 + y**6 - 54*y**4 + 8*y**3 + 729*y**2 - 216*y + 16\n\n    >>> res, prs = R.dmp_prs_resultant(f, g)\n\n    >>> res == b             # resultant has n-1 variables\n    False\n    >>> res == b.drop(x)\n    True\n    >>> prs == [f, g, a, b]\n    True\n\n    '
    if (not u):
        return dup_prs_resultant(f, g, K)
    if (dmp_zero_p(f, u) or dmp_zero_p(g, u)):
        return (dmp_zero((f - 1)), [])
    (R, S) = dmp_inner_subresultants(f, g, u, K)
    if (dmp_degree(R[(- 1)], u) > 0):
        return (dmp_zero((u - 1)), R)
    return (S[(- 1)], R)

dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py dmp_prs_resultant/VarMisuse@61/416 `u`->`f`