# Code check: Force simplified inequalities to be of form expr > 0

Simplify is a nice fast function that cleans up simple inequalities. For example:

Simplify[c (a - b) > 0, Assumptions -> c > 0]

a > b

But I need the output inequality of the form expr > 0, and ultimately I want to extract expr. So I wrote a tiny function that gets it:

getGtrZero[expr_, assump_] := Part[#, 1] - Part[#, 2] &@Simplify[expr > 0, assump]

Test:

getGtrZero[c (a - b), c > 0]

a - b

This seems to be working ok, but this crucially requires that the output uses the function Greater. Is this a robust way to get the simplified expr that is going to be greater than zero?

Assumptions about input inequality: The input inequality will always have head Greater and will be a comparison of two simple polynomials of various symbols (involving only plus, minus and times).

• Simplify[c (a - b) < 0, Assumptions -> c > 0] /. {x__ > y__ -> x - y > 0, x__ < y__ -> y - x > 0}? Oct 7 '14 at 16:06

You can force Simplify to return inequalities with head Greater and right hand side 0 by adapting the ComplexityFunction and adding a transformation function that will convert a Less expression to a Greater expression:

Simplify[a<0,