BooleanConvert

BooleanConvert[expr]
converts the Boolean expression expr to disjunctive normal form.

BooleanConvert[expr, form]
converts the Boolean expression expr to the specified form.

BooleanConvert[expr, form, cond]
finds an expression in the specified form that is equivalent to expr when cond is true.

Details and OptionsDetails and Options

  • BooleanConvert[expr, form] will produce an expression equivalent to expr.
  • Available forms are:
  • "DNF","SOP"disjunctive normal form, sum of products
    "CNF","POS"conjunctive normal form, product of sums
    "ESOP"exclusive sum of products
    "ANF"algebraic normal form
    "NOR"two-level Nor and Not
    "NAND"two-level Nand and Not
    "AND"two-level And and Not
    "OR"two-level Or and Not
    "IMPLIES"Implies and Not
    "ITE","IF"If and constants
    "BFF"BooleanFunction form
    "BDT"Boolean decision tree
  • The expression expr can contain any Boolean or logical functions, including BooleanFunction, BooleanCountingFunction, etc.
  • BooleanConvert[bf, form] converts the internal form of a pure BooleanFunction object.
  • BooleanConvert supports a Method option that specifies the detailed method to use.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Convert a Boolean expression to disjunctive normal form:

In[1]:=
Click for copyable input
Out[1]=

Convert to some common forms:

In[1]:=
Click for copyable input
Out[1]=

Convert using the condition that is true:

In[1]:=
Click for copyable input
Out[1]=

Show that the output is equivalent to the input when :

In[2]:=
Click for copyable input
Out[2]=
New in 7
New to Mathematica? Find your learning path »
Have a question? Ask support »