2
$\begingroup$

these two codes give different result.

FullSimplify[a-b,Assumptions->a==1+y&&b==1+y-x]

this give x

FullSimplify[a-z,Assumptions->a==1+y&&z==1+y-x]

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

why does this happen?

mathematica version:11.3

$\endgroup$
2
  • $\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
    Commented Dec 6, 2019 at 10:16
  • 4
    $\begingroup$ closely related/possible duplicate: Why does Simplify ignore an assumption? $\endgroup$
    – kglr
    Commented Dec 6, 2019 at 13:04

0

Browse other questions tagged or ask your own question.