MATHEMATICA GUIDE

# Boolean Computation

Building on its core symbolic architecture, Mathematica gives immediate access to the latest in industrial-strength Boolean computation. With highly general symbolic representations of Boolean functions, with full support for "don't-care" arguments and values, Mathematica provides state-of-the-art Boolean function transformation, minimization, elimination, satisfiability, and analysis, making possible verification, testing, and other applications involving hundreds to hundreds of thousands of variables.

## ReferenceReference

### Basic Boolean Operators

And(&&, ) ▪ Or(||, ) ▪ Not(!, ¬) ▪ Nand() ▪ Nor() ▪ Xor() Xnor() ▪ Implies() ▪ Equivalent() ▪ Majority

True, False symbolic truth values

Boole convert symbolic truth values to 0 and 1

### Special Boolean Functions

BooleanCountingFunction out of variables true

BooleanConsecutiveFunction consecutive out of variables true

### General Boolean Functions

BooleanFunction general Boolean function (from IDs, mappings with "don't cares", ...)

BooleanMinterms, BooleanMaxterms combinations of minterms, maxterms

Conjunction, Disjunction AND, OR with respect to a list of variables (cf. , )

### Boolean Structure

BooleanTable create a truth vector or general truth table

BooleanVariables find the variables in a Boolean expression

UnateQ test whether a Boolean expression is unate (monotone)

### Conversion & Minimization

BooleanConvert convert to a specified format (CNF, DNF, ESOP, NOR, BFF, ...)

BooleanMinimize find a minimal Boolean form

### Boolean Function Testing

SatisfiableQ test whether any input to a function can give True

SatisfiabilityCount count how many possible inputs give True

SatisfiabilityInstances find instances of inputs that give True

TautologyQ test whether all possible inputs give True

### Predicate Calculus

ForAll (), Exists () — quantify over Boolean variables

Resolve eliminate quantified variables from a Boolean expression

LogicalExpand expand expressions involving Boolean operators and equations

### Numerical Boolean Computation

Nearest, FindClusters operate on Boolean vectors

Minimize, Maximize Boolean optimization

New to Mathematica? Find your learning path »
Have a question? Ask support »