Consider a logical expression such as
expr = (a == b + q - w || c == d) && (q + c - d == w || e == r);
I wonder if there is a function that would completely expand the nested brackets and fully simplify each case, e.g.:
expr // ExpandAndSimplify
(a + w == b + q && c + r == d + e) || (a == b && q == w) ||
(c == d && q == w) || (c == d && r == e)
Is there such a function in Mathematica? Or maybe one can implement it somehow?