Sometimes Reduce produces output where multiple variables are all assigned to each-other for example:
a == b && a == d
How can I assign this correctly to a new expression? For example
a*b - a*d /. ToRules[a == b && a == d]
(*b^2 - b d*)
Should be 0
A Longer example
Simplify[{a*b - a*d, a*b*d, r*s*w + b*s}, Assumptions -> {w == 0 & a == b && a == d}]
(*{(b - d) d, a b d, s (b + r w)}*)
Simplify[a b - a d, Assumptions -> a == b && a == d]? $\endgroup$ReplaceAll$b$ and $d$ with $a$, like thisa*b - a*d /. (Reverse /@ ToRules[a == b && a == d]). $\endgroup$Simplify[{a*b - a*d, a*b*d, r*s*w + b*s}, Assumptions -> {w == 0 & a == b && a == d}]Outputs:(*{(b - d) d, a b d, s (b + r w)}*)Additionally If I have a list of equations, how can I ensure that when simplifying with assumptions each equation gets put in terms of the same variables? $\endgroup$w == 0 &should bew == 0 &&$\endgroup$