'Negate all coefficients in ``f``.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x
>>> Poly(x**2 - 1, x).neg()
Poly(-x**2 + 1, x, domain=\'ZZ\')
>>> -Poly(x**2 - 1, x)
Poly(-x**2 + 1, x, domain=\'ZZ\')'

def neg(f):

    if hasattr(f.rep, 'neg'):
        result = f.rep.neg()
    else:
        raise OperationNotSupported(f, 'neg')
    return f.per(result)
