these two codes give different result.


this give x


but just convert b to z,result is a - z

why does this happen?

mathematica version:11.3

  • $\begingroup$ It is likely to be a bug. That said, you should be using With for your case. Assumptions is more for things like x is an element of Reals, x > 0 etc..I mean your could looks much better as With [{a = 1, z = 1 - x}, a - z] $\endgroup$
    – Lotus
    Dec 6, 2019 at 10:16
  • 4
    $\begingroup$ closely related/possible duplicate: Why does Simplify ignore an assumption? $\endgroup$
    – kglr
    Dec 6, 2019 at 13:04


Browse other questions tagged or ask your own question.