# Inequality involving Quantity stays unevaluated

Bug introduced in 10.1 and solved in 11.1

An expression like this one

a < x < b


is represented as

Less[a, x, b]


while an expression like

a < x <= b


is represented as

Inequality[a, Less, x, LessEqual, b]


On my machine a problem arise when an Inequality expression contains Quantity expressions. For example

Quantity[6368, "Kilometers"] < Quantity[5500, "Kilometers"] <=
Quantity[6371, "Kilometers"]


stays unevaluated:

Quantity[6368, "Kilometers"] < Quantity[5500, "Kilometers"] <= Quantity[6371, "Kilometers"]

An annoying workaround is to LogicalExpand all Inequality expressions that may contains Quantity expression.

LogicalExpand@%


False

• Looks like a bug to me. Better send this to support@wolfram.com – Sjoerd C. de Vries May 1 '15 at 11:04
• Simplify also works. – chuy May 1 '15 at 14:59
• Thank you for pointing this out. I checked and this is a known (internally reported) issue. This example will be added to the report. – Daniel Lichtblau May 1 '15 at 15:46
• @chuy Not if the inequality is undecidable. – unlikely Mar 8 '16 at 18:18
• @DanielLichtblau Is there anything built-in that makes it easy to bring inequalities to a canonical form? There seem to be several different ways to represent the same inequality. LogicalExpand? – Szabolcs Sep 29 '16 at 12:22