The following code
$Assumptions = {0 < x < 1, 0 < y < 1, z > 1};
myexpr = Expand[(1 - x) (1 - y) (z - 1)];
TraditionalForm[Simplify[myexpr]]
outputs
(x-1)(y-1)(z-1)
but I want to output
(1-x)(1-y)(z-1)
i.e., I want every block in my expression to be a positive number. If the expression itself is negative, that should be shown by a minus in front of it. (The $Assumptions guarantee that Mathematica knows what it needs to know to make sure every block is positive).
Is it possible?
I found this answer but it doesn't quite cut it because (a) it's way too cumbersome and (b) in my case the expression to be reformatted comes out of a solver and I have no control over it.
-# & /@ Simplify[myexpr]– Bob Hanlon Sep 28 '18 at 02:01