def __rsub__(p1, n):
        ring = p1.ring
        try:
            n = ring.domain_new(n)
        except CoercionFailed:
            return NotImplemented
        else:
            p = ring.zero
            for expv in p1:
                p[expv] = -p1[expv]
            p += n
            return p
n - p1 with n convertible to the coefficient domain.
dataset/ETHPy150Open sympy/sympy/sympy/polys/rings.py/PolyElement.__rsub__