A != b != c

It should be in all cases (as logic dictates), the expand you showed, only shows what the current implementations of Julia does.

In case when you do not have transitive, e.g. a < b > c, or != or the sneaky ≈ (isapprox), then for the optimizer, should split up and optimize the left and right of it separately.

“so there is nothing (except for sanity) stopping you from defining a non-transitive <”

Can that possibility be disallowed so the optimizer does not have to consider that case?