# Simplify semi-boolean expression

I'm trying to simplify the following expression:

(A == B) OR ( (A > B) AND (A < C) )


Given that B <= C, this is my bet:

B <= A < C     (also  (B <= A) AND (A < C))


Explanation:

(A == B) OR ( (A > B) AND (A < C) )
((A == B) OR (A > B)) AND ((A == B) OR (A < C))
(A >= B) AND ((A == B) OR (A < C))
((A >= B) AND (A == B)) OR ((A >= B) AND (A < C))
(A >= B) OR ((A >= B) AND (A < C))
(A >= B) AND (A < C)
B <= A < C


Correct?

Basically, my assumptions are:

(A == B) OR  (A > B)   equals to  A >= B
(A >= B) AND (A == B)  equals to  A >= B


$$(A == B)\ OR\ (\ (A > B)\ AND\ (A < C)\ )$$ $$((A == B)\ OR\ (A > B))\ AND\ ((A == B)\ OR\ (A < C))$$ $$(A >= B)\ AND\ ((A == B)\ OR\ (A < C))$$
So these are your first two steps and I agree with them. But I do not see where you use $B <= C$, which would be key to the solution. $$(A >= B)\ AND\ ((A == \color{RED}{B})\ OR\ (A < C))$$ $$(A >= B)\ AND\ ((A == \color{RED}{<= C})\ OR\ (A < C))$$ $$(A >= B)\ AND\ ((A <= C)\ OR\ (A < C))$$ $$(A >= B)\ AND\ (A <= C)$$ $$B <= A <= C$$