We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
BooleanFunction[values]
represents the Boolean function corresponding to the specified vector of truth values.
BooleanFunction[{{i11,i12,…}o1,…}]
represents the Boolean function defined by the specified mapping from inputs to outputs.
BooleanFunction[spec,{a1,a2,…}]
gives the Boolean expression in variables ai corresponding to the Boolean function specified by spec.
BooleanFunction[spec,{a1,a2,…},form]
gives the Boolean expression in the form specified by form.
DetailsGenerate the 30 Boolean function of 3 variables:
Use f like any other Boolean operator:
Generate the formula directly:
Specify a Boolean function based on a table of truth rules:
Use an incompletely specified truth table:
Convert a Boolean expression to a BooleanFunction:
Test that they represent the same function:
Scope (14) Basic Uses (3)Create a BooleanFunction with two arguments by indexing:
Compute its value for particular arguments:
The function remains unevaluated for symbolic arguments:
BooleanFunction can be used just like any other Boolean operator:
Any Boolean expression can be converted to a BooleanFunction expression:
Including combinations of BooleanFunction expressions:
A BooleanFunction expression that is equivalent to True or False automatically simplifies:
BooleanFunction is a canonical representation, and equivalence can be tested using SameQ:
Working with Truth Tables (7)Create a truth table in standard order:
Create an equivalent BooleanFunction expression:
Show that they are equivalent:
Alternatively, show that the resulting truth tables are the same:
Create a complete list of truth rules:
Create the corresponding BooleanFunction expression:
The ordering of truth rules for complete lists has no effect:
Use _ to indicate "don't cares" in a truth table:
Create a BooleanFunction:
The resulting truth table matches the original specification:
Use _ and __ to indicate "don't cares" in truth rules:
Create a BooleanFunction:
The original rules completely specify the function and the resulting truth tables are identical:
Use lists of lists to indicate a vector-valued truth table:
Create a BooleanFunction:
The resulting output matches the original specification:
Use vector-valued truth rules:
Create a BooleanFunction:
The resulting truth rules match the original specification:
Truth tables can also be given using 0 in place of False and 1 in place of True:
The resulting truth tables are identical:
Working with Other Representations (4)Convert any Boolean expression to a BooleanFunction expression:
Show that they are equivalent:
Convert expressions involving any Boolean operators:
Show that they are equivalent:
Convert a BooleanFunction expression to other standard forms:
A number of different standard forms:
Specify BooleanFunction using CellularAutomaton:
Applications (4) Enumerating Boolean Functions (2)Enumerate all 2-variable Boolean functions:
All 3-variable Boolean functions:
Randomly sample 50 functions of 4 variables:
Compare the sizes of Boolean functions in their standard and minimized forms:
Four variables, the first 1000 functions:
Creating New Primitives (1)Create new Boolean primitives corresponding to ≤, ≥, <, and >:
Implies is equivalent to x<=y:
Define a relation for Boolean functions f≼g iff f[u]≤g[u]:
Here you have x≼x∨y as reflected in the truth tables:
For all Boolean functions f and g, f∧g≼f≼f∨g:
This proves that f≼g iff f∧g⇔f:
Or that f≼g and g≼h implies f≼h:
Cellular Automata (1)Generate the rule 30 elementary cellular automaton rule:
Compare to the standard encoding:
Properties & Relations (7) Wolfram Research (2008), BooleanFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanFunction.html. TextWolfram Research (2008), BooleanFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanFunction.html.
CMSWolfram Language. 2008. "BooleanFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BooleanFunction.html.
APAWolfram Language. (2008). BooleanFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BooleanFunction.html
BibTeX@misc{reference.wolfram_2025_booleanfunction, author="Wolfram Research", title="{BooleanFunction}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanFunction.html}", note=[Accessed: 11-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_booleanfunction, organization={Wolfram Research}, title={BooleanFunction}, year={2008}, url={https://reference.wolfram.com/language/ref/BooleanFunction.html}, note=[Accessed: 11-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4