Consider the following input and output:
In:
Solve[(1 - a) x == (2 - a) y, x]
Out: $$\left\{\left\{x\rightarrow\frac{(-2+a)y}{-1+a}\right\}\right\}$$
There are two things I don't like about this output (the first fairly generic, and the second more specific to my application):
the fact that the negative term is written first makes the expression less compact than the alternative:$$\frac{(a-2)y}{a-1}.$$ I find this alternative to be typographically neater.
If $a$ is a probability, it is guaranteed to be no greater than 1. I think it makes semantically more sense to write the output as $$\frac{(2-a)y}{1-a}.$$ Obviously, Mathematica doesn't know that $0\leq a\leq 1$, but I supplied the terms written as $2-a$ rather than $a-2$ and it would be nice if it were to preserve this ordering to some extent.
Thus, my questions are
Why does mathematica write $-2+a$ in the solution rather than $a-2$?
Is there a way to get mathematica to arrange output so that terms start with a leading "$-$" as rarely as possible?
If there a way to tell Mathematica "$a\in[\underline{a},\overline{a}]$; please use this information, where possible, to arrange output such that terms are written as (positive x positive) rather than (negative x negative)?"

PlusisOrderless,Plus[a, -2]will always becomePlus[-2, a], because numbers come before symbols in the canonical ordering. Furthermore, when Mathematica simplifies, it's figure of merit for simplifying includesLeafCount, which is a proxy for the complexity of the expression, and((-2 + a) y)/(-1 + a)has a smallerLeafCountthan((2 - a) y)/(1 - a). Now, there are ways to display this more nicely, if all you care about is displaying. Maybe I'll search for an example Q&A that answers your question. $\endgroup$TraditionalFormwill do what you want, but take care to only use it for display purpose, eg doTraditionalForm[solution = Solve[(1 - a) x == (2 - a) y, x]]so thatsolutionholds the unformatted expression. $\endgroup$ClearAttributes[Plus, Orderless],a - 2still becomes-2 + a. Also, I'm not sure if it's due to LeafCount either, sincea - 2and-2 + aboth have a LeafCount of 3. $\endgroup$