Its been a while since I've dealt with boolean algebra, so I'm trying to simplify the following equation using wikipedia:Boolean_algebra:Laws while double checking everything in sympy:
~[(a & b) | (~a & c)]
Applying De Morgan's twice leads to CNF form:
(~a | ~b) & (a | ~c)
Distributing twice leads to DNF form:
[(~a | ~b) & a] | [(~a | ~b) & ~c]
[(a & ~a) | (a & ~b)] | [(~c & ~a) | (~c & ~b)]
(a & ~b) | (~c & ~a) | (~c & ~b)
According to sympy this last result can be simplified even further, to:
(a & ~b) | (~c & ~a)
Intuitively, this makes sense. However, I can't figure out how to apply any of the laws listed at wikipedia:Boolean_algebra:Laws to remove this third term in DNF form which covers the a|~a terms.
The relevant equivalences you need are:
Adjacency
$(P \land Q) \lor (P \land \neg Q) \Leftrightarrow P$
Absorption
$P \lor (P \land Q) \Leftrightarrow P$
If you don't have Adjancency, here is how you can derive it:
$(P \land Q) \lor (P \land \neg Q) \Leftrightarrow $ (Distribution)
$P \land (Q \lor \neg Q) \Leftrightarrow$ (Complement (some call this Inverse))
$P \land \top \Leftrightarrow$ (Identity)
$P$
Using these:
$(a \land \neg b) \lor (\neg c \land \neg a) \lor (\neg c \land \neg b) \Leftrightarrow$ (Adjacency)
$(a \land \neg b) \lor (\neg c \land \neg a) \lor (\neg c \land \neg b \land a) \lor (\neg c \land \neg b \land \neg a) \Leftrightarrow$ (Absorption x 2)
$(a \land \neg b) \lor (\neg c \land \neg a)$