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 allclose allBasic Examples (2)
Find the variables in a Boolean expression:
Find the number of variables for a pure BooleanFunction object:
Scope (2)
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:
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