Simplify command is having trouble verifying a compound inequality, even while it correctly handles the two corresponding single inequalities.
I'm starting with some simple global assumptions:
$Assumptions = Element[k, Integers] && i == k + 1;
Under these assumptions, the following uses of
Simplify all return
True, as expected:
In:= Simplify[i == k + 1] Out= True In:= Simplify[k < k + 1 < k + 2] Out= True In:= Simplify[k < i && i < k + 2] Out= True
However, combining the two inequalities from the last input above into one compound inequality does not yield the expected output:
In:= Simplify[k < i < k + 2] Out= k < i < 2 + k (*NOT True as expected*)
Simplifynot recognize that this compound inequality is true?
(Note: I realize it seems silly to check if
k<i<k+2 since I'm already assuming
i=k+1. However, I was having problems while dealing with more complex code, and this behavior of
Simplify seemed to be at the root of it.)