Repository: sympy/sympy

Issue:
`evaluate(False)` should prevent distributing `-1` into an Add
```
>>> from sympy import evaluate, abc
>>> x, y = abc.x, abc.y
>>> with evaluate(False):
...     eq = y - (2*x + 1)
... 
>>> eq
y - (2*x - 1)

>>> import sympy
>>> sympy.__version__
'1.11.1'
>>>
```

Discussion:

Patch:
diff --git a/sympy/core/add.py b/sympy/core/add.py
index aebc468ecd..58608cafc2 100644
--- a/sympy/core/add.py
+++ b/sympy/core/add.py
@@ -1272,7 +1272,7 @@ def _mpc_(self):
     def __neg__(self):
         if not global_parameters.distribute:
             return super().__neg__()
-        return Add(*[-i for i in self.args])
+        return Mul(S.NegativeOne, self)
 
 add = AssocOpDispatcher('add')
 


Test patch:
diff --git a/sympy/core/tests/test_arit.py b/sympy/core/tests/test_arit.py
index f9777d67ea..abf0f39637 100644
--- a/sympy/core/tests/test_arit.py
+++ b/sympy/core/tests/test_arit.py
@@ -17,7 +17,7 @@
 from sympy.polys.polytools import Poly
 from sympy.sets.sets import FiniteSet
 
-from sympy.core.parameters import distribute
+from sympy.core.parameters import distribute, evaluate
 from sympy.core.expr import unchanged
 from sympy.utilities.iterables import permutations
 from sympy.testing.pytest import XFAIL, raises, warns
@@ -2393,6 +2393,9 @@ def test__neg__():
     with distribute(False):
         eq = -(x + y)
         assert eq.is_Mul and eq.args == (-1, x + y)
+    with evaluate(False):
+        eq = -(x + y)
+        assert eq.is_Mul and eq.args == (-1, x + y)
 
 
 def test_issue_18507():