Simplifying boolean algebra without using certain operations
You could try giving Simplify
a ComplexityFunction
option that discourages Xor
:
Simplify[
!(x&&y&&z)&&!(x&&!y&&!z)&&!(!x&&!y&&z),
ComplexityFunction->(LeafCount[#]+10000Count[#, _Xor,{0,Infinity}]&)
]
(x && ! y && z) || (! x && (y || ! z)) || (y && ! z)
Addendum
(The OP asked about another expression)
I don't know which boolean transformations are built in to Simplify
/FullSimplify
, but you can add more with the option TransformationFunctions
. So:
FullSimplify[
!u && !v && !w && !x,
ComplexityFunction -> (LeafCount[#]+10000Count[#, _Xor,{0,Infinity}]&),
TransformationFunctions -> {Automatic, BooleanConvert[#,"OR"]&}
]
(* !(u || v || w || x) *)
perhaps BooleanMinimize
?
BooleanMinimize[! (x && y && z) && ! (x && ! y && ! z) && ! (! x && ! y && z)]
(x && ! y && z) || (! x && y) || (! x && ! z) || (y && ! z)
BooleanMinimize[! (x && y && z) && ! (x && ! y && ! z) && ! (! x && ! y && z), "CNF"]
(! x || ! y || ! z) && (! x || y || z) && (x || y || ! z)