Is it possible for Mathematica to do simplifications for expressions where the variables are binary, such as:
a + b = 1 + 2*c => a + b = 1
Here c must be 0 because if it is 1, the RHS is 3 but the LHS can be at most 2.
a + 2*b*a + 2*c = 2*d => c=d
Here the LHS is: a(1+2*b) + 2*c. The RHS must be even, so the LHS must be even. But (1 + 2*b) can never be even, so 'a' must be 0.
I looked at Simplify[ ] and FullSimplify[ ] using assumptions, and various other stackexchange questions, but to my surprise this doesn't seem possible in Mathematica.
Edit:
I want to comment on the answer by Algohi, but can't seem to add an image to the comment. What Algohi is doing solves the binary equations, but what I need is the simplified equations (a + b = 1, and c=d). I would have to convert the boolean expressions in that answer to equations:
However I can't find a way to do this in Mathematica. If I could convert back & forth easily, I would have converted the equations to a boolean expression and then used BooleanMinimize[ ] to simplify.
GroebnerBasis
might still be viable (whether it would give a useful simplification in general is another matter though). $\endgroup$FullSimplify
has as its charter, approximately, to reduce leaf count. It might or might not be able to do this is an equational setting but it would need appropriate "side relations" (e.g.x^2==x
for all variablesx
). It is far more reliable to work with functionality dedicated to such a task. $\endgroup$