BooleanVariables[expr]
给出布尔表达式 expr 中布尔变量的列表.
BooleanVariables[bf]
给出 BooleanFunction 对象 bf 中布尔变量的数量.
BooleanVariables
BooleanVariables[expr]
给出布尔表达式 expr 中布尔变量的列表.
BooleanVariables[bf]
给出 BooleanFunction 对象 bf 中布尔变量的数量.
更多信息
- 在 BooleanVariables[expr] 中,表达式 expr 可以包含布尔函数的任意组合,例如 And,Or,Not,以及 BooleanFunction 和相关函数.
- 在 BooleanVariables[bf] 中,表达式 bf 必须是单个 BooleanFunction 对象.
- BooleanVariables[expr] 按照 Sort 返回的顺序给出变量列表.
范例
打开所有单元 关闭所有单元基本范例 (2)
BooleanVariables[a || !b && b]求出一个纯 BooleanFunction 对象的布尔变量的数量:
BooleanVariables[BooleanFunction[30, 3]]范围 (2)
BooleanVariables[Xor[a, And[b, Or[c, d]]]]BooleanVariables[BooleanCountingFunction[2, 3][a, b, c]]BooleanVariables[BooleanFunction[12345, 20]]BooleanVariables[BooleanCountingFunction[3, 17]]BooleanVariables[#1 && #199&]属性和关系 (2)
缺省下 BooleanVariables 用作 BooleanTable 的变量列表:
BooleanTable[And[c, Or[a, b]]]BooleanTable[And[c, Or[a, b]], BooleanVariables[And[c, Or[a, b]]]]用 BooleanVariables 获得 SatisfiabilityInstances 的变量列表:
v = BooleanVariables[And[c, Or[a, b]]]SatisfiabilityInstances[And[c, Or[a, b]], v]FindInstance[And[c, Or[a, b]], v]Conjunction[And[c, Or[a, b]], v]Disjunction[And[c, Or[a, b]], v]相关指南
-
▪
- 布尔运算
文本
Wolfram Research (2008),BooleanVariables,Wolfram 语言函数,https://reference.wolfram.com/language/ref/BooleanVariables.html.
CMS
Wolfram 语言. 2008. "BooleanVariables." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/BooleanVariables.html.
APA
Wolfram 语言. (2008). BooleanVariables. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/BooleanVariables.html 年
BibTeX
@misc{reference.wolfram_2026_booleanvariables, author="Wolfram Research", title="{BooleanVariables}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanVariables.html}", note=[Accessed: 18-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_booleanvariables, organization={Wolfram Research}, title={BooleanVariables}, year={2008}, url={https://reference.wolfram.com/language/ref/BooleanVariables.html}, note=[Accessed: 18-August-2026]}