WOLFRAM

BooleanVariables
BooleanVariables

gives a list of the Boolean variables in the Boolean expression expr.

gives the number of Boolean variables in the BooleanFunction object bf.

Details

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Find the variables in a Boolean expression:

Out[1]=1

Find the number of variables for a pure BooleanFunction object:

Out[1]=1

Scope  (2)Survey of the scope of standard use cases

Find the Boolean variables in a Boolean expression:

Out[1]=1
Out[2]=2

Programmatically get the number of arguments to a pure Boolean function:

Out[1]=1
Out[2]=2
Out[3]=3

Properties & Relations  (2)Properties of the function, and connections to other functions

BooleanVariables is by default used as the list of variables for BooleanTable:

Out[1]=1
Out[2]=2

Use BooleanVariables to get a variable list for SatisfiabilityInstances:

Out[1]=1
Out[2]=2

FindInstance:

Out[3]=3

Conjunction and Disjunction:

Out[4]=4
Out[5]=5

Possible Issues  (1)Common pitfalls and unexpected behavior

Anything that is not explicitly constructed using Boolean primitives and functions is variable:

Out[1]=1
Wolfram Research (2008), BooleanVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanVariables.html.
Wolfram Research (2008), BooleanVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanVariables.html.

Text

Wolfram Research (2008), BooleanVariables, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanVariables.html.

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.

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

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: 08-July-2025 ]}

@misc{reference.wolfram_2025_booleanvariables, author="Wolfram Research", title="{BooleanVariables}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanVariables.html}", note=[Accessed: 08-July-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: 08-July-2025 ]}

@online{reference.wolfram_2025_booleanvariables, organization={Wolfram Research}, title={BooleanVariables}, year={2008}, url={https://reference.wolfram.com/language/ref/BooleanVariables.html}, note=[Accessed: 08-July-2025 ]}