# Boolean algebra does not simplify

I am doing some simple Boolean algebra and wanted to perform some calculations in Mathematica but found it doesn't work.

Let us consider the expression:

expr1 = ((b < 0 && A <= AA) || A < AA);
expr2 = ((b < 0 && A == AA) || A < AA);


From our point of view they are the same. Or do we miss a special case?

FullSimplify[{expr1 == expr2}, #] & /@ {A < AA, A > AA, A == AA}


{{True}, {True}, {True}}

Now the problem is Mathematica does not see them as equivalent, in general:

FullSimplify[
expr1
==
expr2
,
A > 0 && AA > 0]


This does not yield True, but instead expr1 == expr2.

Do we have an error in reasoning?

How can I make Mathematica simplify expr1 to expr2?

Equivalent[expr1, expr2] // FullSimplify

(* True*)

• Whats the difference to my code? Feb 13, 2015 at 17:13
• @Philipp Equivalent does not mean Equal.It only means that the truth tables for both are the same Feb 13, 2015 at 17:19

Just to amplify belisarius comments, let b<0 be x, A < AA be y and A==AA be z,

e1 = (x && (y || z)) || z
e2 = (x && y) || z


BooleanMinimize applied to these yields: (x && y) || z

The truth tables can be shown:

Framed@TableForm[BooleanTable[{x, y, z, e1, e2}],
TableHeadings -> {None, {x, y, z, e1, e2}}]


And TautologyQ[Equivalent[e1, e2]] yields True.