def dup_mirror(f, K):
    f = list(f)

    for i in range(len(f) - 2, -1, -2):
        f[i] = -f[i]

    return f
Evaluate efficiently the composition ``f(-x)`` in ``K[x]``.
dataset/ETHPy150Open sympy/sympy/sympy/polys/densetools.py/dup_mirror