def dup_primitive_prs(f, g, K):
    prs = [f, g]
    _, h = dup_primitive(dup_prem(f, g, K), K)

    while h:
        prs.append(h)
        f, g = g, h
        _, h = dup_primitive(dup_prem(f, g, K), K)

    return prs
Primitive polynomial remainder sequence (PRS) in `K[x]`.
dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/dup_primitive_prs