BooleanVariables [expr]
gives a list of the Boolean variables in the Boolean expression expr.
BooleanVariables [bf]
gives the number of Boolean variables in the BooleanFunction object bf.
BooleanVariables
BooleanVariables [expr]
gives a list of the Boolean variables in the Boolean expression expr.
BooleanVariables [bf]
gives the number of Boolean variables in the BooleanFunction object bf.
Details
- In BooleanVariables [expr], the expression expr can involve any combination of Boolean functions such as And , Or , Not , as well as BooleanFunction and related functions.
- In BooleanVariables [bf], the expression bf must be a single BooleanFunction object.
- BooleanVariables [expr] gives a list of variables in the order returned by Sort .
Examples
open all close allBasic Examples (2)
Find the variables in a Boolean expression:
Find the number of variables for a pure BooleanFunction object:
Scope (2)
Find the Boolean variables in a Boolean expression:
Programmatically get the number of arguments to a pure Boolean function:
Properties & Relations (2)
BooleanVariables is by default used as the list of variables for BooleanTable :
Use BooleanVariables to get a variable list for SatisfiabilityInstances :
Conjunction and Disjunction :
Possible Issues (1)
Anything that is not explicitly constructed using Boolean primitives and functions is variable:
See Also
Related Guides
History
Text
Wolfram Research (2008), BooleanVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanVariables.html.
CMS
Wolfram Language. 2008. "BooleanVariables." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BooleanVariables.html.
APA
Wolfram Language. (2008). BooleanVariables. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BooleanVariables.html
BibTeX
@misc{reference.wolfram_2025_booleanvariables, author="Wolfram Research", title="{BooleanVariables}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanVariables.html}", note=[Accessed: 24-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_booleanvariables, organization={Wolfram Research}, title={BooleanVariables}, year={2008}, url={https://reference.wolfram.com/language/ref/BooleanVariables.html}, note=[Accessed: 24-November-2025]}