LogicalExpand
expr rewritten as a disjunction of conjunctions (DNF), with Implies/Equivalent/Xor/Nand/Nor eliminated.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
LogicalExpand✓LogicalExpand(expr)expr, boolean-connective-eliminated and distributed into an Or of AndsTyped signatures
| Type | Package | Applies |
|---|---|---|
(any) -> any | combinatorics | always |
Details
- Structural, not type-inferring: And/Or/Not/Implies/Equivalent/Xor/Nand/Nor are walked by operator, so a bare symbol is a boolean variable here regardless of what compute-engine would otherwise infer its type to be.
- Implies(a, b) becomes Or(Not(a), b); Xor and Equivalent are eliminated via their pairwise expansions before distribution; Nand/Nor become Not(And(...))/Not(Or(...)).
- A term with both a literal and its negation (a contradiction) is dropped; an empty result (no satisfiable term) is False.
- Every And/Or's operands are sorted and deduplicated by their serialized form for a deterministic result — the same input always prints the same way.
- Anything not one of the eight connectives above (a plain symbol, a comparison, a predicate call) is an opaque literal.
Examples
Properties #
About
| Examples | 13 |
|---|---|
| Checked against | Wolfram Language 13 agree |
| Crosswalk | Wolfram Language |
See also: BooleanConvert